/* AubePharos · feuille de style
   Direction : minimal éditorial · blanc · typo soignée · accents sobres.
   Inspiration : Linear, Stripe, Notion. Hiérarchie par typographie et espace.
   Accessibilité WCAG AA · texte agrandissable, focus visible, cibles 44px.
*/

:root {
  --bg: #FFFFFF;
  --bg-alt: #FAF8F4;            /* crème très chaude */
  --bg-soft: #F4F0E8;
  --bg-warm: #F8F3E8;
  --ink: #1A1817;                /* noir chaud (pas pur) */
  --ink-2: #3D3935;
  --ink-3: #6B6353;
  --ink-4: #9C9489;
  --rule: #E8E0D0;
  --rule-2: #F0EAD8;

  /* Palette colorée signature */
  --phare: #C56B17;              /* ambre cuivré · lumière de phare */
  --phare-2: #A1530E;
  --phare-3: #7C3F08;
  --phare-soft: #FBE8C8;
  --phare-mist: #FDF4E3;

  --nuit: #1F3A4D;               /* bleu nuit · profondeur, sections sombres */
  --nuit-2: #2C4C61;
  --nuit-soft: #DCE7EE;

  --signal: #B33D3D;             /* bordeaux · urgences */
  --signal-soft: #F8DCD6;
  --success: #2F6A3F;            /* vert mousse · places dispo */
  --success-soft: #DDEBDD;

  /* Alias rétro-compat : anciens noms employés dans les templates */
  --amber: var(--phare);
  --amber-2: var(--phare-2);
  --amber-soft: var(--phare-soft);
  --navy: var(--nuit);
  --navy-soft: var(--nuit-soft);
  --burgundy: var(--signal);
  --burgundy-soft: var(--signal-soft);

  --fs-base: 16px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.04);
  --shadow: 0 1px 3px rgba(10, 10, 10, 0.06), 0 1px 2px rgba(10, 10, 10, 0.04);
  --shadow-md: 0 4px 12px rgba(10, 10, 10, 0.06), 0 2px 4px rgba(10, 10, 10, 0.04);

  --serif: "Fraunces", "Crimson Pro", "EB Garamond", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { font-size: var(--fs-base); -webkit-text-size-adjust: 100%; }
html, body { background: var(--bg); color: var(--ink); }
body {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--phare-mist) 0%, transparent 50%),
    var(--bg);
  background-attachment: fixed;
}
body {
  font-family: var(--sans);
  margin: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv01";
}

a { color: var(--ink); transition: color 0.15s; }
a:hover { color: var(--ink-3); }

/* Skip link accessibilité */
.skip-link {
  position: absolute;
  left: -10000px;
}
.skip-link:focus {
  position: fixed;
  left: 12px;
  top: 12px;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: var(--radius);
  z-index: 9999;
  text-decoration: none;
}

/* ---------- En-tête ---------- */
.bandeau {
  background: rgba(255, 253, 250, 0.92);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
}
.bandeau::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--phare-soft) 30%, var(--phare-soft) 70%, transparent);
  opacity: 0.6;
  pointer-events: none;
}
.bandeau .conteneur {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 28px;
}
.marque {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.marque .feu {
  width: 28px; height: 28px;
  background: var(--ink);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 var(--phare-soft);
}
.marque .feu::after {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--phare);
  border-radius: 50%;
  box-shadow: 0 0 12px 0 var(--phare);
}
.marque .kicker {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--phare-2);
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}
.marque .nom {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  display: block;
}
.marque .surnom {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-top: 3px;
  font-weight: 400;
}
.nav-principal {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}
.nav-principal a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 450;
  transition: background 0.15s, color 0.15s;
}
.nav-principal a:hover, .nav-principal a:focus-visible {
  background: var(--bg-soft);
  color: var(--ink);
  outline: none;
}
.nav-principal a.actif {
  background: var(--bg-soft);
  color: var(--ink);
  font-weight: 500;
}
.nav-principal a.urgence {
  color: var(--signal);
  font-weight: 500;
}
.nav-principal a.urgence:hover {
  background: var(--signal-soft);
  color: var(--signal);
}
.nav-principal a.cta {
  background: linear-gradient(180deg, var(--phare) 0%, var(--phare-2) 100%);
  color: #FFFFFF;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid var(--phare-2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 2px 6px rgba(165, 86, 14, 0.2);
}
.nav-principal a.cta:hover {
  background: linear-gradient(180deg, var(--phare-2) 0%, var(--phare-3) 100%);
  color: #FFFFFF;
  border-color: var(--phare-3);
}

