/* CU-ATLAS-LOADING-V3 (#488) — écran simple, barre + ticks verticaux. */

#atlas-loading {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: grid;
  place-items: center;
  padding: 28px;
  background: color-mix(in srgb, var(--colo-fresh, #7141D9) 9%, #f4f2fa);
  color: var(--text-fg);
}
body.vo-dark #atlas-loading {
  background: color-mix(in srgb, var(--colo-fresh, #7141D9) 14%, #12141a);
  color: #f5f6fa;
}
body.vo-dark #atlas-loading .al-progress-head { color: #aeb5c3; }
body.vo-dark #atlas-loading .al-label { color: #f5f6fa; }

/* Aucun châssis de popin : uniquement le contenu posé dans l'overlay. */
.al-content {
  width: min(680px, 100%);
}

.al-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: var(--text-base, 13px);
  font-weight: 650;
}
.al-pct {
  color: #16a34a;
  font-size: var(--text-20, 20px);
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.al-track {
  height: 12px;
  overflow: hidden;
  border-radius: 3px;
  background: color-mix(in srgb, #16a34a 13%, var(--surface, #fff));
}
.al-fill {
  /* #1510 — même source que le chiffre (`--al-progress` sur #atlas-loading). */
  width: calc(var(--al-progress, 0) * 1%);
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.al-steps {
  width: min(540px, 100%);
  list-style: none;
  margin: 28px auto 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}
/* #1897 ⑨ (verdict Damien 16/09) : « la barre de progression reste en place, les informations
   arrivent en dessous mais elle reste fixe ». L'overlay centre son contenu : chaque ligne qui
   s'ouvrait (max-height 0 → 64) faisait grandir le bloc, donc REMONTER la barre à chaque message.
   Les lignes gardent désormais leur place dès le départ — seule leur ENCRE apparaît. */
.al-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 7px 2px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity .3s ease,
    transform .35s ease;
}
.al-step.is-on,
.al-step.is-done {
  opacity: 1;
  transform: translateY(0);
}
/* ⚠️ `display: none` aurait fait redescendre la barre le jour où une étape est sautée en cours
   de route (l'e-mail non envoyé) : la place reste tenue, l'étape reste invisible. */
.al-step.is-skip { visibility: hidden; }

.al-tick {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #16a34a;
  background: #22c55e;
  color: var(--text-inverse);
  transform: scale(.86);
  transition: transform .3s ease;
}
.al-step.is-done .al-tick { transform: scale(1); }
.al-tick svg { width: 15px; height: 15px; }
.al-label {
  color: var(--text-fg);
  font-size: var(--text-md, 14px);
  font-weight: 650;
  line-height: 1.4;
}

@media (max-width: 600px) {
  #atlas-loading { padding: 22px; }
  .al-progress-head { font-size: var(--text-sm, 12px); }
  .al-pct { font-size: var(--text-18, 18px); }
  .al-steps { margin-top: 24px; }
  .al-label { font-size: var(--text-base, 13px); }
}

@media (prefers-reduced-motion: reduce) {
  .al-step,
  .al-tick {
    transition: none;
  }
}

/* #2567 — chiffres de labels ; aucune règle sur les phrases. */
.al-pct { font-family: var(--chrono-font-nombres); }
