/* ==========================================================================
   Afoodi — page /methodologie
   Continuité avec l'accueil (Archivo + palette OKLCH), plus l'objet propre
   à la page : le parcours des 3 actes (rail sticky) et la cascade des effets.
   ========================================================================== */

/* Les éléments révélés ne sont masqués que si GSAP a bien démarré : si le CDN
   tombe ou que le JS ne s'exécute pas, la page reste entièrement lisible. */
.has-gsap [data-reveal] { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .has-gsap [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.top {
  background:
    radial-gradient(1100px 620px at 50% -8%, oklch(0.33 0.05 163 / .85), transparent 60%),
    linear-gradient(175deg, var(--green-dark), var(--green-ink) 70%);
  padding-bottom: clamp(48px, 6vw, 88px);
}
.hero { padding: clamp(48px, 6.5vw, 96px) 0 clamp(32px, 4vw, 52px); max-width: 1000px; }
.hero h1 {
  font-size: clamp(40px, 6.2vw, 88px);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: .98;
  margin-top: 18px;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--orange); }
.hero__text { max-width: 760px; margin-top: clamp(22px, 2.6vw, 34px); display: grid; gap: 18px; }
.hero__text p { font-size: clamp(15.5px, 1.15vw, 17.5px); line-height: 1.6; color: var(--cream-dim); text-wrap: pretty; }
.hero__lead { font-size: clamp(16.5px, 1.3vw, 19px) !important; color: var(--cream) !important; }
.hero__text em { font-style: italic; }
.hero__text strong { color: var(--cream); font-weight: 800; }
/* Filiation académique : l'information reste sur la page, mais au second plan
   de lecture — elle ne doit pas retarder la compréhension du hero. */
.hero__text .hero__src {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--cream-dim);
  opacity: .72;
  max-width: 62ch;
  padding-left: 14px;
  border-left: 1px solid var(--panel-line);
}
.hero__links { margin-top: 2px; }
.hero .ctas { display: flex; gap: 14px; margin-top: clamp(28px, 3vw, 40px); flex-wrap: wrap; }

/* Bloc vidéo, sous le hero. */
.hero-video {
  margin-top: clamp(30px, 3.4vw, 48px);
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--panel-line);
}
.hero-video__frame {
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background: oklch(0.24 0.04 165 / .5);
  border: 1px solid var(--panel-line);
}
.hero-video video { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   LES 3 ACTES — rail sticky + flux
   ========================================================================== */
.actes {
  background: linear-gradient(175deg, var(--green-deep), var(--green-ink));
  padding: clamp(56px, 7vw, 110px) 0 clamp(70px, 8vw, 130px);
}
.actes__grid {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 90px);
  align-items: start;
}