.conteneur { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
main { padding: 32px 0 80px; }

/* ---------- Bandeau urgence (en footer plutôt qu'en top) ---------- */
.bandeau-urgence {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding: 11px 28px;
  font-size: 0.82rem;
  text-align: center;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  position: relative;
}
.bandeau-urgence::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--phare), transparent);
  opacity: 0.7;
}
.bandeau-urgence strong {
  color: var(--phare);
  font-weight: 600;
  margin: 0 6px;
}
.bandeau-urgence a { color: var(--phare); text-decoration: none; font-weight: 500; }
.bandeau-urgence a:hover { color: #FFFFFF; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse 70% 90% at 100% -10%, var(--phare-soft) 0%, transparent 55%),
    radial-gradient(ellipse 50% 80% at 0% 110%, var(--nuit-soft) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-warm) 100%);
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: 28%;
  right: -8%;
  width: 700px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--phare), transparent);
  opacity: 0.5;
  transform: rotate(-12deg);
  pointer-events: none;
  box-shadow: 0 0 28px var(--phare-soft);
}
.hero::after {
  content: "";
  position: absolute;
  top: 12%;
  right: 4%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--phare) 0%, var(--phare-soft) 30%, transparent 60%);
  opacity: 0.35;
  filter: blur(8px);
  pointer-events: none;
  animation: pharos-pulse 4s ease-in-out infinite;
}
@keyframes pharos-pulse {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.1); }
}
.hero .conteneur {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
  padding: 64px 28px 80px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  line-height: 1.04;
  margin: 0 0 20px;
  font-weight: 450;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.hero h1 em {
  color: var(--phare-2);
  font-style: italic;
  font-weight: 350;
  position: relative;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--phare);
  opacity: 0.4;
}
.hero p.intro {
  font-size: 1.08rem;
  color: var(--ink-3);
  max-width: 52ch;
  margin: 0 0 28px;
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.kpis {
  background:
    linear-gradient(135deg, var(--nuit) 0%, var(--ink) 100%);
  border: 1px solid var(--nuit);
  padding: 36px;
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 40px -20px rgba(31, 58, 77, 0.35);
}
.kpis::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--phare) 0%, transparent 60%);
  opacity: 0.15;
  pointer-events: none;
}
.kpi { padding: 0; }
.kpi { position: relative; z-index: 1; }
.kpi .val {
  font-family: var(--serif);
  font-size: 2.8rem;
  line-height: 1;
  color: var(--phare);
  font-weight: 500;
  letter-spacing: -0.02em;
  display: block;
}
.kpi .lab {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 10px;
  display: block;
  font-weight: 500;
}
.kpi small {
  display: block;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  margin-top: 6px;
  font-family: var(--mono);
}

