/* Site V5 — G&W (fond #e8e5db) ; navigation mobile ≤900px. */
:root {
  --site-version: 5;
  --bg: #e8e5db;
  --fg: #000;
  /* Exception : la section About garde un fond distinct (blanc). */
  --bg-about: #fff;
  --muted: rgba(0, 0, 0, 0.6);
  --line: #000;
  --selected-block-h: calc(100dvh - 50px);
  --selected-media-h: min(58vh, 620px);
  --project-media-h: min(66dvh, 760px);
  /* Questions : emprise plus étroite que le ratio média 2160×2700 plein. */
  --project-question-width-scale: 0.62;
  --project-question-width: calc(
    var(--project-media-h) * 2160 / 2700 * var(--project-question-width-scale)
  );
  /* Option 2× : un peu moins que le double strict. */
  --project-question-wide-scale: 1.75;
  /* Home : rail + menu depuis le bord droit ; titre « Selected Works » : entrée plus courte depuis la droite */
  --home-reveal-enter-x: calc(100vw + 64px);
  --home-reveal-enter-x-title: clamp(72px, 28vw, 260px);
  /* CA — petits coins arrondis en haut des blocs média (projet + selected works). */
  --media-ca-radius: 6px;
  --detail-scroll-progress-h: calc(8px / 3);
}

.intro-overlay {
  background: var(--bg);
}

/* Menu : fond transparent sur le gris du site. */
.home-nav-shell,
.nav-grid {
  background: transparent;
}

body.page-about {
  background: var(--bg-about);
}

.home-about-panel,
body.page-about {
  color: #000;
}

