* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    16px Arial,
    sans-serif;
  background: #f5f7fb;
  color: #111827;
}
a {
  color: #2563eb;
}
header {
  background: #fff;
  padding: 18px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
  gap: 16px;
}
.brand {
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  color: #111827;
}
.brand span {
  color: #2563eb;
}
nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
nav a {
  text-decoration: none;
  color: #2563eb;
}
main {
  max-width: 1100px;
  margin: auto;
  padding: 42px 20px;
}
h1 {
  font-size: clamp(34px, 6vw, 60px);
  max-width: 850px;
  margin: 0.2em 0;
}
.hero {
  background: transparent;
  border: 0;
  padding: 0 0 24px;
}
.eyebrow {
  color: #2563eb;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
}
.panel,
section,
.card {
  background: #fff;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
}
.grid,
.form {
  display: grid;
  grid-template-columns: 2fr 1.5fr 0.6fr auto;
  gap: 10px;
  align-items: end;
}
label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}
input,
select,
textarea,
button {
  padding: 13px;
  border: 1px solid #ccc;
  border-radius: 9px;
  font: inherit;
  min-height: 46px;
}
button {
  background: #2563eb;
  color: #fff;
  border: 0;
  font-weight: bold;
  cursor: pointer;
}
.secondary {
  background: #e8efff;
  color: #1748a8;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}
.card h3 {
  margin-top: 0;
}
.muted,
#msg {
  color: #6b7280;
}
.actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.actions button {
  padding: 9px 10px;
  font-size: 12px;
  min-height: 38px;
}
.badge {
  display: inline-block;
  margin-top: 10px;
  background: #eff6ff;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13px;
}
.meta {
  font-size: 12px;
  color: #6b7280;
  margin-top: 8px;
}
.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 12px;
}
.empty {
  padding: 20px;
  color: #6b7280;
}
.load {
  text-align: center;
  margin: 22px;
}
.source {
  margin-top: 35px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
  font-size: 14px;
  color: #4b5563;
}
.contact {
  max-width: 700px;
}
.contact form {
  display: grid;
  gap: 12px;
}
.hp {
  display: none;
}
footer {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
  font-size: 13px;
}
footer a {
  color: #4b5563;
}
.cookie,
#cookies {
  position: fixed;
  bottom: 15px;
  left: 15px;
  right: 15px;
  max-width: 700px;
  margin: auto;
  background: #111827;
  color: #fff;
  padding: 15px;
  border-radius: 12px;
  z-index: 1000;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.maptop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.back {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  padding: 10px 13px;
  color: #111827;
  font-weight: 700;
}
.maplegend {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 14px;
}
#map {
  height: 72vh;
  min-height: 460px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}
.favmark {
  font-size: 16px;
}
.leaflet-popup-content .popup-actions {
  margin-top: 8px;
}
.leaflet-popup-content a {
  font-weight: 700;
  text-decoration: none;
}
@media (max-width: 700px) {
  header {
    padding: 14px 16px;
    align-items: flex-start;
    flex-direction: column;
  }
  .brand {
    font-size: 23px;
  }
  nav {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }
  nav a {
    font-size: 13px;
  }
  main {
    padding: 24px 14px 34px;
  }
  h1 {
    font-size: 38px;
  }
  .grid,
  .form {
    grid-template-columns: 1fr;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .panel,
  section,
  .card {
    padding: 16px;
  }
  .actions button {
    flex: 1;
  }
  .sectionhead {
    align-items: flex-end;
  }
  #map {
    height: 68vh;
    min-height: 430px;
    border-radius: 12px;
  }
  .maptop h1 {
    font-size: 32px;
    margin: 0;
  }
  .cookie,
  #cookies {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }
  .source {
    font-size: 13px;
  }
}
.buttonlike {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.actions .selected {
  font-weight: 800;
  outline: 2px solid currentColor;
}
.details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}
.back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 800;
  text-decoration: none;
}
@media (max-width: 650px) {
  .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .actions > * {
    min-height: 44px;
  }
  .card {
    padding: 14px;
  }
  .maptop {
    gap: 10px;
  }
}

.contact-back {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 16px 0;
}
.contact-back .back {
  display: inline-flex !important;
  visibility: visible !important;
  min-height: 44px;
  align-items: center;
  font-weight: 800;
  text-decoration: none;
}

