/* ==========================================================================
   VehiculesElectriques.ca — feuille de styles
   Couleurs et polices modifiables dans :root ci-dessous.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* ---- Mode sombre (par défaut) ---- */
  color-scheme: dark;
  --bg: #0d1116;
  --surface: #141a21;
  --ink: #eef1f4;
  --ink-soft: #b6c0ca;
  --muted: #a3adb8;
  --faint: #5d6873;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.12);
  --card-line: rgba(255, 255, 255, 0.09);
  --control-line: rgba(255, 255, 255, 0.18);
  --ghost-line: rgba(255, 255, 255, 0.22);
  --tint: rgba(255, 255, 255, 0.04);
  --tint-strong: rgba(255, 255, 255, 0.08);
  --header-bg: rgba(13, 17, 22, 0.85);
  --shadow: none;
  --accent: #c8f25c;         /* lime de la marque : boutons, calculateur… */
  --accent-hover: #dafa8e;
  --accent-text: #c8f25c;    /* lime utilisé comme couleur de texte */
  --on-accent: #0d1116;
  --on-accent-muted: #2d3f13;
  --on-accent-soft: #233407;
  --danger: #ff8a7a;
  --logo-frame: #ffffff;
  --logo-bar: #c8f25c;
  --logo-bar-last: #c8f25c;
  --logo-ink: #ffffff;
  --logo-acc: #c8f25c;
  --logo-tld: #9aa3ab;

  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius-card: 18px;
}

