/* carbu.fr — feuille de style unique */
:root {
  --brand: #0b5d3b; --brand-2: #128153; --brand-soft: #e6f2ec; --accent: #f5b301;
  --ink: #14213d; --text: #1f2933; --muted: #5b6474; --line: #e2e6e1; --bg: #f6f7f4; --card: #fff;
  --lo: #127a43; --lo-bg: #e3f4ea; --hi: #b42318; --hi-bg: #fdecea; --mid: #475467; --old: #98a2b3;
  --radius: 12px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #3fbf84; --brand-2: #5fd39c; --brand-soft: #12301f; --ink: #eef2f6; --text: #d7dde4; --muted: #98a2b3;
    --line: #2a3340; --bg: #0f141a; --card: #171e26; --lo: #5fd39c; --lo-bg: #12301f; --hi: #ff8a7a; --hi-bg: #3a1714; --mid: #b8c0cc;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-2); }
h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin: .2em 0 .3em; }
h1 span { color: var(--muted); font-weight: 600; }
h2 { font-size: 1.3rem; margin: 1.8em 0 .6em; }
h3 { font-size: 1.05rem; margin: 0 0 .6em; }
small, .small { font-size: .85em; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--card); padding: 8px 12px; border-radius: 8px; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* ---------------------------------------------------------------- en-tête */
/* Plus de 1000 px : une ligne (logo, recherche, accès directs, bouton « Rubriques ») ; de 761 à 1000 px : logo et
   recherche, puis accès directs et bouton ; mobile : logo et « Menu », puis la recherche (accès directs dans le panneau).
   Seuils en em (62.5em = 1000 px, 47.5em = 760 px avec la police par défaut) et marge des ancres en rem : avec une police
   agrandie dans le navigateur, la mise en page compacte prend le relais au lieu d'un en-tête qui passe à la ligne.
   Sur mobile, le focus suit le DOM (logo, recherche, « Menu ») et non l'affichage (logo et « Menu », puis la recherche) :
   écart accepté, le panneau s'ouvrant sous la recherche.
   Le panneau est un <details> : il s'ouvre sans JavaScript, app.js n'ajoute que le confort (Échap, clic extérieur). */
