/* ==========================================================
   sebastiengillard.fr — feuille de style (refonte 2026)
   Papier clair / encre, bascule sombre, typographie éditoriale.
   Newsreader (titres) + Public Sans (texte).
   ========================================================== */
:root {
  --paper: #F6F3ED;
  --paper-2: #EDE8DF;
  --veil: rgba(246, 243, 237, .82);
  --ink: #17161A;
  --ink-2: #55514C;
  --ink-3: #7E7970;
  --line: rgba(23, 22, 26, .14);
  --line-2: rgba(23, 22, 26, .28);
  --accent: #2F6A4E;
  --accent-soft: rgba(47, 106, 78, .10);
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --max: 1320px;
  --gutter: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  /* alias de compatibilité avec l'ancienne feuille */
  --bg: var(--paper); --bg-2: var(--paper-2); --bg-3: var(--paper-2);
  --text: var(--ink); --text-2: var(--ink-2); --muted: var(--ink-3);
  --line-strong: var(--line-2); --accent-2: var(--accent);
  --radius: 0px;
}
html[data-theme="dark"] {
  --paper: #0C0C0E;
  --paper-2: #141417;
  --veil: rgba(12, 12, 14, .80);
  --ink: #EFEBE4;
  --ink-2: #ADA69D;
  --ink-3: #8A857D;
  --line: rgba(239, 235, 228, .16);
  --line-2: rgba(239, 235, 228, .34);
  --accent: #86BFA2;
  --accent-soft: rgba(134, 191, 162, .14);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .5s var(--ease), color .5s var(--ease);
}
img, picture { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p a, li a, dd a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in oklch, var(--accent) 45%, transparent); }
p a:hover, li a:hover, dd a:hover { color: var(--ink); text-decoration-color: var(--line-2); }
::selection { background: var(--accent); color: var(--paper); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.06; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.8rem, 6.5vw, 6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3.25rem); }
h3 { font-size: clamp(1.25rem, 1.9vw, 1.7rem); }
.muted { color: var(--ink-2); }
.small { font-size: .8rem; }
.eyebrow {
  font-family: var(--sans);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}
.eyebrow a { color: inherit; }
.lead { font-family: var(--serif); font-size: clamp(1.25rem, 1.9vw, 1.65rem); line-height: 1.45; color: var(--ink-2); font-weight: 400; max-width: 46ch; }
.lead p { margin: 0 0 .7em; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--paper); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  background: var(--veil);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--serif); font-size: 1.6rem; line-height: 1; letter-spacing: .01em; }
.brand:hover { color: var(--accent); }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); }
.nav > a {
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500;
  color: var(--ink-2); padding: .3rem 0; position: relative; transition: color .25s var(--ease);
}
.nav > a:hover { color: var(--ink); }
.nav > a[aria-current] { color: var(--accent); }
.theme-toggle {
  width: 34px; height: 34px; flex: 0 0 34px; margin-left: 4px; padding: 0; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 999px; background: none;
  display: grid; place-items: center; transition: border-color .25s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle span { display: block; width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-2); transition: background .3s; }
html[data-theme="dark"] .theme-toggle span { background: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 10px; width: 24px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { top: -7px; left: 0; }
.nav-toggle span::after { top: 7px; left: 0; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  /* `backdrop-filter` fait de l'en-tête le bloc conteneur de ses descendants
     en position fixed : le panneau du menu était alors mesuré sur la hauteur
     de l'en-tête, donc invisible. On retire le flou sur mobile, où le menu
     occupe de toute façon tout l'écran, et on rend l'en-tête opaque. */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); }
  .nav-toggle { display: block; order: 3; }
  .nav {
    position: fixed; inset: 71px 0 0 0; flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); padding: 1rem var(--gutter);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s var(--ease);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav > a { font-size: 1.05rem; letter-spacing: .08em; padding: 1rem 0; width: 100%; border-bottom: 1px solid var(--line); }
  .theme-toggle { margin: 1.2rem 0 0; }
}

