/* PermaTechnologies, feuille de style principale
   Organisation : polices, variables, base, mise en page, en-tête,
   sections (dans l'ordre de la page), pied de page, utilitaires. */

/* ---------- Polices (Barlow, SIL Open Font License 1.1) ---------- */
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/barlow-400.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/barlow-500.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/barlow-300-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/barlow-condensed-300.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/barlow-condensed-400.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/barlow-condensed-500.woff2") format("woff2");
}

/* ---------- Variables ---------- */
:root {
  /* Palette de la charte */
  --paper: #fffefc;
  --sand: #f0dcc1;
  --tan: #d2b48c;
  --navy: #002773;
  --blue: #114197;
  --amber: #e19b0f;
  --green: #305727;
  --ink: #262626;
  /* Nuances dérivées, pour le texte et les traits fonctionnels (contraste AA) */
  --tan-strong: #9a7b4f;
  --amber-text: #8f5c00;
  --muted: #5a5248;
  /* Puce : les trois traits du logo */
  --logo-bullet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='46 218.2 38.2 39.7'%3E%3Cg fill='none' stroke-linecap='round' stroke-width='2.6'%3E%3Cpath stroke='%23e19b0f' d='M80.387 241.59a73.5 73.5 0 0 0-25.997 14.554'/%3E%3Cpath stroke='%23e19b0f' d='M66.942 243.276a14.55 14.55 0 0 0-1.824-13.825'/%3E%3Cpath stroke='%23e19b0f' d='M47.67 219.896a131 131 0 0 0 34.828 9.952'/%3E%3C/g%3E%3C/svg%3E");

  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 78rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --section-space: clamp(4rem, 9vw, 7.5rem);
  --header-h: 4.5rem;

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Sur grand écran, tout le site grandit avec la fenêtre :
     16 px jusqu'à 1440 px de large, 18 px à 1920 px, 20 px au maximum. */
  font-size: clamp(100%, 0.4167vw + 0.625rem, 125%);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-kerning: normal;
  overflow-x: hidden;
}

@media (min-width: 64rem) {
  body { font-size: 1.125rem; }
}

img,
svg,
picture { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
  margin: 0;
  color: var(--navy);
  font-family: var(--font-display);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 2.2vw + 2rem, 4.5rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.005em;
}

h2 {
  font-size: clamp(2.05rem, 1.6vw + 1.55rem, 3rem);
  font-weight: 300;
  line-height: 1.06;
}

/* Textes courants justifiés, avec césure automatique (français) */
.hero__lede,
.lede,
.constat__text > p,
.w5__row > dd p,
.compare > p,
.how p,
.chart__text,
.porteur__text > p:not(.porteur__sign),
.step p:not(.step__status),
.cost p,
.budget__text,
.way p {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.nohyph { -webkit-hyphens: manual; hyphens: manual; }

h3 {
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.2;
}

p { margin: 0; }
p + p { margin-top: 1em; }

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--navy); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--sand); color: var(--navy); }

.lede {
  max-width: 68ch;
  color: var(--ink);
  font-size: 1.125em;
  line-height: 1.55;
}

.source {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-style: italic;
  font-weight: 300;
}

/* ---------- Mise en page ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-space);
  scroll-margin-top: var(--header-h);
}

.section--sand { background: var(--sand); }

/* Filet fin entre deux sections sur fond papier */
.section--rule > .wrap { position: relative; }
.section--rule > .wrap::before {
  content: "";
  position: absolute;
  top: calc(var(--section-space) * -1);
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid rgb(154 123 79 / 0.35);
}

/* ---------- Boutons ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--primary { background: var(--navy); color: var(--paper); }
.btn--primary:hover { background: var(--blue); color: var(--paper); }

.btn--secondary { border-color: var(--navy); background: transparent; color: var(--navy); }
.btn--secondary:hover { background: var(--navy); color: var(--paper); }

.btn--light { background: var(--paper); color: var(--navy); }
.btn--light:hover { background: var(--sand); color: var(--navy); }

.btn--ghost-light { border-color: rgb(255 254 252 / 0.7); background: transparent; color: var(--paper); }
.btn--ghost-light:hover { border-color: var(--paper); background: rgb(255 254 252 / 0.1); color: var(--paper); }

.btn--small { min-height: 2.5rem; padding: 0.45rem 1.1rem; font-size: 0.95rem; }

/* ---------- Lien d'évitement ---------- */
.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--navy);
  color: var(--paper);
  font-weight: 500;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--paper); }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid rgb(154 123 79 / 0.25);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand { display: block; flex: none; }
.brand img { width: auto; height: 2.9rem; }

.site-nav { display: none; }

/* Lien vers l'autre langue (EN sur la page française, FR sur la page anglaise),
   à droite du bouton Contact : pastille orange, texte bleu nuit (contraste
   5,79:1 ; un texte orange sur le papier n'atteindrait que 2,34:1). */