.rail { position: sticky; top: 100px; display: flex; gap: 20px; }
.rail__track {
  position: relative;
  width: 2px;
  border-radius: 2px;
  background: var(--panel-line);
  flex: none;
}
.rail__prog {
  position: absolute;
  inset: 0 0 auto 0;
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--orange);
  transform: scaleY(var(--prog, 0));
  transform-origin: top center;
}
.rail__list { list-style: none; display: grid; gap: clamp(22px, 3vw, 40px); align-content: space-between; flex: 1; }
.rail__item {
  display: grid;
  gap: 4px;
  opacity: .45;
  transition: opacity .3s ease, transform .3s ease;
}
.rail__item b { font-size: 12px; font-weight: 800; letter-spacing: .18em; color: var(--mint); }
.rail__item span { font-size: clamp(17px, 1.5vw, 21px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.rail__item.is-active { opacity: 1; }
.rail__item.is-active b { color: var(--orange); }

.actes__flow { display: grid; gap: clamp(56px, 7vw, 110px); }
.acte { scroll-margin-top: 100px; }
/* Illustration de l'acte. Elle est dessinée sur crème : la tuile reprend ce
   fond, sinon les traits vert foncé disparaissent sur le sombre. */
.acte__ico {
  width: 52px; height: 52px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: var(--cream);
  margin-bottom: 12px;
}
.acte__ico img { width: 40px; height: 40px; object-fit: contain; }
.acte__no { font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--mint); }
.acte h3 {
  font-size: clamp(34px, 4.6vw, 66px);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: .98;
  margin-top: 14px;
  text-wrap: balance;
}
.acte__lead {
  font-size: clamp(18px, 1.6vw, 23px);
  font-weight: 700;
  line-height: 1.4;
  margin-top: clamp(18px, 2vw, 26px);
  max-width: 46ch;
  text-wrap: pretty;
}

/* Le visuel de chaque acte. Il vient après l'accroche : d'abord ce que
   l'acte produit, ensuite à quoi ça ressemble. */
.acte__photo { margin-top: clamp(24px, 2.8vw, 36px); }
/* Aucun format imposé, aucun recadrage : ce sont des visuels produit, où
   chaque libellé et chaque chiffre compte. Un object-fit: cover couperait les
   colonnes latérales du schéma. Les proportions natives varient de 1,78 à
   2,87 — c'est l'image qui décide de sa hauteur. */
.acte__photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--panel-line);
  background: var(--cream);
}
.acte__photo figcaption {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--cream-dim);
  margin-top: 12px;
}
.acte p:not(.acte__lead):not(.acte__no):not(.acte__note) {
  font-size: 16px;
  line-height: 1.65;
  color: var(--cream-dim);
  margin-top: 18px;
  max-width: 68ch;
  text-wrap: pretty;
}
.acte strong { color: var(--cream); font-weight: 800; }
.acte__note {
  margin-top: clamp(24px, 2.6vw, 36px);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--cream);
  border-left: 2px solid var(--orange);
  padding-left: 16px;
}
.acte__note--strong { font-size: clamp(19px, 1.8vw, 26px); font-weight: 900; letter-spacing: -.02em; }

/* Les trois dimensions */
.dims {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 20px);
  margin-top: clamp(28px, 3vw, 42px);
  counter-reset: dim;
}
.dim {
  position: relative;
  border: 1px solid var(--panel-line);
  border-radius: 18px;
  padding: clamp(20px, 2.2vw, 28px);
  background: oklch(0.24 0.04 165 / .5);
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}
.dim::after {
  content: "";
  position: absolute;
  left: clamp(20px, 2.2vw, 28px);
  right: clamp(20px, 2.2vw, 28px);
  bottom: 0;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s ease;
}
.dim:hover, .dim:focus-within { border-color: oklch(0.55 0.04 165 / .55); background: oklch(0.27 0.045 165 / .6); transform: translateY(-3px); }
.dim:hover::after, .dim:focus-within::after { transform: scaleX(1); }
.dim__no { font-size: 12px; font-weight: 800; letter-spacing: .18em; color: var(--orange); }
.dim h4 { font-size: clamp(17px, 1.5vw, 21px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin-top: 12px; }
.dim p { font-size: 15px; line-height: 1.6; color: var(--cream-dim); margin-top: 12px; text-wrap: pretty; }
.dim strong { color: var(--cream); font-weight: 800; }

/* Chiffre de preuve de l'acte 3 */
.stat {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  flex-wrap: wrap;
  margin-top: clamp(28px, 3vw, 40px);
  padding: clamp(24px, 2.8vw, 36px);
  border: 1px solid var(--panel-line);
  border-radius: 20px;
  background: oklch(0.24 0.04 165 / .5);
}
.stat__n {
  font-size: clamp(44px, 5.5vw, 78px);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--orange);
  white-space: nowrap;
}
/* La photo précède le chiffre, dans le HTML comme à l'écran : d'abord le
   lieu, ensuite ce qui s'y est produit. Elle reste devant la légende pour que
   <figcaption> demeure le dernier enfant de <figure>, comme l'exige la norme. */
