/* ───────────── Tokens ───────────── */
:root {
  --plaster: #ECE6DB;
  --lime: #F7F4EE;
  --banco: #CDB89B;
  --laterite: #8E3B1D;
  --laterite-soft: #B4623F;
  --sage: #5D6A55;
  --ink: #2B201A;
  --ink-2: #5E5047;
  --line: rgba(43, 32, 26, 0.14);
  --glass: rgba(247, 244, 238, 0.62);

  --f-text: "Hanken Grotesk", system-ui, sans-serif;
  --f-accent: "Instrument Serif", Georgia, serif; /* italic, for signature moments */

  /* Type scale — perfect fourth, 1.333 */
  --t-sm: 0.875rem;
  --t-base: 1.0625rem;
  --t-md: 1.333rem;
  --t-lg: 1.777rem;
  --t-xl: clamp(2rem, 4.2vw, 3.16rem);
  --t-xxl: clamp(2.6rem, 7vw, 5.6rem);

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --press: 160ms;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font: 400 var(--t-base)/1.55 var(--f-text);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--laterite); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.accent { font-family: var(--f-accent); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

/* Pressable elements share one feedback rule */
.press { transition: transform var(--press) var(--ease-out); }
.press:active { transform: scale(0.97); }

h1, h2, h3 { margin: 0; font-weight: 500; }
h2 { font-size: var(--t-xl); line-height: 1.06; letter-spacing: -0.025em; max-width: 16ch; }
h3 { font-size: var(--t-md); line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; max-width: 60ch; }
.lede { font-size: var(--t-md); line-height: 1.45; color: var(--ink-2); max-width: 36ch; letter-spacing: -0.005em; }
.small { font-size: var(--t-sm); color: var(--ink-2); }

/* ───────────── Navigation : translucent material ───────────── */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.7rem var(--gutter);
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  mask-image: linear-gradient(#000 82%, transparent);
}
.bar__mark { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--laterite); font-size: 1.45rem; line-height: 1; white-space: nowrap; }
.bar__mark img { height: 1.6rem; width: auto; mix-blend-mode: multiply; }
.bar nav { display: flex; gap: 0.15rem; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.bar nav::-webkit-scrollbar { display: none; }
.bar nav a {
  font-size: var(--t-sm); color: var(--ink-2); text-decoration: none; white-space: nowrap;
  padding: 0.4rem 0.65rem; border-radius: 999px;
  transition: color 150ms ease, background-color 150ms ease;
}
.bar nav a span { color: var(--laterite-soft); margin-right: 0.35em; font-variant-numeric: tabular-nums; }
.bar nav a[aria-current="true"] { color: var(--ink); background: rgba(43, 32, 26, 0.07); }
@media (max-width: 1100px) { .bar nav a:not([aria-current="true"]) { display: none; } }

/* ───────────── Sections ───────────── */
section { position: relative; padding: clamp(5rem, 12vw, 9rem) var(--gutter); }
.chapter { display: block; font-size: var(--t-sm); color: var(--laterite); margin-bottom: 1.1rem; font-variant-numeric: tabular-nums; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.split > .copy { display: grid; gap: 1.4rem; align-content: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ───────────── Hero ───────────── */
.hero {
  min-height: 100svh; overflow: clip;
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center; gap: 2rem;
  padding-top: 6rem; padding-bottom: 3rem;
}
.hero__pattern { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero > div { position: relative; }
.hero__event { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 2rem; }
.hero__event img { height: 2.6rem; width: auto; mix-blend-mode: multiply; }
.hero__event p { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.35; }
.hero__event b { display: block; color: var(--ink); font-weight: 500; }
.hero h1 { font-size: var(--t-xxl); line-height: 0.98; letter-spacing: -0.035em; max-width: 11ch; }
.hero__sign {
  display: block; color: var(--laterite); white-space: nowrap;
  font-size: clamp(2.5rem, 5.4vw, 4.8rem); line-height: 1.02; margin-top: 0.12em;
  clip-path: inset(0 100% 0 0);
  animation: sign 1.4s var(--ease-in-out) 0.5s forwards;
}
@keyframes sign { to { clip-path: inset(0 0 0 0); } }
.hero__meta { display: grid; gap: 0.25rem; margin-top: 2rem; font-size: var(--t-sm); color: var(--ink-2); }
.hero__meta strong { color: var(--ink); font-weight: 500; }
.hero__stage { position: relative; height: min(84svh, 800px); touch-action: pan-y; cursor: grab; }
.hero__stage:active { cursor: grabbing; }
.hero__stage canvas { width: 100% !important; height: 100% !important; }
.floor-labels { position: absolute; inset: 0; pointer-events: none; }
.floor-label {
  position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer;
  display: flex; align-items: center; gap: 0.45rem; border: 0; background: transparent; padding: 0.2rem 0.3rem;
  font-size: 0.8rem; color: var(--ink-2); white-space: nowrap; will-change: transform;
  transition: color 150ms ease;
}
.floor-label::before { content: ""; width: 1.4rem; height: 1px; background: currentColor; opacity: 0.5; }
.floor-label span { color: var(--laterite-soft); font-variant-numeric: tabular-nums; }
.floor-label[data-on="true"] { color: var(--ink); }
.floor-label[data-on="true"]::before { opacity: 1; background: var(--laterite); }
.hero__hint {
  position: absolute; left: 50%; bottom: 0.5rem; transform: translateX(-50%);
  display: flex; gap: 0.5rem; align-items: center;
  padding: 0.35rem 0.4rem 0.35rem 0.9rem; border-radius: 999px;
  background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-size: var(--t-sm); color: var(--ink-2); white-space: nowrap;
}
.hero__hint button { border: 0; background: var(--lime); border-radius: 999px; width: 2rem; height: 2rem; cursor: pointer; display: grid; place-items: center; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 5.5rem; gap: 0; }
  .hero__stage { height: 64svh; }
  .hero__meta { margin-top: 1.4rem; }
  .hero__event img { display: none; }
  .floor-label { font-size: 0.7rem; }
}

/* ───────────── Intervenants ───────────── */
.speakers__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); margin-top: 3.5rem; perspective: 1400px; }
.spk { border: 0; padding: 0; background: none; text-align: left; cursor: pointer; display: grid; gap: 1rem; }
.spk__frame {
  position: relative; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; background: #3a3633;
  transform-style: preserve-3d; will-change: transform;
  box-shadow: 0 30px 60px -32px rgba(43, 32, 26, 0.55);
}
.spk__frame img, .spk__frame video { width: 100%; height: 100%; object-fit: cover; transform: translateZ(0) scale(1.06); }
.spk__badge {
  position: absolute; left: 0.8rem; top: 0.8rem; transform: translateZ(40px);
  font-size: 0.75rem; padding: 0.25rem 0.65rem; border-radius: 999px; background: var(--glass);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--ink);
}
.spk__open {
  position: absolute; right: 0.8rem; bottom: 0.8rem; transform: translateZ(50px);
  width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--lime); color: var(--ink); transition: background-color 150ms ease, color 150ms ease;
}
.spk__name { font-size: var(--t-md); font-weight: 500; letter-spacing: -0.01em; }
.spk__role { font-size: var(--t-sm); color: var(--ink-2); margin-top: 0.15rem; }
.spk__topic { font-size: var(--t-sm); color: var(--laterite); margin-top: 0.35rem; }
@media (max-width: 860px) { .speakers__grid { grid-template-columns: 1fr; max-width: 26rem; } }

