/* ═══════════════════════════════════════════════════════════
   GALERIE-V1 — feuille de style canonique
   NE PAS MODIFIER en dehors des tokens :root (écrits par bake.mjs).
   Sombre par défaut ; <html data-theme="light"> pour la variante claire.
   Accent : --accent / --accent-ink.
   ═══════════════════════════════════════════════════════════ */

:root {
  --ink-rgb: 238, 236, 230;
  --bg: #0d0d0c;
  --ink: #eeece6;
  --muted: #8f8e88;
  --surface: #171716;
  --line: rgba(var(--ink-rgb), 0.14);

  --accent: #f1e2b8;
  --accent-ink: #1a1915;

  --sans: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(20px, 3.6vw, 56px);
  --t-xl: clamp(46px, 9vw, 160px);
  --t-l: clamp(30px, 4.2vw, 66px);
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-inout: cubic-bezier(0.77, 0, 0.175, 1);
}
html[data-theme="light"] {
  --ink-rgb: 20, 20, 18;
  --bg: #f3f2ee;
  --ink: #141412;
  --muted: #64676c;
  --surface: #e9e8e3;
  --line: rgba(var(--ink-rgb), 0.14);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 19px; line-height: 1.35;
  letter-spacing: -0.008em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; }
h1, h2, h3 { font-weight: 400; }
mark { background: none; color: inherit; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.45; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 300; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 999px; }
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ═══ LOADER (si-core) ═══ */
.si-loader {
  position: fixed; inset: 0; z-index: 400;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--bg);
  transition: clip-path .9s var(--ease-inout);
  clip-path: inset(0 0 0 0);
}
.si-loader p { font-size: 22px; font-weight: 500; }
.si-loader span { width: 120px; height: 1px; background: var(--line); overflow: hidden; }
.si-loader i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease-out); }
.si-loader.run i { transform: scaleX(1); }
.si-loader.out { clip-path: inset(100% 0 0 0); }

/* ═══ SCÈNES (sticky natif) ═══ */
.scene { position: relative; height: calc(var(--len, 2) * 100vh); }
.sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

/* ═══ RÉVÉLATIONS ═══ */
.rv { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.rv.in { opacity: 1; transform: none; }

/* ═══ BARRE : texte en « différence » (lisible sur photo, accent ou fond),
   la pastille CTA est un calque fixe à part pour garder ses couleurs ═══ */
.ga-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 28px;
  padding: 18px var(--gutter);
  color: #fff; mix-blend-mode: difference;
  transition: transform .6s var(--ease-out);
  transform: translateY(-100%);
  pointer-events: none;
}
.ga-bar a { pointer-events: auto; }
body.is-ready .ga-bar, body.is-ready .ga-cta { transform: none; }
.ga-wordmark { font-size: 20px; font-weight: 500; white-space: nowrap; }
.ga-nav { display: flex; gap: 28px; margin: 0 auto; padding-right: 120px; }
.ga-nav a { position: relative; }
.ga-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease-inout); }
.ga-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.ga-cta {
  position: fixed; top: 13px; right: var(--gutter); z-index: 101;
  background: var(--accent); color: var(--accent-ink); padding: 11px 18px; border-radius: 999px; white-space: nowrap;
  transform: translateY(-160%); transition: transform .6s var(--ease-out);
}
body.is-ready .ga-cta:hover { transform: translateY(-2px); }
body.on-accent .ga-cta { background: var(--accent-ink); color: var(--accent); }
.ga-cta { transition: transform .6s var(--ease-out), background .3s, color .3s; }

