:root {
  /* Identité TrouveMonDoc : indigo -> cyan, accent corail chaleureux */
  --bleu-nuit: #241b52;
  --bleu-nuit-2: #33217a;
  --bleu: #4f46e5;
  --bleu-vif: #4338ca;
  --bleu-clair: #eef0ff;
  --cyan: #06b6d4;
  --corail: #ff6b57;
  --corail-vif: #ff5238;
  --vert: #16a34a;
  --vert-clair: #eafbf0;
  --rouge: #dc2626;
  --rouge-clair: #fdedec;
  --orange: #f59e0b;
  --orange-clair: #fef3dd;
  --teal: #0d9488;
  --teal-vif: #0f766e;
  --teal-clair: #ccfbf1;
  --gris-900: #191531;
  --gris-700: #423d5c;
  --gris-500: #6f6b85;
  --gris-300: #e2dff0;
  --gris-100: #f4f2fb;
  --fond: #e6e1f6;
  --blanc: #ffffff;
  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 20px;
  --ombre: 0 1px 3px rgba(36, 27, 82, 0.09), 0 6px 16px rgba(36, 27, 82, 0.1);
  --ombre-hover: 0 6px 14px rgba(36, 27, 82, 0.13), 0 14px 30px rgba(36, 27, 82, 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--fond);
  color: var(--gris-900);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 800; letter-spacing: -0.01em; }

a { color: inherit; }

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1.5rem;
  background: var(--bleu-nuit);
  color: white;
}

.nav-marque {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  color: white;
}

.nav-logo {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.nav-pilote {
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.14);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-left: 0.3rem;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

.nav-liens {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.85rem;
}

.nav-liens a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.15s;
}

.nav-liens a:hover { color: white; }

.nav-cta {
  background: white;
  color: var(--bleu-nuit) !important;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.15s;
}

.nav-cta:hover { transform: translateY(-1px); }

/* Bouton "Espace médecin" : même forme que "Espace modérateur", couleur distincte
   (sarcelle) pour bien les différencier d'un coup d'œil dans la nav. */
.nav-cta-medecin {
  background: var(--teal) !important;
  color: white !important;
}

.nav-cta-medecin:hover { background: var(--teal-vif) !important; }

/* ---------- Hero ---------- */

.hero {
  background:
    radial-gradient(1100px 480px at 85% -15%, rgba(6, 182, 212, 0.35), transparent),
    radial-gradient(900px 420px at 5% 10%, rgba(255, 107, 87, 0.18), transparent),
    linear-gradient(160deg, var(--bleu-nuit) 0%, var(--bleu-nuit-2) 55%, var(--bleu) 130%);
  color: white;
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
}

.hero-inner { max-width: 780px; margin: 0 auto; }

.hero-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.2;
  margin: 0 0 0.9rem;
}

.hero h1 span { color: #7fe3f0; }

.hero p.lead {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 620px;
  margin: 0 auto 1.75rem;
  line-height: 1.55;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--corail);
  color: white;
  border: none;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 107, 87, 0.4);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.hero-cta:hover { transform: translateY(-1px); background: var(--corail-vif); box-shadow: 0 10px 24px rgba(255, 107, 87, 0.5); }

.stats {
  margin: 2.5rem auto 0;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.stat-carte {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 1rem 0.6rem;
}

.stat-chiffre {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
}

.stat-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.2rem;
  line-height: 1.3;
}

.hero-teasers {
  margin-top: 1.75rem;
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.teaser {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  transition: all 0.15s;
}

.teaser:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.teaser-icone { font-size: 0.9rem; }

/* ---------- Contenu "Comment ça marche" / "Qui sommes-nous" (dans les popups) ---------- */

.section-titre {
  text-align: center;
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
}

.section-sous-titre {
  text-align: center;
  color: var(--gris-500);
  max-width: 560px;
  margin: 0 auto 2.2rem;
  font-size: 0.95rem;
}

.etapes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.etape {
  background: var(--blanc);
  border: 1px solid var(--gris-300);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem;
  box-shadow: var(--ombre);
}

.etape-numero {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--bleu-clair);
  color: var(--bleu);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.8rem;
}

.etape h3 { font-size: 1rem; margin: 0 0 0.4rem; }
.etape p { font-size: 0.87rem; color: var(--gris-500); margin: 0; line-height: 1.5; }

.badge-periode-test {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--orange);
  background: var(--orange-clair);
  border: 1px solid #f3dba8;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.modal-texte p a {
  color: var(--bleu);
  font-weight: 600;
  text-decoration: underline;
}

.garantie {
  margin-top: 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  background: var(--bleu-clair);
  border: 1px solid #cfe3f7;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  font-size: 0.85rem;
  color: var(--bleu-nuit-2);
}

