/* =============================================================
   BLOC process — étapes alternées (quinconce) + gros numéros flottants
   Port fidèle de .process (maquette 2026-06-10 / process.html).

   NB : l'état de reveal des .step (.is-in-view), les formes .shape-* et le
   pattern .section-statement sont fournis par common.css (design system).
   Ce fichier ne contient QUE le layout propre au bloc process.
   Parallaxe 3 plans (chiffre/photo/texte) : js/blocs/process.js.
   ============================================================= */

.process {
  padding: var(--pad-section) 0;
  background: var(--c-bg-cream);
}
/* Après le hero de page, on resserre l'espace au-dessus des étapes. */
.page-hero + .process { padding-top: clamp(20px, 3vh, 40px); }

.steps {
  margin-top: clamp(40px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 8vw, 100px);
}
.step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  /* overflow visible : permet au chiffre géant de déborder du step */
  overflow: visible;
  /* État initial du reveal (révélé par .is-in-view de common.js). */
  opacity: 0;
  transform: translateY(50px);
  will-change: opacity, transform;
}
@media (prefers-reduced-motion: reduce) {
  .step { opacity: 1; transform: none; }
}
.step--right { direction: rtl; }
.step--right > * { direction: ltr; }

.step__visual {
  position: relative;
  /* overflow visible : essentiel pour que le chiffre géant déborde */
  overflow: visible;
}
/* Chiffres géants en SVG inline : seul le contour EXTÉRIEUR du glyph est stroké. */
.step__bignum {
  position: absolute;
  width: 28vw;
  height: auto;
  top: -10%;
  left: -55%;
  opacity: 0.32;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
  will-change: transform;
}
.step--right .step__bignum {
  left: auto;
  right: -55%;
}
.step__bignum text {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: 200px;          /* taille SVG, échelle réelle via width du <svg> */
  fill: var(--c-bg-cream);
  stroke: var(--c-copper);
  stroke-width: 1.5;
  stroke-linejoin: round;
  paint-order: stroke fill;  /* fill par-dessus stroke → contour net */
}
/* 4 tailles différentes pour les 4 chiffres (variation visuelle entre steps) */
.step:nth-child(1) .step__bignum { width: 22vw; }
.step:nth-child(2) .step__bignum { width: 30vw; }
.step:nth-child(3) .step__bignum { width: 24vw; }
.step:nth-child(4) .step__bignum { width: 28vw; }
.step__media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  z-index: 2;   /* photo passe au-dessus du chiffre */
  will-change: transform;
}
/* Tailles légèrement variables par step pour casser l'uniformité. */
.step:nth-child(1) .step__media { width: 95%;  }
.step:nth-child(2) .step__media { width: 100%; }
.step:nth-child(3) .step__media { width: 90%;  }
.step:nth-child(4) .step__media { width: 100%; }
.step__media .card__bg,
.step__media .card__fg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.step__media .card__bg {
  filter: blur(10px);
  transform: scale(1.15);
  opacity: 0.5;
}
.step__media .card__fg {
  filter: contrast(1.05) saturate(0.95);
}
.step__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 3;   /* texte au premier plan */
  will-change: transform;
}
.step__title {
  font-family: var(--ff-display);
  font-size: clamp(1.5rem, 2.4vw, 2.4rem);
  font-weight: 800;
  color: var(--c-blue);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.step__body p {
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--c-muted);
}
.step__goal { color: var(--c-text); font-weight: 500; }
.step__goal strong { color: var(--c-copper); font-weight: 700; }

/* === Process steps en MOBILE + TABLETTE (seuil unifié 1024px) ===
   1 colonne : visuel au-dessus, texte dessous. Parallaxe photo/texte
   désactivée en JS (isMobile) ; seul le gros numéro garde un léger décalage. */
@media (max-width: 1024px) {
  .step {
    grid-template-columns: 1fr;
    gap: clamp(20px, 5vw, 32px);
    direction: ltr;             /* annule le rtl des steps right en mobile */
  }
  .step--right { direction: ltr; }
  .step__media { aspect-ratio: 16 / 11; }
  .step__bignum,
  .step--right .step__bignum,
  .step:nth-child(1) .step__bignum,
  .step:nth-child(2) .step__bignum,
  .step:nth-child(3) .step__bignum,
  .step:nth-child(4) .step__bignum {
    width: 42vw;
    top: -8%;
    left: auto;
    right: -6%;
    opacity: 0.18;
  }
}
