/* =========================================================================================================
   V5.3 parcours (c-parcours-01) : ecrans de transition du parcours de demo (etape.html, js/etape.js).
   Page simple : fond blanc casse de la DA (palette de l'accueil V5), beaucoup d'air, un titre, une phrase, un ou deux boutons
   (boutons.css : body.accueil-v5 en porte les jetons), une note au feutre (police mono-trait du brief, decorative).
   Indicateur d'etape en tete (« Étape 2 sur 4 · La fiche récap ») : 4 pastilles, l'etape courante a aria-current="step".
   Theme : jour par defaut (theme.js), palette NUIT sous html[data-theme="dark"]. Ecran seulement.
   ========================================================================================================= */
body.etape-page{
  --et-bg:#F8F5EE; --et-bg-2:#F0EBDF; --et-surface:#fff; --et-ink:#141318; --et-ink-2:#4F4E57; --et-ink-3:#6B6973;
  --et-line:#DCD6C8; --et-accent:#4347B8; --et-accent-txt:#4347B8; --et-encre:#3A3EB0; --et-lavis:rgba(247,213,110,.6);
  --et-fait:#2F7A4F; --et-haut:rgba(248,245,238,.92);
  --et-font:"Helvetica Neue",Helvetica,"Nimbus Sans","Nimbus Sans L","Liberation Sans",Roboto,"Segoe UI",Arial,sans-serif;
  --et-ease:cubic-bezier(.2,.7,.1,1);
  margin:0;min-height:100vh;min-height:100dvh;height:auto;display:flex;flex-direction:column;
  background:var(--et-bg);color:var(--et-ink);overflow-x:hidden;
}
@media screen{
  html[data-theme="dark"] body.etape-page{
    --et-bg:#15141A; --et-bg-2:#1C1B23; --et-surface:#23222B; --et-ink:#F2F0EA; --et-ink-2:#C9C6CF; --et-ink-3:#A9A6B2;
    --et-line:#34323D; --et-accent:#5B60D6; --et-accent-txt:#A9ACFF; --et-encre:#A9ACFF; --et-lavis:rgba(201,160,40,.4);
    --et-fait:#7FCB9C; --et-haut:rgba(21,20,26,.92);
    color-scheme:dark;
  }
}
body.etape-page > header,body.etape-page > main{font-family:var(--et-font);-webkit-font-smoothing:antialiased}
body.etape-page :focus-visible{outline:2px solid var(--et-accent-txt);outline-offset:3px}

/* ---- en-tete (theme.js y pose le bouton jour / nuit, le guide de demo sa pastille au telephone) ---- */
body.etape-page .et-top{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:14px;height:64px;box-sizing:border-box;
  padding:0 clamp(16px,4vw,40px);background:var(--et-haut);border-bottom:1px solid transparent}
body.etape-page .et-top .spacer{flex:1}
body.etape-page .et-top .btn--subtle,body.etape-page .et-top .nt-theme-btn{color:var(--et-ink-2);background:transparent}
body.etape-page .et-top .btn--subtle:hover{color:var(--et-ink);background:var(--et-bg-2)}

/* ---- colonne centrale ---- */
body.etape-page .et-main{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;
  width:100%;max-width:760px;margin:0 auto;padding:clamp(20px,5vh,56px) 16px clamp(32px,8vh,96px);outline:none}

/* ---- indicateur d'etape ---- */
body.etape-page .et-fil{width:100%;margin:0 0 clamp(22px,4.5vh,48px)}
body.etape-page .et-fil-titre{margin:0 0 14px;text-align:center;font-size:13px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--et-ink-2)}
body.etape-page .et-fil-liste{display:flex;justify-content:center;gap:0;margin:0;padding:0;list-style:none;counter-reset:none}
body.etape-page .et-fil-liste li{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;flex:0 1 128px;min-width:0;
  color:var(--et-ink-3);font-size:13px;font-weight:600;text-align:center}