/* ---- Mode clair : choisi avec le bouton, ou réglage de l'appareil si aucun choix ---- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7f3;
  --surface: #ffffff;
  --ink: #12171d;
  --ink-soft: #3c4650;
  --muted: #5a6570;
  --faint: #9aa3ab;
  --line: rgba(13, 17, 22, 0.08);
  --line-strong: rgba(13, 17, 22, 0.12);
  --card-line: rgba(13, 17, 22, 0.10);
  --control-line: rgba(13, 17, 22, 0.20);
  --ghost-line: rgba(13, 17, 22, 0.25);
  --tint: rgba(13, 17, 22, 0.04);
  --tint-strong: rgba(13, 17, 22, 0.07);
  --header-bg: rgba(246, 247, 243, 0.88);
  --shadow: 0 1px 2px rgba(13, 17, 22, 0.05), 0 4px 16px rgba(13, 17, 22, 0.04);
  --accent: #c8f25c;
  --accent-hover: #b6e84a;
  --accent-text: #3f6d00;
  --danger: #b42318;
  --logo-frame: #0d1116;
  --logo-bar: #0d1116;
  --logo-bar-last: #b9bfc4;
  --logo-ink: #0d1116;
  --logo-acc: #0d1116;
  --logo-tld: #6b737a;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #f6f7f3;
    --surface: #ffffff;
    --ink: #12171d;
    --ink-soft: #3c4650;
    --muted: #5a6570;
    --faint: #9aa3ab;
    --line: rgba(13, 17, 22, 0.08);
    --line-strong: rgba(13, 17, 22, 0.12);
    --card-line: rgba(13, 17, 22, 0.10);
    --control-line: rgba(13, 17, 22, 0.20);
    --ghost-line: rgba(13, 17, 22, 0.25);
    --tint: rgba(13, 17, 22, 0.04);
    --tint-strong: rgba(13, 17, 22, 0.07);
    --header-bg: rgba(246, 247, 243, 0.88);
    --shadow: 0 1px 2px rgba(13, 17, 22, 0.05), 0 4px 16px rgba(13, 17, 22, 0.04);
    --accent: #c8f25c;
    --accent-hover: #b6e84a;
    --accent-text: #3f6d00;
    --danger: #b42318;
    --logo-frame: #0d1116;
    --logo-bar: #0d1116;
    --logo-bar-last: #b9bfc4;
    --logo-ink: #0d1116;
    --logo-acc: #0d1116;
    --logo-tld: #6b737a;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent-text); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }
sup { line-height: 0; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- Textes récurrents ---------- */
.eyebrow {
  font: 500 13px/1.4 var(--mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-text);
}
.h2 {
  font-size: clamp(32px, 4.6vw, 58px); line-height: 1;
  font-weight: 780; font-stretch: 115%; letter-spacing: -0.02em;
  text-wrap: balance;
}
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.mono-note { font: 400 13px/1.4 var(--mono); color: var(--muted); }
.mono-note strong { font-weight: 400; color: var(--ink); letter-spacing: 0.04em; }
.label-mono { font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 999px; text-decoration: none; font-weight: 700;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); padding: 17px 26px; font-size: 17px; }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { border: 1px solid var(--ghost-line); color: var(--ink); padding: 16px 24px; font-size: 17px; font-weight: 600; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { padding: 10px 16px; font-size: 14px; white-space: nowrap; }
.btn-lg { padding: 18px 30px; font-size: 18px; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  padding-top: 12px; padding-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
/* Logo (icône batterie + nom sur deux lignes) */
.ve-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.ve-logo__icon { width: 44px; height: 44px; flex: none; }
.ve-batt-frame { stroke: var(--logo-frame); }
.ve-batt-tip { fill: var(--logo-frame); }
.ve-batt-bar { fill: var(--logo-bar); }
.ve-batt-bar.is-last { fill: var(--logo-bar-last); }
.ve-logo__txt {
  display: flex; flex-direction: column;
  font-family: var(--sans); font-weight: 800; font-size: 18px; line-height: 1.05;
  letter-spacing: -0.025em; text-transform: uppercase; color: var(--logo-ink);
}
.ve-logo__acc { color: var(--logo-acc); }
.ve-logo__tld { font-weight: 400; color: var(--logo-tld); }
@media (max-width: 480px) {
  .ve-logo { gap: 8px; }
  .ve-logo__icon { width: 32px; height: 32px; }
  .ve-logo__txt { font-size: 13px; }
  /* Sur petit écran, en-tête sur une seule ligne : le bouton d'inscription reste juste en dessous, dans le héros */
  .site-header .wrap { flex-wrap: nowrap; gap: 8px; }
  .header-actions { gap: 6px; }
  .header-actions .btn-sm { display: none; }
  .theme-toggle { width: 34px; height: 34px; }
  .lang-switch a { padding: 7px 9px; }
}
@media (max-width: 340px) { .site-header .wrap { flex-wrap: wrap; } }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--control-line); border-radius: 999px; }
.lang-switch a {
  border-radius: 999px; padding: 7px 12px;
  font: 600 12px/1 var(--mono); letter-spacing: 0.06em;
  color: var(--muted); text-decoration: none;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
.theme-toggle {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; border-radius: 999px;
  border: 1px solid var(--control-line); background: transparent; color: var(--ink); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--ink); }
