/* Valérie Ghattas — feuille de style
   Idée directrice : la traversée. Un papier froid couleur lichen, une encre vert-noir,
   des cartels de musée ; la couleur vient des œuvres, jamais de l'interface.
   Un seul geste fort : le chemin d'encre qui se trace dans la marge au fil du défilement. */

@font-face { font-family: "Spectral"; src: url("fonts/spectral-200.woff2") format("woff2"); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-200-italic.woff2") format("woff2"); font-weight: 200; font-style: italic; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-300-italic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  /* Couleurs */
  --paper: #eef0e9;     /* papier Arches, tirant sur le lichen */
  --paper-2: #e2e6db;   /* papier plus profond : fonds d'image, passe-partout */
  --ink: #1d221b;       /* encre de Rotring, vert-noir */
  --graphite: #555c51;  /* crayon 2B : textes secondaires, cartels */
  --moss: #3d5a2a;      /* mousse : liens, focus */
  --night: #1c2619;     /* fin du chemin : contact */
  --line: rgb(29 34 27 / 0.14);

  /* Typographie */
  --serif: "Spectral", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --t-small: 0.8125rem;                                   /* 13 */
  --t-cartel: 0.875rem;                                   /* 14 */
  --t-ui: 0.9375rem;                                      /* 15 */
  --t-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);   /* 17 → 19 */
  --t-lead: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem);    /* 19 → 24 */
  --t-h3: clamp(1.625rem, 1.3rem + 1.2vw, 2.25rem);       /* 26 → 36 */
  --t-h2: clamp(2.25rem, 1.5rem + 3vw, 4.25rem);          /* 36 → 68 */
  --t-hero: clamp(3.25rem, 0.5rem + 7.4vw, 8.5rem);       /* 52 → 136 */

  /* Espace */
  --pad: clamp(1rem, 3vw, 2.5rem);
  --gap: clamp(1rem, 2vw, 1.5rem);
  --section: clamp(6rem, 12vw, 11rem);
  --header-h: 4rem;
  --trail-w: 0rem;
  --maxw: 92rem;
}

@media (min-width: 1100px) {
  :root { --trail-w: clamp(5rem, 7vw, 8rem); }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--t-body) / 1.65 var(--serif);
  font-feature-settings: "kern", "liga", "onum";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; background: var(--ph, var(--paper-2)); }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }
blockquote { margin: 0; }

a { color: var(--moss); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 3px; border-radius: 1px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--pad); top: -4rem; z-index: 100;
  padding: 0.6rem 1rem; background: var(--ink); color: var(--paper);
  font: 500 var(--t-ui) / 1 var(--sans); text-decoration: none;
}
.skip:focus { top: 0.75rem; }

