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


/* Répertoire */
/* ---------------------------------------------------------------------------
   Répertoire — sommaire typographique, couverture révélée au survol.
--------------------------------------------------------------------------- */

:root {
  --paper: #fafaf7;
  --ink: #101010;
  --muted: #6e6c64;
  --rule: #dddbd2;
  --focus: #101010;
  --select-bg: #101010;
  --select-ink: #fafaf7;
  --bar: #c9c6bb;
  --pad: clamp(18px, 4vw, 64px);
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Spline Mono", ui-monospace, monospace;
}

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

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

.top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--ink);
}

.top-name {
  font-weight: 600;
  font-size: 15px;
  font-stretch: 84%;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-decoration: none;
}

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

.top-role {
  margin: 0;
  color: var(--muted);
}

.top-mail {
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
}

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

/* --- Sommaire ----------------------------------------------------------- */

.list {
  position: relative;
  min-height: calc(100svh - 130px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 calc(var(--pad) * -1);
  padding: 0 var(--pad);
  isolation: isolate;
}

.list-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #0c0c0a;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s;
}

.list.is-active .list-media {
  opacity: 1;
  visibility: visible;
}

.list-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.55s ease, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.list-media img.is-on {
  opacity: 1;
  transform: scale(1);
}

.list-shade {
  position: absolute;
  inset: 0;
  background: rgb(8 8 6 / 0.7);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.list.is-active .list-shade {
  opacity: 1;
}

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
  transition: border-color 0.35s ease;
}

/* Sur l'aperçu, le filet supérieur se retire : il coupait la photo. */
.list.is-active .rows {
  border-top-color: transparent;
}

.row {
  border-bottom: 1px solid var(--rule);
}