:root[data-theme] .theme-toggle { display: inline-flex; } /* bouton visible seulement si JavaScript est actif */
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- Héros ---------- */
.hero {
  padding-top: clamp(48px, 9vw, 112px); padding-bottom: clamp(48px, 7vw, 88px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: clamp(40px, 6vw, 80px); align-items: center;
}
.hero-text { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.hero h1 {
  font-size: clamp(40px, 6.3vw, 76px); line-height: 0.95;
  font-weight: 800; font-stretch: 118%; letter-spacing: -0.025em; text-wrap: balance;
}
.nowrap { white-space: nowrap; }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--ink-soft); max-width: 34em; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.sim-card {
  background: var(--surface); border: 1px solid var(--card-line); border-radius: 22px; box-shadow: var(--shadow);
  padding: clamp(22px, 3vw, 34px); display: flex; flex-direction: column; gap: 26px; min-width: 0;
}
.sim-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sim-head > span:first-child { display: flex; align-items: center; gap: 9px; }
.pulse { width: 8px; height: 8px; border-radius: 99px; background: var(--accent); display: inline-block; animation: vepulse 1.6s ease-in-out infinite; }
@keyframes vepulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .3; transform: scale(.7); } }
.sim-kwh {
  font-size: clamp(60px, 8.5vw, 108px); font-weight: 700; font-stretch: 112%;
  line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sim-kwh small { font-size: 0.32em; font-weight: 600; color: var(--muted); margin-left: 0.25em; letter-spacing: 0; }
.bar { height: 6px; border-radius: 99px; background: var(--tint-strong); overflow: hidden; }
.bar span { display: block; height: 100%; width: 70%; border-radius: 99px; background: var(--accent); }
.sim-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: 14px; background: var(--tint); }
.stat-value { font-size: clamp(26px, 3vw, 34px); font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-value.is-accent { color: var(--accent-text); }
.sim-foot { padding-top: 18px; border-top: 1px solid var(--line); font: 400 12px/1.5 var(--mono); color: var(--muted); }

@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

/* ---------- Chiffres clés ---------- */
.keyfacts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.keyfacts .wrap {
  padding-top: clamp(24px, 3vw, 36px); padding-bottom: clamp(24px, 3vw, 36px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px 40px;
}
.keyfact { display: flex; flex-direction: column; gap: 6px; }
.keyfact b { font-size: clamp(28px, 3vw, 36px); font-weight: 750; font-stretch: 112%; letter-spacing: -0.02em; }
.keyfact span { font-size: 15px; color: var(--muted); }

/* ---------- Étapes ---------- */
.steps-section {
  padding-top: clamp(72px, 10vw, 128px); padding-bottom: clamp(40px, 6vw, 64px);
  display: flex; flex-direction: column; gap: clamp(32px, 4vw, 48px); scroll-margin-top: 64px;
}
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.card { padding: 26px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--card-line); box-shadow: var(--shadow); }
.step { display: flex; flex-direction: column; gap: 14px; }
.step-num {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--tint-strong); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center; font: 600 15px/1 var(--mono);
}
.step:first-child .step-num { background: var(--accent); color: var(--on-accent); }
.step h3 { margin-top: 6px; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.step p { font-size: 16px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }

/* ---------- Principe ---------- */
.idea {
  padding-top: clamp(40px, 6vw, 64px); padding-bottom: clamp(72px, 10vw, 120px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: clamp(32px, 6vw, 80px); align-items: start;
}
.idea-text { display: flex; flex-direction: column; gap: 16px; }
.idea-text p:last-child { margin-top: 8px; font-size: 17px; line-height: 1.65; color: var(--ink-soft); text-wrap: pretty; }
.flow { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 40px; }
.flow-item { position: relative; display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--card-line); box-shadow: var(--shadow); }
.flow-item > span { flex: none; width: 22px; font: 600 12px/1 var(--mono); color: var(--muted); }
.flow-item div { display: flex; flex-direction: column; gap: 4px; }
.flow-item b { font-size: 19px; font-weight: 700; }
.flow-item div span { font-size: 15px; color: var(--muted); }
.flow-item.is-accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.flow-item.is-accent > span { color: #324419; }
.flow-item.is-accent div span { color: #28390d; }
.flow-item:not(:last-child)::after {
  content: "↓"; position: absolute; left: 30px; top: calc(100% + 12px);
  font: 500 16px/1 var(--mono); color: var(--faint);
}

/* ---------- Calculateur ---------- */
.calc-section { padding-left: clamp(12px, 3vw, 48px); padding-right: clamp(12px, 3vw, 48px); scroll-margin-top: 72px; }
.calc {
  background: var(--accent); color: var(--on-accent);
  border-radius: clamp(20px, 3vw, 32px); padding: clamp(28px, 5vw, 64px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(36px, 5vw, 72px); align-items: end;
}
.calc a { color: var(--on-accent); }
.calc .eyebrow { font-weight: 600; color: var(--on-accent-muted); }
.calc .h2 { font-weight: 800; }
.calc-input, .calc-output { display: flex; flex-direction: column; min-width: 0; }
.calc-input { gap: 22px; }
.calc-output { gap: 14px; }
.calc-field { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.calc-field label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.calc-field label span:first-child { font-size: 17px; font-weight: 600; }
.calc-field label output { font: 600 18px/1 var(--mono); font-variant-numeric: tabular-nums; }
.calc-field input[type="range"] { width: 100%; margin: 0; height: 28px; accent-color: var(--on-accent); cursor: pointer; }
.calc-field input[type="range"]:focus-visible { outline-color: var(--on-accent); }
.range-ends { display: flex; justify-content: space-between; font: 500 12px/1 var(--mono); color: var(--on-accent-muted); }
.calc-km { margin-top: 4px; font-size: 15px; line-height: 1.5; color: var(--on-accent-soft); }
.calc-year {
  font-size: clamp(72px, 11vw, 148px); line-height: 0.9; font-weight: 800; font-stretch: 112%;
  letter-spacing: -0.04em; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.calc-month { font-size: 18px; font-weight: 600; }
.calc-notes {
  margin-top: 10px; padding-top: 18px; border-top: 1px solid rgba(13,17,22,.2);
  display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.5; color: var(--on-accent-soft);
}

/* ---------- Admissibilité ---------- */
.elig-section {
  padding-top: clamp(72px, 10vw, 128px);
  display: flex; flex-direction: column; gap: clamp(32px, 4vw, 48px); scroll-margin-top: 64px;
}
.elig-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.elig-card { display: flex; flex-direction: column; gap: 20px; padding: clamp(24px, 3vw, 34px); }
.elig-card.is-outline { background: none; box-shadow: none; }
.elig-card h3 { font-size: 21px; font-weight: 700; }
.checklist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.checklist li { position: relative; padding-left: 36px; font-size: 16px; line-height: 1.5; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 6px;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800;
}
.checklist.is-info li { color: var(--ink-soft); }
.checklist.is-info li::before { content: "i"; background: var(--tint-strong); color: var(--ink); font: 600 12px/1 var(--mono); }

/* ---------- FAQ ---------- */
.faq-section {
  padding-top: clamp(72px, 10vw, 128px);
  display: flex; flex-wrap: wrap; gap: clamp(24px, 5vw, 64px); align-items: flex-start; scroll-margin-top: 64px;
}
.faq-section .section-head { flex: 1 1 280px; }
.faq-list { display: flex; flex-direction: column; border-top: 1px solid var(--line-strong); flex: 2 1 480px; min-width: 0; }
.faq-list details { border-bottom: 1px solid var(--line-strong); }
.faq-list summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0; font-size: clamp(17px, 1.8vw, 20px); font-weight: 600;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: none; font: 500 22px/1 var(--mono); color: var(--accent-text); transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { margin: 0 0 24px; max-width: 46em; font-size: 16px; line-height: 1.65; color: var(--ink-soft); text-wrap: pretty; }

/* ---------- Appel final ---------- */
.final-cta {
  padding-top: clamp(88px, 12vw, 160px); padding-bottom: clamp(88px, 12vw, 160px);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px;
}
.final-cta h2 {
  max-width: 14em; font-size: clamp(38px, 6vw, 80px); line-height: 0.98;
  font-weight: 800; font-stretch: 118%; letter-spacing: -0.025em; text-wrap: balance;
}

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 32px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 20px 48px; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; flex: 1 1 220px; }
.footer-brand b { font-size: 16px; font-stretch: 108%; }
.footer-brand span { font-size: 14px; color: var(--muted); }
.disclaimer { flex: 3 1 480px; font-size: 13.5px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.disclaimer a { color: var(--ink); }
