/* ---------------------------------------------------------------------------
   Base — socle partagé par tous les thèmes.
   Ne contient aucune décision d'identité : uniquement la mécanique, les
   polices, les états et les surfaces du navigateur.
--------------------------------------------------------------------------- */

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-100900-0.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage";
  src: url("../assets/fonts/bricolage-200800-0.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Spectral";
  src: url("../assets/fonts/spectral-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Spectral";
  src: url("../assets/fonts/spectral-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../assets/fonts/instrument-serif-normal-1.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Spectral";
  src: url("../assets/fonts/spectral-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Spectral";
  src: url("../assets/fonts/spectral-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../assets/fonts/instrument-serif-italic-0.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Anton";
  src: url("../assets/fonts/anton-400-0.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Spline Mono";
  src: url("../assets/fonts/spline-mono-400-0.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Spline Mono";
  src: url("../assets/fonts/spline-mono-500-1.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Le rebond élastique reste, le tirer-pour-recharger s'arrête ici. */
  overscroll-behavior-y: contain;
}

body {
  margin: 0;
  min-height: 100svh;
  overscroll-behavior-y: contain;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

picture {
  display: contents;
}

/* Protection des photos : pas de menu d'enregistrement à l'appui long.
   Le texte reste sélectionnable (aucun user-select:none global). */
img,
picture {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--select-bg, currentColor);
  color: var(--select-ink, Canvas);
}

:focus-visible {
  outline: 2px solid var(--focus, currentColor);
  outline-offset: 3px;
  border-radius: 1px;
}

* {
  scrollbar-color: var(--bar, #777) transparent;
  scrollbar-width: thin;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--skip-bg, #111);
  color: var(--skip-ink, #fff);
  font-size: 13px;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus-visible {
  transform: none;
}

/* Conteneur d'image : le LQIP est porté par le parent, l'image le recouvre. */
.frame {
  position: relative;
  overflow: hidden;
  background-color: var(--tint, #1a1a1a);
  background-size: cover;
  background-position: center;
}
.frame img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: transparent;
}

/* Révélation au défilement : visible par défaut, animée seulement si JS. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0ms);
}
.js [data-reveal].in {
  opacity: 1;
  transform: none;
}

/* Réglages d'aperçu. */
.no-lightbox [data-lb] {
  cursor: default;
}


.no-intro .intro {
  display: none !important;
}

.no-captions figcaption,
.no-captions .lb-cap,
.no-captions .cap,
.no-captions .cap-no,
.no-captions .cap-row,
.no-captions .fr-cap,
.no-captions .shot-cap,
.no-captions .spread-caption,
.no-captions .tile-cap,
.no-captions .project-hero-cap,
.no-captions .shot figcaption,
.no-captions .plate figcaption,
.no-captions .fr figcaption {
  display: none !important;
}

/* Lightbox commune. */
dialog.lb {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--lb-bg, #0a0a0a);
  color: var(--lb-ink, #f2f2f2);
  overscroll-behavior: contain;
}
dialog.lb::backdrop {
  background: rgb(0 0 0 / 0.6);
}
.lb[open] {
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  font-size: 12px;
}
.lb-stage {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 18px;
}
.lb-stage img {
  max-width: 100%;
  max-height: calc(100svh - 150px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.lb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px 22px;
  font-size: 12px;
}
.lb button {
  background: none;
  border: 1px solid currentColor;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}
.lb button:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}


/* Projection */
/* ---------------------------------------------------------------------------
   Projection — salle obscure : plein écran, serif fine, majuscules espacées.
--------------------------------------------------------------------------- */

:root {
  --bg: #121212;
  --ink: #f1ece3;
  --muted: #9a948a;
  --rule: color-mix(in srgb, var(--ink) 16%, transparent);
  --gap: 6px;
  --pad: clamp(16px, 3.4vw, 44px);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Spline Mono", ui-monospace, monospace;
  --focus: #f1ece3;
  --select-bg: #f1ece3;
  --select-ink: #121212;
  --bar: #4a4844;
}

html[data-mode="light"] {
  --bg: #f4f1ea;
  --ink: #14120f;
  --muted: #5f5a50;
  --rule: color-mix(in srgb, var(--ink) 18%, transparent);
  --focus: #14120f;
  --select-bg: #14120f;
  --select-ink: #f4f1ea;
  --bar: #b8b2a6;
}

html[data-gutter="espace"] {
  --gap: 22px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
}

/* --- Bandeau ------------------------------------------------------------ */

.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 22px var(--pad);
  color: var(--ink);
  mix-blend-mode: normal;
}

.nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 34px);
}

.nav--right {
  justify-content: flex-end;
}

.nav a,
.foot-nav a {
  font-family: var(--serif);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: inherit;
  text-decoration: none;
}

.nav a:hover,
.foot-nav a:hover {
  opacity: 0.6;
}

.brand {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  text-align: center;
  white-space: nowrap;
}

/* --- Diaporama ---------------------------------------------------------- */

.hero {
  position: relative;
  height: 100svh;
  overflow: hidden;
  background: #0b0b0b;
}

.slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.slide.is-on {
  opacity: 1;
}

.slide-img {
  display: block;
  width: 100%;
  height: 100%;
}

.slide-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-title {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
  pointer-events: none;
  color: #f6f2ea;
  text-shadow: 0 2px 30px rgb(0 0 0 / 0.35);
}

.hero-title h1,
.hero-title .intro-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4.6vw, 62px);
  letter-spacing: 0.06em;
  line-height: 1;
}

.hero-title p,
.intro-role {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(10px, 0.9vw, 12px);
  text-transform: uppercase;
  letter-spacing: 0.34em;
  color: rgb(246 242 234 / 0.82);
}

.hero-arrows {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(10px, 1.6vw, 26px);
  pointer-events: none;
}

.arrow {
  pointer-events: auto;
  width: 46px;
  height: 46px;
  border: 0;
  background: transparent;
  color: rgb(246 242 234 / 0.85);
  font-family: var(--serif);
  font-size: 20px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.arrow:hover {
  opacity: 1;
  transform: scale(1.08);
}

.hero-count {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 3vw, 34px);
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgb(246 242 234 / 0.7);
}

/* --- Mur d'images ------------------------------------------------------- */

.wall {
  padding: clamp(48px, 8vw, 120px) var(--pad) clamp(40px, 6vw, 90px);
}

.wall h2,
.ig h2 {
  margin: 0 0 clamp(26px, 4vw, 56px);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(13px, 1.1vw, 15px);
  text-transform: uppercase;
  letter-spacing: 0.36em;
  text-align: center;
}

.masonry {
  columns: 3;
  column-gap: var(--gap);
}

.tile {
  display: block;
  break-inside: avoid;
  margin: 0 0 var(--gap);
  text-decoration: none;
}

.tile-img {
  display: block;
  background-size: cover;
  background-position: center;
}

.tile-img img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.3s ease;
}

.tile:hover .tile-img img {
  opacity: 0.85;
}

/* --- Instagram ---------------------------------------------------------- */

.ig {
  padding: clamp(30px, 6vw, 80px) var(--pad) clamp(50px, 8vw, 110px);
  text-align: center;
  border-top: 1px solid var(--rule);
}

.ig h2 {
  margin-bottom: 18px;
}

.ig-handle {
  font-family: var(--serif);
  font-size: clamp(18px, 2.4vw, 30px);
  letter-spacing: 0.14em;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 3px;
}

.ig-handle:hover {
  border-color: var(--ink);
}

/* --- Page série --------------------------------------------------------- */

.serie-head {
  padding: clamp(120px, 16vh, 190px) var(--pad) clamp(30px, 5vw, 60px);
  text-align: center;
}

.serie-meta {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.serie-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 88px);
  line-height: 1;
  letter-spacing: 0.04em;
}

.masonry--serie {
  padding: 0 var(--pad);
}

.next {
  padding: clamp(40px, 6vw, 80px) var(--pad);
  text-align: center;
  border-top: 1px solid var(--rule);
  margin-top: clamp(30px, 5vw, 60px);
}

.next p {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.next a {
  font-family: var(--serif);
  font-size: clamp(24px, 3.6vw, 46px);
  color: inherit;
  text-decoration: none;
}

.next a:hover {
  opacity: 0.7;
}

/* --- Pied --------------------------------------------------------------- */

.foot {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: clamp(40px, 6vw, 70px) var(--pad) clamp(30px, 4vw, 50px);
  border-top: 1px solid var(--rule);
  text-align: center;
}

.foot-brand {
  margin: 0;
  font-family: var(--serif);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
}

.foot-nav {
  display: flex;
  gap: 24px;
}

.foot-meta {
  margin: 0;
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

/* --- Intro -------------------------------------------------------------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-content: center;
  background: #0b0b0b;
  pointer-events: none;
  animation: intro-out 0.9s ease 1.1s forwards;
}

/* L'intro réutilise exactement le titre du héros : même typo, même place. */
.intro .hero-title {
  position: static;
  inset: auto;
}

.intro .hero-title h1,
.hero-title .intro-title {
  animation: intro-in 0.9s 0.1s both;
}

@keyframes intro-in {
  from {
    opacity: 0;
  }
}

@keyframes intro-out {
  to {
    opacity: 0;
  }
}

/* --- Palettes ----------------------------------------------------------- */

html[data-palette="brun"][data-mode="dark"] {
  --bg: #171310;
  --ink: #f4ece0;
  --muted: #a89a8a;
}

html[data-palette="brun"][data-mode="light"] {
  --bg: #f5ede1;
  --ink: #1a1510;
  --muted: #6b5f52;
}

html[data-palette="nuit"][data-mode="dark"] {
  --bg: #0e1420;
  --ink: #eef0f4;
  --muted: #8f98a8;
}

html[data-palette="nuit"][data-mode="light"] {
  --bg: #edf1f7;
  --ink: #0f1620;
  --muted: #56606f;
}

/* --- Adaptations -------------------------------------------------------- */

@media (max-width: 1000px) {
  .masonry {
    columns: 2;
  }
}

@media (max-width: 640px) {
  .masonry {
    columns: 1;
  }

  .top {
    grid-template-columns: 1fr auto;
    row-gap: 10px;
  }

  .nav--left {
    order: 2;
  }

  .brand {
    order: 1;
    text-align: left;
    font-size: 13px;
    letter-spacing: 0.24em;
  }

  .nav--right {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .serie-head {
    text-align: left;
  }
}