.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}
.account-grid form {
  display: grid;
  gap: 12px;
}
@media (max-width: 700px) {
  .account-grid {
    grid-template-columns: 1fr;
  }
}
.auth-shell {
  max-width: 650px;
  margin: 0 auto;
}
.auth-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 26px;
  margin-top: 20px;
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.07);
}
.auth-card form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.auth-card label {
  display: grid;
  gap: 7px;
  font-weight: 650;
}
.auth-card input {
  width: 100%;
  box-sizing: border-box;
}
.auth-switch {
  text-align: center;
  margin: 20px 0 0;
}
.auth-switch a {
  font-weight: 750;
}
.auth-msg {
  min-height: 22px;
  margin: 0;
}
.auth-msg.error {
  color: #b42318;
}
.auth-msg.success {
  color: #067647;
}
.btnlike {
  display: inline-block;
  padding: 11px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
}

.account-connected {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.account-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e9f8ef;
  font-weight: 800;
}
.account-connected p {
  margin: 4px 0 0;
}
.search-panel .grid {
  grid-template-columns: 1.6fr 1.35fr 0.75fr 0.8fr auto;
}
.recent-box {
  margin-top: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.recent-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  color: #111827;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  text-align: left;
  font-weight: 600;
}
.recent-item:last-child {
  border-bottom: 0;
}
.recent-item i {
  font-style: normal;
  font-size: 22px;
  opacity: 0.3;
  padding: 0 8px;
}
.recent-item i:hover {
  opacity: 0.8;
}
.distance {
  font-size: 13px;
  font-weight: 700;
  margin-top: 8px;
}
.why {
  margin-top: 10px;
  font-size: 13px;
}
.why summary {
  cursor: pointer;
  font-weight: 700;
}
.green-marker {
  font-size: 34px;
  line-height: 20px;
  color: #16a34a;
  text-shadow: 0 1px 3px #fff;
}
.tracking-tools {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 10px;
  margin-bottom: 16px;
}
.site-footer {
  border-top: 1px solid #e5e7eb;
  padding-top: 20px;
}
.narrow {
  max-width: 820px;
  margin: auto;
}
.legal-updated {
  color: #6b7280;
  font-size: 13px;
}
.toolgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.toolgrid form {
  display: grid;
  gap: 10px;
}
.data-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.dangerbtn {
  background: #b42318;
}
.linkbtn {
  background: transparent;
  color: #2563eb;
  padding: 4px;
  min-height: 30px;
  text-align: left;
}
.check {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  font-weight: 400;
}
.check input {
  min-height: auto;
  width: auto;
}
.account-grid h2,
.toolgrid h3 {
  margin-top: 0;
}
@media (max-width: 800px) {
  .search-panel .grid,
  .tracking-tools,
  .toolgrid {
    grid-template-columns: 1fr;
  }
}

.optional {
  font-weight: 400;
  color: #6b7280;
  font-size: 12px;
}
.simple-marker {
  width: 16px !important;
  height: 16px !important;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.simple-marker.is-default {
  background: #2563eb;
}
.simple-marker.is-good {
  background: #16a34a;
}
.search-panel .grid {
  grid-template-columns: 1.35fr 1.15fr 1.25fr 0.65fr 0.75fr auto;
}
@media (max-width: 800px) {
  .search-panel .grid {
    grid-template-columns: 1fr;
  }
}
/* v11.7 : ajustements bureau uniquement */
@media (min-width: 801px) {
  .brand {
    font-size: 26px;
  }
  .search-panel .grid {
    grid-template-columns: 1.35fr 1.15fr 1.25fr 0.65fr 0.75fr;
  }
  .search-panel #searchBtn {
    grid-column: 5;
    justify-self: end;
    min-width: 128px;
    margin-top: 2px;
  }
}

/* v11.8 — logo légèrement plus épais, taille inchangée */
.brand {
  font-weight: 800;
}

.analytics-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  max-width: 760px;
  margin: auto;
  background: #fff;
  color: #111;
  border: 1px solid #d9dee7;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.14);
  padding: 16px;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}
.analytics-consent p {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
}
.analytics-consent a {
  text-decoration: underline;
}
.analytics-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}
.analytics-actions button {
  min-width: 90px;
}
.analytics-actions [data-analytics-refuse] {
  background: transparent;
  color: inherit;
  border: 1px solid #aeb7c5;
}
@media (max-width: 650px) {
  .analytics-consent {
    display: block;
  }
  .analytics-actions {
    margin-top: 12px;
  }
  .analytics-actions button {
    flex: 1;
  }
}

/* Formulaire de recherche : les colonnes peuvent rétrécir, les champs ne débordent plus du panneau */
.search-panel .grid > * {
  min-width: 0;
}
.search-panel .grid input,
.search-panel .grid select {
  width: 100%;
  min-width: 0;
}
@media (min-width: 801px) {
  .search-panel .grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.15fr) minmax(
        0,
        1.25fr
      ) minmax(0, 0.65fr) minmax(0, 0.75fr);
  }
}
