/* EX’SIE — composants. Tout mouvement passe par transform, opacity ou filter. */

/* ---------- Petits éléments ---------- */
.surtitre {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--t-mini); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.surtitre::before { content: ""; width: 7px; height: 7px; background: var(--accent); flex: none; }
.pastille {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-pilule);
  background: var(--surface); border: 1px solid var(--line); font-size: var(--t-petit); font-weight: 600; color: var(--ink);
}
.ac {
  display: inline-block; padding: 1px 9px; border-radius: 6px; border: 1px dashed currentColor;
  color: var(--ambre-texte); font-size: .84em; font-weight: 700; line-height: 1.5;
}
.note-illu { font-size: var(--t-mini); color: var(--muted); letter-spacing: .02em; }

/* ---------- Bouton principal : la pilule s’étire vers l’avant, la flèche avance ---------- */
.btn {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 18px;
  padding: 17px 26px; border-radius: var(--r-pilule); color: var(--sur-accent);
  font-weight: 700; font-size: .97rem; line-height: 1.2; white-space: nowrap;
  -webkit-tap-highlight-color: transparent; transition: transform var(--d-1) var(--c-entree);
}
.btn::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; background: var(--accent-fonce);
  transform-origin: left center; transition: transform var(--d-3) var(--c-elan);
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1.05); }
.btn:active { transform: scale(.975); }
.btn--petit { padding: 13px 20px; font-size: .9rem; gap: 12px; }
.btn--clair { color: var(--ink); }
.btn--clair::before { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-fort); }

.fleche { width: 18px; height: 18px; flex: none; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fleche path { transition: transform var(--d-3) var(--c-elan); transform-box: fill-box; }
.fleche .f-tige { transform-origin: left center; }
:is(.btn, .lien, .carte):is(:hover, :focus-visible, :focus-within) .f-tige { transform: scaleX(1.45); }
:is(.btn, .lien, .carte):is(:hover, :focus-visible, :focus-within) .f-tete { transform: translateX(6px); }

/* ---------- Lien : le trait se tire depuis la gauche ---------- */
.lien {
  position: relative; display: inline-flex; align-items: center; gap: 10px; padding-block: 4px;
  color: var(--accent-texte); font-weight: 700; font-size: .95rem;
}
.lien::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: left center; transition: transform var(--d-3) var(--c-elan);
}
.lien:hover::after, .lien:focus-visible::after { transform: scaleX(1); }
.diag { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--d-3) var(--c-elan); }
.lien:hover .diag, .lien:focus-visible .diag { transform: translate(3px, -3px); }

/* ---------- Carte : à plat, une bordure fine. Au survol, le contour passe à l’accent. ---------- */
.carte {
  position: relative; display: flex; flex-direction: column; gap: var(--e-3);
  padding: clamp(22px, 2.4vw, 30px); border-radius: var(--r-3);
  background: var(--surface); border: 1px solid var(--line);
}
.carte::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; border: 1.5px solid var(--accent);
  opacity: 0; transition: opacity var(--d-2); pointer-events: none;
}
.carte--lien:hover::after, .carte--lien:focus-within::after { opacity: 1; }
.carte-cible::before { content: ""; position: absolute; inset: 0; border-radius: var(--r-3); z-index: 1; }
.carte-cible:focus-visible { outline: none; }
.carte:has(.carte-cible:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.carte-num { font-size: var(--t-mini); font-weight: 700; letter-spacing: .08em; color: var(--accent-texte); }
.carte p { font-size: .97rem; }
.carte .lien { margin-top: auto; align-self: flex-start; }

/* ---------- Onglets : le curseur glisse sous l’onglet actif ---------- */
.onglets { position: relative; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; border-bottom: 1px solid var(--line); }
.onglets::-webkit-scrollbar { display: none; }
.onglet {
  position: relative; padding: 14px 18px; font-weight: 600; color: var(--muted); white-space: nowrap; scroll-snap-align: center;
  transition: color var(--d-2);
}
.onglet:hover { color: var(--ink); }
.onglet[aria-selected="true"] { color: var(--ink); font-weight: 700; }
.onglets-curseur {
  position: absolute; left: 0; bottom: -1px; width: 100px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent);
  transform-origin: left center; transform: translateX(var(--x, 0px)) scaleX(var(--w, 1)); transition: transform var(--d-3) var(--c-elan);
}
.panneau { animation: panneau-entree var(--d-3) var(--c-entree) both; }
@keyframes panneau-entree { from { opacity: 0; filter: blur(6px); } }

