/* 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 : UNE carte — l'anneau, un titre, une phrase, les cinq étapes avec leur barre, 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 { margin: 0; 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; }
/* Les cinq étapes (remises le 4 novembre 2026), chacune avec SA barre fine. Le cobalt de l'espace seulement : aucune couleur d'état
   (ce sont des étapes, pas des pastilles) ; l'état est aussi écrit sous le nom de l'étape. */
.analysis-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 18px 0 14px; padding: 0; list-style: none; }
.analysis-steps__item { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-width: 0; color: var(--ln-muted); }
.analysis-steps__item[data-state="done"] { color: var(--ln-ink); }
.analysis-steps__item[data-state="current"] { color: var(--ln-ink); }
.analysis-steps__head { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.analysis-steps__mark { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: var(--ln-text-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.analysis-steps__mark .ln-icon { width: 14px; height: 14px; }
.analysis-steps__item[data-state="done"] .analysis-steps__mark { color: var(--ln-accent); }
.analysis-steps__item[data-state="current"] .analysis-steps__mark { color: var(--ln-page); background: var(--ln-accent); border-color: var(--ln-accent); }
.analysis-steps__label { display: grid; gap: 2px; font-size: var(--ln-text-sm); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.analysis-steps__label small { font-size: var(--ln-text-sm); font-weight: 400; color: var(--ln-muted); font-variant-numeric: tabular-nums; }
.analysis-steps__bar { display: block; height: 6px; border-radius: 3px; overflow: hidden; background: color-mix(in srgb, var(--ln-accent) 14%, var(--ln-surface)); }
.analysis-steps__fill { display: block; height: 100%; border-radius: inherit; background: var(--ln-accent); }
/* L'étape en cours sans parties (la revue, la fin) : avancement inconnu, aucune longueur qui se lirait comme un pourcentage. */
.analysis-steps__fill--working { width: 100%; background: color-mix(in srgb, var(--ln-accent) 40%, var(--ln-surface)); }
@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-steps__fill { transition: width 0.6s ease; }
  .analysis-steps__fill--working { width: 35%; background: var(--ln-accent); animation: analysis-slide 1.6s ease-in-out infinite alternate; }
}
/* Mouvement réduit : tout s'arrête, l'information reste entière. */
@media (prefers-reduced-motion: reduce) {
  .analysis-activity__ring, .analysis-activity__svg, .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__fill--working { 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-slide { from { transform: translateX(0); } to { transform: translateX(186%); } }
@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-steps { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .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; } }

/* ---- Étape d'analyse (maquette validée le 12 novembre 2026) ---------------------------------------------------------------
   Rubriques pas encore livrées (estompées, sans lien), « Ce que vous recevrez » et le schéma provisoire. Jetons --ln-* seulement. */
/* Une entrée du menu sans destination : même gabarit qu'un lien, jamais cliquable, texte estompé (--ln-faint tient 4,5:1 sur --ln-side). */
.dossier-side__off { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 7px 10px; border-radius: var(--ln-radius-sm); color: var(--ln-faint); font-size: var(--ln-text-base); font-weight: 500; line-height: 1.3; cursor: default; }
.dossier-side__off .ln-icon { width: 16px; height: 16px; color: var(--ln-faint); }
.dossier-side__off small { display: block; margin-top: 1px; font-size: var(--ln-text-sm); font-weight: 400; color: var(--ln-faint); }
.dossier-side__label small.dossier-side__scenario--off { color: var(--ln-faint); }

/* « Ce que vous recevrez » : quatre livrables en une ligne, sans carte dans la carte. */
.analysis-receive { margin: 0 0 var(--sp-6, 24px); padding: 18px 24px; border: 1px solid var(--ln-line); border-radius: var(--ln-radius, 8px); background: var(--ln-page); }
.analysis-receive__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 0 0 12px; }
.analysis-receive h2 { margin: 0; font-size: var(--ln-text-md); font-weight: 700; letter-spacing: -0.01em; }
.analysis-receive__head a { font-size: var(--ln-text-sm); font-weight: 600; }
.analysis-receive__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 20px; margin: 0; padding: 0; list-style: none; }
.analysis-receive__grid li { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.analysis-receive__icon { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--ln-radius-sm); background: var(--ln-neutral-bg); color: var(--ln-accent); }
.analysis-receive__icon .ln-icon { width: 16px; height: 16px; color: inherit; }
.analysis-receive__text { display: grid; gap: 2px; min-width: 0; font-size: var(--ln-text-sm); line-height: 1.4; color: var(--ln-muted); overflow-wrap: anywhere; }
.analysis-receive__text strong { font-size: var(--ln-text-base); color: var(--ln-ink); }

/* Le schéma provisoire : un bloc, le schéma dedans (un seul niveau d'encadrement). « Provisoire » est un TYPE écrit, jamais une pastille d'état. */
.analysis-provisional { 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); min-width: 0; }
.analysis-provisional__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 6px; }
.analysis-provisional h2 { margin: 0; font-size: var(--ln-text-lead); font-weight: 700; letter-spacing: -0.015em; }
.analysis-provisional__tag { padding: 2px 9px; border: 1px solid var(--ln-line); border-radius: var(--ln-radius-sm); background: var(--ln-neutral-bg); font-size: var(--ln-text-sm); font-weight: 600; color: var(--ln-muted); }
.analysis-provisional__name { margin: 0 0 6px; font-size: var(--ln-text-md); font-weight: 600; overflow-wrap: anywhere; }
.analysis-provisional__note { margin: 0 0 14px; font-size: var(--ln-text-sm); color: var(--ln-muted); max-width: var(--ln-measure); }
@media (max-width: 1180px) { .analysis-receive__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .analysis-receive, .analysis-provisional { padding: 16px; }
  .analysis-receive__grid { grid-template-columns: minmax(0, 1fr); }
}
@media print { .analysis-receive, .analysis-provisional { display: none; } }