body.etape-page .et-fil-liste li + li::before{content:"";position:absolute;top:13px;right:calc(50% + 18px);width:calc(100% - 36px);height:1.5px;background:var(--et-line)}
body.etape-page .et-fil-liste li.is-fait + li::before,body.etape-page .et-fil-liste li.is-fait + li.is-courant::before{background:var(--et-accent)}
body.etape-page .et-n{display:inline-grid;place-items:center;width:28px;height:28px;box-sizing:border-box;border-radius:50%;
  border:1.5px solid var(--et-line);background:var(--et-surface);font-size:13px;font-weight:700;font-variant-numeric:tabular-nums}
body.etape-page .et-fil-liste li.is-fait{color:var(--et-ink-2)}
body.etape-page .et-fil-liste li.is-fait .et-n{border-color:var(--et-accent);color:var(--et-accent-txt)}
body.etape-page .et-fil-liste li.is-courant{color:var(--et-ink)}
body.etape-page .et-fil-liste li.is-courant .et-n{border-color:var(--et-accent);background:var(--et-accent);color:#fff;box-shadow:0 0 0 4px var(--et-bg),0 0 0 5.5px var(--et-accent)}
body.etape-page .et-l{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}

/* ---- carte (sans cadre : de l'air) ---- */
body.etape-page .et-carte{width:100%;max-width:620px;text-align:center}
body.etape-page .et-titre{margin:0;font-size:clamp(30px,5.2vw,48px);font-weight:800;line-height:1.08;letter-spacing:-.03em;color:var(--et-ink);text-wrap:balance}
body.etape-page .et-feutre{display:flex;justify-content:center;min-height:34px;margin:10px 0 18px}
body.etape-page .et-feutre svg{display:block;max-width:100%;height:auto;overflow:visible}
body.etape-page .et-feutre path{fill:none;stroke:var(--et-encre);stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;
  stroke-dasharray:1;stroke-dashoffset:1;animation:et-trace .16s linear var(--d,0s) forwards}
body.etape-page .et-feutre .et-souligne{stroke:var(--et-lavis);stroke-width:5;animation-duration:.45s}
@keyframes et-trace{to{stroke-dashoffset:0}}
body.etape-page .et-texte{font-size:clamp(17px,2.1vw,20px);line-height:1.55;color:var(--et-ink)}
body.etape-page .et-texte p{margin:0 0 12px}
body.etape-page .et-phrase{text-wrap:pretty}
/* V5.5 maitre : « laissez-vous » jamais coupe au trait d union */
body.etape-page .et-insec{white-space:nowrap}
body.etape-page .et-resultat{display:inline-block;margin:2px 0 4px!important;padding:8px 16px;border-radius:10px;background:var(--et-surface);
  border:1px solid var(--et-line);font-size:16px;line-height:1.45;color:var(--et-ink-2)}
body.etape-page .et-resultat b{color:var(--et-ink)}
body.etape-page .et-detail{margin-top:18px!important;font-size:16px;line-height:1.55;color:var(--et-ink-2)}
body.etape-page .et-points{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:22px auto 4px;padding:0;max-width:700px;
  list-style:none;text-align:left;font-size:15px;line-height:1.45;color:var(--et-ink-2)}
body.etape-page .et-points li{position:relative;padding:14px 14px 14px;background:var(--et-surface);border:1px solid var(--et-line);border-top:3px solid var(--et-accent);border-radius:10px}
body.etape-page .et-points b{display:block;margin-bottom:3px;color:var(--et-ink);font-weight:700;font-size:16px}
body.etape-page .et-points span{display:block}
body.etape-page .et-carte:has(.et-points){max-width:720px}

/* ---- boutons ---- */
body.etape-page .et-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin:26px 0 0}
body.etape-page .et-actions .btn{min-width:min(100%,260px)}
body.etape-page .et-fleche{width:18px;height:18px;flex:none}
body.etape-page .et-duree{font-weight:500;opacity:.92;font-variant-numeric:tabular-nums}
body.etape-page .et-erreur{margin:16px auto 0;max-width:520px;text-align:left}
body.etape-page .et-suite{margin:26px 0 0;font-size:14px;color:var(--et-ink-3)}
body.etape-page .et-suite:empty{display:none}

