/* ==========================================================================
   GATE2 — parcours e-learning, édités par Capensia
   Papier froid · encre · vert profond (portes) · safran (prix, signal)
   Bricolage Grotesque (titres) · Public Sans (texte) · JetBrains Mono (codes)
   ========================================================================== */

:root {
  --fond: #F4F4EE;
  --fond-2: #FFFFFF;
  --panneau: #FFFFFF;
  --panneau-2: #EBEBE2;
  --bordure: rgba(17, 24, 39, 0.11);
  --bordure-vive: rgba(17, 24, 39, 0.24);
  --texte: #111827;
  --texte-2: #3E4556;
  --texte-3: #646B7D;
  --vert: #0E5E4B;
  --vert-fonce: #0A3F33;
  --vert-voile: #E2EFEA;
  --safran: #F2B233;
  --safran-fonce: #A86F00;
  --safran-voile: #FBEFD0;
  --rouge: #B42318;
  --ombre-douce: 0 1px 2px rgba(17, 24, 39, 0.04), 0 10px 28px -18px rgba(17, 24, 39, 0.22);
  --ombre-relief: 0 2px 6px rgba(17, 24, 39, 0.06), 0 28px 60px -26px rgba(14, 94, 75, 0.35);
  --radius: 10px;
  --largeur: 1180px;
  --titre: "Bricolage Grotesque", "Avenir Next Condensed", "Helvetica Neue", Arial, sans-serif;
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--texte-2);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--titre);
  font-optical-sizing: auto;
  color: var(--texte);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4.2rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 600; line-height: 1.08; letter-spacing: -0.025em; }
h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
a { color: var(--vert); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--vert-fonce); }
a, button, summary { cursor: pointer; }
::selection { background: var(--safran); color: var(--texte); }
:focus-visible { outline: 2px solid var(--vert); outline-offset: 3px; border-radius: 4px; }