.row-link {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto 78px 22px;
  gap: clamp(10px, 2vw, 28px);
  align-items: center;
  padding: clamp(14px, 1.8vw, 22px) 0;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.35s ease, padding 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.list.is-active .row-link {
  color: #f4f1ea;
}

.list.is-active .row-link:not(:hover):not(:focus-visible) {
  color: rgb(244 241 234 / 0.55);
}

.row-link:hover,
.row-link:focus-visible {
  padding-left: clamp(8px, 1.2vw, 18px);
}

.row-no,
.row-meta,
.row-count {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.35s ease;
}

.list.is-active .row-no,
.list.is-active .row-meta,
.list.is-active .row-count {
  color: rgb(244 241 234 / 0.6);
}

.row-title {
  font-size: clamp(30px, 4.8vw, 66px);
  font-weight: 600;
  font-stretch: 72%;
  line-height: 0.94;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-count {
  text-align: right;
}

.row-arrow {
  font-size: 15px;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.row-link:hover .row-arrow,
.row-link:focus-visible .row-arrow {
  opacity: 1;
  transform: none;
}

.row-thumb {
  display: none;
}

/* --- Note --------------------------------------------------------------- */

.note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(20px, 6vw, 90px);
  padding: clamp(50px, 8vw, 100px) 0;
  border-top: 1px solid var(--ink);
}

.note p {
  margin: 0;
  max-width: 52ch;
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.55;
}

.note-meta {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.9;
  color: var(--muted);
  text-align: right;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 30px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.foot p {
  margin: 0;
}

.foot a {
  text-decoration: none;
  color: var(--ink);
}

.foot a:hover {
  border-bottom: 1px solid var(--ink);
}

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

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.bar a {
  text-decoration: none;
}

.bar a:hover {
  color: var(--muted);
}

.dossier {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 72px) 0 clamp(40px, 6vw, 80px);
}

.kicker {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.dossier-head h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 6.6vw, 84px);
  font-weight: 600;
  font-stretch: 70%;
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-wrap: balance;
}

.dossier-meta {
  margin: 0 0 22px;
  padding-top: 12px;
  border-top: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.dossier-sum {
  margin: 0 0 clamp(40px, 6vw, 70px);
  max-width: 58ch;
  font-size: 15.5px;
  line-height: 1.65;
}

/* Plusieurs photos par rangée sur grand écran : deux colonnes, chacune au
   format de sa photo (pas de trous, contrairement à une grille régulière). */
.plates {
  columns: 2;
  column-gap: clamp(20px, 2.4vw, 34px);
}

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

.plate-img {
  display: block;
  aspect-ratio: var(--ar);
}

.plate-link {
  display: block;
}

.plate-link:hover .plate-img {
  outline: 1px solid var(--ink);
  outline-offset: 5px;
}

.plate figcaption {
  display: flex;
  gap: 12px;
  padding-top: 10px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
}

.plate-no {
  color: var(--ink);
  flex: none;
}

.next {
  margin-top: clamp(50px, 8vw, 100px);
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}

.next a {
  display: grid;
  gap: 6px;
  text-decoration: none;
}

.next span {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.next strong {
  font-size: clamp(26px, 4vw, 54px);
  font-weight: 600;
  font-stretch: 72%;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.next a:hover strong {
  color: var(--muted);
}

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

.intro {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: var(--pad);
  background: var(--paper);
  pointer-events: none;
  animation: intro-out 0.6s cubic-bezier(0.76, 0, 0.24, 1) 1s forwards;
}

.intro-name {
  font-size: clamp(42px, 9vw, 120px);
  font-weight: 600;
  font-stretch: 70%;
  line-height: 0.88;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  animation: intro-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.intro-line {
  height: 1px;
  background: var(--ink);
  transform-origin: left;
  animation: intro-line 0.7s cubic-bezier(0.76, 0, 0.24, 1) 0.1s both;
}

.intro-meta {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  animation: intro-in 0.6s 0.15s both;
}

@keyframes intro-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes intro-line {
  from {
    transform: scaleX(0);
  }
}

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

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

@media (max-width: 900px) {
  .plates {
    columns: 1;
  }

  .top {
    grid-template-columns: 1fr auto;
  }

  .top-role {
    display: none;
  }

  .list {
    min-height: 0;
    padding-top: 20px;
  }

  .list-media {
    display: none;
  }

  .rows {
    border-top-color: var(--rule);
  }

  .row-link {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px 12px;
    align-items: start;
  }

  .row-no {
    grid-row: span 2;
    padding-top: 4px;
  }

  .row-title {
    font-size: clamp(28px, 9vw, 42px);
    white-space: normal;
  }

  .row-thumb {
    display: block;
    grid-row: span 2;
    width: 92px;
    height: 66px;
    overflow: hidden;
  }

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

  .row-meta {
    grid-column: 2;
  }

  .row-count,
  .row-arrow {
    display: none;
  }

  .note {
    grid-template-columns: 1fr;
  }

  .note-meta {
    text-align: left;
  }

  .dossier {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .list-media img {
    transform: none;
  }
}

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

.no-preview .list-media {
  display: none;
}

.no-preview .list.is-active .row-link,
.no-preview .list.is-active .row-no,
.no-preview .list.is-active .row-meta,
.no-preview .list.is-active .row-count {
  color: var(--ink);
}

.no-preview .list.is-active .row-no,
.no-preview .list.is-active .row-meta,
.no-preview .list.is-active .row-count {
  color: var(--muted);
}

[data-measure="wide"] .dossier {
  max-width: 1040px;
}

/* --- Mode clair / sombre --- */
html[data-mode="dark"] {
  --paper: #0e0f0d;
  --ink: #f1efe8;
  --muted: #a29f94;
  --rule: #2e2f2a;
  --focus: #f1efe8;
  --select-bg: #f1efe8;
  --select-ink: #0e0f0d;
  --bar: #4a4a44;
}

/* --- Sortie d'intro : balayage vers la droite --- */

/* Sortie : l'index est balayé vers la droite. */
@keyframes intro-out {
  to {
    transform: translateX(101%);
  }
}

/* Le chiffre remplace le filet. */
.intro-count {
  font-family: var(--mono);
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  animation: intro-pop 0.6s 0.1s both;
}

@keyframes intro-pop {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}


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



/* Palettes : variantes du mode opposé. */

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

html[data-palette="ivoire"][data-mode="light"] {
  --paper: #f4efe3;
  --ink: #12100c;
  --muted: #6b6457;
  --rule: #ddd6c6;
}

html[data-palette="ivoire"][data-mode="dark"] {
  --paper: #16120c;
  --ink: #efe9dd;
  --muted: #a89f8f;
  --rule: #332f27;
}

html[data-palette="bleu"][data-mode="light"] {
  --paper: #eef1f4;
  --ink: #0f1318;
  --muted: #5f6873;
  --rule: #d6dbe0;
}

html[data-palette="bleu"][data-mode="dark"] {
  --paper: #0f1620;
  --ink: #e8eef8;
  --muted: #9aa6b3;
  --rule: #2f3844;
}