/* ---------- Sélecteur de ville ---------- */
.selecteur-ville label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}
.selecteur-ville select,
#ville-select {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 10px 36px 10px 14px;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 450;
  min-width: 260px;
  cursor: pointer;
  color: var(--ink);
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5l3 3 3-3' fill='none' stroke='%236B6B6B' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.15s;
}
#ville-select:hover, .selecteur-ville select:hover { border-color: var(--ink-3); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  min-height: 44px;
  line-height: 1.2;
  transition: all 0.15s;
  letter-spacing: -0.005em;
}
.btn-primaire {
  background: linear-gradient(180deg, var(--phare) 0%, var(--phare-2) 100%);
  color: #FFFFFF;
  border-color: var(--phare-2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 2px 6px rgba(165, 86, 14, 0.25);
}
.btn-primaire:hover, .btn-primaire:focus-visible {
  background: linear-gradient(180deg, var(--phare-2) 0%, var(--phare-3) 100%);
  border-color: var(--phare-3);
  color: #FFFFFF;
  outline: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset, 0 4px 12px rgba(165, 86, 14, 0.35);
}
.btn-secondaire {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--rule);
}
.btn-secondaire:hover, .btn-secondaire:focus-visible {
  background: var(--bg-soft);
  border-color: var(--ink-3);
  color: var(--ink);
  outline: none;
}
.btn-fantome {
  background: transparent;
  color: var(--ink-2);
  border-color: transparent;
}
.btn-fantome:hover { background: var(--bg-soft); color: var(--ink); }
.btn-urgence {
  background: var(--signal);
  color: var(--bg);
  border-color: var(--signal);
}
.btn-urgence:hover { background: #963333; border-color: #963333; }
.btn-mini { padding: 6px 12px; min-height: 32px; font-size: 0.82rem; }

/* ---------- Sections ---------- */
section { padding: 64px 0; position: relative; }
section + section { border-top: 1px solid var(--rule); }
section h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  margin: 0 0 8px;
  font-weight: 450;
  letter-spacing: -0.02em;
  color: var(--ink);
  position: relative;
  display: inline-block;
}
section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 36px;
  height: 2px;
  background: var(--phare);
  border-radius: 2px;
}
section .accroche {
  color: var(--ink-3);
  font-size: 1rem;
  margin: 0 0 32px;
  max-width: 60ch;
  line-height: 1.6;
}

