/* ============================================================
   AMALAB — sections.css
   Hero · flow diagram · SCALED diagrams · page-specific bands
   ============================================================ */

/* ---------- Hero (Home) — primary navy band, one viewport, interactive lattice ----------
   The lattice canvas sits behind the copy: rounded squares (the brand mark shape)
   drifting slowly, linked by hairlines. Copy stays readable through a navy gradient. */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  /* Height-driven (guardian AMBER fix): the old width-driven clamp gave a
     1366×768 laptop 48px pads while the taller copy clipped the CTA at the
     fold. svh yields on short viewports, keeps 48px on tall ones. */
  padding-block: clamp(20px, 4svh, 48px);
  background: var(--navy);
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero::after {
  /* readability wash over the lattice — copy is CENTERED (V23 hero pass), so
     the wash is symmetric: densest behind the copy column, opening to both
     edges where the lattice now lives. Kept lighter than the old left wash so
     the bigger, brighter lattice still reads through. */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(18, 60, 74, 0) 0%,
    rgba(18, 60, 74, 0.62) 30%,
    rgba(18, 60, 74, 0.78) 50%,
    rgba(18, 60, 74, 0.62) 70%,
    rgba(18, 60, 74, 0) 100%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 1;
  /* .container's margin-inline:auto becomes a flex auto-margin once .hero is a flex
     row, which shrinks it to content width and re-centers it — losing alignment
     with the nav logo. Force full width so it centers at the same 1200px/gutter
     as every other section instead. */
  width: 100%;
}
/* V23 hero pass (owner): copy CENTERED. Every capped block re-centers with
   margin-inline:auto; hero-network.js keep-out needs no change (it unions the
   live text rects), but its seeding + the ::after wash were re-symmetrised. */
.hero-copy {
  /* 880px (owner: h1 must wrap in 3 lines, not 4 — the copy column widens so
     the 30ch heading cap below actually has room at desktop sizes). */
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
}
.hero-copy h1 { margin-inline: auto; }
.hero-copy .lead,
.hero-copy .sub { margin-inline: auto; }
.hero-copy .eyebrow { color: var(--teal-bright); margin-bottom: var(--s-5); }
.hero-copy .eyebrow::before {
  background: color-mix(in srgb, var(--teal-bright) 65%, transparent);
  margin-inline: auto; /* the 32px dash is a block — center it with the copy */
}
/* V30 (owner): reverted — the claim is back to leading, big; the
   teams/tools line is the secondary beat again. */
.hero-copy h1 {
  margin-bottom: var(--s-5);
  max-width: 20ch;
  text-wrap: balance;
  font-size: clamp(2.25rem, 1.3rem + 3.2vw, 4rem);
  line-height: 1.08;
}
/* The X is THE measurable-value moment of the claim — tertiary per token
   rule, same sanction as the hero eyebrow accent. */
.hero-copy .hero-x { color: var(--orange); }
.hero-sectors {
  margin-top: var(--s-3);
  font-size: 0.9375rem;
  color: var(--inv-fg-muted);
  margin-inline: auto;
  text-align: center;
}
.hero-copy .lead {
  margin-bottom: var(--s-4);
  max-width: 52ch;
  font-family: var(--font-display);
  font-size: var(--step-h3);
  font-weight: 600;
  line-height: 1.25;
  color: var(--inv-fg);
  text-wrap: balance;
}
.hero-copy .sub { color: var(--inv-fg-muted); max-width: 52ch; }
/* Accent pass: hero eyebrow turns tertiary (orange) on navy. Both lines
   stay white; the orange `.hero-x` is the owner-sanctioned exception. */