.garantie svg { flex-shrink: 0; margin-top: 0.15rem; }

.apropos-signature {
  text-align: center;
  color: var(--bleu);
  font-weight: 700;
  margin: -0.4rem 0 1.4rem;
}

.apropos-lien-wrap {
  text-align: center;
  margin: 0 0 1.4rem;
}

.btn-assistdom {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bleu);
  color: white !important;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  transition: transform 0.15s, background 0.15s;
}

.btn-assistdom:hover {
  background: var(--bleu-vif);
  transform: translateY(-1px);
}

/* ---------- Outil (recherche) ---------- */

#outil {
  background:
    radial-gradient(900px 420px at 6% 0%, rgba(79, 70, 229, 0.07), transparent),
    radial-gradient(800px 400px at 100% 100%, rgba(13, 148, 136, 0.07), transparent),
    var(--fond);
  border-top: 1px solid var(--gris-300);
  border-bottom: 1px solid var(--gris-300);
}

.outil-entete {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 0;
}

.outil-titre-ligne {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.outil-icone {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--bleu), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.outil-entete h2 { margin: 0 0 0.3rem; font-size: 1.3rem; }
.outil-entete p { margin: 0; color: var(--gris-500); font-size: 0.87rem; }

.disclaimer {
  max-width: 1200px;
  margin: 1rem auto 0;
  background: #fff8e8;
  border: 1px solid #f3e2ab;
  border-radius: var(--radius-s);
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  color: #6b5a10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Portée à #outil main (pas juste "main") : moderation.html a aussi une balise
   <main> pour son propre contenu, qui ne doit pas hériter de cette mise en page. */
#outil main {
  position: relative;
  display: flex;
  max-width: 1200px;
  height: 640px;
  margin: 1.25rem auto 2.5rem;
  border: 1px solid var(--gris-300);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--ombre);
}

#outil main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--bleu), var(--cyan), var(--teal));
  z-index: 600;
}

#panel {
  width: 420px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--gris-300);
  background: var(--blanc);
}

/* ---------- Barre de recherche (au-dessus de la liste + carte) ---------- */

#recherche-barre {
  position: relative;
  max-width: 1200px;
  margin: 1.25rem auto 0;
  padding: 1.15rem 1.25rem 1rem;
  background: var(--blanc);
  border: 1px solid var(--gris-300);
  border-radius: var(--radius);
  box-shadow: var(--ombre);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow: hidden;
}

#recherche-barre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--bleu), var(--cyan), var(--teal));
}

.ligne-recherche-principale .champ-recherche { min-width: 200px; }

#rayon {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--gris-300);
  border-radius: var(--radius-s);
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--gris-100);
  color: var(--gris-700);
  cursor: pointer;
}

#rayon:focus { outline: none; border-color: var(--bleu-vif); }

.champ-recherche {
  position: relative;
  flex: 1;
}

.champ-recherche svg {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gris-500);
  pointer-events: none;
}

.champ-recherche input {
  width: 100%;
  padding: 0.55rem 0.6rem 0.55rem 2.1rem;
  border: 1px solid var(--gris-300);
  border-radius: var(--radius-s);
  font-size: 0.87rem;
  font-family: inherit;
  background: var(--gris-100);
}

.champ-recherche input:focus {
  outline: none;
  border-color: var(--bleu-vif);
  background: white;
}

.champ-ancre-autocomplete { position: relative; display: inline-block; }

.autocomplete-ville-liste {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: white;
  border: 1px solid var(--gris-300);
  border-radius: var(--radius-s);
  box-shadow: var(--ombre-hover);
  max-height: 260px;
  overflow-y: auto;
}

.autocomplete-ville-liste[hidden] { display: none; }

.autocomplete-ville-liste li {
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-s);
  font-size: 0.85rem;
  color: var(--gris-700);
  cursor: pointer;
}

.autocomplete-ville-liste li:hover,
.autocomplete-ville-liste li.actif {
  background: var(--bleu-clair);
  color: var(--bleu-vif);
}

.ligne-recherche { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.filtres-statut {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.lien-filtres-avances {
  background: none;
  border: none;
  color: var(--bleu);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.3rem 0;
  font-family: inherit;
  align-self: flex-start;
}

#filtres-avances {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.3rem;
}

#filtres-avances[hidden] { display: none; }

#filtres-avances input[type="text"],
#filtres-avances select {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--gris-300);
  border-radius: var(--radius-s);
  font-size: 0.82rem;
  font-family: inherit;
  background: var(--gris-100);
}

.filtre-checkbox {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--gris-700);
}

