/* ATELIER-V1 — matière claire, explosé SVG */
:root {
  --ink-rgb: 28, 22, 18;
  --bg: #f3ebe2;
  --ink: #1c1612;
  --muted: #6e6258;
  --surface: #fffaf5;
  --line: rgba(var(--ink-rgb), 0.12);
  --accent: #3f6b4a;
  --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, 4vw, 64px);
  --t-xl: clamp(44px, 8vw, 120px);
  --t-l: clamp(30px, 4.2vw, 62px);
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-inout: cubic-bezier(0.77, 0, 0.175, 1);
}
html[data-theme="dark"] {
  --ink-rgb: 243, 235, 226;
  --bg: #161210; --ink: #f3ebe2; --muted: #a89888;
  --surface: #211c18; --line: rgba(var(--ink-rgb), 0.12);
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 18px; line-height: 1.35;
  -webkit-font-smoothing: antialiased; 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.06em; text-transform: uppercase; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 300; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; }
.skip:focus { left: 12px; }

.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: 20px; }
.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(0 0 100% 0); }

.scene { position: relative; height: calc(var(--len, 2) * 100vh); }
.sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.rv { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
.rv.in { opacity: 1; transform: none; }

.at-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px var(--gutter); transform: translateY(-100%);
  transition: transform .6s var(--ease-out), background .35s;
}
body.is-ready .at-bar { transform: none; }
body.is-scrolled .at-bar { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
.at-wordmark { font-size: 20px; font-weight: 500; }
.at-nav { display: flex; gap: 26px; }
.at-cta { background: var(--accent); color: var(--accent-ink); padding: 11px 18px; border-radius: 999px; }

.at-hero .sticky {
  display: grid; grid-template-columns: 1fr 1fr 1fr; background: var(--bg);
}
.at-hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 10vh var(--gutter); z-index: 2; }
.at-title { font-size: var(--t-xl); line-height: 0.96; letter-spacing: -0.04em; margin: 18px 0; }
.at-title span { display: block; }
/* Accent texte : jamais trop pâle sur fond clair (contraste AA). */
.at-title em {
  font-style: normal;
  color: color-mix(in srgb, var(--accent) 72%, var(--ink) 28%);
}
body:not(.static) .at-title span { opacity: 0; transform: translateY(36%); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
body.is-ready .at-title span { opacity: 1; transform: none; }
body.is-ready .at-title span:nth-child(2) { transition-delay: .1s; }
.at-pos { color: var(--muted); max-width: 24ch; }
.at-explode {
  display: grid; place-items: center; position: relative;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  color: var(--accent);
}
.at-svg { width: min(70%, 280px); overflow: visible; }
.at-part { transform: translate(0, 0); will-change: transform; }
.at-mat-tags {
  position: absolute; inset: 18% 12%;
  display: flex; flex-direction: column; justify-content: space-between; pointer-events: none;
}
.at-mat-tags li { opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s; }
.at-mat-tags li.on { opacity: 1; transform: none; }
.at-mat-tags li:nth-child(2) { align-self: flex-end; }
.at-hero-photo { overflow: hidden; }
.at-hero-photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }

.at-manifesto .sticky { display: flex; align-items: center; padding: 0 var(--gutter); background: var(--surface); }
.at-man-text { font-size: clamp(28px, 4.2vw, 52px); letter-spacing: -0.03em; line-height: 1.18; max-width: 18ch; }
.at-mark { box-shadow: inset 0 -0.35em 0 color-mix(in srgb, var(--accent) 40%, transparent); }

.at-proof { padding: 16vh var(--gutter) 12vh; }
.at-head { margin-bottom: 40px; }
.at-h2 { font-size: var(--t-l); letter-spacing: -0.03em; margin: 10px 0; }
.at-sub { color: var(--muted); max-width: 40ch; }
.at-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.at-card-img { overflow: hidden; aspect-ratio: 4/5; background: var(--surface); }
.at-card:nth-child(3n) .at-card-img { aspect-ratio: 5/4; }
.at-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.at-card:hover img { transform: scale(1.04); }
.at-card figcaption { display: flex; justify-content: space-between; gap: 8px; padding: 10px 2px 0; font-size: 14px; }
.at-bento { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 14px; }
.at-big { grid-column: span 2; }
.at-tall { grid-row: span 2; }
.at-tile { background: var(--surface); border: 1px solid var(--line); }
.at-tile-img { aspect-ratio: 3/2; overflow: hidden; }
.at-tall .at-tile-img { aspect-ratio: 3/4; height: calc(100% - 70px); }
.at-tile-img img { width: 100%; height: 100%; object-fit: cover; }
.at-tile figcaption { padding: 12px; display: flex; flex-direction: column; gap: 4px; }