.site-header__inner > .btn { margin-left: auto; }
.lang-switch {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  margin-left: -0.75rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  background: var(--amber);
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.lang-switch:hover { background: var(--navy); color: var(--paper); }
/* Très petits écrans : logo un peu réduit pour que le logo, le bouton et
   le lien de langue tiennent sur une ligne */
@media (max-width: 23.99rem) {
  .site-header__inner { gap: 0.6rem; }
  .brand img { height: 2.4rem; }
  .lang-switch { margin-left: 0; padding: 0 0.6rem; }
}

@media (min-width: 60rem) {
  .site-header__inner > .btn { margin-left: 0; }
  .lang-switch { min-width: 2.9rem; min-height: 2.9rem; padding: 0 0.9rem; font-size: 1.05rem; }
  :root { --header-h: 5.5rem; }
  .brand img { height: 3.5rem; }
  .site-header .btn--small { min-height: 2.9rem; padding: 0.6rem 1.45rem; font-size: 1.05rem; }
  .site-nav { display: block; margin-left: auto; }
  .site-nav ul {
    display: flex;
    gap: clamp(1.25rem, 2.4vw, 2.75rem);
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .site-nav a {
    color: var(--ink);
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
  }
  .site-nav a:hover,
  .site-nav a[aria-current="page"] {
    color: var(--navy);
    text-decoration: underline;
    text-decoration-color: var(--amber);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.3em;
  }
}

/* ---------- Accueil ---------- */
.hero { position: relative; }

.hero__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}

.hero__inner { position: relative; padding-bottom: clamp(3rem, 8vw, 4rem); }
.hero__text { margin-top: 1rem; }
.hero__lede { max-width: 38rem; margin-top: 1.75rem; font-size: 1.125em; line-height: 1.55; -webkit-hyphens: manual; hyphens: manual; }
/* Titre sur deux lignes : « Un nouveau compromis » / « entre le vélo et la voiture »
   (sur les très petits écrans, le titre se répartit librement) */
@media (min-width: 23.4375rem) {
  .hero__line { display: block; }
}
/* Sous 375 px, sans césure, « PermaTechnologies » laisserait de grands blancs
   dans la première ligne justifiée : texte aligné à gauche */
@media (max-width: 23.4275rem) {
  .hero__lede { text-align: left; }
}

.hero__credit {
  margin: -0.5rem 0 0;
  padding-inline: var(--gutter);
  color: var(--muted);
  font-size: 0.75rem;
  font-style: italic;
  font-weight: 300;
  text-align: right;
}

@media (min-width: 40rem) and (max-width: 63.99rem) {
  .hero__media img { aspect-ratio: 16 / 10; }
}

/* Sur grand écran, l'illustration commence au niveau du premier lien du
   menu (« L'enjeu ») et se fond dans le papier. Le bloc de texte occupe
   l'espace restant à gauche : la taille du titre est calculée pour que
   « entre le vélo et la voiture » (environ 8,1 fois la taille du titre)
   tienne sur une ligne, et celle du texte suit la même largeur. */
@media (min-width: 64rem) {
  .hero {
    display: flex;
    align-items: center;
    min-height: clamp(36rem, 50vw, 48rem);
    --hero-col: calc(clamp(2.6rem, 2.2vw + 2rem, 4.5rem) * 8.3);
  }
  .hero__media {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: calc(max(var(--gutter), (100vw - var(--wrap)) / 2 + var(--gutter)) + var(--hero-col) + 1rem);
  }
  .hero__media picture,
  .hero__media img { height: 100%; }
  .hero__media img {
    width: 100%;
    aspect-ratio: auto;
    object-position: 25% 62%;
    -webkit-mask-image: linear-gradient(to right, transparent 0, rgb(0 0 0 / 0.7) 3%, #000 9%), linear-gradient(to bottom, #000 76%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent 0, rgb(0 0 0 / 0.7) 3%, #000 9%), linear-gradient(to bottom, #000 76%, transparent 100%);
    mask-composite: intersect;
  }
  .hero__inner { padding-block: 4rem; }
  .hero__text { max-width: var(--hero-col); margin-top: 0; }
  .hero__lede { margin-top: 2rem; }
  .hero__credit {
    position: absolute;
    right: 0;
    bottom: 0.75rem;
    margin: 0;
    color: var(--ink);
    text-shadow: 0 0 6px var(--paper), 0 0 3px var(--paper);
  }
}
/* Position exacte du premier lien du menu, commun aux deux pages
   (« L'essentiel », « Overview ») : bord droit de la zone de contenu, moins --nav-span
   (lien de langue, bouton Contact, écarts et trois liens du menu, mesurés
   en rem) et les --nav-gaps espaces entre les liens. Page française :
   32,86 rem ; page anglaise : 29,465 rem. */
@supports (width: 1cqw) {
  @media (min-width: 64rem) {
    .hero {
      container-type: inline-size;
      --nav-span: 32.86rem;
      --nav-gaps: 2;
      --hero-left: max(var(--gutter), (100cqw - var(--wrap)) / 2 + var(--gutter));
      --hero-edge: calc(100cqw - var(--hero-left) - var(--nav-span) - var(--nav-gaps) * clamp(1.25rem, 2.4vw, 2.75rem));
      --hero-col: calc(var(--hero-edge) - var(--hero-left) - 2rem);
    }
    .hero__media { left: var(--hero-edge); }
    .hero h1 { font-size: min(4.5rem, var(--hero-col) / 8.3); }
    .hero__lede { font-size: clamp(1rem, var(--hero-col) / 26, 1.3rem); }
    /* Version anglaise : « between bike and car » mesure environ 7,05 fois
       la taille du titre */
    .hero:lang(en) { --nav-span: 29.465rem; }
    .hero:lang(en) h1 { font-size: min(4.5rem, var(--hero-col) / 7.25); }
  }
}

/* ---------- Sélecteur de l'accueil : L'essentiel / Le projet en détail ---------- */
/* À la place des boutons de l'accueil. La page affichée est en bleu nuit ;
   main.js garde le sélecteur à la même hauteur d'écran d'une page à l'autre. */
.switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
  width: fit-content;
  max-width: 100%;
  margin: 2.5rem auto 0;
  padding: 0.3rem;
  border-radius: 999px;
  background: var(--sand);
  list-style: none;
}
.switch li { display: flex; }
.switch__opt {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.4rem clamp(1.25rem, 3vw, 2.5rem);
  border-radius: 999px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 0.5vw + 1.05rem, 1.45rem);
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.switch__opt:hover { background: rgb(255 254 252 / 0.7); }
.switch__opt[aria-current="page"] { background: var(--navy); color: var(--paper); }

/* Sommaire de la page détail, en bandeau sous l'accueil : six chapitres numérotés */
.chapters {
  padding-block: clamp(1.25rem, 2.6vw, 2rem);
  background: var(--sand);
  scroll-margin-top: var(--header-h);
}
.chapters__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: chap;
}
.chapters__list a {
  display: block;
  height: 100%;
  padding: 0.65rem 0 0.8rem;
  border-top: 2px solid rgb(0 39 115 / 0.2);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.15;
  text-decoration: none;
  transition: border-color 0.2s ease;
}
.chapters__list a::before {
  counter-increment: chap;
  content: counter(chap, decimal-leading-zero);
  content: counter(chap, decimal-leading-zero) / "";
  display: block;
  margin-bottom: 0.15rem;
  color: #7a4e00;
  font-size: 0.95rem;
  font-weight: 500;
}
.chapters__list a:hover,
.chapters__list a:focus-visible { border-top-color: var(--amber); }

@media (max-width: 39.99rem) {
  .switch { width: 100%; }
  .switch__opt { padding-inline: 0.6rem; white-space: normal; }
}
@media (min-width: 48rem) {
  .chapters__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .chapters__list { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 1.5rem; }
  .chapters__list a { font-size: 1.3rem; }
}
/* Sur ordinateur, le sélecteur suit la largeur de la colonne de texte de l'accueil */
@media (min-width: 64rem) and (max-width: 79.99rem) {
  .hero .switch__opt { padding-inline: 0.9rem; font-size: 1.15rem; }
}
@supports (width: 1cqw) {
  @media (min-width: 64rem) {
    .hero .switch__opt {
      padding-inline: clamp(0.9rem, var(--hero-col) / 16, 2.5rem);
      font-size: clamp(1.15rem, var(--hero-col) / 22, 1.45rem);
    }
  }
}

/* ---------- Chiffres (constat et usager) ---------- */
.figures {
  display: grid;
  gap: 1.75rem 2rem;
  margin: 2.5rem 0 0;
}

.figure { --line: var(--amber); padding-top: 0.9rem; border-top: 2px solid var(--line); }

.figure__value {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 2vw + 1.9rem, 3.5rem);
  font-weight: 300;
  line-height: 1;
  white-space: nowrap;
}