/* ---- telephone ---- */
@media (max-width:560px){
  body.etape-page .et-top{height:56px;gap:8px;padding:0 12px}
  body.etape-page .et-top .btn--subtle{padding:0 8px;font-size:0}
  body.etape-page .et-top .btn--subtle .ico,body.etape-page .et-top .btn--subtle svg{font-size:initial}
  body.etape-page .et-top .logo-dd{width:150px;height:auto}
  body.etape-page .et-main{justify-content:flex-start;padding-top:22px}
  body.etape-page .et-fil{margin-bottom:28px}
  body.etape-page .et-fil-liste li{font-size:12px}
  body.etape-page .et-titre{font-size:30px}
  body.etape-page .et-texte{font-size:17px}
  body.etape-page .et-points{grid-template-columns:1fr;gap:8px}
  body.etape-page .et-points li{padding:10px 12px;border-top-width:1px;border-left:3px solid var(--et-accent)}
  body.etape-page .et-actions{flex-direction:column;align-items:stretch}
  body.etape-page .et-actions .btn{width:100%;min-width:0}
}
/* ---- fiche (fiche.html, parcours de demo) : bloc « Lancer la visio » / « Terminer la démo » sous la fiche ---- */
@media screen{
  body.fiche-page .fr-parcours{display:flex;flex-direction:column;align-items:center;gap:14px;margin:36px auto 12px;padding:26px 16px;
    max-width:620px;text-align:center;border-top:1px solid rgba(120,115,140,.28)}
  body.fiche-page .fr-parcours p{margin:0;font-size:16px;line-height:1.5}
  body.fiche-page .fr-parcours--haut{flex-direction:row;flex-wrap:wrap;justify-content:space-between;gap:12px 20px;max-width:none;margin:4px 0 22px;
    padding:14px 18px;text-align:left;border:1px solid rgba(91,95,199,.35);border-radius:12px;background:rgba(91,95,199,.07)}
  body.fiche-page .fr-parcours--haut .btn{min-width:0}
  /* appel principal flottant (bureau : en bas a droite, le guide de demo est en bas a gauche ; telephone : barre du bas) */
  body.fiche-page .fr-flottant{position:fixed;right:24px;bottom:20px;z-index:45}
  body.fiche-page .fr-flottant[hidden]{display:none}
  body.fiche-page .fr-flottant .btn{box-shadow:0 10px 26px -10px rgba(30,30,80,.6),0 1px 2px rgba(0,0,0,.25)!important}
  @media (max-width:767px){
    body.fiche-page .fr-flottant{left:0;right:0;bottom:0;padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px));
      background:rgba(248,245,238,.95);border-top:1px solid rgba(120,115,140,.28)}
    html[data-theme="dark"] body.fiche-page .fr-flottant{background:rgba(21,20,26,.95)}
    body.fiche-page .fr-flottant .btn{width:100%}
  }
  /* fiche a emporter, fin du parcours : « Rejouer une partie » en secondaire, « Terminer la démo » seul appel plein */
  html body.fiche-page.fr-fin-parcours > main .fiche-actions #ficheRejouer.btn{background:var(--bt-sec-bg);color:var(--bt-sec-ink)!important;
    border:2px solid var(--bt-sec-bord);box-shadow:none}
  html body.fiche-page.fr-fin-parcours > main .fiche-actions #ficheRejouer.btn:hover{background:var(--bt-sec-hover)}
  body.fiche-page .fr-parcours--haut{border-color:rgba(91,95,199,.55);background:rgba(91,95,199,.11)}
  body.fiche-page .fr-parcours .btn{min-width:min(100%,260px)}
}
@media print{ body.fiche-page .fr-flottant,body.fiche-page .fr-parcours,body.fiche-page [data-testid^="fiche-lancer-visio"],body.fiche-page [data-testid="fiche-fin-demo"]{display:none!important} }

