/* =====================================================================
   CalculAuto — Direction artistique « Grand Tourisme »
   Graphite profond, ivoire, vert anglais et touches de laiton.
   Typographies : Fraunces (titres) et Manrope (texte et interface).
   ===================================================================== */

/* ---------- Couleurs (mode clair « ivoire ») ---------- */
:root {
  --fond: #f4f2ec;
  --fond-2: #ebe7dd;
  --carte: #fffdf9;
  --texte: #16181d;
  --texte-doux: #5c5f67;
  --bordure: #e3ded2;
  --principal: #1d4d3c;
  --principal-vif: #2a6b53;
  --principal-clair: #e3ede7;
  --laiton: #b08a45;
  --laiton-texte: #86662b;
  --graphite: #111317;
  --ivoire: #f3efe6;
  --essence: #b0500e;
  --electrique: #1f5fb8;
  --e85: #527d14;
  --ombre: 0 1px 2px rgba(22, 24, 29, 0.04), 0 12px 32px -16px rgba(22, 24, 29, 0.18);
  --ombre-forte: 0 2px 4px rgba(22, 24, 29, 0.06), 0 24px 48px -20px rgba(22, 24, 29, 0.3);
  --rayon: 18px;
  --police-titre: "Fraunces", Georgia, "Times New Roman", serif;
  --police: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Mode sombre « graphite » ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #0d0f12;
    --fond-2: #13161a;
    --carte: #16191e;
    --texte: #ece8df;
    --texte-doux: #a2a3a8;
    --bordure: #272b32;
    --principal: #7fcca9;
    --principal-vif: #9adbbd;
    --principal-clair: #15302a;
    --laiton: var(--accent);
    --laiton-texte: var(--accent);
    --essence: #f0a060;
    --electrique: #7fb2f5;
    --e85: #a9d36a;
    --ombre: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -16px rgba(0, 0, 0, 0.6);
    --ombre-forte: 0 24px 48px -20px rgba(0, 0, 0, 0.7);
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--police);
  font-size: 16px;
  background: var(--fond);
  color: var(--texte);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--laiton); color: #111; }
a { color: var(--principal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--principal-vif); }
img, svg { max-width: 100%; }

.conteneur { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 480px) { .conteneur { padding: 0 16px; } }

/* Icônes (jeu icones.svg) */
.icone { width: 22px; height: 22px; flex: none; vertical-align: middle; }

/* ---------- Titres ---------- */
h1, h2, h3 { font-family: var(--police-titre); font-weight: 600; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.08; margin: 40px 0 12px; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.2; margin: 40px 0 14px; }
h3 { font-size: 1.15rem; }
.intro { color: var(--texte-doux); font-size: 1.12rem; max-width: 720px; margin-bottom: 28px; }
.titre-section { display: flex; align-items: center; gap: 14px; margin-top: 56px; }
.titre-section::after { content: ""; flex: 1; height: 1px; background: var(--bordure); }
.surtitre {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--laiton-texte); margin-bottom: 10px;
}

/* =====================================================================
   En-tête et navigation
   ===================================================================== */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(17, 19, 23, 0.92);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--ivoire);
}
header .conteneur {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; flex-wrap: wrap;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--police-titre); font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ivoire); text-decoration: none;
}
.logo:hover { color: #fff; }
.logo-texte span { color: var(--accent); }
.logo .icone { width: 26px; height: 26px; color: var(--accent); }

nav { display: flex; align-items: center; gap: 2px; }
nav > a, .nav-titre {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 999px;
  color: rgba(243, 239, 230, 0.82); text-decoration: none;
  font: 600 0.92rem var(--police); background: none; border: 0; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
nav > a:hover, .nav-titre:hover, .nav-groupe:focus-within .nav-titre { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav-titre .icone { width: 14px; height: 14px; transition: transform 0.25s; }

/* Menus déroulants (ordinateur) */
.nav-groupe { position: relative; }
.nav-panneau {
  position: absolute; top: calc(100% + 10px); left: 50%;
  width: 330px; padding: 10px;
  background: var(--carte); color: var(--texte);
  border: 1px solid var(--bordure); border-radius: 20px; box-shadow: var(--ombre-forte);
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.nav-panneau::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
.nav-groupe:hover .nav-panneau, .nav-groupe:focus-within .nav-panneau, .nav-groupe.ouvert .nav-panneau {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
.nav-groupe:hover .nav-titre .icone, .nav-groupe:focus-within .nav-titre .icone, .nav-groupe.ouvert .nav-titre .icone { transform: rotate(180deg); }
.nav-groupe.ouvert .nav-titre { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav-panneau a {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 12px; border-radius: 12px; text-decoration: none; color: var(--texte);
}
.nav-panneau a:hover { background: var(--fond); color: var(--texte); }
.nav-panneau .icone { color: var(--principal); margin-top: 2px; }
.nav-panneau strong { display: block; font-size: 0.95rem; }
.nav-panneau small { display: block; color: var(--texte-doux); font-size: 0.82rem; line-height: 1.35; }

/* Menu repliable (téléphone et tablette) */
.menu-case { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; }
.menu-bouton { display: none; }
@media (max-width: 960px) {
  .menu-bouton {
    display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer;
    padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.18); color: var(--ivoire);
  }
  .menu-case:focus-visible + .menu-bouton { outline: 2px solid var(--accent); }
  header nav {
    display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 6px 0 18px; max-height: calc(100vh - 70px); overflow-y: auto;
  }
  .menu-case:checked ~ nav { display: flex; }
  .nav-titre {
    width: 100%; justify-content: space-between; padding: 12px 4px 6px; border-radius: 0;
    color: var(--accent); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; cursor: default;
  }
  .nav-titre .icone { display: none; }
  .nav-groupe:hover .nav-titre, .nav-groupe:focus-within .nav-titre { background: none; color: var(--accent); }
  .nav-panneau {
    position: static; width: auto; opacity: 1; visibility: visible; transform: none;
    background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); box-shadow: none; padding: 4px;
  }
  .nav-groupe:hover .nav-panneau, .nav-groupe:focus-within .nav-panneau { transform: none; }
  .nav-panneau a { color: var(--ivoire); }
  .nav-panneau a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
  .nav-panneau small { color: rgba(243, 239, 230, 0.6); }
  .nav-panneau .icone { color: var(--accent); }
  nav > a { padding: 14px 4px; border-radius: 0; }
}

/* =====================================================================
   Pied de page
   ===================================================================== */
footer {
  margin-top: 80px; padding: 56px 0 32px;
  background: var(--graphite); color: rgba(243, 239, 230, 0.72);
  font-size: 0.9rem;
}
footer a { color: rgba(243, 239, 230, 0.85); text-decoration: none; }
footer a:hover { color: var(--accent); }
.pied-grille { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.pied-grille h3 { font-family: var(--police); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.pied-grille ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pied-grille .logo { margin-bottom: 12px; }
.pied-legal { border-top: 1px solid rgba(255, 255, 255, 0.08); margin-top: 40px; padding-top: 20px; font-size: 0.8rem; color: rgba(243, 239, 230, 0.5); }
.pied-legal p { margin: 4px 0; }
@media (max-width: 800px) { .pied-grille { grid-template-columns: 1fr 1fr; } .pied-grille > :first-child { grid-column: 1 / -1; } }

/* =====================================================================
   Cartes et grilles
   ===================================================================== */
.carte {
  background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon);
  padding: 24px; margin-bottom: 18px; box-shadow: var(--ombre);
}
@media (max-width: 480px) { .carte { padding: 18px; } }
.grille-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }
.grille-2 > .carte { margin-bottom: 0; }

.carte-lien {
  display: block; position: relative; text-decoration: none; color: inherit;
  transition: transform 0.25s cubic-bezier(.2,.7,.2,1), box-shadow 0.25s, border-color 0.25s;
}
.carte-lien:hover { transform: translateY(-4px); box-shadow: var(--ombre-forte); border-color: var(--laiton); color: inherit; }
.carte-lien h2 { margin-top: 8px; font-size: 1.25rem; }
.carte-lien p { color: var(--texte-doux); margin-bottom: 0; }
.carte-lien::after {
  content: "→"; position: absolute; right: 22px; top: 22px; font-size: 1.2rem;
  color: var(--laiton-texte); opacity: 0; transform: translateX(-6px); transition: 0.25s;
}
.carte-lien:hover::after { opacity: 1; transform: none; }
.emoji, .pastille-icone {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--principal-clair); color: var(--principal); font-size: 1.4rem;
}
.pastille-icone .icone { width: 24px; height: 24px; }

/* =====================================================================
   Formulaires
   ===================================================================== */
.champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px 18px; }
label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 6px; color: var(--texte); }
input, select {
  width: 100%; height: 48px; padding: 0 14px;
  font: 500 1rem var(--police); color: var(--texte);
  background: var(--fond); border: 1px solid var(--bordure); border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
input:hover, select:hover { border-color: color-mix(in srgb, var(--bordure) 50%, var(--texte-doux)); }
input:focus, select:focus {
  outline: none; border-color: var(--principal); background: var(--carte);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--principal) 18%, transparent);
}
select:disabled, input:disabled { opacity: 0.55; cursor: not-allowed; }
input[type=number] { font-variant-numeric: tabular-nums; }
.titre-essence { color: var(--essence); }
.titre-electrique { color: var(--electrique); }
.titre-e85 { color: var(--e85); }
.aide { font-size: 0.84rem; color: var(--texte-doux); margin-top: 8px; }

.choix-vehicule {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 16px;
  padding: 16px; margin-bottom: 18px; border-radius: 14px;
  background: var(--fond); border: 1px dashed var(--bordure);
}
.choix-vehicule .aide { grid-column: 1 / -1; margin: 0; }

.cases { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 16px; }
.case { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 0; cursor: pointer; }
.case input { width: 20px; height: 20px; accent-color: var(--principal); }

/* Boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; margin-top: 10px;
  background: var(--principal); color: #fff; border-radius: 999px;
  text-decoration: none; font-weight: 700; font-size: 0.96rem;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--principal) 80%, transparent);
}
.bouton:hover { background: var(--principal-vif); color: #fff; transform: translateY(-1px); }
.bouton:active { transform: translateY(1px); }
@media (prefers-color-scheme: dark) { .bouton, .bouton:hover { color: #0b1a14; } }
button.bouton { border: none; cursor: pointer; font-family: inherit; }
.bouton-secondaire, .bouton-secondaire:hover {
  background: transparent; color: var(--principal); box-shadow: none;
  border: 1px solid color-mix(in srgb, var(--principal) 40%, transparent) !important;
}
.bouton-secondaire:hover { background: var(--principal-clair); }
@media (prefers-color-scheme: dark) { .bouton-secondaire, .bouton-secondaire:hover { color: var(--principal); } }
.lien-bouton { background: none; border: none; padding: 0; font: inherit; color: var(--texte-doux); text-decoration: underline; cursor: pointer; }

/* =====================================================================
   Résultats : « tableau de bord »
   ===================================================================== */
.resultat-principal {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, #24453a 0%, var(--graphite) 55%);
  color: var(--ivoire); border-radius: 24px; padding: 28px 28px 24px; margin-bottom: 18px;
  box-shadow: var(--ombre-forte);
}
.resultat-principal::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.08;
  background: repeating-linear-gradient(115deg, transparent 0 22px, #fff 22px 23px);
  mask-image: linear-gradient(90deg, transparent 40%, #000);
  -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000);
}
.resultat-principal > * { position: relative; }
.resultat-principal > div:first-child { color: rgba(243, 239, 230, 0.75); font-weight: 600; }
.resultat-principal .gros {
  font-family: var(--police-titre); font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.05; margin: 8px 0 10px;
  color: #fff; font-variant-numeric: tabular-nums;
}
.resultat-principal .bouton-secondaire, .resultat-principal .bouton-secondaire:hover {
  color: var(--ivoire); border-color: rgba(255, 255, 255, 0.25) !important; background: rgba(255, 255, 255, 0.04);
}
.resultat-principal .bouton-secondaire:hover { background: rgba(255, 255, 255, 0.1); }
.resultat-principal a { color: var(--accent); }

.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.chiffre { background: var(--fond); border: 1px solid var(--bordure); border-radius: 14px; padding: 14px 16px; }
.chiffre .valeur { font-family: var(--police-titre); font-size: 1.45rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.chiffre .libelle { font-size: 0.8rem; color: var(--texte-doux); margin-top: 2px; }

.barre-ligne { margin: 14px 0; }
.barre-ligne .nom { font-size: 0.92rem; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.barre-fond { background: var(--fond-2); border-radius: 999px; height: 12px; overflow: hidden; }
.barre { height: 100%; border-radius: 999px; transition: width 0.6s cubic-bezier(.2,.7,.2,1); }

.legende { display: flex; flex-wrap: wrap; gap: 18px; font-size: 0.86rem; margin-bottom: 6px; color: var(--texte-doux); }
.legende i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }

/* Barre de résultat flottante (ajoutée par commun.js) */
.barre-resultat {
  position: fixed; left: 50%; bottom: 18px; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  width: max-content; max-width: min(560px, calc(100% - 32px)); padding: 10px 10px 10px 20px;
  background: var(--graphite); color: var(--ivoire);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; box-shadow: var(--ombre-forte);
  transform: translate(-50%, 160%); transition: transform 0.35s cubic-bezier(.2,.7,.2,1);
  cursor: pointer; font-size: 0.9rem;
}
.barre-resultat.visible { transform: translate(-50%, 0); }
.barre-resultat .br-texte { flex: 1; min-width: 0; color: rgba(243, 239, 230, 0.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre-resultat strong { font-family: var(--police-titre); font-size: 1.15rem; color: #fff; white-space: nowrap; }
.barre-resultat .br-bouton { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--accent); color: #111; font-weight: 700; font-size: 0.82rem; }

/* =====================================================================
   Tableaux
   ===================================================================== */
.tableau-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
th, td { padding: 11px 12px; text-align: right; border-bottom: 1px solid var(--bordure); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--texte-doux); font-weight: 700; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: color-mix(in srgb, var(--fond) 70%, transparent); }

.tableau-liste th, .tableau-liste td { text-align: left; white-space: normal; }
@media (max-width: 600px) {
  .tableau-liste thead { display: none; }
  .tableau-liste tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--bordure); }
  .tableau-liste td { border: none; padding: 0; }
  .tableau-liste td:first-child { font-weight: 700; }
  .tableau-liste td:nth-child(2) { grid-column: 2; grid-row: 1; color: var(--texte-doux); text-align: right; }
}
.tableau-modele th, .tableau-modele td { text-align: left; white-space: normal; vertical-align: top; }
.tableau-modele .detail { font-size: 0.8rem; color: var(--texte-doux); }
.liens-version { font-size: 0.86rem; line-height: 1.8; }
@media (max-width: 600px) {
  .tableau-modele thead { display: none; }
  .tableau-modele tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--bordure); }
  .tableau-modele td { display: block; border: none; padding: 2px 0; }
  .tableau-modele td.cout-annuel::before { content: "Énergie / an* : "; color: var(--texte-doux); }
  .liens-version br { display: none; }
  .liens-version a { display: inline-block; margin-right: 12px; }
}
.tableau-solutions td:first-child { font-weight: 700; }
.tableau-solutions tr.meilleure td { background: var(--principal-clair); }
.tableau-solutions tr.meilleure td:first-child { box-shadow: inset 3px 0 0 var(--laiton); }

/* =====================================================================
   Pastilles, verdicts, encadrés
   ===================================================================== */