.figure dd {
  max-width: 24ch;
  margin: 0.5rem 0 0;
  color: var(--ink);
  font-size: 0.975rem;
  line-height: 1.45;
}

@media (min-width: 36rem) {
  .figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .figures--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 64rem) {
  .figures--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Le constat ---------- */
.constat { display: grid; gap: 3.5rem; }
.constat__title { margin-bottom: 1.75rem; }
.constat__text > p { max-width: 66ch; }

.conclusion {
  -webkit-hyphens: manual;
  hyphens: manual;
  max-width: 34em;
  margin-top: 2.5rem;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 0.8vw + 1.2rem, 1.85rem);
  font-weight: 300;
  line-height: 1.3;
}

.sources { margin-top: 2rem; color: var(--muted); font-size: 0.875rem; }
.sources__title { font-weight: 500; }
.sources ul { margin: 0.35rem 0 0; padding: 0; list-style: none; }
.sources li { margin-top: 0.2rem; }
.sources a { color: var(--muted); }
.sources a:hover { color: var(--navy); }

@media (min-width: 64rem) {
  .constat {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 4rem;
    align-items: start;
  }
  .constat .figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chart--reach { position: sticky; top: calc(var(--header-h) + 2rem); margin-top: 0.5rem; }
}

/* ---------- Graphiques en barres (communs) ---------- */
.chart { max-width: 38rem; margin: 0; }
.chart__svg { width: 100%; height: auto; overflow: visible; }

.chart__axis line { stroke: var(--tan-strong); stroke-width: 1.5; }
.chart__axis text {
  fill: var(--muted);
  font-family: var(--font-display);
  font-size: 16px;
  text-anchor: middle;
}

.chart__bar--bike { fill: var(--tan); }
.chart__bar--vi { fill: var(--amber); }
.chart__bar--ink { fill: var(--ink); }
/* Voiture thermique : le rouge de la 2CV de l'illustration */
.chart__bar--thermal { fill: #d72c2f; }

.chart__markers line { stroke: var(--navy); stroke-width: 1.25; stroke-dasharray: 4 5; }
.chart__marker-value { fill: var(--navy); font-family: var(--font-display); font-size: 21px; font-weight: 500; }
.chart__marker-label { fill: var(--muted); font-family: var(--font-display); font-size: 17px; }

.chart__label,
.chart__marker-value,
.chart__marker-label {
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 5px;
  stroke-linejoin: round;
}
.chart__label { fill: var(--ink); font-family: var(--font-display); font-size: 19px; font-weight: 500; }
.chart__label--vi { fill: var(--navy); }
.chart__value { fill: var(--ink); font-family: var(--font-display); font-size: 18px; font-weight: 500; }
.chart__value--vi { fill: var(--navy); }

.chart figcaption,
.chart__note {
  max-width: 46ch;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.45;
}

/* Légendes des deux graphiques : même largeur que le tracé, de l'origine
   des barres (x = 40 sur 480) au bout de l'axe (465 ou 440 sur 480) */
.chart > figcaption:not(.chart__title),
.chart__note { max-width: none; margin-left: 8.333%; text-align: justify; }
.chart--reach > figcaption { margin-right: 3.125%; }
.chart--energy .chart__note { margin-right: 8.333%; }

.chart__title {
  margin: 0 0 1rem;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.25;
  text-wrap: balance;
}
.chart .chart__title { max-width: none; font-style: normal; color: var(--navy); font-size: 1.35rem; font-weight: 500; }

.chart__text { margin-top: 1.25rem; max-width: 46ch; }

/* Animations d'apparition : actives seulement à l'écran, si le script tourne
   et si l'appareil n'a pas demandé de réduire les animations.
   Sans script, ou à l'impression, tout est affiché d'emblée. */
@media screen and (prefers-reduced-motion: no-preference) {
  /* Barres des graphiques : croissance de gauche à droite */
  .js .chart__bar,
  .js .cost__bar { transform: scaleX(0); transform-box: fill-box; transform-origin: left center; }
  .js .chart__value,
  .js .cost__value { opacity: 0; }
  .js .chart.is-visible .chart__bar,
  .js .cost.is-visible .cost__bar { transform: scaleX(1); transition: transform 1.1s cubic-bezier(0.33, 0, 0.2, 1); }
  .js .chart.is-visible .chart__bar--vi { transition-delay: 0.35s; transition-duration: 1.3s; }
  .js .chart.is-visible .chart__value { opacity: 1; transition: opacity 0.4s ease 1.2s; }
  .js .chart.is-visible .chart__value--vi { transition-delay: 1.6s; }
  .js .cost.is-visible .cost__bar:nth-of-type(2) { transition-delay: 0.2s; }
  .js .cost.is-visible .cost__bar:nth-of-type(3) { transition-delay: 0.45s; }
  .js .cost.is-visible .cost__bar:nth-of-type(4) { transition-delay: 0.65s; transition-duration: 1.4s; }
  .js .cost.is-visible .cost__value { opacity: 1; transition: opacity 0.4s ease 1.3s; }

  /* Filets des chiffres clés : tracé de gauche à droite, puis apparition du chiffre */
  .js .figures .figure,
  .js .facts > div,
  .js .how-grid .how {
    border-top-color: transparent;
    background-image: linear-gradient(var(--line), var(--line));
    background-repeat: no-repeat;
    background-origin: border-box;
    background-position: 0 0;
    background-size: 0 2px;
  }
  .js .figures.is-visible .figure,
  .js .facts.is-visible > div,
  .js .how-grid.is-visible .how { background-size: 100% 2px; transition: background-size 0.9s cubic-bezier(0.33, 0, 0.2, 1); }
  .js .figure__value,
  .js .facts dt { opacity: 0; transform: translateY(0.35em); }
  .js .figures.is-visible .figure__value,
  .js .facts.is-visible dt { opacity: 1; transform: none; transition: opacity 0.6s ease 0.35s, transform 0.6s ease 0.35s; }
  .js .figures.is-visible .figure:nth-child(2),
  .js .facts.is-visible > div:nth-child(2),
  .js .how-grid.is-visible .how:nth-child(2) { transition-delay: 0.15s; }
  .js .figures.is-visible .figure:nth-child(3),
  .js .how-grid.is-visible .how:nth-child(3) { transition-delay: 0.3s; }
  .js .figures.is-visible .figure:nth-child(4),
  .js .how-grid.is-visible .how:nth-child(4) { transition-delay: 0.45s; }
  .js .figures.is-visible .figure:nth-child(2) .figure__value,
  .js .facts.is-visible > div:nth-child(2) dt { transition-delay: 0.5s; }
  .js .figures.is-visible .figure:nth-child(3) .figure__value { transition-delay: 0.65s; }
  .js .figures.is-visible .figure:nth-child(4) .figure__value { transition-delay: 0.8s; }

  /* Bandeau du chiffre clé : la phrase monte, puis les deux chiffres s'allument */
  .js .claim .claim__text { opacity: 0; transform: translateY(0.4em); }
  .js .claim.is-visible .claim__text { opacity: 1; transform: none; transition: opacity 0.8s ease, transform 0.8s ease; }
  .js .claim .claim__num { color: var(--paper); }
  .js .claim.is-visible .claim__num { color: var(--amber); transition: color 0.8s ease 0.7s; }

  /* Synthèse du budget : apparition du chiffre clé */
  .js .budget .budget__big,
  .js .budget .budget__big-label { opacity: 0; transform: translateY(0.4em); }
  .js .budget.is-visible .budget__big,
  .js .budget.is-visible .budget__big-label { opacity: 1; transform: none; transition: opacity 0.7s ease 0.5s, transform 0.7s ease 0.5s; }

  /* Concept art : le véhicule entre par la gauche, puis repart vers la droite
     quand on descend vers les textes */
  .js .sketch picture { transform: translateX(-120vw); transition: transform 1.6s cubic-bezier(0.16, 0.7, 0.3, 1); }
  .js .sketch.is-in picture { transform: none; }
  .js .sketch.is-out picture { transform: translateX(120vw); transition: transform 1.3s cubic-bezier(0.6, 0, 0.8, 0.3); }
  .js .sketch.is-reset picture { transform: translateX(-120vw); transition: none; }

  /* Règles de la comparaison 2CV / Tesla : tracé de gauche à droite */
  .js .cars__figure .ruler { clip-path: inset(-12px 100% -12px -2px); }
  .js .cars__figure.is-visible .ruler { clip-path: inset(-12px -2px -12px -2px); transition: clip-path 1s cubic-bezier(0.33, 0, 0.2, 1); }
  .js .cars__figure.is-visible .ruler--2cv { transition-delay: 0.35s; }

  /* Frise d'avancement : étapes révélées l'une après l'autre, puis le trait qui les relie */
  .js .timeline .step { opacity: 0; transform: translateY(0.6rem); }
  .js .timeline .step::before { transform: scaleY(0); transform-origin: top; }
  .js .timeline.is-visible .step { opacity: 1; transform: none; transition: opacity 0.5s ease var(--d, 0s), transform 0.5s ease var(--d, 0s); }
  .js .timeline.is-visible .step::before { transform: scaleY(1); transition: transform 0.45s ease calc(var(--d, 0s) + 0.3s); }
  .timeline .step:nth-child(2) { --d: 0.18s; }
  .timeline .step:nth-child(3) { --d: 0.36s; }
  .timeline .step:nth-child(4) { --d: 0.54s; }
  .timeline .step:nth-child(5) { --d: 0.72s; }
  .timeline .step:nth-child(6) { --d: 0.9s; }
  .timeline .step:nth-child(7) { --d: 1.08s; }
  .timeline .step:nth-child(8) { --d: 1.26s; }

  /* Listes à puces : les traits du logo apparaissent un à un */
  .js .ticks li::before { opacity: 0; transform: translateX(-0.4rem); }
  .js .ticks.is-visible li::before { opacity: 1; transform: none; transition: opacity 0.4s ease, transform 0.4s ease; }
  .js .ticks.is-visible li:nth-child(2)::before { transition-delay: 0.12s; }
  .js .ticks.is-visible li:nth-child(3)::before { transition-delay: 0.24s; }
  .js .ticks.is-visible li:nth-child(4)::before { transition-delay: 0.36s; }
}

/* ---------- Le véhicule (format 5W) ---------- */
#vehicule { overflow-x: clip; }
#vehicule h2 { margin-bottom: 2rem; }

.sketch { margin: 0 0 3rem; max-width: 64rem; }
.specs-list strong { color: var(--navy); font-weight: 500; }
.sketch img { width: 100%; }
.sketch figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.8rem; font-style: italic; font-weight: 300; }