.hero-copy.is-accent .eyebrow { color: var(--orange); }
.hero-copy.is-accent .eyebrow::before { background: color-mix(in srgb, var(--orange) 65%, transparent); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center; /* centered hero (V23) */
  gap: var(--s-4);
  /* Now the LAST element of the copy (owner: CTA closes the text instead of
     being sandwiched by the audience/sector lines) — earns a fuller beat.
     Clamped on viewport HEIGHT (guardian AMBER fix): full 48px on tall
     screens, compresses toward 32px on short laptops so the CTA clears the
     fold instead of being the thing that pushes past it. */
  margin-top: clamp(var(--s-6), 5svh, var(--s-7));
}
.hero-audience {
  margin-top: var(--s-5);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--inv-fg-muted);
  /* Owner spotted this line reading off-center live. Two causes, both fixed
     here: `p`'s global 65ch cap left the block narrower than the copy column
     without an auto margin, and letter-spacing adds a trailing gap after the
     last glyph that shifts centered text left by half a space. */
  max-width: 100%;
  margin-inline: auto;
  text-align: center;
  text-wrap: balance;
  text-indent: 0.08em;
}

@media (max-width: 900px) {
  .hero {
    min-height: calc(100vh - var(--nav-h));
    min-height: calc(100svh - var(--nav-h));
  }
  .hero-audience {
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
  }
}

/* ---------- Landscape phones : the fold is ~320px tall ----------
   The hero stood 371px on a 390px-tall window, which put the one CTA on the
   page 34px below the fold — the first screen showed a claim and no way to
   act on it. Trimming the vertical rhythm (not the type) brings the button
   back above the line without touching any other size. */
@media (max-height: 520px) {
  .hero { padding-block: clamp(10px, 2.5svh, 48px); }
  .hero-copy .eyebrow { margin-bottom: var(--s-3); }
  .hero-copy .lead { margin-bottom: var(--s-2); }
  .hero-audience { margin-top: var(--s-3); }
  .hero-sectors { margin-top: var(--s-2); }
  .hero-actions { margin-top: clamp(var(--s-4), 4svh, var(--s-7)); }
}

/* ---------- Positioning band with flow diagram ---------- */
.band-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.band-copy h2 { margin-bottom: var(--s-6); }
.band-copy p + p { margin-top: var(--s-3); }
.band-visual .flow-svg { max-width: 440px; margin-inline: auto; }
@media (max-width: 900px) {
  .band-grid { grid-template-columns: 1fr; }
  .band-visual { max-width: 480px; }
}

/* ---------- Flow diagram (SVG) ---------- */
.flow-svg {
  width: 100%;
  height: auto;
}
/* Below the fold now: hold the draw animation until the reveal observer fires */
html.js .reveal:not(.is-visible) .flow-svg * { animation-play-state: paused; }
.flow-svg .f-line {
  stroke: var(--teal);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: flow-draw 900ms var(--ease-out) forwards;
}
.flow-svg .f-node {
  fill: var(--white);
  stroke: var(--border-strong);
  stroke-width: 1;
  opacity: 0;
  animation: flow-in 500ms var(--ease-out) forwards;
}
.flow-svg .f-node--human {
  stroke: var(--navy);
  stroke-width: 1.5;
}
.flow-svg .f-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  fill: var(--navy);
  opacity: 0;
  animation: flow-in 500ms var(--ease-out) forwards;
}
.flow-svg .f-sublabel { fill: var(--teal); font-size: 9px; }
.flow-svg .f-dot {
  fill: var(--teal);
  opacity: 0;
  animation: flow-in 500ms var(--ease-out) forwards;
}
.flow-svg .f-signal {
  /* orange marks measurable value — the KPI signal is the diagram's payoff */
  fill: var(--orange);
  opacity: 0;
  animation: flow-in 500ms var(--ease-out) forwards, breathe 4.5s ease-in-out 2.4s infinite;
}
/* stagger */
.flow-svg [data-step="1"] { animation-delay: 100ms; }
.flow-svg [data-step="2"] { animation-delay: 420ms; }
.flow-svg [data-step="3"] { animation-delay: 740ms; }
.flow-svg [data-step="4"] { animation-delay: 1060ms; }
.flow-svg [data-step="5"] { animation-delay: 1380ms; }
.flow-svg [data-step="6"] { animation-delay: 1700ms; }
.flow-svg .f-signal[data-step="6"] { animation-delay: 1700ms, 2400ms; }

