/* ==========================================================================
   LeFrelon — design system public « Référence »
   Port de site.css des maquettes validées (doc : /mnt/project-files/site-public),
   chargé par le seul layout public (layouts/public.html.erb) : rien ici n'atteint
   le back-office, qui garde ses propres feuilles. Les ajouts propres à
   l'intégration Rails sont regroupés en fin de fichier.
   Déclinaison institutionnelle du système « Pilotage » (back-office) :
   mêmes neutres chauds, même encre, ambre réservé à la marque et au signalement.
   Ajouts propres au public : une serif de lecture (Source Serif 4) pour les
   titres et le corps des articles, une échelle de données ambre pour les cartes.
   Layout : grille éditoriale 12 colonnes, 1240 px ; colonne de lecture 68ch,
   sommaire collant à gauche, encadrés « fiche » en marge.
   ========================================================================== */


:root {
  /* Neutres — repris de Pilotage */
  --paper: #FFFFFF;
  --ground: #F5F5F3;
  --ground-2: #EDECE8;
  --rule: #E6E5E0;
  --rule-strong: #D3D1CA;
  --ink: #1C1B22;
  --ink-2: #5E5D66;
  --ink-3: #8D8C94;
  --ink-inverse: #FFFFFF;

  /* Marque et signalement — l'ambre n'est utilisé que pour ça */
  --brand: #C47A12;          /* filets, puces, liens survolés */
  --brand-ink: #8A5508;      /* ambre lisible en texte (AA sur blanc) */
  --brand-soft: #FBF1DF;
  --signal: #F2AE45;         /* bouton « Signaler », texte encre (AA) */
  --signal-hover: #E89D2C;

  /* Sémantique */
  --danger: #A6382A;  --danger-soft: #FBEBE8;
  --ok: #2C6E47;      --ok-soft: #E7F3EC;
  --info: #2F4F8F;    --info-soft: #EEF2FA;
  --warn-soft: #FCF3DF; --warn: #7D5308;

  /* Données — échelle séquentielle (cartes choroplèthes) */
  --d0: #E3DFD6; --d1: #F8E3BC; --d2: #F2C27A; --d3: #DF9534; --d4: #B66A10; --d5: #7A4407;
  --d-none: #FAFAF8;
  --series-a: #1C1B22; --series-b: #D3D1CA;

  /* Espèces — repères d'identification */
  --sp-velutina: #1C1B22;   /* corps sombre */
  --sp-crabro: #B0571B;     /* roux */
  --sp-vespula: #D9A400;    /* jaune */

  --focus: #C47A12;
  --ring: rgba(196,122,18,.32);
  --shadow-pop: 0 1px 0 rgba(28,27,34,.04), 0 12px 32px -12px rgba(28,27,34,.22);
  --grid-line: rgba(28,27,34,.06);
  --map-stroke: #FFFFFF;
  --map-context: #AEABA2; --map-context-next: #CC8A2A; /* points des pays voisins, des pays en préparation */

  /* Typographie */
  --f-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --f-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Échelle typographique (1.25, ancrée sur 16 px) */
  --t-xs: .75rem; --t-sm: .875rem; --t-base: 1rem; --t-md: 1.125rem; --t-lg: 1.25rem;
  --t-xl: 1.5625rem; --t-2xl: 1.953rem; --t-3xl: 2.441rem; --t-4xl: 3.052rem;

  --r-sm: 4px; --r: 6px; --r-lg: 10px;
  --wrap: 1240px;
  --measure: 68ch;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151517; --ground: #0F0F11; --ground-2: #1C1C20; --rule: #2A2A2F; --rule-strong: #3A3A40;
    --ink: #EDEDEF; --ink-2: #A9A9B1; --ink-3: #7A7A82; --ink-inverse: #111113;
    --brand: #EBA845; --brand-ink: #F0B865; --brand-soft: #2E2416; --signal: #F2AE45; --signal-hover: #F6BE65;
    --danger: #EE958A; --danger-soft: #35191A; --ok: #7DC59A; --ok-soft: #17291F; --info: #9FB8E8; --info-soft: #1B2436;
    --warn-soft: #30260F; --warn: #E8C27A;
    --d0: #232327; --d1: #3B2F1A; --d2: #6B4A17; --d3: #A86D18; --d4: #DE9A3A; --d5: #F6C77E; --d-none: #1A1A1D;
    --series-a: #EDEDEF; --series-b: #3A3A40;
    --sp-velutina: #EDEDEF; --sp-crabro: #E08A50; --sp-vespula: #E8C440;
    --focus: #EBA845; --ring: rgba(235,168,69,.35);
    --shadow-pop: 0 0 0 1px rgba(255,255,255,.06), 0 16px 40px -12px rgba(0,0,0,.6);
    --grid-line: rgba(255,255,255,.06); --map-stroke: rgba(255,255,255,.24);
    --map-context: #55555C; --map-context-next: #A8782E;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #151517; --ground: #0F0F11; --ground-2: #1C1C20; --rule: #2A2A2F; --rule-strong: #3A3A40;
  --ink: #EDEDEF; --ink-2: #A9A9B1; --ink-3: #7A7A82; --ink-inverse: #111113;
  --brand: #EBA845; --brand-ink: #F0B865; --brand-soft: #2E2416; --signal: #F2AE45; --signal-hover: #F6BE65;
  --danger: #EE958A; --danger-soft: #35191A; --ok: #7DC59A; --ok-soft: #17291F; --info: #9FB8E8; --info-soft: #1B2436;
  --warn-soft: #30260F; --warn: #E8C27A;
  --d0: #232327; --d1: #3B2F1A; --d2: #6B4A17; --d3: #A86D18; --d4: #DE9A3A; --d5: #F6C77E; --d-none: #1A1A1D;
  --series-a: #EDEDEF; --series-b: #3A3A40;
  --sp-velutina: #EDEDEF; --sp-crabro: #E08A50; --sp-vespula: #E8C440;
  --focus: #EBA845; --ring: rgba(235,168,69,.35);
  --shadow-pop: 0 0 0 1px rgba(255,255,255,.06), 0 16px 40px -12px rgba(0,0,0,.6);
  --grid-line: rgba(255,255,255,.06); --map-stroke: rgba(255,255,255,.24);
  --map-context: #55555C; --map-context-next: #A8782E;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-sans); font-size: var(--t-base); line-height: 1.55;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-color: var(--rule-strong); }
a:hover { text-decoration-color: var(--brand); color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--f-serif); font-weight: 600; line-height: 1.18; margin: 0; text-wrap: balance; letter-spacing: -.005em; font-optical-sizing: auto; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
.num, .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; border-radius: var(--r); }
.skip:focus { top: 8px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
@media (max-width: 640px) { .wrap { padding-inline: 16px; } }
.section { padding-block: 72px; }
.section--tight { padding-block: 48px; }
.section--ground { background: var(--ground); }
.section + .section:not(.section--ground) { border-top: 1px solid var(--rule); }
@media (max-width: 640px) { .section { padding-block: 48px; } }

/* Eyebrow : catégorie éditoriale réelle, jamais décorative */
.eyebrow { font: 600 var(--t-xs)/1 var(--f-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); display: inline-flex; gap: 8px; align-items: center; }
.eyebrow::before { content: ""; width: 14px; height: 2px; background: var(--brand); }

.h-display { font-size: clamp(2.1rem, 4.4vw, var(--t-4xl)); font-weight: 600; letter-spacing: -.015em; }
.h-1 { font-size: clamp(1.9rem, 3.6vw, var(--t-3xl)); letter-spacing: -.012em; }
.h-2 { font-size: clamp(1.5rem, 2.6vw, var(--t-2xl)); }
.h-3 { font-size: var(--t-xl); }
.h-4 { font-size: var(--t-lg); }
.lead { font-size: var(--t-md); color: var(--ink-2); line-height: 1.6; max-width: 60ch; }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-sm); }
.xs { font-size: var(--t-xs); }

.section-head { display: grid; gap: 12px; margin-bottom: 36px; max-width: 760px; }
.section-head--split { max-width: none; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px 32px; }
.section-head--split > :first-child { display: grid; gap: 12px; }
@media (max-width: 760px) { .section-head--split { grid-template-columns: 1fr; } }

