/* =========================================================================
   Dominique de Villepin — page de candidature (version 4)
   Héros à photo large fondue dans un dégradé (fond bleu nuit),
   en-tête transparent puis noir au défilement, ossature du site
   lafrancehumaniste.fr (cases bordées à ombre portée, pied de page)
   et éléments de la DA (aplats, bandeau, cartes du programme, graphique).
   Guidelines LFH : Poppins ExtraBold / SemiBold / Medium, approche -25,
   palette web (beige, noir, rouge, bleu électrique, bleu ciel, jaune, rose, vert).
   ========================================================================= */

:root {
  --beige: #fdf4df;
  --noir: #000;
  --encre: #0f1822;
  --rouge: #e83f13;
  --bleu: #3c3cef;
  --ciel: #48bef9;
  --jaune: #fcd227;
  --rose: #f7b7c4;
  --vert: #1c7768;

  --approche: -0.025em;
  --entete-h: 74px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

@media (min-width: 1024px) {
  :root { --entete-h: 96px; }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--entete-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--noir);
  font-family: Poppins, ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: var(--approche);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; letter-spacing: inherit; }
i { font-style: normal; } /* pictogrammes : jamais d'italique */
p, h1, h2, h3, figure { margin: 0; }

:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.nowrap { white-space: nowrap; }