/* Profile sheet */
.profile {
  border: 0; padding: 0; margin: auto; width: min(64rem, calc(100% - 2rem)); max-height: min(92svh, 52rem);
  border-radius: 26px; background: var(--lime); color: var(--ink); overflow: hidden;
  box-shadow: 0 40px 120px -30px rgba(43, 32, 26, 0.55);
}
.profile::backdrop { background: rgba(43, 32, 26, 0.38); }
.profile__in { position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); max-height: inherit; }
.profile__side { position: relative; background: var(--ink); color: var(--lime); display: grid; grid-template-rows: auto 1fr; min-height: 0; }
.profile__portrait { aspect-ratio: 1; object-fit: cover; width: 100%; background: #3a3633; }
.profile__scene { position: relative; min-height: 13rem; touch-action: none; cursor: grab; }
.profile__scene canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.profile__scene p { position: absolute; left: 1rem; bottom: 0.8rem; font-size: 0.75rem; color: rgba(247, 244, 238, 0.7); pointer-events: none; }
.profile__body { padding: clamp(1.4rem, 3vw, 2.6rem); overflow-y: auto; display: grid; gap: 1.6rem; align-content: start; }
.profile__close {
  position: absolute; right: 1rem; top: 1rem; z-index: 3; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); display: grid; place-items: center; color: var(--ink);
}
.profile h3 { font-size: var(--t-lg); letter-spacing: -0.02em; padding-right: 2.5rem; }
.profile__role { color: var(--ink-2); margin-top: 0.3rem; }
.profile__facts { list-style: none; margin: 0; padding: 0; }
.profile__facts li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.profile__facts li span:first-child { color: var(--ink-2); }
.profile__topics { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.profile__topics span { font-size: var(--t-sm); padding: 0.35rem 0.8rem; border-radius: 999px; background: var(--plaster); }
.profile__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.profile__link {
  display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none;
  padding: 0.65rem 1.1rem; border-radius: 999px; background: var(--ink); color: var(--lime); font-size: var(--t-sm); font-weight: 500;
}
.profile__actions button { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 0.6rem 1rem; cursor: pointer; font-size: var(--t-sm); }
@media (max-width: 760px) {
  .profile { width: 100%; max-width: 100%; max-height: 94svh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
  .profile__in { grid-template-columns: 1fr; overflow-y: auto; }
  .profile__side { grid-template-columns: 8rem 1fr; grid-template-rows: none; height: 11rem; }
  .profile__portrait { aspect-ratio: auto; height: 11rem; }
  .profile__scene { min-height: 0; }
  .profile__body { overflow: visible; }
  .profile__facts li { grid-template-columns: 6rem 1fr; }
}

/* ───────────── Applis du quotidien ───────────── */
.daily { background: var(--laterite); color: var(--lime); }
.daily h2 { max-width: 18ch; }
.daily__list { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 2.4rem; }
.daily__list li { display: grid; gap: 0.45rem; align-content: start; }
.daily__list b { font-weight: 500; font-size: var(--t-md); letter-spacing: -0.01em; }
.daily__list span { color: rgba(247, 244, 238, 0.74); }

/* ───────────── Lexique ───────────── */
.lex { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); }
.lex__terms { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.term {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: 0.45rem 1.05rem 0.45rem 0.55rem; cursor: pointer; font-size: var(--t-base);
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform var(--press) var(--ease-out);
}
.term:active { transform: scale(0.97); }
.term svg { width: 1.6rem; height: 1.6rem; flex: none; }
.term[aria-selected="true"] { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.lex__panel { position: relative; align-self: center; min-height: 22rem; display: grid; grid-template-columns: 10rem 1fr; gap: 0 2rem; align-items: start; }
.lex__icon { grid-row: span 3; width: 10rem; height: 10rem; border-radius: 28px; background: var(--lime); box-shadow: inset 0 0 0 1px var(--line); }
.lex__icon svg { width: 100%; height: 100%; display: block; }
.lex__word { font-size: var(--t-xxl); line-height: 1; letter-spacing: -0.04em; color: var(--laterite); }
.lex__def { font-size: var(--t-lg); line-height: 1.25; letter-spacing: -0.015em; margin-top: 1rem; max-width: 22ch; }
.lex__analogy { margin-top: 1.2rem; color: var(--ink-2); max-width: 40ch; padding-left: 1rem; border-left: 2px solid var(--banco); }
@media (max-width: 860px) {
  .lex { grid-template-columns: 1fr; }
  .lex__panel { grid-template-columns: 1fr; min-height: 0; }
  .lex__icon { width: 7rem; height: 7rem; grid-row: auto; margin-bottom: 1.2rem; }
}

/* ───────────── Prompt / parti ───────────── */
.parti { background: var(--sage); color: var(--lime); }
.parti .chapter { color: var(--banco); }
.parti .lede { color: rgba(247, 244, 238, 0.78); }
.formula { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.6rem; font-size: var(--t-md); }
.formula i { font-style: normal; color: var(--banco); }
.builder { display: grid; gap: 1.1rem; margin-top: 0.6rem; }
.builder__row { display: grid; gap: 0.5rem; }
.builder__row > span { font-size: var(--t-sm); color: rgba(247, 244, 238, 0.66); }
.seg { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.seg button {
  border: 1px solid rgba(247, 244, 238, 0.28); background: transparent; color: var(--lime);
  border-radius: 999px; padding: 0.45rem 0.9rem; cursor: pointer; font-size: var(--t-sm);
  transition: background-color 150ms ease, color 150ms ease, transform var(--press) var(--ease-out);
}
.seg button:active { transform: scale(0.97); }
.seg button[aria-pressed="true"] { background: var(--lime); color: var(--sage); border-color: var(--lime); }
.prompt-out {
  position: relative; margin-top: 0.6rem; padding: 1.2rem 1.3rem 3.6rem;
  border-radius: 18px; background: rgba(247, 244, 238, 0.1); border: 1px solid rgba(247, 244, 238, 0.18);
}
.prompt-out b { font-weight: 500; color: #fff; }
.prompt-out button {
  position: absolute; right: 0.8rem; bottom: 0.8rem; border: 0; cursor: pointer;
  background: var(--lime); color: var(--sage); border-radius: 999px; padding: 0.5rem 1rem; font-size: var(--t-sm); font-weight: 500;
}

/* ───────────── Loop video frames ───────────── */
.loop { position: relative; margin: 0; overflow: hidden; border-radius: 22px; background: var(--banco); }
.loop video, .loop img { width: 100%; height: 100%; object-fit: cover; }
.loop::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.16; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .2 0 0 0 0 .1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.loop__toggle {
  position: absolute; right: 0.8rem; bottom: 0.8rem; z-index: 2;
  width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; cursor: pointer; color: var(--ink);
  background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  display: grid; place-items: center;
}
.loop--tower { aspect-ratio: 864 / 1184; max-height: 80svh; justify-self: center; width: min(100%, 30rem); background: #EDEBE6; }
.loop--team { aspect-ratio: 864 / 1184; max-height: 78svh; width: min(100%, 28rem); }

/* ───────────── Outils ───────────── */
.tools { text-align: center; }
.tools h2 { margin-inline: auto; max-width: 20ch; }
.tools .lede { margin: 1.4rem auto 0; }
.tools__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 18rem)); justify-content: center; gap: clamp(1rem, 4vw, 3rem); margin-top: 3.5rem; perspective: 1200px; }
.tools__pair figure { margin: 0; }
.card3d { aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; transform-style: preserve-3d; will-change: transform; box-shadow: 0 30px 60px -30px rgba(43, 32, 26, 0.45); }
.card3d img { width: 100%; height: 100%; object-fit: cover; }
.tools__pair figcaption { margin-top: 1rem; font-size: 1.9rem; line-height: 1; color: var(--laterite); }

/* ───────────── Agence : CSS 3D stack ───────────── */
#agence { overflow-x: clip; }
.stack { position: relative; height: clamp(26rem, 52vw, 34rem); perspective: 1600px; }
.stack__inner { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(58deg) rotateZ(-38deg); }
.plate {
  position: absolute; left: 50%; top: 50%; width: min(70%, 22rem); aspect-ratio: 1.45;
  margin: 0; border-radius: 14px; transform-style: preserve-3d;
  display: grid; place-items: center; text-align: center; padding: 1rem;
  font-size: var(--t-sm); line-height: 1.3; cursor: pointer; border: 0;
  background: var(--lime); color: var(--ink); will-change: transform;
}
.plate { box-shadow: inset 0 0 0 1px rgba(43, 32, 26, 0.12), 0 18px 30px -16px rgba(43, 32, 26, 0.3); }
.plate b { display: block; font-size: var(--t-base); font-weight: 500; }
.plate--world { background: var(--sage); color: var(--lime); }
.plate--brain { background: var(--laterite); color: var(--lime); }
.plate--client { background: var(--banco); }
.stack__ring { position: absolute; left: 50%; top: 50%; width: min(30rem, 92vw); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 1.5px dashed rgba(142, 59, 29, 0.45); pointer-events: none; }
.layer-info { min-height: 7.5rem; }
.layer-info h3 { color: var(--laterite); }
.layer-info p { margin-top: 0.5rem; color: var(--ink-2); }
.roles { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.roles span { font-size: var(--t-sm); padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--lime); box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 860px) { .stack { height: 24rem; margin-top: 4rem; } .plate { width: 64%; } }

/* ───────────── Process hub ───────────── */
.hub { position: relative; aspect-ratio: 1; width: min(100% - 4.5rem, 34rem); justify-self: center; margin: 1.5rem 0; }
.hub__core {
  position: absolute; left: 50%; top: 50%; width: 44%; height: 44%; transform: translate(-50%, -50%); overflow: hidden;
  border-radius: 50%; background: var(--ink); color: var(--lime); display: grid; place-items: center; text-align: center; padding: 1.4rem;
}
.hub__core b { display: block; font-weight: 500; font-size: var(--t-md); }
.hub__core span { display: block; font-size: var(--t-sm); color: rgba(247, 244, 238, 0.78); margin-top: 0.4rem; max-width: 16ch; }
.hub svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.hub svg line { stroke: var(--line); stroke-width: 1; transition: stroke 150ms ease; }
.hub svg line.on { stroke: var(--laterite); stroke-width: 1.5; }
.node {
  position: absolute; transform: translate(-50%, -50%); border: 0; cursor: pointer;
  padding: 0.4rem 0.75rem; border-radius: 999px; background: var(--lime); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.8rem; white-space: nowrap; transition: background-color 150ms ease, color 150ms ease;
}
.node[aria-pressed="true"] { background: var(--laterite); color: var(--lime); box-shadow: none; }
.process-media { display: grid; gap: 1.2rem; }
@media (max-width: 520px) { .node { font-size: 0.72rem; padding: 0.35rem 0.6rem; } .hub__core { padding: 0.5rem; width: 50%; height: 50%; } .hub__core span { font-size: 0.72rem; line-height: 1.3; } }

/* ───────────── Difficulty ───────────── */
.diff__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem; }
.toggle { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px; background: rgba(43, 32, 26, 0.07); touch-action: none; user-select: none; }
.toggle button { position: relative; z-index: 1; border: 0; background: transparent; padding: 0.6rem 1.2rem; cursor: pointer; border-radius: 999px; font-size: var(--t-sm); white-space: nowrap; transition: color 150ms ease; }
.toggle button[aria-pressed="true"] { color: var(--lime); }
.toggle__thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 999px; background: var(--ink); will-change: transform; }
.toggle--dark { background: rgba(247, 244, 238, 0.12); }
.toggle--dark button { color: rgba(247, 244, 238, 0.8); }
.toggle--dark button[aria-pressed="true"] { color: var(--ink); }
.toggle--dark .toggle__thumb { background: var(--lime); }
.chart { position: relative; margin-top: 3rem; height: clamp(22rem, 46vw, 30rem); }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart .axis { stroke: var(--ink); stroke-width: 1; }
.chart .guide { stroke: var(--laterite); stroke-dasharray: 4 5; stroke-width: 1.2; }
.chart .axlabel { font: 400 13px var(--f-text); fill: var(--ink-2); }
.chart g { transition: opacity 200ms ease; }
.pt { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 0.5rem; will-change: transform; font-size: var(--t-sm); white-space: nowrap; }
.pt i { width: 12px; height: 12px; border-radius: 50%; background: var(--sage); flex: none; }
.pt[data-k="aeroport"] i, .pt[data-k="hopital"] i { background: var(--laterite); }
.chart__note { position: absolute; top: 74%; max-width: 22ch; font-size: var(--t-sm); color: var(--ink-2); transition: opacity 200ms ease; }

/* ───────────── Production : graph ───────────── */
.prod { background: var(--ink); color: var(--lime); }
.prod .chapter { color: var(--banco); }
.prod .lede { color: rgba(247, 244, 238, 0.75); }
.prod__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem; }
.graph { position: relative; margin-top: 2.5rem; height: clamp(32rem, 62vw, 44rem); border-radius: 26px; background: #221913; box-shadow: inset 0 0 0 1px rgba(247, 244, 238, 0.08); overflow: hidden; touch-action: pan-y; }
.graph canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.graph canvas:active { cursor: grabbing; }
.graph__legend { position: absolute; left: 1.2rem; bottom: 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.78rem; color: rgba(247, 244, 238, 0.75); pointer-events: none; }
.graph__legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 0.4rem; }
.graph__hint { position: absolute; right: 1.2rem; bottom: 1rem; font-size: 0.78rem; color: rgba(247, 244, 238, 0.55); pointer-events: none; }
.graph__info { position: absolute; left: 1.2rem; top: 1rem; max-width: 22rem; font-size: var(--t-sm); pointer-events: none; min-height: 3rem; }
.graph__info b { display: block; font-weight: 500; font-size: var(--t-base); }
.graph__info span { color: rgba(247, 244, 238, 0.72); }
.lab { margin-top: 1.4rem; padding: 1.2rem 1.4rem; border-radius: 16px; background: var(--sage); color: var(--lime); max-width: 46rem; }
.lab b { font-weight: 500; }
@media (max-width: 760px) { .graph__hint { display: none; } }