/* ---------- Boutons ---------- */
.btn { --h: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--h); padding: 0 18px; border-radius: var(--r); border: 1px solid transparent; font: 600 var(--t-sm)/1 var(--f-sans); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
/* Un libellé long passe à la ligne plutôt que de déborder sur mobile */
@media (max-width: 560px) { .btn { white-space: normal; max-width: 100%; text-align: center; line-height: 1.25; padding-block: 8px; } }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--ink); color: var(--ink-inverse); }
.btn--primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--brand)); color: var(--ink-inverse); }
.btn--signal { background: var(--signal); color: #1C1B22; }
.btn--signal:hover { background: var(--signal-hover); color: #1C1B22; }
.btn--ghost { background: var(--paper); color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--link { padding: 0; min-height: 0; background: none; color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand); text-underline-offset: .25em; }
.btn--lg { --h: 52px; padding: 0 24px; font-size: var(--t-base); }
.btn--sm { --h: 34px; padding: 0 12px; font-size: var(--t-xs); }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Lien flèche (maillage interne) */
.arrow-link { display: inline-flex; gap: 6px; align-items: baseline; font-weight: 600; font-size: var(--t-sm); text-decoration: none; }
.arrow-link::after { content: "→"; color: var(--brand); transition: transform .15s; }
.arrow-link:hover::after { transform: translateX(3px); }

/* ---------- Bandeau institutionnel + en-tête ---------- */
.topbar { background: var(--ink); color: var(--ink-inverse); font-size: var(--t-xs); }
.topbar .wrap { display: flex; gap: 16px; justify-content: space-between; align-items: center; min-height: 34px; }
.topbar a { color: inherit; text-decoration: none; opacity: .86; }
.topbar a:hover { opacity: 1; color: inherit; }
.topbar nav { display: flex; gap: 20px; align-items: center; }
.topbar__search { display: inline-grid; place-items: center; }
.topbar__search svg { width: 16px; height: 16px; }
@media (max-width: 760px) { .topbar__claim { display: none; } .topbar .wrap { justify-content: flex-end; } }

.header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--rule); }
.header .wrap { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand__mark { width: 34px; height: 34px; }
.brand__name { font: 700 1.2rem/1 var(--f-serif); letter-spacing: -.01em; }
.brand__name span { color: var(--brand-ink); }
.brand__sub { display: block; font: 500 10.5px/1.2 var(--f-sans); color: var(--ink-2); letter-spacing: .02em; margin-top: 3px; }
.nav { display: flex; gap: 2px; align-items: center; flex: 1; }
.nav > li { list-style: none; position: relative; }
.nav__link { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px; border-radius: var(--r); font-size: var(--t-sm); font-weight: 500; text-decoration: none; color: var(--ink); background: none; border: 0; cursor: pointer; font-family: inherit; }
.nav__link:hover, .nav:not([data-mega-ready]) > li:focus-within > .nav__link { background: var(--ground); }
.nav__link[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
.nav__link .chev { width: 12px; height: 12px; opacity: .6; }
.mega { position: absolute; top: calc(100% + 6px); left: -12px; width: min(640px, 80vw); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .15s; }
.mega__title { grid-column: 1 / -1; font: 600 var(--t-xs)/1 var(--f-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 4px 8px 8px; }
.mega a { display: block; padding: 8px; border-radius: var(--r); text-decoration: none; }
.mega a:hover { background: var(--ground); }
.mega a strong { display: block; font-size: var(--t-sm); font-weight: 600; }
.mega a span { display: block; font-size: var(--t-xs); color: var(--ink-2); margin-top: 2px; }
.header__actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: var(--r); border: 1px solid transparent; background: none; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--ground); }
.icon-btn svg { width: 20px; height: 20px; }
.burger { display: none; }
.drawer > .btn--ghost { margin-top: 8px; }
.header__account { padding-inline: 14px; }
/* entre tablette et petit écran d'ordinateur, l'icône seule laisse la place au menu */
@media (max-width: 1240px) {
  .header__account { position: relative; padding-inline: 11px; }
  .header__account span { display: none; }
  .header__account::after { content: attr(aria-label); position: absolute; top: calc(100% + 6px); right: 0; padding: 6px 10px; border-radius: var(--r); background: var(--ink); color: var(--ink-inverse); font: 500 var(--t-xs)/1.3 var(--f-sans); white-space: nowrap; box-shadow: var(--shadow-pop); opacity: 0; visibility: hidden; pointer-events: none; z-index: 30; }
  .header__account:hover::after, .header__account:focus-visible::after { opacity: 1; visibility: visible; }
}
@media (max-width: 1080px) {
  .nav { display: none; }
  .burger { display: inline-grid; }
  .header .wrap { gap: 12px; }
}
@media (max-width: 520px) { .header__actions .btn--signal { display: none; } .brand__sub { display: none; } }

.drawer { position: fixed; inset: 0; z-index: 60; background: var(--paper); padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.drawer details { border-bottom: 1px solid var(--rule); }
.drawer summary { list-style: none; padding: 16px 0; font: 600 var(--t-md)/1.2 var(--f-serif); display: flex; justify-content: space-between; cursor: pointer; }
.drawer summary::-webkit-details-marker { display: none; }
.drawer summary::after { content: "+"; font-family: var(--f-sans); color: var(--ink-3); }
.drawer details[open] summary::after { content: "–"; }
.drawer details a { display: block; padding: 8px 0 8px 12px; text-decoration: none; color: var(--ink-2); border-left: 2px solid var(--rule); }
.drawer details div { display: grid; gap: 2px; padding-bottom: 16px; }

/* Barre de signalement mobile, toujours accessible */
.mobile-cta { display: none; }
@media (max-width: 520px) {
  .mobile-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--paper); border-top: 1px solid var(--rule); gap: 8px; }
  .mobile-cta .btn { flex: 1; }
  body { padding-bottom: 72px; }
}