@keyframes flow-draw { to { stroke-dashoffset: 0; } }
@keyframes flow-in { to { opacity: 1; } }
@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
  .flow-svg .f-line { stroke-dashoffset: 0; animation: none; }
  .flow-svg .f-node, .flow-svg .f-label, .flow-svg .f-dot, .flow-svg .f-signal {
    opacity: 1; animation: none;
  }
}

/* ---------- Positioning band tool nodes ---------- */
.tool-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}
.tool-nodes .node {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-btn);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.tool-nodes .node::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
}
.on-dark .tool-nodes .node {
  border-color: var(--inv-border);
  color: var(--inv-fg-muted);
}
.on-dark .tool-nodes .node::before { background: var(--teal-bright); }

/* ---------- Split (two transformations) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--white);
}
.split > div { padding: clamp(24px, 4vw, 48px); }
.split > div + div { border-left: 1px solid var(--border); }
.split .mono { color: var(--teal); display: block; margin-bottom: var(--s-4); }
.split h3 { margin-bottom: var(--s-4); }
@media (max-width: 767px) {
  .split { grid-template-columns: 1fr; }
  .split > div + div { border-left: none; border-top: 1px solid var(--border); }
}

/* ---------- SCALED pillars teaser (Home) ---------- */
.scaled-teaser { margin-top: var(--s-7); }
.scaled-pillars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.pillar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: var(--s-4) var(--s-3) var(--s-5);
  text-align: center;
  position: relative;
  text-decoration: none;
  transition: transform var(--t-ui) var(--ease-out), border-color var(--t-ui) var(--ease-out);
}
.pillar:hover { border-color: var(--teal); }
/* Lift is motion — fine pointers only (touch leaves :hover stuck after a tap).
   The teal border stays ungated as the touch affordance. */
@media (hover: hover) and (pointer: fine) {
  .pillar:hover { transform: translateY(-2px); }
}
/* base.css zeroes the duration but a 0ms transform still applies — drop the
   position change outright, keep the border as the affordance. */
@media (prefers-reduced-motion: reduce) {
  .pillar:hover { transform: none !important; }
}
.pillar .letter {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--navy);
  display: block;
}
.pillar .name {
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}
.pillar::after {
  /* connector to foundation */
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(-1 * var(--s-3) - 1px);
  width: 1px;
  height: var(--s-3);
  background: var(--border-strong);
}
@media (max-width: 640px) {
  .scaled-pillars { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .pillar { padding: var(--s-3) 4px var(--s-4); }
  .pillar .name { display: none; }
}

/* ---------- SCALED loop (Method page centerpiece) ---------- */
.scaled-loop-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
@media (max-width: 900px) {
  .scaled-loop-wrap { grid-template-columns: 1fr; }
  .scaled-loop-svg { max-width: 440px; margin-inline: auto; }
}
.scaled-loop-svg { width: 100%; height: auto; }
.scaled-loop-svg .ring {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1;
  stroke-dasharray: 4 6;
}
.scaled-loop-svg .loop-arc {
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.5;
}
.scaled-loop-svg .loop-node {
  fill: var(--white);
  stroke: var(--navy);
  stroke-width: 1.25;
}
.scaled-loop-svg .loop-letter {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  fill: var(--navy);
  text-anchor: middle;
  dominant-baseline: central;
}
.scaled-loop-svg .loop-name {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  fill: var(--teal);
  text-anchor: middle;
  text-transform: uppercase;
}
.scaled-loop-svg .defend-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  fill: var(--navy);
}
.scaled-loop-svg .entry-arrow {
  /* entry arrows stay navy — no orange inside diagrams (orange rule) */
  stroke: var(--navy);
  stroke-width: 1.5;
  fill: none;
}
.scaled-loop-svg .entry-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  fill: var(--navy);
}

