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


/* Panneau */
/* ---------------------------------------------------------------------------
   Panneau — deux colonnes : identité fixe, images qui défilent.
--------------------------------------------------------------------------- */

:root {
  --panel: #1b211a;
  --panel-ink: #f1ede1;
  --panel-dim: #9a9c8f;
  --paper: #ece8df;
  --ink: #141511;
  --muted: #5e5a50;
  --rule: #d6d1c5;
  --focus: #f1ede1;
  --select-bg: #1b211a;
  --select-ink: #ece8df;
  --bar: #b9b3a4;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Spline Mono", ui-monospace, monospace;
}

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

.split {
  display: grid;
  grid-template-columns: minmax(290px, 34%) minmax(0, 1fr);
  min-height: 100svh;
}

/* --- Panneau ------------------------------------------------------------ */

.panel {
  position: sticky;
  top: 0;
  height: 100svh;
  border-radius: 0 28px 28px 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(22px, 2.6vw, 40px);
  background: var(--panel);
  color: var(--panel-ink);
  overflow: hidden;
}

.panel-head {
  display: grid;
  gap: 10px;
}

.panel-name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3vw, 50px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: inherit;
  text-decoration: none;
}

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

.panel-name a:hover {
  color: #fff;
}

.panel-role,
.panel-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--panel-dim);
}

.panel-tag {
  margin: 6px 0 0;
  max-width: 30ch;
  font-size: 13px;
  line-height: 1.55;
  color: rgb(241 237 225 / 0.82);
}

.panel-nav {
  margin-top: 10px;
}

.panel-nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.panel-nav a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid rgb(241 237 225 / 0.16);
  color: var(--panel-dim);
  text-decoration: none;
  transition: color 0.25s ease, padding 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel-nav ol li:last-child a {
  border-bottom: 1px solid rgb(241 237 225 / 0.16);
}

.panel-nav a:hover {
  color: var(--panel-ink);
}

.panel-nav .n {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.panel-nav .t {
  font-family: var(--serif);
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.1;
}

.panel-nav .y {
  font-family: var(--mono);
  font-size: 9px;
}

.panel-nav a.is-current {
  color: var(--panel-ink);
  padding-left: 10px;
}

.panel-nav a.is-current .n {
  color: var(--panel-ink);
}

.panel-nav a.is-current .t {
  font-style: italic;
}

.panel-foot {
  margin-top: auto;
  display: grid;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid rgb(241 237 225 / 0.16);
}

.panel-count {
  margin: 0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--panel-dim);
}

.panel-count [data-current] {
  color: var(--panel-ink);
}

.panel-mail {
  font-size: 12.5px;
  color: var(--panel-ink);
  text-decoration: none;
  border-bottom: 1px solid rgb(241 237 225 / 0.3);
  justify-self: start;
  padding-bottom: 1px;
}

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

.panel-place {
  margin: 0;
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--panel-dim);
}

/* --- Flux --------------------------------------------------------------- */

.feed {
  padding: clamp(18px, 3.2vw, 54px);
  min-width: 0;
}

.chapter {
  width: min(74%, 620px);
  margin: 0 0 clamp(46px, 9vh, 96px);
}

.chapter:nth-of-type(even) {
  margin-left: auto;
}

.chapter-link {
  display: grid;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.chapter-img {
  display: block;
  aspect-ratio: var(--ar, 4 / 5);
  overflow: hidden;
  border-radius: 20px;
}

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

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

.chapter-meta {
  display: grid;
  gap: 2px;
}

.chapter-title {
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.05;
}

.chapter-sub,
.chapter-count {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.chapter-count {
  color: var(--ink);
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(20px, 4vh, 40px);
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 9.5px;
  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(--ink);
}

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

.panel--project {
  gap: 18px;
}

.panel-back {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--panel-dim);
  text-decoration: none;
}

.panel-back:hover {
  color: var(--panel-ink);
}

.panel-title {
  margin: 2px 0 4px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 3.6vw, 58px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.panel-credits {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgb(241 237 225 / 0.16);
}

.panel-credits div {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 8px;
}

.panel-credits dt {
  font-family: var(--mono);
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--panel-dim);
}

.panel-credits dd {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.4;
}

.panel-sum {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgb(241 237 225 / 0.78);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
}

.feed--project {
  display: grid;
  gap: clamp(30px, 5vh, 60px);
  align-content: start;
}

.plate {
  margin: 0;
}

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

.plate-link {
  display: block;
}

/* Pas de contour au survol : la photo reste nette, sans cadre ajouté. */
.plate-link:hover .plate-img img,
.feed-link:hover .feed-img img {
  transform: scale(1.015);
}

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

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

.next {
  margin-top: clamp(20px, 4vh, 40px);
  padding-top: 16px;
  border-top: 1px solid var(--ink);
}

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

.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-weight: 400;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1;
}

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

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

.intro {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: var(--panel);
  pointer-events: none;
  animation: intro-out 0.7s cubic-bezier(0.76, 0, 0.24, 1) 0.55s forwards;
}


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

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

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