.conteneur { max-width: var(--largeur); margin: 0 auto; padding: 0 1.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lien-evitement { position: absolute; left: -999px; top: 0; background: var(--vert); color: #fff; padding: 0.6rem 1rem; z-index: 100; }
.lien-evitement:focus { left: 0; color: #fff; }

/* Le code de porte : IA-01, GW-06… */
.porte {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.06em;
  color: var(--vert);
  border: 1px solid rgba(14, 94, 75, 0.35);
  border-radius: 6px;
  padding: 0.14rem 0.5rem;
  background: var(--vert-voile);
  white-space: nowrap;
}
.porte::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--vert); }

.sur-titre {
  display: flex; align-items: center; gap: 0.7rem;
  font-family: var(--mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--vert); margin-bottom: 1rem;
}
.sur-titre::before { content: ""; width: 1.4rem; height: 2px; background: var(--safran); }

/* --------------------------------------------------------------------------
   En-tête
   -------------------------------------------------------------------------- */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 244, 238, 0.9);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--bordure);
}
.entete-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--texte); font-family: var(--titre); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.03em; }
.logo svg { width: 34px; height: 34px; }
.logo .par { font-family: var(--sans); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.04em; color: var(--texte-3); margin-left: 0.4rem; padding-left: 0.6rem; border-left: 1px solid var(--bordure-vive); }
.nav-principale ul { display: flex; align-items: center; gap: 1.3rem; list-style: none; margin: 0; padding: 0; }
.nav-principale a { font-size: 0.92rem; font-weight: 500; text-decoration: none; color: var(--texte-2); white-space: nowrap; padding: 0.4rem 0; }
.nav-principale a:not(.bouton):hover, .nav-principale a[aria-current="page"]:not(.bouton) { color: var(--texte); }
.burger { display: none; background: var(--panneau); border: 1px solid var(--bordure); border-radius: 8px; padding: 0.6rem 0.75rem; min-width: 44px; min-height: 44px; }
.burger span { display: block; width: 20px; height: 2px; background: var(--texte); margin: 4px 0; }

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  padding: 0.8rem 1.4rem; border-radius: 8px; border: 1px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.bouton-primaire { background: var(--vert); color: #fff; box-shadow: 0 10px 24px -14px rgba(14, 94, 75, 0.7); }
.bouton-primaire:hover { background: var(--vert-fonce); color: #fff; transform: translateY(-1px); }
.bouton-secondaire { background: transparent; color: var(--texte); border-color: var(--bordure-vive); }
.bouton-secondaire:hover { background: var(--panneau); border-color: var(--texte); color: var(--texte); }
.bouton-safran { background: var(--safran); color: var(--texte); }
.bouton-safran:hover { background: #E9A51F; color: var(--texte); transform: translateY(-1px); }
.bouton[disabled], .bouton.desactive { opacity: 0.55; pointer-events: none; }
.nav-principale a.bouton-primaire { color: #fff; padding: 0.55rem 1.05rem; font-size: 0.88rem; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: 5.5rem 0; }
.section-pierre { background: var(--panneau-2); border-top: 1px solid var(--bordure); border-bottom: 1px solid var(--bordure); }
.tete-section { max-width: 44rem; }
.tete-section > p { font-size: 1.1rem; color: var(--texte-2); }
.intro { max-width: 42rem; font-size: 1.1rem; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { padding: 4.5rem 0 4rem; border-bottom: 1px solid var(--bordure); position: relative; overflow: clip;
  background-image: radial-gradient(ellipse 55% 70% at 100% 0%, rgba(242, 178, 51, 0.22), transparent 60%), radial-gradient(ellipse 40% 50% at 0% 100%, rgba(14, 94, 75, 0.10), transparent 60%);
}
.hero-grille { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 980px) { .hero-grille { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.hero h1 { margin-bottom: 0.4em; max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--vert); }
.hero .accroche { font-size: 1.15rem; max-width: 34rem; color: var(--texte-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.hero-faits { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; list-style: none; padding: 1.1rem 0 0; margin: 1.8rem 0 0; border-top: 1px solid var(--bordure); font-size: 0.88rem; color: var(--texte-2); }
.hero-faits li { display: flex; align-items: center; gap: 0.45rem; }
.hero-faits li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--safran); }

/* Le tableau des portes : la pièce d'identité du site */
.tableau {
  background: var(--texte); color: #E8EAE6;
  border-radius: 14px; padding: 1.2rem 1.3rem 1rem;
  box-shadow: var(--ombre-relief);
  font-family: var(--mono);
}
.tableau-tete { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: #9AA3A0; padding-bottom: 0.7rem; border-bottom: 1px solid rgba(255,255,255,0.12); }
.tableau-tete .live { color: var(--safran); }
.tableau ol { list-style: none; margin: 0; padding: 0; }
.tableau li { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) auto auto; gap: 0.9rem; align-items: baseline; padding: 0.62rem 0; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 0.86rem; }
.tableau li:last-child { border-bottom: 0; }
.tableau .code { color: var(--safran); font-weight: 500; }
.tableau .dest { font-family: var(--sans); color: #F2F3EF; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tableau .dest a { color: inherit; text-decoration: none; }
.tableau .dest a:hover { text-decoration: underline; text-decoration-color: var(--safran); }
.tableau .duree { color: #9AA3A0; font-size: 0.76rem; white-space: nowrap; }
.tableau .prix { color: #fff; font-variant-numeric: tabular-nums; }
.tableau-pied { padding-top: 0.75rem; font-size: 0.74rem; color: #9AA3A0; display: flex; justify-content: space-between; }
.tableau-pied a { color: var(--safran); }

/* --------------------------------------------------------------------------
   Comment ça marche
   -------------------------------------------------------------------------- */
.etapes-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2.4rem; }
.etape { padding: 1.4rem 0 0; border-top: 2px solid var(--bordure); }
.etape .num { font-family: var(--mono); font-size: 0.78rem; color: var(--vert); letter-spacing: 0.1em; display: block; margin-bottom: 0.6rem; }
.etape h3 { font-size: 1.2rem; }
.etape p { margin: 0; font-size: 0.96rem; }

/* --------------------------------------------------------------------------
   Familles et cartes de modules
   -------------------------------------------------------------------------- */
.familles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.2rem; }
.famille-carte {
  display: flex; flex-direction: column; gap: 0.4rem;
  background: var(--panneau); border: 1px solid var(--bordure); border-radius: 14px; padding: 1.4rem 1.4rem 1.2rem;
  text-decoration: none; color: var(--texte-2);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.famille-carte:hover { border-color: var(--vert); transform: translateY(-2px); box-shadow: var(--ombre-relief); color: var(--texte-2); }
.famille-carte .code { font-family: var(--mono); font-size: 0.74rem; color: var(--vert); letter-spacing: 0.1em; }
.famille-carte h3 { margin: 0; font-size: 1.25rem; }
.famille-carte .sous { font-size: 0.9rem; color: var(--texte-3); margin: 0; }
.famille-carte .nombre { margin-top: auto; padding-top: 0.6rem; font-size: 0.85rem; font-weight: 600; color: var(--texte); }

.grille-modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: 2rem; }
.carte {
  position: relative; display: flex; flex-direction: column; gap: 0.55rem;
  background: var(--panneau); border: 1px solid var(--bordure); border-radius: 14px; padding: 1.25rem 1.25rem 1.1rem;
  box-shadow: var(--ombre-douce);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.carte:hover { border-color: rgba(14, 94, 75, 0.5); transform: translateY(-2px); box-shadow: var(--ombre-relief); }
.carte-tete { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; }
.carte .type { font-size: 0.76rem; font-weight: 600; color: var(--texte-3); letter-spacing: 0.02em; }
.carte h3 { font-size: 1.12rem; margin: 0.15rem 0 0; }
.carte h3 a { color: var(--texte); text-decoration: none; }
.carte h3 a::after { content: ""; position: absolute; inset: 0; }
.carte h3 a:hover { color: var(--vert); }
.carte .accroche { font-size: 0.92rem; color: var(--texte-2); margin: 0; flex-grow: 1; }
.carte-pied { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding-top: 0.7rem; border-top: 1px solid var(--bordure); margin-top: 0.3rem; }
.carte .meta { font-size: 0.8rem; color: var(--texte-3); }
.prix { font-family: var(--titre); font-weight: 700; font-size: 1.35rem; color: var(--texte); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prix small { font-family: var(--sans); font-weight: 500; font-size: 0.72rem; color: var(--texte-3); margin-left: 0.15rem; }
.carte .ajouter { position: relative; z-index: 1; font-size: 0.82rem; font-weight: 600; padding: 0.45rem 0.8rem; border-radius: 7px; border: 1px solid var(--bordure-vive); background: var(--panneau); color: var(--texte); font-family: var(--sans); }
.carte .ajouter:hover { border-color: var(--vert); color: var(--vert); }
.carte .ajouter.dans { background: var(--vert-voile); border-color: var(--vert); color: var(--vert); }
.bientot { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 600; color: var(--safran-fonce); background: var(--safran-voile); border-radius: 999px; padding: 0.15rem 0.6rem; }
.carte.phare { border-color: rgba(242, 178, 51, 0.7); }
.carte.phare::before { content: "Recommandé"; position: absolute; top: -0.65rem; right: 1rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: var(--safran); color: var(--texte); border-radius: 999px; padding: 0.15rem 0.6rem; }

/* Catalogue : filtres */
.filtres { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 1.8rem; }
.filtres .groupe { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-right: 0.8rem; }
.filtres .etiquette { font-size: 0.78rem; font-weight: 600; color: var(--texte-3); margin-right: 0.2rem; }
.filtre { font-family: var(--sans); font-size: 0.84rem; font-weight: 500; padding: 0.42rem 0.85rem; border-radius: 999px; border: 1px solid var(--bordure-vive); background: var(--panneau); color: var(--texte-2); }
.filtre:hover { border-color: var(--vert); color: var(--vert); }
.filtre[aria-pressed="true"] { background: var(--texte); color: #fff; border-color: var(--texte); }
.compteur { font-size: 0.86rem; color: var(--texte-3); margin-top: 1.2rem; }
.section-famille { padding: 3.2rem 0; border-top: 1px solid var(--bordure); }
.section-famille .tete-famille { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.section-famille h2 { font-size: 1.7rem; margin-bottom: 0.2em; }
.section-famille .sous { color: var(--texte-3); margin: 0; }

/* --------------------------------------------------------------------------
   Page module
   -------------------------------------------------------------------------- */
.module-tete { padding: 3.2rem 0 2.6rem; border-bottom: 1px solid var(--bordure);
  background-image: radial-gradient(ellipse 45% 70% at 100% 0%, rgba(242, 178, 51, 0.16), transparent 60%);
}
.fil-ariane { font-size: 0.82rem; color: var(--texte-3); margin-bottom: 1.2rem; }
.fil-ariane a { color: var(--texte-3); text-decoration: none; }
.fil-ariane a:hover { color: var(--texte); }
.module-grille { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 980px) { .module-grille { grid-template-columns: minmax(0, 1fr) 22rem; gap: 3.5rem; } }
.module-tete h1 { font-size: clamp(2rem, 4vw, 3.1rem); max-width: 20ch; }
.module-tete .accroche { font-size: 1.15rem; max-width: 38rem; }
.module-etiquettes { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1rem; }
.etiquette-type { font-size: 0.8rem; font-weight: 600; color: var(--texte-2); background: var(--panneau); border: 1px solid var(--bordure); border-radius: 999px; padding: 0.2rem 0.7rem; }

.achat {
  position: sticky; top: 5.2rem;
  background: var(--panneau); border: 1px solid var(--bordure); border-radius: 16px; padding: 1.5rem;
  box-shadow: var(--ombre-relief);
}
.achat .prix { font-size: 2.3rem; display: block; }
.achat .prix small { font-size: 0.8rem; }
.achat .sous-prix { font-size: 0.84rem; color: var(--texte-3); margin: 0.2rem 0 1rem; }
.achat .bouton { width: 100%; }
.achat ul { list-style: none; margin: 1.1rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--bordure); display: grid; gap: 0.45rem; font-size: 0.88rem; }
.achat li { display: flex; gap: 0.5rem; align-items: flex-start; }
.achat li::before { content: "✓"; color: var(--vert); font-weight: 700; flex-shrink: 0; }
.achat .valeur { font-size: 0.84rem; color: var(--texte-3); margin: 0.6rem 0 0; }
.achat .valeur s { color: var(--texte-3); }
.achat .valeur strong { color: var(--vert); }
.achat .physique { margin: 1rem 0 0; font-size: 0.82rem; color: var(--texte-3); }

.module-corps { padding: 3rem 0 4rem; }
.module-corps h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.module-corps h2:first-child { margin-top: 0; }
.module-corps ul:not([class]) { padding-left: 1.2rem; }
.module-corps li { margin-bottom: 0.4rem; }
.contenu-fichier { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.contenu-fichier li { display: flex; gap: 0.7rem; align-items: flex-start; background: var(--panneau); border: 1px solid var(--bordure); border-radius: 10px; padding: 0.75rem 0.9rem; margin: 0; font-size: 0.95rem; }
.contenu-fichier li::before { content: ""; width: 14px; height: 18px; margin-top: 0.2rem; flex-shrink: 0; border: 2px solid var(--vert); border-radius: 2px 5px 2px 2px; }
.sommaire { list-style: none; padding: 0; counter-reset: chap; }
.sommaire li { counter-increment: chap; display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.5rem; padding: 0.55rem 0; border-bottom: 1px solid var(--bordure); margin: 0; }
.sommaire li::before { content: counter(chap, decimal-leading-zero); font-family: var(--mono); font-size: 0.8rem; color: var(--vert); padding-top: 0.15rem; }
.inclus { display: grid; gap: 0.5rem; list-style: none; padding: 0; }
.inclus li { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: 0.55rem 0; border-bottom: 1px solid var(--bordure); margin: 0; }
.inclus a { color: var(--texte); text-decoration: none; font-weight: 500; }
.inclus a:hover { color: var(--vert); }
.inclus .prix { font-size: 0.95rem; font-weight: 600; }
.encadre { border: 1px solid var(--bordure); border-left: 3px solid var(--safran); border-radius: 10px; padding: 1.1rem 1.3rem; background: var(--panneau); margin: 1.6rem 0; font-size: 0.94rem; }
.encadre p:last-child { margin-bottom: 0; }
.lien-capensia { display: block; margin-top: 2.5rem; padding: 1.3rem 1.4rem; background: var(--vert-voile); border-radius: 12px; font-size: 0.94rem; }
.lien-capensia strong { color: var(--vert-fonce); }

/* --------------------------------------------------------------------------
   Commander
   -------------------------------------------------------------------------- */
.commande-grille { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 980px) { .commande-grille { grid-template-columns: minmax(0, 1fr) 20rem; gap: 3.5rem; } }
.formulaire { display: grid; gap: 1.1rem; background: var(--panneau); border: 1px solid var(--bordure); border-radius: 16px; padding: 1.8rem; }
fieldset.bloc { border: 0; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
fieldset.bloc legend { font-family: var(--titre); font-weight: 600; font-size: 1.2rem; color: var(--texte); margin-bottom: 0.4rem; padding: 0; }
.choix { display: grid; gap: 0.5rem; }
.choix label { display: flex; gap: 0.7rem; align-items: flex-start; border: 1px solid var(--bordure-vive); border-radius: 10px; padding: 0.8rem 0.95rem; cursor: pointer; font-size: 0.95rem; color: var(--texte); background: var(--fond-2); }
.choix label:has(input:checked) { border-color: var(--vert); background: var(--vert-voile); }
.choix input { margin-top: 0.25rem; accent-color: var(--vert); flex-shrink: 0; }
.choix small { display: block; color: var(--texte-3); font-size: 0.84rem; margin-top: 0.15rem; }
.champ label { display: block; font-weight: 500; font-size: 0.9rem; margin-bottom: 0.3rem; color: var(--texte); }
.champ label .facultatif { font-weight: 400; color: var(--texte-3); font-size: 0.8rem; }
.champ input, .champ select, .champ textarea { width: 100%; font-family: var(--sans); font-size: 0.97rem; padding: 0.72rem 0.85rem; border: 1px solid var(--bordure-vive); border-radius: 8px; background: var(--fond-2); color: var(--texte); }
.champ input[type="checkbox"], .champ input[type="radio"] { width: auto; padding: 0; }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: 2px solid var(--vert); outline-offset: 1px; border-color: var(--vert); }
.champ .erreur-champ { display: none; color: var(--rouge); font-size: 0.84rem; margin-top: 0.3rem; }
.champ.invalide input, .champ.invalide select, .champ.invalide textarea { border-color: var(--rouge); }
.champ.invalide .erreur-champ { display: block; }
.champ[hidden] { display: none !important; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.case { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.86rem; line-height: 1.5; color: var(--texte-2); cursor: pointer; }
.case input { margin-top: 0.2rem; accent-color: var(--vert); flex-shrink: 0; }
.case a { color: var(--texte); }
.pot-de-miel { position: absolute; left: -9999px; opacity: 0; height: 0; }
.t-erreur { color: var(--rouge); font-size: 0.9rem; margin: 0; }
.confirmation { display: none; border: 1px solid rgba(14, 94, 75, 0.4); border-radius: 14px; padding: 1.4rem 1.6rem; background: var(--vert-voile); color: var(--texte); }
.confirmation.visible { display: block; }
.confirmation p:last-child { margin: 0; }
.micro { font-size: 0.84rem; color: var(--texte-3); margin: -0.3rem 0 0; }

.recap { background: var(--panneau); border: 1px solid var(--bordure); border-radius: 16px; padding: 1.4rem; position: sticky; top: 5.2rem; }
.recap h2 { font-size: 1.2rem; margin-bottom: 0.8rem; }
.recap ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.recap li { display: flex; justify-content: space-between; gap: 0.8rem; align-items: baseline; font-size: 0.92rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--bordure); }
.recap li .nom { color: var(--texte); }
.recap li button { background: none; border: 0; color: var(--texte-3); font-size: 0.8rem; padding: 0; cursor: pointer; }
.recap li button:hover { color: var(--rouge); }
.recap .total { display: flex; justify-content: space-between; padding-top: 0.8rem; font-weight: 700; color: var(--texte); font-size: 1.05rem; }
.recap .vide { font-size: 0.9rem; color: var(--texte-3); }
.recap .vide a { color: var(--vert); }

/* Barre de sélection flottante */
.barre-selection {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%) translateY(140%);
  z-index: 60; display: flex; align-items: center; gap: 1rem;
  background: var(--texte); color: #fff; border-radius: 999px; padding: 0.6rem 0.7rem 0.6rem 1.2rem;
  box-shadow: 0 20px 40px -18px rgba(0,0,0,0.5);
  font-size: 0.9rem; transition: transform 0.3s cubic-bezier(0.2, 1, 0.3, 1), visibility 0.3s;
  max-width: calc(100% - 2rem); visibility: hidden;
}
.barre-selection.visible { transform: translateX(-50%) translateY(0); visibility: visible; }
.barre-selection strong { font-variant-numeric: tabular-nums; }
.barre-selection [data-barre-texte] { white-space: nowrap; }
.barre-selection .bouton { padding: 0.55rem 1.1rem; font-size: 0.88rem; border-radius: 999px; }

/* --------------------------------------------------------------------------
   FAQ, encadrés, prose, pied
   -------------------------------------------------------------------------- */
.faq details { border-bottom: 1px solid var(--bordure); }
.faq details:first-of-type { border-top: 1px solid var(--bordure); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; font-weight: 600; color: var(--texte); font-size: 1.02rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--vert); font-family: var(--titre); font-size: 1.4rem; line-height: 1; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .reponse { padding: 0 0 1.2rem; max-width: 48rem; font-size: 0.96rem; }
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2.2em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.5em; }
.prose ul { padding-left: 1.2rem; }
.hero-page { padding: 3.6rem 0 3rem; border-bottom: 1px solid var(--bordure); }
.hero-page h1 { font-size: clamp(2rem, 4vw, 3.2rem); max-width: 22ch; }
.hero-page .accroche { font-size: 1.12rem; max-width: 40rem; }

.pied { background: var(--texte); color: #B8BDB9; padding: 3.6rem 0 2rem; font-size: 0.9rem; margin-top: 2rem; }
.pied a { color: #E8EAE6; text-decoration: none; }
.pied a:hover { color: var(--safran); }
.pied .logo { color: #fff; }
.pied .logo .par { color: #9AA3A0; border-color: rgba(255,255,255,0.2); }
.pied-grille { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.pied h3 { color: #fff; font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 1rem; }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin-bottom: 0.5rem; }
.mention-pied { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.8rem; color: #9AA3A0; }
.mention-pied a { text-decoration: underline; }

/* Bandeau consentement (n'apparaît que si des identifiants publicitaires sont posés) */
.bandeau-consent { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90; max-width: 40rem; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.4rem; background: var(--panneau); border: 1px solid var(--bordure); border-radius: 14px; padding: 1.1rem 1.3rem; box-shadow: var(--ombre-relief); font-size: 0.9rem; }
.bandeau-consent p { margin: 0; flex: 1 1 22rem; }
.bandeau-actions { display: flex; gap: 0.6rem; }
.bandeau-actions .bouton { padding: 0.55rem 1rem; font-size: 0.86rem; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .grille-modules, .familles, .etapes-3 { grid-template-columns: repeat(2, 1fr); }
  .pied-grille { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .burger { display: block; }
  .nav-principale { position: absolute; top: 68px; left: 0; right: 0; background: rgba(244, 244, 238, 0.98); border-bottom: 1px solid var(--bordure); display: none; padding: 1rem 1.5rem 1.4rem; }
  .nav-principale.ouverte { display: block; }
  .nav-principale ul { flex-direction: column; align-items: flex-start; gap: 0.9rem; }
}
@media (max-width: 680px) {
  .grille-modules, .familles, .etapes-3, .pied-grille, .deux-colonnes { grid-template-columns: 1fr; }
  .section { padding: 3.6rem 0; }
  .hero { padding: 3rem 0; }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 2.9rem); }
  .tableau li { grid-template-columns: 3.6rem 1fr auto; }
  .tableau .duree { display: none; }
  .bouton { width: 100%; }
  .nav-principale a.bouton-primaire, .barre-selection .bouton, .carte .ajouter { width: auto; }
  .achat, .recap { position: static; }
  .formulaire { padding: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carte, .famille-carte, .bouton, .barre-selection { transition: none; }
}

/* ---------- v5 : recherche, tri, échelle durée → prix, conseils, apparition ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.outils-catalogue { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; align-items: center; margin-top: 2rem; }
.recherche { flex: 1 1 18rem; max-width: 30rem; }
.recherche input { width: 100%; font: inherit; font-size: 1rem; padding: 0.75rem 1rem 0.75rem 2.6rem; border: 1px solid var(--bordure-vive); border-radius: 10px; background: var(--panneau) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='9' cy='9' r='5.5' fill='none' stroke='%23646B7D' stroke-width='1.6'/%3E%3Cpath d='m13.5 13.5 3.5 3.5' stroke='%23646B7D' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0.85rem center / 1.15rem; color: var(--texte); min-height: 44px; }
.recherche input:focus { outline: 2px solid var(--vert); outline-offset: 1px; border-color: var(--vert); }
.tri { display: flex; align-items: center; gap: 0.5rem; font-size: 0.86rem; font-weight: 600; color: var(--texte-3); }
.tri select { font: inherit; font-weight: 500; font-size: 0.92rem; color: var(--texte); padding: 0.6rem 0.8rem; border: 1px solid var(--bordure-vive); border-radius: 10px; background: var(--panneau); min-height: 44px; }
.bascule { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 500; color: var(--texte); cursor: pointer; min-height: 44px; }
.bascule input { width: 1.1rem; height: 1.1rem; accent-color: var(--vert); }
.filtres { margin-top: 1.2rem; }
.aucun { margin-top: 1rem; padding: 1.2rem; border: 1px dashed var(--bordure-vive); border-radius: var(--radius); }
.lien-bouton { font: inherit; color: var(--vert); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.carte .duree { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; font-weight: 600; color: var(--vert); background: var(--vert-voile); border-radius: 999px; padding: 0.2rem 0.65rem 0.2rem 0.5rem; white-space: nowrap; }
.carte .ajouter { min-height: 40px; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.echelle-grille { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 980px) { .echelle-grille { grid-template-columns: 0.8fr 1.2fr; gap: 4rem; } }
.echelle { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.echelle a { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) 4.6rem; grid-template-areas: "duree barre prix" ". titre titre"; column-gap: 0.9rem; row-gap: 0.15rem; align-items: center; padding: 0.75rem 1rem; background: var(--panneau); border: 1px solid var(--bordure); border-radius: var(--radius); text-decoration: none; color: var(--texte); transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s; }
.echelle a:hover { border-color: rgba(14, 94, 75, 0.5); transform: translateX(4px); box-shadow: var(--ombre-douce); }
.ech-duree { grid-area: duree; font-family: var(--mono); font-size: 0.84rem; color: var(--vert); white-space: nowrap; }
.ech-barre { grid-area: barre; height: 0.55rem; background: var(--panneau-2); border-radius: 999px; overflow: hidden; }
.ech-barre span { display: block; height: 100%; background: linear-gradient(90deg, var(--vert), var(--safran)); border-radius: 999px; transform-origin: left; }
.ech-prix { grid-area: prix; font-family: var(--titre); font-weight: 700; font-size: 1.15rem; text-align: right; white-space: nowrap; }
.ech-titre { grid-area: titre; font-size: 0.86rem; color: var(--texte-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recap .nom small { display: block; font-size: 0.78rem; color: var(--texte-3); font-weight: 400; }
.conseil { margin: 0.9rem 0 0; padding: 0.9rem; background: var(--safran-voile); border-radius: var(--radius); font-size: 0.88rem; color: var(--texte); }
.conseil p { margin: 0 0 0.7rem; }
.conseil .bouton { width: 100%; font-size: 0.88rem; padding: 0.55rem 0.8rem; background: var(--panneau); }
.modalites li { align-items: flex-start; }
.modalites li span:first-child { flex: 0 0 8.5rem; font-weight: 600; color: var(--texte); }
.modalites li span:last-child { flex: 1; text-align: left; }
.a-voir { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.a-voir.vu { opacity: 1; transform: none; }
.a-voir .ech-barre span { transform: scaleX(0); transition: transform 0.7s cubic-bezier(.2,.7,.2,1) 0.15s; }
.a-voir.vu .ech-barre span { transform: none; }
@media (max-width: 680px) {
  .echelle a { grid-template-columns: 4.2rem minmax(0, 1fr) auto; }
  .modalites li { flex-direction: column; gap: 0.1rem; }
  .modalites li span:first-child { flex: none; }
  .tri { flex: 1 1 100%; }
  .tri select { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .a-voir { opacity: 1; transform: none; transition: none; } }
@media (max-width: 680px) {
  .filtres .groupe { flex-wrap: nowrap; overflow-x: auto; width: 100%; margin-right: 0; padding-bottom: 0.3rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .filtres .groupe::-webkit-scrollbar { display: none; }
  .filtres .filtre, .filtres .etiquette { flex-shrink: 0; }
  .filtres .etiquette { min-width: 3.4rem; }
}
