/* Fin d'analyse et progression (R2 / R8 de la refonte du parcours, 11 octobre 2026) — maquette 02 validée.
   Les jetons sont ceux de l'espace connecté (--ln-*) ; vert pour « prêt », rouge pour l'échec seulement (aucune couleur
   nouvelle d'état). L'état n'est jamais porté par la couleur seule : titre, icône et phrase le disent. */
.analysis-notice { display: flex; gap: 18px; align-items: flex-start; margin: 0 0 var(--sp-6, 24px); padding: 24px; border: 1px solid; border-left-width: 5px; border-radius: var(--ln-radius, 8px); }
.analysis-notice--good { color: var(--ln-good); background: var(--ln-good-bg); border-color: var(--ln-good-line); }
.analysis-notice--danger { color: var(--ln-danger); background: var(--ln-danger-bg); border-color: var(--ln-danger-line); }
.analysis-notice--large { padding: 32px; align-items: center; }
.analysis-notice__mark { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; }
.analysis-notice__mark .ln-icon { width: 24px; height: 24px; }
.analysis-notice__body { min-width: 0; }
.analysis-notice h2 { margin: 0 0 8px; font-size: 24px; font-weight: 700; letter-spacing: -0.025em; color: inherit; }
.analysis-notice--large h2 { font-size: 28px; }
.analysis-notice p { margin: 0 0 14px; color: inherit; }
.analysis-notice p:last-child { margin-bottom: 0; }
.analysis-notice .button { margin-top: 4px; }
.analysis-notice__retry { font-weight: 600; }