.pastille { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.pastille.ok { background: var(--principal-clair); color: var(--principal); }
.pastille.peut-etre { background: #f8edd8; color: #7d5608; }
.pastille.non { background: #f8e3e1; color: #9b2b23; }
@media (prefers-color-scheme: dark) {
  .pastille.peut-etre { background: #3a2f17; color: #f0d293; }
  .pastille.non { background: #3b1d1b; color: #f3aaa4; }
}
.verdict { padding: 14px 18px; border-radius: 14px; font-weight: 600; margin-top: 16px; border: 1px solid; }
.verdict.ok { background: var(--principal-clair); border-color: color-mix(in srgb, var(--principal) 35%, transparent); color: var(--texte); }
.verdict.peut-etre { background: #f8edd8; border-color: #e3c88f; color: #5c3f05; }
.verdict.non { background: #f8e3e1; border-color: #e6aaa4; color: #6e1c16; }
@media (prefers-color-scheme: dark) {
  .verdict.peut-etre { background: #3a2f17; border-color: #5e4b22; color: #f3d9a4; }
  .verdict.non { background: #3b1d1b; border-color: #5d2a26; color: #f5b7b1; }
}

.partenaire {
  border: 1px solid var(--laiton); border-radius: var(--rayon); padding: 22px 24px; margin: 18px 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--laiton) 10%, var(--carte)), var(--carte));
}
.partenaire .badge, .ma-voiture .badge { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--laiton-texte); font-weight: 700; }
.ma-voiture { border-color: color-mix(in srgb, var(--laiton) 60%, var(--bordure)); }
.ma-voiture .detail { font-family: var(--police); font-size: 0.95rem; font-weight: 500; color: var(--texte-doux); }

.appel-calculateur {
  background: linear-gradient(135deg, var(--principal-clair), color-mix(in srgb, var(--principal-clair) 40%, var(--carte)));
  border: 1px solid color-mix(in srgb, var(--principal) 25%, transparent);
  border-radius: var(--rayon); padding: 24px 26px; margin: 28px 0;
}
.appel-calculateur p { margin: 0 0 6px; }
.appel-calculateur strong { font-family: var(--police-titre); font-size: 1.2rem; font-weight: 600; }

.en-bref {
  background: var(--carte); border: 1px solid var(--bordure); border-left: 3px solid var(--laiton);
  border-radius: 14px; padding: 18px 22px; margin: 22px 0; box-shadow: var(--ombre);
}
.en-bref > strong:first-child { display: block; margin-bottom: 8px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--laiton-texte); }
.en-bref ul { margin: 0; padding-left: 20px; }
.en-bref li { margin: 4px 0; }

.fil-ariane { font-size: 0.85rem; color: var(--texte-doux); margin: 24px 0 -20px; }
.fil-ariane a { text-decoration: none; color: var(--texte-doux); }
.fil-ariane a:hover { color: var(--principal); }

.aide-depliable { margin-top: 14px; font-size: 0.94rem; }
.aide-depliable summary, .faq summary {
  cursor: pointer; font-weight: 700; color: var(--principal); list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.aide-depliable summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.aide-depliable summary::after, .faq summary::after { content: "+"; font-size: 1.3rem; font-weight: 400; transition: transform 0.2s; }
.aide-depliable[open] summary::after, .faq[open] summary::after { transform: rotate(45deg); }
.aide-depliable ul { padding-left: 18px; margin: 6px 0 12px; }
.faq { border-bottom: 1px solid var(--bordure); padding: 16px 0; }
.faq summary { color: var(--texte); }
.faq p { margin: 10px 0 0; color: var(--texte-doux); }

/* =====================================================================
   Stations, bornes, suggestions
   ===================================================================== */
.recherche-stations { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.recherche-stations > div { flex: 1 1 180px; }
.recherche-stations .bouton { margin-top: 0; }
.message-stations { margin: 18px 0 6px; font-weight: 700; }
.station {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center;
  padding: 14px 4px; border-bottom: 1px solid var(--bordure);
}
.station:last-child { border-bottom: none; }
.station .lieu { font-weight: 700; }
.station .detail { font-size: 0.84rem; color: var(--texte-doux); }
.station .prix { font-family: var(--police-titre); font-size: 1.35rem; font-weight: 600; color: var(--e85); text-align: right; font-variant-numeric: tabular-nums; }
.station .prix-borne { font-family: var(--police); font-size: 0.84rem; font-weight: 600; color: var(--electrique); max-width: 150px; }
.station button { grid-column: 1 / -1; justify-self: start; min-height: 36px; padding: 0 14px; font-size: 0.84rem; margin-top: 6px; }

.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.suggestions a, .pastille-lien {
  display: inline-block; padding: 7px 14px; border: 1px solid var(--bordure); border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 0.9rem; color: var(--texte); background: var(--carte);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.suggestions a:hover, .pastille-lien:hover { border-color: var(--laiton); color: var(--principal); transform: translateY(-1px); }
.pastille-lien { margin: 0 6px 8px 0; }
.pastille-lien[hidden] { display: none; }
.suggestions .aide { margin: 0; }

/* =====================================================================
   Articles
   ===================================================================== */
.article { max-width: 760px; }
.article .meta { color: var(--texte-doux); font-size: 0.86rem; margin-bottom: 22px; }
.article p, .article li { font-size: 1.05rem; }
.contenu h2 { margin-top: 44px; }
.contenu p, .contenu li { line-height: 1.7; }
.article table { margin: 12px 0; }
.article td, .article th { white-space: normal; }

/* =====================================================================
   Accueil
   ===================================================================== */
.hero {
  position: relative; overflow: hidden; color: var(--ivoire);
  background:
    radial-gradient(70% 90% at 85% 30%, rgba(42, 107, 83, 0.45), transparent 60%),
    radial-gradient(60% 60% at 10% 100%, rgba(176, 138, 69, 0.18), transparent 60%),
    linear-gradient(180deg, #111317 0%, #0c0e11 100%);
  padding: 56px 0 0;
}
.hero-grille { display: grid; grid-template-columns: 1fr 1.15fr; gap: 24px; align-items: center; }
.hero-visuel .scene { transform-origin: 40% 60%; }
@media (min-width: 861px) { .hero-visuel { margin-right: -60px; } }
.hero h1 { color: #fff; margin: 6px 0 16px; font-size: clamp(2.4rem, 5.6vw, 4rem); line-height: 1.02; }
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 500; }
.hero .surtitre { color: var(--accent); }
.hero .intro { color: rgba(243, 239, 230, 0.75); }
.hero-recherche { position: relative; max-width: 520px; }
.hero-recherche > .icone { position: absolute; left: 18px; top: 16px; color: #5c5f67; pointer-events: none; }
.hero-recherche input {
  height: 54px; padding-left: 50px; border-radius: 999px; font-size: 1.02rem;
  background: var(--ivoire); border-color: transparent; color: #16181d;
}
.hero-recherche input:focus { background: #fff; }
.hero .suggestions a { background: rgba(255, 255, 255, 0.06); color: var(--ivoire); border-color: rgba(255, 255, 255, 0.14); }
.hero .suggestions a:hover { color: #fff; border-color: var(--accent); }
.hero .suggestions .aide, .hero .suggestions .aide a { color: rgba(243, 239, 230, 0.65); }
.hero-confiance { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 22px 0 0; padding: 0; list-style: none; color: rgba(243, 239, 230, 0.6); font-size: 0.86rem; }
.hero-confiance li::before { content: "✓"; color: var(--accent); margin-right: 8px; font-weight: 700; }

/* Voiture en relief : profondeur qui suit la souris, roues et route animées */
.hero-visuel { perspective: 1100px; }
.scene { position: relative; transform-style: preserve-3d; transition: transform 0.25s ease-out; will-change: transform; }
.scene svg { display: block; width: 100%; height: auto; overflow: visible; }
.roue-rayons { transform-box: fill-box; transform-origin: center; animation: tourner 1.1s linear infinite; }
.trait-route { animation: defiler 0.9s linear infinite; }
.reflet { animation: reflet 6s ease-in-out infinite; }
@keyframes tourner { to { transform: rotate(360deg); } } /* sens horaire : la voiture roule vers la droite */
@keyframes defiler { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 120; } }
@keyframes reflet { 0%, 100% { opacity: 0; transform: translateX(-160px); } 50% { opacity: 0.22; transform: translateX(160px); } }

/* Tableau de bord des prix du jour */
.tableau-bord {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 44px;
  background: rgba(255, 255, 255, 0.08); border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.jauge { background: #0e1013; padding: 20px 22px; display: flex; align-items: center; gap: 16px; }
.jauge svg { width: 58px; height: 40px; flex: none; }
.jauge .valeur { font-family: var(--police-titre); font-size: 1.6rem; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.1; }
.jauge .libelle { font-size: 0.8rem; color: rgba(243, 239, 230, 0.6); }
.jauge-aiguille { transition: transform 1.4s cubic-bezier(.2,.7,.2,1); transform-origin: 29px 34px; transform: rotate(-90deg); }

@media (max-width: 860px) {
  .hero { padding-top: 28px; }
  .hero-grille { grid-template-columns: 1fr; gap: 8px; }
  .hero-visuel { order: -1; max-width: 440px; margin: 0 auto; width: 100%; }
}
@media (max-width: 560px) {
  .tableau-bord { grid-template-columns: 1fr; margin-top: 32px; }
  .jauge { padding: 14px 18px; }
}

/* Parcours (« Que voulez-vous faire ? ») */
.parcours { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .parcours { grid-template-columns: 1fr; } }
.parcours .carte { display: flex; flex-direction: column; margin: 0; padding: 26px; transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s; }
.parcours .carte:hover { transform: translateY(-4px); box-shadow: var(--ombre-forte); border-color: var(--laiton); }
.parcours h3 { font-size: 1.4rem; margin: 18px 0 6px; }
.parcours p { color: var(--texte-doux); margin: 0 0 18px; }
.parcours .bouton { align-self: flex-start; margin: 0 0 18px; }
.parcours .liens-rapides { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--bordure); }
.parcours .liens-rapides a { font-size: 0.84rem; padding: 5px 12px; }

.outils { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
@media (max-width: 400px) { .outils { grid-template-columns: 1fr; } }
.outil {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--carte); border: 1px solid var(--bordure); border-radius: 14px;
  text-decoration: none; color: var(--texte); font-weight: 700;
  transition: border-color 0.2s, transform 0.2s;
}
.outil:hover { border-color: var(--laiton); transform: translateY(-2px); color: var(--texte); }
.outil .icone { color: var(--principal); width: 24px; height: 24px; }
.outil small { display: block; font-weight: 500; color: var(--texte-doux); font-size: 0.8rem; }

.bandeau-prix .chiffres { grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* =====================================================================
   Animations d'apparition (ajoutées par commun.js)
   ===================================================================== */
.apparition { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.7,.2,1); }
.apparition.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .apparition { opacity: 1; transform: none; }
}

/* Texte réservé aux lecteurs d'écran */
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero + main .titre-section:first-of-type { margin-top: 48px; }

/* =====================================================================
   Accueil : simulateur, chiffres clés, étapes, sources, partenaires
   ===================================================================== */
.simulateur { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; padding: 0; overflow: hidden; margin-top: 36px; }
.simulateur-texte { padding: 30px; }
.simulateur-texte h2 { margin: 0 0 6px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.simulateur .choix-vehicule { margin: 18px 0; }
.simulateur-resultat {
  display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 30px;
  background: radial-gradient(120% 120% at 100% 0%, #24453a, var(--graphite) 60%); color: var(--ivoire);
}
.sr-libelle { color: rgba(243, 239, 230, 0.7); font-weight: 600; }
.sr-chiffre { font-family: var(--police-titre); font-size: clamp(2.6rem, 6vw, 3.6rem); font-weight: 600; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.sr-detail { color: rgba(243, 239, 230, 0.75); font-size: 0.92rem; margin-bottom: 8px; }
.simulateur-resultat .bouton { align-self: flex-start; background: var(--accent); color: #111; box-shadow: none; }
.simulateur-resultat .bouton:hover { background: var(--accent-vif); color: #111; }
@media (max-width: 820px) { .simulateur { grid-template-columns: 1fr; } .simulateur-texte, .simulateur-resultat { padding: 22px; } }

.curseur { -webkit-appearance: none; appearance: none; height: 6px; padding: 0; border: 0; border-radius: 999px; background: var(--fond-2); margin: 14px 0 4px; accent-color: var(--principal); }
.curseur::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--principal); border: 3px solid var(--carte); box-shadow: var(--ombre); cursor: grab; }
.curseur::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--principal); border: 3px solid var(--carte); cursor: grab; }
.curseur:focus { box-shadow: none; background: var(--fond-2); }
.curseur:focus-visible::-webkit-slider-thumb { outline: 3px solid color-mix(in srgb, var(--principal) 35%, transparent); }

.chiffres-cles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 28px 0 8px; background: var(--bordure); border: 1px solid var(--bordure); border-radius: var(--rayon); overflow: hidden; }
.chiffres-cles > div { background: var(--carte); padding: 22px 20px; }
.chiffres-cles strong { display: block; font-family: var(--police-titre); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; color: var(--principal); font-variant-numeric: tabular-nums; }
.chiffres-cles span { color: var(--texte-doux); font-size: 0.88rem; }
@media (max-width: 760px) { .chiffres-cles { grid-template-columns: 1fr 1fr; } }

.etapes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: etape; }
.etapes li { position: relative; padding: 24px; background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon); }
.etapes h3 { margin: 14px 0 6px; }
.etapes p { margin: 0; color: var(--texte-doux); }
.etape-num { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--laiton); color: var(--laiton-texte); font-family: var(--police-titre); font-weight: 600; }
@media (max-width: 820px) { .etapes { grid-template-columns: 1fr; } }

.sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.sources > div { padding: 16px 18px; border-left: 2px solid var(--laiton); background: var(--carte); border-radius: 0 12px 12px 0; }
.sources strong { display: block; }
.sources span { color: var(--texte-doux); font-size: 0.86rem; }

.bande-partenaire {
  margin-top: 72px; padding: 64px 0; color: var(--ivoire);
  background: radial-gradient(60% 120% at 0% 0%, rgba(176, 138, 69, 0.22), transparent 60%), linear-gradient(180deg, #111317, #0c0e11);
}
.bande-grille { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.bande-partenaire h2 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 6px 0 14px; }
.bande-partenaire p { color: rgba(243, 239, 230, 0.75); }
.bande-partenaire .surtitre { color: var(--accent); }
.bouton-laiton, .bouton-laiton:hover { background: var(--accent); color: #111; box-shadow: none; }
.bouton-laiton:hover { background: var(--accent-vif); }
.atouts { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.atouts li { padding: 18px 20px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 14px; background: rgba(255, 255, 255, 0.03); }
.atouts strong { display: block; color: #fff; }
.atouts span { color: rgba(243, 239, 230, 0.65); font-size: 0.9rem; }
@media (max-width: 860px) { .bande-grille { grid-template-columns: 1fr; } }
.bande-partenaire + .conteneur + footer, .bande-partenaire ~ footer { margin-top: 56px; }

/* Formulaire partenaires */
textarea { width: 100%; min-height: 130px; padding: 12px 14px; font: 500 1rem var(--police); color: var(--texte); background: var(--fond); border: 1px solid var(--bordure); border-radius: 12px; resize: vertical; }
textarea:focus { outline: none; border-color: var(--principal); background: var(--carte); box-shadow: 0 0 0 4px color-mix(in srgb, var(--principal) 18%, transparent); }
.pot-de-miel { position: absolute; left: -9999px; }

.hero-court { padding: 64px 0 56px; }
.hero-court h1 { max-width: 820px; }
.hero-court .intro { max-width: 680px; }

/* =====================================================================
   Couche « 2026 » : effets modernes, tous optionnels
   (les navigateurs qui ne les connaissent pas affichent simplement le site normal)
   ===================================================================== */

/* Transitions fluides entre les pages, l'en-tête reste en place */
@view-transition { navigation: auto; }
header { view-transition-name: entete; }
::view-transition-old(root) { animation: 0.22s ease both sortie-page; }
::view-transition-new(root) { animation: 0.32s cubic-bezier(.2,.7,.2,1) both entree-page; }
@keyframes sortie-page { to { opacity: 0; transform: translateY(-6px); } }
@keyframes entree-page { from { opacity: 0; transform: translateY(10px); } }

/* Lueur d'ambiance en haut des pages et grain très léger */
body { background-image: radial-gradient(70% 420px at 50% -140px, color-mix(in srgb, var(--principal) 12%, transparent), transparent); background-repeat: no-repeat; }
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Barre de progression de lecture, pilotée par le défilement */
@supports (animation-timeline: scroll()) {
  header::after {
    content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
    background: linear-gradient(90deg, var(--laiton), var(--accent-vif));
    transform-origin: left; transform: scaleX(0);
    animation: progression linear both; animation-timeline: scroll(root);
  }
  @keyframes progression { to { transform: scaleX(1); } }

  /* Apparition des blocs au défilement, sans JavaScript */
  main .carte, main .outil, main .etapes li, main .sources > div, .atouts li {
    animation: monte linear both; animation-timeline: view(); animation-range: entry 0% entry 40%;
  }
  @keyframes monte { from { opacity: 0; transform: translateY(24px) scale(0.985); } }
  .apparition { opacity: 1; transform: none; } /* la version CSS remplace la version JavaScript */
}

/* Halo lumineux qui suit la souris sur les cartes (position fournie par commun.js) */
.carte, .outil, .etapes li { --mx: 50%; --my: 50%; }
@media (hover: hover) {
  .carte-lien, .outil, .parcours .carte, .etapes li, .simulateur-texte { position: relative; }
  .carte-lien::before, .outil::before, .parcours .carte::before, .etapes li::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
    background: radial-gradient(360px circle at var(--mx) var(--my), color-mix(in srgb, var(--laiton) 16%, transparent), transparent 60%);
    transition: opacity 0.3s;
  }
  .carte-lien:hover::before, .outil:hover::before, .parcours .carte:hover::before, .etapes li:hover::before { opacity: 1; }
}

/* Bordure dégradée animée au survol des cartes principales */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.parcours .carte:hover, .simulateur:hover {
  border-color: transparent;
  background:
    linear-gradient(var(--carte), var(--carte)) padding-box,
    conic-gradient(from var(--angle), var(--laiton), var(--principal), var(--accent-vif), var(--laiton)) border-box;
  animation: tour-bordure 4s linear infinite;
}
.simulateur:hover { background: linear-gradient(var(--carte), var(--carte)) padding-box, conic-gradient(from var(--angle), var(--laiton), var(--principal), var(--accent-vif), var(--laiton)) border-box; }
@keyframes tour-bordure { to { --angle: 360deg; } }

/* Titres de page : léger dégradé métallique sur les grands titres */
main > h1:first-child, main > .fil-ariane + h1 {
  background: linear-gradient(180deg, var(--texte) 30%, color-mix(in srgb, var(--texte) 65%, var(--laiton)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Boutons : reflet qui traverse au survol */
.bouton { position: relative; overflow: hidden; isolation: isolate; }
.bouton::after {
  content: ""; position: absolute; inset: 0; z-index: -1; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.28), transparent 70%);
  transition: transform 0.6s ease;
}
.bouton:hover::after { transform: translateX(120%); }

/* Champs : légère lueur à la saisie */
input:focus, select:focus, textarea:focus { transition: box-shadow 0.25s, border-color 0.25s, background 0.25s; }

/* Barre de défilement et focus clavier assortis */
html { scrollbar-color: color-mix(in srgb, var(--laiton) 60%, transparent) transparent; scrollbar-width: thin; }
:focus-visible { outline: 2px solid var(--laiton); outline-offset: 3px; border-radius: 6px; }

/* Résultat « tableau de bord » : léger relief verre */
.resultat-principal, .simulateur-resultat { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--ombre-forte); }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  header::after { display: none; }
}

/* =====================================================================
   Calculateurs en deux colonnes (ordinateur) : saisie à gauche, résultat fixe à droite
   ===================================================================== */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); gap: 24px; align-items: start; }
.calc-saisie > :last-child { margin-bottom: 0; }
.calc-resultat { position: sticky; top: 84px; display: grid; gap: 16px; }
.calc-resultat > * { margin: 0 !important; }
.calc-resultat .resultat-principal .gros { font-size: clamp(2rem, 3.2vw, 2.8rem); }
.calc-resultat .chiffres { grid-template-columns: 1fr 1fr; }
.calc-resultat .chiffre .valeur { font-size: 1.25rem; }
.calc + * { margin-top: 24px; }
.calc-attente { text-align: left; border-style: dashed; }
#resultat-trajet:not([hidden]) ~ .calc-attente { display: none; }
#resultat-trajet { display: grid; gap: 16px; }
#resultat-trajet[hidden] { display: none; }
#resultat-trajet > * { margin: 0; }
@media (max-width: 1023px) {
  .calc { display: block; }
  .calc-resultat { position: static; display: block; }
  .calc-resultat > * { margin: 0 0 18px !important; }
  .calc-attente { display: none; }
}

/* =====================================================================
   Accueil animé
   ===================================================================== */

/* Ouverture : le texte apparaît ligne par ligne */
.hero h1 .ligne { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero h1 .ligne > span { display: inline-block; animation: monte-ligne 0.9s cubic-bezier(.2,.8,.2,1) both; }
.hero h1 .ligne:nth-child(2) > span { animation-delay: 0.12s; }
@keyframes monte-ligne { from { transform: translateY(105%); } }
.hero .surtitre, .hero .intro, .hero-recherche, .hero-confiance, .hero .suggestions {
  animation: fondu-haut 0.8s cubic-bezier(.2,.8,.2,1) both;
}
.hero .surtitre { animation-delay: 0s; }
.hero .intro { animation-delay: 0.25s; }
.hero-recherche { animation-delay: 0.38s; }
.hero-confiance { animation-delay: 0.5s; }
@keyframes fondu-haut { from { opacity: 0; transform: translateY(14px); } }

/* La voiture arrive de la gauche, puis « respire » doucement */
.hero-visuel { animation: arrivee-voiture 1.6s cubic-bezier(.16,.84,.24,1) 0.15s both; }
@keyframes arrivee-voiture {
  from { opacity: 0; transform: translateX(-38%); filter: blur(6px); }
  60% { filter: blur(0); }
}
.scene svg { animation: suspension 3.2s ease-in-out 1.8s infinite; }
@keyframes suspension { 50% { transform: translateY(-2px); } }
.vitesse line { animation: trait-vitesse 1.1s linear infinite; }
.vitesse line:nth-child(2) { animation-duration: 0.8s; animation-delay: 0.3s; }
.vitesse line:nth-child(3) { animation-duration: 1.4s; animation-delay: 0.6s; }
@keyframes trait-vitesse { from { transform: translateX(120px); opacity: 0; } 30% { opacity: 1; } to { transform: translateX(-140px); opacity: 0; } }

/* Lueur d'ambiance du hero qui se déplace lentement */
.hero::before {
  content: ""; position: absolute; inset: -20%; pointer-events: none;
  background: radial-gradient(35% 45% at 70% 40%, rgba(42, 107, 83, 0.35), transparent 70%);
  animation: aurore 14s ease-in-out infinite alternate;
}
.hero > * { position: relative; }
@keyframes aurore { to { transform: translate(-12%, 8%) scale(1.15); } }

/* Compteurs de prix : apparition décalée */
.tableau-bord .jauge { animation: fondu-haut 0.7s cubic-bezier(.2,.8,.2,1) both; }
.tableau-bord .jauge:nth-child(1) { animation-delay: 0.6s; }
.tableau-bord .jauge:nth-child(2) { animation-delay: 0.72s; }
.tableau-bord .jauge:nth-child(3) { animation-delay: 0.84s; }
.jauge { transition: background 0.3s; }
.jauge:hover { background: #15181d; }

/* Bandeau défilant des marques */
.bandeau-marques { margin: 40px 0 8px; text-align: center; }
.bandeau-marques .surtitre { margin-bottom: 14px; }
.defilement {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.piste { display: flex; width: max-content; gap: 44px; animation: defile-marques 40s linear infinite; }
.defilement:hover .piste { animation-play-state: paused; }
.piste a {
  font-family: var(--police-titre); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em;
  color: color-mix(in srgb, var(--texte) 45%, transparent); text-decoration: none; white-space: nowrap; transition: color 0.2s;
}
.piste a:hover { color: var(--laiton-texte); }
@keyframes defile-marques { to { transform: translateX(-50%); } }

/* Parcours : l'icône s'anime au survol */
.parcours .pastille-icone, .outil .icone { transition: transform 0.35s cubic-bezier(.2,.8,.2,1), background 0.3s, color 0.3s; }
.parcours .carte:hover .pastille-icone { transform: translateY(-3px) rotate(-6deg); background: var(--principal); color: var(--ivoire); }
.outil:hover .icone { transform: scale(1.12); color: var(--laiton-texte); }
.parcours .bouton .icone, .simulateur-resultat .bouton .icone, .bande-partenaire .bouton .icone { transition: transform 0.25s; }
.bouton:hover .icone { transform: translateX(4px); }

/* Étapes reliées par une ligne qui se dessine au défilement */
.etapes { position: relative; }
@media (min-width: 821px) {
  .etapes::before {
    content: ""; position: absolute; left: 44px; right: 44px; top: 43px; height: 1px;
    background: linear-gradient(90deg, var(--laiton), var(--principal)); transform-origin: left; z-index: 0;
  }
  @supports (animation-timeline: view()) {
    .etapes::before { animation: trace linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
    @keyframes trace { from { transform: scaleX(0); } }
  }
  .etapes li { z-index: 1; }
  .etape-num { background: var(--carte); position: relative; }
}

/* Simulateur : le chiffre « pulse » légèrement quand il change */
.sr-chiffre { transition: color 0.3s; }

/* Bande partenaires : lueur laiton qui se déplace */
.bande-partenaire { position: relative; overflow: hidden; }
.bande-partenaire::before {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; left: -120px; top: -200px;
  background: radial-gradient(circle, rgba(212, 180, 122, 0.22), transparent 65%);
  animation: derive 18s ease-in-out infinite alternate; pointer-events: none;
}
.bande-partenaire > * { position: relative; }
@keyframes derive { to { transform: translate(60vw, 160px); } }
.atouts li { transition: transform 0.3s, border-color 0.3s, background 0.3s; }
.atouts li:hover { transform: translateX(6px); border-color: rgba(212, 180, 122, 0.45); background: rgba(255, 255, 255, 0.05); }

/* =====================================================================
   Bandeau d'en-tête de page (toutes les pages intérieures)
   Pleine largeur même à l'intérieur du conteneur centré.
   ===================================================================== */
html, body { overflow-x: clip; }
.entete-page {
  position: relative; overflow: hidden; isolation: isolate;
  margin: 0 calc(50% - 50vw) 36px;
  padding: 44px calc(50vw - 50%) 40px;
  color: var(--ivoire);
  background:
    radial-gradient(60% 120% at 90% 0%, rgba(42, 107, 83, 0.45), transparent 60%),
    radial-gradient(50% 90% at 0% 100%, rgba(176, 138, 69, 0.16), transparent 60%),
    linear-gradient(180deg, #111317, #0c0e11);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.entete-page::before { /* lueur qui se déplace lentement */
  content: ""; position: absolute; inset: -30%; z-index: -1; pointer-events: none;
  background: radial-gradient(30% 40% at 75% 35%, rgba(42, 107, 83, 0.35), transparent 70%);
  animation: aurore 16s ease-in-out infinite alternate;
}
.entete-page::after { /* fines lignes de vitesse, à droite */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.07;
  background: repeating-linear-gradient(115deg, transparent 0 26px, #fff 26px 27px);
  mask-image: linear-gradient(90deg, transparent 45%, #000);
  -webkit-mask-image: linear-gradient(90deg, transparent 45%, #000);
}
.entete-page h1 {
  margin: 0 0 12px; max-width: 900px; color: #fff;
  background: linear-gradient(180deg, #fff 35%, #a1a1aa); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.entete-page .intro { color: rgba(243, 239, 230, 0.76); margin-bottom: 0; }
.entete-page .meta { color: rgba(243, 239, 230, 0.6); margin: 0; }
.entete-page .fil-ariane { margin: 0 0 16px; color: rgba(243, 239, 230, 0.55); }
.entete-page .fil-ariane a { color: rgba(243, 239, 230, 0.75); }
.entete-page .fil-ariane a:hover { color: var(--accent); }
.entete-page a { color: var(--accent); }

/* Apparition en cascade du bandeau */
.entete-page > * { animation: fondu-haut 0.8s cubic-bezier(.2,.8,.2,1) both; }
.entete-page > :nth-child(2) { animation-delay: 0.08s; }
.entete-page > :nth-child(3) { animation-delay: 0.18s; }

/* Ajustements de mise en page sous le bandeau */
main > .entete-page:first-child { margin-top: 0; }
main.article > .entete-page { padding-left: calc(50vw - 50%); }
@media (max-width: 480px) { .entete-page { padding-top: 32px; padding-bottom: 30px; margin-bottom: 24px; } }

/* =====================================================================
   Carte des stations et enseignes
   ===================================================================== */
.carte-stations {
  height: 340px; margin: 14px 0 6px; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--bordure); box-shadow: var(--ombre); background: var(--fond-2);
  z-index: 0; /* sous l'en-tête collant */
}
@media (max-width: 600px) { .carte-stations { height: 260px; } }
.credit-carte { margin: 0 0 8px; font-size: 0.72rem; text-align: right; }
.point-client {
  display: block; width: 20px; height: 20px; border-radius: 50%;
  background: var(--electrique); border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(31, 95, 184, 0.5);
  animation: pulsation 2s ease-out infinite;
}
@keyframes pulsation { 70% { box-shadow: 0 0 0 14px rgba(31, 95, 184, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 95, 184, 0); } }
.etiquette-prix {
  display: inline-block; transform: translate(-50%, -100%); white-space: nowrap;
  padding: 4px 9px; border-radius: 999px; font: 700 0.78rem var(--police);
  background: #111317; color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.etiquette-prix.moins-chere { background: var(--accent); color: #111; border-color: var(--accent); }
.leaflet-popup-content { font-family: var(--police); font-size: 0.88rem; line-height: 1.45; }
.leaflet-container a.leaflet-popup-close-button { color: #555; }
.station .enseigne:not([hidden]) {
  display: inline-block; margin-right: 8px; padding: 1px 9px; border-radius: 6px;
  background: var(--principal-clair); color: var(--principal); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.02em;
  animation: fondu-haut 0.4s ease both;
}
.station { cursor: pointer; transition: background 0.2s; border-radius: 10px; }
.station:hover { background: color-mix(in srgb, var(--fond) 70%, transparent); }

/* #####################################################################
   THÈME « SOMBRE PREMIUM » (prioritaire sur tout ce qui précède)
   Noir profond, texte blanc, accent vert citron, verre dépoli.
   Typographies : Geist (texte et titres) et Geist Mono (chiffres).
   ##################################################################### */
:root, :root:is(*) {
  color-scheme: dark;
  --fond: #07080a;
  --fond-2: #0d0f13;
  --carte: rgba(255, 255, 255, 0.035);
  --carte-pleine: #101216;
  --texte: #f4f4f5;
  --texte-doux: #a1a1aa;
  --bordure: rgba(255, 255, 255, 0.09);
  --accent: #c6f432;
  --accent-vif: #d9ff5c;
  --accent-texte: #c6f432;
  --principal: #c6f432;
  --principal-vif: #d9ff5c;
  --principal-clair: rgba(198, 244, 50, 0.1);
  --laiton: #c6f432;
  --laiton-texte: #c6f432;
  --graphite: #0b0c0f;
  --ivoire: #f4f4f5;
  --essence: #fb923c;
  --electrique: #60a5fa;
  --e85: #c6f432;
  --ombre: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 40px -24px rgba(0, 0, 0, 0.8);
  --ombre-forte: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 30px 60px -20px rgba(0, 0, 0, 0.9);
  --rayon: 16px;
  --police-titre: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --police: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --police-chiffres: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
body {
  background-color: var(--fond);
  background-image:
    radial-gradient(60% 50% at 50% -10%, rgba(198, 244, 50, 0.08), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 64px 64px, 64px 64px;
  background-attachment: fixed;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
}
::selection { background: var(--accent); color: #07080a; }

/* Titres : grotesque serré, très gras */
h1, h2, h3 { font-family: var(--police-titre); font-weight: 650; letter-spacing: -0.035em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.02; font-weight: 700; }
h2 { letter-spacing: -0.03em; }
.surtitre { color: var(--accent); font-family: var(--police-chiffres); font-weight: 500; letter-spacing: 0.08em; font-size: 0.75rem; }
.intro { color: var(--texte-doux); }

/* Chiffres : police mono, façon tableau de bord */
.resultat-principal .gros, .chiffre .valeur, .sr-chiffre, .jauge .valeur, .chiffres-cles strong,
.station .prix, .barre-ligne .nom span:last-child, td, .etiquette-prix {
  font-family: var(--police-chiffres); letter-spacing: -0.02em; font-weight: 500;
}

/* En-tête : verre noir */
header { background: rgba(7, 8, 10, 0.72); border-bottom-color: rgba(255, 255, 255, 0.07); }
.logo { font-family: var(--police-titre); font-weight: 700; letter-spacing: -0.03em; }
.logo-texte span, .logo .icone { color: var(--accent); }
nav > a, .nav-titre { color: #a1a1aa; }
nav > a:hover, .nav-titre:hover, .nav-groupe:focus-within .nav-titre, .nav-groupe.ouvert .nav-titre { color: #fff; background: rgba(255, 255, 255, 0.06); }
.nav-panneau { background: rgba(16, 18, 22, 0.96); backdrop-filter: blur(16px); border-color: var(--bordure); }
.nav-panneau a:hover { background: rgba(255, 255, 255, 0.05); }
.nav-panneau .icone { color: var(--accent); }
header::after { background: var(--accent); }

/* Cartes : verre dépoli */
.carte, .outil, .etapes li, .chiffres-cles > div, .sources > div, .en-bref, .choix-vehicule, .chiffre, .faq {
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.carte { background: var(--carte); border-color: var(--bordure); }
.carte-lien:hover, .outil:hover, .parcours .carte:hover { border-color: rgba(198, 244, 50, 0.45); }
.choix-vehicule { background: rgba(255, 255, 255, 0.02); border-color: var(--bordure); }
.chiffre { background: rgba(255, 255, 255, 0.03); }
.emoji, .pastille-icone { background: rgba(198, 244, 50, 0.1); color: var(--accent); border: 1px solid rgba(198, 244, 50, 0.2); }
.parcours .carte:hover .pastille-icone { background: var(--accent); color: #07080a; }

/* Formulaires */
input, select, textarea { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); color: var(--texte); }
input:focus, select:focus, textarea:focus { background: rgba(255, 255, 255, 0.06); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(198, 244, 50, 0.15); }
select option { background: #101216; color: #f4f4f5; }

/* Boutons : citron sur noir */
.bouton, .bouton:hover { background: var(--accent); color: #07080a; box-shadow: 0 0 0 1px rgba(198, 244, 50, 0.4), 0 8px 30px -8px rgba(198, 244, 50, 0.45); }
.bouton:hover { background: var(--accent-vif); }
.bouton-secondaire, .bouton-secondaire:hover { background: rgba(255, 255, 255, 0.04); color: #f4f4f5; box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.14) !important; }
.bouton-secondaire:hover { background: rgba(255, 255, 255, 0.08); }
.bouton-laiton, .bouton-laiton:hover, .simulateur-resultat .bouton, .simulateur-resultat .bouton:hover { background: var(--accent); color: #07080a; }

/* Résultat principal : verre sombre avec lueur citron */
.resultat-principal, .simulateur-resultat {
  background: radial-gradient(120% 120% at 100% 0%, rgba(198, 244, 50, 0.14), transparent 55%), linear-gradient(180deg, #121419, #0b0c0f);
  border: 1px solid rgba(198, 244, 50, 0.22);
}
.resultat-principal .gros, .sr-chiffre { color: #fff; }
.resultat-principal a { color: var(--accent); }

/* Pastilles et verdicts (toujours en version sombre) */
.pastille.ok { background: rgba(198, 244, 50, 0.12); color: var(--accent); }
.pastille.peut-etre { background: rgba(251, 191, 36, 0.12); color: #fcd34d; }
.pastille.non { background: rgba(248, 113, 113, 0.12); color: #fca5a5; }
.verdict.ok { background: rgba(198, 244, 50, 0.07); border-color: rgba(198, 244, 50, 0.3); color: var(--texte); }
.verdict.peut-etre { background: rgba(251, 191, 36, 0.07); border-color: rgba(251, 191, 36, 0.3); color: #fde68a; }
.verdict.non { background: rgba(248, 113, 113, 0.07); border-color: rgba(248, 113, 113, 0.3); color: #fecaca; }

/* Encadrés */
.appel-calculateur { background: linear-gradient(135deg, rgba(198, 244, 50, 0.09), rgba(255, 255, 255, 0.02)); border-color: rgba(198, 244, 50, 0.25); }
.appel-calculateur strong { font-family: var(--police-titre); }
.partenaire { background: rgba(255, 255, 255, 0.03); border-color: rgba(198, 244, 50, 0.35); }
.en-bref { background: rgba(255, 255, 255, 0.03); border-left-color: var(--accent); }
.tableau-solutions tr.meilleure td { background: rgba(198, 244, 50, 0.07); }
tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.barre-fond { background: rgba(255, 255, 255, 0.07); }

/* Bandeau d'en-tête des pages : grille fine + lueur citron */
.entete-page {
  background:
    radial-gradient(50% 120% at 85% 0%, rgba(198, 244, 50, 0.12), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    #08090c;
  background-size: 100% 100%, 48px 48px, 48px 48px, auto;
  border-bottom-color: var(--bordure);
}
.entete-page::before { background: radial-gradient(30% 40% at 75% 35%, rgba(198, 244, 50, 0.1), transparent 70%); }
.entete-page::after { display: none; }
.entete-page h1 { background: linear-gradient(180deg, #fff 40%, #a1a1aa); -webkit-background-clip: text; background-clip: text; }
.entete-page a, .entete-page .fil-ariane a:hover { color: var(--accent); }

/* Pied de page */
footer { background: #050608; border-top: 1px solid var(--bordure); }
footer a:hover, .pied-grille h3 { color: var(--accent); }
.pied-grille h3 { font-family: var(--police-chiffres); font-weight: 500; }

/* Carte des stations */
.carte-stations { border-color: var(--bordure); }
.etiquette-prix.moins-chere { background: var(--accent); color: #07080a; border-color: var(--accent); }
.station .enseigne:not([hidden]) { background: rgba(198, 244, 50, 0.1); color: var(--accent); }
.station:hover { background: rgba(255, 255, 255, 0.03); }

/* Barre de résultat flottante, halo des cartes, bordure animée */
.barre-resultat { background: rgba(16, 18, 22, 0.92); backdrop-filter: blur(14px); border-color: rgba(198, 244, 50, 0.3); }
.barre-resultat .br-bouton { background: var(--accent); }
.carte-lien::before, .outil::before, .parcours .carte::before, .etapes li::before {
  background: radial-gradient(360px circle at var(--mx) var(--my), rgba(198, 244, 50, 0.08), transparent 60%);
}
.parcours .carte:hover, .simulateur:hover {
  background: linear-gradient(#0f1115, #0f1115) padding-box, conic-gradient(from var(--angle), var(--accent), transparent 30%, transparent 70%, var(--accent)) border-box;
}
.etape-num { border-color: rgba(198, 244, 50, 0.4); color: var(--accent); font-family: var(--police-chiffres); background: #0d0f13; }
.etapes::before { background: linear-gradient(90deg, var(--accent), transparent); }
.sources > div { border-left-color: var(--accent); background: rgba(255, 255, 255, 0.03); }
.piste a { color: rgba(244, 244, 245, 0.35); font-family: var(--police-titre); font-weight: 650; letter-spacing: -0.03em; }
.piste a:hover { color: var(--accent); }
.chiffres-cles { background: var(--bordure); }
.chiffres-cles > div { background: #0b0c0f; }
.chiffres-cles strong { color: #fff; }
.lien-bouton { color: var(--texte-doux); }
:focus-visible { outline-color: var(--accent); }
html { scrollbar-color: rgba(198, 244, 50, 0.4) transparent; }
body::after { opacity: 0.025; }
/* Carte IGN en version sombre */
.carte-stations .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.9) saturate(0.35); }
.carte-stations { background: #0d0f13; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #15171c; color: #f4f4f5; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); }
.leaflet-bar a { background: #15171c; color: #f4f4f5; border-color: rgba(255, 255, 255, 0.1); }

/* =====================================================================
   ACCUEIL « sombre premium »
   ===================================================================== */
.ouverture { position: relative; padding: 88px 0 40px; overflow: hidden; }
.ouverture::before { /* halo citron derrière l'aperçu */
  content: ""; position: absolute; width: 760px; height: 760px; right: -160px; top: -200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 244, 50, 0.16), transparent 62%); filter: blur(10px); pointer-events: none;
  animation: aurore 14s ease-in-out infinite alternate;
}
.ouverture-grille { position: relative; display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 56px; align-items: center; }
.ouverture h1 { font-size: clamp(2.8rem, 6.4vw, 5.2rem); line-height: 0.98; letter-spacing: -0.055em; margin: 18px 0 20px; font-weight: 750; }
.ouverture h1 .accent { color: var(--accent); display: inline-block; text-shadow: 0 0 40px rgba(198, 244, 50, 0.35); }
.ouverture .intro { font-size: 1.15rem; max-width: 540px; }

.badge-direct {
  display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 6px 14px 6px 10px;
  border: 1px solid var(--bordure); border-radius: 999px; background: rgba(255, 255, 255, 0.03);
  font: 500 0.78rem var(--police-chiffres); color: var(--texte-doux); letter-spacing: 0.01em;
}
.point-direct { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(198, 244, 50, 0.6); animation: pouls 2s infinite; flex: none; }
@keyframes pouls { 70% { box-shadow: 0 0 0 8px rgba(198, 244, 50, 0); } 100% { box-shadow: 0 0 0 0 rgba(198, 244, 50, 0); } }

.barre-recherche {
  display: flex; align-items: center; gap: 8px; max-width: 580px; margin-top: 30px; padding: 6px 6px 6px 18px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.barre-recherche:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(198, 244, 50, 0.12); }
.barre-recherche > .icone { color: var(--texte-doux); }
.barre-recherche input { flex: 1; height: 46px; border: 0; background: transparent; padding: 0 6px; box-shadow: none !important; }
.barre-recherche .bouton { margin: 0; min-height: 46px; white-space: nowrap; }
.preuves { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; padding: 0; margin: 28px 0 0; color: var(--texte-doux); font-size: 0.9rem; }
.preuves strong { color: #fff; font-family: var(--police-chiffres); font-weight: 500; margin-right: 6px; }

/* Aperçu : vraies cartes de l'outil, inclinées en 3D */
.apercu {
  --rx: 4deg; --ry: -8deg;
  position: relative; display: grid; gap: 14px; perspective: 1400px;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
}
.apercu-carte {
  position: relative; padding: 20px 22px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 30px 60px -25px rgba(0, 0, 0, 0.9);
  animation: flotte 7s ease-in-out infinite;
}
.apercu-eco { margin-left: 48px; animation-delay: -2s; border-color: rgba(198, 244, 50, 0.3); background: linear-gradient(180deg, rgba(198, 244, 50, 0.1), rgba(255, 255, 255, 0.02)); }
.apercu-station { margin-right: 36px; animation-delay: -4s; }
@keyframes flotte { 50% { transform: translateY(-6px); } }
.apercu-titre { display: flex; align-items: center; gap: 8px; font: 500 0.72rem var(--police-chiffres); text-transform: uppercase; letter-spacing: 0.08em; color: var(--texte-doux); margin-bottom: 12px; }
.ligne-prix { display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 14px; padding: 7px 0; font-size: 0.9rem; color: var(--texte-doux); }
.ligne-prix strong { font-family: var(--police-chiffres); font-weight: 500; color: #fff; font-size: 1.05rem; }
.ligne-prix.accentue strong, .ligne-prix.accentue span:first-child { color: var(--accent); }
.jauge-mini { height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.jauge-mini i { display: block; height: 100%; width: 0; border-radius: 99px; background: rgba(255, 255, 255, 0.5); transition: width 1.4s cubic-bezier(.2,.8,.2,1) 0.4s; }
.ligne-prix.accentue .jauge-mini i { background: var(--accent); box-shadow: 0 0 12px rgba(198, 244, 50, 0.6); }
.apercu-chiffre { font: 500 clamp(2.4rem, 4.4vw, 3.2rem) var(--police-chiffres); letter-spacing: -0.04em; color: #fff; line-height: 1; }
.apercu-chiffre small { font-size: 1rem; color: var(--texte-doux); margin-left: 6px; letter-spacing: 0; }
.apercu-detail { color: var(--texte-doux); font-size: 0.84rem; margin-top: 8px; }
.station-mini { display: flex; align-items: center; gap: 12px; }
.enseigne-mini { padding: 3px 10px; border-radius: 6px; background: rgba(198, 244, 50, 0.12); color: var(--accent); font-weight: 700; font-size: 0.82rem; }
.ville-mini { flex: 1; color: var(--texte-doux); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station-mini strong { font: 500 1.4rem var(--police-chiffres); color: #fff; }

/* Apparition de l'ouverture */
.ouverture-texte > * { animation: fondu-haut 0.9s cubic-bezier(.2,.8,.2,1) both; }
.ouverture-texte > :nth-child(2) { animation-delay: 0.08s; }
.ouverture-texte > :nth-child(3) { animation-delay: 0.18s; }
.ouverture-texte > :nth-child(4) { animation-delay: 0.28s; }
.ouverture-texte > :nth-child(6) { animation-delay: 0.38s; }
.apercu { animation: entree-apercu 1.2s cubic-bezier(.16,.84,.24,1) 0.2s both; }
@keyframes entree-apercu { from { opacity: 0; transform: translateY(40px) rotateX(18deg) rotateY(-16deg); } }

@media (max-width: 920px) {
  .ouverture { padding-top: 56px; }
  .ouverture-grille { grid-template-columns: 1fr; gap: 40px; }
  .apercu { --rx: 0deg; --ry: 0deg; }
  .apercu-eco, .apercu-station { margin: 0; }
}
@media (max-width: 520px) {
  .barre-recherche { flex-wrap: wrap; border-radius: 18px; padding: 8px; }
  .barre-recherche input { min-width: 0; }
  .barre-recherche .bouton { width: 100%; }
}

/* Bandeau des marques, pleine largeur */
.bandeau-marques { margin: 24px 0 0; padding: 26px 0; border-block: 1px solid var(--bordure); background: rgba(255, 255, 255, 0.015); }
.piste a { font-size: 1.5rem; }

/* En-têtes de section */
.entete-section { margin: 96px 0 28px; max-width: 760px; }
.entete-section h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.05; letter-spacing: -0.045em; margin: 8px 0 0; }
.entete-section .surtitre { margin: 0; }
main > .ma-voiture { margin-top: 48px; }

/* Grille « bento » */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.tuile {
  grid-column: span 2; position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 24px; border-radius: 18px; text-decoration: none; color: var(--texte);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--bordure); overflow: hidden;
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), border-color 0.3s;
}
a.tuile:hover { transform: translateY(-4px); border-color: rgba(198, 244, 50, 0.45); color: var(--texte); }
.tuile h3 { margin: 14px 0 0; font-size: 1.2rem; letter-spacing: -0.03em; }
.tuile p { margin: 0; color: var(--texte-doux); font-size: 0.92rem; }
.tuile-lien { margin-top: auto; padding-top: 18px; display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.tuile-lien .icone { width: 16px; height: 16px; transition: transform 0.25s; }
a.tuile:hover .tuile-lien .icone { transform: translateX(4px); }
a.tuile::before { /* halo qui suit la souris */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(198, 244, 50, 0.1), transparent 60%);
}
a.tuile:hover::before { opacity: 1; }
.tuile-simulateur { grid-column: span 6; padding: 28px; border-color: rgba(198, 244, 50, 0.25); background: radial-gradient(80% 120% at 100% 0%, rgba(198, 244, 50, 0.08), transparent 60%), rgba(255, 255, 255, 0.02); }
.tuile-entete { display: flex; align-items: center; gap: 14px; }
.tuile-entete h3 { margin: 0; font-size: 1.5rem; }
.simulateur-corps { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-top: 22px; align-items: stretch; }
.simulateur-corps .choix-vehicule { margin: 0 0 18px; }
.tuile-simulateur .simulateur-resultat { border-radius: 16px; padding: 24px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tuile { grid-column: span 1; }
  .tuile-simulateur { grid-column: 1 / -1; }
  .simulateur-corps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .bento { grid-template-columns: 1fr; } .tuile { grid-column: auto; } }

/* Étapes et sources sur l'accueil */
.etapes li { background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)); }
.etape-num { width: auto; height: auto; padding: 4px 10px; border-radius: 8px; font-size: 0.8rem; }
.sources { margin-top: 18px; }

/* Bande partenaires : sobre, verre sombre */
.bande-partenaire {
  margin-top: 110px; border-block: 1px solid var(--bordure);
  background: radial-gradient(50% 100% at 0% 0%, rgba(198, 244, 50, 0.1), transparent 60%), #08090c;
}
.bande-partenaire::before { background: radial-gradient(circle, rgba(198, 244, 50, 0.12), transparent 65%); }
.bande-partenaire h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); letter-spacing: -0.045em; line-height: 1.05; }
.bande-partenaire p { color: var(--texte-doux); }
.atouts li { background: rgba(255, 255, 255, 0.03); border-color: var(--bordure); }
.atouts strong { color: #fff; }
.atouts li:hover { border-color: rgba(198, 244, 50, 0.4); }
.curseur, .curseur:focus { background: linear-gradient(90deg, var(--accent) var(--rempli, 25%), rgba(255, 255, 255, 0.12) var(--rempli, 25%)); }
.curseur::-webkit-slider-thumb { background: #fff; border: 4px solid var(--accent); box-shadow: 0 0 16px rgba(198, 244, 50, 0.5); }
.curseur::-moz-range-thumb { background: #fff; border: 4px solid var(--accent); }

/* =====================================================================
   Bouton de thème (en-tête)
   ===================================================================== */
.bouton-theme {
  display: inline-grid; place-items: center; width: 38px; height: 38px; margin-left: auto; padding: 0;
  border-radius: 999px; border: 1px solid var(--bordure); background: transparent; color: var(--texte-doux); cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.3s;
}
.bouton-theme:hover { color: var(--texte); border-color: var(--accent); }
.bouton-theme:active { transform: rotate(30deg); }
.bouton-theme .icone { width: 18px; height: 18px; }
header nav { order: 2; }
.bouton-theme { order: 3; margin-left: 4px; }
@media (max-width: 960px) {
  .bouton-theme { order: 1; margin-left: auto; }
  .menu-bouton { order: 2; }
  header nav { order: 3; }
}

/* #####################################################################
   THÈME CLAIR « premium » : [data-theme="clair"]
   Appliqué quand l'appareil est en mode clair (automatique) ou choisi par le visiteur.
   ##################################################################### */
:root[data-theme="clair"] {
  color-scheme: light;
  --fond: #fafaf9;
  --fond-2: #f0f0ee;
  --carte: #ffffff;
  --carte-pleine: #ffffff;
  --texte: #09090b;
  --texte-doux: #5b5b63;
  --bordure: rgba(9, 9, 11, 0.1);
  --accent: #2f6b4f;        /* vert sapin doux : texte, liens, boutons */
  --accent-vif: #275c43;
  --accent-fond: #d6ece0;   /* menthe pâle : surlignages */
  --principal: #2f6b4f;
  --principal-vif: #275c43;
  --principal-clair: rgba(47, 107, 79, 0.14);
  --laiton: #2f6b4f;
  --laiton-texte: #2f6b4f;
  --essence: #c2410c;
  --electrique: #1d4ed8;
  --e85: #275c43;
  --ombre: 0 1px 2px rgba(9, 9, 11, 0.05), 0 12px 32px -16px rgba(9, 9, 11, 0.16);
  --ombre-forte: 0 2px 4px rgba(9, 9, 11, 0.06), 0 30px 60px -24px rgba(9, 9, 11, 0.25);
}
:root[data-theme="clair"] body {
  background-image:
    radial-gradient(60% 50% at 50% -10%, rgba(47, 107, 79, 0.088), transparent 70%),
    linear-gradient(rgba(9, 9, 11, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(9, 9, 11, 0.04) 1px, transparent 1px);
}
:root[data-theme="clair"] ::selection { background: #cfe8da; color: #09090b; }
:root[data-theme="clair"] body::after { mix-blend-mode: multiply; opacity: 0.03; }

/* En-tête clair */
:root[data-theme="clair"] header { background: rgba(250, 250, 249, 0.78); border-bottom-color: var(--bordure); color: var(--texte); }
:root[data-theme="clair"] .logo { color: var(--texte); }
:root[data-theme="clair"] nav > a, :root[data-theme="clair"] .nav-titre { color: #52525b; }
:root[data-theme="clair"] nav > a:hover, :root[data-theme="clair"] .nav-titre:hover,
:root[data-theme="clair"] .nav-groupe:focus-within .nav-titre, :root[data-theme="clair"] .nav-groupe.ouvert .nav-titre { color: #09090b; background: rgba(9, 9, 11, 0.05); }
:root[data-theme="clair"] .nav-panneau { background: rgba(255, 255, 255, 0.97); }
:root[data-theme="clair"] .nav-panneau a { color: var(--texte); }
:root[data-theme="clair"] .nav-panneau a:hover { background: rgba(9, 9, 11, 0.04); }
:root[data-theme="clair"] .menu-bouton { color: var(--texte); border-color: var(--bordure); }
:root[data-theme="clair"] header::after { background: #2f6b4f; }
@media (max-width: 960px) {
  :root[data-theme="clair"] .nav-titre { color: var(--accent); }
  :root[data-theme="clair"] .nav-panneau { background: rgba(9, 9, 11, 0.025); border-color: var(--bordure); }
  :root[data-theme="clair"] .nav-panneau a, :root[data-theme="clair"] .nav-panneau a:hover { color: var(--texte); }
  :root[data-theme="clair"] .nav-panneau small { color: var(--texte-doux); }
}

/* Surfaces en verre -> cartes blanches */
:root[data-theme="clair"] :is(.carte, .tuile, .outil, .etapes li, .sources > div, .en-bref, .faq-liste, .chiffre, .atouts li, .partenaire) {
  background: #fff; box-shadow: var(--ombre);
}
:root[data-theme="clair"] .choix-vehicule { background: #fafaf9; }
:root[data-theme="clair"] .chiffres-cles > div, :root[data-theme="clair"] .etape-num { background: #fff; }
:root[data-theme="clair"] .chiffres-cles strong, :root[data-theme="clair"] .preuves strong,
:root[data-theme="clair"] .ligne-prix strong, :root[data-theme="clair"] .station-mini strong { color: #09090b; }
:root[data-theme="clair"] .tuile-simulateur { background: radial-gradient(80% 120% at 100% 0%, rgba(47, 107, 79, 0.08), transparent 60%), #fff; border-color: rgba(47, 107, 79, 0.35); }
:root[data-theme="clair"] a.tuile:hover, :root[data-theme="clair"] .carte-lien:hover, :root[data-theme="clair"] .outil:hover { border-color: rgba(47, 107, 79, 0.5); }
:root[data-theme="clair"] .parcours .carte:hover, :root[data-theme="clair"] .simulateur:hover {
  background: linear-gradient(#fff, #fff) padding-box, conic-gradient(from var(--angle), #2f6b4f, transparent 30%, transparent 70%, #2f6b4f) border-box;
}
:root[data-theme="clair"] .emoji, :root[data-theme="clair"] .pastille-icone { background: rgba(47, 107, 79, 0.14); color: #2f6b4f; border-color: rgba(47, 107, 79, 0.25); }
:root[data-theme="clair"] .parcours .carte:hover .pastille-icone { background: #2f6b4f; color: #fff; }

/* Champs */
:root[data-theme="clair"] :is(input, select, textarea) { background: #fff; border-color: rgba(9, 9, 11, 0.14); color: var(--texte); }
:root[data-theme="clair"] :is(input, select, textarea):focus { border-color: #2f6b4f; box-shadow: 0 0 0 4px rgba(47, 107, 79, 0.2); }
:root[data-theme="clair"] select option { background: #fff; color: #09090b; }
:root[data-theme="clair"] .barre-recherche { background: #fff; border-color: rgba(9, 9, 11, 0.14); box-shadow: var(--ombre); }
:root[data-theme="clair"] .barre-recherche input { background: transparent; }

/* Boutons : citron vif, texte noir */
:root[data-theme="clair"] .bouton, :root[data-theme="clair"] .bouton:hover,
:root[data-theme="clair"] .bouton-laiton, :root[data-theme="clair"] .simulateur-resultat .bouton {
  background: #2f6b4f; color: #fff; box-shadow: 0 1px 2px rgba(9, 9, 11, 0.08), 0 8px 20px -10px rgba(47, 107, 79, 0.55);
}
:root[data-theme="clair"] .bouton:hover { background: #275c43; color: #fff; }
:root[data-theme="clair"] .bouton-secondaire, :root[data-theme="clair"] .bouton-secondaire:hover {
  background: #fff; color: #09090b; border: 1px solid rgba(9, 9, 11, 0.15) !important; box-shadow: none;
}
:root[data-theme="clair"] .bouton-secondaire:hover { background: #f4f4f5; }

/* Le grand résultat reste une carte sombre (effet « écran de tableau de bord ») */
:root[data-theme="clair"] :is(.resultat-principal, .simulateur-resultat) { color: #f4f4f5; }
:root[data-theme="clair"] :is(.resultat-principal, .simulateur-resultat) a { color: #9fd8b8; }
:root[data-theme="clair"] .resultat-principal .bouton-secondaire, :root[data-theme="clair"] .resultat-principal .bouton-secondaire:hover {
  background: rgba(255, 255, 255, 0.06); color: #f4f4f5; border-color: rgba(255, 255, 255, 0.2) !important;
}
:root[data-theme="clair"] .sr-libelle, :root[data-theme="clair"] .sr-detail { color: rgba(244, 244, 245, 0.7); }
:root[data-theme="clair"] .barre-resultat { color: #f4f4f5; }
:root[data-theme="clair"] .barre-resultat .br-bouton { background: #9fd8b8; color: #0b2a1d; }

/* Accent du grand titre : surlignage citron */
:root[data-theme="clair"] .ouverture h1 .accent {
  color: #09090b; text-shadow: none;
  background: linear-gradient(transparent 60%, #d6ece0 60%, #d6ece0 94%, transparent 94%);
}
:root[data-theme="clair"] .ouverture::before { background: radial-gradient(circle, rgba(47, 107, 79, 0.14), transparent 62%); }
:root[data-theme="clair"] .badge-direct { background: #fff; }

/* Aperçu de l'accueil : cartes blanches */
:root[data-theme="clair"] .apercu-carte {
  background: rgba(255, 255, 255, 0.85); border-color: rgba(9, 9, 11, 0.08);
  box-shadow: 0 1px 0 #fff inset, 0 30px 60px -28px rgba(9, 9, 11, 0.35);
}
:root[data-theme="clair"] .apercu-eco { background: linear-gradient(180deg, rgba(47, 107, 79, 0.12), rgba(255, 255, 255, 0.9)); border-color: rgba(47, 107, 79, 0.35); }
:root[data-theme="clair"] .apercu-chiffre { color: #09090b; }
:root[data-theme="clair"] .jauge-mini { background: rgba(9, 9, 11, 0.08); }
:root[data-theme="clair"] .jauge-mini i { background: rgba(9, 9, 11, 0.45); }
:root[data-theme="clair"] .ligne-prix.accentue .jauge-mini i { background: #2f6b4f; box-shadow: none; }
:root[data-theme="clair"] .enseigne-mini, :root[data-theme="clair"] .station .enseigne:not([hidden]) { background: rgba(47, 107, 79, 0.16); color: #2f6b4f; }
:root[data-theme="clair"] .point-direct { background: #2f6b4f; }

/* Bandeaux et sections */
:root[data-theme="clair"] .entete-page {
  background:
    radial-gradient(50% 120% at 85% 0%, rgba(47, 107, 79, 0.12), transparent 60%),
    linear-gradient(rgba(9, 9, 11, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(9, 9, 11, 0.045) 1px, transparent 1px),
    #f4f4f2;
  background-size: 100% 100%, 48px 48px, 48px 48px, auto;
  color: var(--texte);
}
:root[data-theme="clair"] .entete-page h1 { background: linear-gradient(180deg, #09090b 40%, #52525b); -webkit-background-clip: text; background-clip: text; }
:root[data-theme="clair"] .entete-page .intro, :root[data-theme="clair"] .entete-page .meta,
:root[data-theme="clair"] .entete-page .fil-ariane, :root[data-theme="clair"] .entete-page .fil-ariane a { color: var(--texte-doux); }
:root[data-theme="clair"] .bandeau-marques { background: rgba(9, 9, 11, 0.015); }
:root[data-theme="clair"] .piste a { color: rgba(9, 9, 11, 0.32); }
:root[data-theme="clair"] .piste a:hover { color: #2f6b4f; }
:root[data-theme="clair"] .bande-partenaire { background: radial-gradient(50% 100% at 0% 0%, rgba(47, 107, 79, 0.112), transparent 60%), #f4f4f2; color: var(--texte); }
:root[data-theme="clair"] .bande-partenaire h2, :root[data-theme="clair"] .atouts strong { color: #09090b; }
:root[data-theme="clair"] .bande-partenaire .surtitre { color: var(--accent); }
:root[data-theme="clair"] .hero-court { background: radial-gradient(60% 120% at 90% 0%, rgba(47, 107, 79, 0.12), transparent 60%), #f4f4f2; color: var(--texte); }
:root[data-theme="clair"] .hero-court h1 { color: #09090b; }
:root[data-theme="clair"] .hero-court .intro { color: var(--texte-doux); }
:root[data-theme="clair"] .hero-court h1 em { color: #2f6b4f; }

/* Pied de page clair */
:root[data-theme="clair"] footer { background: #f4f4f2; color: var(--texte-doux); }
:root[data-theme="clair"] footer a { color: #27272a; }
:root[data-theme="clair"] footer a:hover, :root[data-theme="clair"] .pied-grille h3 { color: #2f6b4f; }
:root[data-theme="clair"] .pied-legal { color: #71717a; border-top-color: var(--bordure); }

/* Pastilles et verdicts */
:root[data-theme="clair"] .pastille.ok { background: rgba(47, 107, 79, 0.16); color: #2f6b4f; }
:root[data-theme="clair"] .pastille.peut-etre { background: #fef3c7; color: #92400e; }
:root[data-theme="clair"] .pastille.non { background: #fee2e2; color: #991b1b; }
:root[data-theme="clair"] .verdict.ok { background: rgba(47, 107, 79, 0.1); border-color: rgba(47, 107, 79, 0.35); color: #173a2a; }
:root[data-theme="clair"] .verdict.peut-etre { background: #fffbeb; border-color: #fcd34d; color: #78350f; }
:root[data-theme="clair"] .verdict.non { background: #fef2f2; border-color: #fca5a5; color: #7f1d1d; }
:root[data-theme="clair"] .appel-calculateur { background: linear-gradient(135deg, rgba(47, 107, 79, 0.088), #fff); border-color: rgba(47, 107, 79, 0.3); }
:root[data-theme="clair"] .tableau-solutions tr.meilleure td { background: rgba(47, 107, 79, 0.12); }
:root[data-theme="clair"] tbody tr:hover { background: rgba(9, 9, 11, 0.025); }
:root[data-theme="clair"] .barre-fond { background: rgba(9, 9, 11, 0.07); }
:root[data-theme="clair"] .curseur, :root[data-theme="clair"] .curseur:focus { background: linear-gradient(90deg, #2f6b4f var(--rempli, 25%), rgba(9, 9, 11, 0.1) var(--rempli, 25%)); }
:root[data-theme="clair"] .curseur::-webkit-slider-thumb { border-color: #2f6b4f; box-shadow: 0 2px 8px rgba(9, 9, 11, 0.2); }

/* Carte des stations : fond IGN normal, étiquettes adaptées */
:root[data-theme="clair"] .carte-stations .leaflet-tile-pane { filter: none; }
:root[data-theme="clair"] .carte-stations { background: #f0f0ee; }
:root[data-theme="clair"] .leaflet-popup-content-wrapper, :root[data-theme="clair"] .leaflet-popup-tip { background: #fff; color: #09090b; }
:root[data-theme="clair"] .leaflet-bar a { background: #fff; color: #09090b; border-color: rgba(9, 9, 11, 0.12); }
:root[data-theme="clair"] .etiquette-prix.moins-chere { background: #2f6b4f; color: #fff; border-color: #2f6b4f; }
:root[data-theme="clair"] .station:hover { background: rgba(9, 9, 11, 0.025); }

/* Halo et finitions */
:root[data-theme="clair"] :is(.carte-lien, .outil, .parcours .carte, .etapes li)::before,
:root[data-theme="clair"] a.tuile::before { background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(47, 107, 79, 0.088), transparent 60%); }
:root[data-theme="clair"] :focus-visible { outline-color: #2f6b4f; }
:root[data-theme="clair"] html, html[data-theme="clair"] { scrollbar-color: rgba(9, 9, 11, 0.25) transparent; }

/* Changement de thème en douceur */
html.theme-transition, html.theme-transition * { transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease !important; }

/* ===== Relevé des prix (pages départements, villes, classement) ===== */
.liste-releve { padding-left: 1.1em; }
.liste-releve li { margin: 0 0 10px; line-height: 1.6; }
.liste-releve li::marker { color: var(--principal); }
button.tri { all: unset; cursor: pointer; font: inherit; font-weight: 600; border-bottom: 1px dashed currentColor; }
button.tri:hover { color: var(--principal); }
button.tri:focus-visible { outline: 2px solid var(--principal); outline-offset: 2px; }