.w5 { margin: 0; border-top: 1px solid rgb(154 123 79 / 0.4); }
.w5__row {
  display: grid;
  gap: 0.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid rgb(154 123 79 / 0.4);
}
.w5__row > dt {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 1vw + 1.5rem, 2.4rem);
  font-weight: 300;
  line-height: 1.05;
}
.w5__row > dd { margin: 0; max-width: 72ch; }
.w5__row > dd > p + p { margin-top: 0.9em; }
.w5__row--how > dd { max-width: none; }
.w5__row:last-child { border-bottom: 0; }
.w5__lead { max-width: 72ch; }

@media (min-width: 48rem) {
  .w5__row { grid-template-columns: 9.5rem minmax(0, 1fr); gap: 2rem; padding: 2rem 0; }
}

.compare { margin-top: 2.25rem; max-width: 64rem; }
.compare h3 { margin-bottom: 0.25rem; }

.how-grid {
  display: grid;
  gap: 2.25rem 4rem;
  margin-top: 3rem;
}
@media (min-width: 52rem) {
  .how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.how { --line: var(--amber); padding-top: 1rem; border-top: 2px solid var(--line); }
.how h3 { font-size: 1.3rem; }
.how p { margin-top: 0.6rem; }

.compare > p { margin-top: 0.5rem; max-width: 72ch; }

.table-scroll { margin-top: 1.5rem; overflow-x: auto; }
.table-scroll:focus-visible { outline-offset: 4px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.975rem;
  line-height: 1.45;
}

th,
td {
  padding: 0.95rem 0.75rem 0.95rem 0;
  border-bottom: 1px solid rgb(154 123 79 / 0.45);
  text-align: left;
  vertical-align: top;
}

thead th {
  padding-top: 0;
  border-bottom: 2px solid var(--navy);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
}

tbody th {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Tableau de comparaison avec le vélomobile :
   critères en bleu nuit, colonne PermaTechnologies mise en valeur par
   l'orange de la palette (comme les barres de l'USV dans les graphiques),
   texte courant sans gras */
.compare__table { border-collapse: separate; border-spacing: 0; }
.compare__table th,
.compare__table td { padding: 0.9rem 1rem; }
.compare__table thead th { padding: 0.6rem 1rem; border-bottom: 0; font-size: 1rem; letter-spacing: 0.06em; text-transform: uppercase; }
.compare__table thead th:first-child { padding-left: 0; }
.compare__table thead th:nth-child(2) { color: var(--muted); border-bottom: 2px solid var(--tan-strong); }
.compare__table thead th:last-child { background: var(--amber); color: var(--navy); border-radius: 0.4rem 0.4rem 0 0; }
.compare__table tbody th { width: 8.5rem; padding-left: 0; color: var(--navy); font-family: var(--font-display); font-size: 1.3rem; font-weight: 400; line-height: 1.2; white-space: nowrap; }
.compare__table tbody td { color: var(--ink); font-weight: 400; }
.compare__table tbody td:nth-child(2) { color: var(--muted); }
.compare__table tbody td:last-child { background: #fbf0db; border-bottom-color: rgb(225 155 15 / 0.35); }
.compare__table tbody tr:last-child td:last-child { border-bottom: 2px solid var(--amber); }
.compare__table .point { display: block; }
.compare__table .point + .point { margin-top: 0.55rem; }

/* Sur téléphone, chaque critère devient un bloc : la description du vélomobile,
   puis celle de PermaTechnologies dans un encadré teinté */
@media (max-width: 39.99rem) {
  .compare__table,
  .compare__table tbody,
  .compare__table tr,
  .compare__table th,
  .compare__table td { display: block; }
  .compare__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .compare__table tbody tr { padding: 1.25rem 0; border-bottom: 1px solid rgb(154 123 79 / 0.45); }
  .compare__table tbody th,
  .compare__table tbody td { width: auto; padding: 0; border: 0; }
  .compare__table tbody th { margin-bottom: 0.6rem; }
  .compare__table tbody td:last-child { margin-top: 0.75rem; padding: 0.75rem 0.9rem; border: 0; border-left: 3px solid var(--amber); border-radius: 0 0.3rem 0.3rem 0; }
  .compare__table tbody tr:last-child td:last-child { border-bottom: 0; }
  .compare__table tbody td::before {
    display: block;
    margin-bottom: 0.25rem;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .compare__table tbody td:nth-child(2)::before { content: "Vélomobile actuel"; color: var(--muted); }
  .compare__table tbody td:last-child::before { content: "PermaTechnologies"; color: var(--navy); }
  /* Version anglaise */
  .compare__table:lang(en) tbody td:nth-child(2)::before { content: "Current velomobile"; }
}

/* Tableau du budget : la colonne PermaTechnologies reste en bleu nuit */
.budget__table tbody td:last-child { color: var(--navy); font-weight: 500; }

/* Listes à puces : les trois traits du logo PermaTechnologies */
.ticks {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}
.ticks li {
  position: relative;
  padding: 0.7rem 0 0.7rem 2rem;
  border-bottom: 1px solid rgb(154 123 79 / 0.3);
}
.ticks li::before,
.legal li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  width: 1.15rem;
  height: 1.2rem;
  background: var(--logo-bullet) no-repeat center / contain;
}

/* ---------- Du SUV à l'USV ---------- */
/* Titre et, à sa droite, la définition de l'USV en petit (sous le titre
   quand la place manque, toujours calée à droite) */
.sobriete__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-bottom: 1.25rem;
}
.sobriete__def {
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: right;
  -webkit-hyphens: manual;
  hyphens: manual;
}

.sobriete__grid { display: grid; gap: 3.5rem; margin-top: 3rem; }
@media (min-width: 64rem) {
  .sobriete__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 4rem; align-items: start; }
}