.stat__photo {
  flex: none;
  width: clamp(170px, 21vw, 250px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--panel-line);
}
.stat figcaption { flex: 1; min-width: 240px; }
.stat__l { font-size: clamp(17px, 1.5vw, 21px); font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.stat__d { font-size: 14.5px; line-height: 1.55; color: var(--cream-dim); margin-top: 10px; }
.stat .lnk-light { font-size: inherit; }

/* ==========================================================================
   SECTIONS CLAIRES
   ========================================================================== */
.light { background: var(--cream); color: var(--green-ink); position: relative; z-index: 2; }
.light a { color: var(--green-ink); }
.light a:hover { color: var(--orange); }
.cascade-section {
  border-radius: 34px 34px 0 0;
  margin-top: -22px;
  padding: clamp(62px, 7vw, 110px) 0 clamp(40px, 4.6vw, 70px);
}
.light__h2 {
  font-size: clamp(32px, 4.4vw, 62px);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1;
  text-align: center;
  margin: 16px auto 0;
  max-width: 20ch;
  text-wrap: balance;
}
.light__h2 .accent { color: var(--orange); }
.light__h2--left { text-align: left; margin-inline: 0; max-width: 24ch; }
.kicker--center { justify-content: center; }

/* ----- Cascade des trois effets ----- */
.cascade {
  list-style: none;
  margin-top: clamp(44px, 5vw, 76px);
  max-width: 940px;
  margin-inline: auto;
  display: grid;
  gap: clamp(18px, 2vw, 26px);
}
.cascade__step {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(16px, 2vw, 26px);
}
/* Le trait qui relie les effets : c'est la cascade elle-même. */
.cascade__step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 54px;
  bottom: calc(-1 * clamp(18px, 2vw, 26px) - 6px);
  width: 2px;
  background: oklch(0.30 0.045 165 / .22);
}
.cascade__step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 21px;
  bottom: -6px;
  width: 12px; height: 12px;
  border-right: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
  transform: rotate(45deg);
}
.cascade__marker {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-ink);
  color: var(--cream);
  font-size: 13px; font-weight: 800; letter-spacing: .1em;
  flex: none;
  position: relative;
  z-index: 1;
}
.cascade__card {
  background: var(--cream-pure);
  border: 1px solid var(--ink-line);
  border-radius: 20px;
  padding: clamp(20px, 2.2vw, 30px);
}
.cascade__card h3 { font-size: clamp(19px, 1.8vw, 26px); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.cascade__val { font-size: clamp(22px, 2.4vw, 34px); font-weight: 900; letter-spacing: -.03em; line-height: 1.1; margin-top: 10px; color: var(--orange); }
.cascade__d { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); margin-top: 10px; }
.cascade__tag {
  align-self: center;
  font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-ink);
  border-radius: 999px;
  padding: 7px 14px;
  white-space: nowrap;
}
.cascade__tag--mesuree { background: var(--mint); }
.cascade__tag--prouvee { background: oklch(0.84 0.12 100); }
.cascade__tag--naturelle { background: oklch(0.88 0.05 160); }
.cascade__note { text-align: center; font-size: clamp(16px, 1.4vw, 19px); font-weight: 800; margin-top: clamp(32px, 3.4vw, 46px); }
.cascade__link { text-align: center; margin-top: 18px; }

/* ----- Mise en route ----- */
.setup { padding: clamp(20px, 2.4vw, 34px) 0 clamp(56px, 6vw, 96px); }
.split-rule { display: flex; align-items: center; gap: 22px; margin-bottom: clamp(48px, 5.5vw, 84px); }
.split-rule i { flex: 1; height: 1px; background: oklch(0.30 0.045 165 / .18); }
.split-rule span { display: flex; gap: 7px; }
.split-rule b { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.split-rule b:nth-child(2) { opacity: .55; }
.split-rule b:nth-child(3) { opacity: .25; }

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 44px);
  margin-top: clamp(40px, 4.6vw, 68px);
}
.step { border-top: 2px solid oklch(0.30 0.045 165 / .18); padding-top: 22px; }
.step:last-child { border-top-color: var(--orange); }
.step__no { font-size: clamp(30px, 3.2vw, 44px); font-weight: 900; letter-spacing: -.03em; color: var(--orange); line-height: 1; display: block; }
.step h3 { font-size: clamp(19px, 1.7vw, 24px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin-top: 14px; }
.step p { font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); margin-top: 12px; text-wrap: pretty; }

