/* ═══════════════════════════════════════════════════════════════
   TOKENS
═══════════════════════════════════════════════════════════════ */
:root {
  --bg:     #070707;
  --s1:     #0f0f0f;
  --s2:     #161616;
  --b1:     rgba(255,255,255,.055);
  --b2:     rgba(255,255,255,.11);
  --b3:     rgba(255,255,255,.20);
  --t1:     #ffffff;
  --t2:     #888888;
  --t3:     #404040;
  --ease:   cubic-bezier(.16,1,.3,1);
  --ease-o: cubic-bezier(.4,0,.2,1);
}

/* ═══════════════════════════════════════════════════════════════
   RESET
═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--t1);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════════════════════════
   FOND — canvas + grille de points + vignette
═══════════════════════════════════════════════════════════════ */
#cvs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Grille de points style Vercel */
.dot-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 85% 75% at 50% 50%,
    transparent 35%, rgba(0,0,0,.88) 100%);
}

/* Ligne supérieure animée */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 1px;
  z-index: 10;
  overflow: hidden;
}
.topbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%, rgba(255,255,255,.18) 30%,
    rgba(255,255,255,.18) 70%, transparent 100%);
}
.topbar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: shimmer 4s ease-in-out infinite 1.5s;
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════════════════════ */
.wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 580px;
  padding: 0 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 0;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHIE
═══════════════════════════════════════════════════════════════ */
h1 {
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -3px;
  line-height: 1.05;
  /* Gradient blanc → gris doux */
  background: linear-gradient(160deg, #ffffff 0%, #888888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: up .9s var(--ease) .08s forwards;
  margin-bottom: 1.4rem;
}

.sub {
  font-size: .975rem;
  color: var(--t2);
  line-height: 1.8;
  font-weight: 400;
  max-width: 400px;
  opacity: 0;
  animation: up .9s var(--ease) .2s forwards;
  margin-bottom: .75rem;
}

.hint {
  font-size: .78rem;
  color: var(--t3);
  font-weight: 400;
  letter-spacing: .2px;
  opacity: 0;
  animation: up .9s var(--ease) .3s forwards;
  margin-bottom: 2.8rem;
}

/* ═══════════════════════════════════════════════════════════════
   DIVISEUR
═══════════════════════════════════════════════════════════════ */
.divider {
  width: 100%;
  max-width: 420px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--b2) 30%, var(--b2) 70%, transparent);
  margin-bottom: 2.8rem;
  opacity: 0;
  animation: fadeIn .9s var(--ease) .35s forwards;
}

/* ═══════════════════════════════════════════════════════════════
   BARRE DE PROGRESSION
═══════════════════════════════════════════════════════════════ */
.progress-wrap {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 0;
  animation: up .9s var(--ease) .44s forwards;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--t3);
}

.progress-pct {
  font-size: .82rem;
  font-weight: 700;
  color: var(--t1);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.5px;
}

/* Track */
.progress-track {
  width: 100%;
  height: 4px;
  background: var(--b1);
  border-radius: 999px;
  position: relative;
  overflow: visible;
}

/* Fill avec gradient + glow */
.progress-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--t3) 0%, var(--t1) 100%);
  width: 0%;
  transition: width 1.6s var(--ease);
  box-shadow: 0 0 10px rgba(255,255,255,.25), 0 0 24px rgba(255,255,255,.08);
}

/* Curseur brillant à l'extrémité de la barre */
.progress-fill::after {
  content: '';
  position: absolute;
  right: -1px; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255,255,255,.8), 0 0 16px rgba(255,255,255,.4);
}

/* Étapes */
.progress-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  cursor: default;
}

.step-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--b2);
  background: var(--s1);
  display: grid;
  place-items: center;
  transition: border-color .4s var(--ease-o), background .4s var(--ease-o), box-shadow .4s;
  flex-shrink: 0;
}

/* Checkmark SVG injecté en JS quand done */
.step-icon svg {
  opacity: 0;
  transform: scale(.5);
  transition: opacity .3s, transform .3s var(--ease);
}

.step-name {
  font-size: .62rem;
  font-weight: 500;
  color: var(--t3);
  letter-spacing: .3px;
  transition: color .4s;
  white-space: nowrap;
}

/* État complété */
.step.done .step-icon {
  border-color: var(--t1);
  background: var(--t1);
  box-shadow: 0 0 12px rgba(255,255,255,.2);
}
.step.done .step-icon svg {
  opacity: 1;
  transform: scale(1);
}
.step.done .step-name { color: var(--t2); }

/* État actif (en cours) */
.step.active .step-icon {
  border-color: var(--t2);
  background: var(--s2);
  box-shadow: 0 0 8px rgba(255,255,255,.06);
}
.step.active .step-name { color: var(--t2); }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════ */
footer {
  position: relative;
  z-index: 2;
  width: 100%;
  border-top: 1px solid var(--b1);
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.f-copy { font-size: .73rem; color: var(--t3); }
.f-copy strong { color: var(--t2); font-weight: 500; }
.f-sep { color: var(--t3); font-size: .45rem; }
.f-link {
  font-size: .73rem;
  color: var(--t3);
  text-decoration: none;
  transition: color .2s;
}
.f-link:hover { color: var(--t2); }

/* ═══════════════════════════════════════════════════════════════
   KEYFRAMES
═══════════════════════════════════════════════════════════════ */
@keyframes up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes shimmer {
  0%   { left: -60%; }
  100% { left: 160%; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  h1 { letter-spacing: -2px; }
  .step-name { font-size: .58rem; }
  .step-icon { width: 24px; height: 24px; }
}