.cars__figure { margin: 0; }
.cars__stage { position: relative; }
.cars__stage img { width: 100%; }
.cars__rulers { position: relative; height: 4.6rem; margin-top: 0.25rem; }
.ruler {
  position: absolute;
  height: 2.1rem;
  border-top: 1.5px solid var(--navy);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.ruler::before,
.ruler::after { content: ""; position: absolute; top: -6px; height: 10px; border-left: 1.5px solid var(--navy); }
.ruler::before { left: 0; }
.ruler::after { right: 0; }
.ruler span { position: absolute; top: 0.3rem; right: 0; }
.ruler--tesla { top: 0; left: 10.72%; width: 78.6%; }
.ruler--2cv { top: 2.3rem; left: 29.12%; width: 60.19%; color: var(--amber-text); border-top-color: var(--amber-text); }
.ruler--2cv::before,
.ruler--2cv::after { border-left-color: var(--amber-text); }

.cars figcaption { margin-top: 0.75rem; color: var(--muted); font-size: 0.9rem; font-style: italic; font-weight: 300; }

.facts { display: grid; gap: 1.25rem 2rem; margin: 2rem 0 0; }
@media (min-width: 36rem) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.facts > div { --line: var(--amber); padding-top: 0.75rem; border-top: 2px solid var(--line); }
.facts dt { color: var(--navy); font-family: var(--font-display); font-size: clamp(2.2rem, 1.5vw + 1.7rem, 2.9rem); font-weight: 300; line-height: 1; }
.facts dd { margin: 0.4rem 0 0; max-width: 26ch; font-size: 0.975rem; line-height: 1.45; }

.chart--energy { max-width: 36rem; }

/* ---------- Pour l'usager ---------- */
#usager h2 { margin-bottom: 1rem; }

/* Synthèse : budget mensuel d'une voiture et du véhicule */
.budget { margin-top: clamp(3rem, 6vw, 4.5rem); }
.budget__title { margin-bottom: 1.25rem; font-size: clamp(1.5rem, 0.8vw + 1.25rem, 1.9rem); font-weight: 400; }
.budget__grid { display: grid; gap: 2.5rem; }
@media (min-width: 48rem) {
  .budget__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2.5rem, 6vw, 5.5rem); align-items: start; }
  /* Colonne du chiffre clé centrée verticalement sur la hauteur du tableau */
  .budget__result { align-self: center; }
}
.budget__detail { padding: 1.25rem; background: #fff; box-shadow: 0 1px 3px rgb(0 39 115 / 0.08); }
@media (min-width: 40rem) {
  .budget__detail { padding: 1.75rem 2rem; }
}
.budget__table th,
.budget__table td { padding: 0.5rem 0 0.5rem 0.75rem; border-bottom-color: rgb(0 39 115 / 0.18); }
.budget__table th:first-child { padding-left: 0; }
.budget__table thead th { padding-top: 0; border-bottom: 2px solid var(--navy); font-size: 1.05rem; }
.budget__table thead th + th,
.budget__table td { text-align: right; }
.budget__table td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.budget__table tbody th { color: var(--ink); font-family: var(--font-body); font-size: 0.975rem; font-weight: 400; white-space: normal; }
.budget__table tbody td:nth-child(2) { color: #4d463d; }
.budget__table tfoot th,
.budget__table tfoot td { padding-top: 0.7rem; border-top: 2px solid var(--navy); border-bottom: 0; color: var(--navy); font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; white-space: normal; }
.budget__table tfoot td:nth-child(2) { color: #4d463d; }
.budget__note { margin-top: 0.6rem; color: #4d463d; font-size: 0.85rem; font-style: italic; font-weight: 300; }
.budget__result { padding-top: 0.25rem; }
.budget__big { color: var(--navy); font-family: var(--font-display); font-size: clamp(4.5rem, 4vw + 3rem, 7rem); font-weight: 300; line-height: 0.9; }
.budget__big-label { margin-top: 0.5rem; color: var(--navy); font-family: var(--font-display); font-size: clamp(1.35rem, 0.6vw + 1.15rem, 1.7rem); font-weight: 400; line-height: 1.2; }
.budget__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1.5rem; margin: 1.75rem 0 0; }
.budget__facts > div { padding-top: 0.6rem; border-top: 2px solid var(--navy); }
.budget__facts dt { color: var(--navy); font-family: var(--font-display); font-size: clamp(2rem, 1vw + 1.6rem, 2.6rem); font-weight: 300; line-height: 1; }
.budget__facts dd { margin: 0.35rem 0 0; font-size: 0.95rem; line-height: 1.4; }
.budget__text { margin-top: 1.5rem; }

/* Bandeau du chiffre clé, entre « Du SUV à l'USV » et « Pour l'usager » */
.claim { padding-block: clamp(3.5rem, 7vw, 6rem); background: var(--navy); color: var(--paper); }
.claim__text {
  max-width: 26em;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 2.4vw + 1.1rem, 3.4rem);
  font-weight: 300;
  line-height: 1.15;
  text-wrap: balance;
}
.claim__num { color: var(--amber); font-size: 1.3em; font-weight: 400; white-space: nowrap; }
.claim__actions { margin-top: 2rem; }
/* « Moins cher à l'achat comme à l'usage » : titre puis deux chiffres en ambre */
.claim__value {
  display: grid;
  gap: 1.25rem 2rem;
  margin-top: clamp(2.25rem, 4vw, 3.25rem);
}
.claim__title {
  color: var(--paper);
  font-size: clamp(1.6rem, 1vw + 1.3rem, 2.2rem);
  font-weight: 400;
  line-height: 1.1;
}
.claim__figures { display: grid; gap: 1.5rem 2rem; margin: 0; }
.claim__figures > div { padding-top: 0.75rem; border-top: 2px solid var(--amber); }
.claim__figures dt {
  color: var(--amber);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 2vw + 1.9rem, 3.5rem);
  font-weight: 300;
  line-height: 1;
  white-space: nowrap;
}
.claim__figures dd { max-width: 36ch; margin: 0.5rem 0 0; color: var(--sand); }
@media (min-width: 40rem) {
  .claim__figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .claim__value { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; }
  .claim__title { padding-top: 0.75rem; }
}
/* Sur ordinateur, la phrase tient sur deux lignes : la taille suit la largeur disponible */
@media (min-width: 64rem) {
  .claim__text { max-width: none; font-size: min(3.5vw, 2.75rem); }
}
#usager .figure { --line: var(--navy); }
#usager .source { color: #4d463d; }
#usager .source a { color: #4d463d; }

/* ---------- Le porteur de projet ---------- */
.porteur { display: grid; gap: 2.5rem; }

.porteur__photo { margin: 0; max-width: 22rem; }
.porteur__photo img { width: 100%; aspect-ratio: 470 / 627; object-fit: cover; }

.porteur__text h2 { margin-bottom: 1.5rem; }
.porteur__text > p { max-width: 70ch; }

.porteur__sign {
  margin-top: 1rem;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: normal;
}
/* Cadre CYFAC : sous le texte sur téléphone et tablette, sous le portrait sur ordinateur */
.porteur__work { margin: 0; max-width: 30rem; }
.porteur__work figcaption { margin-top: 0.6rem; color: var(--muted); font-size: 0.9rem; font-style: italic; font-weight: 300; }

.cv { margin: 0; }
.cv > div {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 0;
  border-top: 1px solid rgb(154 123 79 / 0.4);
}
.cv > div:last-child { border-bottom: 1px solid rgb(154 123 79 / 0.4); }
.cv dt { color: var(--navy); font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; }
.cv dd { margin: 0; }

@media (min-width: 40rem) {
  .cv > div { grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1.5rem; }
}

@media (min-width: 56rem) {
  /* Ligne 1 : portrait et texte ; ligne 2 : photo CYFAC et parcours, alignés en haut */
  .porteur {
    grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
    gap: 2rem clamp(3rem, 6vw, 5.5rem);
    align-items: start;
  }
  .porteur__photo { grid-column: 1; grid-row: 1; }
  .porteur__text { grid-column: 2; grid-row: 1; }
  .porteur__work { grid-column: 1; grid-row: 2; }
  .porteur > .cv { grid-column: 2; grid-row: 2; margin: 0; }
}

/* ---------- Avancement ---------- */
.avancement { display: grid; gap: 3rem; }
.avancement__text h2 { margin-bottom: 1rem; }

.timeline {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  padding: 0 0 2rem 2.25rem;
}
.step:last-child { padding-bottom: 0; }

/* Trait vertical reliant les étapes */
.step::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0.35rem;
  bottom: -0.35rem;
  border-left: 1.5px solid var(--tan-strong);
}
.step:last-child::before { display: none; }