@media (max-width: 900px) {
  .split {
    display: block;
  }

  .panel {
    position: static;
    height: auto;
    /* Bande pleine largeur : plus de coin arrondi d'un seul côté. */
    border-radius: 0;
    padding: 24px 18px 26px;
    gap: 16px;
  }

  .panel-tag,
  .panel-place {
    display: none;
  }

  /* Les onglets restent disponibles, en ligne. */
  .panel-nav {
    margin-top: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    /* Le bord droit s'efface : on comprend qu'il y a d'autres onglets. */
    mask-image: linear-gradient(to right, #000 92%, transparent);
  }

  .panel-nav::-webkit-scrollbar {
    display: none;
  }

  .panel-nav ol {
    display: flex;
    gap: 18px;
    width: max-content;
  }

  .panel-nav a {
    display: flex;
    align-items: baseline;
    padding: 8px 0;
    border-top: 0;
    border-bottom: 1px solid transparent;
  }

  .panel-nav ol li:last-child a {
    border-bottom-color: transparent;
  }

  .panel-nav .n,
  .panel-nav .y {
    display: none;
  }

  .panel-nav .t {
    font-size: 16px;
  }

  .panel-nav a.is-current {
    padding-left: 0;
    border-bottom-color: currentColor;
  }


  .panel-name {
    font-size: 34px;
  }

  .panel-foot {
    margin-top: 4px;
    padding-top: 10px;
  }

  .feed {
    padding: 16px;
  }

  .chapter,
  .chapter:nth-of-type(even) {
    width: 100%;
    margin-left: 0;
    margin-bottom: 34px;
  }

  .panel--project .panel-sum {
    -webkit-line-clamp: 4;
  }
}

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

[data-feed="full"] .chapter {
  width: 100%;
}

[data-feed="full"] .chapter:nth-of-type(even) {
  margin-left: 0;
}

.no-panelnav .panel-nav {
  display: none;
}

/* --- Mode clair / sombre --- */
html[data-mode="dark"] {
  --paper: #14150f;
  --ink: #efeade;
  --muted: #9a9484;
  --rule: #2c2e26;
  --panel: #10130f;
}

/* --- Intro (reprise) --------------------------------------------------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
  padding: 0 var(--pad);
  background: var(--panel);
  color: var(--panel-ink);
  pointer-events: none;
  animation: intro-out 0.75s cubic-bezier(0.76, 0, 0.24, 1) 1.2s forwards;
}

.intro-name {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.95;
  animation: intro-rise 0.6s 0.1s both;
}

.intro-role {
  margin: 0;
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--panel-dim);
  animation: intro-rise 0.6s 0.25s both;
}

.intro-line {
  display: block;
  width: min(420px, 62vw);
  height: 2px;
  background: var(--panel-ink);
  transform-origin: left;
  animation: intro-line 0.7s 0.35s both;
}

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

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

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

/* --- Sortie d'intro : panneau qui sort à gauche --- */

/* Sortie : le panneau quitte l'écran par la gauche. */
@keyframes intro-out {
  to {
    transform: translateX(-101%);
  }
}

/* Le filet devient un bloc plein. */
.intro-line {
  display: block;
  width: clamp(56px, 6vw, 84px);
  height: clamp(56px, 6vw, 84px);
  background: var(--panel-ink);
  transform-origin: left bottom;
  animation: intro-line 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

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

/* --- Onglets : Works / projet ------------------------------------------- */

.chapter.is-hidden {
  display: none;
}

.chapter.is-focus {
  width: 100%;
  margin-left: 0;
}

.chapter-photos {
  display: none;
}

.chapter.is-focus .chapter-link {
  display: none;
}

.chapter.is-focus .chapter-photos {
  display: grid;
  gap: clamp(22px, 2.8vw, 38px);
}

.chapter-head {
  display: grid;
  gap: 8px;
  padding-bottom: 6px;
}

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

.chapter-h {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 3.6vw, 54px);
  font-weight: 400;
  line-height: 1;
}

.chapter-sum {
  margin: 6px 0 0;
  max-width: 52ch;
  font-size: 14.5px;
  line-height: 1.6;
}

.feed-plate {
  margin: 0;
}

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

.feed-link:hover .feed-img img {
  transform: scale(1.02);
}

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

.chapter-open {
  justify-self: start;
  padding: 10px 16px;
  border: 1px solid rgb(241 237 225 / 0.35);
  color: var(--panel-ink);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.chapter-open:hover {
  background: var(--panel-ink);
  color: var(--panel);
}


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



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

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

html[data-palette="ardoise"][data-mode="light"] {
  --panel: #1b2026;
  --panel-ink: #eef1f4;
  --panel-dim: #9aa3ad;
  --paper: #ececee;
  --ink: #14161a;
  --muted: #5e6168;
  --rule: #d6d8dc;
  --select-bg: #1b2026;
}

html[data-palette="ardoise"][data-mode="dark"] {
  --panel: #1d2a38;
  --panel-ink: #eef1f4;
  --panel-dim: #a9b6c4;
  --paper: #161b21;
  --ink: #efeade;
  --muted: #9fa9b4;
  --rule: #2c3038;
}

html[data-palette="bordeaux"][data-mode="light"] {
  --panel: #241416;
  --panel-ink: #f5e9e4;
  --panel-dim: #b49a94;
  --paper: #efe7e3;
  --ink: #1a1213;
  --muted: #63534f;
  --rule: #d8c9c4;
  --select-bg: #241416;
}

html[data-palette="bordeaux"][data-mode="dark"] {
  --panel: #2b161a;
  --panel-ink: #f5e9e4;
  --panel-dim: #c4a8a3;
  --paper: #1a1214;
  --ink: #f0e6e2;
  --muted: #ad9c98;
  --rule: #332a2b;
}