/* ---------- Layout ---------- */
main { min-height: 60vh; }
.section { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 9vw, 120px) var(--gutter) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: clamp(20px, 3vw, 36px); }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 3.25rem); }
.more { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.more::after { content: " →"; }
.more:hover { color: var(--accent); }
.page-head { max-width: var(--max); margin: 0 auto; padding: clamp(44px, 7vw, 96px) var(--gutter) clamp(20px, 3vw, 32px); }
.page-head h1 { max-width: 16ch; }
.page-head .lead { margin-top: 1.6rem; }
.page-head .muted { max-width: 62ch; font-size: .95rem; }

.grid { display: grid; gap: clamp(16px, 2.4vw, 32px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Cartes ---------- */
.card { display: block; }
.card-media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.94); transition: transform 1.1s var(--ease), filter .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.045); filter: saturate(1.06); }
.card-body { padding: .9rem 0 0; }
.card-body .eyebrow { margin-bottom: .35rem; color: var(--ink-3); }
.card h3 { transition: color .2s; }
.card:hover h3 { color: var(--accent); }
.card-summary { color: var(--ink-2); font-size: .95rem; margin: .5rem 0 0; max-width: 56ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.play {
  position: absolute; left: 16px; bottom: 16px; width: auto; height: 28px;
  display: inline-flex; align-items: center; padding: 0 14px 0 32px;
  border-radius: 999px; background: rgba(12, 12, 14, .55); backdrop-filter: blur(6px);
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: #fff;
}
.play::after { content: ""; position: absolute; left: 14px; top: 9px; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #fff; }

/* ---------- Filtres ---------- */
.filters { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: flex; gap: 10px; flex-wrap: wrap; }
.filters a {
  font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
  padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px; transition: all .25s var(--ease);
}
.filters a:hover { color: var(--ink); border-color: var(--line-2); }
.filters a[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* ---------- Boutons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 500;
  background: var(--accent); color: var(--paper); border: 1px solid var(--accent);
  transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); transform: none; }
.btn-disabled { background: transparent; color: var(--ink-3); border-style: dashed; border-color: var(--line-2); cursor: default; }
.btn-disabled:hover { transform: none; color: var(--ink-3); }

/* ---------- Accueil : hero en deux colonnes ---------- */
.hero { max-width: var(--max); margin: 0 auto; padding: clamp(48px, 8vw, 104px) var(--gutter) 0; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.hero h1 { font-size: clamp(3.4rem, 9.4vw, 9.25rem); line-height: .88; letter-spacing: -.02em; }
.hero .lead { font-size: clamp(1.3rem, 2.2vw, 1.875rem); max-width: 22ch; margin-top: 1.75rem; }
.hero-portrait { margin: 0; position: relative; }
.hero-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1) contrast(1.04); animation: fadeZoom 1.6s var(--ease) both; }
.hero-portrait figcaption { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 12px; }
@keyframes fadeZoom { from { transform: scale(1.08); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-portrait { max-width: 420px; }
  .hero-portrait img { aspect-ratio: 3 / 2; max-height: 42vh; object-position: center 28%; }
}

/* Phrase des quatre métiers (remplace les anciennes tuiles) */
.facets {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(48px, 7vw, 92px) var(--gutter) 0;
}
.facets p {
  font-family: var(--serif); font-size: clamp(1.45rem, 2.7vw, 2.5rem); line-height: 1.34;
  margin: 0; max-width: 44ch; padding-top: clamp(26px, 3vw, 38px); border-top: 1px solid var(--line);
  text-wrap: pretty;
}
.facets b { font-weight: 400; }
.facets .facet-note { color: var(--ink-2); }
.facets .facet-dash { color: var(--ink-3); }

/* Chiffres */
.stats { max-width: var(--max); margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--gutter) 0; display: flex; flex-wrap: wrap; gap: clamp(28px, 6vw, 88px); }
.stats div p:first-child { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; margin: 0; }
.stats div p + p { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 8px 0 0; }

/* Un grand + deux petits */
.feature { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(16px, 2.4vw, 32px); }
.feature-side { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.feature > .card .card-media { aspect-ratio: 4 / 3; }
.feature > .card h3 { font-size: clamp(1.6rem, 2.8vw, 2.375rem); }
.feature-side .card-media { aspect-ratio: 3 / 2; }
.feature-side .card-summary { display: none; }
@media (max-width: 980px) { .feature { grid-template-columns: 1fr; } .feature-side { grid-template-rows: none; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feature-side { grid-template-columns: 1fr; } }

/* Lignes projets */
.project-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: clamp(18px, 3vw, 40px); align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line); transition: color .25s; }
.project-row:hover { color: var(--accent); }
.project-row .eyebrow { color: var(--ink-3); margin: 0 0 .35rem; }
.project-row h3 { font-size: clamp(1.5rem, 2.4vw, 2.125rem); margin-bottom: .35rem; }
.project-row .muted { margin: 0; font-size: .95rem; max-width: 68ch; }
.project-row .arrow { font-size: 1.4rem; color: var(--ink-3); }
.project-logo { width: 72px; height: 72px; flex: 0 0 72px; object-fit: contain; border-radius: 16px; }
@media (max-width: 640px) { .project-row { grid-template-columns: 1fr; gap: 12px; } .project-row .arrow { display: none; } }