/* Pastille d'état */
.step::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--tan-strong);
  border-radius: 50%;
  background: var(--paper);
}
.step--done::after { border-color: var(--green); background: var(--green); }
.step--current::after { border-color: var(--amber-text); background: linear-gradient(90deg, var(--amber) 50%, var(--paper) 50%); }
.step--goal::after { border-color: var(--navy); background: var(--navy); }

.step__status {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.6;
}
.step--done .step__status { color: var(--green); }
.step--current .step__status { color: var(--amber-text); }
.step--goal .step__status { color: var(--navy); }

.step h3 { font-size: 1.3rem; }
.step p + h3,
.step h3 + p { margin-top: 0.3rem; }
.step h3 + p { max-width: 66ch; }

.avancement__side { display: grid; gap: 2.25rem; }
.avancement__photo { margin: 0; }
.avancement__photo figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  font-weight: 300;
}

@media (min-width: 56rem) {
  .avancement { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(3rem, 6vw, 5rem); align-items: start; }
  .avancement__side { position: sticky; top: calc(var(--header-h) + 2rem); margin-top: 7rem; }
}

.cost { padding: 1.25rem; background: var(--sand); }
@media (min-width: 40rem) { .cost { padding: 1.5rem; } }
.cost h3 { font-size: 1.35rem; }
.cost p { margin-top: 0.6rem; font-size: 0.975rem; line-height: 1.5; }
.cost__chart { width: 100%; max-width: 28rem; height: auto; margin-top: 1.25rem; overflow: visible; }
.cost__group { fill: var(--navy); font-family: var(--font-display); font-size: 20px; font-weight: 500; }
.cost__bar--in { fill: var(--navy); }
.cost__bar--out { fill: var(--amber); }
.cost__value { fill: var(--ink); font-family: var(--font-display); font-size: 18.5px; }

/* ---------- Prix, financement et accompagnement (accueil) ---------- */
/* Bandeau du lauréat : fond bleu nuit, symbole du logo en filigrane,
   deux médailles cerclées d'ambre */
