/* ---------------------------------------------------------------------------
   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;
  }
}


/* Bloc */
/* ---------------------------------------------------------------------------
   Bloc — aplats de couleur, titre surdimensionné, images qui débordent.
--------------------------------------------------------------------------- */

:root {
  --ink: #141310;
  --paper: #f4f1e9;
  --band: #141310;
  --band-ink: #f4f1e9;
  --band-muted: #b9b5a8;
  --radius: 36px;
  --pad: clamp(18px, 3.4vw, 52px);
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Spline Mono", ui-monospace, monospace;
  --focus: #141310;
  --select-bg: #141310;
  --select-ink: #f4f1e9;
  --bar: #8d8a80;
}

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

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

.top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: center;
  min-height: 84px;
  padding: 14px var(--pad);
  background: var(--band);
  color: var(--band-ink);
}

.wordmark {
  margin: 0;
  font-size: clamp(24px, 3.6vw, 52px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.role,
.top-mail {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b9b5a8;
}

.top-mail {
  color: var(--band-ink);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--band-ink) 40%, transparent);
  padding-bottom: 2px;
}

.top-mail:hover {
  border-color: var(--band-ink);
}

/* --- Blocs -------------------------------------------------------------- */

.block {
  --fg-current: var(--fg);
  background: var(--bg);
  color: var(--fg-current);
}

/* En sombre, l'aplat du projet se pose sur un fond profond de sa couleur. */
html[data-mode="dark"] .block {
  --fg-current: var(--fg-dark);
  background: var(--bg-dark);
  color: var(--fg-dark);
}

.block-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  min-height: calc(100svh - 84px);
  padding: clamp(30px, 4.4vw, 64px) var(--pad);
  align-items: start;
}

.block-head {
  grid-column: 1;
  grid-row: 1;
}

.block-no {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--fg-current) 85%, var(--bg));
}

.block-title {
  margin: 0;
  font-size: clamp(40px, 7.6vw, 124px);
  font-weight: 800;
  line-height: 0.84;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  text-wrap: balance;
}

.block-media {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
  height: min(66svh, 700px);
  margin-right: calc(var(--pad) * -1);
  border-radius: var(--radius) 0 0 var(--radius);
  overflow: hidden;
  background: rgb(0 0 0 / 0.12);
}

.block-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.block:hover .block-media img {
  transform: scale(1.03);
}

.block-foot {
  grid-column: 1;
  grid-row: 3;
  align-self: end;
  display: grid;
  gap: 12px;
  justify-items: start;
}

.block-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border: 2px solid var(--fg-current);
  border-radius: 999px;
  color: var(--fg-current);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.block-cta:hover {
  background: var(--fg-current);
  color: var(--bg);
}

.block-meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: color-mix(in srgb, var(--fg-current) 85%, var(--bg));
}

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

.foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px var(--pad);
  background: var(--band);
  color: var(--band-muted);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.foot p {
  margin: 0;
}

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

.foot a:hover {
  color: var(--paper);
}

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

.page {
  --fg-current: var(--fg);
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg-current);
  padding: 0 var(--pad);
}

/* En sombre, la page projet prend la variante profonde de l'aplat. */
html[data-mode="dark"] .page {
  --fg-current: var(--fg-dark);
  background: var(--bg-dark);
  color: var(--fg-dark);
}

.project-head {
  padding: clamp(24px, 3.4vw, 44px) 0 clamp(26px, 4vw, 48px);
}

.project-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--fg-current);
}

.project-back,
.project-kind {
  margin: 0;
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.project-back {
  color: var(--fg-current);
  text-decoration: none;
}

.project-back:hover {
  text-decoration: underline;
}

.project-kind {
  color: color-mix(in srgb, var(--fg-current) 85%, var(--bg));
}

.project-head h1 {
  margin: clamp(18px, 3vw, 34px) 0 14px;
  font-size: clamp(46px, 9.6vw, 150px);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  text-wrap: balance;
}

.project-meta {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: color-mix(in srgb, var(--fg-current) 85%, var(--bg));
}

.project-sum {
  margin: 0;
  max-width: 56ch;
  font-size: 14.5px;
  line-height: 1.65;
}

.project-body {
  padding-bottom: clamp(30px, 5vw, 60px);
}

/* Colonnes plutôt que grille : une verticale et une horizontale voisines se
   placent sans laisser de vide sous la plus courte. */
.plates {
  columns: 2;
  column-gap: clamp(16px, 2.2vw, 28px);
  padding-top: clamp(20px, 3vw, 36px);
  border-top: 2px solid var(--fg-current);
}

.plate {
  break-inside: avoid;
  margin: 0 0 clamp(16px, 2.2vw, 28px);
}

.plate-img {
  display: block;
  aspect-ratio: var(--ar);
  border-radius: 24px;
  overflow: hidden;
}

.plate-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.plate-link:hover .plate-img img {
  transform: scale(1.03);
}

.plate figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.45;
  color: color-mix(in srgb, var(--fg-current) 85%, var(--bg));
}

.next {
  margin-top: clamp(36px, 6vw, 72px);
  padding-top: 18px;
  border-top: 2px solid var(--fg-current);
}

.next a {
  display: grid;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}

.next span {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--fg-current) 85%, var(--bg));
}

.next strong {
  font-size: clamp(30px, 5vw, 72px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.next a:hover strong {
  opacity: 0.7;
}

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

/* Le bloc traverse l'écran dans un seul sens : il entre par le haut, tient,
   puis continue vers le bas — le site apparaît derrière lui. */
.intro {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  background: #ff4d3d;
  animation:
    intro-in 0.7s cubic-bezier(0.76, 0, 0.24, 1) both,
    intro-out 0.75s cubic-bezier(0.76, 0, 0.24, 1) 1.15s forwards;
}

.intro span {
  position: absolute;
  inset: auto 0 0 0;
  height: 34%;
  background: #1b2be0;
}

@keyframes intro-in {
  from {
    transform: translateY(-101%);
  }
}

@keyframes intro-out {
  to {
    transform: translateY(101%);
  }
}

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

@media (max-width: 900px) {
  .top {
    grid-template-columns: 1fr auto;
  }

  .role {
    display: none;
  }

  .block-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    min-height: 0;
    gap: 20px;
    padding: 26px var(--pad) 40px;
  }

  .block-media {
    grid-column: 1;
    grid-row: 2;
    height: 58svh;
    margin-right: 0;
    border-radius: 28px;
  }

  .block-foot {
    grid-column: 1;
    grid-row: 3;
  }

  .block-title {
    font-size: clamp(38px, 11vw, 64px);
  }

  .plates {
    columns: 1;
  }

  .foot {
    flex-wrap: wrap;
  }
}

/* --- Options du thème --------------------------------------------------- */

html.no-bleed .block-media {
  margin-right: 0;
  border-radius: var(--radius);
}

html[data-radius="net"] .block-media {
  border-radius: 0;
}

html[data-radius="net"] .plate-img {
  border-radius: 0;
}

html[data-mode="dark"] {
  --paper: #0f0f0d;
  --ink: #f4f1e9;
  --band: #121210;
  --band-ink: #f4f1e9;
  --band-muted: #a8a496;
  --focus: #f4f1e9;
  --select-bg: #f4f1e9;
  --select-ink: #0f0f0d;
  --bar: #57544b;
}

html[data-mode="dark"] .role {
  color: var(--band-muted);
}

/* --- Titre des blocs ---------------------------------------------------- */

html[data-titlesize="contenu"] .block-title {
  font-size: clamp(30px, 5vw, 76px);
  letter-spacing: -0.035em;
}