.filtres-avances-note {
  margin: 0;
  font-size: 0.7rem;
  color: var(--gris-500);
  line-height: 1.4;
}

.pill-filtre {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--gris-300);
  background: var(--blanc);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gris-700);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.pill-filtre .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gris-500);
}

.pill-filtre.dot-accepte .dot { background: var(--vert); }
.pill-filtre.dot-sous-condition .dot { background: var(--orange); }
.pill-filtre.dot-complet .dot { background: var(--rouge); }

.pill-filtre.active {
  border-color: var(--bleu-vif);
  background: var(--bleu-clair);
  color: var(--bleu-nuit-2);
}

#count {
  padding: 0.6rem 0.9rem 0.2rem;
  font-size: 0.76rem;
  color: var(--gris-500);
  font-weight: 600;
}

#alerte-zone {
  max-width: 1200px;
  margin: 0.9rem auto 0;
  padding: 0.9rem 1.25rem;
  background: var(--bleu-clair);
  border: 1px solid #cfe3f7;
  border-radius: var(--radius);
}

#alerte-zone[hidden] { display: none; }

.alerte-texte {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  color: var(--bleu-nuit-2);
  line-height: 1.4;
}

#form-alerte {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#form-alerte input,
#form-alerte select {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--gris-300);
  border-radius: var(--radius-s);
  font-family: inherit;
  font-size: 0.82rem;
  background: white;
}

.alerte-criteres {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.alerte-criteres > input, .alerte-criteres > .champ-ancre-autocomplete { flex: 1; min-width: 160px; }
.alerte-criteres > select { flex-shrink: 0; }
.champ-ancre-autocomplete input { width: 100%; }

.alerte-pmr {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--bleu-nuit-2);
  white-space: nowrap;
}

.alerte-pmr input[type="checkbox"] { flex: none; width: auto; min-width: 0; }

.alerte-envoi {
  display: flex;
  gap: 0.4rem;
  max-width: 420px;
}

.alerte-envoi input { flex: 1; min-width: 0; }

#form-alerte button {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-s);
  border: 1px solid var(--bleu);
  background: var(--bleu);
  color: white;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

#form-alerte button:hover { background: var(--bleu-vif); }

#alerte-zone .succes, #alerte-zone .erreur {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
}

#liste {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0.75rem 0.9rem;
  overflow-y: auto;
  flex: 1;
}

.carte-medecin {
  border: 1px solid var(--gris-300);
  border-left: 4px solid var(--gris-300);
  border-radius: var(--radius-s);
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.6rem;
  background: var(--blanc);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
}

.carte-medecin:hover {
  box-shadow: var(--ombre-hover);
  border-color: var(--gris-300);
  transform: translateX(2px);
}