/* ---------- Questions : la réponse apparaît en place, la suite se décale (FLIP) ---------- */
.faq { border-top: 1px solid var(--line); }
.faq-item { position: relative; border-bottom: 1px solid var(--line); }
.faq-item::before {
  content: ""; position: absolute; left: -14px; top: 0; bottom: 0; width: 3px; background: var(--accent);
  transform: scaleY(0); transform-origin: top; transition: transform var(--d-3) var(--c-elan);
}
.faq-item.est-ouvert::before { transform: scaleY(1); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; text-align: left;
  padding: 22px 2px 22px 0; font-size: 1.08rem; font-weight: 600; color: var(--ink); line-height: 1.4;
}
.faq-signe { position: relative; width: 16px; height: 16px; flex: none; transition: transform var(--d-3) var(--c-elan); }
.faq-signe::before, .faq-signe::after { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 2px; border-radius: 2px; background: var(--accent); }
.faq-signe::after { transform: rotate(90deg); }
.faq-q[aria-expanded="true"] .faq-signe { transform: rotate(135deg); }
.faq-r { padding: 0 44px 24px 0; }
.faq-r > * + * { margin-top: var(--e-3); }

/* ---------- Champs : le libellé monte quand on entre ---------- */
.champ { position: relative; display: block; }
.champ input, .champ textarea, .champ select {
  width: 100%; height: 62px; padding: 24px 16px 8px; border-radius: var(--r-2); border: 1px solid var(--bord-controle);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; line-height: 1.4; appearance: none;
}
/* La zone de texte grandit avec ce qu’on écrit : pas de poignée de redimensionnement native. */
.champ textarea { height: auto; min-height: 140px; max-height: 420px; padding-top: 26px; resize: none; field-sizing: content; }
.champ-lib {
  position: absolute; left: 16px; top: 18px; color: var(--muted); pointer-events: none; transform-origin: left top;
  transition: transform var(--d-2) var(--c-entree);
}
.champ :is(input, textarea):is(:focus, :not(:placeholder-shown)) ~ .champ-lib,
.champ select ~ .champ-lib { transform: translateY(-11px) scale(.76); }
.champ :is(input, textarea, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: transparent; }
.champ-msg { display: block; min-height: 1.4em; line-height: 1.4; margin-top: 4px; font-size: var(--t-petit); color: var(--ambre-texte); font-weight: 600; }
.champ.est-valide::after {
  content: ""; position: absolute; right: 16px; top: 22px; width: 14px; height: 8px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg); animation: coche var(--d-3) var(--c-elan) both;
}
@keyframes coche { from { opacity: 0; transform: rotate(-45deg) scale(.4); } }