/* À propos */
.about-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(28px, 6vw, 90px); align-items: start; }
.about-portrait img { filter: saturate(.9); aspect-ratio: 3 / 4; object-fit: cover; }
.about-portrait figcaption, .about-portrait .small { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 12px; }
.about h2 { font-size: clamp(1.9rem, 4.2vw, 3.6rem); line-height: 1.04; margin-bottom: 1.5rem; }
.about p { color: var(--ink-2); max-width: 60ch; margin: 0 0 1.1em; }
.about .btn { margin-top: .5rem; }
@media (max-width: 980px) { .about-inner { grid-template-columns: 1fr; } .about-portrait { max-width: 340px; } }

/* ---------- Mosaïque (page Photos) ---------- */
.mosaic {
  --mosaic-gap-col: clamp(14px, 1.8vw, 28px);
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  row-gap: clamp(16px, 2.2vw, 34px); column-gap: var(--mosaic-gap-col);
  container-type: inline-size;
}
.mosaic > .card { grid-column: span 3; }
.mosaic > .card .card-media { aspect-ratio: 4 / 3; }
.mosaic > .card:nth-child(5n + 1) { grid-column: span 6; }
.mosaic > .card:nth-child(5n + 1) .card-media { aspect-ratio: 2.5 / 1; }
.mosaic > .card:nth-child(5n + 4) { grid-column: span 2; }
.mosaic > .card:nth-child(5n + 4) .card-media { aspect-ratio: 3 / 4; }
.mosaic > .card:nth-child(5n + 5) { grid-column: span 4; }
.mosaic > .card:nth-child(5n + 5) .card-media { aspect-ratio: 16 / 10; }
/* Rangée 1/3 + 2/3 : les deux vignettes partagent une seule hauteur, celle de
   la carte étroite (2 colonnes sur 6) à son format 3/4. Sur une grille de 6
   colonnes, cette hauteur vaut (4 × largeur − 8 × gouttière) / 9. Deux formats
   fixes appliqués à deux largeurs différentes ne tombaient jamais juste : il
   restait une quinzaine de pixels d'écart, et les titres se décalaient d'autant.
   On annule le format en même temps : avec une hauteur définie et une largeur
   automatique, le navigateur déduit la largeur du format et la vignette déborde.
   Les formats ci-dessus servent de repli sans unités de conteneur. */
@supports (height: 1cqw) {
  .mosaic > .card:nth-child(5n + 4) .card-media,
  .mosaic > .card:nth-child(5n + 5) .card-media {
    aspect-ratio: auto;
    width: 100%;
    height: calc((400cqw - 8 * var(--mosaic-gap-col)) / 9);
  }
}
.mosaic .card-summary { display: none; }
.mosaic .card-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 16px; }
.mosaic .card-body .eyebrow { grid-column: 2; margin: 0; color: var(--ink-3); letter-spacing: .1em; }
.mosaic .card-body h3 { grid-column: 1; grid-row: 1; }
@media (max-width: 980px) {
  .mosaic > .card, .mosaic > .card:nth-child(5n + 1), .mosaic > .card:nth-child(5n + 4), .mosaic > .card:nth-child(5n + 5) { grid-column: span 3; }
  .mosaic > .card .card-media, .mosaic > .card:nth-child(5n + 1) .card-media, .mosaic > .card:nth-child(5n + 4) .card-media, .mosaic > .card:nth-child(5n + 5) .card-media { aspect-ratio: 4 / 3; }
  .mosaic > .card:nth-child(5n + 4) .card-media, .mosaic > .card:nth-child(5n + 5) .card-media { height: auto; aspect-ratio: 4 / 3; }
}
@media (max-width: 640px) {
  .mosaic > .card, .mosaic > .card:nth-child(5n + 1), .mosaic > .card:nth-child(5n + 4), .mosaic > .card:nth-child(5n + 5) { grid-column: span 6; }
}