/* These sizes are SVG USER UNITS inside a 460-wide viewBox, so they shrink
   with the drawing. At 1280px the diagram renders 504px wide (1.1×) and the
   labels read at 12–13px; on a 320px phone it renders 280px wide (0.61×) and
   the same declarations came out at 6.7px — legible to nobody. Each step
   below restores roughly 12px of rendered type. */
@media (max-width: 900px) {
  .scaled-loop-svg .loop-name { font-size: 13px; }
  .scaled-loop-svg .entry-label { font-size: 12px; }
  .scaled-loop-svg .defend-label { font-size: 11px; }
}
@media (max-width: 640px) {
  .scaled-loop-svg .loop-name { font-size: 17px; }
  .scaled-loop-svg .entry-label { font-size: 16px; }
  .scaled-loop-svg .defend-label { font-size: 14px; }
  .scaled-loop-svg .loop-letter { font-size: 26px; }
}
@media (max-width: 400px) {
  .scaled-loop-svg .loop-name { font-size: 19px; }
  .scaled-loop-svg .entry-label { font-size: 17px; }
  .scaled-loop-svg .defend-label { font-size: 16px; }
  .scaled-loop-svg .loop-letter { font-size: 30px; }
}

/* On navy: dashed ring, entry arrows/labels and Defend's outer label
   would vanish (they're navy-on-navy by default) — flip to paper. The
   node/letter/arc stay as-is, already legible on a dark backdrop. */
.on-dark .scaled-loop-svg .ring { stroke: var(--inv-border); }
.on-dark .scaled-loop-svg .loop-arc { stroke: var(--teal-bright); }
.on-dark .scaled-loop-svg .loop-name { fill: var(--teal-bright); }
.on-dark .scaled-loop-svg .defend-label { fill: var(--paper); }
.on-dark .scaled-loop-svg .entry-arrow { stroke: var(--paper); }
.on-dark .scaled-loop-svg .entry-label { fill: var(--paper); }

/* ---------- Phase detail (Method page letters) ---------- */
.phase {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 64px);
  padding-block: var(--s-8);
  border-top: 1px solid var(--border);
}
.phase-id .phase-letter {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(4rem, 8vw, 7rem);
  line-height: 1;
  color: var(--navy);
  display: block;
}
.phase-id .phase-letter em {
  font-style: normal;
  color: var(--teal);
}
.phase-id .mono { color: var(--teal); display: block; margin: var(--s-3) 0; }
.phase-id h3 { max-width: 16ch; }
.phase-body p + p { margin-top: var(--s-3); }
.phase-body h4 { margin: var(--s-6) 0 var(--s-3); }
.phase-body .deliv {
  margin-top: var(--s-6);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--s-5);
}
.phase-body .deliv .mono { color: var(--teal); display: block; margin-bottom: var(--s-4); }
.phase--defend {
  border-top: 2px solid var(--navy);
  background: var(--paper-2);
  border-radius: var(--radius-card);
  padding-inline: clamp(20px, 3vw, 48px);
  margin-top: var(--s-6);
}
@media (max-width: 767px) {
  .phase { grid-template-columns: 1fr; }
}

/* ---------- Value formula — plain-language breakdown, not pseudo-code ---------- */
.value-formula {
  background: var(--navy);
  color: var(--inv-fg);
  border-radius: var(--radius-card);
  padding: clamp(28px, 4vw, 48px);
}
.value-formula .vf-result {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-h3);
  color: var(--orange);
}
.value-formula .vf-terms {
  margin-top: var(--s-5);
  border-top: 1px solid var(--inv-border);
}
.value-formula .vf-terms li {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--inv-border);
  font-size: var(--step-lead);
}
.value-formula .vf-op {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--teal-bright);
  min-width: 1em;
  flex-shrink: 0;
}
.value-formula .vf-note {
  margin-top: var(--s-5);
  max-width: none;
  font-size: var(--step-small);
  color: var(--inv-fg-muted);
}