/* ───────────── Cas pratiques ───────────── */
.case { background: var(--lime); }
.case--ange { background: var(--plaster); }
.case__by { display: flex; align-items: center; gap: 0.8rem; margin-top: 1rem; color: var(--ink-2); }
.case__by img { width: 2.6rem; height: 2.6rem; border-radius: 50%; object-fit: cover; }
.case__by b { color: var(--ink); font-weight: 500; }
.chain { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.chain::before { content: ""; position: absolute; left: 0; right: 0; top: 0.55rem; height: 1px; background: var(--banco); }
.chain li { position: relative; padding-top: 2rem; padding-right: 1.5rem; }
.chain li::before { content: ""; position: absolute; top: 0; left: 0; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--laterite); }
.chain b { display: block; font-weight: 500; font-size: var(--t-md); }
.chain span { color: var(--ink-2); font-size: var(--t-sm); }
.tabs { margin-top: 4.5rem; display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); }
.tabs [role="tablist"] { display: grid; gap: 0.25rem; align-content: start; }
.tabs [role="tab"] { text-align: left; border: 0; background: transparent; cursor: pointer; padding: 0.75rem 1rem; border-radius: 12px; color: var(--ink-2); transition: background-color 150ms ease, color 150ms ease; }
.tabs [role="tab"][aria-selected="true"] { background: var(--plaster); color: var(--ink); }
.tabs [role="tabpanel"] { display: grid; gap: 1.2rem; align-content: start; }
.tabs [role="tabpanel"][hidden] { display: none; }
.tabs ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.5rem; max-width: 52ch; }
.key { padding: 1rem 1.2rem; border-left: 2px solid var(--laterite); background: var(--plaster); border-radius: 0 12px 12px 0; max-width: 46ch; }
.key b { display: block; font-weight: 500; margin-bottom: 0.2rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.2rem 2rem; }
.grid2 div b { display: block; font-weight: 500; }
.grid2 div span { font-size: var(--t-sm); color: var(--ink-2); }
.badge { display: inline-block; font-size: 0.75rem; padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--laterite); color: var(--lime); margin-bottom: 0.4rem; }
.badge--muted { background: var(--banco); color: var(--ink); }