/* Matériel */
.gear { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(24px, 5vw, 72px); padding-top: 28px; border-top: 1px solid var(--line); }
.gear-list { display: grid; }
.gear-item { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.gear-item b { font-weight: 500; letter-spacing: .02em; }
.gear-item span { color: var(--ink-2); }
@media (max-width: 760px) { .gear { grid-template-columns: 1fr; } .gear-item { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Pages détail ---------- */
.detail { max-width: var(--max); margin: 0 auto; padding: clamp(32px, 5vw, 64px) var(--gutter) clamp(40px, 7vw, 96px); }
.detail-head { max-width: 62ch; margin-bottom: clamp(24px, 4vw, 48px); }
.detail-head h1 { max-width: 18ch; margin-top: 1.4rem; }
.detail-head .lead { margin-top: 1.4rem; }
.detail-cover { overflow: hidden; background: var(--paper-2); }
.detail-cover img { width: 100%; height: clamp(320px, 62vh, 660px); object-fit: cover; animation: fadeZoom 1.6s var(--ease) both; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 90px); margin-top: clamp(32px, 5vw, 64px); }
.detail-body { max-width: 66ch; font-size: 1.05rem; color: var(--ink-2); }
.detail-body p { margin: 0 0 1.2em; line-height: 1.75; }
.detail-body h2 { font-size: 1.7rem; margin: 2rem 0 .8rem; color: var(--ink); }
.detail-body h3 { font-size: 1.3rem; margin: 1.6rem 0 .6rem; color: var(--ink); }
.detail-body strong { color: var(--ink); font-weight: 500; }
.detail-body ul { padding-left: 1.2rem; }
.detail-aside .eyebrow { padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.places { list-style: none; margin: 0; padding: 0; counter-reset: p; font-size: .9rem; color: var(--ink-2); }
.places li { position: relative; padding: .5rem 0 .5rem 2rem; border-bottom: 1px solid var(--line); counter-increment: p; }
.places li::before { content: counter(p, decimal-leading-zero); position: absolute; left: 0; top: .6rem; font-size: .72rem; letter-spacing: .06em; color: var(--accent); }
.meta { margin: 1.6rem 0 0; font-size: .9rem; }
.meta dt { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 1rem; }
.meta dd { margin: .25rem 0 0; color: var(--ink-2); }
.tags { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { font-size: .78rem; padding: .3rem .75rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); }
@media (max-width: 820px) { .detail-grid { grid-template-columns: 1fr; } }

.video-frame { position: relative; aspect-ratio: 16/9; background: #000; overflow: hidden; }
.video-frame img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .4s var(--ease); }
.video-frame:hover img { opacity: 1; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { position: absolute; inset: 0; width: 100%; padding: 0; background: none; border: 0; cursor: pointer; }
.video-play .play {
  left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%);
  width: 96px; height: 96px; padding: 0; border: 1px solid rgba(255, 255, 255, .6);
  background: rgba(12, 12, 14, .35); border-radius: 50%;
}
.video-play .play::after { left: 42px; top: 37px; border-width: 11px 0 11px 18px; }

.prevnext { display: flex; justify-content: space-between; gap: 20px; margin-top: clamp(48px, 7vw, 90px); padding-top: 24px; border-top: 1px solid var(--line); }
.prevnext a { display: flex; flex-direction: column; max-width: 45%; font-family: var(--serif); font-size: clamp(1.2rem, 1.8vw, 1.625rem); }
.prevnext a:hover { color: var(--accent); }
.prevnext .next { text-align: right; margin-left: auto; }
.prevnext .eyebrow { margin-bottom: .35rem; color: var(--ink-3); }

/* ---------- Développement ---------- */
.project { border-top: 1px solid var(--line); }
.project-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(24px, 5vw, 72px); padding-top: 30px; }
.project-head .project-logo { width: 88px; height: 88px; flex-basis: 88px; border-radius: 20px; }
.project-head h2 { font-size: clamp(2.1rem, 4vw, 3.5rem); margin: 1.4rem 0 .6rem; }
.project-head .eyebrow { color: var(--ink-3); }
.project-lead { font-family: var(--serif); font-size: clamp(1.2rem, 1.9vw, 1.625rem); line-height: 1.45; color: var(--ink); max-width: 46ch; margin: 0 0 1.5rem; }
.screens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 30px); margin-top: clamp(28px, 4vw, 48px); }
.screens figure { margin: 0; }
.screens img { width: 100%; border: 1px solid var(--line); }
.screens figcaption { font-size: .8rem; color: var(--ink-3); margin-top: .6rem; }
@media (max-width: 980px) { .project-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .screens { grid-template-columns: 1fr; } }
.archive-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 22px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.archive-row img { width: 120px; aspect-ratio: 4/3; object-fit: cover; object-position: top; filter: saturate(.85); }
.archive-row h3 { font-size: 1.375rem; margin: 0 0 .35rem; }
.archive-row .eyebrow { color: var(--ink-3); margin: 0 0 .3rem; }
.archive-row p { font-size: .9rem; color: var(--ink-2); margin: 0; max-width: 60ch; }
@media (max-width: 640px) { .archive-row { grid-template-columns: 1fr; } .archive-row img { width: 100%; } }