/* ═══ HERO ═══ */
.ga-hero .sticky { background: var(--bg); }
.ga-hero-frame { position: absolute; inset: 0; overflow: hidden; will-change: clip-path; }
.ga-hero-frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.14); will-change: transform; }
.ga-hero-frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .62), rgba(0, 0, 0, .08) 55%, rgba(0, 0, 0, .3)); pointer-events: none; }
.ga-hero-copy {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 8vh; z-index: 2;
  color: #fff;
}
.ga-kicker { margin-bottom: 22px; opacity: .85; }
.ga-title { font-size: var(--t-xl); line-height: .94; letter-spacing: -0.04em; max-width: 11em; }
.ga-title span { display: block; }
body:not(.static) .ga-title span { opacity: 0; transform: translateY(35%); transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out); }
body.is-ready .ga-title span { opacity: 1; transform: none; }
body.is-ready .ga-title .ga-l2 { transition-delay: .14s; }
.ga-pos {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: min(16em, 80vw);
  margin: 0; translate: -50% -50%;
  color: #fff; text-align: center; font-size: var(--t-l); letter-spacing: -0.03em; line-height: 1.04;
  opacity: 0; text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}

/* ═══ MANIFESTE ═══ */
.ga-manifesto { padding: 26vh var(--gutter); display: flex; justify-content: center; }
.ga-man-text { font-size: clamp(30px, 4.4vw, 70px); line-height: 1.1; letter-spacing: -0.028em; max-width: 18em; text-align: center; }
.ga-mark {
  font-style: italic; color: var(--accent);
  background: linear-gradient(currentColor, currentColor) no-repeat 0 96% / 0 .05em;
  transition: background-size 1.4s var(--ease-inout) .6s;
}
.ga-man-text.in .ga-mark { background-size: 100% .05em; }
html[data-theme="light"] .ga-mark { color: var(--ink); background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 .36em; background-position: 0 86%; }
html[data-theme="light"] .ga-man-text.in .ga-mark { background-size: 100% .36em; }

/* ═══ PREUVE : galerie horizontale ═══ */
.ga-proof .sticky { display: flex; align-items: center; }
.ga-track {
  display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px);
  padding: 0 var(--gutter); will-change: transform;
}
.ga-head { flex: 0 0 auto; width: min(420px, 78vw); display: flex; flex-direction: column; gap: 16px; padding-right: 3vw; }
.ga-h2 { font-size: var(--t-l); letter-spacing: -0.035em; line-height: .98; }
.ga-sub { color: var(--muted); }
.ga-card { flex: 0 0 auto; margin: 0; }
.ga-card-img { height: 60vh; height: 60svh; border-radius: 6px; overflow: hidden; background: var(--surface); }
.ga-card-img img { height: 100%; width: auto; max-width: none; transform: scale(1.12); will-change: transform; }
.ga-card-big .ga-card-img img, .ga-card-tall .ga-card-img img { object-fit: cover; }
.ga-card figcaption { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; padding-top: 14px; }
.ga-card figcaption .mono:last-child { grid-column: 2; }
.ga-card-title { font-size: 21px; letter-spacing: -0.015em; }
.ga-progress {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 6vh;
  display: flex; align-items: center; gap: 22px;
}
.ga-count b { font-weight: 500; color: var(--ink); }
.ga-bar-line { flex: 1; height: 1px; background: var(--line); overflow: hidden; }
.ga-bar-line i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
html[data-theme="light"] .ga-bar-line i { background: var(--ink); }