.soutiens__grid { display: grid; margin-top: 2.5rem; }
.laureat {
  position: relative;
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 2rem 1.5rem;
  overflow: hidden;
  background: var(--navy);
  color: var(--paper);
}
.laureat__mark {
  position: absolute;
  right: -5rem;
  bottom: -6rem;
  width: 22rem;
  opacity: 0.2;
  pointer-events: none;
}
.laureat__text,
.medals { position: relative; }
.laureat__label {
  color: var(--amber);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.laureat h3 {
  margin-top: 0.6rem;
  color: var(--paper);
  font-size: clamp(2.2rem, 2vw + 1.6rem, 3.3rem);
  font-weight: 300;
  line-height: 1.02;
}
.laureat__note { margin-top: 1rem; color: var(--sand); font-size: 0.9rem; font-style: italic; font-weight: 300; }

.medals {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Chaque prix : la médaille, et sous elle le logo de la structure qui le
   porte, sur une étiquette blanche (logos en couleur sur fond clair,
   comme le demandent leurs chartes) */
.medal-item {
  display: flex;
  flex: 0 1 8.75rem;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.medal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 0.75rem;
  border: 2px solid var(--amber);
  border-radius: 50%;
  background: var(--navy);
  box-shadow: inset 0 0 0 5px var(--navy), inset 0 0 0 6px rgb(225 155 15 / 0.55);
  text-align: center;
}
.medal small { color: var(--amber); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.medal strong { margin-top: 0.3rem; font-family: var(--font-display); font-size: 1.2rem; font-weight: 400; line-height: 1.05; text-wrap: balance; }
.medal__sponsor {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.6rem;
  margin-top: -1.3rem;
  padding: 0 0.7rem;
  border-radius: 0.35rem;
  background: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.3);
}
.medal__sponsor img { display: block; width: auto; }
.medal__sponsor--rna img { height: 2.4rem; }
.medal__sponsor--bpi img { height: 1.25rem; }

.supports { display: grid; gap: 1.75rem; margin-top: 2.25rem; }
.support { padding-top: 0.9rem; border-top: 2px solid var(--amber); }
/* Étiquette en ambre foncé : 5,39:1 sur le papier comme sur le sable */
.support__label { color: #7a4e00; font-size: 0.85rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.support h3 { margin-top: 0.35rem; font-size: 1.9rem; font-weight: 400; }
.support p:not(.support__label) { max-width: 52ch; margin-top: 0.6rem; }

/* Très petits écrans : les deux médailles restent côte à côte */
@media (max-width: 23.99rem) {
  .laureat { padding: 1.75rem 1.25rem; }
  .medal { padding: 0.5rem; box-shadow: inset 0 0 0 4px var(--navy), inset 0 0 0 5px rgb(225 155 15 / 0.55); }
  .medal strong { font-size: 1rem; }
  .medal__sponsor { height: 2.25rem; margin-top: -1.1rem; padding: 0 0.5rem; }
  .medal__sponsor--rna img { height: 2.1rem; }
  .medal__sponsor--bpi img { height: 1.05rem; }
}
@media (min-width: 40rem) {
  .laureat__mark { right: -6rem; bottom: -9rem; width: 28rem; }
  .medal-item { flex: 0 0 10.5rem; }
  .medal { padding: 1.25rem; box-shadow: inset 0 0 0 6px var(--navy), inset 0 0 0 7px rgb(225 155 15 / 0.55); }
  .medal small { font-size: 0.75rem; }
  .medal strong { font-size: 1.45rem; }
}
@media (min-width: 48rem) {
  .supports { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 4.5rem); }
}
/* Sur ordinateur : le bandeau garde la composition verticale du téléphone,
   dans un panneau à gauche ; la bourse et l'accompagnement passent à droite.
   Le symbole est placé en proportion du panneau, comme sur téléphone. */
@media (min-width: 64rem) {
  .soutiens__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 4.5vw, 4.5rem);
    align-items: center;
  }
  .laureat { gap: 2.75rem; padding: 3rem 2.75rem 3.25rem; }
  .laureat h3 { max-width: 8.5em; font-size: clamp(2.8rem, 2.4vw + 1.2rem, 3.6rem); }
  .laureat__mark { top: 24%; right: -23%; bottom: auto; width: 103%; }
  .medal-item { flex-basis: 11.5rem; }
  .medal__sponsor { height: 2.9rem; margin-top: -1.45rem; }
  .medal__sponsor--rna img { height: 2.7rem; }
  .medal__sponsor--bpi img { height: 1.4rem; }
  .supports { grid-template-columns: none; row-gap: 2.5rem; margin-top: 0; }
}

.partners__title {
  margin-top: 3.5rem;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}
.partners__title + .logos { margin-top: 1rem; }

.logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 3rem 0 0;
  padding: 1rem 0;
  list-style: none;
  border-top: 1px solid rgb(154 123 79 / 0.35);
  border-bottom: 1px solid rgb(154 123 79 / 0.35);
}

.logos__item {
  display: flex;
  flex: 0 0 50%;
  align-items: center;
  justify-content: center;
  min-height: 7rem;
  padding: 1.25rem 1rem;
}

.logos__item img { width: auto; max-width: 100%; }
/* Le fichier de la Région inclut sa zone de protection (1/3 de la hauteur
   du blason, charte 2026) : il paraît donc plus petit à hauteur égale */
.logos__item--rna img { height: 4.6rem; }
.logos__item--bpi img { height: 2.2rem; }
.logos__item--oci img { height: 3.9rem; }
.logos__item--pepite img { height: 3.4rem; }
.logos__item--up img { height: 4rem; }
.logos__item--lru img { height: 3.75rem; }
.logos__item--iut img { height: 3.1rem; }
.logos__item--gmp img { height: 2.75rem; }

@media (min-width: 40rem) {
  .logos__item { flex-basis: 33.333%; }
}

/* Sur ordinateur, deux rangées de quatre logos */
@media (min-width: 64rem) {
  .logos { padding: 0; }
  .logos__item { flex-basis: 25%; min-height: 8.5rem; padding: 1.5rem 1.25rem; }
  .logos__item + .logos__item { border-left: 1px solid rgb(154 123 79 / 0.3); }
  .logos__item:nth-child(4n+1) { border-left: 0; }
  .logos__item:nth-child(n+5) { border-top: 1px solid rgb(154 123 79 / 0.3); }
  .logos__item--rna img { height: 4.9rem; }
  .logos__item--bpi img { height: 2.35rem; }
  .logos__item--oci img { height: 4.1rem; }
  .logos__item--pepite img { height: 3.4rem; }
  .logos__item--up img { height: 4.1rem; }
  .logos__item--lru img { height: 3.9rem; }
  .logos__item--iut img { height: 3.2rem; }
  .logos__item--gmp img { height: 2.8rem; }
}

/* ---------- Rejoindre le projet ---------- */
.rejoindre__intro h2 { margin-bottom: 1.25rem; }
.rejoindre__intro .lede { max-width: none; }

.ways {
  display: grid;
  gap: 0;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}

.way {
  display: flex;
  flex-direction: column;
  padding: 1.75rem 0;
  border-top: 1px solid rgb(0 39 115 / 0.25);
}
.way:last-child { border-bottom: 1px solid rgb(0 39 115 / 0.25); }
.way p { margin-top: 0.6rem; }