/* ---------- Fil d'Ariane ---------- */
.crumbs { font-size: var(--t-xs); color: var(--ink-2); padding-block: 18px 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.crumbs li { display: inline-flex; gap: 6px; align-items: center; }
.crumbs li + li::before { content: "/"; color: var(--ink-3); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; }

/* ---------- Cartes de contenu ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.story { display: grid; gap: 12px; text-decoration: none; align-content: start; }
.story__img { aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--r); background: var(--ground-2); }
.story__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.story:hover .story__img img { transform: scale(1.03); }
.story__kicker { font: 600 var(--t-xs)/1 var(--f-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--brand-ink); }
.story__title { font: 600 var(--t-lg)/1.25 var(--f-serif); text-wrap: balance; }
.story:hover .story__title { text-decoration: underline; text-decoration-color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: 1px; }
.story__desc { font-size: var(--t-sm); color: var(--ink-2); }
.story__meta { font: 400 var(--t-xs)/1.4 var(--f-mono); color: var(--ink-3); }

.byline { display: flex; gap: 10px; align-items: center; font-size: var(--t-xs); color: var(--ink-2); }
.byline__logo { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 10px/1 var(--f-sans); color: var(--ink-inverse); background: var(--ink); flex: none; }
.byline strong { color: var(--ink); font-weight: 600; }
/* Logo réel : cartouche clair aux proportions du logo plutôt qu'une pastille ronde */
.byline__logo--img { width: auto; min-width: 40px; max-width: 96px; height: 40px; padding: 4px 6px; border-radius: var(--r); background: #fff; border: 1px solid var(--rule); }
.byline__logo--img img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }

/* Bloc « tuile » : un objet séparé, bordé, sans ombre */
.tile { border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 24px; background: var(--paper); display: grid; gap: 10px; align-content: start; }
.tile--link { text-decoration: none; transition: border-color .15s; }
.tile--link:hover { border-color: var(--ink); }

/* ---------- Encadrés éditoriaux ---------- */
.callout { border-left: 3px solid var(--brand); background: var(--brand-soft); padding: 18px 20px; border-radius: 0 var(--r) var(--r) 0; display: grid; gap: 8px; }
.callout--danger { border-color: var(--danger); background: var(--danger-soft); }
.callout--danger .callout__title { color: var(--danger); }
.callout--info { border-color: var(--info); background: var(--info-soft); }
.callout__title { font: 700 var(--t-sm)/1.3 var(--f-sans); display: flex; gap: 8px; align-items: center; }
.callout__title svg { width: 18px; height: 18px; flex: none; }
.callout ul { padding-left: 18px; display: grid; gap: 6px; }

.essentiel { border: 1px solid var(--rule-strong); border-radius: var(--r-lg); padding: 22px 24px; display: grid; gap: 12px; background: var(--paper); }
.essentiel h2 { font: 700 var(--t-xs)/1 var(--f-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.essentiel ul { list-style: none; display: grid; gap: 10px; }
.essentiel li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: var(--t-sm); line-height: 1.5; }
.essentiel li::before { content: ""; width: 8px; height: 8px; margin-top: 7px; background: var(--brand); transform: rotate(45deg); }

/* Tampon de fiabilité (E-E-A-T) */
.stamp { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 400 var(--t-xs)/1.5 var(--f-mono); color: var(--ink-2); padding-block: 12px; border-block: 1px solid var(--rule); }
.stamp b { font-weight: 500; color: var(--ink); }
.stamp .ok { color: var(--ok); }

/* ---------- Fiche spécimen (signature visuelle) ---------- */
.specimen { border: 1px solid var(--ink); border-radius: 2px; background: var(--paper); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.specimen__img { position: relative; border-right: 1px solid var(--ink); min-height: 260px; }
.specimen__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.specimen__body { padding: 20px 22px; display: grid; gap: 14px; align-content: start; }
.specimen__name { font: italic 600 var(--t-xl)/1.15 var(--f-serif); }
.specimen__auth { font: 400 var(--t-xs)/1.4 var(--f-mono); color: var(--ink-2); }
.specimen dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: var(--t-sm); border-top: 1px dashed var(--rule-strong); padding-top: 12px; }
.specimen dt { font: 500 var(--t-xs)/1.7 var(--f-mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.specimen dd { margin: 0; }
.ruler { display: grid; gap: 4px; }
.ruler svg { width: 100%; height: 34px; color: var(--ink); }
.ruler figcaption { font: 400 var(--t-xs)/1.3 var(--f-mono); color: var(--ink-2); }
@media (max-width: 760px) { .specimen { grid-template-columns: 1fr; } .specimen__img { border-right: 0; border-bottom: 1px solid var(--ink); aspect-ratio: 4 / 3; min-height: 0; } }

/* ---------- Chiffres clés ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.kpi { padding: 18px 20px 4px 0; display: grid; gap: 6px; align-content: start; }
.kpi + .kpi { padding-left: 20px; border-left: 1px solid var(--rule); }
.kpi__value { font: 600 clamp(1.8rem, 3vw, 2.4rem)/1 var(--f-serif); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.01em; }
.kpi__label { font-size: var(--t-sm); color: var(--ink-2); }
.kpi__delta { font: 500 var(--t-xs)/1.3 var(--f-mono); color: var(--ink-2); }
.kpi__delta .up { color: var(--danger); } .kpi__delta .down { color: var(--ok); } .kpi__delta .good { color: var(--ok); }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi:nth-child(3) { padding-left: 0; border-left: 0; } .kpi:nth-child(n+3) { border-top: 1px solid var(--rule); } }

/* ---------- Cartes géographiques ---------- */
.map { position: relative; }
.map svg { width: 100%; height: auto; display: block; }
.map path { stroke: var(--map-stroke); stroke-width: .7; stroke-linejoin: round; transition: opacity .15s; }
.map path[data-k] { cursor: pointer; }
/* Pays voisins, en fond : une trame de points (rien à voir avec la teinte « aucun nid »),
   ni survol ni clic, estompés vers les bords par un masque */
.map .map__context path { fill: url(#map-dots); stroke: var(--map-context); stroke-width: .6; pointer-events: none; }
.map .map__context path.is-next { fill: url(#map-dots-next); stroke: var(--map-context-next); }
.map .map__dot { fill: var(--map-context); }
.map .map__dot--next { fill: var(--map-context-next); }
.map path:hover, .map path.is-active { stroke: var(--ink); stroke-width: 1.4; paint-order: stroke; }
.map .is-focus { stroke: var(--ink); stroke-width: 1.6; }
.map__tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--ink-inverse); font-size: var(--t-xs); padding: 8px 10px; border-radius: var(--r); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); box-shadow: var(--shadow-pop); }
.map__tip b { display: block; font-size: var(--t-sm); }
.map__tip .mono { opacity: .8; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: var(--t-xs); color: var(--ink-2); }
.legend__scale { display: flex; }
.legend__scale span { width: 34px; height: 10px; }
.legend__ticks { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-3); }
.legend__dot { display: inline-flex; gap: 6px; align-items: center; }
.legend__dot i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ---------- Tableaux de données ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r-lg); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.data caption { text-align: left; padding: 14px 16px; font: 600 var(--t-sm)/1.3 var(--f-sans); border-bottom: 1px solid var(--rule); caption-side: top; }
.data th, .data td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--rule); }
/* les chiffres ne se coupent pas ; les libellés et les notes vont à la ligne, pour
   que le tableau tienne dans sa largeur sans défilement horizontal */
.data .n { white-space: nowrap; }
.data .n .xs, .data .n .small { white-space: normal; display: inline-block; max-width: 22ch; }
.data thead th { font: 600 var(--t-xs)/1.2 var(--f-sans); color: var(--ink-2); background: var(--ground); letter-spacing: .02em; }
.data td.n, .data th.n { text-align: right; font-family: var(--f-mono); }
.data tbody tr:last-child td, .data tbody tr:last-child th { border-bottom: 0; }
.data tbody th { font-weight: 500; }
/* Tableau qui tient dans sa largeur : la colonne du nom prend la place restante
   et tronque ; trunc-tip affiche le nom entier dans une bulle s'il est coupé */
.data--fit .data__name { width: 100%; max-width: 0; }
.trunc { position: relative; display: block; }
.trunc__text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trunc__tip { position: absolute; left: -8px; bottom: calc(100% + 6px); z-index: 5; max-width: min(480px, 80vw); width: max-content; white-space: normal; padding: 6px 10px; border-radius: var(--r); background: var(--ink); color: var(--ink-inverse); font: 500 var(--t-xs)/1.4 var(--f-sans); box-shadow: var(--shadow-pop); pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .08s; }
.trunc.is-cut:hover .trunc__tip, .trunc.is-cut:focus-within .trunc__tip { opacity: 1; visibility: visible; }
.data--fit thead th { white-space: normal; }
.bar-cell { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.bar-cell i { display: block; height: 6px; background: var(--d3); border-radius: 1px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font: 600 11.5px/1.3 var(--f-sans); background: var(--ground-2); color: var(--ink-2); white-space: nowrap; }
.pill--ok { background: var(--ok-soft); color: var(--ok); }
.pill--brand { background: var(--brand-soft); color: var(--brand-ink); }
.pill--info { background: var(--info-soft); color: var(--info); }
.pill--danger { background: var(--danger-soft); color: var(--danger); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--plain::before { display: none; }

/* ---------- Article (gabarit pilier / fiche) ---------- */
.article-head { display: grid; gap: 18px; padding-block: 28px 32px; max-width: 880px; }
.article-layout { display: grid; grid-template-columns: 200px minmax(0, var(--measure)) 260px; gap: 48px; justify-content: space-between; align-items: start; }
.article-layout > * { min-width: 0; }
@media (max-width: 1180px) { .article-layout { grid-template-columns: 200px minmax(0, 1fr); } .article-aside { grid-column: 2; } }
@media (max-width: 860px) { .article-layout { grid-template-columns: 1fr; gap: 32px; } .article-aside { grid-column: auto; } .toc { position: static !important; } }
.toc { position: sticky; top: 96px; display: grid; gap: 10px; font-size: var(--t-sm); }
.toc__title { font: 600 var(--t-xs)/1 var(--f-sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.toc ol { list-style: none; display: grid; gap: 2px; border-left: 1px solid var(--rule); counter-reset: toc; }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--ink-2); line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.is-current { border-left-color: var(--brand); color: var(--ink); font-weight: 600; }
@media (max-width: 860px) { .toc { border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 16px; } }

.prose { font-family: var(--f-serif); font-size: 1.125rem; line-height: 1.68; display: grid; gap: 1.1em; }
.prose > * { min-width: 0; }
.prose h2 { font-size: var(--t-2xl); margin-top: 1.4em; padding-top: .9em; border-top: 1px solid var(--rule); scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--t-lg); margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: .4em; }
.prose li::marker { color: var(--brand); }
.prose strong { font-weight: 650; }
.prose .callout, .prose .essentiel, .prose .table-wrap, .prose figure, .prose .compare, .prose .cycle { font-family: var(--f-sans); font-size: var(--t-base); line-height: 1.55; }
.prose figure { margin: .4em 0; display: grid; gap: 8px; }
.prose figure img { border-radius: var(--r); width: 100%; }
.prose figcaption { font-size: var(--t-xs); color: var(--ink-2); }
.prose sup a { font: 500 11px/1 var(--f-mono); color: var(--brand-ink); text-decoration: none; padding: 0 1px; }
.prose a { text-decoration-color: var(--brand); }

.article-aside { display: grid; gap: 20px; position: sticky; top: 96px; }
@media (max-width: 1180px) { .article-aside { position: static; } }

.sources { font-size: var(--t-sm); counter-reset: src; list-style: none; display: grid; gap: 8px; padding: 0 !important; }
.sources li { counter-increment: src; display: grid; grid-template-columns: 28px 1fr; gap: 6px; font-family: var(--f-sans); line-height: 1.45; }
.sources li::before { content: "[" counter(src) "]"; font: 500 var(--t-xs)/1.7 var(--f-mono); color: var(--brand-ink); }
.sources span { color: var(--ink-2); }

/* Comparatif d'espèces */
.compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; }
.compare__col { display: grid; grid-template-rows: auto auto 1fr; border-left: 1px solid var(--rule); }
.compare__col:first-child { border-left: 0; }
.compare__col img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.compare__head { padding: 12px 14px; border-bottom: 1px solid var(--rule); display: grid; gap: 2px; }
.compare__head b { font: 600 var(--t-base)/1.2 var(--f-serif); }
.compare__head i { font: italic 400 var(--t-xs)/1.2 var(--f-serif); color: var(--ink-2); }
.compare dl { margin: 0; padding: 4px 14px 14px; display: grid; gap: 0; font-size: var(--t-sm); }
.compare dt { font: 500 10.5px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding-top: 10px; }
.compare dd { margin: 4px 0 0; }
.compare__col--target .compare__head { background: var(--brand-soft); }
@media (max-width: 700px) { .compare { grid-template-columns: 1fr; } .compare__col { border-left: 0; border-top: 1px solid var(--rule); } .compare__col:first-child { border-top: 0; } }

/* Cycle annuel */
.cycle { display: grid; gap: 10px; }
.cycle__grid { display: grid; grid-template-columns: 120px repeat(12, minmax(0, 1fr)); gap: 3px 2px; align-items: center; font-size: var(--t-xs); }
.cycle__grid .m { font: 500 10.5px/1 var(--f-mono); color: var(--ink-3); text-align: center; text-transform: uppercase; }
.cycle__grid .m.is-now { color: var(--ink); font-weight: 700; }
.cycle__grid .lbl { color: var(--ink-2); padding-right: 8px; line-height: 1.2; }
.cycle__grid .c { height: 18px; background: var(--ground); }
.cycle__grid .c.on1 { background: var(--d1); } .cycle__grid .c.on2 { background: var(--d2); } .cycle__grid .c.on3 { background: var(--d3); } .cycle__grid .c.on4 { background: var(--d4); }
.cycle__grid .c.now { box-shadow: inset 0 0 0 1.5px var(--ink); }
.cycle__wrap { overflow-x: auto; }
.cycle__wrap .cycle__grid { min-width: 560px; }

/* FAQ */
.faq { display: grid; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font: 600 var(--t-md)/1.35 var(--f-serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .faq__a { padding: 0 0 20px; color: var(--ink-2); max-width: 70ch; display: grid; gap: 10px; }

/* ---------- Pied de page ---------- */
.footer { background: var(--ground); border-top: 1px solid var(--rule); padding-block: 56px 32px; font-size: var(--t-sm); }
.footer__top { display: grid; grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer h2 { font: 600 var(--t-xs)/1 var(--f-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 8px; }
.footer a { text-decoration: none; color: var(--ink-2); }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer__emerg { display: grid; gap: 8px; margin-top: 18px; padding: 14px; border: 1px solid var(--rule-strong); border-radius: var(--r); background: var(--paper); }
.footer__emerg div { display: flex; gap: 10px; align-items: baseline; }
.footer__emerg b { font: 600 var(--t-lg)/1 var(--f-mono); min-width: 38px; }
/* Sélecteur de langue (#349), seulement quand plusieurs langues sont proposées */
.footer__lang { display: flex; gap: 10px; align-items: center; margin-top: 16px; font-size: var(--t-sm); color: var(--ink-2); }
.footer__lang select { font: inherit; color: var(--ink); padding: 6px 28px 6px 10px; border: 1px solid var(--rule-strong); border-radius: var(--r); background: var(--paper); }
.footer__bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--ink-3); font-size: var(--t-xs); }
.footer__bottom nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
@media (max-width: 960px) { .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer__about { grid-column: 1 / -1; } }

/* ---------- Formulaires ---------- */
.field { display: grid; gap: 6px; }
.field label, .label { font: 600 var(--t-sm)/1.3 var(--f-sans); }
.field .hint { font-size: var(--t-xs); color: var(--ink-2); }

/* Suggestion de correction d'une adresse email mal tapée (email_suggest.js) */
.email-suggest { margin: 6px 0 0; font-size: var(--t-xs); color: var(--warn); }
.field > .email-suggest { margin: 0; }
.email-suggest button { font: inherit; font-weight: 600; color: inherit; text-decoration: underline; text-underline-offset: 2px; background: none; border: 0; padding: 0; cursor: pointer; }
.input, .select, .textarea { width: 100%; min-height: 46px; padding: 10px 14px; font: 400 var(--t-base)/1.4 var(--f-sans); color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--r); transition: border-color .15s, box-shadow .15s; }
.textarea { min-height: 110px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--ring); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.err { font-size: var(--t-xs); color: var(--danger); font-weight: 600; }
.req { color: var(--danger); }
.opt { font-weight: 400; color: var(--ink-3); font-size: var(--t-xs); }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.choice { position: relative; display: grid; gap: 4px; padding: 16px 16px 16px 48px; border: 1px solid var(--rule-strong); border-radius: var(--r-lg); cursor: pointer; background: var(--paper); transition: border-color .15s, background .15s; }
.choice input { position: absolute; opacity: 0; }
.choice::before { content: ""; position: absolute; left: 16px; top: 18px; width: 18px; height: 18px; border: 1.5px solid var(--ink-3); border-radius: 50%; background: var(--paper); }
.choice:has(input:checked) { border-color: var(--ink); background: var(--ground); box-shadow: inset 0 0 0 1px var(--ink); }
.choice:has(input:checked)::before { border: 5px solid var(--ink); }
.choice:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--ring); }
.choice b { font-size: var(--t-base); font-weight: 600; }
.choice span { font-size: var(--t-sm); color: var(--ink-2); }
.choice--check::before { border-radius: 4px; }
.choice--check:has(input:checked)::before { border: 0; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E") center/14px no-repeat; }
.choice--media { padding: 0; grid-template-rows: auto 1fr; overflow: hidden; }
.choice--media::before { top: 12px; left: 12px; z-index: 1; box-shadow: 0 0 0 3px rgba(255,255,255,.7); }
.choice--media img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.choice--media .choice__txt { padding: 12px 14px 14px; display: grid; gap: 2px; }

.seg { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: var(--r); padding: 3px; gap: 2px; background: var(--paper); flex-wrap: wrap; }
.seg button, .seg label { border: 0; background: none; padding: 7px 12px; border-radius: 4px; font: 500 var(--t-sm)/1 var(--f-sans); color: var(--ink-2); cursor: pointer; }
.seg [aria-pressed="true"], .seg label:has(input:checked) { background: var(--ink); color: var(--ink-inverse); }
.seg input { position: absolute; opacity: 0; width: 1px; }

/* ---------- Divers ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--rule-strong); border-radius: 999px; font-size: var(--t-sm); text-decoration: none; background: var(--paper); }
.chip:hover { border-color: var(--ink); }
.chip .num { color: var(--ink-3); font-size: var(--t-xs); }
.divider { height: 1px; background: var(--rule); border: 0; margin: 0; }
.photo-credit { position: absolute; right: 8px; bottom: 8px; font: 400 10px/1 var(--f-mono); color: #fff; background: rgba(0,0,0,.45); padding: 4px 6px; border-radius: 3px; }

/* ---------- Mises en page de section (réutilisées par les gabarits) ---------- */
@media (max-width: 960px) {
  [data-hero], [data-split] { grid-template-columns: 1fr !important; gap: 36px !important; }
  .chain { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 520px) { .chain { grid-template-columns: 1fr !important; } }
[data-invert] a:not(.btn) { color: inherit; }
[data-invert] .btn:not(.btn--signal):hover { border-color: currentColor !important; }
.nav > li:nth-last-child(-n+2) .mega { left: auto; right: -12px; }
/* Un seul sous-menu à la fois, piloté par mega_menu_controller (data-open sur le <li>) :
   il ouvre tout de suite au survol d'un lien, bascule sans délai d'un lien à l'autre
   et ne referme qu'un peu après la sortie de la barre. Sans JS, :hover / :focus-within
   prennent le relais. Un panneau fermé ne capte jamais la souris. */
.header .wrap { position: relative; } .nav > li { position: static; } .nav { position: relative; }
.mega { pointer-events: none; }
.nav:not([data-mega-ready]) > li:hover .mega, .nav:not([data-mega-ready]) > li:focus-within .mega,
.nav > li[data-open] .mega { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.nav[data-mega-ready] > li:not([data-open]) .mega { transition-duration: 0s; }
.nav[data-mega-ready] > li[data-open] > .nav__link { background: var(--ground); }
/* Pont invisible limité à l'écart de 6 px entre la barre et le panneau : plus haut,
   il recouvrait les autres liens et les empêchait de recevoir le survol (#459). */
.mega::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 8px; }

/* ---------- Verticale plateforme ---------- */
.app-mock { border: 1px solid var(--rule-strong); border-radius: var(--r-lg); background: var(--ground); box-shadow: var(--shadow-pop); overflow: hidden; font-size: var(--t-sm); min-width: 0; }
.app-mock__bar { display: flex; gap: 6px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--rule); background: var(--paper); }
.app-mock__bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--rule-strong); }
.app-mock__bar b { margin-left: 10px; font: 400 11px/1 var(--f-mono); color: var(--ink-3); }
.app-mock__body { padding: 16px; display: grid; gap: 8px; }
.app-mock__head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 4px; }
.app-mock__filters { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 6px; }
.app-mock__filters span { border: 1px solid var(--rule-strong); border-radius: var(--r); padding: 4px 9px; font-size: 11.5px; background: var(--paper); color: var(--ink-2); }
.app-mock__filters .is-on { background: var(--ink); color: var(--ink-inverse); border-color: var(--ink); }
.app-mock__row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); }
.app-mock__row .pill::before { display: none; }

