/* ═══ LES DÉMONSTRATIONS DE « COMMENT ÇA MARCHE ? » ═════════════════════
   Demande de Jimmy : un bouton en bas à droite de chaque carte d'étape ouvre,
   au milieu de l'écran, une petite démonstration animée de l'étape ; le reste
   de la page est grisé derrière. La fenêtre sort du bouton et y rentre.

   LE TEMPS EST COMMUN AUX QUATRE SCÈNES : une boucle de --am-t, en trois
   temps qui suivent la légende (0 à 40 %, 40 à 66 %, 66 à 100 %). Les
   animations ne tournent que pendant que la scène est montrée
   ([data-joue]) ; le script les relance à chaque ouverture.

   LES MESURES DE L'ÉCRAN DESSINÉ SONT EN « em » : l'écran grandit et
   rapetisse d'un bloc avec la taille de police de .am-scene__ecran, et le
   curseur retombe toujours sur la case et sur le bouton. */

/* ─── Le bouton de la carte ─────────────────────────────────────────── */
.am-etapes--deux .am-etape{display:flex;flex-direction:column}
.am-etape__pied{margin:auto 0 0!important;padding-top:20px;display:flex;justify-content:flex-end}
.am-etape__demo{display:inline-flex;align-items:center;gap:10px;padding:4px 4px 4px 0;border:0;background:none;cursor:pointer;
  font:700 14.5px/1.2 var(--hol-police-texte),system-ui,sans-serif;color:var(--hol-brand);border-radius:999px}
.am-etape__demo:focus-visible{outline:2px solid var(--hol-accent);outline-offset:4px}
.am-etape__jouer{position:relative;display:grid;place-items:center;width:38px;height:38px;border-radius:50%;
  background:var(--hol-accent);color:var(--hol-accent-encre);box-shadow:0 8px 18px -10px var(--hol-accent);
  transition:transform .2s ease}
.am-etape__jouer svg{width:18px;height:18px;margin-left:2px}
.am-etape__jouer::after{content:"";position:absolute;inset:-5px;border-radius:50%;border:1.5px solid var(--hol-accent);
  opacity:0;animation:am-appel 2.8s ease-out infinite}
.am-etape__demo:hover .am-etape__jouer{transform:scale(1.08)}
@keyframes am-appel{0%{opacity:.7;transform:scale(.85)}70%,100%{opacity:0;transform:scale(1.25)}}

/* ─── La fenêtre ────────────────────────────────────────────────────── */
.am-demo{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:16px;border:0;
  background:transparent;color:var(--hol-text-primary);display:none;align-items:center;justify-content:center;overflow:auto}
.am-demo[open]{display:flex}
.am-demo::backdrop{background:transparent}
.am-demo__voile{position:fixed;inset:0;background:var(--hol-voile-modale);
  -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:am-voile-entre .35s ease both}
.am-demo__boite{position:relative;width:min(780px,100%);max-height:calc(100vh - 32px);overflow:auto;
  padding:24px 28px 18px;border-radius:26px;background:var(--hol-surface-1);
  box-shadow:0 40px 80px -30px var(--hol-surface-inverse);
  animation:am-boite-entre .5s cubic-bezier(.16,.84,.24,1) both}
.am-demo[data-ferme] .am-demo__voile{animation:am-voile-sort .28s ease both}
.am-demo[data-ferme] .am-demo__boite{animation:am-boite-sort .28s cubic-bezier(.5,0,.75,0) both}
/* La boîte part du bouton (--dx, --dy, posés par le script) et y revient. */
@keyframes am-boite-entre{from{opacity:0;transform:translate(var(--dx,0),var(--dy,0)) scale(.18)}to{opacity:1;transform:none}}
@keyframes am-boite-sort{from{opacity:1;transform:none}to{opacity:0;transform:translate(var(--dx,0),var(--dy,0)) scale(.18)}}
@keyframes am-voile-entre{from{opacity:0}to{opacity:1}}
@keyframes am-voile-sort{from{opacity:1}to{opacity:0}}