.skip {
  position: fixed; left: 12px; top: -100px; z-index: 100;
  padding: 12px 20px; border-radius: 999px;
  background: var(--jaune); color: #000; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Conteneur 1320 px, marges du site */
.conteneur { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: 24px; }
@media (min-width: 1024px) { .conteneur { padding-inline: 32px; } }
@media (min-width: 1384px) { .conteneur { padding-inline: 0; } }

/* Numéro de section, façon DA (« 8. ») */
.numero {
  margin-bottom: 10px;
  color: var(--accent, currentColor);
  font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 800; line-height: 1;
}

.titre-section {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800; line-height: .98;
  letter-spacing: var(--approche);
  text-wrap: balance;
}

/* Surlignage DA (« Rassembler pour présider ») */
.hl { display: inline-block; width: max-content; padding: .02em .24em .1em; background: #000; }

/* Aperçu flou d'une photo (quelques centaines d'octets, intégré à la page) :
   il occupe la place pendant le chargement, la vraie photo se pose dessus. */
.photo__flou {
  position: absolute; inset: 0; pointer-events: none;
  background-size: cover; background-position: var(--flou-pos, 50% 50%); background-repeat: no-repeat;
  filter: blur(16px); transform: scale(1.1);
}
/* Photo chargée plus bas dans la page : elle apparaît en fondu au-dessus de son aperçu */
img[data-fondu] { transition: opacity .7s var(--ease); }
.js img[data-fondu]:not(.is-charge) { opacity: 0; }

.grain {
  position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .22; mix-blend-mode: overlay;
}

/* ---------- Boutons (pastilles du site) ---------- */

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 22px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 15px; font-weight: 600; line-height: 1.1;
  text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform .16s ease, background-color .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.bouton:hover { transform: translateY(-2px); }
.bouton--noir { background: #000; color: #fff; border-color: #000; }
.bouton--noir:hover { background: var(--encre); }
.bouton--beige { background: var(--beige); color: #000; border-color: var(--beige); }
.bouton--beige:hover { box-shadow: 5px 5px 0 #000; }
.bouton--jaune { background: var(--jaune); color: #000; border-color: var(--jaune); }
.bouton--jaune:hover { box-shadow: 4px 4px 0 #000; }
.bouton--contour { background: transparent; color: inherit; border-color: currentColor; }
.bouton--contour:hover { background: #000; color: #fff; border-color: #000; }
.bouton--large { width: 100%; min-height: 54px; font-size: 16px; }

/* =========================================================================
   EN-TÊTE : mention à gauche, navigation centrée, actions à droite.
   En haut de page il se fond dans le héros (transparent), puis passe
   en blanc sur fond noir dès que l'on descend (classe .is-solid).
   ========================================================================= */

/* Couleur de l'en-tête transparent, posé sur la photo sombre du héros */
body { --nav-init: #fff; --nav-init-inv: #000; }

.entete {
  --nav-fg: var(--nav-init); --nav-inv: var(--nav-init-inv);
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  background: transparent; color: var(--nav-fg);
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}
.entete.is-solid, .entete.is-menu, .no-js .entete {
  --nav-fg: #fff; --nav-inv: #000;
  border-bottom-color: rgba(255, 255, 255, .14);
  background: #000;
}

/* Bouton « S'engager » : prend la couleur de l'en-tête */
.bouton--nav { background: var(--nav-fg); color: var(--nav-inv); border-color: var(--nav-fg); }
.bouton--nav:hover { box-shadow: 4px 4px 0 var(--jaune); }

/* Smartphone et tablette : mention à gauche ; S'engager, don et menu à droite */
.entete__barre {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  max-width: 1720px; height: var(--entete-h);
  margin-inline: auto; padding-inline: 16px;
}

/* La mention de candidature remplace le logotype, avec le même décalage de ligne */
.marque {
  display: flex; flex-direction: column; flex: none;
  font-size: clamp(12.5px, 3.6vw, 1.2rem); font-weight: 800; line-height: .9;
  letter-spacing: var(--approche);
  text-decoration: none;
}
.marque__l2 { padding-left: 1.2em; }

.entete__liens { display: none; }
.entete__actions { display: flex; align-items: center; gap: 6px; }
.entete__actions .bouton { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.entete__actions .bouton--don { width: 40px; padding: 0; }
.bouton--don .bouton__texte { display: none; }

.entete__burger {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; padding: 0;
  border: 1.5px solid currentColor; border-radius: 50%;
  background: transparent;
  font-size: 1.45rem; line-height: 1;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}
.entete__burger:hover, .entete__burger[aria-expanded="true"] { background: var(--nav-fg); color: var(--nav-inv); border-color: var(--nav-fg); }

/* Petits smartphones : on resserre pour garder les trois boutons sur une ligne */
@media (max-width: 389px) {
  .entete__barre { gap: 8px; padding-inline: 12px; }
  .entete__actions { gap: 5px; }
  .entete__actions .bouton { padding-inline: 12px; }
}
@media (max-width: 340px) {
  .marque { font-size: 11px; }
  .entete__actions .bouton { min-height: 36px; padding-inline: 10px; font-size: 13px; }
  .entete__actions .bouton--don, .entete__burger { width: 36px; height: 36px; }
}

/* Menu burger : les liens du site La France Humaniste, en plein écran sous l'en-tête */
.menu {
  position: fixed; inset: var(--entete-h) 0 0;
  overflow-y: auto; overscroll-behavior: contain;
  background: #000; color: #fff;
  animation: menu .35s var(--ease);
}
.menu[hidden] { display: none; }
@keyframes menu { from { opacity: 0; transform: translateY(-10px); } }
.menu__contenu { display: flex; flex-direction: column; gap: 28px; max-width: 640px; margin-inline: auto; padding: 28px 20px calc(40px + env(safe-area-inset-bottom, 0px)); }
.menu__logo { display: block; width: 190px; line-height: 0; }
.menu__logo svg { width: 100%; height: auto; fill: currentColor; }
.menu__liens { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, .25); }
.menu__liens a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .25);
  font-size: clamp(1.35rem, 6vw, 1.9rem); font-weight: 800; line-height: 1.1;
  text-decoration: none;
  transition: color .16s ease;
}
.menu__liens a i { font-size: .8em; transition: transform .2s var(--ease); }
.menu__liens a:hover, .menu__liens a:focus-visible { color: var(--jaune); }
.menu__liens a:hover i { transform: translateX(4px); }
.menu__boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bouton--blanc { background: #fff; color: #000; border-color: #fff; }
.bouton--blanc:hover { box-shadow: 4px 4px 0 var(--jaune); }
.menu .bouton--contour:hover { background: #fff; color: #000; border-color: #fff; }
.menu__contact { display: inline-flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .7); font-size: 15px; font-weight: 500; text-decoration: none; }
.menu__contact:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
html.menu-ouvert { overflow: hidden; }
html.menu-ouvert .dock { transform: translateY(calc(100% + 30px)); }

.entete__lien {
  padding: 11px 15px; border-radius: 999px;
  font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: transform .16s ease, background-color .16s ease, color .16s ease;
}
.entete__lien:hover { transform: translateY(-2px); background: color-mix(in srgb, currentColor 14%, transparent); }
.entete__lien[aria-current="true"] { background: var(--nav-fg); color: var(--nav-inv); }
.entete__actions .bouton[aria-current="true"] { box-shadow: 0 0 0 3px var(--nav-inv), 0 0 0 5px var(--nav-fg); }

@media (min-width: 1024px) {
  .entete__barre {
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 16px; padding-inline: 32px;
  }
  .marque { justify-self: start; font-size: 1.25rem; }
  .entete__liens { display: flex; gap: 4px; justify-self: center; }
  .entete__actions { gap: 8px; justify-self: end; }
  .entete__actions .bouton { min-height: 46px; padding: 12px 22px; font-size: 15px; }
  .entete__actions .bouton--don { width: auto; padding: 12px 22px; }
  .bouton--don .bouton__texte { display: inline; }
  .entete__burger, .menu { display: none !important; }
}
@media (min-width: 1200px) { .marque { font-size: 1.45rem; } }

.entete__progression { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; }
.entete__progression span {
  display: block; height: 100%;
  background: var(--rouge);
  transform-origin: left; transform: scaleX(var(--progression, 0));
}

/* =========================================================================
   HÉRO : photo large fondue dans un dégradé (le mur bleu de la photo
   plonge dans un bleu nuit).
   ========================================================================= */

body {
  --hero-haut: #01092c;          /* ton du mur, à gauche de la photo */
  --hero-bas: #00040f;           /* aplat sous le texte */
  --hero-cadrage: 55% 18%;       /* mobile */
  --hero-cadrage-large: 50% 8%;  /* ordinateur */
}

.hero {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column;
  min-height: 100svh;
  background: var(--hero-bas); color: var(--beige);
  overflow: clip;
}

/* Mobile et tablette : la photo en haut, fondue vers l'aplat du texte */
.hero__media { --flou-pos: var(--hero-cadrage); position: relative; flex: 1 0 auto; min-height: min(64svh, 128vw); overflow: hidden; }
.hero__media picture { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-cadrage); }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, var(--hero-bas) 98%);
}

/* Smartphone et tablette : nom et texte centrés sous la photo */
.hero__contenu { position: relative; z-index: 2; margin-top: -4.4rem; padding-bottom: 48px; text-align: center; }

.hero__titre {
  color: var(--jaune);
  font-size: clamp(3rem, 13vw, 5.6rem);
  font-weight: 800; line-height: .88;
  letter-spacing: var(--approche);
}
.hero__titre > span:not(.sr-only) { display: block; white-space: nowrap; }

.hero__chapo {
  max-width: 30ch; margin: 24px auto 28px;
  font-size: clamp(1.1rem, 1.4vw, 1.35rem); font-weight: 600; line-height: 1.4;
  text-wrap: balance;
}

@media (min-width: 640px) {
  .hero__media { min-height: 62svh; }
  .hero__contenu { margin-top: -6rem; }
}

/* Ordinateur : photo large à droite, le dégradé couvre la gauche */
@media (min-width: 1024px) {
  .hero {
    display: grid; align-items: end;
    min-height: max(100svh, 720px);
    background: linear-gradient(to top, var(--hero-bas) 0, var(--hero-bas) 52%, var(--hero-haut) 90%);
  }
  .hero__media {
    --flou-pos: var(--hero-cadrage-large);
    position: absolute; top: 0; right: 0; bottom: 0;
    width: 64%; min-height: 0;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 42%);
            mask-image: linear-gradient(to right, transparent 0, #000 42%);
  }
  .hero__media img { object-position: var(--hero-cadrage-large); }
  .hero__media::after { background: linear-gradient(to top, var(--hero-bas) 0, transparent 30%); }
  .hero__contenu { margin-top: 0; padding-top: calc(var(--entete-h) + 48px); padding-bottom: 80px; text-align: left; }
  /* 2e ligne décalée, comme le logotype LFH */
  .hero__l2 { padding-left: .62em; }
  .hero__chapo { margin-inline: 0; text-wrap: pretty; }
  /* le nom déborde sur la photo, comme les gabarits de la DA */
  .hero__titre { font-size: clamp(4.6rem, 8.2vw, 9rem); }
}

/* ---------- Bandeau défilant ---------- */

.bandeau { overflow: hidden; border-block: 2px solid #000; background: var(--rouge); color: #000; padding: 8px 0 10px; }
.bandeau__piste {
  display: flex; align-items: center; width: max-content;
  font-size: clamp(1.7rem, 4vw, 3.2rem); font-weight: 800; line-height: 1.05;
  animation: defile 42s linear infinite;
}
/* marge plutôt que gap : la copie du contenu boucle sans saut */
.bandeau__piste > * { margin-right: .55em; }
.bandeau__piste i { flex: none; width: .32em; height: .32em; border-radius: 50%; background: #000; }
.bandeau:hover .bandeau__piste { animation-play-state: paused; }
@keyframes defile { to { transform: translateX(-50%); } }

/* =========================================================================
   01. LETTRE (blanc, mise en page de la biographie du site)
   ========================================================================= */

.lettre { --echelle: 1; --accent: var(--rouge); background: #fff; }
.lettre__grille { display: grid; align-items: start; padding-block: 56px 72px; }
.lettre__tete { margin-bottom: 18px; }

/* Mobile : l'aside s'efface pour que la barre d'outils reste collée pendant la lecture */
.lettre__outils { display: contents; }
.lettre__meta { margin-bottom: 16px; color: rgba(0, 0, 0, .6); font-size: 14px; font-weight: 500; line-height: 1.45; }

.lettre__barre {
  position: sticky; top: var(--entete-h); z-index: 5;
  margin: 0 -24px 28px; padding: 8px 24px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .1);
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.lettre__boutons { display: flex; align-items: center; gap: 6px; padding-bottom: 8px; }

.outil {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 42px; min-height: 40px; padding: 0 14px;
  border: 1px solid rgba(0, 0, 0, .2); border-radius: 999px;
  background: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.outil sup { font-size: .7em; }
.outil:hover { border-color: #000; }
.outil:disabled { opacity: .35; cursor: default; }
.outil--ecoute { background: var(--bleu); border-color: var(--bleu); color: #fff; }
.outil--ecoute:hover { background: #000; border-color: #000; }
.outil[aria-pressed="true"] { background: var(--jaune); border-color: #000; color: #000; }
.outil--partage { margin-left: auto; }
@media (max-width: 400px) { .outil span { display: none; } }

.lettre__progression { height: 3px; margin: 0 -24px; background: rgba(0, 0, 0, .06); }
.lettre__progression span {
  display: block; height: 100%;
  background: var(--rouge);
  transform-origin: left; transform: scaleX(var(--lu, 0));
}

.lettre__texte {
  max-width: 760px;
  font-size: calc(1.08rem * var(--echelle));
  font-weight: 600; line-height: 1.65;
  color: rgba(0, 0, 0, .85);
}
.lettre__texte > p { margin-bottom: 1.1em; text-wrap: pretty; transition: color .3s ease; }

/* Soulignement : toujours droit et bleu (pas d'italique, pas de trait à main levée) */
.souligne {
  color: #000;
  text-decoration: underline; text-decoration-color: var(--bleu);
  text-decoration-thickness: .14em; text-underline-offset: .22em;
  text-decoration-skip-ink: none;
}

/* Effet d'encre : les paragraphes se révèlent à la lecture */
.js .lettre__texte > p { opacity: .18; transition: opacity .9s var(--ease), color .3s ease; }
.js .lettre__texte > p.is-in { opacity: 1; }

/* Lecture à voix haute : le passage lu passe en bleu */
.lettre__texte .is-speaking, .lettre__texte .is-speaking .souligne { opacity: 1 !important; color: var(--bleu); }

.signature { margin-top: 1.6em; color: #000; font-size: 1.5em; font-weight: 800; line-height: 1.2; }

/* Lettre repliée : le début, un fondu, puis le bouton pour la lire en entier */
.lettre.is-repliee .lettre__texte {
  max-height: 30em; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 98%);
          mask-image: linear-gradient(to bottom, #000 50%, transparent 98%);
}
.lettre__suite { margin-top: 4px; }
.lettre__suite[hidden] { display: none; }
.lettre__suite .bouton { white-space: normal; text-align: left; }
.lettre__suite-duree { font-weight: 500; opacity: .65; }
.lettre__suite-duree::before { content: "·"; margin-right: 8px; }

@media (min-width: 1024px) {
  .lettre__grille { grid-template-columns: 250px minmax(0, 760px); column-gap: 64px; padding-block: 96px; }
  .lettre__tete { grid-column: 2; grid-row: 1; margin-bottom: 32px; }
  .lettre__suite { grid-column: 2; grid-row: 3; }
  .lettre__outils {
    display: flex; flex-direction: column; gap: 20px;
    grid-column: 1; grid-row: 1 / 4;
    position: sticky; top: calc(var(--entete-h) + 26px);
    padding-left: 20px; border-left: 1px solid rgba(0, 0, 0, .2);
  }
  .lettre__meta { margin: 0; }
  .lettre__barre { position: static; margin: 0; padding: 0; border: 0; background: none; backdrop-filter: none; }
  .lettre__boutons { flex-wrap: wrap; padding-bottom: 14px; }
  .outil--partage { margin-left: 0; }
  .lettre__progression { margin: 0; }
  .lettre__texte { grid-column: 2; grid-row: 2; font-size: calc(1.15rem * var(--echelle)); }
}

/* =========================================================================
   02. PROJET (bandeau beige du site) : le programme « Réussir à nouveau »,
   ses 4 parties aux couleurs du site, les synthèses et les chantiers
   ========================================================================= */

.projet { --accent: var(--bleu); border-block: 2px solid #000; background: var(--beige); }
.projet .conteneur { padding-block: 64px 72px; }
@media (min-width: 1024px) { .projet .conteneur { padding-block: 96px; } }

.projet__entete { display: grid; gap: 24px; margin-bottom: 36px; }
@media (min-width: 1024px) {
  .projet__entete { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 64px; margin-bottom: 44px; }
}
.projet__programme { display: flex; flex-direction: column; margin-bottom: 14px; }
.projet__nom { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 800; line-height: .95; }
.projet__sous { margin-top: 4px; padding-left: 1.4em; font-size: clamp(1.05rem, 1.6vw, 1.3rem); font-weight: 600; }
.projet__intro > p:not(.projet__programme) { max-width: 560px; margin-bottom: 22px; font-size: 1.05rem; line-height: 1.55; }
.projet__boutons { display: flex; flex-wrap: wrap; gap: 10px; }

/* Chiffres clés */
.projet__chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 32px; padding: 0; list-style: none; }
.projet__chiffres li { padding-top: 10px; border-top: 2px solid #000; font-size: clamp(.85rem, 1.4vw, 1.05rem); font-weight: 600; line-height: 1.2; }
.projet__chiffres strong { display: block; font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; line-height: .95; font-variant-numeric: tabular-nums; }

/* Les 4 parties */
.parties { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .parties { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1100px) { .parties { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.partie {
  display: flex; flex-direction: column;
  border: 2px solid #000;
  background: var(--bg); color: var(--fg);
  box-shadow: 6px 6px 0 #000;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.partie:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 #000; }
.partie__lien {
  position: relative; flex: 1;
  display: flex; flex-direction: column; gap: 6px;
  min-height: 190px; padding: 20px 22px 22px;
  text-decoration: none;
}
.partie__num { font-size: .9rem; font-weight: 500; }
.partie__titre { margin-top: auto; padding-right: 8px; font-size: clamp(1.9rem, 2.7vw, 2.5rem); font-weight: 800; line-height: .95; text-wrap: balance; }
.partie__props { font-size: .92rem; font-weight: 600; opacity: .8; }
.partie__go { position: absolute; top: 18px; right: 18px; font-size: 1.3rem; transition: transform .3s var(--ease); }
.partie__lien:hover .partie__go, .partie__lien:focus-visible .partie__go { transform: translate(3px, -3px) scale(1.15); }
.partie__lien:focus-visible { outline: 3px solid currentColor; outline-offset: -8px; }

.partie__chapitres { border-top: 2px solid #000; }
.partie__chapitres summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px; list-style: none;
  font-size: .95rem; font-weight: 600; cursor: pointer;
}
.partie__chapitres summary::-webkit-details-marker { display: none; }
.partie__chapitres summary::after { content: "+"; font-size: 1.4rem; font-weight: 500; line-height: 1; transition: transform .25s var(--ease); }
.partie__chapitres[open] summary::after { transform: rotate(45deg); }
.partie__chapitres summary:focus-visible { outline: 3px solid currentColor; outline-offset: -6px; }
.partie__chapitres ol { margin: 0; padding: 0 22px 16px; list-style: none; }
.partie__chapitres a {
  display: flex; gap: 10px;
  padding: 8px 0;
  border-top: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  font-size: .9rem; font-weight: 600; line-height: 1.3; text-decoration: none;
  transition: transform .2s var(--ease);
}
.partie__chapitres a:hover { transform: translateX(4px); text-decoration: underline; text-underline-offset: 3px; }
.partie__chapitres b { flex: none; min-width: 1.7em; font-variant-numeric: tabular-nums; }

/* Synthèses et chantiers */
.projet__bas { display: grid; gap: 40px; margin-top: 52px; }
@media (min-width: 1024px) { .projet__bas { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; } }
.projet__soustitre { margin-bottom: 14px; font-size: 1.35rem; font-weight: 800; line-height: 1.1; }

.syntheses__liste { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .syntheses__liste { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
.syntheses__liste a {
  display: flex; align-items: center; gap: 14px; height: 100%;
  padding: 14px 16px;
  border: 2px solid #000; background: #fff;
  box-shadow: 4px 4px 0 #000;
  text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.syntheses__liste a:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #000; }
.syntheses__pastille { flex: none; width: 16px; height: 40px; border: 2px solid #000; }
.syntheses__texte { flex: 1; font-size: .88rem; font-weight: 500; line-height: 1.3; color: rgba(0, 0, 0, .7); }
.syntheses__texte b { display: block; margin-bottom: 2px; color: #000; font-size: 1rem; font-weight: 800; }

.chantiers__liste { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chantiers__liste a {
  display: inline-flex; align-items: center; min-height: 42px; padding: 8px 16px;
  border: 2px solid #000; border-radius: 999px;
  font-size: .95rem; font-weight: 600; text-decoration: none;
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}
.chantiers__liste a:hover { transform: translateY(-2px); background: #000; color: #fff; }

/* =========================================================================
   03. CALENDRIER (rose : compte à rebours + « la montée »)
   ========================================================================= */

.calendrier { --accent: #000; background: var(--rose); color: #000; }
.calendrier .conteneur { padding-block: 64px 72px; }
@media (min-width: 1024px) { .calendrier .conteneur { padding-block: 96px; } }

.calendrier__haut { display: grid; gap: 28px; }
@media (min-width: 1024px) { .calendrier__haut { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: end; gap: 64px; } }

.decompte { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.decompte > div {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 10px 12px;
  border: 2px solid #000; background: #fff;
  box-shadow: 4px 4px 0 #000;
}
.decompte > div:first-child { background: var(--jaune); }
.decompte strong { font-size: clamp(1.7rem, 6.5vw, 3.4rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.decompte span { font-size: clamp(11px, 3vw, 13px); font-weight: 500; }
@media (max-width: 479px) { .decompte > div { padding: 12px 7px 10px; } }

/* Graphique : à partir de 720 px */
.montee { display: none; position: relative; margin: 56px 0 0; aspect-ratio: 16 / 6; color: #000; }
.montee__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.montee__aire { fill: rgba(0, 0, 0, .08); }
.montee__avenir, .montee__parcouru {
  fill: none; stroke: currentColor; stroke-width: 4;
  stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke;
}
.montee__avenir { stroke-dasharray: 2 9; stroke-width: 3; opacity: .75; }
.js .montee__svg { clip-path: inset(0 100% 0 0); transition: clip-path 2.2s var(--ease); }
.js .montee.is-in .montee__svg { clip-path: inset(0 0 0 0); }
.montee__point {
  position: absolute; z-index: 2;
  width: 22px; height: 22px; border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 4px solid #000; background: var(--rose);
}
.montee__point--fin { background: #000; }
.montee__label {
  position: absolute; z-index: 2;
  transform: translate(-50%, calc(-100% - 22px));
  font-size: clamp(.85rem, 1.2vw, 1.1rem); font-weight: 800; line-height: 1.1;
  white-space: nowrap; text-align: center;
}
.montee__label em { font-style: normal; font-weight: 500; font-size: .85em; }
.montee__label--debut { transform: translate(-14%, calc(-100% - 22px)); text-align: left; }
.montee__label--fin { transform: translate(-88%, calc(-100% - 22px)); text-align: right; }
.montee__auj {
  position: absolute; z-index: 3;
  width: 16px; height: 16px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--rouge); box-shadow: 0 0 0 4px var(--rose);
}
.montee__auj::before {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--rouge); animation: onde 2s infinite;
}
@keyframes onde { from { transform: scale(1); opacity: 1; } to { transform: scale(2.8); opacity: 0; } }
.montee__auj span {
  position: absolute; left: 50%; top: calc(100% + 10px); transform: translateX(-30%);
  padding: 2px 8px; background: var(--rouge); color: var(--beige);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}

/* Frise (mobile et lecteurs d'écran) */
.frise { margin: 40px 0 0; padding: 0; list-style: none; border-left: 2px solid #000; }
.frise li { position: relative; display: grid; gap: 2px; padding: 14px 0 14px 24px; }
.frise li::before { content: ""; position: absolute; left: -7px; top: 20px; width: 12px; height: 12px; border: 2px solid #000; background: #fff; }
.frise b { font-size: 14px; font-weight: 800; }
.frise span { font-size: 1.05rem; font-weight: 600; line-height: 1.4; }
.frise .is-passee { opacity: .55; }
.frise .is-passee::before { background: #000; }
.frise .is-prochaine::before { left: -9px; top: 18px; width: 16px; height: 16px; background: var(--jaune); }
.frise .is-prochaine span::after {
  content: "Prochaine étape";
  display: inline-block; margin-left: 8px; padding: 1px 8px;
  border: 1px solid #000; background: var(--jaune);
  font-size: 12px; font-weight: 800; vertical-align: 2px;
}

@media (min-width: 720px) {
  .montee { display: block; }
  .frise { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.calendrier__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 48px; }

/* =========================================================================
   04. S'ENGAGER (noir : sélecteur + pictogrammes)
   ========================================================================= */

.agir { --accent: var(--jaune); background: #000; color: #fff; }
.agir .conteneur { padding-block: 64px 72px; }
@media (min-width: 1024px) { .agir .conteneur { padding-block: 96px; } }
.agir__entete { margin-bottom: 36px; }

.agir__grille { display: grid; gap: 32px; }
@media (min-width: 1024px) { .agir__grille { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: stretch; } }

.temps { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
.temps__question { margin-bottom: 12px; padding: 0; font-size: 1.05rem; font-weight: 600; }
/* --n : nombre de choix ; --i : choix coché (le curseur jaune glisse dessous) */
.temps__piste {
  --n: 3; --i: 0;
  position: relative;
  display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  padding: 4px;
  border: 2px solid rgba(255, 255, 255, .9); border-radius: 999px;
}
.temps__piste:has(input[value="1"]:checked) { --i: 1; }
.temps__piste:has(input[value="2"]:checked) { --i: 2; }
.temps__curseur {
  position: absolute; top: 4px; bottom: 4px;
  left: calc(4px + var(--i) * (100% - 8px) / var(--n));
  width: calc((100% - 8px) / var(--n));
  border-radius: 999px; background: var(--jaune);
  transition: left .45s var(--ease);
}
.temps label { position: relative; z-index: 1; cursor: pointer; }
.temps input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.temps label span {
  display: grid; place-items: center;
  min-height: 46px; padding: 4px;
  font-size: clamp(.78rem, 2.6vw, .98rem); font-weight: 600; line-height: 1.05; text-align: center;
  transition: color .3s;
}
.temps input:checked + span { color: #000; }
.temps input:focus-visible + span { outline: 3px solid #fff; outline-offset: 3px; border-radius: 999px; }

.choix { display: grid; }
.choix__carte {
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: clamp(24px, 3.5vw, 40px);
  border: 2px solid #000;
  background: var(--bg); color: var(--fg);
  box-shadow: 8px 8px 0 #fff;
  animation: carte .5s var(--ease);
}
.choix__carte[hidden] { display: none; }
@keyframes carte { from { opacity: 0; transform: translateY(14px); } }
.choix__picto { font-size: 2.8rem; line-height: 1; }
.choix__titre { font-size: clamp(1.9rem, 3.4vw, 2.9rem); font-weight: 800; line-height: .98; text-wrap: balance; }
.choix__carte p { max-width: 42ch; font-size: 1.05rem; line-height: 1.4; }
.choix__carte .bouton { margin-top: 6px; }

.agir__photo { position: relative; min-height: 300px; overflow: hidden; background: #111; }
.agir__photo { --flou-pos: 45% 40%; }
.agir__photo picture { position: relative; display: block; }
.agir__photo picture, .agir__photo img { width: 100%; height: 100%; }
.agir__photo img { object-fit: cover; object-position: 45% 40%; }
.agir__photo figcaption {
  position: absolute; left: clamp(16px, 3vw, 28px); bottom: clamp(16px, 3vw, 28px);
  display: flex; flex-direction: column; align-items: flex-start;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-weight: 800; line-height: 1;
}
.agir__photo figcaption .hl { color: var(--jaune); }
.agir__photo figcaption .hl + .hl { margin-left: .8em; }

/* =========================================================================
   05. DON (bleu électrique)
   ========================================================================= */

.don { --accent: var(--jaune); background: var(--bleu); color: var(--beige); }
.don__grille { display: grid; gap: 40px; padding-block: 64px 72px; }
@media (min-width: 1024px) { .don__grille { grid-template-columns: minmax(0, 1fr) minmax(0, 500px); align-items: center; gap: 80px; padding-block: 96px; } }
.don__texte { max-width: 36ch; margin-top: 20px; font-size: 1.15rem; line-height: 1.45; }
.don__points { display: grid; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.don__points li { display: flex; align-items: center; gap: 12px; }
.don__points i { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--jaune); color: #000; }

.calc { padding: 26px; border: 2px solid #000; background: var(--beige); color: #000; box-shadow: 10px 10px 0 #000; }
.calc__titre { margin-bottom: 16px; font-size: 1.5rem; font-weight: 800; line-height: 1.1; }

.montants { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.montants label { position: relative; cursor: pointer; }
.montants input[type="radio"] { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.montants label:not(.montants__autre) > span,
.montants__autre {
  display: grid; place-items: center;
  min-height: 48px; border: 2px solid #000; border-radius: 999px;
  font-size: 1.05rem; font-weight: 800;
  transition: background-color .16s ease, color .16s ease;
}
.montants label:hover > span { background: rgba(0, 0, 0, .06); }
.montants input:checked + span, .montants input:checked:hover + span { background: #000; color: #fff; }
.montants input:focus-visible + span { outline: 3px solid var(--bleu); outline-offset: 2px; }
.montants__autre { display: flex; align-items: center; gap: 2px; padding: 0 10px; cursor: text; }
.montants__autre.is-active { background: #000; color: #fff; }
.montants__autre:focus-within { outline: 3px solid var(--bleu); outline-offset: 2px; }
.montants__autre input {
  width: 100%; min-width: 0; border: 0; outline: 0;
  background: transparent; color: inherit;
  font: inherit; letter-spacing: inherit; text-align: right;
  -moz-appearance: textfield; appearance: textfield;
}
.montants__autre input::-webkit-outer-spin-button,
.montants__autre input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.montants__autre input::placeholder { color: inherit; opacity: .55; text-align: center; font-size: .9em; }

.calc__resultat { margin: 22px 0 20px; }
.calc__cout { display: flex; align-items: center; gap: 16px; line-height: 1.3; }
.calc__cout-val { flex: none; color: var(--bleu); font-size: clamp(2.4rem, 6vw, 3.2rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.calc__barre { display: flex; height: 14px; margin-top: 14px; border: 2px solid #000; }
.calc__barre-cout { width: 34%; background: var(--bleu); }
.calc__barre-reduc { width: 66%; background: repeating-linear-gradient(-45deg, var(--jaune) 0 6px, #f3c300 6px 12px); }
.calc__legende { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; font-size: 12px; font-weight: 500; }
.calc__legende span { display: inline-flex; align-items: center; gap: 6px; }
.calc__pastille { width: 11px; height: 11px; border: 2px solid #000; }
.calc__pastille--cout { background: var(--bleu); }
.calc__pastille--reduc { background: var(--jaune); }
.calc__mentions { margin-top: 14px; color: rgba(0, 0, 0, .6); font-size: 12px; font-weight: 500; line-height: 1.45; }

/* =========================================================================
   PIED DE PAGE (modèle du site)
   ========================================================================= */

.pied { background: #000; color: #fff; }
.pied__contenu {
  display: flex; flex-direction: column; gap: 56px;
  max-width: 1720px; margin-inline: auto;
  padding: 16px 20px calc(110px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 1024px) { .pied__contenu { padding: 16px 32px 32px; } }
.pied__ligne { height: 1px; background: rgba(255, 255, 255, .5); }

.pied__haut, .pied__bas { width: 100%; max-width: 1320px; margin-inline: auto; }
.pied__haut { display: flex; flex-direction: column; gap: 32px; }
@media (min-width: 768px) { .pied__haut { flex-direction: row; justify-content: space-between; align-items: flex-start; } }

.pied__logo { display: block; width: min(100%, 384px); line-height: 0; }
.pied__logo svg { width: 100%; height: auto; fill: currentColor; }

.pied__reseaux p { margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.pied__reseaux ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pied__reseaux a {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border: 1px solid rgba(255, 255, 255, .8); border-radius: 50%;
  font-size: 19px; text-decoration: none;
  transition: transform .16s ease, background-color .16s ease, color .16s ease, border-color .16s ease;
}
.pied__reseaux a:hover { transform: translateY(-3px); background: var(--survol, #fff); border-color: var(--survol, #fff); color: #000; }
@media (min-width: 768px) { .pied__reseaux p { text-align: right; } }

.pied__bas { display: flex; flex-direction: column; gap: 28px; font-size: 12px; font-weight: 500; }
@media (min-width: 1024px) { .pied__bas { flex-direction: row; justify-content: space-between; } }
.pied__infos, .pied__legal { display: flex; flex-direction: column; gap: 12px; color: rgba(255, 255, 255, .5); }
@media (min-width: 640px) { .pied__infos, .pied__legal { flex-direction: row; flex-wrap: wrap; column-gap: 32px; } }
.pied__infos a { color: #fff; text-decoration: none; }
.pied__legal a { text-decoration: none; }
.pied__infos a:hover, .pied__legal a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================================
   DOCK MOBILE (centré, zone du pouce)
   ========================================================================= */

.dock {
  position: fixed; z-index: 60;
  left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px;
  max-width: 340px; margin-inline: auto; padding: 6px;
  border: 2px solid #000; border-radius: 22px;
  background: #fff; color: #000;
  box-shadow: 5px 5px 0 #000;
  transform: translateY(calc(100% + 30px));
  transition: transform .45s var(--ease);
}
.dock.is-visible { transform: translateY(0); }
.dock a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 52px; border-radius: 15px;
  font-size: 11px; font-weight: 600; line-height: 1; text-decoration: none;
  transition: background-color .2s, color .2s;
}
.dock a i { font-size: 1.25rem; line-height: 1; }
.dock a[aria-current="true"] { background: #000; color: #fff; }
@media (min-width: 1024px) { .dock { display: none; } }

/* ---------- Message éphémère ---------- */

.toast {
  position: fixed; z-index: 70; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  max-width: calc(100% - 32px);
  padding: 12px 20px; border-radius: 999px;
  background: #000; color: #fff;
  font-size: 15px; font-weight: 600;
  box-shadow: 0 0 0 2px #fff;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1024px) { .toast { bottom: 28px; } }

/* ---------- Apparitions au défilement ---------- */

.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* apparition par « translate » : le survol des cartes garde « transform » */
.js .parties > li {
  opacity: 0; translate: 0 26px;
  transition: opacity .6s var(--ease) calc(var(--d, 0) * 55ms), translate .6s var(--ease) calc(var(--d, 0) * 55ms), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.js .parties.is-in > li { opacity: 1; translate: none; }

/* ---------- Mouvement réduit et impression ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .bandeau__piste { animation: none; flex-wrap: wrap; width: auto; justify-content: center; padding-inline: 24px; }
  .bandeau__piste > [aria-hidden="true"] { display: none; }
}

@media print {
  .entete, .dock, .toast, .bandeau, .lettre__barre, .lettre__suite, .menu { display: none !important; }
  .lettre.is-repliee .lettre__texte { max-height: none; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .js .lettre__texte > p, .js [data-reveal], .js .parties > li { opacity: 1 !important; transform: none !important; translate: none !important; }
}
