/* 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: var(--ln-text-xl); font-weight: 700; letter-spacing: -0.025em; color: inherit; }
.analysis-notice--large h2 { font-size: var(--ln-text-title-sm); }
.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; }

/* La progression (allégée le 30 octobre 2026) : UNE carte — l'anneau, un titre, une phrase, une barre fine, une ligne courte. */
.analysis-progress { margin: 0 0 var(--sp-6, 24px); padding: 20px 24px; border: 1px solid var(--ln-line); border-radius: var(--ln-radius, 8px); background: var(--ln-page); }
.analysis-activity { display: flex; align-items: flex-start; gap: 16px; }
.analysis-activity__text { flex: 1; min-width: 0; }
.analysis-activity__text p { margin: 0; }
.analysis-activity__text .analysis-progress__says { margin: 0 0 12px; }
.analysis-progress__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; margin: 0 0 6px; }
.analysis-progress h2 { margin: 0; font-size: var(--ln-text-lead); font-weight: 700; letter-spacing: -0.015em; }
.analysis-progress__says { font-size: var(--ln-text-md); line-height: 1.5; max-width: var(--ln-measure); overflow-wrap: anywhere; }
.analysis-progress__time { font-size: var(--ln-text-sm); color: var(--ln-muted); }
.analysis-progress__time > span + span::before { content: " "; }
.analysis-progress__retry, .analysis-progress__long { font-weight: 600; color: var(--ln-warn); }
/* Signe de vie (chantier 17) : l'étape et l'heure de la dernière vérification par le serveur, en petit ; l'anneau tourne.
   Aucune couleur d'état nouvelle (cobalt de l'espace, gris pour « connexion perdue »). */
.analysis-liveness, .analysis-liveness__lost { font-size: var(--ln-text-sm); color: var(--ln-muted); font-variant-numeric: tabular-nums; }
.analysis-liveness__lost { font-weight: 600; }
.analysis-liveness[hidden], .analysis-liveness__lost[hidden] { display: none; }
/* L'anneau d'activité (16 octobre 2026) : 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; }
/* L'avancement de l'ensemble : une barre fine, présente seulement quand les durées des étapes sont mesurées. */
.analysis-global { height: 6px; margin: 0 0 10px; border-radius: 3px; overflow: hidden; background: color-mix(in srgb, var(--ln-accent) 14%, var(--ln-surface)); }
.analysis-global__fill { display: block; height: 100%; border-radius: inherit; background: var(--ln-accent); }
@media (prefers-reduced-motion: no-preference) {
  .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 { transition: width 0.6s ease; }
}
/* Mouvement réduit : tout s'arrête, l'information reste entière. */
@media (prefers-reduced-motion: reduce) {
  .analysis-activity__ring, .analysis-activity__svg, .analysis-global__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 { animation: none; }
.analysis-progress[data-liveness="lost"] .analysis-activity__ring { color: var(--ln-muted); opacity: 0.55; }
.analysis-progress[data-liveness="lost"] .analysis-activity__arc { stroke: var(--ln-muted); 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: var(--ln-text-xl); }
  .analysis-notice__mark { width: 30px; height: 30px; }
  .analysis-notice__mark .ln-icon { width: 18px; height: 18px; }
  .analysis-progress { padding: 16px; }
  .analysis-activity { gap: 12px; }
  .analysis-activity__ring { width: 36px; height: 36px; }
  .analysis-activity__icon { width: 16px; height: 16px; }
  .analysis-progress__says { font-size: var(--ln-text-base); }
}
@media print { .analysis-progress, .analysis-notice { display: none; } }