.way__link {
  align-self: flex-start;
  margin-top: 1rem;
  color: var(--navy);
  font-weight: 500;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 2px;
}
.way__link:hover { text-decoration-color: var(--navy); }

@media (min-width: 48rem) {
  .ways { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 4.5rem); }
  .way:nth-last-child(2) { border-bottom: 1px solid rgb(0 39 115 / 0.25); }
  .way { padding: 2rem 0; }
  .way p { flex: 1; }
}

/* ---------- Inscription à la liste de diffusion ---------- */
/* Carte blanche sous les quatre façons de rejoindre le projet. Les classes
   inf-* viennent du formulaire Infomaniak (messages d'erreur, succès). */
.signup {
  display: grid;
  gap: 1.5rem 3rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-top: 4px solid var(--amber);
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 39 115 / 0.1), 0 8px 24px rgb(0 39 115 / 0.06);
}
.signup h3 { font-size: clamp(1.7rem, 1.2vw + 1.35rem, 2.3rem); font-weight: 400; line-height: 1.1; text-wrap: balance; }
.signup__intro p { margin-top: 0.75rem; }
.signup__row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.signup .inf-input { flex: 1 1 15rem; }
.signup input[type="email"] {
  width: 100%;
  min-height: 3rem;
  padding: 0.6rem 1.1rem;
  border: 1.5px solid var(--tan-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.signup input[type="email"]::placeholder { color: var(--muted); opacity: 1; }
.signup .inf-submit input {
  min-height: 3rem;
  padding: 0.7rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.signup .inf-submit input:hover { background: var(--blue); }
.signup .inf-submit input.disabled { opacity: 0.6; cursor: progress; }
.signup .inf-rgpd { margin-top: 0.9rem; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
/* Messages renvoyés par Infomaniak */
.signup .inf-message { display: block; margin: 0.45rem 1.1rem 0; color: #a3001b; font-size: 0.9rem; }
.signup .inf-error input[type="email"] { border-color: #a3001b; }
.signup .inf-success p { padding: 1rem 1.25rem; border-left: 4px solid var(--green); background: rgb(48 87 39 / 0.08); }
.signup .inf-success strong { color: var(--green); }
@media (max-width: 39.99rem) {
  .signup .inf-submit { flex: 1 1 100%; }
  .signup .inf-submit input { width: 100%; }
}
@media (min-width: 64rem) {
  .signup { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; }
}

/* ---------- Contact ---------- */
.contact {
  position: relative;
  overflow: hidden;
  padding-block: var(--section-space);
  background: var(--navy);
  color: var(--paper);
  scroll-margin-top: var(--header-h);
}

.contact :focus-visible { outline-color: var(--amber); }

.contact__inner { position: relative; display: grid; gap: 2rem; }
.contact h2 { color: var(--paper); }
.contact__text > p { max-width: 46ch; margin-top: 1.25rem; color: var(--sand); }

.contact .contact__email {
  margin-top: 2rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 5.6vw, 2.75rem);
  font-weight: 300;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.contact__email a { color: var(--paper); text-decoration: none; border-bottom: 1px solid rgb(240 220 193 / 0.5); }
.contact__email a:hover { border-bottom-color: var(--amber); }
.contact__email .perma { color: var(--amber); }

.copy-status { color: var(--sand); font-size: 0.95rem; }

.contact__swallow {
  width: min(20rem, 70%);
  height: auto;
  justify-self: center;
  opacity: 0.95;
}

@media (min-width: 56rem) {
  .contact__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); align-items: center; }
  .contact__swallow { width: 100%; max-width: 30rem; justify-self: end; }
}

/* ---------- Pied de page ---------- */
.site-footer { padding-block: 2.5rem; background: var(--paper); }

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}

.site-footer__logo { width: 12rem; height: auto; }

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer__meta p + p { margin-top: 0; }
.site-footer__meta a { color: var(--muted); }
.site-footer__meta a:hover { color: var(--navy); }

/* ---------- Page de mentions légales ---------- */
.legal { padding-block: clamp(3rem, 7vw, 5rem) var(--section-space); }
.legal h1 { font-size: clamp(2.4rem, 2vw + 1.8rem, 3.5rem); margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.6rem; font-weight: 500; margin: 2.5rem 0 0.75rem; max-width: none; }
.legal h3 { margin: 1.75rem 0 0.5rem; font-size: 1.25rem; font-weight: 500; }
.legal p, .legal ul { max-width: 64ch; }
.legal p:not(.back) { text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
.legal ul { margin: 0.75rem 0 0; padding: 0; list-style: none; }
.legal li { position: relative; padding: 0.3rem 0 0.3rem 2rem; }
.legal li::before { top: 0.6rem; }
.legal .back { margin-top: 3rem; }

/* ---------- Alignements sur ordinateur ----------
   Toutes les sections s'appuient sur deux repères : le bord droit de la zone
   de contenu, et la même colonne de gauche (7/12) pour les mises en page à
   deux colonnes. Les textes ne s'arrêtent plus à des largeurs différentes. */
@media (min-width: 64rem) {
  .constat,
  .sobriete__grid,
  .avancement,
  .budget__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 4rem; }

  /* Textes en colonne : jusqu'au bord de leur colonne */
  .constat__text > p,
  .step h3 + p,
  .porteur__text > p { max-width: none; }

  /* Chapôs : « Du SUV à l'USV » sur toute la largeur, « Pour l'usager »
     aligné sur la colonne de gauche */
  .sobriete__intro .lede { max-width: none; }
  #usager .lede { max-width: calc((100% - 4rem) * 7 / 12); }

  /* Le véhicule : les rubriques restent les unes sous les autres ; leurs
     textes, le tableau et les encadrés vont tous jusqu'au bord droit */
  .sketch { margin-inline: auto; }
  .w5__row > dd,
  .w5__lead,
  .compare,
  .compare > p { max-width: none; }

  /* Budget mensuel : tableau un peu plus étroit, pour laisser plus d'air
     avant le chiffre clé (la colonne de droite ne bouge pas) */
  .budget__detail { margin-right: 2.5rem; }
}

/* ---------- Message de confirmation (réglage de la mesure d'audience) ---------- */
.notice {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 50;
  width: max-content;
  max-width: calc(100vw - 2rem);
  margin: 0;
  padding: 0.75rem 1.4rem;
  border-radius: 1.5rem;
  box-shadow: 0 0.4rem 1.2rem rgb(0 39 115 / 0.25);
  line-height: 1.4;
  background: var(--navy);
  color: var(--paper);
  font-size: 0.95rem;
  text-align: center;
  transform: translateX(-50%);
  transition: opacity 0.6s ease;
}
.notice--hide { opacity: 0; }

/* ---------- Utilitaires ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

@media print {
  .site-header, .skip-link, .actions, .hero__switch, .chapters, .contact__swallow { display: none; }
  .contact { background: none; color: var(--ink); }
  .contact h2, .contact__email a { color: var(--navy); }
  .section--sand { background: none; }
}