/* ---------- Filtres pilule ---------- */
.filtres { gap: 6px !important; margin-bottom: 24px !important; }
.btn-filtre {
  background: var(--bg);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  border-radius: 100px;
  padding: 7px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 450;
  transition: all 0.15s;
}
.btn-filtre:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-filtre.actif {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ---------- Cartes refuges ---------- */
.grille-centres {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.carte-centre {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.carte-centre::before {
  content: "";
  position: absolute;
  top: 0; left: 26px; right: 26px;
  height: 2px;
  background: var(--phare);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.2s;
}
.carte-centre:hover {
  border-color: var(--ink-3);
  box-shadow: var(--shadow-md);
}
.carte-centre:hover::before { opacity: 0.6; }
.carte-centre .titre {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.carte-centre .titre a { color: inherit; text-decoration: none; }
.carte-centre .organisme {
  font-size: 0.72rem;
  color: var(--ink-4);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
}
.carte-centre .adresse {
  color: var(--ink-3);
  font-size: 0.92rem;
}

.places {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 2px 0;
}
.places .chiffre {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 450;
  line-height: 1;
  color: var(--phare-2);
  letter-spacing: -0.03em;
}
.places .chiffre.zero { color: var(--signal); }
.places .sur {
  color: var(--ink-3);
  font-family: var(--serif);
  font-size: 1.1rem;
}
.places .lab {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
  font-weight: 500;
  line-height: 1.3;
}

.statut {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 500;
  background: var(--bg-soft);
  color: var(--ink-3);
  border: 1px solid var(--rule);
  white-space: nowrap;
}
.statut.ouvert { background: var(--success-soft); color: var(--success); border-color: transparent; }
.statut.complet { background: var(--signal-soft); color: var(--signal); border-color: transparent; }
.statut.ferme_temp { background: var(--bg-soft); color: var(--ink-3); }
.statut::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tag {
  background: var(--bg-soft);
  color: var(--ink-2);
  font-size: 0.74rem;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: var(--sans);
  font-weight: 450;
  letter-spacing: -0.005em;
}
.tag.populace {
  background: var(--nuit);
  color: #FFFFFF;
}
.tag.langue {
  background: var(--phare-mist);
  border: 1px solid var(--phare-soft);
  color: var(--phare-2);
}

.maj {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--rule-2);
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.maj a { color: var(--ink); text-decoration: none; font-weight: 500; }
.maj a:hover { color: var(--phare-2); }
.maj a[href^="tel:"] { color: var(--phare-2); }

/* ---------- Carte map ---------- */
.carte-pleine {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 0;
  height: calc(100vh - 220px);
  min-height: 540px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
}
.carte-panneau {
  border-right: 1px solid var(--rule);
  overflow-y: auto;
  background: var(--bg);
}
.carte-panneau h3 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
  padding: 18px 22px 14px;
  background: var(--bg);
  position: sticky; top: 0;
  border-bottom: 1px solid var(--rule);
  letter-spacing: -0.01em;
}
.liste-centres { list-style: none; padding: 0; margin: 0; }
.liste-centres li {
  padding: 14px 22px;
  border-bottom: 1px solid var(--rule-2);
  cursor: pointer;
  transition: background 0.1s;
}
.liste-centres li:hover, .liste-centres li.actif { background: var(--bg-soft); }
.liste-centres .ligne {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.liste-centres .nom { font-weight: 500; font-size: 0.92rem; color: var(--ink); }
.liste-centres .dispo {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--ink);
  white-space: nowrap;
}
.liste-centres .dispo.zero { color: var(--signal); }
.liste-centres .sub { font-size: 0.78rem; color: var(--ink-3); margin-top: 2px; }
#carte-map { width: 100%; height: 100%; }

/* ---------- Recherche refuge (panneau carte) ---------- */
.carte-recherche {
  position: sticky; top: 0; z-index: 2;
  padding: 14px 18px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.champ-recherche {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--bg-alt);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.champ-recherche:focus-within {
  border-color: var(--phare);
  box-shadow: 0 0 0 3px var(--phare-soft);
}
.champ-recherche .loupe { color: var(--ink-4); font-size: 1.1rem; line-height: 1; }
.champ-recherche input {
  flex: 1; border: 0; background: transparent; outline: none;
  font-family: var(--sans); font-size: 0.92rem; color: var(--ink);
  padding: 9px 0;
}
.champ-recherche input::placeholder { color: var(--ink-4); }
.carte-filtres { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip-filtre {
  font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.02em;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-3);
  cursor: pointer;
  transition: all 0.12s;
}
.chip-filtre:hover { border-color: var(--phare); color: var(--phare-2); }
.chip-filtre.actif {
  background: var(--phare); border-color: var(--phare);
  color: #fff; font-weight: 600;
}
.carte-resultats {
  margin-top: 10px;
  font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-4);
}
.liste-vide {
  padding: 22px; margin: 0;
  font-size: 0.88rem; color: var(--ink-3); text-align: center;
}
.lien-reset {
  border: 0; background: none; padding: 0;
  color: var(--phare-2); font-weight: 600; cursor: pointer;
  text-decoration: underline; font-size: inherit; font-family: inherit;
}

/* ---------- Bloc « trouver de l'aide » ---------- */
.bloc-aide {
  margin: 14px 0 4px;
  border: 1px solid var(--nuit);
  border-radius: var(--radius-lg);
  background: var(--nuit-soft);
  overflow: hidden;
}
.bloc-aide-tete {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px;
  padding: 12px 18px;
  background: var(--nuit); color: #fff;
}
.bloc-aide-tete strong { font-family: var(--serif); font-size: 1.05rem; }
.bloc-aide-tete span { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.03em; opacity: 0.85; }
.bloc-aide-lignes {
  list-style: none; margin: 0; padding: 6px 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.bloc-aide-lignes li {
  padding: 10px 18px;
  display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: baseline;
}
.bloc-aide-lignes li a {
  grid-row: span 2;
  font-family: var(--mono); font-weight: 600; font-size: 1.15rem;
  color: var(--nuit); text-decoration: none;
  border: 1px solid var(--nuit); border-radius: var(--radius);
  padding: 6px 10px; white-space: nowrap;
}
.bloc-aide-lignes li a:hover { background: var(--nuit); color: #fff; }
.bloc-aide-lignes li .nom { font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.bloc-aide-lignes li .desc { font-size: 0.78rem; color: var(--ink-3); }
.note-pays {
  margin: 10px 0 0; font-size: 0.85rem; color: var(--ink-3);
  border-left: 3px solid var(--phare); padding-left: 12px;
}

/* ---------- Comptes citoyens ---------- */
.bandeau-compte {
  margin-bottom: 24px; padding: 12px 16px;
  background: var(--bg-soft); border: 1px solid var(--rule);
  border-radius: var(--radius); font-size: 0.9rem; color: var(--ink-2);
}
.bandeau-compte.connecte {
  background: var(--success-soft); border-color: var(--success);
}
.bandeau-compte a { color: var(--phare-2); font-weight: 600; }
.liste-signalements { list-style: none; padding: 0; margin: 24px 0 0; }
.liste-signalements li {
  padding: 16px 0; border-bottom: 1px solid var(--rule-2);
}
.liste-signalements .entete {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px;
}
.liste-signalements .date {
  margin-left: auto; font-family: var(--mono); font-size: 0.78rem; color: var(--ink-4);
}
.liste-signalements .corps { font-size: 0.95rem; color: var(--ink-2); }
.liste-signalements .notes {
  margin: 6px 0 0; font-size: 0.85rem; color: var(--ink-3);
  border-left: 3px solid var(--rule); padding-left: 10px;
}
.badge {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
  border: 1px solid currentColor;
}
.badge.resolu { color: var(--success); background: var(--success-soft); }
.badge.ouvert { color: var(--phare-2); background: var(--phare-soft); }
.badge.urgence-normal { color: var(--ink-3); }
.badge.urgence-eleve { color: var(--phare-2); }
.badge.urgence-critique { color: var(--signal); background: var(--signal-soft); }

/* ---------- Formulaires ---------- */
.formulaire {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 720px;
}
.formulaire .champ { margin-bottom: 22px; }
.formulaire label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.92rem;
  color: var(--ink);
}
.formulaire label .obligatoire { color: var(--signal); }
.formulaire .indice {
  font-size: 0.82rem;
  color: var(--ink-3);
  margin: 4px 0 8px;
}
.formulaire input[type="text"],
.formulaire input[type="email"],
.formulaire input[type="password"],
.formulaire input[type="number"],
.formulaire input[type="tel"],
.formulaire input[type="url"],
.formulaire textarea,
.formulaire select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  min-height: 44px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.formulaire textarea { min-height: 110px; resize: vertical; }
.formulaire input:focus, .formulaire textarea:focus, .formulaire select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.06);
}
.formulaire .grille-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px;
}
.case {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--ink-2);
  transition: border-color 0.1s, background 0.1s;
}
.case input { width: 16px; height: 16px; accent-color: var(--ink); }
.case:hover { border-color: var(--ink-3); }
.case:has(input:checked) {
  border-color: var(--ink);
  background: var(--bg-soft);
}

#carte-signaler, #carte-inscription, #mini-carte {
  width: 100%;
  height: 380px;
  min-height: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  overflow: hidden;
  background: #eef0f2;
  margin-bottom: 12px;
}
@media (max-width: 640px) {
  #carte-signaler, #carte-inscription, #mini-carte { height: 320px; }
}