/* ---------- Parcours ---------- */
.cv-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); gap: clamp(24px, 5vw, 64px); align-items: start; padding-top: 26px; border-top: 1px solid var(--line); }
.cv-section h2 { position: sticky; top: 110px; font-size: clamp(1.6rem, 2.8vw, 2.5rem); line-height: 1.02; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { display: grid; grid-template-columns: 158px minmax(0, 1fr); gap: 22px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.timeline > li:last-child { border-bottom: 0; }
.tl-when { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); padding-top: .25rem; }
.tl-what h3 { font-size: clamp(1.2rem, 1.7vw, 1.45rem); line-height: 1.15; }
.tl-where { color: var(--ink-3); margin: .2rem 0 0; font-size: .9rem; }
.tl-text { color: var(--ink-2); font-size: .95rem; margin-top: .5rem; line-height: 1.55; }
.tl-text p { margin: 0 0 .45em; }
.tl-text > *:last-child { margin-bottom: 0; }
.tl-text ul { list-style: disc; margin: .35rem 0 0; padding-left: 1.15rem; }
.tl-text li { display: list-item; margin: 0 0 .15rem; padding: 0; border: 0; }
.tl-text li::marker { color: var(--ink-3); }
@media (max-width: 980px) { .cv-section { grid-template-columns: 1fr; } .cv-section h2 { position: static; } }
@media (max-width: 640px) { .timeline > li { grid-template-columns: 1fr; gap: .4rem; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(72px, 11vw, 150px); background: var(--paper-2); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--gutter); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.footer-name { font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 3.25rem); line-height: 1; margin: 0; }
.footer-inner .muted { margin: .9rem 0 0; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer-links a { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.footer-links a:hover { color: var(--accent); }
.footer-inner .small { grid-column: 1 / -1; color: var(--ink-3); padding-top: 24px; border-top: 1px solid var(--line); margin: 0; letter-spacing: 0; text-transform: none; font-size: .78rem; }
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } }

/* ---------- Apparitions au défilement ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* Liste des archives (dev.php) */
.archive-list { margin-top: clamp(20px, 3vw, 34px); border-top: 1px solid var(--line); }

/* Le helper picture() enveloppe l'<img> dans un <picture> : sans hauteur
   explicite sur l'enveloppe, `height: 100%` sur l'image ne s'applique pas
   et laisse une bande vide dans les boîtes à ratio imposé. */
.card-media picture,
.video-frame picture { display: block; width: 100%; height: 100%; }

/* Sur téléphone, la date passe sous le titre : à deux colonnes elle
   écrasait les titres longs sur trois lignes. */
@media (max-width: 640px) {
  .mosaic .card-body { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .mosaic .card-body h3 { grid-column: 1; grid-row: 1; }
  .mosaic .card-body .eyebrow { grid-column: 1; grid-row: 2; }
}

/* Logos d'établissements dans le parcours. Les fichiers viennent de Wikimedia
   Commons (Roche : CC0 ; Université de Strasbourg : domaine public). Celui de
   Strasbourg est un bloc blanc avec les lettres en noir : il se lit tel quel sur
   les deux thèmes, on lui adoucit seulement les angles. */
.tl-when { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.tl-logo { width: auto; max-width: 92px; max-height: 34px; object-fit: contain; object-position: left center; opacity: .9; }
.tl-logo[src$="unistra.svg"] { border-radius: 2px; }
html[data-theme="dark"] .tl-logo { opacity: .95; }
@media (max-width: 640px) {
  .tl-when { flex-direction: row; align-items: center; gap: 14px; }
  .tl-logo { max-height: 26px; }
}

/* Sélecteur de langue : la langue courante en encre, l'autre en gris,
   séparées par un filet, dans la même typographie que le menu. */
.lang { display: flex; align-items: center; gap: 9px; font-size: .72rem; letter-spacing: .14em; }
.lang > :first-child { display: flex; align-items: center; gap: 9px; }
.lang > :first-child::after { content: ""; width: 1px; height: 9px; background: var(--line-2); }
.lang span, .lang a { color: var(--ink-3); transition: color .2s; }
.lang [aria-current] { color: var(--ink); }
.lang a:hover { color: var(--accent); }
@media (max-width: 760px) {
  .lang { margin-top: 1.5rem; font-size: .9rem; gap: 14px; }
  .lang > :first-child { gap: 14px; }
  .lang > :first-child::after { height: 12px; }
}