.steps-v { list-style: none; display: grid; border-top: 1px solid var(--rule-strong); }
.steps-v li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.steps-v li > div { display: grid; gap: 4px; max-width: 64ch; }
.steps-v__n { font-size: var(--t-lg); color: var(--brand-ink); font-weight: 500; }
@media (max-width: 640px) { .steps-v li { grid-template-columns: 40px minmax(0, 1fr); } .steps-v .pill { grid-column: 2; justify-self: start; } }

.checks { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--rule-strong); }
.checks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: var(--t-base); }
.checks svg { width: 20px; height: 20px; color: var(--ok); margin-top: 2px; }

.phone-mini { width: 76px; height: 140px; border: 2px solid var(--ink); border-radius: 14px; padding: 14px 7px; display: grid; gap: 6px; align-content: start; position: relative; background: var(--ground); }
.phone-mini span { position: absolute; top: 5px; left: 50%; width: 22px; height: 3px; border-radius: 2px; background: var(--ink); transform: translateX(-50%); }
.phone-mini i { display: block; height: 22px; border-radius: 4px; background: var(--paper); border: 1px solid var(--rule); }
.phone-mini i:first-of-type { background: var(--brand-soft); }

/* ---------- Fiche structure ---------- */
.org-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: start; padding-bottom: 24px; }
.org-logo { width: 88px; height: 88px; border-radius: var(--r-lg); background: var(--ink); color: var(--ink-inverse); display: grid; place-items: center; font: 700 1.6rem/1 var(--f-serif); }
@media (max-width: 860px) { .org-head { grid-template-columns: auto minmax(0, 1fr); } .org-head > .btn-row { grid-column: 1 / -1; } .org-logo { width: 64px; height: 64px; font-size: 1.2rem; } }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); overflow-x: auto; }
.tabs a { padding: 12px 14px; text-decoration: none; font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a[aria-current] { color: var(--ink); border-color: var(--brand); }
.tabs .num { color: var(--ink-3); font-size: var(--t-xs); margin-left: 4px; }
.news-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--rule); text-decoration: none; }
.news-row:hover .story__title { text-decoration: underline; text-decoration-color: var(--brand); }
@media (max-width: 640px) { .news-row { grid-template-columns: 1fr; gap: 6px; } .news-row .pill { justify-self: start; } }

.done-head { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: center; }
.done-ok { width: 48px; height: 48px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.done-ok svg { width: 26px; height: 26px; }
.id-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.id-mini figure { margin: 0; display: grid; gap: 6px; font-size: var(--t-xs); color: var(--ink-2); }
.id-mini b { color: var(--ink); }
.id-mini img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); width: 100%; }

.thumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r); }