.am-demo__tete{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.am-demo__n{margin:0 0 4px;font:800 15px/1 var(--hol-police-titre),system-ui,sans-serif;letter-spacing:.08em;color:var(--hol-accent-texte)}
.am-demo__titre{margin:0;font:800 clamp(20px,2.4vw,26px)/1.15 var(--hol-police-titre),system-ui,sans-serif;letter-spacing:-.01em;color:var(--hol-brand)}
.am-demo__croix{flex:none;display:grid;place-items:center;width:42px;height:42px;border-radius:50%;cursor:pointer;
  border:1px solid var(--hol-border-subtle);background:var(--hol-surface-1);color:var(--hol-text-primary);transition:background-color .2s ease,transform .2s ease}
.am-demo__croix svg{width:18px;height:18px}
.am-demo__croix:hover{background:var(--hol-brand-wash);transform:rotate(90deg)}
.am-demo__croix:focus-visible{outline:2px solid var(--hol-accent);outline-offset:3px}
.am-demo__note{margin:14px 0 0;font-size:13px;line-height:1.5;color:var(--hol-text-muted)}

/* ─── La scène ──────────────────────────────────────────────────────── */
.am-scene{--am-t:12s}
.am-scene[hidden]{display:none}
.am-scene__ecran{position:relative;overflow:hidden;border-radius:20px;padding:2.2em 2.4em;font-size:clamp(9px,2.3vw,13px);
  background:linear-gradient(150deg,var(--hol-brand-wash) 0%,var(--hol-surface-0) 50%,var(--hol-accent-wash) 100%)}
.am-scene__ecran::before{content:"";position:absolute;inset:0;pointer-events:none;
  background-image:radial-gradient(var(--hol-brand-border) 1px,transparent 1.4px);background-size:16px 16px;opacity:.45}
.am-fen{position:relative;height:21em;border-radius:1.1em;background:var(--hol-surface-1);overflow:hidden;
  border:1px solid var(--hol-border-subtle);box-shadow:0 1.6em 3em -1.6em var(--hol-surface-inverse)}
.am-fen__barre{display:flex;align-items:center;gap:.45em;height:2.2em;padding:0 1em;border-bottom:1px solid var(--hol-border-subtle);background:var(--hol-surface-0)}
.am-fen__barre i{width:.62em;height:.62em;border-radius:50%;background:var(--hol-border-strong)}
.am-fen__barre span{margin-left:.6em;font-size:.92em;font-weight:700;color:var(--hol-text-secondary)}
.am-fen__corps{position:relative;height:18.8em;padding:1.6em;box-sizing:border-box;font-size:1em}
.am-scene svg{display:block}

/* Le curseur qui clique. */
.am-curseur{position:absolute;z-index:3;width:1.8em;height:1.8em;opacity:0;left:72%;top:5em;
  filter:drop-shadow(0 .2em .3em var(--hol-surface-inverse))}

/* Le message de réussite. */
.am-reussite{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.9em;
  background:var(--hol-surface-1);opacity:0;font-size:1.25em;color:var(--hol-brand)}
.am-reussite b{font:800 1em/1.2 var(--hol-police-titre),system-ui,sans-serif}
.am-reussite__rond{display:grid;place-items:center;width:3.4em;height:3.4em;border-radius:50%;background:var(--hol-succes);color:var(--hol-surface-1)}
.am-reussite__rond svg{width:58%;height:58%}
/* « Dossier complet » prend la place de la zone de dépôt, en haut : posé en
   bas, il couvrait la dernière pièce. */
.am-reussite--bas{inset:1.4em 1.6em auto;height:3em;box-sizing:border-box;flex-direction:row;gap:.7em;padding:0 1em;border-radius:.8em;
  font-size:1em;border:1.5px solid var(--hol-succes);box-shadow:0 1em 2em -1.2em var(--hol-surface-inverse)}
.am-reussite--bas .am-reussite__rond{width:2em;height:2em}

/* La légende : trois temps, une barre qui se remplit sous chacun. */
.am-scene__legende{list-style:none;margin:16px 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.am-scene__legende li{font-size:14px;line-height:1.45;color:var(--hol-text-muted);font-weight:600}
.am-scene__barre{display:block;height:3px;margin-bottom:9px;border-radius:3px;background:var(--hol-border-subtle);overflow:hidden}
.am-scene__barre i{display:block;height:100%;background:var(--hol-accent);transform:scaleX(0);transform-origin:0 50%}

/* ─── Le temps commun ───────────────────────────────────────────────── */
.am-scene[data-joue] .am-fen__corps{animation:am-fondu var(--am-t) linear infinite}
@keyframes am-fondu{0%{opacity:0}3%,96%{opacity:1}100%{opacity:0}}
.am-scene[data-joue] .am-scene__legende li:nth-child(1){animation:am-leg-1 var(--am-t) linear infinite}
.am-scene[data-joue] .am-scene__legende li:nth-child(2){animation:am-leg-2 var(--am-t) linear infinite}
.am-scene[data-joue] .am-scene__legende li:nth-child(3){animation:am-leg-3 var(--am-t) linear infinite}
.am-scene[data-joue] .am-scene__legende li:nth-child(1) i{animation:am-bar-1 var(--am-t) linear infinite}
.am-scene[data-joue] .am-scene__legende li:nth-child(2) i{animation:am-bar-2 var(--am-t) linear infinite}
.am-scene[data-joue] .am-scene__legende li:nth-child(3) i{animation:am-bar-3 var(--am-t) linear infinite}
@keyframes am-leg-1{0%,39.9%{color:var(--hol-text-primary)}40%,100%{color:var(--hol-text-muted)}}
@keyframes am-leg-2{0%,39.9%{color:var(--hol-text-muted)}40%,65.9%{color:var(--hol-text-primary)}66%,100%{color:var(--hol-text-muted)}}
@keyframes am-leg-3{0%,65.9%{color:var(--hol-text-muted)}66%,100%{color:var(--hol-text-primary)}}
@keyframes am-bar-1{0%{transform:scaleX(0)}40%,100%{transform:scaleX(1)}}
@keyframes am-bar-2{0%,40%{transform:scaleX(0)}66%,100%{transform:scaleX(1)}}
@keyframes am-bar-3{0%,66%{transform:scaleX(0)}97%,100%{transform:scaleX(1)}}

/* ═══ 1. CRÉER SON COMPTE ═════════════════════════════════════════════ */
.am-champs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.9em 1em;height:8em}
.am-champ__nom{display:block;height:1.2em;font-size:.85em;font-weight:600;color:var(--hol-text-secondary)}
.am-champ__boite{display:flex;align-items:center;height:2.3em;margin-top:.25em;padding:0 .7em;overflow:hidden;
  border:1.5px solid var(--hol-border-strong);border-radius:.6em;background:var(--hol-surface-1)}
.am-champ__v{display:inline-block;max-width:0;overflow:hidden;white-space:nowrap;font-size:.95em;color:var(--hol-text-primary)}
.am-accord{display:flex;align-items:center;gap:.6em;height:1.4em;margin-top:1.1em;font-size:.9em;color:var(--hol-text-secondary)}
.am-accord__case{display:grid;place-items:center;flex:none;width:1.4em;height:1.4em;border-radius:.35em;
  border:1.5px solid var(--hol-border-strong);background:var(--hol-surface-1);color:var(--hol-surface-1)}
.am-accord__case svg{width:85%;height:85%;opacity:0}
.am-faux-bouton{display:inline-flex;align-items:center;height:2.6em;margin-top:1.2em;padding:0 1.4em;border-radius:999px;
  background:var(--hol-accent);color:var(--hol-accent-encre);font-weight:700;font-size:.95em}

.am-scene--compte[data-joue] .am-champ--1 .am-champ__v{animation:am-tape-1 var(--am-t) steps(9,end) infinite}
.am-scene--compte[data-joue] .am-champ--2 .am-champ__v{animation:am-tape-2 var(--am-t) steps(16,end) infinite}
.am-scene--compte[data-joue] .am-champ--3 .am-champ__v{animation:am-tape-3 var(--am-t) steps(8,end) infinite}
.am-scene--compte[data-joue] .am-champ--4 .am-champ__v{animation:am-tape-4 var(--am-t) steps(14,end) infinite}
@keyframes am-tape-1{0%,5%{max-width:0}12%,100%{max-width:16em}}
@keyframes am-tape-2{0%,13%{max-width:0}22%,100%{max-width:16em}}
@keyframes am-tape-3{0%,23%{max-width:0}28%,100%{max-width:16em}}
@keyframes am-tape-4{0%,29%{max-width:0}37%,100%{max-width:16em}}
.am-scene--compte[data-joue] .am-champ--1 .am-champ__boite{animation:am-actif-1 var(--am-t) linear infinite}
.am-scene--compte[data-joue] .am-champ--2 .am-champ__boite{animation:am-actif-2 var(--am-t) linear infinite}
.am-scene--compte[data-joue] .am-champ--3 .am-champ__boite{animation:am-actif-3 var(--am-t) linear infinite}
.am-scene--compte[data-joue] .am-champ--4 .am-champ__boite{animation:am-actif-4 var(--am-t) linear infinite}
@keyframes am-actif-1{0%,4.9%,12.6%,100%{border-color:var(--hol-border-strong);box-shadow:none}5%,12.5%{border-color:var(--hol-accent);box-shadow:0 0 0 .22em var(--hol-accent-wash)}}
@keyframes am-actif-2{0%,12.9%,22.6%,100%{border-color:var(--hol-border-strong);box-shadow:none}13%,22.5%{border-color:var(--hol-accent);box-shadow:0 0 0 .22em var(--hol-accent-wash)}}
@keyframes am-actif-3{0%,22.9%,28.6%,100%{border-color:var(--hol-border-strong);box-shadow:none}23%,28.5%{border-color:var(--hol-accent);box-shadow:0 0 0 .22em var(--hol-accent-wash)}}
@keyframes am-actif-4{0%,28.9%,37.6%,100%{border-color:var(--hol-border-strong);box-shadow:none}29%,37.5%{border-color:var(--hol-accent);box-shadow:0 0 0 .22em var(--hol-accent-wash)}}
/* Le curseur va cocher la case (vers 2,3 em ; 11,4 em), puis appuie sur le bouton. */
.am-scene--compte[data-joue] .am-curseur{animation:am-curseur-compte var(--am-t) ease-in-out infinite}
@keyframes am-curseur-compte{
  0%,38%{opacity:0;left:72%;top:5em;transform:none}
  41%{opacity:1;left:60%;top:7em}
  47%{left:1.95em;top:11.15em;transform:none}
  49%{transform:scale(.82)}
  51%{transform:none;left:1.95em;top:11.15em}
  57%{left:5.4em;top:14.3em;transform:none}
  59%{transform:scale(.82)}
  61%{transform:none;opacity:1;left:5.4em;top:14.3em}
  65%,100%{opacity:0;left:5.4em;top:14.3em}}
.am-scene--compte[data-joue] .am-accord__case{animation:am-case var(--am-t) linear infinite}
.am-scene--compte[data-joue] .am-accord__case svg{animation:am-coche var(--am-t) linear infinite}
@keyframes am-case{0%,48.9%{background:var(--hol-surface-1);border-color:var(--hol-border-strong)}49%,100%{background:var(--hol-accent);border-color:var(--hol-accent)}}
@keyframes am-coche{0%,48.9%{opacity:0}49%,100%{opacity:1}}
.am-scene--compte[data-joue] .am-faux-bouton{animation:am-appui var(--am-t) ease infinite}
@keyframes am-appui{0%,58%,62%,100%{transform:none;filter:none}59.5%{transform:scale(.95);filter:brightness(.9)}}
.am-scene[data-joue] .am-reussite{animation:am-reussite var(--am-t) ease infinite}
.am-scene[data-joue] .am-reussite__rond{animation:am-rond var(--am-t) cubic-bezier(.3,1.6,.5,1) infinite}
@keyframes am-reussite{0%,65%{opacity:0;transform:translateY(.6em)}68%,100%{opacity:1;transform:none}}
@keyframes am-rond{0%,66%{transform:scale(0)}71%,100%{transform:scale(1)}}

/* ═══ 2. PRÉPARER SON DOSSIER ═════════════════════════════════════════ */
.am-scene--dossier .am-fen__corps{padding:1.4em 1.6em}
.am-depot{position:relative;display:flex;align-items:center;justify-content:center;gap:.6em;height:3em;border-radius:.8em;
  border:1.5px dashed var(--hol-brand-border);background:var(--hol-brand-wash);font-size:.92em;font-weight:600;color:var(--hol-brand)}
.am-depot > svg{width:1.3em;height:1.3em}
.am-vol{position:absolute;left:50%;top:50%;display:grid;place-items:center;width:2.2em;height:2.6em;margin:-1.3em 0 0 -1.1em;border-radius:.4em;
  background:var(--hol-surface-1);color:var(--hol-accent-texte);box-shadow:0 .5em 1em -.4em var(--hol-surface-inverse);opacity:0}
.am-vol svg{width:1.4em;height:1.4em}
.am-jauge{display:flex;align-items:center;gap:1em;height:1.8em;margin-top:.8em}
.am-jauge__nom{flex:none;font-size:.85em;font-weight:700;color:var(--hol-text-secondary)}
.am-jauge__piste{flex:1;height:.5em;border-radius:1em;background:var(--hol-border-subtle);overflow:hidden}
.am-jauge__piste i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--hol-accent),var(--hol-relief,var(--hol-accent)));
  transform:scaleX(0);transform-origin:0 50%}
