/* ==========================================================================
   Bôjeu® · refonte 2026
   Système : fond clair + bascule "ink" une seule fois (au moment des expertises),
   accent unique bleu Bôjeu, rayons : pilules pour les actions, 14px pour les médias.
   Échelle z-index : contenu 1 · main 2 · menu 40 · badge 45 · header 50 · grain 60 · preloader 100
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f3f3f4;
  --ink: #0c0c0e;
  --blue: #2200ff;

  --bg: var(--paper);
  --fg: var(--ink);
  --muted: #5d5d66;
  --line: rgb(12 12 14 / 0.12);
  --card: #fbfbfc;
  --card-2: #e7e7ea;
  --logo-filter: none;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-text: "Geist", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 3.2vw, 48px);
  --header-h: 72px;
  --r: 14px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --section-y: clamp(96px, 13vw, 210px);
  --curtain-r: clamp(24px, 4vw, 56px);

  color-scheme: light;
}

/* Thème ink : bascule au scroll (classe posée par le JS) ou préférence système */
:root.is-ink {
  color-scheme: dark;
  --bg: var(--ink);
  --fg: var(--paper);
  --muted: #a1a1aa;
  --line: rgb(243 243 244 / 0.14);
  --card: #151518;
  --card-2: #1f1f23;
  --logo-filter: invert(1);
}
/* Sombre : préférence système, sauf choix explicite data-theme="light" ; data-theme="dark" force le sombre */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ink);
    --fg: var(--paper);
    --muted: #a1a1aa;
    --line: rgb(243 243 244 / 0.14);
    --card: #151518;
    --card-2: #1f1f23;
    --logo-filter: invert(1);
    color-scheme: dark;
  }
  :root.is-ink:not([data-theme="light"]) { --bg: #070708; }
}
:root[data-theme="dark"] {
  --bg: var(--ink);
  --fg: var(--paper);
  --muted: #a1a1aa;
  --line: rgb(243 243 244 / 0.14);
  --card: #151518;
  --card-2: #1f1f23;
  --logo-filter: invert(1);
  color-scheme: dark;
}
:root[data-theme="dark"].is-ink { --bg: #070708; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
section[id], footer[id] { scroll-margin-top: 0; }
a, button, input, textarea { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-text);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 1s var(--ease-out), color 1s var(--ease-out);
  overflow-x: clip;
}
/* Grain fixe, non interactif (jamais sur un conteneur qui défile) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
::selection { background: var(--blue); color: #fff; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 110;
  padding: 10px 16px; border-radius: 999px;
  background: var(--blue); color: #fff; font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}
.skip-link:focus-visible { transform: none; outline-color: var(--fg); }

.wrap {
  width: 100%; max-width: 1680px; margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

/* Badge de maquette (à retirer à la mise en ligne) */
.mockup-badge {
  position: fixed; z-index: 45;
  left: 50%; translate: -50% 0;
  bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px 7px 11px;
  border-radius: 999px;
  background: rgb(12 12 14 / 0.8);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff;
  font-size: 0.75rem; font-weight: 500;
  pointer-events: none;
}
.mockup-badge::before {
  content: "";
  width: 0.7em; height: 0.4em;
  background: #fff;
  clip-path: polygon(0 100%, 34% 0, 66% 0, 100% 100%, 72% 100%, 50% 52%, 28% 100%);
}