/* ---------- Signalement, mode focus (une question par écran) ---------- */
body.focus { background: var(--paper); padding-bottom: 0; }
.fbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: 60px; padding-inline: 12px; background: var(--paper); }
.fbar [data-back] { grid-column: 1; }
.fbar__brand { grid-column: 2; justify-self: center; display: inline-flex; gap: 8px; align-items: center; text-decoration: none; font: 600 var(--t-sm)/1 var(--f-sans); }
.fbar__quit { grid-column: 3; justify-self: end; font-size: var(--t-sm); color: var(--ink-2); text-decoration: none; padding: 8px; }
.fbar__quit:hover { color: var(--ink); }
.fprog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rule); }
.fprog span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .35s cubic-bezier(.2,.7,.2,1); }
.fwrap { max-width: 600px; margin-inline: auto; padding: 28px 20px 96px; display: grid; gap: 28px; }
@media (max-width: 520px) { .fwrap { padding: 20px 16px 72px; gap: 22px; } }
/* Étapes du signalement : pastilles numérotées reliées par un filet */
.fgroups { list-style: none; display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; font: 500 var(--t-xs)/1.2 var(--f-sans); color: var(--ink-3); }
.fgroups li { display: inline-flex; gap: 8px; align-items: center; flex: 0 1 auto; min-width: 0; }
.fgroups li + li::before { content: ""; flex: 0 0 auto; width: 20px; height: 2px; border-radius: 1px; background: var(--rule-strong); }
.fgroups__n { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--rule-strong); background: var(--paper); color: var(--ink-3); font: 600 var(--t-xs)/1 var(--f-sans); position: relative; }
.fgroups__l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fgroups .is-cur { color: var(--ink); font-weight: 600; }
.fgroups .is-cur .fgroups__n { border-color: var(--brand); background: var(--brand); color: var(--ink-inverse); }
.fgroups .is-done { color: var(--ink-2); }
.fgroups .is-done + li::before, .fgroups .is-done + .is-cur::before { background: var(--ink); }
.fgroups .is-done .fgroups__n { border-color: var(--ink); background: var(--ink); color: transparent; }
.fgroups .is-done .fgroups__n::after { content: ""; position: absolute; left: 50%; top: 45%; width: 9px; height: 5px; border-left: 2px solid var(--ink-inverse); border-bottom: 2px solid var(--ink-inverse); transform: translate(-50%, -50%) rotate(-45deg); }
/* sur téléphone, seul le libellé de l'étape en cours reste affiché */
@media (max-width: 520px) {
  .fgroups { gap: 6px; }
  .fgroups li + li::before { width: 12px; }
  .fgroups li:not(.is-cur) .fgroups__l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
.fintro { display: grid; gap: 8px; padding-bottom: 4px; }
.fintro h1 { font-size: var(--t-xl); }
.fintro p { font-size: var(--t-sm); color: var(--ink-2); }
#flow { display: grid; }
.fscreen { display: grid; gap: 18px; }
.flieu__top, .flieu__bottom { display: grid; gap: 18px; align-content: start; }
/* Grand écran : l'étape du lieu s'élargit, recherche à gauche, carte à droite */
@media (min-width: 1024px) {
  [data-screen="lieu"] > .fwrap { max-width: 1120px; }
  .fscreen--lieu { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); grid-template-areas: "top map" "bottom map"; grid-template-rows: auto 1fr; column-gap: 40px; align-items: start; }
  .flieu__top { grid-area: top; }
  .flieu__bottom { grid-area: bottom; }
  .fscreen--lieu .fmap { grid-area: map; position: sticky; top: 24px; }
  .fscreen--lieu .fmap .map { aspect-ratio: auto; height: min(560px, calc(100vh - 160px)); }
}
.fscreen.in-fwd { animation: fin .28s cubic-bezier(.2,.7,.2,1); }
.fscreen.in-back { animation: fback .28s cubic-bezier(.2,.7,.2,1); }
@keyframes fin { from { opacity: 0; transform: translateY(14px); } }
@keyframes fback { from { opacity: 0; transform: translateY(-14px); } }
.fq { font: 600 clamp(1.6rem, 4.6vw, 2rem)/1.15 var(--f-serif); letter-spacing: -.01em; text-wrap: balance; }
.fhint { color: var(--ink-2); margin-top: -8px; }
.fopts { display: grid; gap: 10px; }
.fopt { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 64px; padding: 12px 16px; border: 1px solid var(--rule-strong); border-radius: var(--r-lg); background: var(--paper); cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s, transform .12s; }
.fopt:hover { border-color: var(--ink-3); background: var(--ground); }
.fopt:active { transform: scale(.995); }
.fopt input { position: absolute; opacity: 0; pointer-events: none; }
.fopt:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--ring); }
.fopt:has(input:checked) { border-color: var(--ink); background: var(--ground); box-shadow: inset 0 0 0 1px var(--ink); }
.fopt__lead { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r); background: var(--ground); color: var(--ink-2); }
.fopt__lead svg { width: 22px; height: 22px; }
.fopt:has(input:checked) .fopt__lead { background: var(--ink); color: var(--ink-inverse); }
.fopt__txt { display: grid; gap: 2px; }
.fopt__txt b { font-weight: 600; font-size: var(--t-base); }
.fopt__txt span { font-size: var(--t-sm); color: var(--ink-2); }
.fopt kbd { font: 500 11px/1 var(--f-mono); color: var(--ink-3); border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 4px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; background: var(--paper); }
.fopt:has(input:checked) kbd { background: var(--ink); color: var(--ink-inverse); border-color: var(--ink); }
@media (hover: none), (max-width: 640px) { .fopt kbd, .fenter { display: none; } }
.fopt--check .fopt__lead { position: relative; }
.fopt:not(.fopt--media):not(:has(.fopt__lead)) { grid-template-columns: minmax(0, 1fr) auto; }
.fopts--media { grid-template-columns: 1fr 1fr; gap: 12px; }
.fopt--media { grid-template-columns: 1fr; padding: 0; overflow: hidden; align-items: stretch; gap: 0; }
.fopt--media img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.fopt--media .fopt__txt { padding: 12px 14px 14px; }
.fopt__cycle { position: relative; display: block; overflow: hidden; }
.fopt__cycle img { display: block; }
.fopt__cycle img + img { position: absolute; inset: 0; height: 100%; opacity: 0; animation: fopt-cycle 9s infinite; }
.fopt__cycle img:nth-child(2) { animation-delay: 3s; }
.fopt__cycle img:nth-child(3) { animation-delay: 6s; }
@keyframes fopt-cycle { 0% { opacity: 0; } 8%, 33% { opacity: 1; } 41%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fopt__cycle img + img { display: none; } }
.fopt--media kbd { position: absolute; top: 10px; right: 10px; }
@media (max-width: 400px) { .fopts--media { grid-template-columns: 1fr; } .fopt--media { grid-template-columns: 112px 1fr; } .fopt--media img { height: 100%; aspect-ratio: auto; } .fopt__cycle { height: 100%; } }
.fdot { display: block; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--d1), var(--d3)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.fopt:has(.fdot) .fopt__lead { width: 48px; height: 48px; background: transparent; }
.fopt:has(.fdot):has(input:checked) .fopt__lead { background: transparent; }
.fsplit { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: center; }
.hscale { width: 100%; height: auto; }
.hscale rect[data-band] { transition: opacity .15s; }
@media (max-width: 560px) { .fsplit { grid-template-columns: 1fr; gap: 12px; } .hscale { max-height: 150px; } }
.fskip { justify-self: center; background: none; border: 0; padding: 8px 12px; color: var(--ink-2); font: 500 var(--t-sm)/1 var(--f-sans); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: .25em; cursor: pointer; }
.fskip:hover { color: var(--ink); text-decoration-color: var(--brand); }
.fnext { display: grid; gap: 8px; justify-items: center; padding-top: 6px; }
.fdrop { display: grid; justify-items: center; gap: 6px; padding: 32px 20px; border: 1.5px dashed var(--rule-strong); border-radius: var(--r-lg); background: var(--ground); cursor: pointer; text-align: center; }
.fdrop:hover { border-color: var(--ink-3); }
.fdrop svg { width: 32px; height: 32px; color: var(--ink-2); margin-bottom: 4px; }
.fdrop span { font-size: var(--t-xs); color: var(--ink-2); }
.fgps { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; text-align: left; padding: 16px; border: 1px solid var(--ink); border-radius: var(--r-lg); background: var(--paper); color: var(--ink); cursor: pointer; font: inherit; }
.fgps:hover { background: var(--ground); }
.fgps > svg { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); }
.fgps span span { display: block; font-size: var(--t-sm); color: var(--ink-2); }
.fgps.is-busy > svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.for { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: var(--t-xs); }
.for::before, .for::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.input--lg { min-height: 54px; font-size: var(--t-md); }
.fmap { display: grid; gap: 8px; }
.fmap .map { border: 1px solid var(--rule-strong); border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; background: var(--ground); }
.fmap svg { width: 100%; height: 100%; cursor: crosshair; }
.fmap path { fill: var(--d0); stroke: var(--rule-strong); stroke-width: .6; vector-effect: non-scaling-stroke; }
.fmap path.is-focus { fill: var(--brand-soft); stroke: var(--ink); stroke-width: 1.5; }
.frecap { margin: 0; display: grid; border-top: 1px solid var(--rule); }
.frecap div { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.frecap dt { font-size: var(--t-sm); color: var(--ink-2); }
.frecap dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 520px) { .frecap div { grid-template-columns: 1fr auto; } .frecap dd { grid-column: 1 / -1; grid-row: 2; } }
.fdone { display: grid; gap: 18px; outline: none; }
.ftimeline { list-style: none; display: grid; border-left: 2px solid var(--rule); margin-left: 6px; }
.ftimeline li { position: relative; display: grid; gap: 2px; padding: 0 0 18px 20px; }
.ftimeline li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.ftimeline span { font-size: var(--t-sm); color: var(--ink-2); }
.ffaq { display: grid; gap: 12px; padding-top: 40px; margin-top: 12px; border-top: 1px solid var(--rule); }
.ffaq h2 { font-size: var(--t-lg); }
.ffaq summary { font-size: var(--t-base); }
.fintro h1 { font: 600 clamp(1.6rem, 4.6vw, 2rem)/1.15 var(--f-serif); letter-spacing: -.01em; }
.fintro { padding-bottom: 12px; }
.fq--sub { font: 600 var(--t-lg)/1.3 var(--f-sans); letter-spacing: 0; }
@media (max-width: 640px) {
  .fnext { position: sticky; bottom: 0; margin-inline: -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--paper) 78%, transparent); z-index: 5; }
}

/* Carte Leaflet du lieu et repère du nid (contrôleur report-flow) */
.fmap .map.leaflet-container { background: var(--ground); font: inherit; cursor: crosshair; }
.fpin { background: none; border: 0; }
.fmap .fpin svg { width: 32px; height: 32px; cursor: grab; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.fmap .fpin svg path { fill: var(--signal); stroke: var(--ink); stroke-width: 1.2; }
.fmap .fpin svg circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1.2; }
.fscreen .place-search { max-width: none; }
.fmap .leaflet-overlay-pane svg { width: auto; height: auto; max-width: none; cursor: inherit; }
/* les règles .fmap svg / path de la maquette visent sa carte SVG, pas les contrôles de Leaflet */
.fmap .leaflet-attribution-flag { display: none !important; }
/* Sur le fond IGN, les communes restent translucides pour garder les rues lisibles */
.fmap path.fmap-town { fill-opacity: .25; }
.fmap path.fmap-town.is-focus { fill-opacity: .45; }
.fdone .callout p, .fdone #territory-text p { margin: 0; }
.fdone #territory-text .small { display: grid; gap: 6px; color: var(--ink-2); }
.fphotos { display: grid; gap: 10px; }

/* Widget (layouts/widget) : le formulaire dans l'iframe d'un site tiers. La
   page prend la hauteur de son contenu, que l'iframe épouse (widget-frame) :
   pas de barre collante ni de grande marge basse, pas de FAQ (le site hôte a
   déjà son contexte). */
body.focus--frame { min-height: 0; background: var(--paper); }
.focus--frame .fbar { position: relative; top: 0; }
.focus--frame .fwrap { padding-bottom: 32px; }
.focus--frame .fnext { position: static; margin-inline: 0; padding: 6px 0 0; background: none; }
.ffaq--embedded { display: none; }
/* Page du widget (landings/widget) : l'aperçu, le vrai widget posé par son script */
.widget-preview { border: 1px solid var(--rule-strong); border-radius: var(--r-lg); background: var(--paper); overflow: hidden; min-height: 200px; }
.widget-preview > [data-lefrelon-widget] > a { display: block; padding: 24px; }