.lead { font-size: var(--t-lead); line-height: 1.5; font-weight: 300; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: var(--header-h);
  padding-inline: var(--pad);
  /* fond presque opaque plutôt qu'un flou d'arrière-plan, coûteux à chaque défilement */
  background: rgb(238 240 233 / 0.97);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.brand {
  font: 400 1.3125rem / 1 var(--serif);
  color: var(--ink); text-decoration: none; letter-spacing: 0.005em;
}

.site-nav ul { list-style: none; display: flex; gap: clamp(1rem, 2vw, 2rem); }
.site-nav a {
  font: 450 var(--t-ui) / 1 var(--sans);
  color: var(--graphite); text-decoration: none;
  padding-block: 0.5rem;
}
.site-nav a:hover, .site-nav a[aria-current="true"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.4em; }

.menu-toggle {
  display: none;
  font: 500 var(--t-ui) / 1 var(--sans);
  color: var(--ink); background: none;
  border: 1px solid var(--ink); border-radius: 2rem;
  padding: 0.65rem 1.1rem; min-height: 44px; cursor: pointer;
}

@media (max-width: 1099px) {
  .js .menu-toggle { display: inline-block; }
  .js .site-nav:not(.site-nav--static) {
    position: absolute; inset: var(--header-h) 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 1rem var(--pad) 2rem;
    display: none;
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav:not(.site-nav--static) ul { flex-direction: column; gap: 0; }
  .js .site-nav:not(.site-nav--static) a {
    display: block; padding: 0.7rem 0;
    font: 300 1.75rem / 1.2 var(--serif); color: var(--ink);
  }
  /* Sans JavaScript, la navigation reste visible et défile horizontalement. */
  html:not(.js) .site-nav { overflow-x: auto; }
}

/* ---------- Page et chemin ---------- */
.page {
  position: relative;
  max-width: calc(var(--maxw) + var(--trail-w) + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
  padding-left: calc(var(--pad) + var(--trail-w));
  padding-bottom: var(--section);
}

.trail { display: none; }
@media (min-width: 1100px) {
  .trail {
    display: block; position: absolute; top: 0; left: var(--pad);
    width: var(--trail-w); height: 100%;
    overflow: visible; pointer-events: none;
  }
}
.trail path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.trail-ahead { stroke: var(--graphite); stroke-opacity: 0.5; stroke-width: 1; stroke-dasharray: 5 7; }
.trail-walked { stroke: var(--ink); stroke-width: 1.5; }
.trail-stations circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1.25; transition: fill 0.5s; }
.trail-stations circle.reached { fill: var(--ink); }

/* Grille commune : 12 colonnes */
.hero, .section {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  max-width: var(--maxw);
}
.hero > *, .section > * { grid-column: 1 / -1; min-width: 0; }
.section { margin-top: var(--section); }

.section-title {
  font: 200 var(--t-h2) / 1.04 var(--serif);
  letter-spacing: -0.015em;
}
.section-head { display: grid; grid-template-columns: subgrid; row-gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head > * { grid-column: 1 / -1; }
.section-meta {
  font: 400 var(--t-cartel) / 1.5 var(--sans);
  color: var(--graphite);
}
.section-intro { max-width: 40ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

@media (min-width: 1100px) {
  .section-head .section-title { grid-column: 1 / span 8; }
  .section-head .section-meta { grid-column: 9 / span 4; align-self: end; padding-bottom: 0.6em; }
  .section-head .section-intro { grid-column: 1 / span 6; margin-bottom: 0; }
}

/* Cartel de musée */
.cartel {
  font: 400 var(--t-cartel) / 1.5 var(--sans);
  color: var(--graphite);
  font-feature-settings: "kern";
}
.cartel-title { font-family: var(--serif); font-style: italic; font-size: 1.0625rem; color: var(--ink); }

.small-title {
  font: 600 var(--t-ui) / 1.3 var(--sans);
  color: var(--graphite);
  margin-bottom: 1.25rem;
}

/* Images agrandissables */
.zoom { display: block; cursor: zoom-in; color: inherit; }
.zoom img { width: 100%; }

/* ---------- Ouverture ---------- */
.hero {
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  align-content: center;
  padding-block: clamp(2.5rem, 7vh, 5rem) clamp(3rem, 8vh, 6rem);
  row-gap: 2.25rem;
}
.hero-title {
  font: 200 var(--t-hero) / 0.98 var(--serif);
  letter-spacing: -0.025em;
  font-feature-settings: "kern", "liga";
}
.step { display: block; }
.step-2 { padding-left: 1em; }
.step-3 { padding-left: 2em; }
.hero-intro { max-width: 34ch; color: var(--ink); }
.hero-figure .cartel { margin-top: 0.75rem; }

@media (min-width: 640px) {
  .hero-intro { padding-left: calc(var(--t-hero) * 2); max-width: calc(34ch + var(--t-hero) * 2); }
}
@media (min-width: 1100px) {
  .hero { row-gap: 3rem; }
  .hero-title { grid-column: 1 / span 8; grid-row: 1; align-self: end; }
  .hero-intro { grid-column: 1 / span 8; grid-row: 2; align-self: start; }
  .hero-figure { grid-column: 9 / span 4; grid-row: 1 / span 2; align-self: center; justify-self: end; }
  .hero-figure { width: min(100%, calc((100vh - var(--header-h) - 9rem) * var(--r, 0.62))); width: min(100%, calc((100svh - var(--header-h) - 9rem) * var(--r, 0.62))); }
  .hero-figure img { width: 100%; }
}

/* ---------- Démarche ---------- */
.demarche { row-gap: clamp(2rem, 4vw, 3.5rem); }
.demarche-text { max-width: 60ch; }
.demarche-text .lead { margin-bottom: 1.4em; }
.demarche-images { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); align-items: start; }
.demarche-figure--1 { grid-column: 1 / span 3; }
.demarche-figure--2 { grid-column: 3 / span 4; margin-top: clamp(3rem, 10vw, 9rem); }

@media (min-width: 1100px) {
  .demarche-title, .demarche .section-title { grid-column: 1 / span 8; }
  .demarche-text { grid-column: 1 / span 6; grid-row: 2; }
  .demarche-images { grid-column: 8 / span 5; grid-row: 2; }
}

/* ---------- Carnets ---------- */
.quote {
  max-width: 34ch;
  margin: clamp(2rem, 4vw, 3rem) 0 clamp(3rem, 6vw, 5rem);
  font: italic 300 var(--t-lead) / 1.5 var(--serif);
  hanging-punctuation: first;
}
@media (min-width: 1100px) {
  .quote { grid-column: 2 / span 6; }
}

/* ---------- Planches : accrochage à hauteur d'œil (centres alignés) ---------- */
.planche {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.planche-item { grid-column: 1 / -1; }
.planche-item .cartel { margin-top: 0.6rem; }
@media (min-width: 640px) {
  .planche-item.portrait { grid-column: span 6; }
}
@media (min-width: 1100px) {
  .planche-item, .planche-item.portrait { grid-column: var(--col); }
}

/* ---------- Habitat : œuvres ---------- */
.habitat-intro { display: grid; grid-template-columns: subgrid; row-gap: 2.5rem; }
.habitat-intro > * { grid-column: 1 / -1; }
.habitat-text { max-width: 60ch; }
.habitat-figure { max-width: 30rem; }
@media (min-width: 1100px) {
  .habitat-text { grid-column: 1 / span 6; align-self: start; padding-top: 0.4rem; }
  .habitat-figure { grid-column: 8 / span 5; justify-self: end; }
}

.works { display: grid; row-gap: clamp(5rem, 10vw, 9rem); margin-top: clamp(5rem, 10vw, 9rem); }

.work {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 1.75rem;
}
.work > * { grid-column: 1 / -1; min-width: 0; }
/* Largeur connue avant le chargement (proportions --r) : la page ne se décale pas. */
.work-image { width: min(100%, calc(min(92vh, 72rem) * var(--r, 1))); }
.work-image img { width: 100%; }
.work-title {
  font: italic 300 var(--t-h3) / 1.15 var(--serif);
  margin-bottom: 1rem;
}
.work-text .cartel { max-width: 34ch; }

.details {
  list-style: none;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.75rem;
  max-width: 24rem;
}
.details img { aspect-ratio: 4 / 3; object-fit: cover; }

@media (min-width: 1100px) {
  .work-text { align-self: end; }
  .work--gauche .work-image { grid-column: 1 / span 7; justify-self: start; }
  .work--gauche .work-text { grid-column: 9 / span 4; }
  .work--droite .work-image { grid-column: 6 / span 7; grid-row: 1; justify-self: end; }
  .work--droite .work-text { grid-column: 1 / span 4; grid-row: 1; }
  .work--large .work-image { grid-column: 1 / span 8; grid-row: 1; justify-self: start; }
  .work--large .work-text { grid-column: 9 / span 4; grid-row: 1; }
  .work--cabane { margin-bottom: clamp(4rem, 8vw, 7rem); }
}

/* ---------- Mon jardin intérieur ---------- */
.jardin-text { max-width: 60ch; }
@media (min-width: 1100px) { .jardin-text { grid-column: 1 / span 6; } }

.herbier { margin-top: clamp(3rem, 6vw, 5rem); }
.herbier-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: clamp(0.4rem, 0.8vw, 0.75rem);
  align-items: center;
}
/* Chaque dessin dans son encadrement noir, avec un passe-partout. */
.herbier-item {
  background: #f7f8f4;
  border: 3px solid var(--ink);
  padding: 4px;
}
.herbier-item.is-wide { grid-column: span 2; }
.herbier-item img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: #f7f8f4; }
.herbier-item.is-wide img { aspect-ratio: 3 / 2; }
.herbier .cartel { margin-top: 1rem; }

/* ---------- Installations ---------- */
.installation { margin-top: clamp(5rem, 10vw, 9rem); }
.installation:first-of-type { margin-top: 0; }
.installation-head { margin-bottom: 1.75rem; }
.installation-title { font: italic 300 var(--t-h3) / 1.15 var(--serif); max-width: 24ch; }
.installation-head .section-meta { margin-top: 0.5rem; }
.installation-text { max-width: 60ch; }

.masonry { columns: 1; column-gap: var(--gap); }
.masonry-item { break-inside: avoid; margin-bottom: var(--gap); }
@media (min-width: 640px) { .masonry { columns: 2; } }
@media (min-width: 1100px) { .masonry { columns: 3; } }

/* ---------- Archives (séries antérieures) et grilles régulières ---------- */
.archive { margin-top: clamp(4rem, 8vw, 7rem); }
.archive:first-of-type { margin-top: 0; }
.grille {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(11rem, 40vw), 1fr));
  gap: var(--gap);
  align-items: center;
}
/* Affiches et certificats : vignettes carrées, documents entiers visibles. */
.grille--documents { grid-template-columns: repeat(auto-fill, minmax(min(8.5rem, 40vw), 1fr)); }
.grille--documents img { aspect-ratio: 1; object-fit: contain; background: var(--paper-2); }
.documents { margin-top: clamp(3rem, 6vw, 5rem); }
@media (min-width: 1100px) { .documents { grid-column: 3 / span 8; } }

/* ---------- Biographie ---------- */
.bio .section-title { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.bio-grid { display: grid; grid-template-columns: subgrid; row-gap: 3.5rem; }
.bio-grid > * { grid-column: 1 / -1; }
.formation ul { list-style: none; }
.formation li { font: 400 var(--t-cartel) / 1.5 var(--sans); color: var(--ink); padding-block: 0.6rem; border-top: 1px solid var(--line); }
.formation li:last-child { border-bottom: 1px solid var(--line); }
.small-title--suite { margin-top: 2.5rem; }
.qa { margin-bottom: 2.75rem; max-width: 62ch; }
.qa-q { font: 500 var(--t-ui) / 1.4 var(--sans); color: var(--moss); margin-bottom: 0.75rem; }
@media (min-width: 1100px) {
  .formation { grid-column: 1 / span 3; align-self: start; position: sticky; top: calc(var(--header-h) + 2rem); }
  .entretien { grid-column: 5 / span 7; }
}

/* ---------- Expositions ---------- */
.cv-list { list-style: none; margin-top: clamp(2.5rem, 5vw, 4rem); }
.cv-row {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: var(--gap);
  padding-block: 1rem;
  border-top: 1px solid var(--line);
}
.cv-row:last-child { border-bottom: 1px solid var(--line); }
.cv-year { font: 300 1.5rem / 1.2 var(--serif); font-feature-settings: "lnum", "tnum"; }
.cv-year--autre { font-size: 1.125rem; font-style: italic; color: var(--graphite); }
.cv-items { list-style: none; padding-top: 0.3rem; }
.cv-items li { font: 400 var(--t-ui) / 1.5 var(--sans); }
.cv-items li + li { margin-top: 0.35rem; }
@media (min-width: 1100px) {
  .cv-list { grid-column: 3 / span 8; }
  .cv-row { grid-template-columns: 8rem 1fr; }
}

/* ---------- Contact ---------- */
.contact {
  background: var(--night);
  color: var(--paper);
  padding: clamp(5rem, 12vw, 10rem) var(--pad);
}
.contact-inner {
  max-width: calc(var(--maxw) + var(--trail-w));
  margin-inline: auto;
  padding-left: var(--trail-w);
}
.contact .section-title { margin-bottom: 2rem; }
.contact-lead { max-width: 36ch; margin-bottom: 2.5rem; }
.contact a { color: var(--paper); }
.contact a:hover { color: #c9d6b8; }
.contact :focus-visible { outline-color: var(--paper); }
.contact-mail { font: 200 clamp(1.75rem, 1rem + 3.5vw, 4rem) / 1.15 var(--serif); margin-bottom: 2.5rem; overflow-wrap: anywhere; }
.contact-mail a { text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.contact-links { list-style: none; display: flex; flex-wrap: wrap; gap: 0.75rem 2.5rem; font: 400 var(--t-ui) / 1.5 var(--sans); color: #c9d1c0; }

.site-footer {
  background: var(--night); color: #a9b3a0;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  padding: 1.75rem var(--pad) 2.25rem;
  font: 400 var(--t-small) / 1.5 var(--sans);
  border-top: 1px solid rgb(238 240 233 / 0.12);
}
.site-footer p { margin: 0; }
.site-footer a { color: #d8dfcf; }
.site-footer :focus-visible { outline-color: var(--paper); }

/* ---------- Portfolio : toutes les œuvres, filtrables par série ---------- */
.page--portfolio { padding-left: var(--pad); padding-top: clamp(2.5rem, 6vw, 5rem); }
.pf-head { display: grid; gap: 0.75rem; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.pf-filtres { display: none; flex-wrap: wrap; gap: 0.5rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.js .pf-filtres { display: flex; }
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font: 500 var(--t-ui) / 1 var(--sans); color: var(--ink);
  background: none; border: 1px solid rgb(29 34 27 / 0.35); border-radius: 2rem;
  padding: 0.65rem 1rem; min-height: 44px; cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip-n { color: var(--graphite); font-feature-settings: "tnum"; font-weight: 400; }
/* Sur téléphone, les filtres tiennent sur une ligne qui défile, pour laisser voir les œuvres. */
@media (max-width: 639px) {
  .js .pf-filtres {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(-1 * var(--pad)); padding: 0.25rem var(--pad);
  }
  .chip { flex: none; }
}
.chip[aria-pressed="true"] .chip-n { color: #c9d1c0; }
.pf-grille {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(15rem, 42vw), 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem) var(--gap);
}
.pf-item[hidden] { display: none; }
/* Chaque œuvre entière, sur un passe-partout de même format : rien n'est recadré. */
.pf-item .zoom { display: grid; place-items: center; aspect-ratio: 4 / 5; padding: 7%; background: var(--paper-2); }
.pf-item .zoom img { width: 100%; height: 100%; object-fit: contain; background: none; }
.pf-item .cartel { margin-top: 0.6rem; }

/* ---------- Pages de texte (mentions légales, 404) ---------- */
.page--text { max-width: calc(44rem + 2 * var(--pad)); padding-left: var(--pad); padding-block: clamp(3rem, 8vw, 6rem) var(--section); }
.page--text .section-title { margin-bottom: 2.5rem; }
.page--text .small-title { margin: 2.5rem 0 0.75rem; }

/* ---------- Visionneuse ---------- */
.viewer {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--paper);
  color: var(--ink);
}
.viewer::backdrop { background: rgb(29 34 27 / 0.35); }
.viewer[open] { display: grid; grid-template-rows: auto 1fr; }
@media (prefers-reduced-motion: no-preference) {
  .viewer[open] { animation: viewer-in 0.22s ease-out; }
  .viewer-img { transition: opacity 0.2s; }
}
@keyframes viewer-in { from { opacity: 0; } to { opacity: 1; } }

.viewer-bar {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.75rem var(--pad);
  font: 400 var(--t-cartel) / 1.3 var(--sans);
}
.viewer-title { margin: 0; font: italic 400 1.125rem / 1.3 var(--serif); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-count { margin: 0; color: var(--graphite); font-feature-settings: "tnum"; }
.viewer-close {
  font: 500 var(--t-ui) / 1 var(--sans); color: var(--ink);
  background: none; border: 1px solid var(--ink); border-radius: 2rem;
  padding: 0.65rem 1.1rem; min-height: 44px; cursor: pointer;
}
.viewer-stage {
  display: grid; place-items: center; align-content: center; gap: 0.75rem;
  padding: 0 clamp(1rem, 6vw, 5.5rem) 1.5rem;
  min-height: 0;
}
.viewer-img {
  width: auto; height: auto;
  max-width: 100%;
  max-height: calc(100vh - var(--header-h) - 5.5rem);
  max-height: calc(100dvh - var(--header-h) - 5.5rem);
  object-fit: contain;
}
.viewer-img.is-loading { opacity: 0.25; }
.viewer-caption { text-align: center; max-width: 60ch; }
.viewer-nav {
  position: fixed; top: 50%; translate: 0 -50%;
  width: 48px; height: 48px; display: grid; place-items: center;
  background: rgb(238 240 233 / 0.85); border: 1px solid var(--line); border-radius: 50%;
  color: var(--ink); cursor: pointer;
}
.viewer-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.viewer-nav:hover { border-color: var(--ink); }
.viewer-prev { left: clamp(0.5rem, 1.5vw, 1.5rem); }
.viewer-next { right: clamp(0.5rem, 1.5vw, 1.5rem); }
.viewer-nav[hidden] { display: none; }

/* ---------- Mouvement : un seul moment orchestré (ouverture) ----------
   En CSS pur : le titre apparaît dès que la feuille de style est chargée,
   sans attendre le JavaScript. Chaque ligne entre comme un pas en avant. */
@media (prefers-reduced-motion: no-preference) {
  .hero-title .step, .hero-intro { animation: pas 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-title .step-2 { animation-delay: 0.2s; }
  .hero-title .step-3 { animation-delay: 0.4s; }
  .hero-intro { animation-delay: 0.65s; }
}
@keyframes pas { from { opacity: 0; transform: translateX(-0.18em); } }

/* <picture> ne crée pas de boîte : la mise en page reste celle de l'image. */
picture { display: contents; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media print {
  .site-header, .trail, .viewer, .menu-toggle { display: none !important; }
  body { background: #fff; }
  .contact, .site-footer { background: #fff; color: #000; }
}