/* ═══ DEVISE ═══ */
.ga-motto { background: var(--accent); color: var(--accent-ink); }
.ga-motto .sticky { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 var(--gutter); }
.ga-motto-kicker { margin-bottom: 3vh; opacity: .7; }
.ga-roll-win { font-size: clamp(64px, 17vw, 300px); line-height: 1.16; height: 1.16em; overflow: hidden; letter-spacing: -0.05em; }
.ga-roll { will-change: transform; }
.ga-roll p { height: 1.16em; white-space: nowrap; }
.ga-hint-win { position: relative; margin-top: 4vh; width: min(30em, 86vw); height: 4.5em; }
.ga-hint-roll p { position: absolute; left: 0; right: 0; top: 0; font-size: 13px; opacity: 0; transform: translateY(10px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }
.ga-hint-roll p.on { opacity: 1; transform: none; }

/* ═══ PROCESSUS ═══ */
.ga-process .sticky { color: #fff; }
.ga-proc-bg { position: absolute; inset: 0; margin: 0; overflow: hidden; }
.ga-proc-bg img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.ga-proc-bg::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, var(--dim, .25)); }
.ga-proc-intro {
  position: absolute; left: var(--gutter); right: var(--gutter); top: 50%; translate: 0 -50%; z-index: 2;
  font-size: var(--t-xl); letter-spacing: -0.045em; line-height: .94; text-align: center;
  text-shadow: 0 2px 40px rgba(0, 0, 0, .3);
}
.ga-proc-intro span { display: inline-block; }
.ga-proc-intro span:last-child { color: var(--accent); }
.ga-proc-steps { position: absolute; inset: 0; z-index: 2; }
.ga-step {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: min(620px, calc(100vw - 2 * var(--gutter)));
  padding: clamp(26px, 3.4vw, 46px);
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(14, 14, 13, .42);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  opacity: 0; visibility: hidden;
}
.ga-step-n { position: absolute; right: clamp(22px, 3vw, 40px); top: clamp(16px, 2.4vw, 30px); font-size: clamp(60px, 7vw, 110px); line-height: 1; letter-spacing: -0.05em; font-weight: 300; color: var(--accent); }
.ga-step-meta { opacity: .75; }
.ga-step h3 { font-size: clamp(30px, 3.6vw, 54px); letter-spacing: -0.03em; line-height: 1.02; margin: 16px 0 14px; max-width: 8em; }
.ga-step p { color: rgba(255, 255, 255, .78); max-width: 28em; }
.ga-proc-cta {
  position: absolute; left: 50%; bottom: 9vh; z-index: 3;
  background: var(--accent); color: var(--accent-ink);
  font-size: 22px; padding: 16px 28px; border-radius: 999px; white-space: nowrap; opacity: 0;
  transform: translate3d(-50%, 20px, 0);
}

/* ═══ TÉMOIGNAGE ═══ */
.ga-quote { padding: 24vh var(--gutter); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4vh; }
.ga-q p { font-size: clamp(28px, 3.8vw, 60px); letter-spacing: -0.027em; line-height: 1.1; max-width: 20em; }
.ga-q p::before { content: '« '; color: var(--accent); }
.ga-q p::after { content: ' »'; color: var(--accent); }
html[data-theme="light"] .ga-q p::before, html[data-theme="light"] .ga-q p::after { color: var(--muted); }
.ga-author { font-size: 13px; }
.ga-fig { font-size: clamp(64px, 9vw, 150px); letter-spacing: -0.05em; line-height: 1; font-weight: 300; }
.ga-fig-unit { font-size: .34em; margin-left: .14em; letter-spacing: 0; color: var(--muted); }

/* ═══ OBJECTIONS ═══ */
.ga-obj { padding: 18vh var(--gutter) 22vh; border-top: 1px solid var(--line); }
.ga-obj ul { margin-bottom: 6vh; }
.ga-obj li { font-size: clamp(34px, 5.8vw, 98px); letter-spacing: -0.04em; line-height: 1.04; color: var(--muted); }
.ga-obj li span {
  background: linear-gradient(currentColor, currentColor) no-repeat 0 56% / 0 .06em;
  transition: background-size .9s var(--ease-inout); transition-delay: calc(.5s + var(--i, 0) * 120ms);
}
.ga-obj li.in span { background-size: 100% .06em; }
.ga-finale { font-size: clamp(34px, 5.8vw, 98px); letter-spacing: -0.04em; line-height: 1.04; }
.ga-pill { display: inline-block; padding: 0 .32em; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }

/* ═══ FOOTER ═══ */
.ga-footer { padding: 20vh var(--gutter) 40px; text-align: center; background: var(--surface); }
.ga-mail { display: inline-block; margin: 22px 0 18px; font-size: var(--t-l); letter-spacing: -0.03em; border-bottom: 1px solid var(--line); transition: border-color .4s, color .4s; }
.ga-mail:hover { border-color: var(--accent); color: var(--accent); }
html[data-theme="light"] .ga-mail:hover { color: var(--ink); }
.ga-book { display: inline-block; margin-top: 26px; background: var(--accent); color: var(--accent-ink); padding: 14px 22px; border-radius: 999px; }
.ga-giant { margin-top: 12vh; font-size: clamp(56px, 16vw, 290px); letter-spacing: -0.055em; line-height: .9; white-space: nowrap; overflow: hidden; color: rgba(var(--ink-rgb), .9); }
.ga-bottom { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; text-align: left; }
.ga-bottom a { margin: 0 8px; }

/* ═══ MODE STATIQUE (prefers-reduced-motion) ═══ */
body.static .scene { height: auto; }
body.static .sticky { position: relative; height: auto; overflow: visible; }
body.static .ga-hero-frame { position: relative; height: 100vh; clip-path: none !important; }
body.static .ga-hero-frame img { transform: none !important; }
body.static .ga-hero-copy { top: 0; bottom: auto; height: 100vh; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 8vh; opacity: 1 !important; transform: none !important; }
body.static .ga-pos { position: relative; left: auto; top: auto; translate: none; width: auto; max-width: 18em; padding: 16vh var(--gutter) 0; opacity: 1 !important; transform: none !important; color: var(--ink); text-shadow: none; text-align: left; }
body.static .ga-proof .sticky { display: block; padding: 14vh 0; overflow-x: auto; }
body.static .ga-track { flex-wrap: wrap; align-items: flex-start; transform: none !important; }
body.static .ga-head { width: 100%; margin-bottom: 4vh; }
body.static .ga-card-img { height: 46vh; }
body.static .ga-card-img img { transform: none; }
body.static .ga-progress { display: none; }
body.static .ga-motto .sticky { padding: 16vh var(--gutter); }
body.static .ga-roll-win { height: auto; }
body.static .ga-roll { transform: none !important; }
body.static .ga-hint-win { height: auto; }
body.static .ga-hint-roll p { position: relative; opacity: 1; transform: none; margin-bottom: 8px; }
body.static .ga-process .sticky { padding: 16vh var(--gutter); }
body.static .ga-proc-intro { position: relative; top: auto; left: auto; right: auto; translate: none; opacity: 1 !important; transform: none !important; margin-bottom: 8vh; }
body.static .ga-proc-steps { position: relative; z-index: 2; display: grid; gap: 3vh; justify-items: center; }
body.static .ga-step { position: relative; left: auto; top: auto; translate: none; opacity: 1 !important; visibility: visible !important; transform: none !important; }
body.static .ga-proc-cta { position: relative; left: auto; bottom: auto; display: table; margin: 6vh auto 0; opacity: 1 !important; transform: none !important; pointer-events: auto !important; }
body.static .ga-proc-bg img { transform: none !important; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  body { font-size: 17px; }
  .ga-nav { display: none; }
  .ga-bar { padding: 14px 16px; }
  .ga-cta { top: 9px; right: 16px; }
  .ga-hero-copy { bottom: 10vh; }
  .ga-card-img { height: 50vh; height: 50svh; }
  .ga-head { width: 80vw; }
  .ga-step-n { position: static; display: block; font-size: 54px; margin-bottom: 8px; }
  .ga-step h3 { max-width: none; }
  .ga-proc-cta { font-size: 18px; }
  .ga-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .ga-cta { padding: 9px 14px; }
  .ga-wordmark { font-size: 17px; }
  .ga-card-img { height: 46vh; height: 46svh; }
  .ga-card-title { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