.carte-medecin.accepte { border-left-color: var(--vert); }
.carte-medecin.sous_condition { border-left-color: var(--orange); }
.carte-medecin.complet { border-left-color: var(--rouge); }
.carte-medecin.inconnu { border-left-color: #8b7fc7; }

.carte-medecin .entete {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.carte-medecin .nom {
  font-weight: 700;
  font-size: 0.9rem;
}

.statut-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.statut-badge.accepte { background: var(--vert-clair); color: #0d6b34; }
.statut-badge.sous_condition { background: var(--orange-clair); color: #92650a; }
.statut-badge.complet { background: var(--rouge-clair); color: #a11d1d; }
.statut-badge.inconnu { background: var(--gris-100); color: var(--gris-500); }

.condition {
  font-size: 0.78rem;
  color: #92650a;
  background: var(--orange-clair);
  border-radius: var(--radius-s);
  padding: 0.3rem 0.5rem;
  margin-top: 0.35rem;
}

.infos-pratiques {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.infos-pratiques span {
  font-size: 0.72rem;
  color: var(--teal-vif);
  background: var(--teal-clair);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
}

.adresse, .telephone {
  font-size: 0.81rem;
  color: var(--gris-700);
  margin-top: 0.25rem;
}

.maj {
  font-size: 0.71rem;
  color: var(--gris-500);
  margin-top: 0.3rem;
}

.actions {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.4rem;
}

.actions button {
  flex: 1;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.4rem 0.4rem;
  border-radius: var(--radius-s);
  border: 1px solid var(--gris-300);
  background: var(--gris-100);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.actions .btn-revendiquer:hover { background: var(--bleu-clair); border-color: var(--bleu-vif); color: var(--bleu-nuit-2); }

.form-revendication {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-revendication[hidden] {
  display: none;
}

.form-revendication input {
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--gris-300);
  border-radius: var(--radius-s);
  font-size: 0.8rem;
  font-family: inherit;
}

.form-revendication button {
  padding: 0.4rem;
  border-radius: var(--radius-s);
  border: 1px solid var(--bleu);
  background: var(--bleu);
  color: white;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
}

.rev-info {
  margin: 0;
  font-size: 0.7rem;
  color: var(--gris-500);
}

.rev-statut {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--bleu);
  font-weight: 600;
}

#carte {
  flex: 1;
  position: relative;
}

.legende-carte {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 500;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--gris-300);
  border-radius: var(--radius-s);
  padding: 0.5rem 0.7rem;
  font-size: 0.72rem;
  color: var(--gris-700);
  box-shadow: var(--ombre);
  display: flex;
  gap: 0.8rem;
}

.legende-carte span { display: inline-flex; align-items: center; gap: 0.3rem; }
.legende-carte .dot { width: 9px; height: 9px; border-radius: 999px; }
.legende-carte .dot.accepte { background: var(--vert); }
.legende-carte .dot.sous_condition { background: var(--orange); }
.legende-carte .dot.complet { background: var(--rouge); }
.legende-carte .dot.inconnu { background: #8b7fc7; }

/* ---------- Visite guidée ---------- */

.btn-visite {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bleu-clair);
  color: var(--bleu-nuit-2);
  border: 1px solid #cfe3f7;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.btn-visite:hover { background: #dfe8fd; }

.btn-visite-flottant {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  box-shadow: 0 6px 20px rgba(20, 10, 40, 0.28);
  padding: 0.7rem 1.1rem;
  font-size: 0.85rem;
}

.btn-visite[hidden] { display: none; }

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
}

.tour-spot {
  position: fixed;
  border-radius: 12px;
  border: 2px solid var(--corail);
  box-shadow: 0 0 0 9999px rgba(20, 10, 40, 0.68);
  transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
  pointer-events: none;
  animation: tour-pulse 1.6s infinite;
}

@keyframes tour-pulse {
  0%, 100% { border-color: var(--corail); }
  50% { border-color: #ffb3a6; }
}

.tour-carte {
  position: fixed;
  background: white;
  border-radius: var(--radius-l);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  padding: 1.25rem 1.4rem;
  pointer-events: auto;
  transition: top 0.25s ease, left 0.25s ease;
}

.tour-etape {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--corail-vif);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}

.tour-carte h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.tour-carte p { margin: 0; font-size: 0.87rem; color: var(--gris-700); line-height: 1.5; }

.tour-actions {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tour-passer {
  background: none;
  border: none;
  color: var(--gris-500);
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  padding: 0;
}

.tour-nav { display: flex; gap: 0.5rem; }

.tour-nav button {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-s);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid var(--gris-300);
  background: var(--gris-100);
  color: var(--gris-700);
}

.tour-nav .tour-next {
  border-color: var(--bleu);
  background: var(--bleu);
  color: white;
}

/* ---------- Popups ---------- */

body.modal-ouvert { overflow: hidden; }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000; /* > 1000 : au-dessus des contrôles/panes Leaflet, qui montaient sinon par-dessus */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: rgba(25, 21, 49, 0.6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-carte {
  background: var(--blanc);
  border-radius: var(--radius-l);
  box-shadow: 0 24px 60px rgba(20, 10, 50, 0.35);
  width: min(760px, 96vw);
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  padding: 2.4rem 2.2rem;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.22s ease;
}

.modal-overlay.open .modal-carte {
  transform: translateY(0) scale(1);
}

.modal-fermer {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--gris-300);
  background: var(--gris-100);
  color: var(--gris-700);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  transition: background 0.15s;
}

.modal-fermer:hover { background: var(--gris-300); }

.modal-texte .modal-cta {
  display: flex;
  width: 100%;
  justify-content: center;
  margin-top: 1.75rem;
  border: none;
}

/* ---------- Footer ---------- */

footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  color: var(--gris-500);
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: center;
}

footer .copyright {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: var(--gris-500);
  opacity: 0.85;
}

footer a { color: var(--bleu); text-decoration: none; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .etapes { grid-template-columns: 1fr; }
  .nav-liens a:not(.nav-cta) { display: none; }

  .modal-carte { padding: 1.75rem 1.25rem; }
  .outil-entete { padding-left: 1rem; padding-right: 1rem; }
  #recherche-barre, #alerte-zone { margin-left: 1rem; margin-right: 1rem; }

  #outil main {
    flex-direction: column;
    height: auto;
    margin: 1rem;
  }

  #panel { width: 100%; flex: none; border-right: none; border-bottom: 1px solid var(--gris-300); }
  #liste { max-height: 40vh; }
  #carte { flex: 0 0 260px; height: 260px; }
}
