/* Passa Païs : charte reprise du plan des fresques (vert du Parc, rose du tracé,
   capitales grasses en italique sur bandes blanches). Une seule ambiance, verte :
   le site se lit dehors, au soleil, devant le mur.
   Formes : tout est à angle vif comme les étiquettes du plan, sauf les pastilles
   numérotées et le bouton lecture, ronds. */

:root {
  --green: #8cc63f;
  --green-deep: #5f9d2c;
  --green-light: #b8da6a;
  --green-pale: #e9f3d3;
  --paper: #fbfdf5;
  --pink: #d82b7f;
  --pink-deep: #c41f6f;
  --ink: #11200d;
  --ink-soft: #2f4425;
  --shadow: 0 18px 40px -18px rgb(23 54 10 / .55);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: 16px;
  --max: 1240px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--green);
  color: var(--ink);
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-stretch: 100%;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 32px; } }

/* ---------- Typo ---------- */
.display {
  font-weight: 900;
  font-style: italic;
  font-stretch: 112%;
  text-transform: uppercase;
  line-height: 1.02;
  letter-spacing: -.01em;
  margin: 0;
}
/* bandes blanches du plan : chaque ligne garde son propre fond */
.strip > span {
  background: var(--paper);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: .04em .22em .02em;
}
.strip { line-height: 1.24; }
.tag {
  display: inline-block;
  background: var(--pink);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.25;
  padding: .45em .7em;
}
.tag small { font-weight: 500; font-style: italic; }
.num {
  display: inline-grid;
  place-items: center;
  width: 2em; height: 2em;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  flex: none;
  place-content: center;
  text-decoration: none;
}
.num.lg { font-size: 20px; }
.lede { font-size: 1.14em; line-height: 1.55; font-weight: 500; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  min-height: 48px; padding: 0 1.2em;
  border: 0; border-radius: 0;
  background: var(--ink); color: var(--paper);
  font-weight: 800; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), background-color .2s;
}
.btn.pink { background: var(--pink); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn i { font-size: 1.25em; }

/* ---------- Barre du haut ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--green) 88%, transparent);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .display { font-size: 19px; }
.brand .display span { color: var(--pink-deep); }
.top nav { display: flex; gap: 4px; }
.top nav a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
  font-weight: 700; font-size: 15px; text-decoration: none;
}
.top nav a:hover { background: var(--green-light); }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; text-decoration: none; }
.back i { font-size: 20px; }

/* ---------- Accueil : hero ---------- */
/* le collage d'origine est un bandeau 3:1 : pleine largeur en haut, le titre dessous */
.hero { position: relative; display: grid; grid-template-rows: auto auto; }
.hero-media { position: relative; margin: 0; height: 36dvh; min-height: 240px; max-height: 620px; overflow: hidden; background: var(--green-deep); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; transform-origin: 50% 50%; }
.hero-copy { position: relative; z-index: 2; padding-top: 40px; padding-bottom: 48px; display: grid; gap: 22px; align-content: start; }
.hero-side { display: grid; gap: 20px; justify-items: start; }
.hero h1 { font-size: clamp(30px, 9vw, 76px); }
.hero h1 .pink { background: none; padding: 0; }
.hero h1 .pink > span { background: var(--pink); color: #fff; padding: .04em .22em .02em; }
.hero p { margin: 0; max-width: 34ch; font-size: 18px; font-weight: 500; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 900px) {
  .hero-media { height: min(30vw, 44dvh); min-height: 320px; }
  .hero-copy { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); column-gap: 64px; align-items: end; padding-top: 44px; padding-bottom: 56px; }
  .hero h1 { font-size: clamp(40px, 4.2vw, 62px); white-space: nowrap; }
  .hero-side { padding-bottom: 6px; }
}

/* ---------- Bandeau RALENTIR (le thème du projet, défile lentement) ---------- */
.marquee { overflow: hidden; background: var(--ink); color: var(--green); padding: 14px 0; }
.marquee-track { display: flex; width: max-content; gap: 0; }
.marquee span { font-size: clamp(34px, 9vw, 72px); padding-right: .6em; }
.marquee span:nth-child(even) { color: var(--pink); }

/* ---------- Sections ---------- */
section { scroll-margin-top: 64px; }
.sec { padding: 64px 0; }
.sec-head { display: grid; gap: 14px; margin-bottom: 28px; max-width: 46rem; }
.sec-head h2 { font-size: clamp(32px, 8vw, 56px); }
.sec-head p { margin: 0; font-size: 18px; }

/* ---------- Carte ---------- */
.map-shell { position: relative; overflow: hidden; background: var(--green-pale); box-shadow: var(--shadow); isolation: isolate; }
.map { height: min(78dvh, 680px); min-height: 480px; background: var(--green-pale); }
.map .maplibregl-canvas { outline: none; }
.map:not(.ready) { background: linear-gradient(100deg, var(--green-pale) 30%, #f3f8e6 50%, var(--green-pale) 70%) 0 0 / 300% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -300% 0; } }
.map-tools { position: absolute; z-index: 3; top: 12px; right: 12px; display: grid; gap: 8px; justify-items: end; }
.tool {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 14px;
  border: 0; border-radius: 22px; background: var(--paper); color: var(--ink);
  font-weight: 800; font-size: 15px; box-shadow: 0 6px 16px -6px rgb(23 54 10 / .45);
  transition: transform .2s var(--ease), background-color .2s;
}
.tool:first-child { background: var(--pink); color: #fff; }
.tool.icon { width: 44px; padding: 0; justify-content: center; font-size: 18px; }
.tool:active { transform: scale(.94); }
.maplibregl-ctrl-attrib.maplibregl-compact { margin: 8px; background: rgb(251 253 245 / .85); font-size: 11px; }
.pin { border: 0; padding: 0; background: none; cursor: pointer; }
.pin b {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--pink); color: #fff; font-weight: 800; font-size: 14px; line-height: 1;
  box-shadow: 0 0 0 2.5px var(--paper), 0 4px 10px rgb(23 54 10 / .35);
  transition: transform .35s var(--ease), background-color .25s;
}
.pin.extra b { background: var(--paper); color: var(--pink-deep); box-shadow: 0 0 0 2.5px var(--pink), 0 4px 10px rgb(23 54 10 / .3); }
.pin.on { z-index: 2; }
.pin.on b { transform: scale(1.35); background: var(--ink); }
.ready .pin b { animation: pop .55s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes pop { from { transform: scale(0); } }
.me { width: 18px; height: 18px; border-radius: 50%; background: #2563d6; box-shadow: 0 0 0 4px #fff, 0 0 0 12px rgb(37 99 214 / .22); }
.map-rail {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 12px;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(82%, 320px); gap: 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; padding: 4px 16px 6px;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.map-rail::-webkit-scrollbar { display: none; }
.map-card {
  scroll-snap-align: start; display: grid; grid-template-columns: 96px 1fr; min-height: 96px;
  background: var(--paper); color: var(--ink); text-decoration: none;
  box-shadow: 0 10px 24px -12px rgb(23 54 10 / .55);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.map-card img { width: 96px; height: 100%; object-fit: cover; }
.map-card.on { transform: translateY(-4px); box-shadow: 0 0 0 3px var(--ink), 0 14px 28px -12px rgb(23 54 10 / .6); }
.mc-body { display: grid; gap: 4px; align-content: center; padding: 10px 12px; min-width: 0; }
.mc-top { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; color: var(--ink-soft); }
.mc-top .num { width: 24px; height: 24px; font-size: 12px; }
.mc-body .display { font-size: 17px; line-height: 1.05; }
.mc-who { font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast {
  position: absolute; z-index: 4; left: 12px; right: 76px; top: 12px;
  background: var(--ink); color: var(--paper); font-weight: 700; font-size: 14px; line-height: 1.35; padding: 11px 14px;
  opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .3s, transform .4s var(--ease);
}
.toast.show { opacity: 1; transform: none; }
.map-fallback { display: none; }
.map-fail { display: none; }
.map-fail ~ .map-tools, .map-fail ~ .map-rail { display: none; }
.map-fail ~ .map-fallback { display: grid; gap: 12px; padding: 0 0 16px; font-weight: 700; text-decoration: none; }
.map-fallback span { padding: 0 16px; }
.map-credit { margin: 8px 0 0; font-size: 12px; color: var(--ink-soft); }
.map-credit a { color: inherit; }
.legend-link { margin-top: 14px; display: inline-flex; gap: 8px; align-items: center; font-weight: 700; min-height: 44px; }
@media (min-width: 900px) {
  .map { height: 640px; }
  .map-rail { left: 16px; right: auto; top: 16px; bottom: 16px; grid-auto-flow: row; grid-auto-columns: auto; grid-auto-rows: min-content; width: 330px; overflow: auto; scroll-snap-type: y mandatory; padding: 4px; }
  .toast { left: 362px; right: 76px; }
}

/* ---------- Parcours : mur de photos ----------
   8 fresques = 12 cases exactement : la 1 en grand (2x2), la 8 en large (2x1), les autres simples. */
.road-intro { margin: -10px 0 20px; max-width: 52ch; font-weight: 500; }
.wall { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 168px; gap: 8px; }
.wall li { min-width: 0; }
.wall .w0 { grid-column: span 2; grid-row: span 2; }
.wall .w7 { grid-column: span 2; }
.wall a { position: relative; display: block; height: 100%; overflow: hidden; color: #fff; text-decoration: none; background: var(--green-deep); }
.wall img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.wall a:hover img, .wall a:focus-visible img { transform: scale(1.05); }
.wall a::after { content: ''; position: absolute; inset: 30% 0 0; background: linear-gradient(transparent, rgb(10 20 6 / .88)); pointer-events: none; }
.wall-cap { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 12px; display: grid; gap: 5px; }
.wall-top { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wall-top .num { width: 28px; height: 28px; font-size: 13px; box-shadow: 0 0 0 2px rgb(255 255 255 / .9); }
.wall-cap .display { font-size: clamp(16px, 4.4vw, 22px); text-shadow: 0 1px 12px rgb(0 0 0 / .35); }
.wall .w0 .wall-cap .display, .wall .w7 .wall-cap .display { font-size: clamp(22px, 6.4vw, 30px); }
.wall-who { font-size: 12px; font-weight: 600; line-height: 1.35; color: rgb(255 255 255 / .9); }
@media (max-width: 420px) { .wall li:not(.w0):not(.w7) .wall-who { display: none; } }
@media (min-width: 900px) {
  .wall { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 240px; gap: 12px; }
  .wall-cap { left: 18px; right: 18px; bottom: 16px; }
  .wall-cap .display { font-size: 24px; }
  .wall .w0 .wall-cap .display { font-size: 38px; }
  .wall .w7 .wall-cap .display { font-size: 30px; }
  .wall-who { font-size: 13px; }
}

/* ---------- Artistes ---------- */
.artists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .artists { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1180px) { .artists { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.artist {
  position: relative; display: grid; align-content: end;
  aspect-ratio: 3 / 4; overflow: hidden; border: 0; padding: 0; text-align: left;
  background: var(--green-deep); color: var(--ink);
}
.artist img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.artist::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgb(17 32 13 / .55)); pointer-events: none; }
.artist:hover img { transform: scale(1.05); }
.artist .cap { position: relative; z-index: 1; padding: 10px; display: grid; gap: 6px; justify-items: start; }
.artist .display { font-size: clamp(17px, 4.6vw, 22px); }
@media (min-width: 1180px) { .artist .display { font-size: 18px; } .artist.solo .big { font-size: 96px; align-content: start; padding-top: 18%; } }
.artist .nums { display: flex; gap: 4px; }
.artist .nums .num { width: 26px; height: 26px; font-size: 12px; }
.artist.solo { background: var(--pink); }
.artist.solo::after { display: none; }
.artist.solo .big { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 140px; font-weight: 900; font-style: italic; line-height: 1; }
@media (max-width: 759px) { .artist.solo { grid-column: span 2; aspect-ratio: auto; min-height: 120px; } .artist.solo .big { justify-content: end; padding-right: 24px; font-size: 110px; } }
.hint { display: flex; gap: 6px; align-items: center; font-weight: 700; font-size: 14px; color: var(--ink-soft); margin: 14px 0 0; }

/* ---------- Discours ---------- */
.quote { margin: 0 auto; display: grid; gap: 18px; max-width: 46rem; text-align: center; justify-items: center; }
.quote p { margin: 0; font-size: clamp(26px, 6.6vw, 46px); line-height: 1.12; font-weight: 800; font-style: italic; font-stretch: 105%; }
.quote figcaption { font-weight: 600; max-width: 30ch; }
details.speech { margin: 32px auto 0; max-width: 46rem; background: var(--paper); }
details.speech summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 18px; font-weight: 800;
}
details.speech summary::-webkit-details-marker { display: none; }
details.speech summary i { transition: transform .3s var(--ease); font-size: 20px; }
details.speech[open] summary i { transform: rotate(45deg); }
details.speech .body { padding: 0 18px 22px; }
details.speech h3 { font-size: 22px; margin: 6px 0 12px; }
details.speech .cap { font-size: 14px; font-style: italic; color: var(--ink-soft); }

/* ---------- Lecteur audio ---------- */
.player {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center;
  background: var(--ink); color: var(--paper); padding: 14px 16px 14px 14px;
}
.play {
  grid-row: span 2; width: 64px; height: 64px; border-radius: 50%; border: 0;
  background: var(--pink); color: #fff; display: grid; place-items: center; font-size: 28px;
  transition: transform .25s var(--ease);
}
.play:active { transform: scale(.94); }
.player .label { display: flex; align-items: center; gap: 10px; font-weight: 800; line-height: 1.25; }
.player .label small { display: block; font-weight: 500; color: var(--green-light); }
.bars { display: inline-flex; gap: 3px; align-items: end; height: 16px; flex: none; }
.bars i { width: 3px; height: 30%; background: var(--green); }
.playing .bars i { animation: eq .9s ease-in-out infinite alternate; }
.playing .bars i:nth-child(2) { animation-delay: -.3s; }
.playing .bars i:nth-child(3) { animation-delay: -.6s; }
.playing .bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { to { height: 100%; } }
.seek { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--green-light); }
.seek input { width: 100%; accent-color: var(--pink); height: 28px; margin: 0; background: transparent; }

.mini {
  position: fixed; z-index: 60; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom));
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  background: var(--ink); color: var(--paper); padding: 8px 8px 8px 8px; box-shadow: var(--shadow);
  transform: translateY(160%); transition: transform .45s var(--ease);
}
.mini:not(.show) { visibility: hidden; transition: transform .45s var(--ease), visibility 0s .45s; }
.mini.show { transform: none; }
.mini .play { width: 46px; height: 46px; font-size: 20px; grid-row: auto; }
.mini .t { font-weight: 800; font-size: 14px; line-height: 1.2; min-width: 0; }
.mini .t span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini progress { width: 100%; height: 4px; appearance: none; border: 0; background: #ffffff30; display: block; margin-top: 6px; }
.mini progress::-webkit-progress-bar { background: #ffffff30; }
.mini progress::-webkit-progress-value { background: var(--pink); }
.mini progress::-moz-progress-bar { background: var(--pink); }
.mini .x { width: 40px; height: 40px; border: 0; background: none; color: var(--paper); font-size: 20px; }
@media (min-width: 700px) { .mini { left: auto; width: 380px; right: 16px; } }

/* ---------- Page fresque ---------- */
.f-hero { position: relative; }
.f-cover { margin: 0; height: 44dvh; min-height: 280px; max-height: 720px; overflow: hidden; background: var(--green-deep); }
.f-cover img { width: 100%; height: 100%; object-fit: cover; }
.f-title { position: relative; z-index: 2; padding-top: 18px; display: grid; gap: 10px; justify-items: start; }
.f-title h1 { font-size: clamp(28px, 8.6vw, 68px); }
.f-title .where { display: flex; align-items: stretch; gap: 0; }
.f-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
@media (min-width: 1000px) {
  .f-hero { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; align-items: center; min-height: min(calc(100dvh - 60px), 760px); }
  .f-cover { height: calc(100% - 64px); min-height: 480px; max-height: none; margin: 32px 0 32px 32px; }
  .f-title { padding: 40px max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) 40px 0; margin: 0; width: auto; max-width: none; gap: 14px; }
  .f-title h1 { font-size: clamp(40px, 4.4vw, 68px); }
  .f-layout { padding-top: 8px; }
}
.f-title .where .num { width: auto; height: auto; min-width: 2.6em; border-radius: 0; font-size: 16px; padding: 0 .4em; background: var(--ink); }
.who-links { display: flex; flex-wrap: wrap; gap: 6px 14px; font-weight: 800; font-size: 18px; }
.who-links button { border: 0; background: none; padding: 0; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; font-weight: 800; }
.listen {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px 0 8px;
  border: 0; border-radius: 26px; background: var(--ink); color: var(--paper); font-weight: 800; font-size: 16px;
  box-shadow: 0 10px 24px -12px rgb(17 32 13 / .7); transition: transform .2s var(--ease);
}
.listen i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--pink); color: #fff; font-size: 17px; }
.listen small { font-weight: 600; color: var(--green-light); font-variant-numeric: tabular-nums; }
.listen:active { transform: scale(.97); }
.f-facts > * { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px 0 11px; background: var(--paper); color: var(--ink); font-weight: 700; font-size: 14px; line-height: 1; white-space: nowrap; text-decoration: none; transition: background-color .2s; }
.f-facts a:hover { background: var(--green-pale); }
.f-facts i { display: block; line-height: 1; color: var(--pink-deep); font-size: 18px; }
.f-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 28px 72px; }
.f-article { display: grid; align-content: start; }
.f-lede { margin: 0 0 26px; font-size: clamp(22px, 5.6vw, 30px); line-height: 1.32; font-weight: 700; font-style: italic; font-stretch: 104%; max-width: 30ch; }
.f-lede::first-letter { float: left; font-size: 3.2em; line-height: .8; padding: .08em .1em 0 0; font-weight: 900; color: var(--pink-deep); }
.f-body { background: var(--paper); margin-inline: calc(var(--gutter) * -1); padding: 24px var(--gutter) 6px; }
.f-body p { margin: 0 0 1.1em; font-size: 18px; line-height: 1.72; max-width: 64ch; }
.f-wide { margin: 0 calc(var(--gutter) * -1); }
.f-wide button, .mosaic button { display: block; width: 100%; height: 100%; border: 0; padding: 0; background: var(--green-deep); overflow: hidden; }
.f-wide img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.f-photos { margin-top: 36px; }
.mosaic { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 132px; gap: 6px; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.mosaic button:hover img { transform: scale(1.05); }
.mosaic button:first-child { grid-column: span 2; grid-row: span 2; }
.mosaic.n4 button:last-child, .mosaic.n6 button:last-child { grid-column: span 2; }
.f-side { display: grid; gap: 14px; align-content: start; }
.f-side .h3 { margin: 18px 0 0; font-size: 22px; }
.people { display: grid; gap: 10px; }
.person { display: grid; grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto 1fr auto; gap: 6px 16px; border: 0; padding: 0; background: var(--paper); text-align: left; transition: transform .25s var(--ease); }
.person:hover { transform: translateY(-2px); }
.person img { grid-row: span 3; width: 104px; height: 100%; min-height: 150px; object-fit: cover; }
.person .display { font-size: 20px; padding: 14px 16px 0 0; }
.person-bio { font-size: 14px; line-height: 1.5; color: var(--ink-soft); padding-right: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.person small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; font-weight: 800; color: var(--pink-deep); padding: 2px 16px 14px 0; }
@media (min-width: 700px) {
  .f-body, .f-wide { margin-inline: 0; }
  .f-lede { max-width: none; font-size: clamp(24px, 2.3vw, 32px); }
  .f-body { padding: 32px 36px 10px; }
  .mosaic { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 170px; }
  .mosaic.n4 button:last-child, .mosaic.n6 button:last-child { grid-column: auto; }
}
@media (min-width: 1000px) {
  .f-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: start; }
  .f-side { position: sticky; top: 76px; }
}
.h3 { font-size: 24px; margin: 0 0 14px; }

.minimap { height: 220px; background: var(--green-light); }
.next-prev { display: grid; gap: 12px; }
@media (min-width: 700px) { .next-prev { grid-template-columns: 1fr 1fr; } }
.np { position: relative; display: grid; grid-template-columns: 1fr 108px; min-height: 120px; background: var(--ink); color: var(--paper); text-decoration: none; overflow: hidden; }
.np img { width: 108px; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.np:hover img { transform: scale(1.06); }
.np div { padding: 14px 16px; display: grid; gap: 6px; align-content: center; }
.np small { font-weight: 700; color: var(--green-light); display: flex; gap: 6px; align-items: center; }
.np .display { font-size: 20px; }
.np.prev { background: var(--green-deep); }
.np.prev small { color: var(--paper); }

/* ---------- Dialogues (bio, visionneuse) ---------- */
dialog { border: 0; padding: 0; max-width: none; max-height: none; color: var(--ink); }
dialog::backdrop { background: rgb(10 22 6 / .72); }
.bio { width: 100%; height: 100dvh; margin: 0; background: var(--paper); overflow: auto; overscroll-behavior: contain; }
.bio[open] { animation: up .5s var(--ease); }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.bio-pic { position: relative; height: 46dvh; background: var(--pink); overflow: hidden; }
.bio-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.bio-pic .big { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 200px; font-weight: 900; font-style: italic; }
.bio-main { position: relative; padding: 0 20px 36px; margin-top: -26px; }
.bio-main h2 { font-size: clamp(30px, 9vw, 52px); margin-bottom: 18px; }
.bio .content p { margin: 0 0 1em; }
.bio .content p:first-child { font-size: 1.12em; font-weight: 500; }
.bio .h3 { margin-top: 24px; }
.bio .works { display: flex; flex-wrap: wrap; gap: 8px; }
.bio .works a { display: inline-flex; align-items: center; gap: 8px; background: var(--green); padding: 6px 14px 6px 6px; text-decoration: none; font-weight: 700; font-size: 15px; }
.bio .x, .viewer .x { position: fixed; z-index: 2; top: 12px; right: 12px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--paper); font-size: 22px; display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgb(17 32 13 / .5); }
@media (min-width: 900px) {
  .bio { width: min(1080px, calc(100vw - 64px)); height: min(720px, calc(100dvh - 64px)); margin: auto; grid-template-columns: 38% 1fr; overflow: hidden; }
  .bio[open] { display: grid; }
  .bio-pic { height: 100%; }
  .bio-main { margin: 0; padding: 48px 48px 40px; overflow: auto; }
  .bio .content { columns: 2; column-gap: 36px; font-size: 15.5px; line-height: 1.55; }
  .bio .content p:first-child { font-size: 1em; font-weight: 600; }
  .bio { height: min(780px, calc(100dvh - 48px)); }
  .bio .content p { break-inside: avoid; }
  .bio .content .h3, .bio .content .works { column-span: all; }
  .bio .x { position: absolute; }
}

.viewer { width: 100vw; height: 100dvh; background: #0b1408; }
.viewer[open] { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; } }
.viewer .track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.viewer .track::-webkit-scrollbar { display: none; }
.viewer figure { margin: 0; display: grid; place-items: center; scroll-snap-align: center; padding: 56px 8px 24px; }
.viewer img { max-height: calc(100dvh - 80px); width: auto; max-width: 100%; object-fit: contain; }
.viewer .arrows { position: absolute; bottom: 16px; right: 16px; display: none; gap: 8px; }
.viewer .arrows button { width: 48px; height: 48px; border: 0; background: var(--paper); font-size: 20px; }
@media (hover: hover) { .viewer .arrows { display: flex; } }

/* ---------- Pied ---------- */
.foot { background: var(--ink); color: var(--paper); padding: 48px 0 calc(48px + env(safe-area-inset-bottom)); }
.foot .wrap { display: grid; gap: 28px; justify-items: center; text-align: center; }
.foot .display { font-size: 28px; color: var(--green); }
.foot p { margin: 0; max-width: 52ch; color: #dfe9d2; }
.logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 32px; align-items: center; }
.logos img { height: 56px; width: auto; opacity: .92; }
.credit { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin: 0; padding-top: 20px; border-top: 1px solid rgb(251 253 245 / .18); font-size: 14px; color: #c9d8b8; }
.credit a { color: var(--green); font-weight: 800; text-decoration: none; }
.credit a:hover { text-decoration: underline; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-weight: 600; }

/* ---------- Pages simples ---------- */
.prose { background: var(--paper); padding: 28px 18px; margin: 24px 0 64px; }
.prose p { max-width: 70ch; }
.prose h1 { font-size: clamp(30px, 8vw, 48px); margin-bottom: 18px; }
@media (min-width: 700px) { .prose { padding: 40px; } }

/* ---------- Mouvement ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
  .reveal.in { opacity: 1; transform: none; }
  .rise { animation: rise .9s var(--ease) both; animation-delay: var(--d, 0s); }
  @keyframes rise { from { opacity: 0; transform: translateY(36px) skewY(3deg); } }
  .zoom-in { animation: zoom 1.8s var(--ease) both; }
  @keyframes zoom { from { transform: scale(1.14); } }
  .marquee-track { animation: slide 38s linear infinite; }
  @keyframes slide { to { transform: translateX(-50%); } }
  @supports (animation-timeline: view()) {
    .route .rail::before { animation: grow linear both; animation-timeline: view(); animation-range: entry 10% cover 55%; }
    @keyframes grow { from { transform: scaleY(0); } }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ready .pin b, .playing .bars i, .map:not(.ready) { animation: none; }
}

.minimap .maplibregl-ctrl-group { border-radius: 22px; overflow: hidden; box-shadow: 0 6px 16px -6px rgb(23 54 10 / .45); }
.minimap .maplibregl-ctrl-group button { width: 38px; height: 38px; }
.maplibregl-cooperative-gesture-screen { font-family: inherit; font-weight: 700; background: rgb(17 32 13 / .55); }
.next-prev > :only-child { grid-column: 1 / -1; }

/* Accueil : le menu se pose sur le collage, puis redevient vert plein sous l'image */
.top.over { margin-bottom: -60px; background: linear-gradient(rgb(10 20 6 / .62), rgb(10 20 6 / 0)); backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--paper); transition: background-color .35s; }
.top.over .brand .display span { color: #ff8cc6; }
.top.over nav a:hover { background: rgb(251 253 245 / .16); }
.top.over.solid { background: color-mix(in srgb, var(--green) 92%, transparent); backdrop-filter: blur(10px) saturate(140%); -webkit-backdrop-filter: blur(10px) saturate(140%); color: var(--ink); }
.top.over.solid .brand .display span { color: var(--pink-deep); }
.top.over.solid nav a:hover { background: var(--green-light); }