@media (prefers-reduced-motion:reduce){
  body.etape-page .et-feutre path{animation:none;stroke-dashoffset:0}
}
@media (forced-colors:active){
  body.etape-page .et-feutre{display:none}
}

/* ---- V5.3 maitre (demande utilisateur 10/11 19:25) : ecrans epures — les etapes plus haut, moins de marge sur les bords,
   plus d'espace entre le titre, la phrase et les boutons ; plus de ligne « Ensuite : … » (redite du fil d'etapes) ---- */
body.etape-page .et-main{justify-content:flex-start;max-width:1040px;padding:clamp(14px,3vh,32px) clamp(16px,3vw,32px) clamp(32px,7vh,80px)}
body.etape-page .et-fil{margin:0 0 clamp(40px,9vh,96px)}
body.etape-page .et-carte{max-width:840px}
body.etape-page .et-carte:has(.et-points){max-width:920px}
body.etape-page .et-points{max-width:920px;gap:16px;margin-top:32px}
body.etape-page .et-feutre{margin:16px 0 30px}
body.etape-page .et-texte p{margin:0 0 16px}
body.etape-page .et-actions{gap:16px;margin-top:44px}
body.etape-page .et-suite:empty{display:none}

/* ---- V5.5 bandeau (c-bandeau-02, demande utilisateur du 11/11 09:37) : un peu plus d'air entre « Bienvenue dans la démo » et
   la note « Installez-vous confortablement » (qui passe sur deux lignes au telephone, centrees) ---- */
body.etape-page[data-etape="intro"] .et-feutre{margin-top:30px}
@media (max-width:560px){ body.etape-page[data-etape="intro"] .et-feutre{margin-top:24px} }

/* ---- V6.0 transitions (c-transition-01, demande utilisateur du 13/11 11:02) : choregraphie d'apparition ----
   html.et-cho (pose dans le <head> d'etape.html, hors mouvement reduit et mode calme) : titre, texte noir, post-it et boutons
   sont invisibles mais occupent leur place ; la note bleue et l'encre du post-it attendent (animations en pause). js/etape.js
   (CHOREGRAPHIE : ordre et durees) pose .et-montre sur chacun a son tour et regle la duree de son fondu. Les boutons sont hors
   d'atteinte (visibility) avant leur tour. Seulement les ecrans de transition (pas la page ecole, body.pe-page). */
html.et-cho body.etape-page:not(.pe-page) .et-carte > :is(.et-titre,.et-texte,.et-actions,.dg-postit){opacity:0;
  transition-property:opacity;transition-duration:.25s;transition-timing-function:ease-out}
html.et-cho body.etape-page:not(.pe-page) .et-carte > .et-actions{visibility:hidden}
html.et-cho body.etape-page:not(.pe-page) .et-carte > :is(.et-titre,.et-texte,.et-actions,.dg-postit).et-montre{opacity:1;visibility:visible}
html.et-cho body.etape-page:not(.pe-page) .et-feutre:not(.et-montre) path,
html.et-cho body.etape-page:not(.pe-page) .dg-postit:not(.et-montre) .postit-encre .trait{animation-play-state:paused}
/* filet de securite (etape.html) : si la choregraphie n'a pas pu demarrer, tout est montre */
html.et-cho.et-cho-fin body.etape-page:not(.pe-page) .et-carte > :is(.et-titre,.et-texte,.et-actions,.dg-postit){opacity:1;visibility:visible}
html.et-cho.et-cho-fin body.etape-page:not(.pe-page) :is(.et-feutre path,.dg-postit .postit-encre .trait){animation-play-state:running}
/* mouvement reduit ou mode calme : tout est la d'un coup, note bleue et post-it deja ecrits */
html.et-cho-calme body.etape-page:not(.pe-page) .et-feutre path{animation:none;stroke-dashoffset:0}
html.et-cho-calme body.etape-page:not(.pe-page) .dg-postit .postit-encre .trait{animation:none;opacity:1;stroke-dashoffset:0}