/* ---------- Liste déroulante : un vrai composant, jamais le sélecteur natif ---------- */
.champ--liste > select { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.liste { position: relative; }
.liste-bouton {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: 62px;
  padding: 24px 16px 8px; line-height: 1.4; border-radius: var(--r-2); border: 1px solid var(--bord-controle); background: var(--surface);
  color: var(--ink); font-weight: 600; text-align: left;
}
.liste-bouton:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-2); }
/* Le chevron est centré sur le champ, que le libellé soit posé ou monté. */
.liste-bouton { position: relative; padding-right: 44px; }
.liste-bouton .chevron { position: absolute; right: 18px; top: 25px; width: 12px; height: 12px; color: var(--muted); }
.champ--liste.est-valide::after { right: 46px; }
.champ--liste.est-ouvert .liste-bouton .chevron { transform: rotate(180deg); }
.champ--liste .champ-lib { transform: none; }
.champ--liste.a-valeur .champ-lib, .champ--liste.est-ouvert .champ-lib { transform: translateY(-11px) scale(.76); }
.liste-options {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; max-height: 300px; overflow: auto; padding: 6px;
  border-radius: var(--r-2); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--flottant);
  opacity: 0; transform: translateY(-6px); transition: opacity var(--d-2), transform var(--d-3) var(--c-elan);
}
.champ--liste.est-ouvert .liste-options { opacity: 1; transform: none; }
.liste-option { position: relative; padding: 11px 14px 11px 40px; border-radius: 8px; font-weight: 600; color: var(--ink); cursor: pointer; line-height: 1.4; }
.liste-option.est-active { background: var(--bg-doux); }
.liste-option[aria-selected="true"] { color: var(--accent-texte); }
.liste-option[aria-selected="true"]::before {
  content: ""; position: absolute; left: 15px; top: 50%; width: 11px; height: 6px; margin-top: -5px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg);
}

/* ---------- Curseur de réglage : piste fine, poignée pleine. Aucun rendu natif. ---------- */
.reglage { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; --p: 0%; }
.reglage::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--p), var(--line-fort) var(--p)); }
.reglage::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line-fort); }
.reglage::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
.reglage::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -10px; border-radius: 50%; background: var(--accent-fonce); border: 5px solid var(--surface); box-shadow: 0 0 0 1px var(--line-fort); transition: transform var(--d-2) var(--c-elan); }
.reglage::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent-fonce); border: 5px solid var(--surface); box-shadow: 0 0 0 1px var(--line-fort); }
.reglage:hover::-webkit-slider-thumb, .reglage:active::-webkit-slider-thumb { transform: scale(1.15); }
.reglage:focus-visible { outline: none; }
.reglage:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--accent); }
.reglage:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px var(--accent); }

/* ---------- Case à cocher : un composant du site, la coche se trace ---------- */
.case { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: .95rem; cursor: pointer; }
.case input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.case-boite { display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; border-radius: 7px; background: var(--surface); border: 1.5px solid var(--bord-controle); }
.case-boite svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.case-boite path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset var(--d-3) var(--c-trajet); }
.case input:checked + .case-boite { background: var(--accent-fonce); border-color: var(--accent-fonce); }
.case input:checked + .case-boite path { stroke-dashoffset: 0; }
.case input:focus-visible + .case-boite { outline: 2px solid var(--accent); outline-offset: 2px; }
.case a { color: var(--accent-texte); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Mini-simulation de temps (accueil, ressources) ---------- */
.outil { min-height: 250px; }
.outil-quoi { font-size: var(--t-mini); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-texte); }
.simu { display: grid; gap: 10px; margin-top: auto; }
.simu label { display: flex; justify-content: space-between; font-size: var(--t-petit); font-weight: 600; color: var(--muted); }
.simu output { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.simu .reglage { position: relative; z-index: 2; }
.simu-res { display: flex; align-items: baseline; gap: 8px; }
.simu-res b { font-size: 2.2rem; font-weight: 700; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- Bandeau ---------- */
.bandeau { background: var(--bg-doux); font-size: .8rem; color: var(--muted); }
.bandeau-in { display: flex; align-items: center; justify-content: space-between; min-height: 34px; gap: 16px; }
.bandeau-msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bandeau-msg::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 10px; vertical-align: middle; }
.bandeau-droite { display: flex; gap: 18px; align-items: center; white-space: nowrap; }
.bandeau a { font-weight: 700; color: var(--ink); }
.heure { font-variant-numeric: tabular-nums; }
.heure time { color: var(--ink); font-weight: 700; }
@media (max-width: 640px) { .heure, .bandeau-suite { display: none; } }

/* ---------- En-tête ---------- */
.entete { position: sticky; top: 0; z-index: var(--z-entete); transition: transform var(--d-3) var(--c-entree); }
.entete::before, .entete::after { content: ""; position: absolute; inset: 0; z-index: -1; border-bottom: 1px solid var(--line); transition: opacity var(--d-2); }
.entete::before { background: var(--surface); }
.entete::after { display: none; }
.entete.est-cachee { transform: translateY(-104%); }
/* Trois colonnes : la navigation est centrée sur la page, pas entre le logo et les boutons. */
.entete-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--h-entete); gap: 20px; }
.marque { display: block; justify-self: start; view-transition-name: marque; border-radius: 8px; }
.logo-exsie { height: 50px; width: auto; }
.entete-actions { display: flex; align-items: center; justify-self: end; gap: 10px; }