/* ----- Objections ----- */
.objections { padding: 0 0 clamp(62px, 7vw, 110px); display: grid; gap: clamp(20px, 2.4vw, 32px); }
.objections .wrap { display: grid; gap: clamp(20px, 2.4vw, 32px); }
.obj {
  background: var(--cream-pure);
  border: 1px solid var(--ink-line);
  border-radius: 24px;
  padding: clamp(28px, 3.4vw, 56px);
}
.obj h3 { font-size: clamp(24px, 2.8vw, 40px); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; text-wrap: balance; }
.obj__lead { font-size: clamp(17px, 1.5vw, 21px); font-weight: 700; margin-top: 18px; color: var(--orange); }
.obj p:not(.obj__lead):not(.obj__punch) { font-size: 16px; line-height: 1.65; color: var(--ink-soft); margin-top: 16px; max-width: 72ch; text-wrap: pretty; }
.obj__punch { font-size: clamp(17px, 1.5vw, 21px); font-weight: 800; letter-spacing: -.015em; line-height: 1.35; margin-top: 22px; max-width: 46ch; }
/* Les deux cautions institutionnelles nommées dans le paragraphe ci-dessus :
   les montrer vaut mieux que les citer. */
.obj__logos {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(20px, 2.6vw, 38px);
  margin-top: clamp(22px, 2.4vw, 30px);
}
.obj__logos img { height: clamp(28px, 2.6vw, 38px); width: auto; object-fit: contain; }
.obj--dark {
  background: var(--green-ink);
  border-color: transparent;
  color: var(--cream);
}
.obj--dark p:not(.obj__lead):not(.obj__punch) { color: var(--cream-dim); }
.obj--dark .obj__punch { color: var(--cream); }
.obj strong { font-weight: 800; }

/* La photo de l'objection « Je connais déjà mes marges » : ce que les ratios
   ne montrent pas, c'est ce qui se passe en salle. Elle vient après le texte
   dans le HTML — l'argument d'abord, l'illustration ensuite. */
.obj--dark { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: clamp(24px, 3vw, 48px); align-items: center; }
/* Cadrage haut : le regard du restaurateur et sa salle sont dans le tiers
   supérieur — un recadrage centré lui couperait la tête. */
.obj__photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: 18px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .dims { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .obj--dark { grid-template-columns: 1fr; }
  .obj__photo { aspect-ratio: 16 / 9; object-position: center 30%; }
  .steps { grid-template-columns: 1fr; }
  .actes__grid { grid-template-columns: 1fr; gap: clamp(28px, 4vw, 44px); }
  /* Le rail devient un fil d'étapes horizontal, non collant. */
  .rail { position: static; flex-direction: column; gap: 14px; }
  .rail__track { width: 100%; height: 2px; }
  .rail__prog { transform: scaleX(var(--prog, 0)); transform-origin: left center; }
  .rail__list { grid-auto-flow: column; grid-auto-columns: 1fr; gap: 14px; align-content: start; }
  .rail__item span { font-size: 15px; }
}

@media (max-width: 640px) {
  .cascade__step { grid-template-columns: 44px minmax(0, 1fr); }
  .cascade__step:not(:last-child)::before { left: 21px; top: 44px; }
  .cascade__step:not(:last-child)::after { left: 16px; }
  .cascade__marker { width: 44px; height: 44px; font-size: 12px; }
  .cascade__tag { grid-column: 2; justify-self: start; margin-top: -4px; }
  .rail__list { grid-auto-flow: row; }
  .rail__item { display: none; }
  .rail__item.is-active { display: grid; }
}