/* Ange : pipeline esquisse → rendu → vidéo */
.pipe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(1.5rem, 5vw, 4rem); margin-top: 3.5rem; align-items: start; }
.pipe__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.pipe__steps button {
  width: 100%; text-align: left; border: 0; cursor: pointer; background: transparent; border-radius: 16px; padding: 1rem 1.1rem;
  display: grid; grid-template-columns: 2rem 1fr; gap: 0.2rem 0.6rem; color: var(--ink-2);
  transition: background-color 150ms ease, color 150ms ease;
}
.pipe__steps button span { grid-row: span 2; font-variant-numeric: tabular-nums; color: var(--laterite-soft); font-size: var(--t-sm); padding-top: 0.15rem; }
.pipe__steps button b { font-weight: 500; color: inherit; font-size: var(--t-base); }
.pipe__steps button small { font-size: var(--t-sm); }
.pipe__steps button[aria-selected="true"] { background: var(--lime); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.pipe__stage { position: relative; aspect-ratio: 1.6; border-radius: 22px; overflow: hidden; background: #E9E4DB; touch-action: pan-y; }
.pipe__layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: blur(6px); transition: opacity 240ms var(--ease-out), filter 240ms var(--ease-out); }
.pipe__layer[data-on="true"] { opacity: 1; filter: none; }
.pipe__cap { position: absolute; left: 1rem; bottom: 0.9rem; z-index: 2; font-size: var(--t-sm); padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.topics { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.topics span { font-size: var(--t-sm); padding: 0.45rem 0.9rem; border-radius: 999px; background: var(--lime); box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 860px) {
  .pipe { grid-template-columns: 1fr; }
  .pipe__steps { grid-auto-flow: column; grid-auto-columns: minmax(10rem, 1fr); overflow-x: auto; }
  .pipe__stage { order: -1; }
}
@media (max-width: 760px) {
  .chain { grid-template-columns: 1fr; gap: 1.5rem; }
  .chain::before { left: 0.55rem; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .chain li { padding: 0 0 0 2.2rem; }
  .tabs { grid-template-columns: 1fr; }
  .tabs [role="tablist"] { grid-auto-flow: column; overflow-x: auto; }
}

/* ───────────── Déontologie ───────────── */
.ethic__rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2.5rem); margin-top: 3.5rem; }
.rule { border-top: 1px solid var(--ink); padding-top: 1.2rem; }
.rule b { display: block; color: var(--laterite); font-size: clamp(2.4rem, 4.4vw, 3.2rem); line-height: 1; }
.rule h3 { margin-top: 0.8rem; }
.rule p { margin-top: 0.4rem; color: var(--ink-2); font-size: var(--t-sm); }
.questions { list-style: none; margin: 4rem 0 0; padding: 0; max-width: 46rem; }
.questions li { display: grid; grid-template-columns: 2.4rem 1fr; padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: var(--t-md); letter-spacing: -0.01em; }
.questions li span { color: var(--laterite-soft); font-size: var(--t-sm); padding-top: 0.35rem; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .ethic__rules { grid-template-columns: 1fr; } }

/* ───────────── Clôture ───────────── */
.close { background: var(--laterite); color: var(--lime); }
.close blockquote { margin: 0; font-size: var(--t-xl); line-height: 1.1; letter-spacing: -0.025em; max-width: 18ch; }
.close__sign { display: block; font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.05; color: var(--banco); margin-top: 1.4rem; clip-path: inset(0 100% 0 0); transition: clip-path 1.2s var(--ease-in-out); }
.close.is-in .close__sign { clip-path: inset(0 0 0 0); }
.close .small { color: rgba(247, 244, 238, 0.74); }
.close__team { display: flex; align-items: center; gap: 1rem; margin-top: 0.6rem; }
.close__team div { display: flex; }
.close__team img { width: 3.2rem; height: 3.2rem; border-radius: 50%; object-fit: cover; border: 2px solid var(--laterite); margin-left: -0.7rem; }
.close__team img:first-child { margin-left: 0; }
footer { padding: 2rem var(--gutter) 3rem; font-size: var(--t-sm); color: var(--ink-2); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
footer img { height: 2rem; width: auto; mix-blend-mode: multiply; }

/* ───────────── Lexique : more motion ───────────── */
.lex__icon { animation: lexFloat 5s ease-in-out infinite; }
@keyframes lexFloat { 0%, 100% { translate: 0 0; rotate: -1.5deg; } 50% { translate: 0 -8px; rotate: 1.5deg; } }
.lex__word span { display: inline-block; white-space: pre; }
.lex__word.is-in span { animation: letterIn 620ms cubic-bezier(0.34, 1.56, 0.64, 1) both; animation-delay: calc(var(--k) * 45ms); }
@keyframes letterIn { from { opacity: 0; transform: translateY(0.55em) rotate(8deg) scale(0.7); filter: blur(4px); } to { opacity: 1; transform: none; filter: blur(0); } }
.term[aria-selected="true"] svg { animation: termPop 420ms cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes termPop { from { transform: scale(0.5) rotate(-20deg); } to { transform: none; } }

/* ───────────── Prompt et parti : la maquette 3D ───────────── */
.parti .split { align-items: start; }
.maquette {
  --mq-top: #f3efe6; --mq-bottom: #dfe7e0;
  position: sticky; top: 5.5rem; margin: 0; height: min(78svh, 46rem); border-radius: 24px; overflow: hidden;
  background: linear-gradient(180deg, var(--mq-top), var(--mq-bottom));
  transition: --mq-top 1.1s ease, --mq-bottom 1.1s ease;
  box-shadow: 0 40px 80px -40px rgba(20, 24, 18, 0.55); touch-action: none; cursor: grab;
}
@property --mq-top { syntax: "<color>"; inherits: true; initial-value: #f3efe6; }
@property --mq-bottom { syntax: "<color>"; inherits: true; initial-value: #dfe7e0; }
.maquette:active { cursor: grabbing; }
.maquette canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.maquette__hud {
  position: absolute; left: 1rem; top: 1rem; z-index: 2; pointer-events: none; display: grid; gap: 0.15rem;
  padding: 0.7rem 0.95rem; border-radius: 16px; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--ink);
}
.maquette__hud b { font-weight: 500; font-size: var(--t-md); letter-spacing: -0.01em; }
.maquette__hud span { font-size: 0.78rem; color: var(--ink-2); }
.maquette__live { display: flex; align-items: center; gap: 0.45rem; }
.maquette__live i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--laterite-soft); animation: livePulse 1.6s ease-in-out infinite; }
@keyframes livePulse { 50% { box-shadow: 0 0 0 5px rgba(180, 98, 63, 0.18); } }
.maquette__chips { position: absolute; left: 1rem; right: 1rem; bottom: 3.1rem; z-index: 2; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; pointer-events: none; }
.maquette__chips li { font-size: 0.75rem; padding: 0.25rem 0.65rem; border-radius: 999px; background: rgba(43, 32, 26, 0.72); color: var(--lime); }
.maquette__chips li[data-new] { background: var(--laterite); animation: chipIn 520ms cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes chipIn { from { transform: translateY(8px) scale(0.8); opacity: 0; } }
.maquette__hint { position: absolute; left: 1rem; bottom: 0.9rem; z-index: 2; font-size: 0.75rem; color: var(--ink-2); pointer-events: none; }
.maquette:not([data-loaded])::after {
  content: "Chargement des arbres 3D…"; position: absolute; right: 1rem; bottom: 0.9rem; font-size: 0.75rem; color: var(--ink-2);
}
.builder { gap: 0.9rem; }
.seg button { padding: 0.4rem 0.8rem; }
@media (max-width: 860px) {
  /* stays pinned under the bar while the options scroll below it
     (block layout : a grid area would cap the sticky range to its own row) */
  .parti .split { display: flex; flex-direction: column; gap: 2rem; }
  .maquette { align-self: stretch; top: 3.4rem; height: 46svh; order: -1; z-index: 3; }
  .maquette__hud { padding: 0.5rem 0.7rem; }
  .maquette__hud span:last-child, .maquette__hint { display: none; }
}

/* ───────────── Démo : QR code ───────────── */
.qr { margin: 0.4rem 0 0; display: grid; gap: 1rem; justify-items: start; }
.qr__frame {
  position: relative; width: min(100%, 22rem); aspect-ratio: 1; padding: 1.4rem; border-radius: 28px; background: #fff;
  box-shadow: 0 40px 80px -36px rgba(0, 0, 0, 0.55); transform: rotate(-2deg) scale(0.92); opacity: 0;
  transition: transform 900ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 500ms ease;
}
.close.is-in .qr__frame { transform: none; opacity: 1; }
.qr__frame img { width: 100%; height: 100%; image-rendering: pixelated; }
.qr__scan { position: absolute; left: 1.2rem; right: 1.2rem; top: 1.4rem; height: 3px; border-radius: 3px; background: var(--laterite-soft); box-shadow: 0 0 18px 4px rgba(180, 98, 63, 0.45); animation: scan 2.6s ease-in-out infinite; }
@keyframes scan { 0%, 100% { top: 1.4rem; } 50% { top: calc(100% - 1.6rem); } }
.qr__corner { position: absolute; width: 1.8rem; height: 1.8rem; border: 3px solid var(--laterite); }
.qr__corner--tl { left: 0.55rem; top: 0.55rem; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.qr__corner--tr { right: 0.55rem; top: 0.55rem; border-left: 0; border-bottom: 0; border-radius: 0 12px 0 0; }
.qr__corner--bl { left: 0.55rem; bottom: 0.55rem; border-right: 0; border-top: 0; border-radius: 0 0 0 12px; }
.qr__corner--br { right: 0.55rem; bottom: 0.55rem; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }
.qr figcaption { display: grid; gap: 0.2rem; color: rgba(247, 244, 238, 0.8); font-size: var(--t-sm); }
.qr figcaption b { color: var(--lime); font-weight: 500; font-size: var(--t-md); }

/* ───────────── 07 Questions et réponses ───────────── */
.qa { background: var(--plaster); overflow: clip; }
.qa__sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.qa__in { position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.qa__head { display: grid; gap: 1.2rem; position: sticky; top: 6rem; }
.qa__typed { font-family: var(--f-accent); font-style: italic; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.05; color: var(--laterite); min-height: 1.1em; }
.qa__caret { display: inline-block; width: 2px; height: 0.9em; margin-left: 0.08em; vertical-align: -0.1em; background: var(--laterite); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.qa__list { display: grid; }
.qa__item { border-bottom: 1px solid var(--line); }
.qa__item h3 { margin: 0; }
.qa__item button {
  width: 100%; display: grid; grid-template-columns: 2.4rem 1fr 1.6rem; align-items: center; gap: 0.4rem; text-align: left;
  padding: 1.15rem 0; border: 0; background: transparent; cursor: pointer; font-size: var(--t-md); letter-spacing: -0.01em; font-weight: 500;
}
.qa__n { color: var(--laterite-soft); font-size: var(--t-sm); font-variant-numeric: tabular-nums; font-weight: 400; }
.qa__item button i { position: relative; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--lime); transition: background-color 200ms ease, transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.qa__item button i::before, .qa__item button i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 0.65rem; height: 1.5px; background: currentColor; translate: -50% -50%; transition: rotate 300ms ease; }
.qa__item button i::after { rotate: 90deg; }
.qa__item.is-open button i { background: var(--laterite); color: var(--lime); transform: rotate(180deg); }
.qa__item.is-open button i::after { rotate: 0deg; }
.qa__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 450ms cubic-bezier(0.23, 1, 0.32, 1); }
.qa__a > div { overflow: hidden; }
.qa__a p { padding: 0 0 1.3rem 2.8rem; color: var(--ink-2); opacity: 0; transform: translateY(-6px); transition: opacity 300ms ease, transform 400ms ease; }
.qa__item.is-open .qa__a { grid-template-rows: 1fr; }
.qa__item.is-open .qa__a p { opacity: 1; transform: none; transition-delay: 80ms; }
@media (max-width: 860px) { .qa__in { grid-template-columns: 1fr; } .qa__head { position: static; } }

/* ───────────── Hover motion only where hover is real ───────────── */
@media (hover: hover) and (pointer: fine) {
  .bar nav a:hover, .floor-label:hover { color: var(--ink); }
  .term:hover:not([aria-selected="true"]) { border-color: rgba(43, 32, 26, 0.35); }
  .spk:hover .spk__open { background: var(--laterite); color: var(--lime); }
  .pipe__steps button:hover:not([aria-selected="true"]) { color: var(--ink); }
}

/* ───────────── Reduced motion / transparency / contrast ───────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__sign, .close__sign { animation: none; clip-path: none; transition: none; }
  .pipe__layer { filter: none; transition: opacity 200ms ease; }
  .press:active, .term:active, .seg button:active { transform: none; }
  .lex__icon, .lex__word.is-in span, .term[aria-selected="true"] svg, .maquette__live i, .qr__scan, .qa__caret, .maquette__chips li[data-new] { animation: none; }
  .qr__frame { transform: none; opacity: 1; transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .bar, .hero__hint, .loop__toggle, .spk__badge, .profile__close, .pipe__cap { background: var(--lime); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --line: rgba(43, 32, 26, 0.5); --ink-2: #3b2e26; }
}