/* ---------- Typo partagée ---------- */
.label {
  font-family: var(--f-text);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.label::before {
  content: "";
  width: 0.62em; height: 0.36em;
  background: var(--blue);
  clip-path: polygon(0 100%, 34% 0, 66% 0, 100% 100%, 72% 100%, 50% 52%, 28% 100%);
}
.section-title {
  font-family: var(--f-display);
  font-weight: 750;
  font-stretch: 112%;
  font-size: clamp(2.2rem, 9.4vw, 10.5rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
  white-space: nowrap;
}
.count {
  font-family: var(--f-text);
  font-size: clamp(0.8rem, 1.1vw, 1rem);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  vertical-align: top;
  margin-left: 0.5em;
  position: relative;
  top: 0.6em;
}

/* Masques SplitText : réserve pour les jambages (g, j, p) */
.w-mask, .ln-mask { padding-bottom: 0.14em; margin-bottom: -0.14em; }

/* Texte qui roule au survol (copie via data-text) */
.roll { position: relative; display: inline-flex; overflow: hidden; line-height: 1.2; }
.roll > span { display: block; transition: transform 0.55s var(--ease-out); }
.roll::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 100%;
  transition: transform 0.55s var(--ease-out);
}
a:hover .roll > span, button:hover .roll > span, .roll:hover > span { transform: translateY(-100%); }
a:hover .roll::after, button:hover .roll::after, .roll:hover::after { transform: translateY(-100%); }

/* ---------- Pilules (actions) ---------- */
.pill {
  --pill-fg: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 7px 7px 7px 22px;
  border-radius: 999px;
  border: 1px solid currentColor;
  color: var(--pill-fg);
  font-weight: 500;
  font-size: 0.975rem;
  white-space: nowrap;
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
  will-change: transform;
}
.pill:active { scale: 0.98; }
.pill__icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: currentColor;
  overflow: hidden;
  flex: none;
}
.pill__icon svg {
  width: 17px; height: 17px;
  color: var(--bg);
  transition: transform 0.55s var(--ease-out);
}
.pill:hover .pill__icon svg { transform: translateX(3px); }
.pill--solid { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pill--solid .pill__icon { background: var(--blue); }
.pill--solid .pill__icon svg { color: #fff; }
.pill--solid:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.pill--solid:hover .pill__icon { background: #fff; }
.pill--solid:hover .pill__icon svg { color: var(--blue); }
.hero__cta:hover .pill__icon svg { transform: translateY(3px); }

.pill--light { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pill--light .pill__icon { background: var(--blue); }
.pill--light .pill__icon svg { color: #fff; }
.pill--light:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  display: none;
  color: #fff;
}
.js .preloader.is-on { display: block; }
/* Rideau à deux couches : bleu Bôjeu devant, bleu profond derrière */
.preloader__panel { position: absolute; inset: 0; }
.preloader__panel--back { background: #1300a3; }
.preloader__panel--front { background: var(--blue); }
.preloader__logo-wrap {
  position: absolute; left: 50%; top: 50%;
  width: min(46vw, 420px);
  translate: -50% -50%;
  transform-origin: 50% 50%;
  will-change: transform;
}
.preloader__logo { width: 100%; height: auto; overflow: hidden; }
.preloader__bar {
  position: absolute; left: var(--gutter); bottom: calc(var(--gutter) + 0.4rem);
  width: min(32vw, 360px); height: 2px;
  background: rgb(255 255 255 / 0.22);
  overflow: hidden;
}
.preloader__bar span { position: absolute; inset: 0; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }
.preloader__count {
  position: absolute; right: var(--gutter); bottom: calc(var(--gutter) - 0.12em);
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(3.5rem, 12vw, 11rem);
  line-height: 0.8;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: #fff;
  mix-blend-mode: difference;
  transition: transform 0.6s var(--ease-out);
}
.header.is-hidden { transform: translateY(-110%); }
.header.is-on-blue { mix-blend-mode: normal; }
.is-intro .header__logo, .is-intro .header__menu, .is-intro .pill--header { opacity: 0; }
.header.is-hidden:focus-within { transform: none; }
.header__menu { display: inline-flex; align-items: center; gap: 12px; justify-self: start; height: 44px; padding-right: 8px; }
.header__burger { position: relative; width: 30px; height: 12px; }
.header__burger span {
  position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor;
  transition: transform 0.6s var(--ease-out), top 0.6s var(--ease-out);
}
.header__burger span:first-child { top: 0; }
.header__burger span:last-child { top: 10.5px; }
.menu-open .header__burger span:first-child { top: 5.25px; transform: rotate(45deg); }
.menu-open .header__burger span:last-child { top: 5.25px; transform: rotate(-45deg); }
.header__menu-label { font-size: 0.95rem; font-weight: 500; }
.header__logo { width: clamp(92px, 8.4vw, 124px); }
.header__logo svg { width: 100%; height: auto; }
.pill--header { justify-self: end; color: #fff; border-color: rgb(255 255 255 / 0.9); padding-block: 5px; padding-right: 5px; }
.pill--header .pill__icon { width: 34px; height: 34px; background: #fff; }
.pill--header .pill__icon svg { color: #000; }

/* ---------- Menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 40;
  color: var(--paper);
  overscroll-behavior: contain;
}
.menu[hidden] { display: none; }
.menu__layer { position: absolute; inset: 0; background: var(--blue); }
.menu__bg { position: absolute; inset: 0; background: var(--ink); }
.menu__inner {
  position: relative; height: 100%;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--gutter);
  padding: calc(var(--header-h) + 4vh) var(--gutter) var(--gutter);
}
.menu__nav ol { display: grid; gap: 0.2vh; }
.menu__nav li { overflow: hidden; }
.menu__nav a {
  display: inline-flex; align-items: flex-start; gap: 14px;
  font-family: var(--f-display);
  font-weight: 750;
  font-stretch: 100%;
  font-size: clamp(2.6rem, 8.2vh, 6.6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  transition: font-stretch 0.6s var(--ease-out), color 0.4s var(--ease-out);
}
.menu__nav a:hover, .menu__nav a:focus-visible { font-stretch: 125%; color: #fff; }
.menu__nav ol:hover a:not(:hover) { color: rgb(243 243 244 / 0.4); }
.menu__num { font-family: var(--f-text); font-size: 0.85rem; font-weight: 500; letter-spacing: 0; padding-top: 0.6em; color: rgb(243 243 244 / 0.55); }
.menu__aside { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.menu__preview { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: #1f1f23; }
.menu__preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity 0.6s var(--ease-out), transform 1.2s var(--ease-out); }
.menu__preview img.is-active { opacity: 1; transform: none; }
.menu__meta { color: rgb(243 243 244 / 0.62); font-size: 0.95rem; }

/* ---------- Hero ---------- */
.hero {
  --u: calc((100vw - 2 * var(--gutter)) / 245);
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: calc(var(--header-h) + 2vh) var(--gutter) clamp(20px, 3vw, 40px);
  overflow: hidden;
}
.hero__stage {
  align-self: center;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: calc(var(--u) * 4);
  position: relative;
  z-index: 2;
}
.hero__word { height: calc(var(--u) * 43.9); width: auto; overflow: visible; flex: none; }
.hero__word--bo { width: calc(var(--u) * 72.9); }
.hero__word--jeu { width: calc(var(--u) * 106); }
.hero__letter { transform-box: fill-box; }
.hero__circ { fill: var(--blue); transform-box: fill-box; transform-origin: 50% 100%; }
.hero__reg { font-family: var(--f-text); font-size: 7px; font-weight: 500; fill: currentColor; }
.hero__slot {
  flex: 1 1 auto;
  height: calc(var(--u) * 33);
  margin-bottom: calc(var(--u) * 0.05);
  border-radius: var(--r);
}
.hero__full {
  position: absolute; inset: 0;
  z-index: 1;
  overflow: hidden;
  clip-path: inset(0 0 0 0 round 0px);
}
.hero__reveal, .hero__reveal picture, .hero__reveal img { width: 100%; height: 100%; }
.hero__reveal img { object-fit: cover; object-position: 58% 40%; transform-origin: 58% 45%; }
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0) 40%, rgb(0 0 0 / 0.62) 100%);
  opacity: 0;
}
.hero__overlay {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(28px, 5vw, 64px);
  color: #fff;
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 108%;
  font-size: clamp(2.1rem, 5.4vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  max-width: 19ch;
  text-wrap: balance;
  opacity: 0;
}
.hero__foot {
  position: relative; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
}
.hero__title {
  font-family: var(--f-text);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.35vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 20ch;
  text-wrap: balance;
}

/* États initiaux de l'intro (le JS les anime, filet de sécurité .no-anim) */
.js:not(.no-anim) .hero__stage,
.js:not(.no-anim) .hero__foot,
.js:not(.no-anim) .hero__full { visibility: hidden; }

/* ---------- Vision ---------- */
.vision { padding-block: var(--section-y) calc(var(--section-y) * 0.8); }
.vision .wrap {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(12px, 1.4vw, 20px);
  align-items: start;
}
.vision .label { grid-column: 1 / span 3; margin-top: 0.9em; }
.vision__text {
  grid-column: 4 / -1;
  font-family: var(--f-text);
  font-weight: 500;
  font-size: clamp(1.75rem, 4.15vw, 4.9rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 24ch;
  text-wrap: pretty;
}
.chip-media {
  display: inline-block;
  vertical-align: -0.08em;
  width: 1.85em; height: 0.82em;
  border-radius: 999px;
  overflow: hidden;
  background: var(--card-2);
}
.chip-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Clients ---------- */
.clients { padding-bottom: var(--section-y); }
.clients__head {
  display: grid; gap: 18px;
  padding-bottom: clamp(36px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(40px, 6vw, 88px);
}
.clients__title {
  font-family: var(--f-display);
  font-weight: 750; font-stretch: 112%;
  font-size: clamp(2.4rem, 6vw, 6.4rem);
  line-height: 0.9; letter-spacing: -0.045em;
}
.clients__row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.clients__sub { color: var(--muted); max-width: 44ch; font-size: clamp(1rem, 1.2vw, 1.15rem); }
.marquee__toggle {
  flex: none;
  width: 44px; height: 44px; border-radius: 999px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  color: var(--fg);
  transition: border-color 0.3s, background-color 0.3s;
}
.marquee__toggle:hover { border-color: var(--fg); }
.marquee__toggle svg { width: 16px; height: 16px; grid-area: 1 / 1; }
.marquee__toggle .i-play, .marquee__toggle[aria-pressed="true"] .i-pause { display: none; }
.marquee__toggle[aria-pressed="true"] .i-play { display: block; }
.marquee { overflow: hidden; }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group { display: flex; align-items: center; gap: clamp(48px, 6vw, 112px); padding-right: clamp(48px, 6vw, 112px); }
.marquee__group img {
  max-width: none;
  height: auto;
  opacity: 0.72;
  filter: var(--logo-filter);
  transition: opacity 0.3s;
}
.marquee__group li:hover img { opacity: 1; }

/* ---------- Projets (sticky stack) ---------- */
.work__head { padding-bottom: clamp(24px, 4vw, 56px); }
.stack__item {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: flex;
  padding: calc(var(--header-h) + 8px) var(--gutter) var(--gutter);
}
.project {
  --tone: var(--card-2);
  --on-tone: var(--fg);
  position: relative;
  flex: 1;
  max-width: 1680px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  grid-template-areas: "meta media";
  gap: clamp(12px, 1.4vw, 20px);
  padding: clamp(12px, 1.4vw, 20px);
  border-radius: calc(var(--r) + 6px);
  background: var(--card);
  min-height: 0;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line) inset, 0 30px 80px -40px rgb(12 12 14 / 0.28);
  transform-origin: 50% 0;
  will-change: transform;
}
/* Voile d'empilement : la carte reste opaque et recule dans l'ombre */
.project::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: #0c0c0e;
  opacity: var(--dim, 0);
  pointer-events: none;
  z-index: 2;
}
.project__media {
  grid-area: media;
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--tone);
  color: var(--on-tone);
  min-height: 0;
}
.project__media picture, .project__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.project__media img { object-fit: cover; transform: scale(1.12); transition: scale 1.2s var(--ease-out); }
.project:hover .project__media img { scale: 1.04; }
.project__media--brand { display: grid; place-items: center; }
.project__media--brand .project__crest {
  position: relative; inset: auto; width: auto; height: clamp(120px, 34vh, 340px); object-fit: contain; transform: none;
  filter: invert(1);
}
.project__wordmark { width: 48%; height: auto; color: #fff; transition: scale 1.2s var(--ease-out); }
.project:hover .project__wordmark { scale: 1.04; }
.project__meta {
  grid-area: meta;
  display: flex; flex-direction: column;
  padding: clamp(8px, 1.4vw, 24px);
}
.project__index {
  font-family: var(--f-display);
  font-weight: 800; font-stretch: 125%;
  font-size: clamp(3.4rem, 8vw, 9rem);
  line-height: 0.8; letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg);
  opacity: 0.9;
}
.project__client {
  margin-top: auto;
  font-family: var(--f-display);
  font-weight: 750; font-stretch: 108%;
  font-size: clamp(2rem, 3.6vw, 4rem);
  line-height: 0.95; letter-spacing: -0.04em;
}
.project__name { margin-top: 10px; color: var(--muted); font-size: clamp(1rem, 1.25vw, 1.2rem); }
.project__tags { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.project__tags li {
  font-size: 0.8125rem; font-weight: 500;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line);
}

/* ---------- Expertises ---------- */
.services { padding-block: var(--section-y); }
.services__grid {
  margin-top: clamp(40px, 6vw, 96px);
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: clamp(24px, 5vw, 96px);
  align-items: start;
}
.service {
  position: relative;
  display: grid;
  grid-template-columns: 3.2em 1fr;
  align-items: start;
  padding-block: clamp(4px, 0.5vw, 8px);
  cursor: default;
}
.service__num {
  font-size: 0.85rem; font-weight: 500;
  color: var(--muted);
  padding-top: 1.05em;
  transition: color 0.4s var(--ease-out);
  font-variant-numeric: tabular-nums;
}
.service__name {
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 92%;
  font-size: clamp(2rem, 5vw, 6rem);
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--muted);
  opacity: 0.74;
  transition: font-stretch 0.7s var(--ease-out), color 0.45s var(--ease-out), opacity 0.45s var(--ease-out);
}
.service.is-active .service__name { font-stretch: 116%; color: var(--fg); opacity: 1; }
.service.is-active .service__num { color: var(--fg); }
.service__desc {
  grid-column: 2;
  max-width: 44ch;
  color: var(--muted);
  font-size: 1rem;
  /* visible au lecteur d'écran, affichée dans le panneau sur grand écran */
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.services__panel { position: sticky; top: calc(var(--header-h) + 8vh); }
.services__media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--card-2);
}
.services__media > * {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  clip-path: inset(100% 0 0 0);
  transform: scale(1.18);
  transition: clip-path 1s var(--ease-io), transform 1.8s var(--ease-out);
}
.services__media > .is-active { clip-path: inset(0 0 0 0); transform: scale(1); z-index: 1; }
.services__media > .is-leaving { clip-path: inset(0 0 0 0); transform: scale(1); z-index: 0; }
.services__brand { background: var(--tone); display: grid; place-items: center; }
.services__brand img { position: static; width: auto; height: 48%; filter: invert(1); }
.services__caption { margin-top: 18px; max-width: 40ch; color: var(--muted); font-size: 1.05rem; min-height: 3.2em; }

/* ---------- L'agence (bento) ---------- */
.agency { padding-block: 0 var(--section-y); }
.statement {
  margin-top: clamp(24px, 3vw, 40px);
  font-family: var(--f-display);
  font-weight: 700; font-stretch: 106%;
  font-size: clamp(2.2rem, 5.6vw, 6.2rem);
  line-height: 0.96; letter-spacing: -0.045em;
  max-width: 16ch;
  text-wrap: balance;
}
.bento {
  margin-top: clamp(40px, 6vw, 96px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(clamp(220px, 22vw, 340px), auto);
  gap: clamp(10px, 1.1vw, 16px);
}
.bento__cell {
  position: relative;
  border-radius: var(--r);
  background: var(--card);
  padding: clamp(22px, 2.4vw, 40px);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.bento__cell--photo { padding: 0; background: var(--card-2); }
.bento__cell--photo picture, .bento__cell--photo img { position: absolute; inset: -8% 0; width: 100%; height: 116%; }
.bento__cell--photo img { object-fit: cover; }
.bento__cell--accent { background: var(--blue); color: #fff; }
.bento__cell--accent .bento__text { color: rgb(255 255 255 / 0.86); }
.bento__a { grid-column: 1 / span 7; grid-row: span 2; }
.bento__b { grid-column: 8 / span 5; }
.bento__c { grid-column: 8 / span 5; }
.bento__d { grid-column: 1 / span 4; }
.bento__e { grid-column: 5 / span 8; }
.bento__stat {
  font-family: var(--f-display);
  font-weight: 800; font-stretch: 125%;
  font-size: clamp(3.6rem, 7vw, 7.8rem);
  line-height: 0.85; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.bento__title {
  margin-top: auto;
  font-family: var(--f-display);
  font-weight: 700; font-stretch: 104%;
  font-size: clamp(1.5rem, 2.2vw, 2.4rem);
  line-height: 1.02; letter-spacing: -0.035em;
  max-width: 16ch;
}
.bento__b .bento__title { margin-top: auto; padding-top: 24px; }
.bento__text { margin-top: 14px; color: var(--muted); max-width: 42ch; font-size: 1rem; }
.bento__c .bento__text { margin-top: auto; font-size: clamp(1.05rem, 1.3vw, 1.25rem); max-width: 24ch; }

/* ---------- Rideau final : le contenu se lève sur le contact bleu ---------- */
#main {
  position: relative; z-index: 2;
  background: var(--bg);
  border-radius: 0 0 var(--curtain-r) var(--curtain-r);
  transition: background-color 1s var(--ease-out);
}

/* ---------- Contact / footer (bleu Bôjeu : l'intro et la fin se répondent) ---------- */
.contact {
  --bg: var(--blue);
  --fg: #fff;
  --muted: rgb(255 255 255 / 0.74);
  --line: rgb(255 255 255 / 0.24);
  --card: rgb(255 255 255 / 0.08);
  position: relative; z-index: 1;
  margin-top: calc(-1 * var(--curtain-r));
  padding-top: calc(var(--section-y) * 0.6 + var(--curtain-r));
  padding-bottom: calc(clamp(16px, 2vw, 28px) + 48px); /* place pour le badge de maquette */
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
}
.contact ::selection { background: #fff; color: var(--blue); }
.contact :focus-visible { outline-color: #fff; }
.contact .pill--light { background: #fff; color: var(--blue); border-color: #fff; }
.contact .pill--light:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.contact__title {
  font-family: var(--f-display);
  font-weight: 800;
  /* "Let's talk" mesure ~4.53em en wdth 112 : la taille remplit la largeur utile */
  font-size: calc((min(100vw, 1680px) - 2 * var(--gutter)) / 4.78);
  line-height: 0.84;
  letter-spacing: -0.055em;
  white-space: nowrap;
  font-stretch: 112%;
  margin-left: -0.04em;
}
.contact__title .char {
  display: inline-block;
  font-variation-settings: "wdth" var(--wdth, 112), "wght" var(--wght, 800);
  will-change: transform;
}
.contact__grid {
  margin-top: clamp(48px, 7vw, 112px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 112px);
  padding-top: clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--line);
}
.contact__lead {
  font-weight: 500;
  font-size: clamp(1.4rem, 2.2vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 20ch;
  text-wrap: balance;
}
.contact__place { margin-top: 28px; color: var(--muted); }

.form { display: grid; gap: 22px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.9rem; font-weight: 500; }
.field__opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color 0.3s, background-color 0.3s;
  resize: vertical;
}
.field input:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid #fff; outline-offset: 1px; border-color: transparent; }
.field.has-error input, .field.has-error textarea { border-color: #ffc4c8; }
.field__error { min-height: 1.2em; font-size: 0.85rem; color: #ffe0e2; }
.form__submit { justify-self: start; }
.form__submit[aria-busy="true"] { pointer-events: none; opacity: 0.7; }
.form__status { font-weight: 500; min-height: 1.4em; }
.form.is-sent .field, .form.is-sent .form__row, .form.is-sent .form__submit { display: none; }
.form.is-sent .form__status { font-size: clamp(1.3rem, 2vw, 1.9rem); letter-spacing: -0.02em; line-height: 1.2; }

.footer {
  margin-top: clamp(72px, 10vw, 160px);
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.925rem;
}
.footer__logo { width: 96px; height: auto; }
.footer__nav { display: flex; gap: clamp(16px, 2.4vw, 36px); justify-self: center; }
.footer__copy { color: var(--muted); }
.footer__top {
  width: 48px; height: 48px; border-radius: 999px;
  display: grid; place-items: center;
  background: #fff; color: var(--blue);
}
.footer__top svg { width: 20px; height: 20px; transition: transform 0.5s var(--ease-out); }
.footer__top:hover svg { transform: translateY(-4px); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .menu__inner { grid-template-columns: 1fr; }
  .menu__aside { display: none; }
  .services__grid { grid-template-columns: 1fr; }
  .services__panel { display: none; }
  .service { padding-block: 10px; }
  .service__desc {
    position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal;
    margin-top: 8px;
  }
  .service__name { font-stretch: 100%; }
  .service.is-active .service__name { font-stretch: 110%; }
}

/* Hero empilé : téléphones et tablettes en portrait. L'unité suit la largeur ET la hauteur. */
@media (max-width: 767px) and (orientation: portrait), (max-width: 1100px) and (orientation: portrait) {
  .hero {
    --u: max(2px, min(calc((100vw - 2 * var(--gutter)) / 106), calc((71dvh - 250px) / 83)));
    padding-top: calc(var(--header-h) + 3vh);
  }
  .hero__stage { flex-direction: column; align-items: stretch; gap: calc(var(--u) * 3); }
  .hero__word--bo { align-self: flex-start; }
  .hero__word--jeu { align-self: flex-end; margin-top: calc(var(--u) * -10.9); }
  .hero__slot { flex: none; height: clamp(140px, 26dvh, 440px); margin: 0; }
  .hero__foot { flex-direction: column; align-items: flex-start; gap: 18px; margin-top: 24px; }
  /* Le bouton du hero est à gauche : le badge passe à droite */
  .mockup-badge { left: auto; translate: none; right: max(var(--gutter), env(safe-area-inset-right)); }
}

/* Tablette en portrait : cartes projets photo dessus, texte dessous (toujours épinglées) */
@media (min-width: 768px) and (max-width: 1100px) and (orientation: portrait) {
  .project { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "media" "meta"; }
  .project__meta { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: end; padding: 14px 8px 8px; }
  .project__index { font-size: 4rem; grid-row: span 2; align-self: start; }
  .project__client { margin-top: 0; font-size: 2.6rem; }
  .project__name { margin-top: 6px; }
  .project__tags { grid-column: 1 / -1; margin-top: 16px; }
}

@media (max-width: 767px) {
  :root { --header-h: 60px; }
  .header__menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pill--header { padding-left: 14px; gap: 10px; font-size: 0.9rem; }
  .pill--header .pill__icon { width: 30px; height: 30px; }

  .hero__title { font-size: clamp(1.25rem, 5.6vw, 1.5rem); }

  .vision .label { grid-column: 1 / -1; margin: 0 0 24px; }
  .vision__text { grid-column: 1 / -1; font-size: clamp(1.7rem, 7.6vw, 2.4rem); }
  .service__name { font-size: clamp(1.6rem, 7.4vw, 2.4rem); }
  .marquee__group img { zoom: 0.72; }

  .stack__item {
    position: sticky;
    top: calc(14px + var(--i, 0) * 12px);
    height: auto;
    padding-block: 8px;
  }
  .project { grid-template-columns: 1fr; grid-template-areas: "media" "meta"; }
  .project__media { min-height: 0; aspect-ratio: 4 / 3.4; }
  .project__meta { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: end; padding: 10px 6px 6px; }
  .project__index { font-size: 2.6rem; grid-row: span 2; align-self: start; }
  .project__client { margin-top: 0; font-size: 1.9rem; }
  .project__name { margin-top: 4px; }
  .project__tags { grid-column: 1 / -1; margin-top: 16px; }

  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento__a, .bento__b, .bento__c, .bento__d, .bento__e { grid-column: 1; grid-row: auto; }
  .bento__cell { min-height: 220px; }
  .bento__cell--photo { aspect-ratio: 4 / 3; min-height: 0; }

  .contact__grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .footer { grid-template-columns: 1fr auto; }
  .footer__nav { grid-column: 1 / -1; grid-row: 2; justify-self: start; flex-wrap: wrap; }
  .footer__copy { grid-column: 1 / -1; grid-row: 3; }
  .footer__top { grid-column: 2; grid-row: 1; }
  .mockup-badge { font-size: 0.6875rem; padding: 6px 11px 6px 9px; }
}

/* Mouvement réduit : tout est lisible, rien ne bouge tout seul */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .hero__stage, .js .hero__foot, .js .hero__full { visibility: visible !important; }
  .marquee__track { width: auto; }
  .marquee__group { flex-wrap: wrap; justify-content: center; row-gap: 40px; padding-inline: var(--gutter); }
  .marquee__group[aria-hidden="true"], .marquee__toggle { display: none; }
  .project__media img { transform: none; }
}
