/* comment-ca-marche.css — page « Comment ça marche ».
   S'appuie sur design-system.css pour les tokens, les composants (.card,
   .tag, .btn), l'en-tête, le hero et le pied de page, partagés avec l'outil.
   Même langage que l'accueil : des cartes blanches sur le fond zinc. */

.hero strong { color: var(--o-ink); font-weight: 600; }

/* ---- Chiffres clés : quatre cartes ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: clamp(8px, 2vw, 16px) 0 clamp(28px, 4vw, 48px);
}
.stat {
  padding: 20px;
  border: 1px solid var(--o-line);
  border-radius: var(--o-radius-lg);
  background: var(--o-surface);
  box-shadow: var(--o-sh-badge);
}
.stat-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--o-accent);
}
.stat-num .unit { margin-left: .15em; font-size: .4em; letter-spacing: 0; color: var(--o-subtle); }
.stat-lbl {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--o-muted);
}

/* ---- Intro du parcours ---- */
.flow-intro {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--o-muted);
}
.flow-intro .arrow { display: inline-block; color: var(--o-accent); animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ---- Étapes : une carte chacune ---- */
.pipeline { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
.step {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--o-line);
  border-radius: var(--o-radius-xl);
  background: var(--o-surface);
  box-shadow: var(--o-sh-card);
}
.step-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
/* Numéro d'étape dans une pastille d'accent, comme l'icône du hero. */
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--o-radius-md);
  background: var(--o-accent-soft);
  color: var(--o-accent-ink);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.step-head h2 { margin: 0; font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.02em; }
.step-body { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; }
.step-text p { margin-bottom: 12px; font-size: 15px; line-height: 1.6; color: var(--o-text); }
.step-text p:last-child { margin-bottom: 0; }
.step-text strong { font-weight: 600; color: var(--o-ink); }
.step-text em { font-style: normal; font-weight: 600; color: var(--o-accent-ink); }
.step-text .btn { margin-top: 8px; }

code {
  padding: .1em .4em;
  border-radius: 6px;
  background: var(--o-chip);
  color: var(--o-accent-ink);
  font-family: var(--font-body);
  font-size: .9em;
  white-space: nowrap;
}

/* ---- Visuels ---- */
.step-visual { min-width: 0; }
.vchips { display: flex; flex-wrap: wrap; gap: 8px; }
/* .tag du système, agrandi : ces pastilles sont des exemples à lire, pas des
   étiquettes de métadonnée. */
.vchip { min-height: 34px; padding: 0 14px; font-size: 13px; }

/* Listes encadrées (classement, modes de distance), comme dans la fiche
   détail de l'outil. */
.rank,
.dmodes {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--o-line-soft);
  border-radius: 14px;
}
.rank-row,
.dmode {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  font-size: 14px;
}
.rank-row + .rank-row,
.dmode + .dmode { border-top: 1px solid var(--o-line-soft); }
.rank-medal { font-size: 16px; }
.rank-name { color: var(--o-ink); }
.rank-price {
  margin-left: auto;
  font-family: var(--font-heading);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.rank-row.best { background: var(--o-accent-soft); }
.rank-row.best .rank-price { color: var(--o-accent-ink); }
.dmode { color: var(--o-muted); }
.dmode b {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--o-ink);
}

.badges { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- Encadré final (.card du système) ---- */
.outro { margin-top: 16px; gap: 0; }
.outro h2 { margin-bottom: 12px; font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.03em; }
.outro h2 em { font-style: normal; color: var(--o-accent); }
.outro p { max-width: 62ch; margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: var(--o-text); }
.cta-final { align-self: flex-start; }

/* ---- Apparition au défilement ---- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .flow-intro .arrow { animation: none; }
}

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step-body { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