.top { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
@media (prefers-color-scheme: dark) { .top { background: #0b2d1f; } }
.top-in { display: flex; align-items: center; gap: 8px 14px; min-height: 58px; flex-wrap: wrap; padding-top: 7px; padding-bottom: 7px; }
/* Ancres et focus clavier : la cible s'arrête sous l'en-tête collant (environ 104 px sur deux lignes, 58 px sur une,
   avec la police par défaut ; en rem pour suivre une police agrandie). Sur grand écran, au-delà d'environ 21 px de police,
   la ligne unique ne tient plus dans les 1140 px de .wrap et passe sur deux : le second terme du max() prend le relais
   (70 px à 16 px, 127 px à 22 px, 146 px à 24 px). */
html { scroll-padding-top: 7.25rem; }
@media (min-width: 65em) { html { scroll-padding-top: max(4.4rem, 9.5rem - 82px); } } /* marge pleine jusqu’à 1040 px : la barre peut y passer sur deux lignes selon la police */
.logo { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.logo:hover { color: #fff; }
.logo b { color: var(--accent); }
.logo-ico { width: 28px; height: 28px; color: #fff; }
.logo.small { color: var(--ink); font-size: 1.1rem; margin: 0 0 .5em; }
.logo.small .logo-ico { color: var(--brand); width: 22px; height: 22px; }
.search { position: relative; flex: 1 1 220px; max-width: 360px; display: flex; }
.search input { width: 100%; min-width: 0; border: 0; border-radius: 10px 0 0 10px; padding: 9px 12px; font: inherit; font-size: .95rem; background: #fff; color: #111; }
.search button { border: 0; background: var(--accent); color: #111; border-radius: 0 10px 10px 0; padding: 0 12px; cursor: pointer; }
.search button svg { width: 18px; height: 18px; display: block; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav > a, .menu > summary { color: #fff; text-decoration: none; padding: 8px 10px; border-radius: 8px; white-space: nowrap; font-size: .93rem; font-weight: 600; }
.nav > a:hover, .nav > a.on, .nav > a[aria-current], .menu > summary:hover, .menu[open] > summary { background: rgba(255, 255, 255, .14); color: #fff; }
.nav > a.on, .nav > a[aria-current] { box-shadow: inset 0 -2px var(--accent); }
.menu > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; user-select: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary span + span { display: none; }
.menu > summary::after { content: ""; width: 6px; height: 6px; margin: -4px 1px 0; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.menu[open] > summary::after { margin-top: 3px; transform: rotate(225deg); }
.top a:focus-visible, .menu > summary:focus-visible, .search :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Panneau : sous l'en-tête, aligné sur la colonne du site ; il défile s'il dépasse la hauteur de l'écran (100 % : celle de l'en-tête). */
.menu-p { position: absolute; top: 100%; left: 0; right: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 24px; padding: 18px max(16px, 50% - 554px) 22px; background: var(--card); color: var(--text); border-top: 1px solid var(--line); border-bottom: 1px solid transparent; box-shadow: 0 18px 36px rgba(16, 24, 40, .2); max-height: calc(100vh - 100%); max-height: calc(100dvh - 100%); overflow-y: auto; overscroll-behavior: contain; font-size: .93rem; }
.menu-p p { margin: 0; }
.menu-p > div > p:first-child { margin-bottom: 6px; color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.menu-p > .on > p:first-child { color: var(--brand); }
.menu-p ul { list-style: none; margin: 0; padding: 0; }
.menu-p li a { display: block; padding: 4px 0; color: var(--text); text-decoration: none; line-height: 1.3; }
.menu-p li a:hover { color: var(--brand); text-decoration: underline; }
.menu-p li a[aria-current], .menu-p li a.on { color: var(--brand); font-weight: 700; }
.menu-p a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.menu-q { display: none; }
/* Prix du jour par carburant : pastilles (dans le panneau et dans le pied de page). */
.fu { color: var(--muted); font-size: .85rem; }
.menu-p .fu { margin-bottom: 8px; }
.fu span { display: block; }
.fu a { display: inline-block; margin: 4px 4px 0 0; padding: 1px 8px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-weight: 700; text-decoration: none; }
.fu a:hover, .fu a[aria-current], .fu a.on { background: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .fu a:hover, .fu a[aria-current], .fu a.on { color: #052e1c; } }
/* Contraste forcé (Windows) : fonds et ombres disparaissent ; le bord transparent du panneau devient visible, le lien
   courant et la section sont soulignés, le bouton est encadré. */
@media (forced-colors: active) {
  .nav > a.on, .nav > a[aria-current], .menu-p a.on, .menu-p a[aria-current], .foot a[aria-current] { text-decoration: underline 2px; }
  .menu > summary { border: 1px solid ButtonText; }
  .menu > summary::before { forced-color-adjust: none; color: ButtonText; } /* traits et croix en dégradés : gardés */
}
@media (max-width: 62.5em) {
  .search { max-width: none; }
  .menu-p { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .menu-p > div:first-of-type { grid-row: span 2; }
}
@media (min-width: 47.5625em) and (max-width: 62.5em) {
  .nav { flex-basis: 100%; margin: 0 -10px; }
  .menu { margin-left: auto; }
  /* Recherche pleine largeur : les suggestions gardent une largeur de liste et laissent libre le bouton « Rubriques ». */
  .search .sugg { right: auto; width: min(100%, 420px); }
}
/* Mobile : en-tête de deux lignes (moins de 112 px), panneau en une colonne, cibles d'au moins 40 px. */
@media (max-width: 47.5em) {
  .top-in { gap: 8px 10px; min-height: 0; padding-top: 6px; padding-bottom: 8px; }
  .search { order: 1; flex-basis: 100%; }
  .nav > a { display: none; }
  .menu > summary { min-height: 40px; padding: 0 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }
  .menu > summary span { display: none; }
  .menu > summary span + span { display: inline; }
  .menu > summary::after { display: none; }
  .menu > summary::before { content: ""; width: 16px; height: 12px; background: linear-gradient(currentColor 0 0) top / 100% 2px no-repeat, linear-gradient(currentColor 0 0) center / 100% 2px no-repeat, linear-gradient(currentColor 0 0) bottom / 100% 2px no-repeat; }
  /* Panneau ouvert : la croix remplace les trois traits (il couvre l'écran, le bouton est le moyen de le refermer). */
  .menu[open] > summary::before { width: 14px; height: 14px; margin: 0 1px; background: linear-gradient(45deg, transparent calc(50% - 1px), currentColor 0 calc(50% + 1px), transparent 0), linear-gradient(-45deg, transparent calc(50% - 1px), currentColor 0 calc(50% + 1px), transparent 0); }
  .menu-p { display: block; padding: 10px 16px 18px; }
  .menu-p .menu-q { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
  .menu-q a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 4px 8px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-weight: 700; text-align: center; text-decoration: none; }
  .menu-q a.on, .menu-q a[aria-current] { box-shadow: inset 0 0 0 2px var(--brand); }
  .menu-p > div { padding: 12px 0 4px; border-top: 1px solid var(--line); }
  .menu-p > div:first-of-type { border-top: 0; }
  .menu-p ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
  .menu-p li a { display: flex; align-items: center; min-height: 44px; padding: 4px 0; }
  .menu-p .fu a { min-height: 40px; padding: 0 14px; line-height: 40px; }
}
.sugg { position: absolute; top: 100%; left: 0; right: 0; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .18); z-index: 60; max-height: 60vh; overflow: auto; }
.sugg li a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: inherit; }
.sugg li a:hover, .sugg li a.on { background: var(--brand-soft); }
.sugg small { color: var(--muted); }

/* ---------------------------------------------------------------- structure */
main { padding-bottom: 40px; min-height: 60vh; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 14px 0 0; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: var(--old); }
.crumbs a { color: var(--muted); }
.ph { margin: 10px 0 8px; }
.kicker { margin: 0; color: var(--muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kicker a { color: inherit; }
.lead { font-size: 1.05rem; color: var(--muted); margin: 0; }
.addr { margin: 0; font-size: 1.05rem; }
.prose { max-width: 820px; }
.prose p { margin: 0 0 .9em; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 0 28px; }
section { min-width: 0; }
.tags { margin: .5em 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .8rem; padding: 2px 9px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.tag.ok { background: #fff4cc; color: #7a5300; }
.tag.ko { background: var(--hi-bg); color: var(--hi); }
.warn { background: #fff4cc; color: #6b4900; padding: 10px 14px; border-radius: 10px; }
/* Le bandeau garde son fond clair dans les deux thèmes : le lien prend sa couleur de texte, pas la couleur de marque. */
.warn a { color: inherit; font-weight: 700; text-decoration: underline; }
.live-note { margin-top: .4em; }

/* ---------------------------------------------------------------- héros */
.hero { padding: 26px 0 6px; }
.hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); max-width: 18em; }
.hero-search { position: relative; display: flex; gap: 8px; max-width: 560px; margin: 18px 0 12px; }
.hero-search input { flex: 1; min-width: 0; font: inherit; font-size: 1.1rem; padding: 13px 16px; border-radius: 12px; border: 2px solid var(--brand); background: var(--card); color: var(--text); }

/* ---------------------------------------------------------------- boutons */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--brand-2); color: #fff; }
.btn.ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
/* Thème sombre : la marque est un vert clair, le texte blanc n'y serait pas lisible. */
@media (prefers-color-scheme: dark) { .btn:not(.ghost) { color: #052e1c; } }
.btn.ghost:hover { background: var(--brand-soft); }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------------- cartes de prix */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; margin: 12px 0; }
.card { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); border-top: 4px solid var(--fc, var(--line)); color: inherit; text-decoration: none; display: block; }
a.card:hover { transform: translateY(-1px); color: inherit; }
.card p { margin: 0; }
.card-h { font-weight: 700; color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: 6px; margin-bottom: 4px !important; }
.big { font-size: 1.75rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.big small { font-size: .5em; color: var(--muted); font-weight: 600; margin-left: 2px; }
.diff { font-weight: 700; font-size: .9rem; }
.lo { color: var(--lo); } .hi { color: var(--hi); } .mid { color: var(--mid); }
.fchip { display: inline-block; min-width: 2.6em; text-align: center; padding: 1px 6px; border-radius: 6px; background: var(--fc); color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .02em; }
.var { font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- tableaux */
.tbl-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin: 10px 0; }
/* Indice de défilement : une ombre apparaît sur le bord où le tableau dépasse (dégradés « local » qui la masquent aux extrémités). */
.tbl-wrap { background: linear-gradient(to right, var(--card) 30%, transparent) left / 40px 100% no-repeat local, linear-gradient(to left, var(--card) 30%, transparent) right / 40px 100% no-repeat local, radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .2), transparent) left / 14px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .2), transparent) right / 14px 100% no-repeat scroll, var(--card); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { font-size: .82rem; color: var(--muted); font-weight: 700; background: color-mix(in srgb, var(--card) 85%, var(--line)); position: sticky; top: 0; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--card) 92%, var(--brand)); }
th[scope=row] { font-weight: 600; }
@media (max-width: 600px) { .st-table th[scope=row] { min-width: 10.5em; } th, td { padding: 8px 8px; } }
th[scope=row] small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
td small { color: var(--muted); }
.num { text-align: right; white-space: nowrap; }
/* Bornes de recharge : sur mobile, le nom se coupe et la classe de puissance passe sous la valeur, pour que la puissance
   reste à l'écran ; la ligne visée par un marqueur de la carte est surlignée (elle s'arrête sous l'en-tête collant
   grâce au scroll-padding-top de html, défini avec l'en-tête). */
@media (max-width: 600px) { table.bornes th[scope=row] { overflow-wrap: anywhere; } table.bornes td.num small { display: block; } }
table.bornes tr:target { background: var(--brand-soft); }
table.sortable thead th { cursor: pointer; user-select: none; }
table.sortable thead th[aria-sort]::after { content: " ▾"; }
table.sortable thead th[aria-sort=ascending]::after { content: " ▴"; }
.pc { text-align: right; white-space: nowrap; font-weight: 700; }
.pc.lo .pv { background: var(--lo-bg); color: var(--lo); }
.pc.hi .pv { background: var(--hi-bg); color: var(--hi); }
.pc .pv { padding: 2px 6px; border-radius: 6px; }
.pc.old .pv, .pc.na { color: var(--old); font-weight: 500; }
.pc.upd .pv { outline: 2px solid var(--accent); }
.stale { display: block; font-size: .7rem; color: var(--old); font-weight: 500; }
.horaires th { width: 40%; }
.services { columns: 2 220px; padding-left: 1.1em; margin: 0; }
.services li { margin: 0 0 .3em; break-inside: avoid; }

/* ---------------------------------------------------------------- classements */
.tops { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.topbox { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.toplist { margin: 0; padding: 0; list-style: none; counter-reset: t; }
.toplist li { counter-increment: t; display: flex; align-items: baseline; gap: 6px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.toplist li::before { content: counter(t); min-width: 1.6em; color: var(--muted); font-size: .8rem; font-weight: 700; }
.toplist li a { font-weight: 600; }
.toplist li small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.toplist li b { margin-left: auto; font-variant-numeric: tabular-nums; }
.toplist.big { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 16px; columns: 2 380px; column-gap: 32px; }
.toplist.big li { break-inside: avoid; }
/* Colonnes partagées par toutes les lignes (subgrid) : libellés entiers, renvoyés à la ligne sur mobile, et barres de même longueur. */
.bars { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: fit-content(40%) minmax(40px, 1fr) auto; column-gap: 10px; }
.bars li { display: grid; grid-template-columns: minmax(0, 11em) 1fr auto; grid-template-columns: subgrid; grid-column: 1 / -1; gap: 0 10px; align-items: center; padding: 4px 0; font-size: .92rem; }
.bars li > :first-child { line-height: 1.25; overflow-wrap: anywhere; }
.bar { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--c) var(--w), color-mix(in srgb, var(--line) 60%, transparent) var(--w)); }
.bars b { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ---------------------------------------------------------------- graphiques */
figure { margin: 10px 0 16px; }
.chart { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 8px 6px; container-type: inline-size; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .gy line, .chart .gx line { stroke: var(--line); stroke-width: 1; }
.chart .gx line { stroke-dasharray: 2 4; }
/* Le SVG (viewBox de 720 de large) suit la largeur du graphique : plus il est étroit, plus le texte est grand, pour garder ~11 px à l'écran. */
.chart text { font-size: 11px; font-size: clamp(11px, calc(35px - 3.3cqw), 26px); fill: var(--muted); }
.chart .gy text { text-anchor: end; dominant-baseline: central; }
.chart .gx text { text-anchor: middle; }
/* Valeur finale de chaque courbe dans la couleur de sa série (--c), foncée ou éclaircie selon le thème pour rester lisible. */
.chart text.end { font-weight: 700; font-size: 11.5px; font-size: clamp(11.5px, calc(35.5px - 3.3cqw), 26px); dominant-baseline: central; fill: var(--c); }
@supports (color: color-mix(in srgb, red, red)) {
  .chart text.end { fill: color-mix(in srgb, var(--c) 70%, #000); }
  @media (prefers-color-scheme: dark) { .chart text.end { fill: color-mix(in srgb, var(--c) 55%, #fff); } }
}
/* Graphique étroit : valeurs finales plus espacées (placement calculé par lineChart), une graduation X sur deux si elles sont nombreuses. */
@container (max-width: 600px) { .chart text.end { translate: 0 calc(var(--dy, 0) * 1px); } }
@container (max-width: 520px) { .chart .gx.mi text { display: none; } }
/* Texte agrandi : la graduation Y la plus basse chevaucherait les libellés de l'axe X. */
@container (max-width: 600px) { .chart .gy.lo text { display: none; } }
figcaption { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .85rem; color: var(--muted); padding: 4px 8px; }
.lg i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.choro { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; }
.choro svg { width: 100%; height: auto; max-height: 520px; display: block; }
.choro path { stroke: var(--card); stroke-width: .8; transition: opacity .15s; }
.choro a:hover path { opacity: .7; }
.choro .lg i { height: 10px; width: 14px; }

/* ---------------------------------------------------------------- cartes interactives */
.map { min-height: 90px; height: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; margin: 12px 0; padding: 18px; }
.map.on { height: var(--h); padding: 0; display: block; overflow: hidden; }
.bigmap { height: min(72vh, 720px); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--card); }
/* Les calques Leaflet (z-index 400 à 1000) restent dans la carte : l'en-tête collant et le panneau des rubriques passent dessus. */
.map, .bigmap { isolation: isolate; }
.toolbar, .near-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0 14px; }
.near-form form { position: relative; display: flex; gap: 6px; flex: 1 1 300px; }
.near-form input, select, .calc input { font: inherit; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.near-form input { flex: 1; }
.leaflet-popup-content { font: 14px/1.4 system-ui, sans-serif; }
.leaflet-popup-content b { font-size: 1.1em; }

/* ---------------------------------------------------------------- calculateurs */
.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 18px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin: 14px 0; }
.calc label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.calc label:has(input[type=checkbox]) { flex-direction: row; align-items: center; gap: 8px; }
.calc-out { grid-column: 1 / -1; display: block; background: var(--brand-soft); border-radius: 10px; padding: 14px 16px; font-size: 1.05rem; color: var(--ink); }
.calc-out strong { font-size: 1.5rem; }

/* ---------------------------------------------------------------- divers */
.faq details { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); margin: 8px 0; padding: 0 16px; }
.faq summary { cursor: pointer; padding: 13px 0; font-weight: 700; color: var(--ink); }
.faq details > div { padding: 0 0 14px; }
.links ul { padding-left: 1.1em; }
.cols { columns: 4 190px; column-gap: 24px; }
.cols li { break-inside: avoid; margin: 0 0 .25em; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; margin: 28px 0; }
.feature { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; text-decoration: none; color: inherit; border-left: 4px solid var(--accent); }
.feature:hover { color: inherit; transform: translateY(-1px); }
.feature h3 { color: var(--brand); }
.feature p { margin: 0; color: var(--muted); }
.pager { display: flex; justify-content: space-between; gap: 10px; margin: 24px 0; font-weight: 600; }
.near-list .pc { font-size: 1.05rem; }

/* ---------------------------------------------------------------- pied de page */
/* Colonne de la marque, puis les groupes de src/render/nav.mjs en colonnes équilibrées (4, puis 3, puis 2 sur mobile). */
.foot { background: #0d1b14; color: #c9d4cc; margin-top: 40px; padding: 30px 0 18px; font-size: .92rem; }
.foot a { color: #e6efe9; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot a[aria-current] { color: #fff; font-weight: 700; }
.foot a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.foot .logo.small { color: #fff; }
.foot .logo.small .logo-ico { color: var(--accent); }
.foot-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 4fr); gap: 8px 32px; }
.foot-in p { margin: 0 0 .6em; }
.foot-g { columns: 4 160px; column-gap: 24px; overflow-wrap: break-word; }
.foot-g > div { break-inside: avoid; padding-bottom: 16px; }
.foot-g > div > p:first-child { color: #fff; font-weight: 700; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 0 0 .35em; }
.foot .fu, .foot .muted { color: #8fa197; }
.foot .fu a { padding: 1px 8px; background: rgba(255, 255, 255, .1); color: #e6efe9; text-decoration: none; }
.foot .fu a:hover, .foot .fu a[aria-current] { background: var(--accent); color: #111; }
.foot-credits { margin-top: 6px; margin-bottom: 0; padding-top: 14px; border-top: 1px solid #22352b; font-size: .8rem; color: #8fa197; }
.foot-credits a { text-decoration: underline; }
@media (max-width: 62.5em) { .foot-in { grid-template-columns: minmax(0, 1fr); } .foot-g { columns: 3 170px; } }
@media (max-width: 47.5em) { .foot-g { columns: 2; column-gap: 16px; } .foot li { margin: 0; } .foot li a { display: block; padding: 5px 0; } }

/* ---------------------------------------------------------------- plan du site */
.tree { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; overflow-x: auto; }
.tree ul { list-style: none; margin: 0; padding-left: 22px; position: relative; }
.tree > ul { padding-left: 0; }
.tree li { position: relative; padding: 5px 0 5px 14px; }
.tree li::before { content: ""; position: absolute; left: -8px; top: 0; bottom: 0; border-left: 2px solid var(--line); }
.tree li::after { content: ""; position: absolute; left: -8px; top: 17px; width: 18px; border-top: 2px solid var(--line); }
.tree li:last-child::before { bottom: auto; height: 17px; }
.tree > ul > li::before, .tree > ul > li::after { display: none; }
.tree a { font-weight: 600; }
.tree li > span:first-child { font-weight: 600; }
.cnt { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 99px; padding: 1px 8px; margin-left: 4px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.plan-reg { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; }
.plan-reg ul { list-style: none; padding: 0; margin: 0; font-size: .93rem; }
.plan-reg li { padding: 2px 0; }
.plan-more { font-size: .78rem; color: var(--muted); margin-left: 4px; }
.az { display: flex; flex-wrap: wrap; gap: 6px; }
.az a { display: inline-block; min-width: 1.9em; text-align: center; padding: 2px 6px; border-radius: 6px; background: var(--card); box-shadow: var(--shadow); text-decoration: none; font-weight: 700; }
.plan-coms { columns: 3 240px; column-gap: 24px; padding-left: 1.1em; }
.plan-coms li { break-inside: avoid; margin: 0 0 .3em; }
.plan h3 { margin: 1.2em 0 .4em; color: var(--brand); }

/* ---- controle-technique ---- */
tr.ct-grp th { background: var(--brand-soft); color: var(--brand); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding-top: 7px; padding-bottom: 7px; }

/* ---- parc-automobile ---- */
.parc-fig { margin: 6px 0 14px; }
.parc-barre { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--line); }
.parc-barre span { width: var(--w); background: var(--c); }
.parc-barre span + span { box-shadow: inset 1px 0 0 var(--card); }
.parc-fig figcaption { padding: 6px 0 0; }
.parc-fig .lg i, .cmp th .lg i { height: 10px; }

/* ---- crit-air ---- */
.ca { display: inline-flex; align-items: center; justify-content: center; min-width: 1.85em; height: 1.85em; padding: 0 .3em; border-radius: 99px; background: var(--ca); color: var(--ca-t, #fff); font-weight: 800; font-size: .85rem; line-height: 1; text-decoration: none; vertical-align: middle; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .1); }
a.ca:hover { color: var(--ca-t, #fff); filter: brightness(1.08); }
.ca.nc { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 2px var(--old); font-size: .7rem; }
.ca-big { min-width: 1.75em; height: 1.75em; font-size: 1.35rem; }
.ca-row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lead.ca-row { display: flex; gap: 10px; }
.ca-tbl td small, .ca-tbl th[scope=row] small { display: block; color: var(--muted); font-weight: 400; }
.ca-cards .card { border-top-width: 6px; }
.ca-nav { gap: 8px 16px; }
.ca-nav a, .ca-cur { display: inline-flex; align-items: center; gap: 6px; }
.ca-cur { font-weight: 700; }
.ca-calc .calc-out a { font-weight: 600; }
.ca-calc[hidden] { display: none; }

/* ---- frontieres ---- */
/* Sur mobile, les noms et adresses longs des stations se coupent pour que les colonnes de prix restent à l'écran. */
@media (max-width: 600px) { table.fr-tbl th[scope=row], table.fr-tbl td:not(.num) { overflow-wrap: anywhere; } }
/* ---- gnv ---- */
.gnv-tbl td small { display: block; color: var(--muted); font-size: .8rem; }
.gnv-tbl .tag { display: inline-block; line-height: 1.3; }
@media (max-width: 600px) { .gnv-tbl th[scope=row] { min-width: 9em; overflow-wrap: anywhere; } }
@media (max-width: 600px) { .gnv-cmp th, .gnv-cmp td { padding: 8px 5px; } .gnv-cmp thead th { white-space: normal; } }
/* ---- domicile-travail ---- */
/* Sur mobile, les noms longs des communes se coupent pour que les colonnes de chiffres restent à l'écran. */
@media (max-width: 600px) { table.dt-tbl th[scope=row] { overflow-wrap: anywhere; } }
/* ---- cout-possession ---- */
details.cp-regions { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); margin: 10px 0; padding: 0 16px; }
details.cp-regions summary { cursor: pointer; padding: 12px 0; font-weight: 700; }
details.cp-regions .tbl-wrap { margin-bottom: 12px; }
.toplist li[aria-current] { background: var(--brand-soft); }
/* ---- radars ---- */
.rad-avert { margin: 12px 0 16px; }
.rad-avert p { margin: 0; }
.rad-chart .rad-b path { fill: var(--brand); }
.rad-chart .rad-b:hover path { fill: var(--brand-2); }
.rad-chart .rad-x, .rad-chart .rad-v { text-anchor: middle; }
.rad-chart .rad-v { font-weight: 700; fill: var(--ink); }
.rad-det { margin: 0 0 12px; }
.rad-det summary { cursor: pointer; color: var(--brand); font-weight: 600; }
@media (max-width: 600px) { .rad-tbl th[scope=row] { min-width: 7.5em; overflow-wrap: anywhere; } }
/* ---- taxes ---- */
.tx-fig { margin: 8px 0 14px; }
.tx-barre { display: flex; height: 24px; border-radius: 6px; overflow: hidden; background: var(--line); }
.tx-barre span { width: var(--w); background: var(--c); }
.tx-barre span + span { box-shadow: inset 1px 0 0 var(--card); }
.tx-fig figcaption { padding: 6px 0 0; }
.tx-fig .lg i, .tx-stack .lg i { height: 10px; }
.tx-chg { margin: 8px 0 0; padding-left: 1.2em; font-size: .92rem; }
.tx-chg li { margin: 4px 0; }
@media (max-width: 600px) { .tx-tbl th, .tx-tbl td { padding: 8px 5px; } .tx-tbl thead th { white-space: normal; } .tx-tbl th[scope=row] { min-width: 6.5em; } .tx-tbl.tx-dates { font-size: .9rem; } .tx-tbl.tx-dates th[scope=row] { min-width: 0; } }
.tx-tbl td small { display: block; color: var(--muted); font-size: .78rem; font-weight: 400; }
/* Tableau d'un litre au dix-millième (cinq colonnes) : plus compact sur mobile. */
@media (max-width: 600px) { .tx-tbl.tx-litre { font-size: .86rem; } .tx-tbl.tx-litre th[scope=row] { min-width: 0; } }
/* ---- historique-long ---- */
.hl-tbl td small { display: block; color: var(--muted); font-size: .8rem; font-weight: 400; }
.hl-tbl tr.hl-cur { background: var(--brand-soft); }
@media (max-width: 600px) { .hl-tbl th, .hl-tbl td { padding: 8px 5px; } .hl-tbl thead th { white-space: normal; } }
@media (max-width: 400px) { .hl-tbl th, .hl-tbl td { padding: 7px 3px; font-size: .88rem; } .hl-tbl thead th { font-size: .76rem; } }

/* ---- accidents ---- */
/* Tableaux de la sécurité routière : sur mobile, le nom du département ou de la commune garde une largeur lisible et le
   tableau défile horizontalement (.tbl-wrap) plutôt que de couper le nom à chaque syllabe. */
@media (max-width: 600px) { table.acc-t th[scope=row] { min-width: 9em; } }
/* Mots composés et périodes jamais coupés au trait d'union dans les cartes (« outre-mer », « 2020-2024 »). */
.acc-nw { white-space: nowrap; }
/* ---- navigation : retouches ---- */
@media (forced-colors: active) { .foot .fu a[aria-current], .menu-p > .on > p:first-child { text-decoration: underline 2px; } }
@media (max-width: 19.5em) { .menu-p ul { grid-template-columns: 1fr; } }
