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


/* Tirage */
/* ---------------------------------------------------------------------------
   Tirage — chambre noire : tirages sur fil, lumière rouge, grain.
--------------------------------------------------------------------------- */

:root {
  --bg: #140d0b;
  --paper: #f4eee2;
  --ink: #efe2d2;
  --muted: #bda893;
  --red: #ff7a5c;
  --lamp: #c9402f;
  --rule: color-mix(in srgb, var(--ink) 18%, transparent);
  --pad: clamp(16px, 2.6vw, 44px);
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "Spline Mono", ui-monospace, monospace;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --focus: #ff7a5c;
  --select-bg: #efe2d2;
  --select-ink: #140d0b;
  --bar: #8a6a5c;
}



body {
  margin: 0;
  padding: 0 var(--pad);
  background:
    radial-gradient(120% 72% at 50% -12%, color-mix(in srgb, var(--lamp) 30%, transparent) 0%, transparent 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}

/* Le grain : une texture fine par-dessus toute la page. */
html:not(.no-grain) body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)'/%3E%3C/svg%3E");
}

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

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--rule);
}

.top-name {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(24px, 2.8vw, 38px);
  font-weight: 400;
  line-height: 1;
  color: inherit;
  text-decoration: none;
}

.top-role {
  margin: 0;
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.top-mail {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
}

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

/* --- Planches ----------------------------------------------------------- */

.planche {
  padding: clamp(34px, 5vw, 74px) 0 0;
}

.planche-head {
  display: grid;
  gap: 4px;
  margin-bottom: clamp(30px, 4vw, 46px);
}

.planche-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 400;
  line-height: 0.98;
}

.planche-meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* Le fil : les tirages y sont suspendus. */
.fil {
  display: flex;
  align-items: flex-start;
  gap: clamp(18px, 2.6vw, 40px);
  padding: 34px 0 10px;
  border-top: 1px solid var(--rule);
  overflow-x: auto;
  scrollbar-width: none;
}

.fil::-webkit-scrollbar {
  display: none;
}

.fil .print {
  flex: none;
  width: min(34vw, 340px);
}

.planche-link {
  display: inline-block;
  justify-self: start;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.planche-link:hover {
  color: var(--ink);
}

/* --- Tirage ------------------------------------------------------------- */

.print {
  position: relative;
  margin: 0;
  padding: 12px 12px 10px;
  background: var(--paper);
  color: #2f2620;
  box-shadow:
    0 18px 40px rgb(0 0 0 / 0.45),
    0 2px 6px rgb(0 0 0 / 0.3);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.print:hover {
  transform: rotate(0deg) translateY(-4px);
}

.clip {
  position: absolute;
  top: -16px;
  left: 50%;
  width: 14px;
  height: 30px;
  transform: translateX(-50%);
  background: #4a423c;
  border-radius: 2px;
  box-shadow: inset 0 -6px 0 rgb(0 0 0 / 0.35);
}

.print-img {
  display: block;
  overflow: hidden;
  aspect-ratio: var(--ar);
  background: #1c1512;
}

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

.print figcaption {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.45;
  color: #6d5c4e;
}

.print-no {
  color: #a8462f;
  flex: none;
}

/* --- Page projet -------------------------------------------------------- */

.darkroom {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 76px) 0 0;
}

.single-head {
  margin-bottom: clamp(34px, 5vw, 56px);
}

.single-head h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 400;
  line-height: 0.95;
}

.single-meta {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.single-sum {
  margin: 0;
  max-width: 54ch;
  font-size: 15px;
  line-height: 1.65;
}

.tirages {
  display: grid;
  gap: clamp(40px, 6vw, 80px);
}

.tirages .print {
  width: min(100%, 620px);
}

.tirages .print:nth-child(even) {
  justify-self: end;
}

.next {
  margin-top: clamp(50px, 7vw, 100px);
  padding: 20px 0 clamp(30px, 4vw, 50px);
  border-top: 1px solid var(--rule);
}

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

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

.next strong {
  font-family: var(--serif);
  font-size: clamp(28px, 4.4vw, 58px);
  font-weight: 400;
  line-height: 1;
}

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

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

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

.foot p {
  margin: 0;
}

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

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

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

.intro {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 26px;
  background: #0b0605;
  pointer-events: none;
  animation: intro-out 0.7s cubic-bezier(0.76, 0, 0.24, 1) 1.25s forwards;
}

.intro-lamp {
  width: clamp(120px, 18vw, 220px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--red) 85%, white) 0%,
    var(--lamp) 42%,
    transparent 72%
  );
  animation: intro-lamp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.intro-name {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 4.4vw, 56px);
  line-height: 1;
  color: var(--paper);
  animation: intro-name 0.7s 0.25s both;
}

@keyframes intro-lamp {
  from {
    opacity: 0;
    transform: scale(0.35);
  }
}

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

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

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

@media (max-width: 900px) {
  .fil .print {
    width: 74vw;
  }

  .top {
    flex-wrap: wrap;
    gap: 6px 16px;
  }

  .top-role {
    order: 3;
    flex-basis: 100%;
  }

  .tirages .print {
    width: 100%;
  }

  .tirages .print:nth-child(even) {
    justify-self: stretch;
  }
}

html[data-mode="light"] {
  --bg: #efe7d8;
  --paper: #fbf8f0;
  --ink: #2a211a;
  --muted: #6d5c4e;
  --red: #a8462f;
  --lamp: #d9b28a;
  --rule: color-mix(in srgb, var(--ink) 20%, transparent);
  --focus: #a8462f;
  --select-bg: #2a211a;
  --select-ink: #efe7d8;
  --bar: #b39c88;
}

/* Lumière en mode papier : l'accent change, le fond reste clair. */

/* --- Lumière (palette) --------------------------------------------------- */

html[data-lumiere="ambre"] {
  --lamp: #c98a35;
  --red: #ffc07a;
}

html[data-lumiere="vert"] {
  --lamp: #5f9e6c;
  --red: #9fe3ab;
}

html[data-lumiere="ambre"][data-mode="light"] {
  --red: #8a5a1f;
  --lamp: #c9a06a;
}

html[data-lumiere="vert"][data-mode="light"] {
  --red: #3f6b4a;
  --lamp: #a8c9a4;
}