@font-face {
  font-family: "Angulus Rounded";
  src: url("/assets/fonts/angulus/AngulusRounded-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hypertext Display";
  src: url("/assets/fonts/hypertext-display/00HypertextDisplay-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  background: var(--bg);
  color: var(--fg);
}

body {
  font-family: "Hypertext Display", Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.home-nav-shell {
  position: sticky;
  top: 0;
  z-index: 20;
}

html.page-home {
  overflow-x: clip;
}

/* Home : titre Selected Works — glissement depuis la droite (distance modérée) ; rail + menu : --home-reveal-enter-x. */
.page-home .home-reveal-stage-title {
  opacity: 0;
  transform: translate3d(var(--home-reveal-enter-x-title), 0, 0);
}

.page-home .home-reveal-stage-title.home-reveal-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    transform 0.82s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.82s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-home .home-reveal-stage-rail {
  opacity: 0;
  transform: translate3d(var(--home-reveal-enter-x), 0, 0);
}

.page-home .home-reveal-stage-rail.home-reveal-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    transform 1.05s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 1.05s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-home .home-nav-shell {
  opacity: 0;
  transform: translate3d(var(--home-reveal-enter-x), 0, 0);
}

.page-home .home-nav-shell.home-reveal-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    transform 1s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .page-home .home-reveal-stage-title.home-reveal-visible,
  .page-home .home-reveal-stage-rail.home-reveal-visible,
  .page-home .home-nav-shell.home-reveal-visible {
    transition-duration: 0.01ms;
  }

  .intro-mask-root.intro-mask-root--fade-out-name {
    transition-duration: 0.01ms;
  }
}

.nav-grid {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  column-gap: clamp(20px, 4vw, 90px);
  padding: 12px 20px 12px;
  border-bottom: 1px solid transparent;
}

/* MMM à gauche ; INDEX, SELECTED WORKS, CONTACT et ABOUT à droite. */
.nav-grid > :nth-child(1) {
  margin-right: auto;
}

.nav-grid > :nth-child(2) {
  margin-left: auto;
}

.nav-grid[data-mobile-nav-ready] > :nth-child(2) {
  margin-left: 0;
}

.nav-grid[data-mobile-nav-ready] .nav-grid__menu > :first-child {
  margin-left: auto;
}

.nav-grid a,
.home-nav-shell .nav-grid {
  position: relative;
  top: auto;
  z-index: auto;
}

.nav-grid a {
  font-family: "Angulus Rounded", sans-serif;
  font-size: clamp(1.28rem, 1.55vw, 1.82rem);
  font-weight: 500;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.nav-grid button {
  font: inherit;
  font-family: "Angulus Rounded", sans-serif;
  font-size: clamp(1.28rem, 1.55vw, 1.82rem);
  font-weight: 500;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  appearance: none;
}

.nav-grid .appear-up {
  transform: translateY(120%);
  opacity: 0;
}

.nav-grid.ready .appear-up {
  animation: navUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.nav-grid.ready .appear-up.delay {
  animation-delay: 0.12s;
}

@keyframes navUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Menu : « MMM » devient « Marvin Morisse Maclean » au survol (sans décaler les autres liens). */
.nav-mmm {
  position: relative;
  display: inline-block;
  vertical-align: top;
  z-index: 1;
}

.nav-mmm:hover,
.nav-mmm:focus-visible {
  z-index: 3;
}

.nav-mmm__short {
  display: inline-block;
}

.nav-mmm__full {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.nav-mmm:hover .nav-mmm__short,
.nav-mmm:focus-visible .nav-mmm__short {
  opacity: 0;
  visibility: hidden;
}

/* Burger menu (structure injectée par site.js) — desktop : transparent. */
.nav-burger {
  display: none;
}

.nav-grid__menu {
  display: contents;
}

.nav-burger {
  flex: 0 0 auto;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}

.nav-burger__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-grid--open .nav-burger__bar:nth-child(1),
body.nav-open .nav-burger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-grid--open .nav-burger__bar:nth-child(2),
body.nav-open .nav-burger__bar:nth-child(2) {
  opacity: 0;
}

.nav-grid--open .nav-burger__bar:nth-child(3),
body.nav-open .nav-burger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-drawer-backdrop {
  display: none;
}

.nav-mmm:hover .nav-mmm__full,
.nav-mmm:focus-visible .nav-mmm__full {
  opacity: 1;
  visibility: visible;
}

/* Hover liens/boutons : un trait se dessine de gauche à droite pour souligner la typo. */
.nav-grid a,
.nav-grid button,
.project-meta__title,
.selected-all-projects__lines {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1.5px;
  transition: background-size 0.34s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-grid a:hover,
.nav-grid button:hover,
.project-card > a:hover .project-meta__title,
.selected-all-projects:hover .selected-all-projects__lines {
  background-size: 100% 1.5px;
}

@media (prefers-reduced-motion: reduce) {
  .nav-grid a,
  .nav-grid button,
  .project-meta__title,
  .selected-all-projects__lines {
    transition: none;
  }
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: min(24px, 4vw);
  transition: opacity 0.9s ease;
}

.intro-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Intro : masque SVG + foreignObject — typo = même échelle que .section-title ; taille vidéo = layoutIntroFlamesMask(). */
.intro-sr-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.intro-mask-root {
  position: relative;
  z-index: 1;
  display: inline-block;
  max-width: min(98vw, 100%);
  line-height: normal;
  text-align: center;
  opacity: 0;
}

.intro-mask-root.intro-mask-root--ready {
  opacity: 1;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sortie du nom : fondu uniquement (sans translation), puis fondu du calque blanc. */
.intro-mask-root.intro-mask-root--fade-out-name {
  opacity: 0;
  transition: opacity 0.45s ease;
}

.intro-name {
  margin: 0;
  font-family: "Angulus Rounded", sans-serif;
  font-size: clamp(3.8rem, 6.8vw, 8rem);
  line-height: 0.85;
  font-weight: 500;
  letter-spacing: 0.015em;
  color: #000;
}

.intro-overlay.intro-overlay--fade-out {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.34s ease !important;
}

.intro-mask-measure {
  position: absolute;
  left: -9999px;
  top: 0;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
  font-family: "Angulus Rounded", sans-serif;
  font-size: clamp(3.8rem, 6.8vw, 8rem);
  line-height: 0.85;
  font-weight: 500;
  letter-spacing: 0.015em;
  text-transform: none;
}

.intro-mask-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.intro-type-stack {
  position: relative;
  z-index: 1;
  display: inline-block;
  line-height: 0;
}

.intro-fo-inner {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #000;
  /* Masque = silhouette typo (même <mask> que le SVG) : le WebGL + la vidéo ne sont visibles que dans les lettres. */
  -webkit-mask-image: url(#introFlamesTextMask);
  mask-image: url(#introFlamesTextMask);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-type: luminance;
  mask-type: luminance;
}

/* Intro : même shader WebGL que le rail — pas d’aspect-ratio carte projet. */
.intro-fo-inner .intro-fo-gl.project-media-gl-root {
  width: 100%;
  height: 100%;
  min-height: 100%;
  aspect-ratio: auto;
}

.intro-fo-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.section {
  padding: 6px 20px 20px;
}

.section-title {
  margin: 0 0 8px;
  font-family: "Angulus Rounded", sans-serif;
  font-size: clamp(3.8rem, 6.8vw, 8rem);
  line-height: 0.85;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.015em;
}

.selected-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 24vw) 1fr;
  gap: 20px;
  height: var(--selected-block-h);
  align-items: start;
}

/* Titre Selected Works : toujours en effet négatif (difference) par-dessus les médias, jamais juste noir. */
.selected-layout .section-title {
  position: absolute;
  left: 0;
  align-self: start;
  margin-top: var(--selected-title-offset, calc(var(--selected-block-h) - var(--selected-media-h)));
  z-index: 6;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}

#selected-works.section {
  padding-top: 0;
  padding-bottom: 0;
  min-height: var(--selected-block-h);
}

.horizontal-track-wrap {
  position: absolute;
  left: -20px;
  right: -20px;
  top: 0;
  bottom: 0;
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  align-items: stretch;
}

.horizontal-track-wrap::-webkit-scrollbar {
  display: none;
}

.horizontal-track {
  display: flex;
  gap: 10px;
  width: max-content;
  height: 100%;
  flex: 0 0 auto;
  align-items: stretch;
  padding: 0 40px 0 min(34vw, 500px);
}

/* About : panneau qui glisse par-dessus le rail (droite → gauche) une fois « All projects » atteint. */
.home-about-panel {
  position: fixed;
  inset: 0;
  z-index: 10;
  box-sizing: border-box;
  display: flex;
  /* flex-start + marges auto : contenu centré s'il tient, sinon aligné en haut et scrollable en entier
     (évite le rognage du haut propre à align-items:center quand le texte dépasse). */
  align-items: flex-start;
  padding: clamp(58px, 8vh, 96px) clamp(20px, 5vw, 60px) 24px;
  background: var(--bg-about);
  box-shadow: -14px 0 36px rgba(0, 0, 0, 0.07);
  transform: translateX(100%);
  will-change: transform;
  pointer-events: none;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Snap magnétique : transition uniquement pendant l'alignement auto (pas pendant le scroll manuel). */
.home-about-panel.home-about-panel--snap {
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pages hors home : le panneau About s'ouvre/ferme au clic (toujours animé). */
.home-about-panel.home-about-panel--anim {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-about-panel.is-visible {
  pointer-events: auto;
}

/* Le panneau About blanc monte jusqu'en haut, derrière le menu → nav transparente sur la home. */
.page-home .home-nav-shell,
.page-home .nav-grid {
  background: transparent;
}

/* Quand le panneau About (clair) couvre l'écran : menu en sombre pour rester lisible (utile en W&B). */
html.page-home.home-about-open .nav-grid a,
html.page-home.home-about-open .nav-grid button {
  color: #000;
}

/* Page About dédiée : même exception de fond que le panneau About de la home. */
body.page-about,
body.page-about .nav-grid {
  background: var(--bg-about);
}

/* Page Images : grille pleine largeur, nav transparente en effet négatif (comme Selected Works). */
html.page-images {
  overflow-x: clip;
}

body.page-images {
  margin: 0;
  padding: 0;
  background: #000;
}

.page-images .images-nav-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  pointer-events: none;
}

.page-images .images-nav-shell .nav-grid {
  background: transparent;
  pointer-events: auto;
}

.page-images .nav-grid a,
.page-images .nav-grid button:not(.nav-burger) {
  color: #fff;
  mix-blend-mode: difference;
}

.page-images .nav-mmm,
.page-images .nav-mmm .nav-mmm__short,
.page-images .nav-mmm .nav-mmm__full {
  color: #fff;
  mix-blend-mode: difference;
}

.images-main {
  margin: 0;
  padding: 0;
}

.images-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
}

.images-grid__cell {
  display: block;
  aspect-ratio: 2100 / 2700;
  overflow: hidden;
  line-height: 0;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.images-grid__cell .images-grid__media,
.images-grid__cell img,
.images-grid__cell video,
.images-grid__cell .project-media-frame,
.images-grid__cell .project-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.images-grid__cell video[data-still-lazy-src] {
  background: #111;
}

@media (max-width: 900px) {
  .page-images .nav-mmm,
  .page-images .nav-mmm .nav-mmm__short {
    color: #fff;
    mix-blend-mode: difference;
  }

  .page-images .nav-burger {
    mix-blend-mode: difference;
  }

  .page-images .nav-burger__bar {
    background: #fff;
  }

  .images-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.home-about-panel::-webkit-scrollbar {
  display: none;
}

.home-about-panel .about-grid {
  width: 100%;
  margin-block: auto;
}

/* Fin du rail : même typo / taille que « Selected Works », calé en haut (aligné sur --selected-title-offset). */
.selected-all-projects {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: start;
  flex: 0 0 auto;
  min-width: min(28vw, 220px);
  padding: 0 12px 0 8px;
  margin-left: 6px;
  margin-top: var(--selected-title-offset, calc(var(--selected-block-h) - var(--selected-media-h)));
  text-decoration: none;
  color: var(--fg);
  font-family: "Angulus Rounded", sans-serif;
  font-size: clamp(3.8rem, 6.8vw, 8rem);
  line-height: 0.85;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.015em;
  z-index: 4;
}

.selected-all-projects:hover {
  opacity: 0.92;
}

.selected-all-projects:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.selected-all-projects__lines {
  display: block;
}

.selected-all-projects__arrow {
  display: block;
  margin-top: 0.06em;
  font-size: 0.5em;
  line-height: 1;
}

/* Home Selected Works : lien index = même style que les pages projet. */
.horizontal-track .project-link-figure--home-rail {
  flex: 0 0 auto;
  align-self: flex-end;
  width: var(--project-question-width);
  max-width: none;
  height: var(--project-media-h);
  margin: 0 0 0 6px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.project-card {
  width: min(34vw, 500px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  align-self: end;
  flex: 0 0 auto;
  height: auto;
}

.project-card > a {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  height: auto;
}

.project-meta {
  font-size: clamp(1.1rem, 1.4vw, 1.5rem);
  line-height: 1.1;
  text-transform: lowercase;
}

.project-media {
  width: 100%;
  height: auto;
  aspect-ratio: 2100 / 2700;
  object-fit: cover;
  object-position: center;
  background: #ddd;
  display: block;
}

.project-media-frame {
  position: relative;
  display: block;
  width: 100%;
}

/* CA — coins haut gauche / droite (selected works). */
.project-card .project-media-frame,
.project-card [data-media-bend-root],
.project-card .project-media-gl-root {
  border-top-left-radius: var(--media-ca-radius);
  border-top-right-radius: var(--media-ca-radius);
  overflow: hidden;
}

.project-card .project-media-gl-canvas,
.project-card .project-media-frame img.project-media,
.project-card .project-media-frame video.project-media,
.project-card [data-media-bend-root] .project-media {
  border-top-left-radius: var(--media-ca-radius);
  border-top-right-radius: var(--media-ca-radius);
}

/* Rail Selected Works : déformation au curseur — root = zone média uniquement (pas le loader). */
[data-media-bend-root] {
  position: relative;
  width: 100%;
  overflow: hidden;
  transform: translateZ(0);
  perspective: 1100px;
  perspective-origin: 50% 45%;
}

.project-media-bend {
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
}

.project-media-bend .project-media {
  display: block;
}

/* Home GL : vignettes Selected Works (canvas + image source pour texture) */
.project-media-gl-root {
  position: relative;
  width: 100%;
  aspect-ratio: 2100 / 2700;
}

.project-media-gl-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

.project-media-gl-source {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.project-media-gl-root--live .project-media-gl-canvas {
  z-index: 2;
}

.project-media-gl-root--live .project-media-gl-source {
  opacity: 0;
  pointer-events: none;
}

.project-media-gl-root--fallback .project-media-gl-canvas {
  display: none;
}

.project-media-frame img.project-media {
  position: relative;
  z-index: 0;
}

.project-media-frame__loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 230, 230, 0.88);
  transition: opacity 0.35s ease, visibility 0.35s ease;
  pointer-events: none;
}

.project-media-frame:not(.project-media-frame--loading) .project-media-frame__loader {
  opacity: 0;
  visibility: hidden;
}

.project-media-frame--error .project-media-frame__loader {
  opacity: 1;
  visibility: visible;
  background: rgba(245, 220, 220, 0.92);
}

.project-media-frame__spinner {
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  animation: project-media-frame-spin 0.65s linear infinite;
}

.project-media-frame--error .project-media-frame__spinner {
  display: none;
}

.project-media-frame--error .project-media-frame__loader::after {
  content: "×";
  font-size: 1.75rem;
  font-weight: 700;
  color: rgba(120, 0, 0, 0.75);
  line-height: 1;
}

@keyframes project-media-frame-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-media-frame__spinner {
    animation: none;
    border-top-color: rgba(0, 0, 0, 0.35);
  }
}

.about-col-text {
  min-width: 0;
}

.about-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin: 0;
  transition: grid-template-rows 0.75s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.45s ease;
  pointer-events: none;
}

.about-bio-inner {
  min-height: 0;
  overflow: hidden;
}

.about-panel.show {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 0.55em;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .about-panel {
    transition: none;
  }
}

.about-bio {
  font-family: "Hypertext Display", Arial, sans-serif;
  font-size: clamp(1.35rem, 2.5vw, 1.95rem);
  line-height: 1.42;
  letter-spacing: 0.02em;
  font-weight: 500;
  text-transform: none;
  max-width: 48ch;
  padding-bottom: 0.35rem;
}

.about-bio p {
  margin: 0 0 1em;
}

.about-bio p:last-child {
  margin-bottom: 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr min(35vw, 390px);
  gap: 20px;
  align-items: start;
}

/* Intro About : casse naturelle, typo grande, interlignage serré (EN comme FR). */
.about-text {
  font-family: "Angulus Rounded", sans-serif;
  font-size: clamp(3.35rem, 6.2vw, 7.4rem);
  line-height: 0.92;
  text-transform: none;
  margin: 0;
  letter-spacing: 0.015em;
}

.about-more-infos {
  display: inline-block;
  margin-top: 0.42em;
  font-size: clamp(1.35rem, 2.6vw, 2.1rem);
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: inherit;
  opacity: 0.88;
  font-family: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.about-more-infos:hover {
  opacity: 1;
}

.about-more-infos:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.about-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #ddd;
}

.index-filter-row {
  position: sticky;
  top: var(--nav-h, 56px);
  z-index: 15;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(10px, 2vw, 30px);
  margin: 0;
  padding: 12px 0;
  background: var(--bg);
  border-bottom: 2px solid var(--line);
  font-family: "Hypertext Display", Arial, sans-serif;
  font-size: clamp(1.05rem, 1.9vw, 1.5rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: lowercase;
}

.index-filter-row button {
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 6px 2px;
  text-transform: lowercase;
  white-space: nowrap;
}

/* Page index : fond gris ; filtres typologie en marron. */
body.page-index {
  background: var(--bg);
  --index-filter-fg: #8a8580;
}

body.page-index .nav-grid,
body.page-index .index-filter-row {
  background: var(--bg);
}

body.page-index .nav-grid a,
body.page-index .nav-grid button {
  color: var(--fg);
}

body.page-index .index-filter-row {
  color: var(--index-filter-fg);
  border-bottom-color: var(--line);
  margin-left: -20px;
  margin-right: -20px;
  padding-left: 20px;
  padding-right: 20px;
}

body.page-index .index-filter-row button {
  color: var(--index-filter-fg);
}

body.page-index .index-item .typo {
  color: #fff;
}

/* Page index : About passe devant la barre de filtres, mais sous le menu principal (nav reste visible). */
body.page-index .home-about-panel {
  z-index: 18;
}

/* Index + About ouvert : le fond blanc passe derrière le menu, la typo reste devant. */
html.home-about-open body.page-index .nav-grid,
html.contact-open body.page-index .nav-grid {
  z-index: 20;
  background: transparent;
}

html.home-about-open body.page-index .nav-grid a,
html.home-about-open body.page-index .nav-grid button,
html.contact-open body.page-index .nav-grid a,
html.contact-open body.page-index .nav-grid button {
  position: relative;
  z-index: 1;
  color: #000;
}

body.page-index .contact-overlay {
  z-index: 18;
}

.index-list {
  border-top: 0;
}

.index-item {
  display: grid;
  grid-template-columns: 160px 1fr minmax(240px, 340px);
  gap: 18px;
  padding: 8px 8px;
  border-bottom: 2px solid var(--line);
  align-items: center;
  font-size: clamp(2.1rem, 4.3vw, 4.2rem);
  line-height: 1;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.index-item .typo {
  color: #fff;
  text-align: right;
  font-family: inherit;
  font-size: 1em;
  white-space: nowrap;
  justify-self: end;
  transition: color 0.18s ease;
}

.index-item:hover {
  background: #000;
  color: #fff;
}

.index-item:hover .typo {
  color: #fff;
}

.index-hover-preview {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 120;
  will-change: transform, opacity;
  transition: opacity 0.18s ease;
}

.index-hover-preview.visible {
  opacity: 1;
}

.index-hover-preview-inner {
  width: auto;
  max-width: min(42vw, 320px);
  max-height: min(30vh, 260px);
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(0, 0, 0, 0.08);
  background: #111;
  line-height: 0;
}

.index-hover-preview-inner img,
.index-hover-preview-inner video {
  display: block;
  width: auto;
  height: auto;
  max-width: min(42vw, 320px);
  max-height: min(30vh, 260px);
  object-fit: contain;
}

body.index-cursor-preview-active {
  cursor: none;
}

body.site-cursor-active {
  cursor: none;
}

body.site-cursor-active a,
body.site-cursor-active button,
body.site-cursor-active .index-item,
body.site-cursor-active .project-card,
body.site-cursor-active .project-card a {
  cursor: none;
}

body.index-cursor-preview-active .nav-grid a,
body.index-cursor-preview-active .nav-grid button {
  cursor: none;
}

body.index-cursor-preview-active .index-filter-row button {
  cursor: none;
}

body.index-cursor-preview-active .index-list,
body.index-cursor-preview-active .index-item {
  cursor: none;
}

.index-cursor-ring,
.site-cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 121;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 2px 10px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  opacity: 0;
  will-change: transform;
}

.index-cursor-ring.visible,
.site-cursor-ring.visible {
  opacity: 1;
}

.detail-wrap {
  padding: 8px 20px 0;
  height: calc(100dvh - 50px);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.detail-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 8px;
  margin-bottom: 8px;
  height: min(22dvh, 220px);
  overflow: clip;
}

.detail-title {
  margin: 0;
  font-family: "Angulus Rounded", sans-serif;
  font-size: clamp(2rem, 4.8vw, 5.5rem);
  line-height: 0.9;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.015em;
}

/* Year only on index list, not on project detail */
.detail-wrap #year {
  display: none !important;
}

.detail-info {
  font-size: clamp(1rem, 1.3vw, 1.4rem);
}

.detail-header > div {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.detail-header > div::-webkit-scrollbar {
  display: none;
}

.detail-header .detail-info {
  margin: 0 0 10px;
}

.detail-col-main .detail-credits-block,
.detail-col-text {
  padding-right: 25%;
}

.detail-col-text {
  padding-top: 72px;
}

.detail-credits-text.detail-credits-text--rich {
  white-space: normal;
}

.detail-credits-text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.detail-credits-text a:hover {
  opacity: 1;
}

.detail-credits-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 0 10px;
}

.detail-credits-text {
  margin: 0;
  font-size: clamp(0.78rem, 0.95vw, 1rem);
  line-height: 1.2;
  opacity: 0.9;
  /* En-tête « Credits: » + jusqu'à 4 lignes de crédits affichées en entier (pas de « voir + »). */
  max-height: 6em;
  overflow: hidden;
  white-space: pre-line;
}

.detail-credits-block.expanded .detail-credits-text {
  max-height: none;
}

.detail-expand-btn {
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: clamp(0.78rem, 0.95vw, 1rem);
  line-height: 1.2;
  opacity: 0.7;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.detail-expand-btn:hover {
  opacity: 1;
}

/* Pop-up crédits : affiche l'intégralité des crédits par-dessus la page. */
.credits-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.credits-modal[hidden] {
  display: none;
}

/* Même flou que Contact (pas de carte / cadre). */
.credits-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.5);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  backdrop-filter: blur(18px) saturate(1.05);
  cursor: pointer;
}

.credits-modal__panel {
  position: relative;
  z-index: 1;
  width: min(560px, 92vw);
  max-height: min(80vh, 720px);
  overflow-y: auto;
  background: transparent;
  color: var(--fg);
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: clamp(48px, 8vh, 72px) clamp(20px, 4vw, 40px) clamp(32px, 5vh, 48px);
  animation: credits-modal-in 0.35s ease;
}

@keyframes credits-modal-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.credits-modal__close {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-family: Arial, sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 0;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.credits-modal__close:hover {
  opacity: 1;
  background: transparent;
  color: inherit;
}

.credits-modal__title {
  margin: 0 0 16px;
  padding-bottom: 0;
  border-bottom: none;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.credits-modal__body {
  font-size: clamp(0.85rem, 1vw, 1.02rem);
  line-height: 1.5;
  white-space: pre-line;
}

.credits-modal__body a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.credits-modal-open {
  overflow: hidden;
}

html.credits-modal-open .nav-grid {
  z-index: 130;
}

.detail-gallery {
  display: flex;
  flex-direction: row;
  gap: 10px;
  width: max-content;
  min-height: 100%;
  align-items: flex-end;
  flex-shrink: 0;
  padding-right: 0;
}

/* Nike hub : cartes sous-projets (titre + image naturelle + lien). */
html[data-project-slug="nike"] .detail-gallery--nike-selected {
  align-items: flex-end;
  padding-right: clamp(20px, 4vw, 48px);
}

html[data-project-slug="nike"] .detail-gallery--nike-selected .project-card {
  width: auto;
  max-width: none;
  min-width: 0;
  align-self: flex-end;
}

html[data-project-slug="nike"] .detail-gallery--nike-selected .project-card > a {
  height: auto;
}

html[data-project-slug="nike"] .detail-gallery--nike-selected figure.project-question-figure {
  align-self: flex-end;
}

html[data-project-slug="nike"] .detail-gallery--nike-selected .project-card .project-media-frame {
  display: block;
  width: fit-content;
  height: fit-content;
  line-height: 0;
  min-width: 0;
  aspect-ratio: unset;
  border-top-left-radius: var(--media-ca-radius);
  border-top-right-radius: var(--media-ca-radius);
  overflow: hidden;
}

/* Hauteur galerie fixe ; largeur = ratio natif (vidéos sans .project-media-frame incluses). */
html[data-project-slug="nike"] .detail-gallery--nike-selected .project-card--nike-sub .project-media,
html[data-project-slug="nike"] .detail-gallery--nike-selected .project-card--nike-sub video.project-media,
html[data-project-slug="nike"] .detail-gallery--nike-selected .project-card--nike-sub img.project-media {
  height: var(--project-media-h) !important;
  width: auto !important;
  max-height: var(--project-media-h);
  max-width: none;
  aspect-ratio: unset !important;
  object-fit: contain !important;
  object-position: left bottom;
  background: transparent !important;
  display: block;
  flex: 0 0 auto;
}

.project-watch-end {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  align-self: stretch;
  height: var(--project-media-h);
  padding-left: clamp(32px, 6vw, 88px);
  padding-right: clamp(48px, 12vw, 140px);
}

.detail-gallery figure.project-watch-figure {
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  height: var(--project-media-h);
}

.detail-gallery figure.project-watch-figure .project-watch-end {
  height: 100%;
  padding-left: 0;
  padding-right: clamp(24px, 5vw, 64px);
}

.project-watch-btn {
  width: clamp(86px, 9vw, 132px);
  height: clamp(86px, 9vw, 132px);
  padding: 0;
  flex: 0 0 auto;
}

.project-watch-btn .contact-btn__icon {
  width: 52%;
  height: 52%;
}

.project-watch-btn .contact-btn__icon svg {
  width: 100%;
  height: 100%;
}

/* Lien « voir projet » — même emprise et typo que les questions Angulus. */
.detail-gallery figure.project-link-figure--project {
  width: var(--project-question-width);
  max-width: none;
  height: var(--project-media-h);
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

a.project-link-frame {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

button.project-link-frame.project-media-preview-btn {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: inherit;
  color: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.project-link-figure--project .project-question-frame__line:not(.project-link-frame__arrow) {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1.5px;
  transition: background-size 0.34s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-link-frame__arrow {
  display: block;
  margin-top: 0.14em;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-link-figure--project:hover .project-question-frame__line:not(.project-link-frame__arrow),
.project-link-figure--project:focus-within .project-question-frame__line:not(.project-link-frame__arrow),
a.project-link-frame:hover .project-question-frame__line:not(.project-link-frame__arrow),
a.project-link-frame:focus-visible .project-question-frame__line:not(.project-link-frame__arrow),
button.project-link-frame:hover .project-question-frame__line:not(.project-link-frame__arrow),
button.project-link-frame:focus-visible .project-question-frame__line:not(.project-link-frame__arrow) {
  background-size: 100% 1.5px;
}

.project-link-figure--project:hover .project-link-frame__arrow,
.project-link-figure--project:focus-within .project-link-frame__arrow,
a.project-link-frame:hover .project-link-frame__arrow,
a.project-link-frame:focus-visible .project-link-frame__arrow,
button.project-link-frame:hover .project-link-frame__arrow,
button.project-link-frame:focus-visible .project-link-frame__arrow {
  transform: translateX(0.22em);
}

a.project-link-frame:focus-visible,
button.project-link-frame:focus-visible {
  outline: none;
}

.project-media-preview-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .project-link-frame__arrow {
    transition: none;
  }

  .project-link-figure--project:hover .project-link-frame__arrow,
  .project-link-figure--project:focus-within .project-link-frame__arrow,
  a.project-link-frame:hover .project-link-frame__arrow,
  a.project-link-frame:focus-visible .project-link-frame__arrow,
  button.project-link-frame:hover .project-link-frame__arrow,
  button.project-link-frame:focus-visible .project-link-frame__arrow {
    transform: none;
  }

  .project-link-figure--project .project-question-frame__line:not(.project-link-frame__arrow) {
    transition: none;
  }
}

/* Pop-up média projet (même fond flouté que Contact). */
.media-preview-overlay__inner {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(92vw, 1200px);
  max-height: min(88dvh, 900px);
}

.media-preview-overlay__stage {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-preview-overlay__media,
.media-preview-overlay__stage img,
.media-preview-overlay__stage video {
  display: block;
  max-width: 100%;
  max-height: min(88dvh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
}

html.media-preview-open .nav-grid {
  z-index: 130;
}

.detail-gallery-section {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 10px;
  flex: 0 0 auto;
}

/* Marara layout "pairs" : 1re figure pleine h. ; colonnes suivantes = 2 médias empilés (hauteur totale = une figure). */
.detail-gallery-section--marara-pairs {
  align-items: flex-end;
}

.detail-gallery-section__pair-column {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 10px;
  height: var(--project-media-h);
  width: max-content;
  flex-shrink: 0;
}

.detail-gallery .detail-gallery-section-title {
  margin: 0;
  align-self: flex-start;
  max-width: min(52vw, 640px);
  font-size: clamp(1.35rem, 3.2vw, 5.5rem);
  line-height: 0.85;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}

.detail-gallery-section--title-only {
  padding-right: min(10vw, 80px);
}

.detail-gallery figure {
  margin: 0;
  height: var(--project-media-h);
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  flex: 0 0 auto;
}

/* Questions projet — conteneur homothétique 2160×2700 */
.detail-gallery figure.project-question-figure {
  width: var(--project-question-width);
  max-width: none;
  align-items: flex-start;
  justify-content: flex-start;
}

.detail-gallery figure.project-question-figure--wide {
  width: calc(var(--project-question-width) * var(--project-question-wide-scale));
}

/* Espace blanc galerie — même emprise qu’une question ×1, sans contenu visible. */
.detail-gallery figure.project-gallery-spacer {
  width: var(--project-question-width);
  max-width: none;
  align-items: flex-start;
  justify-content: flex-start;
  pointer-events: none;
  flex: 0 0 auto;
}

.project-gallery-spacer__fill {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

.project-question-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: clamp(12px, 3.5%, 40px);
  box-sizing: border-box;
  border-top-left-radius: var(--media-ca-radius);
  border-top-right-radius: var(--media-ca-radius);
  overflow: hidden;
}

.project-question-frame--white-on-black {
  background: #000;
}

.project-question-frame--white-on-black .project-question-frame__text {
  color: #fff;
}

.project-question-frame--black-transparent {
  background: transparent;
}

.project-question-frame--black-transparent .project-question-frame__text {
  color: #000;
}

.project-question-frame--angulus-left {
  background: transparent;
  align-items: flex-start;
  justify-content: flex-start;
  height: auto;
  min-height: 0;
  padding: 0 clamp(12px, 3.5%, 40px) clamp(12px, 3.5%, 40px);
}

.project-question-frame--angulus-left .project-question-frame__text {
  color: #000;
  font-family: "Angulus Rounded", sans-serif;
  font-size: calc(min(66dvh, 760px) * 0.102);
  line-height: 0.94;
  letter-spacing: 0.012em;
  text-align: left;
  text-transform: none;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
}

.project-question-frame__text {
  font-family: "Reenie Beanie", cursive;
  color: #000;
  text-align: center;
  text-transform: uppercase;
  margin: 0;
  line-height: 0.92;
  font-size: calc(min(66dvh, 760px) * 0.078);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.04em;
}

.project-question-frame__line {
  display: block;
}

.project-question-figure--description .project-question-frame__line {
  white-space: nowrap;
}

/* Barre d'avancement galerie projet : tout en haut de la fenêtre (fixed). */
.detail-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--detail-scroll-progress-h);
  margin: 0;
  padding: 0;
  z-index: 140;
  background: var(--bg);
  overflow: hidden;
}

body:has(.detail-scroll-progress:not([hidden])) .nav-grid {
  top: var(--detail-scroll-progress-h, calc(8px / 3));
}

.detail-scroll-progress[hidden] {
  display: none;
}

.detail-scroll-progress__fill {
  display: block;
  height: 100%;
  width: 0;
  background: #000;
  will-change: width;
}

.detail-gallery-wrap {
  height: 100%;
  min-height: 0;
  margin-left: -20px;
  margin-right: -20px;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  align-items: flex-end;
}

.detail-gallery-wrap::-webkit-scrollbar {
  display: none;
}

/* Override global .project-media (100% width + fixed aspect) so PDF/WebP rails keep natural proportions */
.detail-gallery figure:not(.figure--mock3d) > .project-media-frame {
  display: flex;
  align-self: flex-end;
  width: fit-content;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  min-width: 0;
  position: relative;
  border-top-left-radius: var(--media-ca-radius);
  border-top-right-radius: var(--media-ca-radius);
  overflow: hidden;
}

/* CA — pages projet (vidéos hors mock 3D). */
.detail-gallery figure:not(.figure--mock3d) > video.project-media {
  border-top-left-radius: var(--media-ca-radius);
  border-top-right-radius: var(--media-ca-radius);
  overflow: hidden;
}

.detail-gallery figure > .project-media-frame > img.project-media,
.detail-gallery figure > .project-media-frame > [data-media-bend-root] img.project-media,
.detail-gallery figure > .project-media-frame > [data-media-bend-root] video.project-media {
  width: auto !important;
  max-width: min(92vw, 2800px);
  height: var(--project-media-h) !important;
  max-height: var(--project-media-h);
  aspect-ratio: unset !important;
  object-fit: contain !important;
  object-position: left bottom;
  background: transparent !important;
  display: block;
  flex: 0 0 auto;
  min-width: 0;
  align-self: flex-end;
}

.detail-gallery figure > .project-media-frame > video.project-media,
.detail-gallery figure > .project-media-frame > [data-media-bend-root] > .project-media-bend > video.project-media {
  width: auto !important;
  height: var(--project-media-h) !important;
  max-height: var(--project-media-h);
  max-width: min(92vw, 2800px);
  aspect-ratio: unset !important;
  object-fit: contain !important;
  object-position: left bottom;
  background: transparent;
  display: block;
  flex: 0 0 auto;
  min-width: 0;
  align-self: flex-end;
}

.detail-gallery figure > video.project-media {
  width: auto;
  height: 100% !important;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: left bottom;
  background: transparent;
  display: block;
  border-radius: 2px;
}

/*
 * Marara "pairs" : hauteur utile d’une colonne = --project-media-h (comme une figure seule).
 * Chaque moitié : (totale − gap) / 2 — doit partir APRÈS .detail-gallery figure pour gagner la cascade.
 */
.detail-gallery .detail-gallery-section__pair-column > figure {
  height: calc((var(--project-media-h) - 10px) / 2);
  width: fit-content;
  max-width: none;
  min-width: 0;
}

.detail-gallery .detail-gallery-section__pair-column--single > figure {
  height: var(--project-media-h);
  width: fit-content;
}

/* 2V : cadre serré sur le média (format 2100×2700 et paysage). */
.detail-gallery .detail-gallery-section__pair-column > figure > .project-media-frame {
  height: 100%;
  max-height: 100%;
  width: fit-content;
  max-width: none;
}

.detail-gallery .detail-gallery-section__pair-column > figure > .project-media-frame > img.project-media {
  max-height: 100% !important;
  height: 100% !important;
  width: auto !important;
  max-width: none !important;
  object-fit: contain !important;
  object-position: left bottom;
}

.detail-gallery .detail-gallery-section__pair-column > figure > .project-media-frame > video.project-media {
  height: 100% !important;
  max-height: 100% !important;
  width: auto;
  max-width: none;
  min-width: 0;
  object-fit: contain;
  object-position: left bottom;
}

.detail-gallery .detail-gallery-section__pair-column > figure > video.project-media {
  height: 100% !important;
  max-height: 100% !important;
  width: auto;
  min-width: calc((var(--project-media-h) - 10px) / 2 * 2100 / 2700);
  object-fit: contain;
  object-position: left bottom;
}

/* 1er média pleine hauteur (section 2V) : largeur homothétique 2100×2700, pas de marge latérale. */
.detail-gallery-section--marara-pairs > figure:first-child {
  width: fit-content;
  max-width: none;
}

.detail-gallery-section--marara-pairs > figure:first-child > .project-media-frame {
  width: fit-content;
  max-width: none;
}

.detail-gallery-section--marara-pairs > figure:first-child > .project-media-frame > img.project-media {
  width: auto !important;
  height: auto !important;
  max-height: var(--project-media-h) !important;
  max-width: none !important;
}

.detail-gallery-section--marara-pairs > figure:first-child > .project-media-frame > video.project-media {
  width: auto;
  height: auto !important;
  max-height: var(--project-media-h);
  max-width: none;
  object-fit: contain;
  object-position: left bottom;
}

/* Porches: PDF/WebP pages are very tall; avoid any residual stretch + cap width */
html[data-project-slug="porches-scope-marseille"] .detail-gallery figure > .project-media-frame > img.project-media {
  max-width: min(72vw, 1400px);
}

/* Marara campaign: section title follows cursor (double pill, ref. maquette) */
.marara-cursor-legend {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  pointer-events: none;
  will-change: transform;
}

.marara-cursor-legend__stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.marara-cursor-legend__pill {
  display: inline-block;
  padding: 0.42em 0.82em;
  background: #fff;
  color: #000;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.62rem, 1vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 999px;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
  max-width: min(88vw, 440px);
}

.marara-cursor-legend__pill--bottom {
  margin-left: 11px;
  margin-top: -7px;
}

.marara-cursor-legend__pill--top.marara-cursor-legend__pill--has-audio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
}

.marara-cursor-legend__pill-text {
  display: inline-block;
}

.marara-cursor-legend__audio {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.marara-cursor-legend__audio-svg {
  display: block;
  width: 1.15em;
  height: 1.15em;
}

.marara-cursor-legend__audio-svg--loud {
  width: 2em;
  height: 2em;
}

.marara-cursor-legend__pill--top.marara-cursor-legend__pill--audio-loud {
  padding: 0.5em 0.72em;
}

.marara-cursor-legend__pill--top.marara-cursor-legend__pill--audio-loud.marara-cursor-legend__pill--has-audio {
  gap: 0.35em;
}

.marara-cursor-legend--single .marara-cursor-legend__pill--bottom {
  display: none !important;
}

#gallery figure[data-hover-audio] video.project-media,
#gallery figure[data-marara-intro-audio] video.project-media {
  cursor: none;
}

body.site-cursor-active #gallery figure[data-hover-audio] video.project-media,
body.site-cursor-active #gallery figure[data-marara-intro-audio] video.project-media {
  cursor: none;
}

body.marara-cursor-active #gallery figure[data-marara-section] .project-media-frame img.project-media,
body.marara-cursor-active #gallery figure[data-marara-section] video.project-media,
body.site-cursor-active #gallery figure[data-marara-section] .project-media-frame img.project-media,
body.site-cursor-active #gallery figure[data-marara-section] video.project-media {
  cursor: none;
}

body.marara-cursor-active #gallery figure[data-marara-section].figure--mock3d .mock3d--project {
  cursor: none;
}

/* Marara campaign (v1): cadre chromé + ombre au sol, même logique que marara-3d-mockup-test.html */
@keyframes mararaMock3dFloat {
  0%,
  100% {
    transform: rotateX(6deg) rotateY(-4deg) translateZ(0);
  }
  50% {
    transform: rotateX(4deg) rotateY(5deg) translateZ(0);
  }
}

.detail-gallery figure.figure--mock3d {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  width: max-content;
  max-width: 100%;
}

.detail-gallery .mock3d--project {
  position: relative;
  box-sizing: border-box;
  perspective: 1200px;
  perspective-origin: 50% 40%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  /* Marge intérieure pour les rotations au curseur + translateZ du cadre (évite le débordement visuel) */
  padding: 24px 18px 22px;
}

.detail-gallery .mock3d--project .mock3d__tilt {
  position: relative;
  box-sizing: border-box;
  height: 100%;
  max-height: 100%;
  min-width: 0;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.15s ease-out;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  width: fit-content;
  max-width: 100%;
}

.detail-gallery .mock3d--project.is-idle .mock3d__tilt {
  animation: mararaMock3dFloat 7s ease-in-out infinite;
}

.detail-gallery .mock3d--project[data-mock-stagger="1"].is-idle .mock3d__tilt {
  animation-delay: -3.5s;
}

.detail-gallery .mock3d--project:not(.is-idle) .mock3d__tilt {
  animation: none;
}

.detail-gallery .mock3d__frame {
  position: relative;
  align-self: flex-start;
  flex: 0 1 auto;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  border-radius: 8px;
  padding: 6px 6px 8px;
  background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.2),
    0 4px 10px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateZ(10px);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
}

.detail-gallery .mock3d__frame::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.detail-gallery .mock3d__frame .project-media {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: auto !important;
  height: 100% !important;
  max-width: 100%;
  min-width: 0;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: left bottom;
  background: transparent;
  display: block;
  border-radius: 2px;
}

.detail-gallery .mock3d__base {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 72%;
  height: 14px;
  margin-left: -36%;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.18), transparent);
  border-radius: 50%;
  filter: blur(6px);
  transform: rotateX(78deg) translateZ(-32px);
  transform-origin: center top;
  opacity: 0.85;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .detail-gallery .mock3d--project.is-idle .mock3d__tilt {
    animation: none;
  }

  .detail-gallery .mock3d--project .mock3d__tilt {
    transition: none;
  }
}

@media (max-width: 900px) {
  :root {
    --mobile-gutter: max(12px, env(safe-area-inset-left, 0px));
    --mobile-gutter-r: max(12px, env(safe-area-inset-right, 0px));
    --mobile-nav-h: calc(max(10px, env(safe-area-inset-top, 0px)) + clamp(2rem, 9.2vw, 2.85rem) + 18px);
    --selected-media-h: min(68dvh, 560px);
  }

  .selected-layout,
  .about-grid,
  .detail-header {
    grid-template-columns: 1fr;
  }

  /* Nav mobile : burger fixed top-right, panneau pleine hauteur depuis la droite. */
  body.nav-open {
    overflow: hidden;
  }

  .page-home .home-nav-shell {
    transform: none !important;
  }

  .nav-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 180;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.32s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  body.nav-open .nav-drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-grid {
    flex-wrap: nowrap;
    overflow: visible;
    justify-content: flex-start;
    align-items: center;
    column-gap: 12px;
    row-gap: 0;
    padding: max(10px, env(safe-area-inset-top)) max(56px, calc(env(safe-area-inset-right) + 44px)) 10px
      max(12px, env(safe-area-inset-left));
  }

  .nav-grid > :nth-child(1) {
    flex: 1 1 auto;
    min-width: 0;
    margin-right: 0;
  }

  .nav-mmm,
  .nav-mmm .nav-mmm__short {
    font-size: clamp(2rem, 9.2vw, 2.85rem);
    line-height: 0.95;
    color: #000;
  }

  .nav-burger {
    display: inline-flex;
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    z-index: 200;
    flex: 0 0 auto;
    margin: 0;
    color: #000;
  }

  body.nav-open .nav-burger {
    z-index: 210;
    color: #fff;
  }

  body.nav-open .nav-burger__bar {
    background: #fff;
  }

  body.nav-open .nav-mmm,
  body.nav-open .nav-mmm .nav-mmm__short {
    color: #fff;
    z-index: 210;
  }

  .nav-burger__bar {
    background: #000;
  }

  /* Mobile : pas de Selected Works dans le menu. */
  .nav-selected-works,
  .nav-grid a[href="/#selected-works"],
  .nav-grid button[data-go="selected"],
  .nav-grid__menu .nav-selected-works,
  .nav-grid__menu a[href="/#selected-works"],
  .nav-grid__menu button[data-go="selected"] {
    display: none !important;
  }

  .nav-grid__menu {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 190;
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 100dvh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2.4vh, 28px);
    margin: 0;
    padding: max(88px, calc(env(safe-area-inset-top) + 72px)) max(20px, env(safe-area-inset-right))
      max(28px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    box-sizing: border-box;
    background: #000;
    color: #fff;
    box-shadow: none;
    transform: translate3d(0, -100%, 0);
    transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: 0;
    text-align: center;
  }

  .nav-grid__menu .lang-toggle--in-drawer {
    position: static;
    right: auto;
    bottom: auto;
    z-index: auto;
    display: flex;
    gap: clamp(16px, 5vw, 28px);
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: clamp(20px, 4vh, 40px);
    padding: clamp(16px, 3vh, 24px) 0 4px;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: none;
  }

  .nav-grid__menu .lang-toggle--in-drawer .lang-toggle__btn {
    min-height: 48px;
    min-width: auto;
    padding: 8px 4px;
    font-family: "Angulus Rounded", sans-serif;
    font-size: clamp(1.35rem, 5.5vw, 2rem);
    font-weight: 500;
    letter-spacing: 0.015em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0.45;
  }

  .nav-grid__menu .lang-toggle--in-drawer .lang-toggle__btn.is-active {
    opacity: 1;
  }

  .lang-toggle:not(.lang-toggle--in-drawer) {
    display: none !important;
  }

  @supports (height: 100svh) {
    .nav-grid__menu {
      height: 100svh;
      max-height: 100svh;
      min-height: 100svh;
    }
  }

  .nav-grid--open .nav-grid__menu,
  body.nav-open .nav-grid__menu {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav-grid a,
  .nav-grid button.nav-contact,
  .nav-grid__menu a,
  .nav-grid__menu button {
    flex: 0 0 auto;
    min-height: auto;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 0;
    font-size: clamp(1.12rem, 4.8vw, 1.55rem);
    color: #000;
    text-align: left;
    justify-content: flex-start;
  }

  .nav-grid__menu a,
  .nav-grid__menu button {
    width: auto;
    max-width: 100%;
    padding: clamp(6px, 1.2vh, 12px) 0;
    font-family: "Angulus Rounded", sans-serif;
    font-size: clamp(2.1rem, 9.5vw, 3.75rem);
    font-weight: 500;
    letter-spacing: 0.015em;
    line-height: 0.95;
    text-transform: uppercase;
    color: #fff;
    text-align: center;
    justify-content: center;
    background-image: none;
    background-size: unset;
    text-decoration: none;
  }

  .nav-grid__menu a:hover,
  .nav-grid__menu a:focus,
  .nav-grid__menu a:focus-visible,
  .nav-grid__menu button:hover,
  .nav-grid__menu button:focus,
  .nav-grid__menu button:focus-visible {
    background-image: none;
    background-size: unset;
    text-decoration: none;
  }

  .nav-grid > :nth-child(2) {
    margin-left: 0;
  }

  .nav-grid[data-mobile-nav-ready] .nav-grid__menu > :first-child {
    margin-left: 0;
  }

  .page-home .nav-grid {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(56px, calc(env(safe-area-inset-right) + 44px));
  }

  #selected-works.section {
    min-height: auto;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  /* Home : Selected Works pleine largeur, grille 2 colonnes. */
  html.page-home {
    overflow-x: clip;
    overflow-y: auto;
  }

  .page-home .section,
  .page-home #selected-works.section {
    padding-left: 0;
    padding-right: 0;
    padding-top: 4px;
  }

  .selected-layout {
    height: auto;
    min-height: auto;
    gap: 0;
  }

  .selected-layout .section-title {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 0 10px;
    mix-blend-mode: normal;
    color: var(--fg);
    pointer-events: auto;
    font-size: clamp(2.85rem, 14.5vw, 4.35rem);
    line-height: 0.88;
    padding-left: var(--mobile-gutter);
    padding-right: var(--mobile-gutter-r);
  }

  .horizontal-track-wrap {
    position: relative;
    left: 0;
    right: 0;
    top: auto;
    bottom: auto;
    height: auto;
    margin-top: 0;
    overflow: visible;
    touch-action: auto;
    scroll-snap-type: none;
    width: 100%;
  }

  .horizontal-track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    height: auto;
    padding: 0;
    gap: 5px;
    align-items: stretch;
  }

  .project-card {
    width: 100%;
    min-width: 0;
    max-width: none;
    align-self: stretch;
    scroll-snap-align: none;
  }

  .project-card > a {
    align-items: stretch;
  }

  .project-card .project-media,
  .project-card .project-media-frame,
  .project-card [data-media-bend-root],
  .project-card .project-media-gl-root {
    width: 100%;
    max-width: 100%;
  }

  .project-card .project-media,
  .project-card .project-media-frame {
    max-height: none;
    aspect-ratio: 2100 / 2700;
  }

  .project-card .project-meta {
    font-size: clamp(0.82rem, 3.2vw, 1rem);
    padding: 0 4px;
  }

  .selected-all-projects,
  .horizontal-track .project-link-figure--home-rail {
    grid-column: 1 / -1;
  }

  .selected-all-projects {
    width: 100%;
    min-width: 0;
    font-size: clamp(2.4rem, 8vw, 3.6rem);
    padding: 12px var(--mobile-gutter) 4px;
    margin-top: 0;
    align-self: stretch;
    scroll-snap-align: none;
  }

  .horizontal-track .project-link-figure--home-rail {
    width: min(78%, var(--project-question-width));
    max-width: calc(100% - var(--mobile-gutter) - var(--mobile-gutter-r));
    height: auto;
    min-height: 0;
    margin: 0 var(--mobile-gutter);
    align-self: flex-start;
  }

  /* Index mobile : typo seule ; clic → déplie média + lien projet. */
  body.page-index .section {
    padding-left: var(--mobile-gutter);
    padding-right: var(--mobile-gutter-r);
  }

  body.page-index .index-filter-row {
    display: none;
  }

  .index-list--fold {
    display: flex;
    flex-direction: column;
    margin-left: calc(-1 * var(--mobile-gutter));
    margin-right: calc(-1 * var(--mobile-gutter-r));
    padding: 0 0 max(24px, env(safe-area-inset-bottom));
    border-top: 2px solid var(--line);
  }

  .index-item--fold {
    display: block;
    border-bottom: 2px solid var(--line);
    transition: background-color 0.18s ease, color 0.18s ease;
  }

  .index-item--fold.index-item--open {
    background: #000;
    color: #fff;
  }

  /* Desktop-like row : année (haut gauche) | titre | typologie (haut droite). */
  .index-item--fold .index-item__toggle {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) minmax(56px, 30vw);
    grid-template-areas: "year title typo";
    gap: 4px 8px;
    align-items: start;
    width: 100%;
    margin: 0;
    padding: 10px 6px;
    border: 0;
    background: transparent;
    color: inherit;
    font-family: "Hypertext Display", Arial, sans-serif;
    font-size: clamp(1.35rem, 5.4vw, 2.1rem);
    line-height: 1;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
    pointer-events: auto;
    position: relative;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    transition: background-color 0.18s ease, color 0.18s ease;
  }

  .index-item--fold .index-item__year {
    grid-area: year;
    align-self: start;
    justify-self: start;
    padding-right: 2px;
  }

  .index-item--fold .index-item__title {
    grid-area: title;
    align-self: start;
    justify-self: start;
    min-width: 0;
    text-align: left;
  }

  .index-item--fold .index-item__typo {
    grid-area: typo;
    align-self: start;
    justify-self: end;
    color: var(--index-filter-fg, #8a8580);
    text-align: right;
    font-family: inherit;
    font-size: 1em;
    white-space: nowrap;
    transition: color 0.18s ease;
  }

  .index-item--fold.index-item--open .index-item__typo {
    color: #fff;
  }

  .index-item__reveals {
    display: grid;
    grid-template-rows: 0fr;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
      grid-template-rows 0.42s cubic-bezier(0.4, 0, 0.2, 1),
      max-height 0.42s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.28s ease;
  }

  .index-item--open .index-item__reveals {
    grid-template-rows: 1fr;
    max-height: min(80dvh, 720px);
    opacity: 1;
    pointer-events: auto;
  }

  .index-item__reveals-inner {
    overflow: hidden;
    min-height: 0;
    padding: 0;
  }

  .index-item--open .index-item__reveals-inner {
    padding: 0 4px 16px;
  }

  .index-item__media-link {
    display: block;
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .index-item__media {
    width: 100%;
    aspect-ratio: 2100 / 2700;
    max-height: min(72dvh, 640px);
    overflow: hidden;
    background: #ddd;
    line-height: 0;
  }

  .index-item__media .project-media-frame,
  .index-item__media .project-media-gl-root,
  .index-item__media img,
  .index-item__media video {
    width: 100%;
    height: 100%;
    max-height: 100%;
    aspect-ratio: unset;
    object-fit: cover;
    display: block;
  }

  .index-item__project-link {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    font-family: "Angulus Rounded", sans-serif;
    font-size: clamp(1.05rem, 4.2vw, 1.35rem);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.015em;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.18em;
  }

  .index-item--open .index-item__project-link {
    color: #fff;
  }

  /* Index : filtres visibles (retour ligne) ; pas de preview curseur au doigt. */
  .index-filter-row {
    overflow-x: visible;
    overflow-y: visible;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: flex-start;
    gap: 8px 16px;
    padding-top: 10px;
    padding-bottom: 14px;
    font-size: clamp(1.15rem, 4.6vw, 1.45rem);
  }

  .index-filter-row button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 8px 2px;
  }

  .index-hover-preview,
  .index-cursor-ring,
  .site-cursor-ring {
    display: none !important;
  }

  body.site-cursor-active,
  body.index-cursor-preview-active {
    cursor: auto;
  }

  .index-item:not(.index-item--fold) {
    grid-template-columns: 92px 1fr;
    min-height: 44px;
    align-items: center;
  }

  .index-item:not(.index-item--fold) .typo {
    grid-column: 1 / -1;
    text-align: left;
  }

  /* Projet : galerie verticale, scroll page, marges réduites. */
  .detail-wrap {
    height: auto;
    min-height: calc(100dvh - 50px);
    overflow: visible;
    grid-template-rows: auto auto;
    padding: 4px var(--mobile-gutter-r) 0 var(--mobile-gutter);
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .detail-scroll-progress {
    display: none !important;
  }

  .detail-header {
    height: auto;
    max-height: none;
    overflow: visible;
    margin-bottom: 12px;
    gap: 12px;
    width: 100%;
  }

  .detail-header > div {
    height: auto;
    overflow: visible;
    width: 100%;
    max-width: 100%;
  }

  .detail-col-main,
  .detail-col-text {
    width: 100%;
    max-width: 100%;
  }

  .detail-title {
    width: 100%;
    max-width: 100%;
    font-size: clamp(2.75rem, 13vw, 4.5rem);
    line-height: 0.88;
  }

  .detail-info {
    font-size: clamp(0.95rem, 3.6vw, 1.12rem);
    line-height: 1.35;
  }

  .detail-col-text {
    padding-top: 0;
    padding-right: 0;
  }

  .detail-col-main .detail-credits-block {
    padding-right: 0;
  }

  .detail-credits-text {
    font-size: clamp(0.9rem, 3.2vw, 1.05rem);
    line-height: 1.4;
  }

  .detail-gallery-wrap {
    height: auto;
    min-height: 0;
    overflow: visible;
    display: block;
    margin-left: calc(-1 * var(--mobile-gutter));
    margin-right: calc(-1 * var(--mobile-gutter-r));
    width: calc(100% + var(--mobile-gutter) + var(--mobile-gutter-r));
    touch-action: auto;
  }

  .detail-gallery {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-height: 0;
    gap: 8px;
  }

  .detail-gallery-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
    width: 100%;
  }

  .detail-gallery-section__pair-column {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
  }

  .detail-gallery-section--marara-pairs,
  .detail-gallery .detail-gallery-section-title,
  .detail-gallery figure.project-question-figure,
  .detail-gallery figure.project-question-figure--wide,
  .detail-gallery figure.project-gallery-spacer,
  .detail-gallery figure.project-link-figure--project,
  .detail-gallery figure.project-watch-figure,
  .detail-gallery figure.figure--mock3d,
  html[data-project-slug="nike"] .detail-gallery--nike-selected .project-card {
    grid-column: 1 / -1;
  }

  .detail-gallery-section--marara-pairs {
    align-items: stretch;
  }

  .detail-gallery .detail-gallery-section-title {
    mix-blend-mode: normal;
    color: var(--fg);
    max-width: 100%;
    margin-bottom: 4px;
  }

  .detail-gallery-section__pair-column {
    width: 100%;
    height: auto;
  }

  .detail-gallery figure {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    min-width: 0;
    align-items: stretch;
    justify-content: stretch;
  }

  .detail-gallery figure.project-question-figure {
    width: min(88%, var(--project-question-width));
    max-width: 100%;
    aspect-ratio: auto;
    height: auto;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .detail-gallery figure.project-question-figure--wide {
    width: min(96%, calc(var(--project-question-width) * var(--project-question-wide-scale)));
  }

  .detail-gallery figure.project-gallery-spacer {
    width: min(88%, var(--project-question-width));
    max-width: 100%;
    height: auto;
    min-height: 0;
  }

  .detail-gallery figure.project-gallery-spacer .project-gallery-spacer__fill {
    height: auto;
    aspect-ratio: 2160 / 2700;
  }

  .detail-gallery figure.project-link-figure--project,
  .horizontal-track .project-link-figure--home-rail {
    width: min(88%, var(--project-question-width));
    max-width: 100%;
    height: auto;
    align-items: flex-start;
    justify-content: flex-start;
  }

  html[data-project-slug="nike"] .detail-gallery--nike-selected .project-card {
    width: 100%;
    max-width: 100%;
    align-items: flex-start;
  }

  html[data-project-slug="nike"] .detail-gallery--nike-selected .project-card > a {
    align-items: flex-start;
  }

  html[data-project-slug="nike"] .detail-gallery--nike-selected .project-card .project-media-frame {
    width: fit-content;
    max-width: 100%;
    margin: 0;
  }

  html[data-project-slug="nike"] .detail-gallery--nike-selected .project-card--nike-sub .project-media,
  html[data-project-slug="nike"] .detail-gallery--nike-selected .project-card--nike-sub video.project-media,
  html[data-project-slug="nike"] .detail-gallery--nike-selected .project-card--nike-sub img.project-media {
    height: auto !important;
    max-height: var(--project-media-h);
    width: 100% !important;
    max-width: 100%;
    object-fit: contain !important;
  }

  .project-question-frame__text {
    font-size: clamp(1.6rem, 7vw, 2.4rem);
  }

  .project-question-frame--angulus-left .project-question-frame__text {
    font-size: clamp(1.95rem, 8.8vw, 3.15rem);
    line-height: 0.96;
  }

  /* Galerie projet mobile : 1 col., pleine largeur sans recadrage latéral. */
  .detail-gallery figure:not(.figure--mock3d) > .project-media-frame,
  .detail-gallery figure:not(.figure--mock3d) > .project-media-frame > [data-media-bend-root] {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: hidden;
    background: transparent;
    aspect-ratio: unset;
  }

  .detail-gallery figure:not(.figure--mock3d) > .project-media-frame {
    align-self: stretch;
  }

  .detail-gallery .project-media-frame video.project-media,
  .detail-gallery figure:not(.figure--mock3d) > video.project-media,
  .detail-gallery figure:not(.figure--mock3d) > .project-media-frame > video.project-media,
  .detail-gallery figure:not(.figure--mock3d) > .project-media-frame > [data-media-bend-root] video.project-media,
  .detail-gallery figure:not(.figure--mock3d) [data-media-bend-root] .project-media,
  .detail-gallery .mock3d__frame .project-media {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    min-width: 0 !important;
    aspect-ratio: 2100 / 2700;
    object-fit: contain !important;
    object-position: left bottom;
    display: block;
    background: transparent;
  }

  .detail-gallery figure:not(.figure--mock3d) > .project-media-frame > img.project-media,
  .detail-gallery figure:not(.figure--mock3d) [data-media-bend-root] img.project-media {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-width: 0 !important;
    aspect-ratio: unset !important;
    object-fit: contain !important;
    object-position: left bottom;
    display: block;
  }

  .detail-gallery figure:not(.figure--mock3d) [data-media-bend-root] {
    width: 100%;
    max-width: 100%;
    height: auto;
    overflow: hidden;
  }

  .detail-gallery .detail-gallery-section__pair-column {
    height: auto;
    width: 100%;
    max-width: 100%;
  }

  .detail-gallery .detail-gallery-section__pair-column > figure {
    height: auto;
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .detail-gallery .detail-gallery-section__pair-column--single > figure {
    height: auto;
  }

  .detail-gallery-section--marara-pairs > figure:first-child {
    width: 100%;
    max-width: 100%;
  }

  .detail-gallery .detail-gallery-section__pair-column > figure > .project-media-frame,
  .detail-gallery-section--marara-pairs > figure:first-child > .project-media-frame {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .detail-gallery .detail-gallery-section__pair-column > figure > .project-media-frame > img.project-media,
  .detail-gallery .detail-gallery-section__pair-column > figure > .project-media-frame > video.project-media,
  .detail-gallery .detail-gallery-section__pair-column > figure > video.project-media,
  .detail-gallery-section--marara-pairs > figure:first-child > .project-media-frame > img.project-media,
  .detail-gallery-section--marara-pairs > figure:first-child > .project-media-frame > video.project-media,
  .detail-gallery-section--marara-pairs > figure:first-child > video.project-media {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none;
    min-width: 0 !important;
    object-fit: contain !important;
    object-position: left bottom;
  }

  html[data-project-slug="porches-scope-marseille"] .detail-gallery figure > .project-media-frame > img.project-media {
    max-width: 100% !important;
  }

  .project-card .project-media-gl-root--fallback video.project-media-gl-source {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    pointer-events: none;
  }

  .detail-gallery .mock3d--project {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
  }

  .detail-gallery .mock3d--project .mock3d__tilt {
    height: auto;
    max-height: none;
  }

  .detail-gallery .mock3d__frame {
    width: 100%;
    height: auto;
    max-height: none;
  }

  .project-watch-end {
    height: auto;
    align-self: stretch;
    justify-content: center;
    padding: 16px 0 8px;
  }

  /* Contact : boutons empilés, plus faciles à toucher. */
  .contact-overlay {
    padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
      max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }

  .contact-overlay__inner {
    flex-direction: column;
    gap: 20px;
    width: min(92vw, 360px);
  }

  .contact-btn--mail {
    width: 100%;
    justify-content: center;
  }
}

/* ===========================================================
   CONTACT : deux gros boutons (mail / Instagram), fond flouté
   =========================================================== */
.contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: min(24px, 5vw);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.contact-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease;
}

.contact-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.5);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  backdrop-filter: blur(18px) saturate(1.05);
  cursor: pointer;
}

.contact-overlay__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 36px);
  transform: translateY(14px) scale(0.98);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.45s ease;
}

.contact-overlay.is-open .contact-overlay__inner {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  border: 6px solid transparent;
  border-radius: 999px;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease,
    border-color 0.25s ease;
}

/* Hover : contour (couleur typo), fond transparent, typo + logo en couleur typo. */
.contact-btn:hover,
.contact-btn:focus-visible {
  background: transparent;
  border-color: var(--fg);
  color: var(--fg);
  transform: translateY(-3px);
}

.contact-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contact-btn__icon svg {
  display: block;
  width: 100%;
  height: auto;
}

.contact-btn--mail {
  gap: clamp(14px, 1.9vw, 28px);
  padding: clamp(10px, 1.2vw, 17px) clamp(34px, 4vw, 64px);
}

.contact-btn--mail .contact-btn__icon {
  width: clamp(46px, 4.6vw, 72px);
}

.contact-btn__label {
  font-family: "Angulus Rounded", sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: clamp(2.7rem, 4.4vw, 5rem);
  line-height: 1;
}

.contact-btn--insta {
  width: clamp(86px, 9vw, 132px);
  height: clamp(86px, 9vw, 132px);
  padding: 0;
  flex: 0 0 auto;
}

/* Icône centrée dans le cercle : taille déterministe (évite le décalage horizontal). */
.contact-btn--insta .contact-btn__icon {
  width: 52%;
  height: 52%;
}

.contact-btn--insta .contact-btn__icon svg {
  width: 100%;
  height: 100%;
}

/* Menu au-dessus du flou quand Contact est ouvert : la croix reste cliquable. */
html.contact-open .nav-grid,
html.contact-open .home-nav-shell,
html.media-preview-open .nav-grid,
html.media-preview-open .home-nav-shell {
  z-index: 130;
}

@media (prefers-reduced-motion: reduce) {
  .contact-overlay,
  .contact-overlay__inner,
  .contact-btn {
    transition: none;
  }
}

/* ===== Bascule de langue FR / ENG : coin bas droit, sans fond ===== */
.lang-toggle {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  gap: 2px;
  align-items: center;
  background: transparent;
  padding: 8px 10px;
  border-radius: 0;
  box-shadow: none;
}

.lang-toggle__btn {
  border: 0;
  background: transparent;
  color: #000;
  font: 600 12px/1 ui-monospace, Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 6px;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.15s ease;
}

.lang-toggle__btn:hover {
  opacity: 0.8;
}

.lang-toggle__btn.is-active {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}