.am-pieces{list-style:none;margin:.8em 0 0;padding:0}
.am-piece{display:flex;align-items:center;gap:.7em;height:2.1em;padding:0 .6em;border-radius:.5em;font-size:.95em;color:var(--hol-text-primary)}
.am-piece + .am-piece{border-top:1px solid var(--hol-border-subtle)}
.am-piece > svg{flex:none;width:1.2em;height:1.2em;color:var(--hol-text-muted)}
.am-piece__nom{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.am-piece__etat{position:relative;flex:none;width:6.4em;height:1.4em;font-size:.88em;font-weight:700}
.am-piece__avant,.am-piece__apres{position:absolute;inset:0;display:flex;align-items:center;justify-content:flex-end;gap:.3em}
.am-piece__avant{color:var(--hol-text-muted)}
.am-piece__apres{color:var(--hol-succes);opacity:0}
.am-piece__apres svg{width:1.2em;height:1.2em}
/* Les documents arrivent à 8, 18, 28 et 48 % du temps. */
.am-scene--dossier[data-joue] .am-vol--1{animation:am-vol-1 var(--am-t) ease infinite}
.am-scene--dossier[data-joue] .am-vol--2{animation:am-vol-2 var(--am-t) ease infinite}
.am-scene--dossier[data-joue] .am-vol--3{animation:am-vol-3 var(--am-t) ease infinite}
.am-scene--dossier[data-joue] .am-vol--4{animation:am-vol-4 var(--am-t) ease infinite}
@keyframes am-vol-1{0%,2%{opacity:0;transform:translate(9em,-1.4em) rotate(12deg)}6%{opacity:1;transform:none}8%,100%{opacity:0;transform:scale(.4)}}
@keyframes am-vol-2{0%,12%{opacity:0;transform:translate(9em,-1.4em) rotate(12deg)}16%{opacity:1;transform:none}18%,100%{opacity:0;transform:scale(.4)}}
@keyframes am-vol-3{0%,22%{opacity:0;transform:translate(9em,-1.4em) rotate(12deg)}26%{opacity:1;transform:none}28%,100%{opacity:0;transform:scale(.4)}}
@keyframes am-vol-4{0%,42%{opacity:0;transform:translate(9em,-1.4em) rotate(12deg)}46%{opacity:1;transform:none}48%,100%{opacity:0;transform:scale(.4)}}
.am-scene--dossier[data-joue] .am-piece--1{animation:am-flash-1 var(--am-t) ease infinite}
.am-scene--dossier[data-joue] .am-piece--2{animation:am-flash-2 var(--am-t) ease infinite}
.am-scene--dossier[data-joue] .am-piece--3{animation:am-flash-3 var(--am-t) ease infinite}
.am-scene--dossier[data-joue] .am-piece--4{animation:am-flash-4 var(--am-t) ease infinite}
@keyframes am-flash-1{0%,7.9%,13%,100%{background:transparent}8%{background:var(--hol-accent-wash)}}
@keyframes am-flash-2{0%,17.9%,23%,100%{background:transparent}18%{background:var(--hol-accent-wash)}}
@keyframes am-flash-3{0%,27.9%,33%,100%{background:transparent}28%{background:var(--hol-accent-wash)}}
@keyframes am-flash-4{0%,47.9%,53%,100%{background:transparent}48%{background:var(--hol-accent-wash)}}
.am-scene--dossier[data-joue] .am-piece--1 .am-piece__avant{animation:am-avant-1 var(--am-t) linear infinite}
.am-scene--dossier[data-joue] .am-piece--2 .am-piece__avant{animation:am-avant-2 var(--am-t) linear infinite}
.am-scene--dossier[data-joue] .am-piece--3 .am-piece__avant{animation:am-avant-3 var(--am-t) linear infinite}
.am-scene--dossier[data-joue] .am-piece--4 .am-piece__avant{animation:am-avant-4 var(--am-t) linear infinite}
.am-scene--dossier[data-joue] .am-piece--1 .am-piece__apres{animation:am-apres-1 var(--am-t) linear infinite}
.am-scene--dossier[data-joue] .am-piece--2 .am-piece__apres{animation:am-apres-2 var(--am-t) linear infinite}
.am-scene--dossier[data-joue] .am-piece--3 .am-piece__apres{animation:am-apres-3 var(--am-t) linear infinite}
.am-scene--dossier[data-joue] .am-piece--4 .am-piece__apres{animation:am-apres-4 var(--am-t) linear infinite}
@keyframes am-avant-1{0%,7.9%{opacity:1}8%,100%{opacity:0}}
@keyframes am-avant-2{0%,17.9%{opacity:1}18%,100%{opacity:0}}
@keyframes am-avant-3{0%,27.9%{opacity:1}28%,100%{opacity:0}}
@keyframes am-avant-4{0%,47.9%{opacity:1}48%,100%{opacity:0}}
@keyframes am-apres-1{0%,7.9%{opacity:0;transform:translateY(.4em)}9.5%,100%{opacity:1;transform:none}}
@keyframes am-apres-2{0%,17.9%{opacity:0;transform:translateY(.4em)}19.5%,100%{opacity:1;transform:none}}
@keyframes am-apres-3{0%,27.9%{opacity:0;transform:translateY(.4em)}29.5%,100%{opacity:1;transform:none}}
@keyframes am-apres-4{0%,47.9%{opacity:0;transform:translateY(.4em)}49.5%,100%{opacity:1;transform:none}}
.am-scene--dossier[data-joue] .am-jauge__piste i{animation:am-jauge var(--am-t) ease infinite}
@keyframes am-jauge{0%,7%{transform:scaleX(0)}10%,17%{transform:scaleX(.25)}20%,27%{transform:scaleX(.5)}30%,47%{transform:scaleX(.75)}50%,100%{transform:scaleX(1)}}
.am-scene--dossier[data-joue] .am-jauge__nom{animation:am-jauge-nom var(--am-t) linear infinite}
@keyframes am-jauge-nom{0%,39.9%,66%,100%{color:var(--hol-text-secondary)}40%,65.9%{color:var(--hol-accent-texte)}}

/* ═══ 3. RECEVOIR LES RECOMMANDATIONS ═════════════════════════════════ */
.am-scene--retours .am-fen__corps{display:flex;gap:1.2em}
.am-feuille{position:relative;flex:0 0 40%;height:12.6em;padding:.9em 1em;box-sizing:border-box;overflow:hidden;
  border:1px solid var(--hol-border-subtle);border-radius:.7em;background:var(--hol-surface-1);box-shadow:0 .8em 1.6em -1.2em var(--hol-surface-inverse)}
.am-feuille__nom{display:flex;align-items:center;gap:.4em;margin-bottom:.8em;font-size:.82em;font-weight:700;color:var(--hol-text-secondary);white-space:nowrap}
.am-feuille__nom svg{width:1.2em;height:1.2em;flex:none}
.am-ligne{display:block;height:.42em;margin-top:.62em;border-radius:.3em;background:var(--hol-border-subtle)}
.am-ligne--2{width:92%}.am-ligne--3{width:96%}.am-ligne--4{width:70%}.am-ligne--5{width:88%}.am-ligne--6{width:94%}.am-ligne--7{width:60%}.am-ligne--8{width:90%}.am-ligne--9{width:50%}
.am-loupe{position:absolute;left:8%;top:2.4em;width:2.8em;height:2.8em;border-radius:50%;border:.22em solid var(--hol-brand);
  background:var(--hol-brand-wash);opacity:0;mix-blend-mode:multiply}
.am-loupe::after{content:"";position:absolute;right:-.85em;bottom:-.55em;width:1em;height:.25em;border-radius:.2em;background:var(--hol-brand);transform:rotate(40deg)}
.am-avis{flex:1;min-width:0;display:flex;flex-direction:column;gap:.6em}
.am-avis__bulle{margin:0;padding:.6em .8em;border-radius:.7em;font-size:.86em;line-height:1.35;color:var(--hol-text-primary);
  border:1px solid var(--hol-border-subtle);background:var(--hol-surface-1);box-shadow:0 .6em 1.2em -1em var(--hol-surface-inverse);opacity:0}
.am-avis__bulle b{display:block;margin-bottom:.15em;font-size:.92em;color:var(--hol-accent-texte)}
.am-avis__bulle--3{border-color:var(--hol-brand-border);background:var(--hol-brand-wash)}
.am-avis__bulle--3 b{color:var(--hol-brand)}
.am-alerte{position:absolute;left:1.6em;right:1.6em;bottom:1.1em;display:flex;align-items:center;gap:.6em;padding:.65em .9em;border-radius:.8em;
  background:var(--hol-surface-inverse);color:var(--hol-text-inverse);font-size:.88em;font-weight:600;opacity:0}
.am-alerte__point{flex:none;width:.6em;height:.6em;border-radius:50%;background:var(--hol-relief,var(--hol-accent))}
.am-scene--retours[data-joue] .am-loupe{animation:am-loupe var(--am-t) ease-in-out infinite}
@keyframes am-loupe{
  0%,3%{opacity:0;left:8%;top:2.2em}
  6%{opacity:1}
  14%{left:55%;top:3.2em}
  22%{left:10%;top:5.6em}
  30%{left:58%;top:7.4em}
  37%{opacity:1;left:20%;top:8.6em}
  40%,100%{opacity:0;left:20%;top:8.6em}}
.am-scene--retours[data-joue] .am-ligne--3{animation:am-surligne-1 var(--am-t) linear infinite}
.am-scene--retours[data-joue] .am-ligne--4{animation:am-surligne-1 var(--am-t) linear infinite}
.am-scene--retours[data-joue] .am-ligne--7{animation:am-surligne-2 var(--am-t) linear infinite}
@keyframes am-surligne-1{0%,41.9%{background:var(--hol-border-subtle)}42%,100%{background:var(--hol-accent)}}
@keyframes am-surligne-2{0%,51.9%{background:var(--hol-border-subtle)}52%,100%{background:var(--hol-relief,var(--hol-accent))}}
.am-scene--retours[data-joue] .am-avis__bulle--1{animation:am-bulle-1 var(--am-t) cubic-bezier(.2,.9,.3,1.2) infinite}
.am-scene--retours[data-joue] .am-avis__bulle--2{animation:am-bulle-2 var(--am-t) cubic-bezier(.2,.9,.3,1.2) infinite}
.am-scene--retours[data-joue] .am-avis__bulle--3{animation:am-bulle-3 var(--am-t) cubic-bezier(.2,.9,.3,1.2) infinite}
@keyframes am-bulle-1{0%,42%{opacity:0;transform:translateX(1.4em)}46%,100%{opacity:1;transform:none}}
@keyframes am-bulle-2{0%,52%{opacity:0;transform:translateX(1.4em)}56%,100%{opacity:1;transform:none}}
@keyframes am-bulle-3{0%,74%{opacity:0;transform:translateX(1.4em)}78%,100%{opacity:1;transform:none}}
.am-scene--retours[data-joue] .am-alerte{animation:am-alerte var(--am-t) cubic-bezier(.2,.9,.3,1.1) infinite}
@keyframes am-alerte{0%,66%{opacity:0;transform:translateY(1.6em)}70%,100%{opacity:1;transform:none}}

/* ═══ 4. AVANCER DANS SES DÉMARCHES ═══════════════════════════════════ */
.am-taches{list-style:none;margin:0;padding:0}
.am-tache{position:relative;display:flex;align-items:center;gap:.8em;height:2.6em;font-size:.98em;color:var(--hol-text-secondary)}
.am-tache + .am-tache::before{content:"";position:absolute;left:.72em;bottom:calc(50% + .8em);height:1em;width:2px;background:var(--hol-border-strong)}
.am-tache__case{display:grid;place-items:center;flex:none;width:1.5em;height:1.5em;border-radius:50%;
  border:1.5px solid var(--hol-border-strong);background:var(--hol-surface-1);color:var(--hol-surface-1)}
.am-tache__case svg{width:80%;height:80%;opacity:0}
.am-officiel{position:absolute;left:1.6em;top:12.4em;display:inline-flex;align-items:center;gap:.5em;height:2.4em;padding:0 1.1em;border-radius:.7em;
  border:1.5px solid var(--hol-brand-border);background:var(--hol-brand-wash);color:var(--hol-brand);font-weight:700;font-size:.95em}
.am-officiel svg{width:1.1em;height:1.1em}
/* Coches : 18, 52, 76 et 88 % ; la tâche en cours est cerclée juste avant. */
.am-scene--demarches[data-joue] .am-tache--1 .am-tache__case{animation:am-tc-1 var(--am-t) linear infinite}
.am-scene--demarches[data-joue] .am-tache--2 .am-tache__case{animation:am-tc-2 var(--am-t) linear infinite}
.am-scene--demarches[data-joue] .am-tache--3 .am-tache__case{animation:am-tc-3 var(--am-t) linear infinite}
.am-scene--demarches[data-joue] .am-tache--4 .am-tache__case{animation:am-tc-4 var(--am-t) linear infinite}
@keyframes am-tc-1{0%,3%{box-shadow:none}4%,17.9%{border-color:var(--hol-accent);box-shadow:0 0 0 .25em var(--hol-accent-wash);background:var(--hol-surface-1)}
  18%,100%{border-color:var(--hol-succes);background:var(--hol-succes);box-shadow:none}}
@keyframes am-tc-2{0%,40%{box-shadow:none}41%,51.9%{border-color:var(--hol-accent);box-shadow:0 0 0 .25em var(--hol-accent-wash);background:var(--hol-surface-1)}
  52%,100%{border-color:var(--hol-succes);background:var(--hol-succes);box-shadow:none}}
@keyframes am-tc-3{0%,66%{box-shadow:none}67%,75.9%{border-color:var(--hol-accent);box-shadow:0 0 0 .25em var(--hol-accent-wash);background:var(--hol-surface-1)}
  76%,100%{border-color:var(--hol-succes);background:var(--hol-succes);box-shadow:none}}
@keyframes am-tc-4{0%,78%{box-shadow:none}79%,87.9%{border-color:var(--hol-accent);box-shadow:0 0 0 .25em var(--hol-accent-wash);background:var(--hol-surface-1)}
  88%,100%{border-color:var(--hol-succes);background:var(--hol-succes);box-shadow:none}}
.am-scene--demarches[data-joue] .am-tache--1{animation:am-tt-1 var(--am-t) linear infinite}
.am-scene--demarches[data-joue] .am-tache--2{animation:am-tt-2 var(--am-t) linear infinite}
.am-scene--demarches[data-joue] .am-tache--3{animation:am-tt-3 var(--am-t) linear infinite}
.am-scene--demarches[data-joue] .am-tache--4{animation:am-tt-4 var(--am-t) linear infinite}
@keyframes am-tt-1{0%,17.9%{color:var(--hol-text-secondary);font-weight:400}18%,100%{color:var(--hol-text-primary);font-weight:700}}
@keyframes am-tt-2{0%,51.9%{color:var(--hol-text-secondary);font-weight:400}52%,100%{color:var(--hol-text-primary);font-weight:700}}
@keyframes am-tt-3{0%,75.9%{color:var(--hol-text-secondary);font-weight:400}76%,100%{color:var(--hol-text-primary);font-weight:700}}
@keyframes am-tt-4{0%,87.9%{color:var(--hol-text-secondary);font-weight:400}88%,100%{color:var(--hol-text-primary);font-weight:700}}
.am-scene--demarches[data-joue] .am-tache--1 svg{animation:am-ts-1 var(--am-t) linear infinite}
.am-scene--demarches[data-joue] .am-tache--2 svg{animation:am-ts-2 var(--am-t) linear infinite}
.am-scene--demarches[data-joue] .am-tache--3 svg{animation:am-ts-3 var(--am-t) linear infinite}
.am-scene--demarches[data-joue] .am-tache--4 svg{animation:am-ts-4 var(--am-t) linear infinite}
@keyframes am-ts-1{0%,17.9%{opacity:0}18%,100%{opacity:1}}
@keyframes am-ts-2{0%,51.9%{opacity:0}52%,100%{opacity:1}}
@keyframes am-ts-3{0%,75.9%{opacity:0}76%,100%{opacity:1}}
@keyframes am-ts-4{0%,87.9%{opacity:0}88%,100%{opacity:1}}
/* Le curseur va sur « Plateforme officielle » (vers 5,4 em ; 13,6 em). */
.am-scene--demarches[data-joue] .am-curseur{animation:am-curseur-dem var(--am-t) ease-in-out infinite}
@keyframes am-curseur-dem{
  0%,64%{opacity:0;left:72%;top:6em;transform:none}
  66%{opacity:1;left:62%;top:8em}
  72%{left:5.4em;top:13.3em;transform:none}
  74%{transform:scale(.82)}
  76%{transform:none;opacity:1;left:5.4em;top:13.3em}
  80%,100%{opacity:0;left:5.4em;top:13.3em}}
.am-scene--demarches[data-joue] .am-officiel{animation:am-officiel var(--am-t) ease infinite}
@keyframes am-officiel{0%,72%,77%,100%{transform:none;background:var(--hol-brand-wash)}74%{transform:scale(.96);background:var(--hol-brand-border)}}

/* ═══ LES DÉMONSTRATIONS DANS LA BANNIÈRE ═════════════════════════════
   Demande de Jimmy : sur « Comment ça marche ? », la photo de la bannière
   défile, puis l'écran animé de chaque étape vient à sa place, à droite, une
   étape après l'autre (une boucle complète chacune), puis la photo revient.
   Le script mesure la place libre entre le texte et le bord droit, et
   au-dessus du compteur : il y pose la taille (--bn-em) et la position. S'il
   n'y a pas assez de place, il ne pose pas [data-am-pret] et la bannière
   garde sa photo seule. La page d'accueil fait de même : les démonstrations
   suivent ses photos, au-dessus du billet. */
.am-banniere__demos{display:none}
@media (min-width:901px){
  :is(.am-banniere,.am-ouverture)[data-am-pret] .am-banniere__demos{display:block;position:absolute;inset:0;z-index:0;pointer-events:none;font-size:var(--bn-em,11px)}
  .am-banniere__demo{--am-t:10s;position:absolute;left:var(--bn-x,0);top:var(--bn-y,0);width:44em;
    opacity:0;visibility:hidden;transform:translateX(3em);
    transition:opacity .7s ease,transform .8s cubic-bezier(.5,0,.75,0),visibility 0s .8s}
  .am-banniere__demo[data-actif]{opacity:1;visibility:visible;transform:none;
    transition:opacity .8s ease .35s,transform 1s cubic-bezier(.16,.84,.24,1) .35s,visibility 0s}
  .am-banniere__demo .am-fen{box-shadow:0 2.4em 4.8em -1.6em var(--hol-surface-inverse),0 0 0 1px var(--hol-border-on-dark)}
  .am-banniere__demo .am-fen__barre span{color:var(--hol-brand);font-weight:800}
  .am-banniere[data-am-bn-defile] .am-banniere__fond{transition:opacity .9s ease,transform 1.2s ease}
  .am-banniere[data-demo] .am-banniere__fond{opacity:0;transform:translateX(-2%)}
}
@media (prefers-reduced-motion:reduce){ .am-banniere__demos{display:none!important} }

/* ─── Téléphone ─────────────────────────────────────────────────────── */
@media (max-width:640px){
  .am-demo{padding:10px}
  .am-demo__boite{padding:18px 16px 14px;border-radius:20px}
  .am-scene__ecran{padding:1.4em 1.2em;border-radius:14px}
  .am-scene__legende{grid-template-columns:minmax(0,1fr);gap:8px}
  .am-scene__legende li{font-size:13.5px}
  .am-scene__barre{margin-bottom:5px}
  .am-feuille{flex-basis:44%}
}

/* MOINS D'ANIMATIONS : la scène s'arrête sur sa fin (tout est rempli, tout
   est coché), la fenêtre s'ouvre sans voyager, le bouton ne pulse plus. */
@media (prefers-reduced-motion:reduce){
  .am-scene[data-joue] *{animation-play-state:paused!important;animation-delay:calc(var(--am-t) * -.9)!important}
  .am-demo__boite,.am-demo__voile,.am-demo[data-ferme] .am-demo__boite,.am-demo[data-ferme] .am-demo__voile{animation-duration:.01s!important}
  .am-etape__jouer::after{animation:none}
}