/* ---------- Bandeau météo (alerte froid) ---------- */
.bandeau-meteo {
  background: var(--bg-warm);
  color: var(--ink);
  padding: 10px 16px;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.88rem;
  border-bottom: 1px solid var(--rule);
}
.bandeau-meteo.alerte {
  background: var(--burgundy);
  color: #FFFFFF;
  border-bottom-color: #000;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ---------- Bandeau CTA organisme (ajouter mon refuge) ---------- */
.bandeau-cta-orga {
  margin-top: 48px;
  padding: 32px 36px;
  background: linear-gradient(135deg, var(--bg-warm) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--burgundy);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 24px;
  align-items: center;
}
.bandeau-cta-orga.compact {
  margin-top: 24px;
  padding: 18px 24px;
  grid-template-columns: 1fr auto;
}
.bandeau-cta-orga .cta-orga-text h3 {
  margin: 0 0 8px; font-family: var(--serif); font-size: 1.4rem; color: var(--ink);
}
.bandeau-cta-orga .cta-orga-text p { margin: 0; color: var(--ink-2); line-height: 1.55; }
.bandeau-cta-orga .cta-orga-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .bandeau-cta-orga { grid-template-columns: 1fr; padding: 24px; }
  .bandeau-cta-orga.compact { padding: 16px 18px; }
}