.nav ul { display: flex; align-items: center; gap: 2px; }
.nav-lien { position: relative; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 10px 14px; font-size: .95rem; font-weight: 600; color: var(--ink); border-radius: var(--r-pilule); }
.nav-lien i {
  position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: var(--o, left) center; transition: transform var(--d-3) var(--c-elan);
}
.nav-lien:hover i, .nav-lien:focus-visible i, .nav-lien[aria-expanded="true"] i { transform: scaleX(1); }
.nav-lien[aria-current] i { transform: scaleX(1); view-transition-name: marqueur; }
.chevron { width: 10px; height: 10px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--d-3) var(--c-elan); }
[aria-expanded="true"] > .chevron { transform: rotate(180deg); }

.bouton-icone { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); }
.bouton-icone::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--bg-doux); transform: scale(.6); opacity: 0; transition: transform var(--d-2) var(--c-elan), opacity var(--d-2); }
.bouton-icone:hover::before, .bouton-icone:focus-visible::before { transform: none; opacity: 1; }
.bouton-icone svg { position: relative; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Bascule de thème : le soleil pivote et laisse place à la lune */
.theme-astre { transition: transform var(--d-4) var(--c-elan); transform-origin: center; }
.theme-astre .rayons { transition: opacity var(--d-2), transform var(--d-3) var(--c-elan); transform-origin: center; }
.theme-astre .lune { opacity: 0; transition: opacity var(--d-2); }
:root[data-theme="dark"] .theme-astre .rayons, :root[data-theme="dark"] .theme-astre .soleil { opacity: 0; transform: scale(.5); }
:root[data-theme="dark"] .theme-astre .lune { opacity: 1; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-astre .rayons, :root:not([data-theme="light"]) .theme-astre .soleil { opacity: 0; transform: scale(.5); }
  :root:not([data-theme="light"]) .theme-astre .lune { opacity: 1; }
}

/* ---------- Méga-menu ---------- */
.mega { position: absolute; left: 0; right: 0; top: 100%; padding-top: 10px; pointer-events: none; }
.mega-panneau {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; padding: 22px; border-radius: var(--r-4);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--flottant);
  opacity: 0; transform: translateY(-12px) scale(.985); transform-origin: top center;
  transition: opacity var(--d-2) var(--c-entree), transform var(--d-3) var(--c-elan);
}
.mega.est-ouvert { pointer-events: auto; }
.mega.est-ouvert .mega-panneau { opacity: 1; transform: none; }
.mega-liste { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; align-content: start; }
.mega-item { position: relative; display: block; padding: 13px 16px 13px 20px; border-radius: var(--r-2); }
.mega-item::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--bg-doux); opacity: 0; transform: scale(.97); transition: opacity var(--d-2), transform var(--d-2) var(--c-elan); }
.mega-item::after { content: ""; position: absolute; left: 8px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--accent); transform: scaleY(0); transform-origin: top; transition: transform var(--d-3) var(--c-elan); }
.mega-item:hover::before, .mega-item:focus-visible::before { opacity: 1; transform: none; }
.mega-item:hover::after, .mega-item:focus-visible::after { transform: scaleY(1); }
.mega-item > * { position: relative; display: block; }
.mega-item strong { color: var(--ink); font-weight: 700; }
.mega-item span { font-size: .86rem; color: var(--muted); line-height: 1.45; }
.mega-pied { grid-column: 1 / -1; padding: 12px 16px 2px 20px; }
.mega-apercu { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 26px; border-radius: var(--r-3); background: var(--bg-doux); min-height: 220px; }
.mega-apercu-titre { font-size: var(--t-mini); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mega-apercu-phrase { font-size: .92rem; color: var(--text); min-height: 3em; }

/* Parcours en 4 étapes : les nœuds se posent, les traits se tirent */
.parcours { display: grid; grid-template-columns: repeat(4, 1fr); }
.parcours li { position: relative; padding-top: 28px; text-align: center; font-size: .84rem; font-weight: 700; color: var(--ink); }
.parcours li::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 2.5px var(--accent);
  transform: scale(0); transition: transform var(--d-3) var(--c-elan); transition-delay: calc(var(--i) * 150ms);
}
.parcours li::after {
  content: ""; position: absolute; top: 6px; left: calc(50% + 11px); width: calc(100% - 22px); height: 2px; border-radius: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left center; transition: transform var(--d-2) var(--c-trajet); transition-delay: calc(var(--i) * 150ms + 110ms);
}
.parcours li:last-child::after { display: none; }
.parcours li span { display: block; opacity: 0; transform: translateY(5px); transition: opacity var(--d-2), transform var(--d-3) var(--c-elan); transition-delay: calc(var(--i) * 150ms + 60ms); }
.parcours.est-trace li::before { transform: scale(1); }
.parcours.est-trace li::after { transform: scaleX(1); }
.parcours.est-trace li span { opacity: 1; transform: none; }
.parcours:not(.est-trace) li::before, .parcours:not(.est-trace) li::after, .parcours:not(.est-trace) li span { transition: none; }

