/* Savoira, héros : la ligne du parcours, du premier print() au certificat.
   Le titre, les boutons et la typographie viennent du système (accueil-v2.css) ;
   ce fichier n'habille que la scène animée, avec les jetons du site : pine,
   moss, cream, star, le vert du lockup du logo, l'ombre unique et le verre
   flouté de la nav. La ligne se dessine au fil du défilement (hero-v3.js) et
   chaque jalon ou carte s'allume (.hx-on) quand la pointe l'atteint.
   Classes préfixées hx- pour ne pas croiser les styles du reste de la page
   (btn, chip, card, eyebrow existent déjà ailleurs). */

.hx {
  /* Seule couleur hors jetons : le vert des pastilles du logo (favicon). */
  --hx-green: #0E8F5F;
  --hx-glass: rgba(255, 255, 255, .78);
  display: flex; flex-direction: column; align-items: center;
  padding: 56px 24px 32px;
}

/* ---- Scène (bureau) ---- */
.hx-stage { position: relative; width: min(1120px, 100%); height: 560px; }
.hx-stage svg.hx-route { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hx-route-path, .hx-route-path-m { fill: none; stroke: var(--hx-green); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 1446; stroke-dashoffset: 1446; }
.hx-route-path-m { stroke-dasharray: 1492; stroke-dashoffset: 1492; }
.hx-route-ghost { fill: none; stroke: var(--ink); opacity: .08; stroke-width: 2.5; stroke-dasharray: 2 8; stroke-linecap: round; }

/* Jalons et cartes : éteints tant que la ligne ne les a pas atteints. */
.hx-node { opacity: 0; transform: scale(.4); transform-box: fill-box; transform-origin: center;
  transition: opacity .35s ease, transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.hx-node.hx-on { opacity: 1; transform: scale(1); }
.hx-node circle.hx-dot { fill: var(--cream); stroke: var(--hx-green); stroke-width: 2.5; }
.hx-node.hx-done circle.hx-dot { fill: var(--hx-green); }
.hx-node text { font-family: var(--mono); font-size: 10px; fill: var(--muted); text-anchor: middle; letter-spacing: .08em; }
.hx-node .hx-check { stroke: var(--cream); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.hx-card { position: absolute; border-radius: 16px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(18px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.2, .8, .2, 1); }
.hx-card.hx-on { opacity: 1; transform: translateY(0); }

/* 1 · éditeur : le moment sombre de la page, donc pine (§ système) */
.hx-editor { left: 0; top: 24px; width: 400px; background: var(--pine); color: var(--cream); }
.hx-editor-bar { display: flex; align-items: center; gap: 8px; padding: 13px 18px; border-bottom: 1px solid rgba(250, 248, 242, .12); }
.hx-dots span { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: rgba(250, 248, 242, .18); margin-right: 5px; }
.hx-term .hx-dots span { background: var(--line); }
.hx-editor-bar .hx-file { font-family: var(--mono); font-size: 11.5px; color: var(--cream-72); margin-left: auto; }
.hx-tag { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(250, 248, 242, .12); color: var(--moss); padding: 3px 9px; border-radius: 999px; }
.hx-tag.hx-tag-light { background: var(--moss); color: var(--pine); }
.hx-editor pre { font-family: var(--mono); font-size: 13px; line-height: 1.85; padding: 20px 22px 24px; counter-reset: hxln; margin: 0; color: rgba(250, 248, 242, .88); }
.hx-editor pre .hx-ln { counter-increment: hxln; display: block; }
.hx-editor pre .hx-ln::before { content: counter(hxln, decimal-leading-zero); display: inline-block; width: 2.2em; color: rgba(250, 248, 242, .25); }
.hx-kw { color: var(--moss); }
.hx-fn { color: var(--star); }
.hx-str { color: var(--white); }
.hx-cm { color: rgba(250, 248, 242, .45); font-style: italic; }
.hx-caret { display: inline-block; width: 8px; height: 15px; vertical-align: -2px; background: var(--star); animation: hxBlink 1.1s steps(1) infinite; }
@keyframes hxBlink { 50% { opacity: 0; } }

/* 2 · terminal : carte claire en verre flouté, comme la nav */
.hx-term { right: 96px; top: 236px; width: 380px; background: var(--hx-glass);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line); }
.hx-term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.hx-term-bar .hx-file { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-left: auto; }
.hx-term pre { font-family: var(--mono); font-size: 12.5px; line-height: 1.9; padding: 16px 20px 20px; color: var(--ink); margin: 0; }
.hx-dim { color: var(--muted); }
.hx-ok { color: var(--hx-green); font-weight: 500; }
.hx-verdict { opacity: 0; transition: opacity .5s ease .5s; }
.hx-term.hx-on .hx-verdict { opacity: 1; }
.hx-verdict .hx-badge { display: inline-block; background: var(--moss); color: var(--pine); font-weight: 500; padding: 1px 8px; border-radius: 6px; }

/* 3 · certificat */
.hx-cert { right: 0; top: 24px; width: 230px; background: var(--hx-glass);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line);
  padding: 20px 20px 18px; text-align: center; }
.hx-seal { width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 12px; background: var(--moss);
  border: 1.5px solid var(--hx-green); display: flex; align-items: center; justify-content: center; }
.hx-seal svg { width: 18px; height: 18px; stroke: var(--pine); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hx-cert .hx-label { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hx-cert .hx-name { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 21px; margin: 7px 0 3px; color: var(--ink); }
.hx-cert .hx-course { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.hx-cert .hx-sigline { margin: 14px auto 0; height: 30px; position: relative; width: 130px; border-bottom: 1px solid var(--line); }
.hx-cert .hx-sigline svg { position: absolute; inset: 0; overflow: visible; }
.hx-sig { fill: none; stroke: var(--hx-green); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 220; stroke-dashoffset: 220; transition: stroke-dashoffset .9s ease-out .35s; }
.hx-cert.hx-on .hx-sig { stroke-dashoffset: 0; }
.hx-cert .hx-verified { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 10.5px; font-weight: 600; color: var(--pine); }
.hx-cert .hx-verified svg { width: 12px; height: 12px; stroke: var(--pine); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* 4 · pastilles flottantes : verre flouté cream, comme la nav au défilement */
.hx-chip { position: absolute; display: flex; align-items: center; gap: 8px; background: var(--cream-72);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-size: 12.5px; font-weight: 600;
  color: var(--ink); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(18px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.2, .8, .2, 1); }
.hx-chip.hx-on { opacity: 1; transform: translateY(0); }
.hx-chip small { font-weight: 400; color: var(--muted); }
.hx-chip .hx-ring { width: 26px; height: 26px; }
.hx-chip .hx-ring circle { fill: none; stroke-width: 3; }
.hx-chip-progress { left: 452px; top: 74px; }
.hx-chip-lessons { left: 486px; top: 138px; font-family: var(--mono); font-weight: 500; font-size: 12px; }

.hx-footnote { margin-top: 56px; font-size: 12px; color: var(--muted); text-align: center; }
.hx-footnote code { font-family: var(--mono); background: var(--white); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  .hx * { animation: none !important; transition: none !important; }
  .hx .hx-card, .hx .hx-chip, .hx .hx-node, .hx .hx-verdict { opacity: 1 !important; transform: none !important; }
  .hx .hx-route-path, .hx .hx-route-path-m, .hx .hx-sig { stroke-dashoffset: 0 !important; }
}

/* ---- Scène mobile : mêmes règles, mise en page verticale ---- */
.hx-stage-m { display: none; position: relative; width: 100%; max-width: 392px; margin: 0 auto; }
.hx-stage-m-inner { position: relative; width: 392px; height: 1160px; transform-origin: top left; }
.hx-stage-m .hx-card { left: 0; right: 0; width: auto; }
.hx-editor-m { top: 0; }
.hx-term-m { top: 544px; }
.hx-term-m, .hx-editor-m { left: 0; right: auto; width: 392px; }
.hx-cert-m { top: 868px; left: 72px; right: auto; width: 248px !important; }
.hx-chip-m-progress { right: 0; top: 232px; }
.hx-chip-m-lessons { left: 0; top: 698px; font-family: var(--mono); font-weight: 500; font-size: 12px; }

@media (max-width: 1019px) {
  .hx { padding: 40px 18px 8px; }
  .hx-stage { display: none; }
  .hx-stage-m { display: block; }
  .hx-editor pre { font-size: 12px; padding: 16px 16px 20px; line-height: 1.8; }
  .hx-term pre { font-size: 11.5px; padding: 14px 16px 18px; }
}
@media (max-width: 355px) {
  .hx-editor pre { font-size: 11px; }
  .hx-term pre { font-size: 10.5px; }
}