/* ---------- Réseau : annuaire et fiches des structures (landings/partners, landings/partner) ---------- */
.org-logo--img { background: var(--paper); border: 1px solid var(--rule); overflow: hidden; }
.org-logo--img img { max-width: 86%; max-height: 80%; object-fit: contain; }
.org-head .org-logo--img { width: 140px; }
.org-logo--sm { width: 64px; height: 64px; font-size: 1.15rem; }
.org-logo--long { font-size: 1.1rem; }
.org-logo--sm.org-logo--long { font-size: .85rem; }
@media (max-width: 860px) { .org-head .org-logo--img { width: 96px; } }
.ref-az { display: flex; flex-wrap: wrap; gap: 4px; padding: 12px 0; margin-bottom: 8px; position: sticky; top: 68px; z-index: 5; background: var(--ground); border-bottom: 1px solid var(--rule); }
.ref-az a, .ref-az span { display: inline-grid; place-items: center; min-width: 34px; height: 34px; border-radius: var(--r); font: 600 var(--t-sm)/1 var(--f-sans); text-decoration: none; }
.ref-az a { background: var(--paper); border: 1px solid var(--rule-strong); color: var(--ink); }
.ref-az a:hover { border-color: var(--brand); color: var(--brand-ink); }
.ref-az span { color: var(--rule-strong); }
.ref-letter { padding-top: 32px; scroll-margin-top: 120px; }
.ref-letter__head { font: 600 1.75rem/1.2 var(--f-serif); color: var(--brand-ink); padding-bottom: 8px; border-bottom: 1px solid var(--rule-strong); }
.ref-index { list-style: none; padding: 0; margin: 0; }
.ref-index li { border-bottom: 1px solid var(--rule); }
.ref-index__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 16px 8px; text-decoration: none; color: var(--ink); border-radius: var(--r); }
.ref-index__row:hover { background: var(--paper); }
.ref-index .org-logo--img { width: 96px; }
.ref-index__body { display: grid; gap: 2px; min-width: 0; }
.ref-index__name { font: 600 1.15rem/1.3 var(--f-serif); }
.ref-index__full { font-size: var(--t-sm); color: var(--ink-2); }
.ref-index__meta { font-size: var(--t-xs); color: var(--ink-3); }
.ref-index__missions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 640px) {
  .ref-index__row { grid-template-columns: auto minmax(0, 1fr); gap: 14px; }
  .ref-index__missions { grid-column: 2; justify-content: flex-start; }
}
.funders { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.funders .tile { gap: 6px; }
.funders ul { list-style: none; display: grid; gap: 4px; font-size: var(--t-sm); color: var(--ink-2); }

/* ---------- Applications mobiles (landings/_app_page) ---------- */
.app-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 56px; align-items: center; }
.app-feature--flip > figure { order: -1; }
.app-shot { display: grid; justify-items: center; }
.app-shot img { max-height: 520px; width: auto; max-width: 100%; border-radius: 22px; border: 1px solid var(--rule-strong); box-shadow: var(--shadow-pop); }
.app-stores { align-items: center; }
.app-stores img { height: 48px; width: auto; display: block; }
@media (max-width: 860px) { .app-feature { grid-template-columns: 1fr; gap: 24px; } .app-feature--flip > figure { order: 0; } .app-shot img { max-height: 420px; } }

/* ---------- Pages mairies : aperçu du formulaire webview (landings/_webview_link_generator) ---------- */
.webview-device { max-width: 100%; background: #1f1f1f; box-shadow: var(--shadow-pop); transition: width .3s ease, height .3s ease; }
.webview-device.is-phone { width: 360px; height: 740px; padding: 14px; border-radius: 44px; }
.webview-device.is-tablet { width: 640px; height: 860px; padding: 24px; border-radius: 32px; }
.webview-device__screen { width: 100%; height: 100%; overflow: hidden; background: #fff; border-radius: 32px; }
.webview-device.is-tablet .webview-device__screen { border-radius: 10px; }
.webview-device iframe { width: 100%; height: 100%; border: 0; }
@media (max-width: 760px) { [data-webview-link-target="devices"] { display: none; } .webview-device.is-phone { width: 320px; height: 640px; } }
.howto { display: grid; gap: 18px; counter-reset: howto; list-style: none; padding: 0; }
.howto li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px 14px; counter-increment: howto; }
.howto li::before { content: counter(howto, decimal-leading-zero); grid-row: span 2; font: 500 var(--t-sm)/1.6 var(--f-mono); color: var(--brand-ink); }
.howto b { font-weight: 600; }
.howto span { color: var(--ink-2); font-size: var(--t-sm); }

/* ---------- Dons et mécénat ---------- */
.goal { display: grid; gap: 8px; max-width: 560px; padding: 18px 0; border-block: 1px solid var(--rule); }
.goal__head, .goal__foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.goal__head .mono { font-size: var(--t-sm); color: var(--ink-2); }
.goal__bar { height: 10px; background: var(--ground-2); border-radius: 999px; overflow: hidden; }
.goal__bar span { display: block; height: 100%; background: var(--signal); border-radius: 999px; }
.donate { display: grid; gap: 16px; padding: 28px; border: 1px solid var(--ink); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-pop); position: sticky; top: 96px; }
@media (max-width: 960px) { .donate { position: static; } }
@media (max-width: 520px) { .donate { padding: 20px 16px; } }
.seg--full { display: grid; grid-template-columns: 1fr 1fr; }
.seg--full label { text-align: center; padding: 10px; }
.amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.amount { position: relative; display: grid; place-items: center; min-height: 52px; border: 1px solid var(--rule-strong); border-radius: var(--r); cursor: pointer; font-weight: 600; font-size: var(--t-md); }
.amount input[type=radio] { position: absolute; opacity: 0; }
.amount:hover { border-color: var(--ink-3); }
.amount:has(input[type=radio]:checked) { border-color: var(--ink); background: var(--ink); color: var(--ink-inverse); }
.amount:has(input[type=radio]:focus-visible) { box-shadow: 0 0 0 3px var(--ring); }
.amount--free { grid-column: 1 / -1; display: block; cursor: text; border: 0; min-height: 0; }
.amount--free .input { min-height: 52px; padding-right: 36px; font-size: var(--t-md); }
.amount__unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 500; }
.donate__net { font-size: var(--t-sm); min-height: 1.4em; }
.donate__use { margin-top: -10px; min-height: 1.4em; }
.donate__done { display: flex; gap: 8px; align-items: center; font-size: var(--t-sm); color: var(--ok); font-weight: 600; }
.donate__done svg { width: 18px; height: 18px; flex: none; }
.tier { gap: 12px; padding: 28px; }
.tier--focus { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tier .btn { margin-top: auto; }
.tiers .tile { grid-template-rows: auto auto auto 1fr auto; }
.checks--sm li { font-size: var(--t-sm); padding: 10px 0; }
.checks--sm svg { width: 16px; height: 16px; }

/* ==========================================================================
   Compléments d'intégration : composants dont les vraies pages ont besoin et
   que les maquettes ne montraient pas (contenus éditoriaux existants, flash,
   lightbox, carte Leaflet, recherche de commune…). Mêmes jetons, même grammaire.
   ========================================================================== */

/* Pied de page */
.footer__about { display: grid; gap: 12px; align-content: start; }
.footer__cookies { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); cursor: pointer; }
.footer__cookies:hover { color: var(--ink); text-decoration: underline; }

/* Messages flash */
.flash-row { padding-top: 16px; }
.callout--ok { border-color: var(--ok); background: var(--ok-soft); }
.callout--warn { border-color: var(--warn); background: var(--warn-soft); }
.callout--warn .callout__title { color: var(--warn); }

/* Article : compléments */
.article-head__text { display: grid; gap: 18px; align-content: start; }
/* Fiche avec photo : le texte garde sa largeur de lecture, la photo occupe la droite */
.article-head--media { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); column-gap: 56px; align-items: center; }
.article-head--media .stamp { grid-column: 1 / -1; }
.article-head__media { margin: 0; }
.article-head__credit { margin-top: 6px; font: 400 11px/1.3 var(--f-mono); color: var(--ink-2); text-align: right; }
.article-head__media img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-lg); background: var(--ground); }
@media (max-width: 860px) { .article-head--media { grid-template-columns: minmax(0, 1fr); } .article-head__media img { aspect-ratio: 16 / 9; } }
.article-head__lead { font-family: var(--f-serif); font-size: 1.25rem; color: var(--ink); max-width: 64ch; }
.article-layout--notoc { grid-template-columns: minmax(0, var(--measure)) 260px; }
@media (max-width: 1180px) { .article-layout--notoc { grid-template-columns: minmax(0, 1fr); } .article-layout--notoc .article-aside { grid-column: auto; } }
.tile--ground { background: var(--ground); border-color: transparent; }
.link-list { list-style: none; display: grid; gap: 10px; }
.prose h4 { font-size: var(--t-md); }
.prose .data td, .prose .data th { white-space: normal; min-width: 120px; vertical-align: top; }
.prose .table-wrap { font-size: var(--t-sm); }
.prose img { max-width: 100%; height: auto; }
.prose .btn-row { font-family: var(--f-sans); }
.prose .faq summary { font-size: var(--t-md); }
.prose .faq .faq__a { font-size: 1.0625rem; }
.sources__note { font-family: var(--f-sans); }
.sources a { color: var(--ink); }