/* ---------- Path cards (framework adaptatif) ---------- */
.path-card { display: flex; flex-direction: column; gap: var(--s-4); }
.path-card .seq { margin-bottom: var(--s-2); }
.path-card h3 { font-size: var(--step-h4); }
.path-card p { font-size: var(--step-small); color: var(--fg-muted); }

/* ---------- Metrics grid ----------
   The home #resultats KPI rows were reskinned into animated bento tiles;
   their styles live in css/results-tiles.css. The old .metric component
   had no other consumer across the site, so it was removed here. */

/* ---------- Team ---------- */
.team-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
/* V14: card sits on .on-dark so :is(.on-dark) h3 goes white on a white card
   (Anthony/Florent were invisible). Names in primary teal so they read on
   the white card while still feeling tied to the navy band behind it. */
.on-dark .team-card h3 { color: var(--teal); }
.team-card .avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  margin-bottom: var(--s-2);
}
.team-card .role {
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ---------- Engagement cards ---------- */
.engage-card {
  display: flex;
  flex-direction: column;
}
.engage-card .mono { color: var(--teal); display: block; margin-bottom: var(--s-3); }
/* Situation kicker above the offer name — the "hey, it's me" line. Display
   face at body size so it reads as the card's hook without competing
   with the h3 underneath. */
.engage-card .engage-situation {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.4;
  color: var(--fg-strong);
  margin-bottom: var(--s-2);
}
.engage-card .engage-for {
  color: var(--fg-muted);
  margin-bottom: var(--s-4);
}
.engage-card .check-list { margin-bottom: var(--s-5); }
.engage-card .link { margin-top: auto; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  position: relative;
  padding-block: clamp(56px, 8vw, 112px) clamp(40px, 6vw, 80px);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
/* Lattice canvas (hero-network.js) sits behind the copy on interior page heroes,
   matching the home hero. Readability wash keeps left-aligned copy legible. */
.page-hero .hero-canvas { z-index: 0; }
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg,
    rgba(18, 60, 74, 0.92) 0%,
    rgba(18, 60, 74, 0.55) 48%,
    rgba(18, 60, 74, 0) 80%);
  pointer-events: none;
}
.page-hero > .container { position: relative; z-index: 1; }
/* Page label reads as the section's heading context — needs more weight than a body eyebrow */
.page-hero .eyebrow {
  font-size: 0.9375rem;
  color: var(--orange);
}
.page-hero .eyebrow::before { background: color-mix(in srgb, var(--orange) 65%, transparent); }
.page-hero h1 { max-width: 22ch; margin-bottom: var(--s-5); }
.page-hero .lead { max-width: 56ch; }
.page-hero .hero-actions { margin-top: var(--s-6); }

/* ---------- Before/after strip ---------- */
.before-after {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--s-5);
  align-items: stretch;
}
.before-after .ba-col {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--s-5);
}
.before-after .ba-col .mono { display: block; margin-bottom: var(--s-4); color: var(--fg-muted); }
.before-after .ba-col--after .mono { color: var(--teal); }
.before-after .ba-arrow {
  display: flex;
  align-items: center;
  color: var(--teal);
  font-size: 1.25rem;
}
.before-after ul li {
  padding-block: var(--s-2);
  border-bottom: 1px solid var(--border);
  font-size: var(--step-body);
}
.before-after ul li:last-child { border-bottom: none; }
@media (max-width: 767px) {
  .before-after { grid-template-columns: 1fr; }
  .before-after .ba-arrow { transform: rotate(90deg); justify-content: center; }
}

/* ---------- Sticky page CTA rail (mobile) ---------- */
@media (max-width: 640px) {
  .hero-actions .btn, .cta-band .btn { width: 100%; justify-content: center; }
}
