/* ÉTAPES : la ligne d'avancement (un segment par étape ou ticket) et la frise des étapes (jalons, pastilles, statuts). */
/* ------------------------------------------------------------------------------- la ligne d'avancement */
.avance { display: flex; align-items: center; gap: 16px; margin: 8px 0 4px; }
.avance-seg { list-style: none; margin: 0; padding: 0; display: flex; gap: 5px; flex: 1; }
.avance-seg li { flex: 1; position: relative; }
.avance-seg button { display: block; width: 100%; height: 28px; position: relative; background: none; border: 0; padding: 0; cursor: pointer; }
.avance-seg button::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 8px; border-radius: 2px; background: var(--jaune); box-shadow: 0 0 8px rgba(254, 199, 99, .5);
  transform: skewX(-24deg); transition: box-shadow .15s, transform .15s; }
.avance-seg .en_cours button::before { background: var(--rose); box-shadow: var(--lueur-rose); animation: pouls-seg 1.8s ease-in-out infinite; }
.avance-seg .a_faire button::before { background: transparent; border: 1px dashed var(--lavande); box-shadow: none; }
.avance-seg button:hover::before { box-shadow: var(--lueur-lavande); transform: skewX(-24deg) scaleY(1.5); }
@keyframes pouls-seg { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.avance-texte { margin: 0; white-space: nowrap; color: var(--discret); font-size: .9375rem; }
.avance-texte b { color: var(--jaune); font-family: var(--titre); font-size: 1.3rem; }

/* --------------------------------------------------------------------------------------- 1 : la frise */
.frise { display: grid; grid-template-columns: 7fr 1.5fr 1.5fr; gap: 14px; }
.etape { padding: 14px 16px 18px; }
.etape-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 14px; font-family: var(--titre); text-transform: uppercase; letter-spacing: .06em; }
.etape-tete .n { font-size: 3.2rem; line-height: 1; font-weight: 700; color: var(--discret); }
.etape-tete b { font-size: 1.45rem; }
.etape-tete small { color: var(--discret); font-size: .875rem; letter-spacing: .04em; text-transform: none; }
.etape.en_cours { border-color: rgba(234, 85, 177, .6); }
.etape.en_cours .etape-tete .n { color: var(--rose); text-shadow: var(--lueur-rose); }
.jalons { list-style: none; margin: 0; padding: 0; display: flex; }
.jalon { position: relative; flex: 1 1 0; min-width: 0; }
.jalon > button { position: relative; z-index: 1; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; gap: 8px; padding: 4px 0; }
.jalon + .jalon::before { content: ""; position: absolute; top: 29px; right: 50%; width: 100%; border-top: 3px dashed var(--trait2); z-index: 0; }
.jalon.fait + .jalon.fait::before, .jalon.fait + .jalon.en_cours::before { border-top: 3px solid var(--jaune); box-shadow: 0 0 8px rgba(254, 199, 99, .5); }
/* l'énergie coule de la dernière étape faite vers l'étape en cours */
.jalon.fait + .jalon.en_cours::after { content: ""; position: absolute; top: 27px; right: 50%; width: 100%; height: 7px; border-radius: 3px; z-index: 0;
  background: linear-gradient(90deg, transparent, #fff 45%, var(--rose) 55%, transparent) -40% 0 / 40% 100% no-repeat; animation: coule 2.2s linear infinite; }
@keyframes coule { to { background-position: 140% 0; } }
.pastille { position: relative; z-index: 1; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--fond2); border: 3px solid var(--trait2); color: var(--discret);
  transition: transform .25s var(--ressort), box-shadow .2s, border-color .2s; }
.pastille .ico { width: 26px; height: 26px; stroke-width: 2.4; }
.jalon.fait .pastille { background: var(--jaune); border-color: var(--jaune); color: #2a1c00; box-shadow: var(--lueur-jaune); }
.jalon.en_cours .pastille { border-color: var(--rose); color: var(--rose); background: linear-gradient(rgba(234, 85, 177, .14), rgba(234, 85, 177, .14)), var(--fond2); box-shadow: var(--lueur-rose); }
/* l'étape en cours : un anneau segmenté tourne autour, comme un viseur qui cherche */
.jalon.en_cours .pastille::after { content: ""; position: absolute; inset: -9px; border-radius: 50%;
  background: conic-gradient(var(--rose) 0 14%, transparent 0 25%, var(--rose-clair) 0 39%, transparent 0 50%, var(--rose) 0 64%, transparent 0 75%, var(--rose-clair) 0 89%, transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: viseur 6s linear infinite; filter: drop-shadow(0 0 3px var(--rose)); }
@keyframes viseur { to { transform: rotate(360deg); } }
.jalon.a_faire .pastille { border-style: dashed; }
.jalon > button:hover .pastille { transform: scale(1.08); box-shadow: var(--lueur-lavande); border-color: var(--lavande); }
.jalon.fait > button:hover .pastille { box-shadow: var(--lueur-jaune); border-color: var(--jaune); }
.jalon.en_cours > button:hover .pastille { box-shadow: var(--lueur-rose); border-color: var(--rose); }
.jalon .nom { font-size: 1rem; line-height: 1.2; padding: 0 2px; flex: 1 1 auto; display: flex; align-items: flex-start; justify-content: center; }
.statut { font-size: .875rem; font-family: var(--titre); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; padding: 1px 8px; border-radius: 3px; border: 1px solid currentColor; display: inline-block; }
.jalon.fait .statut, .statut.fait { color: var(--jaune); }
.jalon.en_cours .statut, .statut.en_cours { color: var(--rose); }
.jalon.a_faire .statut, .statut.a_faire { color: var(--discret); }
.etape.solo .jalons { justify-content: center; }
.etape.solo .jalon + .jalon::before { display: none; }
.etape.solo .jalon { max-width: 150px; }

@container page (max-width: 1000px) {
  .frise { grid-template-columns: 1fr; }
  .jalons { flex-direction: column; }
  .jalon > button { flex-direction: row; text-align: left; gap: 12px; padding: 7px 0; }
  .jalon .nom { flex: 0 1 auto; min-width: 0; }
  .jalon .statut, .jalon .pastille { flex: none; }
  .jalon + .jalon::before { top: auto; bottom: 50%; right: auto; left: 25px; width: 0; height: 100%; border-top: 0; border-left: 3px dashed var(--trait2); }
  .jalon.fait + .jalon.fait::before, .jalon.fait + .jalon.en_cours::before { border-left: 3px solid var(--jaune); border-top: 0; }
  .jalon.fait + .jalon.en_cours::after { display: none; }
  .etape.solo .jalons { justify-content: flex-start; }
  .etape.solo .jalon { max-width: none; }
}
@container page (max-width: 600px) {
  .avance { flex-direction: column; align-items: stretch; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .jalon.fait + .jalon.en_cours::after { display: none; }
}