/* Pièces Sage 100 : le module survolé vient s’emboîter */
.pieces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.piece {
  display: grid; place-items: center; min-height: 54px; padding: 6px; border-radius: 10px; text-align: center;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: .74rem; font-weight: 700; color: var(--muted); line-height: 1.25;
  transition: transform var(--d-3) var(--c-elan), opacity var(--d-2);
}
.piece.est-detachee { transform: translate(8px, -14px) rotate(5deg); opacity: .55; transition: none; }
.piece.est-posee { color: #fff; background: var(--accent-fonce); box-shadow: none; }

/* ---------- Menu mobile plein écran ---------- */
.burger { display: none; }
.burger span { position: absolute; left: 12px; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform var(--d-3) var(--c-elan); }
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.menu-m { position: fixed; inset: 0; z-index: var(--z-menu); visibility: hidden; overflow: clip; transition: visibility 0s var(--d-3); }
.menu-m.est-ouvert { visibility: visible; transition-delay: 0s; }
.menu-m-fond {
  position: absolute; left: var(--bx, 90%); top: var(--by, 60px); width: 120px; height: 120px; margin: -60px; border-radius: 50%;
  background: var(--surface); transform: scale(0); transition: transform var(--d-3) var(--c-trajet);
}
.menu-m.est-ouvert .menu-m-fond { transform: scale(var(--bs, 24)); transition-duration: var(--d-4); }
.menu-m-corps { position: absolute; inset: 0; display: flex; flex-direction: column; padding: calc(var(--h-entete) + 50px) var(--gouttiere) 24px; perspective: 900px; }
.menu-m-niveaux { position: relative; flex: 1; transform-style: preserve-3d; }
.menu-m-niv { position: absolute; inset: 0; overflow-y: auto; transform-origin: left center; transition: transform var(--d-4) var(--c-elan), opacity var(--d-3); }
.menu-m-niv[data-niv="2"] { transform: rotateY(75deg); transform-origin: right center; opacity: 0; pointer-events: none; }
.menu-m[data-niveau="2"] .menu-m-niv[data-niv="1"] { transform: rotateY(-75deg); opacity: 0; pointer-events: none; visibility: hidden; transition: transform var(--d-4) var(--c-elan), opacity var(--d-3), visibility 0s var(--d-3); } /* hors du parcours clavier */
.menu-m[data-niveau="2"] .menu-m-niv[data-niv="2"].est-actif { transform: none; opacity: 1; pointer-events: auto; }
.menu-m-niv:not(.est-actif)[data-niv="2"] { visibility: hidden; }
.menu-m-entree {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; width: 100%; text-align: left;
  padding: 14px 0; border-bottom: 1px solid var(--line); font-size: clamp(1.5rem, 6.4vw, 2rem); font-weight: 300; color: var(--ink); line-height: 1.2;
  opacity: 0; transform: translate3d(0, 26px, -180px) rotateX(-28deg); transform-origin: left top;
  transition: transform var(--d-2) var(--c-trajet), opacity var(--d-1);
}
.menu-m-entree small { font-size: var(--t-mini); font-weight: 700; letter-spacing: .08em; color: var(--accent-texte); }
.menu-m-entree--petite { display: block; font-size: 1.15rem; font-weight: 600; padding: 12px 0; }
.menu-m-entree--petite span { display: block; font-size: .86rem; font-weight: 500; color: var(--muted); }
.menu-m.est-ouvert .menu-m-niv.est-actif .menu-m-entree {
  opacity: 1; transform: none; transition: transform var(--d-4) var(--c-elan), opacity var(--d-3); transition-delay: calc(var(--i, 0) * 55ms + 180ms);
}
.menu-m-retour { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: var(--t-petit); font-weight: 700; color: var(--accent-texte); }
.menu-m-bas { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; opacity: 0; transform: translateY(18px); transition: opacity var(--d-2), transform var(--d-2); }
.menu-m.est-ouvert .menu-m-bas { opacity: 1; transform: none; transition: opacity var(--d-3) .45s, transform var(--d-4) var(--c-elan) .45s; }
.menu-m-bas .btn { justify-content: space-between; }
.menu-m-coord { display: flex; justify-content: space-between; gap: 12px; font-size: var(--t-petit); font-weight: 700; color: var(--ink); }
html.menu-ouvert { overflow: hidden; }
html.menu-ouvert .entete { z-index: calc(var(--z-menu) + 1); transform: none; }
html.menu-ouvert .entete::before, html.menu-ouvert .entete::after { opacity: 0; }

@media (max-width: 1020px) {
  .entete-in { grid-template-columns: 1fr auto; }
  .nav, .entete .btn { display: none; }
  .burger { display: grid; }
  .mega { display: none; }
}
@media (max-width: 760px) { .logo-exsie { height: 36px; } }

/* ---------- Appel à l’action final ---------- */
.appel { position: relative; overflow: clip; padding-block: clamp(96px, 12vw, 180px); text-align: center; }
.appel-in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: var(--e-5); }
.appel .surtitre { justify-content: center; }
.appel p { margin-inline: auto; max-width: 44ch; }
.appel .btn { margin-top: var(--e-3); }
/* Scène de convergence : les emblèmes de la page viennent se ranger derrière le bouton */
.appel-scene { position: absolute; inset: 0; pointer-events: none; perspective: 1000px; }
.c-embleme { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--accent); opacity: 0; will-change: transform, opacity; }
.c-embleme svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Bloc « questions » : titre collant à gauche, accordéon à droite ---------- */
.questions { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.questions-titre { position: sticky; top: calc(var(--h-entete) + 32px); display: flex; flex-direction: column; gap: var(--e-5); align-items: flex-start; }
@media (max-width: 900px) { .questions { grid-template-columns: 1fr; } .questions-titre { position: static; } }

/* ---------- Pied de page ---------- */
.pied { position: relative; overflow: clip; background: var(--bg-doux); padding-block: clamp(64px, 8vw, 112px) 28px; }
.pied-haut { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: end; padding-bottom: clamp(48px, 6vw, 88px); }
.pied-signature { font-size: clamp(2.1rem, 1.1rem + 4.2vw, 4.4rem); font-weight: 300; line-height: 1.06; letter-spacing: -.02em; color: var(--ink); max-width: none; }
.pied-signature strong { font-weight: 700; color: var(--ink); }
.pied-carte { justify-self: end; width: min(100%, 460px); }
.carte-nc { width: 100%; height: auto; overflow: visible; }
.carte-nc path { fill: none; stroke: var(--accent); stroke-width: 1.3; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
/* Seule exception à « transform / opacity / filter » : le tracé d’un trait SVG (repeint local, déjà utilisé par le hero). */
.est-vu .carte-nc path { stroke-dashoffset: 0; transition: stroke-dashoffset 2.6s var(--c-trajet); }
.est-vu .carte-nc path:nth-child(n+2) { transition-duration: 1s; transition-delay: 2.2s; }
.pied-carte figcaption { margin-top: 10px; text-align: right; font-size: var(--t-mini); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pied-colonnes { display: grid; grid-template-columns: repeat(3, 1fr) 1.2fr; gap: 32px; padding-block: 40px; border-top: 1px solid var(--line-fort); }
.pied-titre { margin-bottom: 14px; font-size: var(--t-mini); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pied-colonnes li + li { margin-top: 6px; }
.pied-lien { position: relative; display: inline-block; padding-block: 3px; font-weight: 600; color: var(--ink); }
.pied-lien::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: left center; transition: transform var(--d-3) var(--c-elan); }
.pied-lien:hover::after, .pied-lien:focus-visible::after { transform: scaleX(1); }
.pied-contact { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pied-contact .gros { font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.pied-bas { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; padding-top: 24px; border-top: 1px solid var(--line-fort); font-size: var(--t-petit); color: var(--muted); }
.pied-bas p { max-width: none; }
.pied-bas a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-fort); }
.pied-partenaires { display: flex; align-items: center; gap: 22px; }
.logo-sage { height: 22px; width: auto; color: var(--ink); }
.logo-exform { height: 26px; width: auto; }

/* Sélecteur de thème à trois positions */
.theme-choix { position: relative; display: inline-grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: var(--r-pilule); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.theme-choix button { position: relative; z-index: 1; padding: 7px 14px; font-size: var(--t-petit); font-weight: 700; color: var(--muted); border-radius: var(--r-pilule); transition: color var(--d-2); }
.theme-choix button[aria-pressed="true"] { color: #fff; }
.theme-choix::before {
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); border-radius: var(--r-pilule); background: var(--accent-fonce);
  transform: translateX(calc(var(--pos, 2) * 100%)); transition: transform var(--d-3) var(--c-elan);
}

@media (max-width: 900px) {
  .pied-haut { grid-template-columns: 1fr; }
  .pied-carte { justify-self: start; width: min(100%, 360px); }
  .pied-carte figcaption { text-align: left; }
  .pied-colonnes { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .pied-colonnes { grid-template-columns: 1fr; } }

/* ---------- Récit : le texte défile, la scène reste à l’écran ----------
   Structure : section.recit[data-scene] > .conteneur.recit-in > .recit-etapes (.recit-etape × n) + .recit-scene.
   La scène remplit .recit-scene ; sa progression est celle du défilement dans la section (kit.progressionCollante). */
.recit { position: relative; }
.recit-in { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
/* Sur grand écran, la scène déborde de la grille jusqu’au bord droit de la fenêtre : elle prend la place qu’elle mérite. */
@media (min-width: 901px) {
  .recit-scene { margin-right: calc(-1 * ((100vw - min(100vw, var(--largeur))) / 2 + var(--gouttiere) - 28px)); }
}
.recit-etapes { padding-bottom: 16vh; }
.recit-etape { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--e-5); }
.recit-etape:first-child { min-height: calc(100vh - var(--h-entete) - 34px); min-height: calc(100svh - var(--h-entete) - 34px); padding-block: var(--e-7); }
.recit { overflow-x: clip; }
.recit-scene { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; perspective: 1300px; }
.scene-cadre { position: relative; flex: none; transform-origin: center; --relief: 0; }
/* Profondeur : le cadre d’une scène de récit est un espace 3D (kit.cadrer l’oriente et règle --relief de 1 à 0).
   Un élément prend du relief avec `translate: 0 0 calc(Npx * var(--relief))`. */
.recit-scene .scene-cadre { transform-style: preserve-3d; }
/* Scène redressée (fin du récit) : on quitte l’espace 3D, sinon les éléments placés par transform restent rééchantillonnés, donc flous. */
.recit-scene.est-plate { perspective: none; }
.recit-scene.est-plate .scene-cadre { transform-style: flat; }
@media (max-width: 900px) {
  .recit-in { grid-template-columns: 1fr; gap: 0; }
  /* Sur petit écran l’en-tête reste affiché sur les pages à récit : la scène se cale juste dessous, sans jamais être recouverte. */
  .recit-scene { order: -1; top: var(--h-entete); height: var(--h-scene); min-height: 330px; z-index: 2; background: var(--recit-fond, var(--bg)); perspective: 900px; }
  /* Le texte qui défile passe sous la scène : un filet net marque la limite (pas de dégradé où des fragments transparaissent). */
  .recit-scene { border-bottom: 1px solid var(--line); margin-inline: calc(-1 * var(--gouttiere)); }
  body:has(.recit) .entete.est-cachee { transform: none; }
  .recit-etapes { padding-bottom: 6vh; }
  .recit-etape, .recit-etape:first-child { min-height: 58svh; justify-content: flex-start; padding-block: 4vh 0; }
}

/* Fil d’Ariane */
.fil { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--t-petit); font-weight: 600; color: var(--muted); }
.fil a { color: var(--accent-texte); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-fort); }
.fil [aria-current] { color: var(--ink); }

/* ---------- Grilles utilitaires ---------- */
.grille { display: grid; gap: var(--e-5); }
.grille--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grille--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.duo { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.duo--haut { align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.entete-section { display: flex; flex-direction: column; gap: var(--e-4); margin-bottom: clamp(32px, 4vw, 56px); }
@media (max-width: 900px) { .grille--3, .grille--2, .duo { grid-template-columns: 1fr; } }
@media (min-width: 620px) and (max-width: 900px) {
  .grille--3 { grid-template-columns: 1fr 1fr; }
  .grille--3 > :last-child:nth-child(odd) { grid-column: 1 / -1; } /* pas de carte orpheline */
}

/* ---------- Accessibilité : retouches issues de l’audit du 12/11/2026 ---------- */
/* L’option pilotée au clavier se voit (son fond seul ne suffisait pas). */
.liste-option.est-active { outline: 2px solid var(--accent); outline-offset: -2px; }
/* Dans un conteneur défilant, l’anneau de focus passe à l’intérieur de l’élément pour ne pas être rogné. */
:is(.onglet, .cran, .menu-m-entree, .menu-m-retour):focus-visible { outline-offset: -2px; }
@media (max-width: 900px) {
  /* Un lien d’étape atteint au clavier se cale sous la scène collante, pas derrière elle. */
  .recit-etape :is(a, button) { scroll-margin-top: calc(var(--h-entete) + var(--h-scene) + 16px); }
}
/* Fenêtre basse (téléphone à l’horizontale, zoom à 200 %) : une scène collante ne laisserait aucune place au texte.
   Elle redevient un bloc ordinaire, en tête de section. */
@media (max-width: 900px) and (max-height: 640px) {
  .recit-scene { position: static; height: 330px; min-height: 0; }
  .recit-etape, .recit-etape:first-child { min-height: 0; padding-block: 28px; }
}

/* Hauteur de la scène collante sur petit écran. Une tablette a la place d’en donner davantage : la scène y occupe mieux la largeur. */
:root { --h-scene: 48svh; }
@media (min-width: 600px) and (max-width: 900px) and (min-height: 700px) { :root { --h-scene: 58svh; } }

/* Titre d’une page à récit : la colonne de texte est étroite, le titre y tient en cinq lignes au plus. */
@media (min-width: 901px) { .recit-etape h1 { font-size: clamp(2.4rem, 1.2rem + 3vw, 3.7rem); } }

/* Liens courts : zone de toucher d’au moins 24 px de haut, sans déplacer le texte. */
:is(.bandeau, .fil, .pied-bas, .glossaire .ou, .menu-m-coord, .infos) a, .menu-m-retour { padding-block: 4px; }