/* Frise mois par mois (biologie) */
.timeline { list-style: none; padding: 0 0 0 24px !important; border-left: 1px solid var(--rule-strong); display: grid; gap: 28px !important; }
.timeline > li { position: relative; display: grid; gap: 8px; }
.timeline > li::before { content: ""; position: absolute; left: -29px; top: .55em; width: 9px; height: 9px; background: var(--brand); transform: rotate(45deg); }
.timeline h4 { font-size: var(--t-lg); }
.timeline__when { font: 500 var(--t-xs)/1.3 var(--f-mono); color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.timeline img { border-radius: var(--r); max-height: 320px; width: auto; }

/* Schémas illustrés (distance de sécurité, logigramme) */
.schema { padding: 16px; background: #fff; border: 1px solid var(--rule); border-radius: var(--r-lg); }
.schema svg { width: 100%; height: auto; max-width: 660px; margin-inline: auto; display: block; }

/* Galerie défilante (nids) */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 34%); gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.gallery img { scroll-snap-align: start; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: 100%; border-radius: var(--r); }
@media (max-width: 640px) { .gallery { grid-auto-columns: 78%; } }

/* Quiz d'identification */
.quiz { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; font-family: var(--f-sans); }
@media (max-width: 760px) { .quiz { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.quiz__item { border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; background: var(--paper); }
.quiz__item summary { list-style: none; cursor: pointer; display: grid; }
.quiz__item summary::-webkit-details-marker { display: none; }
.quiz__item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: auto; }
.quiz__item summary span { padding: 8px 10px; font-size: var(--t-xs); font-weight: 600; color: var(--ink-2); }
.quiz__item[open] summary span { display: none; }
.quiz__item p { padding: 8px 10px; font-size: var(--t-sm); font-weight: 600; background: var(--brand-soft); }

/* Agrandissement des illustrations */
img[data-lightbox] { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(20, 19, 24, .92); display: grid; place-items: center; align-content: center; gap: 12px; padding: 56px 16px 24px; }
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: min(1400px, 100%); max-height: calc(100vh - 140px); object-fit: contain; border-radius: var(--r); background: #fff; }
.lightbox__caption { color: #F3F1EC; font-size: var(--t-sm); max-width: 80ch; text-align: center; }
.lightbox__close { position: absolute; top: 12px; right: 12px; color: #F3F1EC; border-color: rgba(255, 255, 255, .3); }
.lightbox__close:hover { background: rgba(255, 255, 255, .12); }
.prose .essentiel h2 { border: 0; padding: 0; margin: 0; font: 700 var(--t-xs)/1 var(--f-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.essentiel li { display: block; position: relative; padding-left: 28px; }
.essentiel li::before { position: absolute; left: 4px; top: 0; }
.prose .essentiel ul { padding-left: 0; }

/* Recherche d'un territoire avec suggestions */
.place-search { position: relative; display: grid; gap: 8px; max-width: 520px; }
.place-search__row { display: flex; gap: 8px; flex-wrap: wrap; }
.place-search__row .input { flex: 1 1 220px; }
.place-search__results { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--r); box-shadow: var(--shadow-pop); max-height: 320px; overflow-y: auto; }
.place-search__results a { display: grid; gap: 2px; padding: 10px 14px; text-decoration: none; border-bottom: 1px solid var(--rule); }
.place-search__results a:last-child { border-bottom: 0; }
.place-search__results a:hover, .place-search__results a.is-active { background: var(--ground); }
.place-search__results b { font-weight: 600; font-size: var(--t-sm); }
.place-search__results span { font-size: var(--t-xs); color: var(--ink-2); }
.place-search__empty { padding: 12px 14px; font-size: var(--t-sm); color: var(--ink-2); }
.place-results { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.place-results li a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.place-results li span { color: var(--ink-2); font-size: var(--t-sm); }

/* Carte Leaflet des pages territoriales */
.local-map { position: relative; height: 560px; width: 100%; border-radius: var(--r-lg); overflow: hidden; background: var(--paper); border: 1px solid var(--rule); }
.local-map--choropleth { background: transparent; border: 0; }
@media (max-width: 640px) { .local-map { height: 420px; } }
/* Leaflet pose ses calques et contrôles en z-index 400 à 1000 : sans contexte d'empilement
   propre, la carte passait par-dessus l'en-tête collant et ses sous-menus (z-index 40). */
.leaflet-container { isolation: isolate; }
.local-map.leaflet-container, .local-map .leaflet-container { font: inherit; background: var(--paper); }
.local-map--choropleth.leaflet-container { background: transparent; }
.local-map .leaflet-control-attribution { font-size: 10px; background: color-mix(in srgb, var(--paper) 80%, transparent); color: var(--ink-3); }
.local-map .leaflet-bar a { background: var(--paper); color: var(--ink); border-color: var(--rule); }
.lf-shape { stroke: var(--map-stroke); }
.lf-shape--outline { stroke: var(--ink); fill: var(--brand); }
.lf-shape:hover { stroke: var(--ink); stroke-width: 1.6px; }
.lf-d0 { fill: var(--d0); } .lf-d1 { fill: var(--d1); } .lf-d2 { fill: var(--d2); } .lf-d3 { fill: var(--d3); } .lf-d4 { fill: var(--d4); } .lf-d5 { fill: var(--d5); }
.lf-nest { fill: var(--ink); stroke: var(--paper); }
.lf-nest--done { fill: var(--ok); }
.leaflet-tooltip.lf-tip { background: var(--ink); color: var(--ink-inverse); border: 0; border-radius: var(--r); padding: 8px 10px; font: 400 var(--t-xs)/1.4 var(--f-sans); box-shadow: var(--shadow-pop); }
.leaflet-tooltip.lf-tip::before { display: none; }
.leaflet-tooltip.lf-tip b { display: block; font-size: var(--t-sm); }
.leaflet-tooltip.lf-tip .mono { opacity: .8; }
.leaflet-tooltip.lf-tip--point { width: 230px; white-space: normal; }
.leaflet-tooltip.lf-tip--point span { display: block; margin-top: 2px; opacity: .85; }
.basemap-muted { filter: grayscale(1) contrast(.9) brightness(1.05); opacity: .8; }

/* --- Pages territoriales ------------------------------------------------ */
.local-head__lead { color: var(--ink); font-family: var(--f-serif); font-size: 1.25rem; max-width: 62ch; }
.seg a { padding: 7px 12px; border-radius: 4px; font: 500 var(--t-sm)/1 var(--f-sans); color: var(--ink-2); text-decoration: none; }
.seg a:hover { color: var(--ink); background: var(--ground-2); }
.seg a[aria-current] { background: var(--ink); color: var(--ink-inverse); }
.tile__icon { width: 22px; height: 22px; color: var(--brand-ink); display: block; }
.tile__icon svg { width: 22px; height: 22px; }
.trend .up { color: var(--danger); } .trend .good { color: var(--ok); }
.trend span { font: 500 var(--t-xs)/1.3 var(--f-mono); }
.band-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: center; padding: 28px 32px; border: 1px solid var(--ink); border-radius: var(--r-lg); background: var(--paper); }
@media (max-width: 760px) { .band-cta { grid-template-columns: 1fr; padding: 22px 20px; } }
.prose .dept-list { display: block; list-style: none; padding: 0; columns: 3 180px; column-gap: 28px; font-family: var(--f-sans); font-size: var(--t-sm); }
.prose .dept-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--rule); break-inside: avoid; margin: 0; }
.prose .dept-list li::before { display: none; }
.prose .specimen__img img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0; border-radius: 0; object-fit: cover; }
.prose .dept-list li span { white-space: nowrap; }
.byline__title { font: 600 var(--t-sm)/1.3 var(--f-sans); color: var(--ink); margin: 0; }
.field__error { font-size: var(--t-xs); color: var(--danger); font-weight: 500; }
.field--error .input { border-color: var(--danger); }

/* Introduction alignée sur la colonne du site mais à largeur de lecture : on borne
   les enfants, pas le .wrap (borné, il se recentrait ou collait au bord gauche). */
.wrap--lead > * { max-width: var(--lead, 900px); }

/* Demande de QR codes de pièges : présentation à gauche, formulaire à droite */
.qr-request { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); grid-template-areas: "intro form" "steps form"; gap: 0 56px; align-items: start; }
.qr-request__intro { grid-area: intro; } .qr-request__steps { grid-area: steps; max-width: 64ch; } .qr-request__form { grid-area: form; }
.qr-request__intro { display: grid; gap: 18px; max-width: 64ch; }
.qr-request__steps { margin-top: 26px; }
.qr-request__steps li { grid-template-columns: 40px minmax(0, 1fr); padding: 14px 0; }
.qr-request__form { gap: 18px; padding: 28px; position: sticky; top: 96px; }
/* Sur mobile, le formulaire passe avant les étapes : on n'a pas à défiler pour l'atteindre */
@media (max-width: 960px) { .qr-request { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "form" "steps"; gap: 28px; } .qr-request__steps { margin-top: 0; } .qr-request__form { position: static; } }

/* Besoins de financement (pages Dons et Mécénat) */
.projet { gap: 12px; }
.projet__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.projet__statut { padding: 3px 10px; font-size: var(--t-xs); font-weight: 600; }
.projet__statut--a_financer { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.projet__statut--en_service { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.projet__cout { color: var(--ink-2); padding-top: 10px; border-top: 1px solid var(--rule); margin-top: auto; }
.projet__cout b { color: var(--ink); font-weight: 600; }

/* ---------- Rapport de saison d'une commune ou d'un EPCI (/rapport/:token) ---------- */
.report-head { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; padding-block: 40px 40px; }
.report-head__text { display: grid; gap: 18px; }
.report-head__text .lead { margin: 0; }
.report-head__aside { border-color: var(--ink); gap: 14px; min-width: 0; }
.report-kpis { padding-top: 0; }
.report-map { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.report-map__figure { margin: 0; display: grid; gap: 12px; }
.report-map__text { display: grid; gap: 14px; align-content: start; }
.report-section { display: grid; gap: 28px; }
.report-section__head { display: grid; gap: 12px; max-width: 720px; }
.report-section__head p { margin: 0; }
.report-section tfoot th, .report-section tfoot td { font-weight: 700; border-top: 1px solid var(--ink); border-bottom: 0; }
.report-town { display: grid; gap: 10px; scroll-margin-top: 90px; }
.report-town__summary { margin: 0; }
.report-table td.report-table__place { white-space: normal; min-width: 220px; }
.report-notice { display: grid; gap: 18px; max-width: 720px; padding-block: 56px 96px; }
.report-notice p { margin: 0; }

/* ---------- Signaler par messagerie (public/_chatbot) ---------- */
.chatbot-links { display: grid; gap: 10px; }
.chatbot-links__text { margin: 0; font-size: var(--t-sm); color: var(--ink-2); }
.chatbot-links__text strong { color: var(--ink); }
.chatbot-links__row { display: flex; flex-wrap: wrap; gap: 8px; }
.chatbot-links__row .btn { gap: 8px; }
.ffaq .chatbot-links { margin-bottom: 16px; }

.projet__actions { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- Robot de signalement par messagerie (landings/report_by_message) ---------- */
.msg-btn { color: #fff; gap: 10px; }
.msg-btn--whatsapp { background: #1a9e4b; }
.msg-btn--whatsapp:hover { background: #158a41; color: #fff; }
.msg-btn--telegram { background: #1d8ac0; }
.msg-btn--telegram:hover { background: #1879aa; color: #fff; }
.msg-card { gap: 16px; }
.msg-card .btn { justify-self: start; }
.msg-card__head { display: flex; gap: 14px; align-items: center; }
.msg-card__head p { margin: 2px 0 0; }
.msg-card__logo { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.msg-card__logo--whatsapp { background: #25d366; }
.msg-card__logo--telegram { background: #229ed9; }
.msg-card__logo--sms { background: var(--ink); color: var(--ink-inverse); }
.msg-card__qr { margin: 0; display: flex; gap: 14px; align-items: center; padding-top: 14px; border-top: 1px solid var(--rule); }
.msg-card__qr svg { width: 104px; height: 104px; flex: none; background: #fff; padding: 6px; border-radius: 8px; border: 1px solid var(--rule); }
@media (hover: none) and (pointer: coarse) { .msg-card__qr { display: none; } }
.chat-mock { border: 1px solid var(--rule); border-radius: 22px; background: var(--paper); box-shadow: 0 18px 40px -24px rgb(0 0 0 / .35); overflow: hidden; max-width: 420px; justify-self: center; width: 100%; }
.chat-mock__head { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--rule); font-size: var(--t-sm); line-height: 1.3; }
.chat-mock__avatar { width: 36px; height: 36px; border-radius: 50%; }
.chat-mock__body { display: grid; gap: 8px; padding: 18px; background: var(--ground); font-size: var(--t-sm); line-height: 1.4; }
.chat-mock__body p { margin: 0; max-width: 82%; padding: 9px 13px; border-radius: 14px; }
.chat-mock__in { justify-self: start; background: var(--paper); border: 1px solid var(--rule); border-top-left-radius: 4px; }
.chat-mock__out { justify-self: end; background: var(--brand-soft); color: var(--ink); border-top-right-radius: 4px; display: inline-flex; gap: 6px; align-items: center; }
.chat-mock__out svg { flex: none; color: var(--brand-ink); }
.chat-mock__body .chat-mock__choices { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; max-width: none; }
.chat-mock__choices span { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--brand-ink); color: var(--brand-ink); font-size: var(--t-xs); }
@media (max-width: 860px) { .chat-mock { max-width: none; } }

/* Précisions après l'envoi, variante courte du formulaire (landings/_focus_complements, test A/B) */
.fcomplements { display: grid; gap: 12px; padding-top: 8px; }
.fcomplements__form { display: grid; gap: 22px; }
.fcomplements fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.fcomplements legend { font-weight: 600; font-size: var(--t-base); margin-bottom: 10px; }
.fcomplements .fopt { min-height: 52px; }
/* Bascule plan / topographique de la carte du lieu (report-flow) */
.fmap .leaflet-control-layers { font: inherit; font-size: var(--t-sm); border: 1px solid var(--rule-strong); border-radius: var(--r); box-shadow: none; }
.fmap .leaflet-control-layers-expanded { padding: 6px 10px; }
.fmap .leaflet-control-layers label { display: block; padding: 2px 0; cursor: pointer; }
/* Précisions une par écran (complements-flow) : numéro, question, réponses décalées */
.fcomplements__prog { position: static; height: 4px; margin-bottom: 4px; }
.fcstep legend { display: grid; gap: 4px; margin-bottom: 14px; }
.fcstep__count { font: 500 var(--t-xs, 12px)/1.2 var(--f-mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.fcstep__q { font: 600 var(--t-lg)/1.3 var(--f-sans); color: var(--ink); }
.fcstep + .fcstep { padding-top: 24px; border-top: 1px solid var(--rule); }
.fcstep[hidden] + .fcstep, .fcstep + .fcstep[hidden] { border-top: 0; }
.fcstep__acts { display: flex; align-items: center; gap: 12px; padding-top: 14px; }
.fcstep__sp { flex: 1; }

/* Suivi d'un signalement par son déclarant (public_reportings/show) : en-tête,
   étapes de la chaîne, photos et échanges à gauche ; fiche et confidentialité à droite */
.track { padding-block: 28px 72px; }
.track-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: end; padding-bottom: 28px; border-bottom: 1px solid var(--rule); }
.track-head__text { display: grid; gap: 10px; }
.track-head__ref { font-size: .82em; font-weight: 500; letter-spacing: 0; white-space: nowrap; }
.track-head__state { display: grid; gap: 6px; justify-items: end; margin: 0; }
.track-head__state .pill { font-size: var(--t-sm); padding: 5px 12px; }
@media (max-width: 640px) { .track-head { grid-template-columns: 1fr; } .track-head__state { justify-items: start; } }
.track-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: start; padding-top: 36px; }
@media (max-width: 960px) { .track-layout { grid-template-columns: 1fr; gap: 40px; } }
.track-main { display: grid; gap: 44px; min-width: 0; }
.track-block { display: grid; gap: 16px; }
.track-block__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.track-aside { display: grid; gap: 20px; position: sticky; top: 96px; }
@media (max-width: 960px) { .track-aside { position: static; } }
.track-card { border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 20px 22px; display: grid; gap: 14px; background: var(--paper); }
.track-card__title { font: 700 var(--t-xs)/1 var(--f-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.track-facts { display: grid; gap: 12px; margin: 0; }
.track-facts > div { display: grid; gap: 2px; }
.track-facts dt { font-size: var(--t-xs); color: var(--ink-2); }
.track-facts dd { margin: 0; font-size: var(--t-sm); overflow-wrap: anywhere; }
.track-support { display: grid; gap: 4px; color: var(--ink-2); }
.track-support strong { color: var(--ink); }
.track-support p { margin: 0; }
.track-support br { display: none; }

.track-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.track-steps__item { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding-bottom: 22px; }
.track-steps__item:last-child { padding-bottom: 0; }
.track-steps__item:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--rule); }
.track-steps__item--done:not(:last-child)::before { background: var(--ok); }
.track-steps__item > div { display: grid; gap: 2px; padding-top: 3px; }
.track-steps__item > div span { font-size: var(--t-sm); color: var(--ink-2); }
.track-steps__item > .pill, .track-steps__status { margin-top: 4px; }
.track-steps__status { color: var(--ok); font-weight: 600; }
.track-steps__dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--rule-strong); background: var(--paper); position: relative; }
.track-steps__dot svg { width: 16px; height: 16px; stroke-width: 2.5; }
.track-steps__item--done .track-steps__dot { background: var(--ok); border-color: var(--ok); color: var(--ink-inverse); }
.track-steps__item--current .track-steps__dot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.track-steps__item--current .track-steps__dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.track-steps__item--failed .track-steps__dot { background: var(--danger); border-color: var(--danger); color: var(--ink-inverse); }
.track-steps__item--todo b { color: var(--ink-2); font-weight: 500; }
.track-steps__item--todo > div span { color: var(--ink-3); }
@media (max-width: 640px) { .track-steps__item { grid-template-columns: 28px minmax(0, 1fr); } .track-steps__item > .pill, .track-steps__status { grid-column: 2; justify-self: start; margin-top: -8px; } }

.track-photos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.track-photos__media { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); background: var(--ground); cursor: zoom-in; }
video.track-photos__media { cursor: auto; }
.track-note { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--ground); border-radius: var(--r); }
.track-note p { margin: 0; max-width: 52ch; color: var(--ink-2); }

.track-comments { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.track-comments__item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; }
.track-comments__avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 var(--t-xs)/1 var(--f-sans); background: var(--ink); color: var(--ink-inverse); }
.track-comments__item--mine .track-comments__avatar { background: var(--brand-soft); color: var(--brand-ink); }
.track-comments__body { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 0 var(--r-lg) var(--r-lg) var(--r-lg); }
.track-comments__item--mine .track-comments__body { background: var(--ground); border-color: transparent; }
.track-comments__body p { margin: 0; }
.track-comments__body time { margin-left: 6px; }
.track-form { display: grid; gap: 14px; padding-top: 8px; border-top: 1px solid var(--rule); }
.track-form .field { padding-top: 16px; }
.track-upload { display: grid; gap: 12px; }
.track-upload[aria-busy="true"] .fdrop { opacity: .6; cursor: progress; }

/* Demande d'aide à la destruction (#593) : page du formulaire et bloc de la page de suivi */
.claim__wrap { max-width: 860px; display: grid; gap: 28px; }
.claim__head { display: grid; gap: 12px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.claim__form { display: grid; gap: 32px; }
.claim__group { border: 0; margin: 0; padding: 0; display: grid; gap: 14px; min-width: 0; }
.claim__group legend { padding: 0; margin-bottom: 4px; }
.claim__grid { gap: 16px 20px; }
.claim__grid .field { align-content: start; }
.claim__grid .select + .input { margin-top: 8px; }
.claim__honor { margin-top: 4px; }
.claim__done { display: grid; gap: 16px; max-width: 640px; }
.track-aid { display: grid; gap: 12px; }
.track-aid__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; align-items: center; padding: 16px 18px; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--paper); }
.track-aid__item > div { display: grid; gap: 4px; min-width: 0; }
.track-aid__item p { margin: 0; }
@media (max-width: 640px) { .track-aid__item { grid-template-columns: 1fr; } }

/* Téléphone en deux parties, indicatif et numéro (PhoneNumberHelper#phone_number_input) */
.phone-input { display: grid; grid-template-columns: 6.75rem minmax(0, 1fr); gap: 8px; }
.phone-input > .select { padding-inline: 10px; }
.phone-input > .select + .input { margin-top: 0; }
.phone-input:has(.input--lg) > .select { min-height: 54px; font-size: var(--t-md); }