.analysis-progress { margin: 0 0 var(--sp-6, 24px); padding: 24px; border: 1px solid var(--ln-line); border-radius: var(--ln-radius, 8px); background: var(--ln-page, #fff); }
.analysis-progress h2 { margin: 0 0 16px; font-size: 20px; font-weight: 700; }
.analysis-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; counter-reset: none; }
.analysis-steps__item { display: flex; gap: 10px; align-items: flex-start; min-width: 0; padding: 10px 12px; border: 1px solid var(--ln-line); border-radius: var(--ln-radius-sm, 6px); background: var(--ln-soft); color: var(--ln-muted, #5b6d80); }
.analysis-steps__item[data-state="done"] { color: var(--ln-good); background: var(--ln-good-bg); border-color: var(--ln-good-line); }
.analysis-steps__item[data-state="current"] { color: var(--ln-accent); background: var(--ln-page, #fff); border-color: var(--ln-accent); box-shadow: 0 0 0 1px var(--ln-accent); }
.analysis-steps__mark { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.analysis-steps__mark .ln-icon { width: 16px; height: 16px; }
.analysis-steps__label { display: grid; font-size: 13px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.analysis-steps__label small { font-weight: 400; font-size: 12px; }
.analysis-progress__says { margin: 0 0 12px; }
.analysis-progress__parts { margin: 0 0 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* La ligne de l'ÉTAPE (16 octobre 2026) : le rectangle de l'étape en cours se remplit de gauche à droite, teinte claire du bleu d'action ;
   le texte reste lisible par-dessus (marque et libellé au-dessus du remplissage). */
.analysis-steps__item { position: relative; }
.analysis-steps__fill { position: absolute; inset: 0 auto 0 0; border-radius: calc(var(--ln-radius-sm, 6px) - 1px); background: color-mix(in srgb, var(--ln-accent) 20%, #fff); }
.analysis-steps__mark, .analysis-steps__label { position: relative; }
.analysis-progress__time { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 8px; font-weight: 600; font-variant-numeric: tabular-nums; }
.analysis-progress__retry { margin: 0 0 8px; font-weight: 600; color: var(--ln-warn, #8a5a00); }
.analysis-progress__long { margin: 0 0 8px; padding: 10px 14px; border: 1px solid var(--ln-warn-line, #e6cf9b); border-radius: var(--ln-radius-sm, 6px); background: var(--ln-warn-bg, #fbf3df); color: var(--ln-warn, #8a5a00); font-weight: 600; }
.analysis-progress .help { margin: 0 0 6px; }
/* Signe de vie (chantier 17) : l'heure de la dernière vérification par le serveur, un anneau qui tourne ; aucune couleur d'état nouvelle (cobalt de l'espace, gris pour « connexion perdue »). */
.analysis-liveness { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0 0 12px; font-size: 13px; color: var(--ln-muted, #5b6d80); font-variant-numeric: tabular-nums; }
.analysis-liveness[hidden], .analysis-liveness__lost[hidden] { display: none; }
.analysis-activity { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.analysis-activity__text { min-width: 0; }
.analysis-activity__text p { margin: 0; }
/* L'anneau d'activité (16 octobre 2026, remplace la puce) : 44 px, un arc cobalt tourne autour de l'icône de l'étape. Au
   repos (mouvement réduit, ou avant que l'animation parte) c'est un anneau cobalt entier et statique ; connexion perdue :
   gris, estompé, immobile. */
.analysis-activity__ring { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--ln-accent); }
.analysis-activity__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.analysis-activity__svg circle { fill: none; stroke-width: 3; }
.analysis-activity__track { stroke: var(--ln-line); }
.analysis-activity__arc { stroke: var(--ln-accent); stroke-linecap: round; }
.analysis-activity__icon { position: relative; width: 20px; height: 20px; }
.analysis-liveness__lost { margin: 0 0 12px; font-weight: 600; color: var(--ln-muted, #5b6d80); }
/* La ligne de l'ENSEMBLE : barre plus épaisse en cinq segments, teinte sourde (ardoise pleine, gris clair vide), aucune couleur d'état. */
.analysis-global { margin: 0 0 14px; }
.analysis-global__caption { margin: 0 0 8px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ln-muted, #5b6d80); }
.analysis-global__mobile { display: none; }
.analysis-global__bar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.analysis-global__segment { display: grid; gap: 6px; min-width: 0; }
.analysis-global__track { display: block; height: 14px; border-radius: 4px; overflow: hidden; background: color-mix(in srgb, var(--ln-muted, #5b6d80) 18%, #fff); }
.analysis-global__fill { display: block; height: 100%; background: var(--ln-muted, #5b6d80); }
.analysis-global__name { font-size: 12px; line-height: 1.3; color: var(--ln-muted, #5b6d80); overflow-wrap: anywhere; }
.analysis-global__segment[data-state="current"] .analysis-global__name { font-weight: 600; color: var(--ln-ink, #14213d); }
.analysis-progress__count { margin: 0 0 8px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) {
  .analysis-steps__item[data-state="current"] .analysis-steps__mark { animation: analysis-pulse 1.6s ease-in-out infinite; }
  .analysis-activity__ring { animation: analysis-pulse 2s ease-in-out infinite; }
  .analysis-activity__svg { animation: analysis-spin 1.1s linear infinite; }
  .analysis-activity__arc { stroke-dasharray: 36 83.4; }
  .analysis-global__fill, .analysis-steps__fill { transition: width 0.6s ease; }
}
/* Mouvement réduit : tout s'arrête, l'information reste entière (heure, âges, étape, barres). */
@media (prefers-reduced-motion: reduce) {
  .analysis-steps__item[data-state="current"] .analysis-steps__mark, .analysis-activity__ring, .analysis-activity__svg,
  .analysis-global__fill, .analysis-steps__fill { animation: none; transition: none; }
}
/* Connexion perdue : l'anneau s'arrête, s'estompe et devient gris ; rien ne pulse (le message le dit en toutes lettres). */
.analysis-progress[data-liveness="lost"] .analysis-activity__ring, .analysis-progress[data-liveness="lost"] .analysis-activity__svg,
.analysis-progress[data-liveness="lost"] .analysis-steps__mark { animation: none; }
.analysis-progress[data-liveness="lost"] .analysis-activity__ring { color: var(--ln-muted, #5b6d80); opacity: 0.55; }
.analysis-progress[data-liveness="lost"] .analysis-activity__arc { stroke: var(--ln-muted, #5b6d80); stroke-dasharray: none; }
@keyframes analysis-spin { to { transform: rotate(360deg); } }
@keyframes analysis-pulse { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ln-accent) 22%, transparent); } }
@media (max-width: 860px) {
  .analysis-notice { padding: 20px; gap: 12px; }
  .analysis-notice--large { padding: 24px; }
  .analysis-notice h2, .analysis-notice--large h2 { font-size: 22px; }
  .analysis-notice__mark { width: 30px; height: 30px; }
  .analysis-notice__mark .ln-icon { width: 18px; height: 18px; }
  .analysis-steps { grid-template-columns: 1fr; }
  .analysis-global__name, .analysis-global__desktop { display: none; }
  .analysis-global__mobile { display: inline; }
  .analysis-progress__count--with-global { display: none; }
}
@media print { .analysis-progress, .analysis-notice { display: none; } }