.at-motto .sticky { display: flex; flex-direction: column; justify-content: center; padding: 0 var(--gutter); background: var(--bg); }
.at-words { display: grid; gap: 28px; margin-top: 36px; }
.at-mw { opacity: .2; transform: translateX(-10px); transition: opacity .45s, transform .45s; }
.at-mw.on { opacity: 1; transform: none; }
.at-mw-word { font-size: clamp(40px, 6vw, 84px); letter-spacing: -0.04em; line-height: 1; }

.at-intro { padding: 14vh var(--gutter) 5vh; }
.at-intro-line { font-size: var(--t-l); letter-spacing: -0.03em; margin-bottom: 24px; }
.at-accent { color: var(--accent); }
.at-band { overflow: hidden; max-height: 42vh; }
.at-band img { width: 100%; height: 100%; object-fit: cover; }

.at-steps .sticky { padding: 12vh var(--gutter); background: var(--surface); }
.at-step-list { position: relative; min-height: 36vh; max-width: 28rem; }
.at-step { position: absolute; inset: 0 auto auto 0; opacity: 0; visibility: hidden; max-width: 28rem; }
.at-step h3 { font-size: clamp(34px, 5vw, 64px); letter-spacing: -0.035em; margin: 8px 0 12px; }
.at-step p { color: var(--muted); max-width: 32ch; }
.at-step-rail { height: 2px; background: var(--line); margin-top: 48px; overflow: hidden; }
.at-step-rail i { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.at-step-cta { display: inline-flex; margin-top: 22px; border: 1px solid var(--line); padding: 12px 18px; border-radius: 999px; opacity: 0; pointer-events: none; }

.at-quote { padding: 16vh var(--gutter); border-top: 1px solid var(--line); }
.at-q { font-size: clamp(26px, 3.6vw, 46px); letter-spacing: -0.03em; max-width: 16ch; margin-bottom: 28px; }
.at-sign { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: baseline; }
.at-fig { font-size: clamp(44px, 6vw, 88px); letter-spacing: -0.04em; color: var(--accent); line-height: 1; }
.at-fig-unit { font-size: .35em; color: var(--muted); margin-left: .1em; }

.at-obj .sticky { display: flex; flex-direction: column; justify-content: center; padding: 0 var(--gutter); }
.at-obj-list { display: grid; gap: 12px; margin-bottom: 32px; }
.at-obj-list li { font-size: clamp(22px, 3vw, 38px); letter-spacing: -0.025em; opacity: 0; transform: translateY(12px); }
.at-finale { font-size: clamp(28px, 4vw, 52px); opacity: 0; }
.at-pill { display: inline-block; padding: .05em .35em; background: var(--accent); color: var(--accent-ink); border-radius: 999px; }

.at-footer { padding: 14vh var(--gutter) 40px; border-top: 1px solid var(--line); }
.at-mail { display: inline-block; margin: 14px 0; font-size: clamp(28px, 5vw, 64px); letter-spacing: -0.035em; border-bottom: 1px solid var(--line); }
.at-mail:hover { border-color: var(--accent); color: var(--accent); }
.at-book { display: inline-flex; margin: 20px 0 36px; padding: 12px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.at-giant { font-size: clamp(36px, 9vw, 120px); letter-spacing: -0.05em; color: color-mix(in srgb, var(--ink) 14%, transparent); margin: 6vh 0; white-space: nowrap; overflow: hidden; }
.at-bottom { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 20px; }
.at-bottom a { margin-right: 12px; }

@media (max-width: 960px) {
  .at-hero .sticky { grid-template-columns: 1fr; }
  .at-explode { min-height: 40vh; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .at-hero-photo { min-height: 40vh; }
  .at-nav { display: none; }
  .at-grid, .at-bento { grid-template-columns: 1fr 1fr; }
  .at-big, .at-tall { grid-column: span 1; grid-row: span 1; }
}
@media (max-width: 520px) { .at-grid, .at-bento { grid-template-columns: 1fr; } }

body.static .at-part { transform: none !important; }
body.static .at-mw, body.static .at-obj-list li, body.static .at-finale, body.static .at-step-cta, body.static .at-mat-tags li { opacity: 1; transform: none; pointer-events: auto; }
body.static .at-step { position: relative; opacity: 1; visibility: visible; margin-bottom: 24px; }
body.static .at-step-rail i { transform: none; }