/* ---------- Flashs ---------- */
.flashs { margin: 20px 0; display: flex; flex-direction: column; gap: 8px; }
.flash {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-weight: 450;
  font-size: 0.92rem;
  border: 1px solid;
}
.flash.ok { background: var(--success-soft); color: var(--success); border-color: transparent; }
.flash.error { background: var(--signal-soft); color: var(--signal); border-color: transparent; }

/* ---------- Tableaux ---------- */
.tableau {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.tableau th, .tableau td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--rule-2);
  font-size: 0.9rem;
}
.tableau th {
  background: var(--bg-alt);
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--ink-4);
  font-weight: 500;
}
.tableau tr:last-child td { border-bottom: none; }
.tableau tr:hover { background: var(--bg-alt); }

/* ---------- Pied ---------- */
footer.pied {
  background: linear-gradient(180deg, var(--bg-warm) 0%, var(--bg-soft) 100%);
  color: var(--ink-3);
  padding: 56px 0 32px;
  margin-top: 96px;
  border-top: 1px solid var(--rule);
  position: relative;
}
footer.pied::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--phare), transparent);
  opacity: 0.5;
}
footer.pied .grille {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
footer.pied h4 {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin: 0 0 14px;
  font-weight: 500;
}
footer.pied a {
  color: var(--ink-2);
  text-decoration: none;
  display: block;
  padding: 4px 0;
  font-size: 0.92rem;
}
footer.pied a:hover { color: var(--ink); }
footer.pied p { font-size: 0.92rem; color: var(--ink-3); }
footer.pied .credit {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  font-size: 0.85rem;
  color: var(--ink-4);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
}

/* ---------- Accessibilité toolbar ---------- */
.toolbar-a11y {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 0.78rem;
  margin-left: 4px;
}
.toolbar-a11y button {
  background: transparent;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 6px 10px;
  font-family: var(--mono);
  min-width: 32px;
  font-size: 0.75rem;
  transition: all 0.15s;
}
.toolbar-a11y button:hover {
  background: var(--bg-soft);
  border-color: var(--ink-3);
  color: var(--ink);
}

body.contraste-eleve {
  --bg: #FFFFFF;
  --bg-alt: #FFFFFF;
  --bg-soft: #FFFFFF;
  --ink: #000000;
  --ink-2: #000000;
  --ink-3: #1a1a1a;
  --ink-4: #2a2a2a;
  --rule: #000000;
  --rule-2: #555555;
  --shadow: none;
  --shadow-sm: none;
  --shadow-md: none;
}

/* ---------- Mise en page paragraphes longs ---------- */
.contenu-prose {
  max-width: 68ch;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-2);
}
.contenu-prose h2 {
  font-family: var(--serif);
  font-size: 1.8rem;
  margin: 48px 0 12px;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.contenu-prose h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin: 32px 0 8px;
  font-weight: 500;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .bandeau .conteneur {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
  }
  .nav-principal { width: 100%; }
  .hero .conteneur { grid-template-columns: 1fr; gap: 40px; padding: 40px 20px 56px; }
  .conteneur { padding: 0 20px; }
  .carte-pleine { grid-template-columns: 1fr; height: auto; }
  .carte-panneau { max-height: 320px; }
  #carte-map { height: 460px; }
  footer.pied .grille { grid-template-columns: 1fr 1fr; gap: 32px; }
  .formulaire { padding: 24px 20px; }
  .formulaire .grille-2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; padding: 24px; gap: 20px; }
}

@media (max-width: 480px) {
  .kpis { grid-template-columns: 1fr 1fr; padding: 20px; }
  .kpi .val { font-size: 2rem; }
  footer.pied .grille { grid-template-columns: 1fr; }
  .grille-centres { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Focus visible global ---------- */
a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- Maplibre popup minimal ---------- */
.maplibregl-popup-content {
  padding: 16px 18px !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-md) !important;
  border: 1px solid var(--rule);
}
