/* Allumen.Guide — visit, client space and admin. Colours, type and radii follow the Allumen.Guide design system
   (landing page allumen.guide): Fraunces for titles, Instrument Sans for text, warm ivory/paper, framboise, safran, night. */
@font-face { font-family: 'Fraunces Variable'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/fraunces-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces Variable'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/fraunces-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans Variable'; font-style: normal; font-display: swap; font-weight: 400 700; src: url(fonts/instrument-sans-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Sans Variable'; font-style: normal; font-display: swap; font-weight: 400 700; src: url(fonts/instrument-sans-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ── Design system tokens (same names and values as the landing page) ── */
:root {
  color-scheme: light dark;
  --ivory: #fffaf3; --paper: #f7e9db; --stone-100: #fbf1e6; --stone-200: #ecd9c6; --stone-400: #c8ab93;
  --ink-ds: #302622; --ink-soft: #54453e; --ink-mute: #6b5a51;
  --framboise: #ad4936; --framboise-hover: #8e3a2b; --peach: #f9b83c; --coral: #d97b2f; --rose: #f3dcc6; --gold-soft: #fdebc2;
  --night: #573224; --night-2: #673e2e; --on-dark: #fffaf3; --on-dark-soft: #efe1d4; --glass: #2e5b78;
  --radius-s: 6px; --radius-m: 14px; --radius-l: 28px;
  /* aliases used by the app (kept so every component follows the system) */
  --ink-c: var(--ink-ds); --night-ink: var(--on-dark-soft); --raspberry: var(--framboise); --raspberry-hover: var(--framboise-hover);
  --bg: var(--ivory); --surface: #fffdf8; --surface-2: var(--stone-100); --line: var(--stone-200);
  --ink: var(--ink-ds); --ink-2: var(--ink-soft); --ink-3: var(--ink-mute);
  --prune: var(--framboise); --prune-2: var(--framboise); --prune-hover: var(--framboise-hover); --prune-soft: var(--stone-100); --on-prune: #fff;
  --terra: var(--framboise-hover); --terra-soft: var(--gold-soft); --accent: var(--peach); --accent-2: var(--coral);
  --ok: #2f6b4a; --warn-bg: var(--gold-soft); --warn-ink: #6b3d12;
  --plan-bg: #fffdf8; --plan-filter: none;
  --shadow-1: 0 1px 2px #5732240f, 0 8px 22px -12px #57322433;
  --shadow-2: 0 1px 2px #5732240f, 0 18px 40px -16px #57322442;
  --serif: 'Fraunces Variable', 'Iowan Old Style', Georgia, serif;
  --sans: 'Instrument Sans Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-s: var(--radius-s); --r-m: var(--radius-m); --r-l: var(--radius-l); --gutter: 16px; --maxw: 720px; --thumb: 72px;
  --nav-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--night); --surface: var(--night-2); --surface-2: #74483a; --line: #efe1d438;
    --ink: var(--on-dark); --ink-2: var(--on-dark-soft); --ink-3: #e4d2c3;
    --prune: var(--framboise); --prune-2: var(--peach); --prune-soft: #6e4334; --on-prune: #fff;
    --terra: var(--peach); --terra-soft: #6e4334; --ok: #9fd3b0; --warn-bg: #6e4a1e; --warn-ink: #fdebc2;
    --plan-bg: #fbf1e6;
  }
}
::selection { background: var(--gold-soft); color: var(--ink-ds); }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); padding-bottom: calc(var(--nav-h) + var(--safe-b)); }
body.has-player { padding-bottom: calc(var(--nav-h) + 72px + var(--safe-b)); }
img { max-width: 100%; display: block; }
a { color: var(--prune-2); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .4em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 6vw, 2.3rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
.ic { width: 20px; height: 20px; flex: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.small { font-size: .875rem; }
.muted { color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--prune-2); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.08rem; color: var(--ink); text-decoration: none; display: flex; flex-direction: column; line-height: 1.15; }
.brand small { font: 500 .72rem/1.2 var(--sans); color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }
.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; }

/* preview banner */
.preview-bar { background: var(--warn-bg); color: var(--warn-ink); font-size: .85rem; }
.preview-bar .wrap { display: flex; align-items: center; gap: 10px; justify-content: space-between; min-height: 40px; flex-wrap: wrap; padding-top: 4px; padding-bottom: 4px; }
.preview-bar form { margin: 0; }
.preview-bar button, .preview-pill button { font: 600 .8rem var(--sans); border-radius: 999px; padding: 6px 12px; cursor: pointer; border: 1px solid currentColor; background: transparent; color: inherit; }
.preview-pill { position: fixed; right: 12px; top: 64px; z-index: 25; }
.preview-pill button { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); border-color: var(--line); }
.badge { display: inline-flex; align-items: center; gap: 4px; font: 600 .72rem/1 var(--sans); padding: 5px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); letter-spacing: .02em; }
.badge.draft { background: var(--warn-bg); color: var(--warn-ink); }
.badge .ic { width: 13px; height: 13px; }

/* bottom nav */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.nav ul { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); max-width: var(--maxw); }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--nav-h); color: var(--ink-3); text-decoration: none; font-size: .72rem; font-weight: 600; }
.nav a[aria-current="page"] { color: var(--prune-2); }
.nav .ic { width: 22px; height: 22px; }

/* home */
.hero { padding: 28px 0 8px; display: grid; grid-template-columns: 1fr 96px; gap: 16px; align-items: end; }
.hero p { color: var(--ink-2); margin: 0; }
.hero img { width: 96px; height: auto; opacity: .9; }
.kicker { font: 700 .75rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--terra); margin: 0 0 6px; }
.section { margin: 28px 0; }
.modes { display: grid; gap: 12px; }
.mode { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 18px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); text-decoration: none; color: var(--ink); }
.mode.primary { background: var(--prune); color: var(--on-prune); border-color: transparent; }
.mode h3 { margin: 0; font-size: 1.3rem; }
.mode .meta { grid-column: 1; font-size: .9rem; opacity: .85; }
.mode .go { grid-row: 1 / span 3; grid-column: 2; width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center; background: color-mix(in srgb, currentColor 14%, transparent); }
.mode p { grid-column: 1; margin: 4px 0 0; font-size: .92rem; opacity: .9; }
.mode .badge { margin-top: 6px; justify-self: start; }
.resume { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-m); background: var(--prune-soft); color: var(--ink); text-decoration: none; margin-top: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px; }
.card + .card { margin-top: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--prune); color: var(--on-prune); font: 600 1rem var(--sans); text-decoration: none; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--prune-2); border: 1.5px solid var(--prune-2); }
.btn.block { display: flex; width: 100%; }
.notice-box { padding: 12px 14px; border-radius: var(--r-s); background: var(--warn-bg); color: var(--warn-ink); font-size: .9rem; display: flex; gap: 8px; }
.notice-box .ic { margin-top: 2px; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.info-list li:last-child { border-bottom: 0; }
.info-list .ic { color: var(--ink-3); margin-top: 3px; }

/* tour overview */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li a { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.lm { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 6px; border-radius: 999px; background: var(--terra-soft); color: var(--terra); font: 700 .95rem var(--sans); }
.steps .t { font-weight: 600; line-height: 1.3; }
.steps .s { font-size: .82rem; color: var(--ink-3); }

/* fiche */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 10px; }
.tour-chip { font: 600 .8rem var(--sans); color: var(--prune-2); background: var(--prune-soft); padding: 6px 10px; border-radius: 999px; text-decoration: none; }
.f-head { display: flex; gap: 12px; align-items: flex-start; }
.f-head .lm { min-width: 48px; height: 48px; font-size: 1.15rem; flex: none; margin-top: 2px; }
.f-type { color: var(--ink-3); font-size: .9rem; margin: -2px 0 0; }
.car { margin: 14px calc(-1 * var(--gutter)) 6px; }
.car-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding: 0 var(--gutter); scrollbar-width: none; }
.car-track::-webkit-scrollbar { display: none; }
.car figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; position: relative; }
.car.multi figure { flex-basis: 88%; }
.car img { width: 100%; max-height: 62dvh; object-fit: contain; background: var(--surface-2); border-radius: var(--r-l); }
.car figcaption { font-size: .8rem; color: var(--ink-3); margin-top: 6px; }
.car .pending { position: absolute; top: 10px; left: 10px; }
.car-dots { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.car-dots span { width: 7px; height: 7px; border-radius: 99px; background: var(--line); }
.car-dots span.on { background: var(--prune-2); }
.block { margin: 18px 0; }
.block h2 { font-family: var(--sans); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.block h2 .ic { width: 16px; height: 16px; }
.observe { background: var(--prune-soft); border-radius: var(--r-m); padding: 14px 16px; }
.observe h2 { color: var(--prune-2); }
.find { display: grid; grid-template-columns: 1fr 72px; gap: 12px; align-items: center; }
.minimap { position: relative; display: block; width: 72px; aspect-ratio: 1420 / 3290; background: var(--plan-bg) center / cover no-repeat; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; }
.minimap i { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 99px; background: var(--terra); box-shadow: 0 0 0 3px rgb(255 255 255 / .9); }
.listen { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.playbtn { width: 56px; height: 56px; flex: none; border-radius: 999px; border: 0; background: var(--prune); color: var(--on-prune); display: grid; place-items: center; cursor: pointer; }
.playbtn .ic { width: 24px; height: 24px; }
.playbtn .i-pause { display: none; }
.playbtn[aria-pressed="true"] .i-play { display: none; }
.playbtn[aria-pressed="true"] .i-pause { display: block; }
.listen .lbl { font-weight: 600; }
.listen .sub { font-size: .82rem; color: var(--ink-3); }
details.more { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); margin: 12px 0; }
details.more > summary { list-style: none; cursor: pointer; min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-weight: 600; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .ic { transition: transform .2s; }
details.more[open] > summary .ic { transform: rotate(90deg); }
details.more > div { padding: 0 16px 14px; }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: .93rem; }
dl.facts dt { color: var(--ink-3); }
dl.facts dd { margin: 0; }
.internal { border-left: 3px solid var(--warn-ink); padding-left: 10px; color: var(--ink-2); font-size: .9rem; }
.transition { font-style: italic; color: var(--ink-2); border-left: 3px solid var(--terra); padding: 4px 0 4px 12px; margin: 20px 0 10px; }
.up-next { display: block; margin: 16px 0 8px; border-radius: var(--r-l); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); text-decoration: none; color: var(--ink); }
.up-next img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface-2); }
.up-next .b { display: grid; grid-template-columns: 1fr 56px; gap: 6px 12px; align-items: center; padding: 14px 16px 16px; }
.up-next .k { grid-column: 1; font: 700 .75rem var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--terra); }
.up-next .n { grid-column: 1; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; line-height: 1.25; }
.up-next .go { grid-column: 2; grid-row: 1 / span 2; width: 56px; height: 56px; border-radius: 999px; background: var(--prune); color: var(--on-prune); display: grid; place-items: center; }
.up-next.end { background: var(--prune); color: var(--on-prune); border: 0; }
.up-next.end .k { color: inherit; opacity: .85; }
.up-next.end .go { background: var(--on-prune); color: var(--prune); }

/* explore */
.search { position: sticky; top: 57px; z-index: 5; background: var(--bg); padding: 10px 0; }
.search label { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; min-height: 48px; }
.search input { border: 0; background: transparent; font: inherit; color: var(--ink); flex: 1; min-width: 0; outline: none; }
.items { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }

/* plan */
.plan-tools { display: flex; gap: 8px; justify-content: flex-end; margin: 6px 0; }
.plan-scroll { overflow: auto; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--plan-bg); max-height: calc(100dvh - 200px); touch-action: pan-x pan-y; }
.plan-box { position: relative; width: 100%; margin: 0 auto; transition: width .2s; }
.plan-box img { width: 100%; height: auto; filter: var(--plan-filter); user-select: none; -webkit-user-drag: none; }
.mk { position: absolute; transform: translate(-50%, -50%); min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; background: var(--raspberry); color: #fff; font: 700 .85rem var(--sans); display: grid; place-items: center; text-decoration: none; box-shadow: 0 0 0 3px rgb(255 255 255 / .92), var(--shadow-1); }
.mk.tour { background: var(--prune); }
.mk:focus-visible { outline-offset: 4px; }
.mk.draft { opacity: .92; }

/* mini player */
.player { position: fixed; left: 8px; right: 8px; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); z-index: 31; max-width: calc(var(--maxw) - 16px); margin: 0 auto; background: var(--ink); color: var(--bg); border-radius: var(--r-m); box-shadow: var(--shadow-2); display: grid; grid-template-columns: 48px minmax(0, 1fr) 44px; gap: 10px; align-items: center; padding: 8px 10px; }
.player[hidden] { display: none; }
.player .playbtn { width: 48px; height: 48px; background: var(--bg); color: var(--ink); }
.player .tt { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .tm { font-size: .78rem; opacity: .8; }
.player progress { width: 100%; height: 4px; appearance: none; border: 0; background: rgb(255 255 255 / .2); border-radius: 4px; display: block; margin-top: 4px; }
.player progress::-webkit-progress-bar { background: rgb(255 255 255 / .2); border-radius: 4px; }
.player progress::-webkit-progress-value { background: var(--bg); border-radius: 4px; }
.player progress::-moz-progress-bar { background: var(--bg); }
.player .x { width: 44px; height: 44px; border: 0; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; }

/* agenda & sections */
.event { display: grid; grid-template-columns: 64px 1fr; gap: 12px; }
.event .d { text-align: center; background: var(--prune-soft); color: var(--prune-2); border-radius: 12px; padding: 8px 4px; font-weight: 700; line-height: 1.1; }
.event .d b { display: block; font-size: 1.5rem; font-family: var(--serif); }
.sec-img { border-radius: var(--r-m); margin-bottom: 12px; }
footer.foot { margin: 40px 0 20px; color: var(--ink-3); font-size: .8rem; text-align: center; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media (min-width: 720px) { :root { --gutter: 24px; } .hero { grid-template-columns: 1fr 120px; } .hero img { width: 120px; } }

/* ── buttons: hover state of the primary action ── */
.btn:hover, .mode.primary:hover, .playbtn:hover { background: var(--prune-hover); }
.btn.ghost:hover { background: var(--rose); color: var(--raspberry-hover); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.ghost:hover { background: #6e4334; color: var(--peach); } }
.lm { background: var(--terra-soft); color: var(--terra); }
.kicker, .up-next .k { color: var(--raspberry); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kicker { color: var(--peach); } }
.brand { flex-direction: row; align-items: center; gap: 10px; }
.brand img { height: 30px; width: auto; flex: none; }
.brand > span { display: flex; flex-direction: column; min-width: 0; }
.brand > span b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foot .brandline { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 10px; }
.foot .brandline img { height: 18px; width: auto; }
.foot .brandline img.word { height: 14px; }

/* ── visit home: project photo, mobile framing ── */
.v-hero { position: relative; margin: 0 calc(-1 * var(--gutter)); min-height: 420px; height: min(68dvh, 620px); overflow: hidden; background: var(--night); color: var(--ivory); display: flex; align-items: flex-end; }
.v-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(87 50 36 / 0) 35%, rgb(87 50 36 / .55) 62%, rgb(87 50 36 / .92) 100%); }
.v-hero .in { position: relative; z-index: 1; padding: 24px var(--gutter) 22px; width: 100%; }
.v-hero h1 { color: var(--ivory); margin: 0 0 6px; text-shadow: 0 1px 12px rgb(0 0 0 / .25); }
.v-hero p { color: var(--night-ink); margin: 0; }
.v-hero .kicker { color: var(--peach); }
.v-hero .credit { position: absolute; z-index: 1; top: 10px; right: 10px; font-size: .68rem; color: var(--ivory); background: rgb(87 50 36 / .6); padding: 3px 8px; border-radius: 99px; max-width: 70%; }
@media (min-width: 720px) { .v-hero { margin: 16px 0 0; border-radius: var(--r-l); height: 520px; } }
.no-hero { padding: 28px 0 8px; }

/* choose a visit, then start it */
.modes .mode { position: relative; cursor: pointer; }
.mode input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.mode .check { grid-row: 1 / span 3; grid-column: 2; width: 26px; height: 26px; border-radius: 99px; border: 2px solid currentColor; opacity: .55; display: grid; place-items: center; }
.mode:has(input:checked) { border-color: var(--raspberry); box-shadow: 0 0 0 2px var(--raspberry), var(--shadow-1); }
.mode:has(input:checked) .check { opacity: 1; background: var(--raspberry); border-color: var(--raspberry); color: #fff; }
.mode:has(input:checked) .check::after { content: ''; width: 10px; height: 10px; border-radius: 99px; background: #fff; }
.mode:has(input:focus-visible) { outline: 3px solid var(--raspberry); outline-offset: 3px; }
.mode .more { grid-column: 1; font-size: .85rem; margin-top: 6px; }
.start-bar { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); z-index: 6; margin-top: 14px; }
.start-bar .btn { width: 100%; min-height: 56px; font-size: 1.05rem; box-shadow: var(--shadow-2); }

/* ── welcome screen on « Commencer la visite » (simple fade) ── */
.welcome { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 32px 24px calc(32px + var(--safe-b)); background: radial-gradient(circle at 50% 35%, var(--ivory) 0%, var(--rose) 100%); color: var(--ink-c); opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.welcome.on { opacity: 1; pointer-events: auto; }
html.welcome-pending .welcome { opacity: 1; transition: none; }
.welcome .w-in { text-align: center; max-width: 30ch; }
.welcome .w-phrase { font: 600 clamp(1.7rem, 7vw, 2.4rem)/1.2 var(--serif); margin: 0 0 28px; letter-spacing: -.01em; }
.welcome .w-brand { display: inline-flex; gap: 8px; align-items: center; opacity: .9; }
.welcome .w-brand img { height: 22px; width: auto; }
.welcome .w-brand img.word { height: 15px; }

/* ── one card component for works: same thumbnail size and spacing everywhere ── */
.thumb { width: var(--thumb); height: var(--thumb); flex: none; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb--empty .ic { width: 22px; height: 22px; opacity: .55; }
.icard { display: grid; grid-template-columns: var(--thumb) minmax(0, 1fr) auto; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 8px 12px 8px 8px; }
.icard .body { min-width: 0; }
.icard .k { display: block; font: 700 .72rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--raspberry); margin-bottom: 2px; }
.icard .t { display: block; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; hyphens: auto; }
.icard .s { font-size: .82rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 4px; }
.icard .lm { min-width: 28px; height: 28px; font-size: .8rem; }
.icard .go { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; color: var(--raspberry); background: var(--rose); flex: none; }
.icard:hover { border-color: var(--raspberry); }
.icard.next { border-color: var(--raspberry); box-shadow: var(--shadow-1); margin: 18px 0 8px; }
.icard.next .go { background: var(--raspberry); color: var(--on-prune); }
.icard.next .t { font-family: var(--serif); font-size: 1.12rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .icard .k { color: var(--peach); } :root:not([data-theme="light"]) .icard .go { background: #6e4334; color: var(--peach); } :root:not([data-theme="light"]) .icard.next { border-color: var(--peach); } }
@media (max-width: 360px) { :root { --thumb: 60px; } .icard { gap: 10px; } .icard .go { width: 40px; height: 40px; } }
.items { gap: 10px; }
.items .icard { padding-right: 10px; }

/* admin preview bar (inside the team space) */
.adm-preview-bar { background: var(--night); color: var(--ivory); font-size: .85rem; }
.adm-preview-bar .wrap { display: flex; gap: 10px; align-items: center; justify-content: space-between; min-height: 44px; flex-wrap: wrap; }
.adm-preview-bar a { color: var(--peach); font-weight: 600; }
/* safety: the welcome screen always fades even if the script does not run */
html.welcome-pending .welcome { animation: ag-wfade .4s ease 1.8s forwards; }
@keyframes ag-wfade { to { opacity: 0; visibility: hidden; } }
.v-hero .credit { font-size: .62rem; padding: 2px 7px; max-width: 60%; line-height: 1.3; }
@media (max-width: 719px) { .v-hero { height: min(58dvh, 560px); min-height: 360px; } }
.adm-preview-bar { font-size: .78rem; }
.adm-preview-bar .wrap { min-height: 38px; padding-top: 4px; padding-bottom: 4px; }

/* ── Design system details (landing page) ── */
body { font-weight: 450; }
h1, h2, h3 { font-weight: 430; letter-spacing: -.012em; text-wrap: balance; font-optical-sizing: auto; }
h1 { font-weight: 410; }
.kicker { display: inline-flex; align-items: center; gap: .7rem; font: 560 .8rem/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--framboise); }
.kicker::before { content: ''; width: 1.75rem; height: 1px; background: var(--coral); flex: none; }
.v-hero .kicker { color: var(--peach); }
.v-hero .kicker::before { background: var(--peach); }
.btn { font-weight: 600; letter-spacing: .005em; border: 1.5px solid var(--prune); transition: background .25s, color .25s, border-color .25s; }
.btn:hover { border-color: var(--prune-hover); }
.btn.ghost { border-color: var(--framboise); }
.btn.ghost:hover { background: #ad493612; color: var(--framboise-hover); border-color: var(--framboise-hover); }
:focus-visible { outline-color: var(--framboise); }
/* v2.5 — fiche numbers take the style of the plan markers (.mk): terracotta #ad4936, white figure, light and dark modes alike.
   Multi-digit numbers (« 100 », « 25A ») never wrap and never shrink inside flex rows. */
.lm { background: var(--framboise); color: #fff; box-shadow: none; white-space: nowrap; flex: none; font-variant-numeric: tabular-nums; }
.lm.lm-inline { min-width: 26px; height: 26px; font-size: .8rem; vertical-align: middle; }
.player .tt .lm { min-width: 26px; height: 22px; font-size: .78rem; margin-right: 2px; vertical-align: 1px; }
.mk { background: var(--framboise); box-shadow: 0 0 0 3px #fffdf8, 0 0 0 4px var(--peach), var(--shadow-1); }
.mk.tour { background: var(--night); }
.welcome { background: linear-gradient(180deg, var(--ivory), var(--paper)); color: var(--ink-ds); }
.badge.draft { background: var(--gold-soft); color: #6b3d12; }
.icard:hover { border-color: var(--framboise); }
.nav a[aria-current="page"] { color: var(--framboise); }
.top { background: color-mix(in srgb, var(--ivory) 86%, transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kicker { color: var(--peach); }
  :root:not([data-theme="light"]) .kicker::before { background: var(--peach); }
  :root:not([data-theme="light"]) .top { background: color-mix(in srgb, var(--night) 88%, transparent); }
  :root:not([data-theme="light"]) .nav a[aria-current="page"] { color: var(--peach); }
  :root:not([data-theme="light"]) :focus-visible { outline-color: var(--peach); }
  :root:not([data-theme="light"]) .badge.draft { background: #6e4a1e; color: var(--gold-soft); }
}

/* ═════════ v3.0 — visit: glass navigation, works displays, languages, support ═════════ */
:root { --nav-h: 58px; --nav-gap: 10px; --nav-space: calc(var(--nav-h) + 2 * var(--nav-gap) + var(--safe-b)); }
body { padding-bottom: calc(var(--nav-space) + 12px); }
body.has-player { padding-bottom: calc(var(--nav-space) + 84px); }

/* main navigation: small floating bar, discreet frosted glass, opaque when blur is unavailable or transparency reduced */
.nav { left: var(--nav-gap); right: var(--nav-gap); bottom: calc(var(--nav-gap) + var(--safe-b)); max-width: 540px; margin: 0 auto; padding: 5px;
  border-radius: 26px; border: 1px solid color-mix(in srgb, var(--ink-ds) 12%, transparent); border-top-color: color-mix(in srgb, var(--ink-ds) 12%, transparent);
  background: color-mix(in srgb, var(--surface) 80%, transparent); -webkit-backdrop-filter: saturate(1.5) blur(18px); backdrop-filter: saturate(1.5) blur(18px);
  box-shadow: 0 10px 30px -12px rgb(48 38 34 / .38), 0 1px 2px rgb(48 38 34 / .08), inset 0 1px 0 rgb(255 255 255 / .45); view-transition-name: ag-nav; }
.nav ul { gap: 2px; max-width: none; }
.nav a { min-height: var(--nav-h); border-radius: 21px; gap: 3px; padding: 4px 2px; color: var(--ink-2); font: 600 clamp(.6rem, 2.85vw, .72rem)/1.15 var(--sans); letter-spacing: -.005em; transition: background-color .2s, color .2s; }
.nav a span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav .ic { width: 23px; height: 23px; stroke-width: 1.7; }
.nav a[aria-current="page"] { background: color-mix(in srgb, var(--framboise) 15%, var(--surface)); color: var(--framboise-hover); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--framboise) 22%, transparent); }
.nav a[aria-current="page"] .ic { stroke-width: 2.1; }
.nav a:focus-visible { outline-offset: -3px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav { border-color: rgb(255 250 243 / .14); background: color-mix(in srgb, var(--night-2) 80%, transparent); box-shadow: 0 10px 30px -12px rgb(0 0 0 / .6), inset 0 1px 0 rgb(255 255 255 / .08); }
  :root:not([data-theme="light"]) .nav a { color: var(--on-dark-soft); }
  :root:not([data-theme="light"]) .nav a[aria-current="page"] { background: var(--framboise); color: #fff; box-shadow: none; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .nav, .top { background: var(--surface); } }
@media (prefers-reduced-transparency: reduce) { .nav, .top, .lang-switch { background: var(--surface) !important; -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (forced-colors: active) { .nav a[aria-current="page"] { outline: 2px solid CanvasText; } }
.player { bottom: calc(var(--nav-space) + 4px); view-transition-name: ag-player; }
.start-bar { bottom: calc(var(--nav-space) + 4px); }
.top { view-transition-name: ag-top; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }

/* languages: compact switch in the header, full names on the home page */
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--surface-2) 85%, transparent); border: 1px solid var(--line); flex: none; }
.lang-switch a { min-width: 40px; min-height: 38px; display: grid; place-items: center; border-radius: 999px; font: 700 .76rem var(--sans); letter-spacing: .04em; color: var(--ink-2); text-decoration: none; }
.lang-switch a[aria-current] { background: var(--surface); color: var(--framboise-hover); box-shadow: 0 1px 2px rgb(48 38 34 / .14), 0 0 0 1px var(--line); }
.lang-home { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.lang-home a { flex: 1 1 0; min-width: max-content; min-height: 44px; display: grid; place-items: center; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.lang-home a[aria-current] { border-color: var(--framboise); box-shadow: inset 0 0 0 1px var(--framboise); color: var(--framboise-hover); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lang-switch a[aria-current], :root:not([data-theme="light"]) .lang-home a[aria-current] { color: var(--peach); } }
.free-note { display: flex; gap: 6px; align-items: center; font-size: .9rem; color: var(--ink-2); margin: -4px 0 12px; }
.free-note .ic { width: 18px; height: 18px; color: var(--ok); }
.fr-note { font-size: .8rem; color: var(--ink-3); margin: 6px 0 0; display: flex; gap: 6px; align-items: center; }
.fr-note > span[lang] { font: 700 .68rem/1 var(--sans); padding: 3px 5px; border-radius: 5px; border: 1px solid currentColor; }
.fr-note .ic { width: 16px; height: 16px; }

/* segmented control (display modes) — sober, distinct from the main tabs */
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); margin: 12px 0 4px; }
.seg button { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font: 600 .86rem var(--sans); cursor: pointer; }
.seg button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg button .ic { width: 18px; height: 18px; flex: none; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(48 38 34 / .16), 0 0 0 .5px var(--line); }
.seg-sm { margin: 0; } .seg-sm button { min-height: 36px; font-size: .8rem; }
@media (max-width: 340px) { .seg button .ic { display: none; } }

/* « Œuvres » */
.works-head { padding-top: 16px; }
.works-head h1 { margin: 2px 0 2px; }
.works-head p { margin: 0; }
.js [data-works] .w-view { display: none; }
.js [data-works][data-mode-current="carousel"] .w-carousel, .js [data-works][data-mode-current="list"] .w-list, .js [data-works][data-mode-current="gallery"] .w-gallery { display: block; }
html:not(.js) .w-carousel, html:not(.js) .w-gallery, html:not(.js) [data-modes] { display: none; }
.works { margin-top: 12px; }
.w-carousel { margin: 0 calc(-1 * var(--gutter)); }
.w-carousel .swiper { padding: 2px var(--gutter) 16px; }
.wcard { --wc-h: clamp(220px, 46dvh, 440px); position: relative; height: auto; display: flex; flex-direction: column; border-radius: var(--r-l); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.wc-media { display: block; height: var(--wc-h); background: var(--surface-2); }
.wc-media img, .wc-media .ph { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; color: var(--ink-3); }
.wc-lm { position: absolute; top: 12px; left: 12px; min-width: 42px; height: 42px; font-size: 1.05rem; box-shadow: 0 0 0 3px rgb(255 255 255 / .92), var(--shadow-1); }
.wc-audio { position: absolute; right: 14px; top: calc(var(--wc-h) - 32px); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; z-index: 2; }
.wc-audio .playbtn { width: 64px; height: 64px; box-shadow: 0 0 0 4px var(--surface), var(--shadow-2); }
.wc-audio .playbtn .ic { width: 28px; height: 28px; }
.wc-tracks summary { list-style: none; cursor: pointer; font: 700 .72rem/1 var(--sans); padding: 7px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); min-height: 30px; display: grid; place-items: center; }
.wc-tracks summary::-webkit-details-marker { display: none; }
.wc-tracks[open] > div { position: absolute; right: 0; top: calc(100% + 6px); width: min(250px, 70vw); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-2); padding: 8px; }
.wc-tracks p { margin: 2px 4px 6px; color: var(--ink-2); }
.trk { display: flex; width: 100%; gap: 8px; align-items: center; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: 600 .88rem var(--sans); text-align: left; cursor: pointer; }
.trk:hover, .trk[aria-pressed="true"] { background: var(--prune-soft); }
.trk .ic { width: 18px; height: 18px; color: var(--framboise); }
.trk .i-pause, .trk[aria-pressed="true"] .i-play { display: none; } .trk[aria-pressed="true"] .i-pause { display: block; }
.trk small { margin-left: auto; color: var(--ink-3); font-weight: 600; }
.wc-body { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 16px; padding-right: 92px; text-decoration: none; color: var(--ink); flex: 1; }
.wc-step { font: 700 .72rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--framboise); }
.wc-title { font: 430 1.32rem/1.2 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.wc-type { color: var(--ink-3); font-size: .88rem; }
.wc-open { display: inline-flex; align-items: center; gap: 2px; margin-top: 8px; font-weight: 600; font-size: .9rem; color: var(--prune-2); }
.wc-open .ic { width: 18px; height: 18px; }
.wc-body .badge { margin-top: 6px; align-self: flex-start; }
.w-carousel .swiper-pagination-progressbar { top: auto; bottom: 4px; left: var(--gutter); width: calc(100% - 2 * var(--gutter)); height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.w-carousel .swiper-pagination-progressbar .swiper-pagination-progressbar-fill { background: var(--framboise); }
.wc-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 2px 0 0; }
.wc-nav .iconbtn.swiper-button-disabled { opacity: .35; }
.wc-pos { font-size: .85rem; color: var(--ink-2); min-width: 10ch; text-align: center; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wc-step { color: var(--peach); } }
.icard.last-seen, .g-item.last-seen { border-color: var(--framboise); box-shadow: 0 0 0 1px var(--framboise); }

.masonry { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.js .masonry { grid-auto-rows: 8px; }
@media (min-width: 640px) { .masonry { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.g-item { display: block; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.g-img { width: 100%; height: auto; display: block; background: var(--surface-2); }
.g-item .ph { display: grid; place-items: center; aspect-ratio: 1; background: var(--surface-2); color: var(--ink-3); }
.g-cap { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px 10px; }
.g-cap .lm { min-width: 26px; height: 26px; font-size: .75rem; }
.g-t { font-weight: 600; font-size: .86rem; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto; }

/* fiche: back, number, information */
.back-chip { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; padding: 0 14px 0 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font: 600 .88rem var(--sans); text-decoration: none; }
.back-chip .ic { width: 20px; height: 20px; }
span.tour-chip { display: inline-flex; align-items: center; }
.listen + .listen { margin-top: 8px; }
.mk.focus { outline: 3px solid var(--prune); outline-offset: 3px; }

/* plan: works of the visit highlighted, the others stay available */
.plan-tools { align-items: center; flex-wrap: wrap; }
.plan-tools .grow { flex: 1; }
.plan-box.has-tour:not(.show-all) .mk:not(.in-tour) { opacity: .4; box-shadow: 0 0 0 2px rgb(255 255 255 / .9); transform: translate(-50%, -50%) scale(.82); }
.plan-box .mk.in-tour { z-index: 2; }
.plan-legend { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.mk-dot { width: 12px; height: 12px; border-radius: 99px; background: var(--framboise); opacity: .4; display: inline-block; }
.mk-dot.in { opacity: 1; }
.plan-scroll { max-height: calc(100dvh - 250px); }

/* support */
.lead { font-size: 1.05rem; color: var(--ink-2); }
.sp-list { display: grid; gap: 14px; }
@media (min-width: 720px) { .sp-list { grid-template-columns: 1fr 1fr; } }
.sp-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; box-shadow: var(--shadow-1); display: flex; flex-direction: column; }
.sp-media { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); }
.sp-media img, .sp-media .ph { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; color: var(--ink-3); }
.sp-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sp-body h3 { margin: 0; font-size: 1.2rem; } .sp-body h3 a { color: inherit; text-decoration: none; }
.sp-body > p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.sp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.sp-actions .btn { flex: 1 1 auto; min-height: 46px; }
.sp-hero { width: 100%; max-height: 46dvh; object-fit: cover; border-radius: var(--r-l); margin: 10px 0 14px; }
.sp-text { line-height: 1.65; }
.st-badge { display: inline-flex; align-items: center; font: 700 .72rem/1 var(--sans); padding: 6px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); letter-spacing: .02em; }
.st-fundraising { background: color-mix(in srgb, var(--framboise) 14%, var(--surface)); color: var(--framboise-hover); }
.st-funded, .st-done { background: #e6f1e8; color: #1f4a2c; }
.st-in_progress { background: var(--gold-soft); color: #6b3d12; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .st-fundraising { background: #6e4334; color: var(--peach); } :root:not([data-theme="light"]) .st-funded, :root:not([data-theme="light"]) .st-done { background: #2f4a36; color: #cfe8d6; } }
.gauge .bar { height: 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.gauge .bar span { display: block; height: 100%; border-radius: 99px; background: var(--framboise); }
.gauge.big .bar { height: 14px; }
.figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 10px 0 4px; }
.figs div { display: flex; flex-direction: column; }
.figs dt { font-size: .76rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.figs dd { margin: 0; font: 500 1.12rem/1.2 var(--serif); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (min-width: 480px) { .gauge.big .figs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.works-note, .gauge-none { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; margin: 8px 0 0; padding: 10px 12px; border-radius: var(--r-s); background: var(--warn-bg); color: var(--warn-ink); }
.gauge-none { background: var(--surface-2); color: var(--ink-2); }
.works-note .ic, .gauge-none .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.donate h2, .news h2 { display: flex; align-items: center; gap: 8px; }
.amounts { border: 0; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.amounts legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.amt { position: relative; }
.amt input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.amt span { display: grid; place-items: center; min-width: 64px; min-height: 46px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; white-space: nowrap; cursor: pointer; }
.amt input:checked + span { border-color: var(--framboise); background: color-mix(in srgb, var(--framboise) 12%, var(--surface)); color: var(--framboise-hover); }
.amt input:focus-visible + span { outline: 3px solid var(--framboise); outline-offset: 2px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .amt input:checked + span { color: var(--peach); } }
.other-input { display: flex; align-items: center; gap: 6px; width: 100%; }
.other-input input { flex: 1; max-width: 180px; min-height: 46px; font: inherit; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.dest { margin: 14px 0; padding: 12px 14px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); }
.dest p { margin: 0 0 6px; } .dest p:last-child { margin-bottom: 0; }
.dest-k { font-weight: 700; display: flex; gap: 6px; align-items: center; }
.dest-k .ic { width: 18px; height: 18px; color: var(--framboise); }
.dest .sum { font: 500 1.15rem var(--serif); }
.news-form { display: grid; gap: 12px; }
.fld-v { display: grid; gap: 4px; font-weight: 600; font-size: .92rem; }
.fld-v input { min-height: 48px; font: inherit; font-weight: 400; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.consent input { width: 22px; height: 22px; flex: none; margin: 1px 0 0; accent-color: var(--framboise); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.flash-ok, .flash-err { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-s); margin: 0 0 12px; }
.flash-ok { background: #e6f1e8; color: #1f4a2c; } .flash-err { background: #fde7e4; color: #7a1d12; }
.flash-ok .ic, .flash-err .ic { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.support-teaser h2 { margin-top: 0; }
/* fit the carousel card above the floating bar on phones (one-handed, standing) */
.works-head { padding-top: 10px; }
.works-head .kicker { margin: 0; }
.works-head h1 { font-size: clamp(1.5rem, 6vw, 2rem); margin: 0; }
.works-head .seg { margin: 10px 0 0; }
.wcard { --wc-h: clamp(190px, calc(100dvh - 470px), 440px); }
@media (min-height: 860px) { .wcard { --wc-h: clamp(260px, 44dvh, 460px); } }
.wc-title { font-size: 1.22rem; }
span.tour-chip { display: inline-block; }
.seg-sm { flex: 1 1 auto; } .seg-sm button { white-space: nowrap; }
/* header: the name shrinks before the language switch (small phones) */
.top .brand { min-width: 0; flex: 1 1 auto; }
@media (max-width: 360px) { .lang-switch a { min-width: 34px; font-size: .72rem; } .top .wrap { gap: 8px; } .brand img { height: 26px; } }
html, body { overflow-x: clip; }

/* ═════════ v3.1 — lighter chrome, photo-first carousel ═════════ */
/* top bar: hidden while scrolling down, back as soon as the visitor scrolls up, always shown at the top of the page */
.top { transition: transform .28s cubic-bezier(.22, .61, .36, 1), box-shadow .2s; will-change: transform; }
body.top-hidden .top { transform: translateY(calc(-100% - 2px)); }
body.top-hidden .search { top: 0; }
@media (prefers-reduced-motion: reduce) { .top { transition: none; } }

/* bottom bar: a little more transparent and lower; tabs stay 48 px high (touch), safe area kept */
:root { --nav-h: 50px; }
.nav { padding: 4px; border-radius: 24px; background: color-mix(in srgb, var(--surface) 70%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(20px); backdrop-filter: saturate(1.6) blur(20px); }
.nav a { min-height: max(48px, var(--nav-h)); border-radius: 20px; gap: 2px; padding: 3px 2px; }
.nav .ic { width: 22px; height: 22px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav { background: color-mix(in srgb, var(--night-2) 70%, transparent); } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .nav { background: var(--surface); } }
@media (prefers-reduced-transparency: reduce) { .nav, .player { background: var(--surface) !important; } .player { background: var(--ink) !important; } }

/* titles of the visits: one step heavier (Fraunces 520, the top weight of the design system) */
.mode h3 { font-weight: 520; }
.tour-h { font-weight: 500; }

/* audio player: slightly transparent, discreet blur, controls kept at full contrast */
.player { background: color-mix(in srgb, var(--ink-ds) 82%, transparent); color: #fffaf3; -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px); border: 1px solid rgb(255 250 243 / .1); }
.player .playbtn { background: #fffaf3; color: var(--ink-ds); }
.player progress::-webkit-progress-value { background: #fffaf3; } .player progress::-moz-progress-bar { background: #fffaf3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .player { background: color-mix(in srgb, #2a1912 82%, transparent); } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .player { background: var(--ink-ds); } }

/* carousel: full-photo cards, text over a dark gradient at the bottom; same height for every card (no jump) */
.wcard { --card-h: clamp(340px, calc(100svh - 298px), 640px); height: var(--card-h); display: block; background: var(--night); border: 0; box-shadow: 0 14px 34px -18px rgb(48 38 34 / .55), 0 1px 2px rgb(48 38 34 / .1); }
@media (min-height: 860px) { .wcard { --card-h: clamp(420px, calc(100svh - 318px), 660px); } }
.wc-media { position: absolute; inset: 0; height: auto; background: var(--night-2); }
.wc-media img { transform: scale(1.001); transition: transform .5s cubic-bezier(.22, .61, .36, 1); }
.wc-lm { z-index: 2; }
.wc-over { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: flex-end; gap: 10px; padding: 44px 14px 14px 16px; color: #fffaf3;
  background: linear-gradient(180deg, rgb(28 18 13 / 0) 0%, rgb(28 18 13 / .55) 38%, rgb(28 18 13 / .86) 100%); pointer-events: none; }
.wc-over > * { pointer-events: auto; }
.wcard .wc-body { flex: 1 1 auto; min-width: 0; padding: 0; color: inherit; background: none; gap: 1px; }
.wcard .wc-step { color: var(--peach); text-shadow: 0 1px 2px rgb(0 0 0 / .35); }
.wcard .wc-title { font: 520 1.34rem/1.18 var(--serif); letter-spacing: -.012em; color: #fffaf3; text-shadow: 0 1px 10px rgb(0 0 0 / .35); }
.wcard .wc-type { color: rgb(255 250 243 / .86); font-size: .86rem; }
.wcard .wc-open { display: none; }
.wc-actions { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.wc-info { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 12px 0 9px; border-radius: 999px; background: rgb(255 250 243 / .18); border: 1px solid rgb(255 250 243 / .38); color: #fffaf3; font: 600 .86rem var(--sans); text-decoration: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.wc-info .ic { width: 18px; height: 18px; }
.wc-info:active { background: rgb(255 250 243 / .3); }
.wcard .wc-audio { position: static; display: flex; flex-direction: row; align-items: center; gap: 6px; }
.wcard .wc-audio .playbtn { width: 58px; height: 58px; box-shadow: 0 0 0 3px rgb(255 250 243 / .9), 0 8px 18px -6px rgb(0 0 0 / .5); }
.wcard .wc-tracks { position: relative; }
.wcard .wc-tracks summary { background: rgb(255 250 243 / .18); border-color: rgb(255 250 243 / .38); color: #fffaf3; }
.wcard .wc-tracks[open] > div { top: auto; bottom: calc(100% + 8px); right: -64px; color: var(--ink); }
/* smoother swipe and state changes */
.w-carousel .swiper-wrapper { transition-timing-function: cubic-bezier(.25, .8, .25, 1); }
.w-carousel .swiper-slide { transition: opacity .35s ease, transform .35s cubic-bezier(.25, .8, .25, 1); }
.w-carousel .swiper-slide:not(.swiper-slide-active) { opacity: .72; transform: scale(.965); }
@media (prefers-reduced-motion: reduce) { .w-carousel .swiper-slide, .wc-media img { transition: none; } .w-carousel .swiper-slide:not(.swiper-slide-active) { transform: none; } }
.wc-nav { margin-top: 8px; }

/* opening a fiche: the card photo flows into the fiche photo; the rest of the page fades softly */
::view-transition-old(root) { animation: ag-out .2s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: ag-in .28s cubic-bezier(0, 0, .2, 1) both; }
::view-transition-group(ag-photo) { animation-duration: .34s; animation-timing-function: cubic-bezier(.22, .61, .36, 1); }
@keyframes ag-out { to { opacity: 0; } }
@keyframes ag-in { from { opacity: 0; transform: translateY(10px); } }

/* support: one project per row, on phones and computers */
.sp-list { grid-template-columns: 1fr !important; max-width: 680px; }
.sp-gallery { margin-top: 10px; }
.sp-gallery img { max-height: 46svh; object-fit: cover; }
/* while a track plays, the mini player sits above the bar: the card makes room for it (smoothly) */
.wcard { transition: height .3s cubic-bezier(.22, .61, .36, 1); }
body.has-player .wcard { --card-h: clamp(300px, calc(100svh - 372px), 640px); }
@media (min-height: 860px) { body.has-player .wcard { --card-h: clamp(380px, calc(100svh - 392px), 660px); } }
@media (prefers-reduced-motion: reduce) { .wcard { transition: none; } }

/* ═════════ v3.2 — fast carousel, free gestures, lighter player, compact support list ═════════ */
/* audio player: a little more transparent (photos show through), same corners as the bottom bar; text and buttons
   stay at full contrast (opaque play button, white text with a soft shadow on a dark frosted background) */
.player { border-radius: 24px; background: color-mix(in srgb, var(--ink-ds) 70%, transparent); -webkit-backdrop-filter: saturate(1.5) blur(20px); backdrop-filter: saturate(1.5) blur(20px); }
.player .tt, .player .tm { text-shadow: 0 1px 2px rgb(0 0 0 / .35); }
.player .tm { opacity: .9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .player { background: color-mix(in srgb, #2a1912 72%, transparent); } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .player { background: var(--ink-ds); } }
@media (prefers-reduced-transparency: reduce) { .player { background: var(--ink-ds) !important; } }

/* carousel cards: wider and a little taller on phones, all the same height; free movement, so no card is dimmed
   or shrunk (the card that stops in view is the one the visitor chose) */
.w-carousel .swiper { padding-bottom: 12px; }
.wcard { --card-h: clamp(340px, calc(100svh - 290px), 660px); }
@media (min-height: 860px) { .wcard { --card-h: clamp(420px, calc(100svh - 310px), 680px); } }
body.has-player .wcard { --card-h: clamp(300px, calc(100svh - 364px), 660px); }
@media (min-height: 860px) { body.has-player .wcard { --card-h: clamp(380px, calc(100svh - 384px), 680px); } }
.w-carousel .swiper-slide, .w-carousel .swiper-slide:not(.swiper-slide-active) { opacity: 1; transform: none; transition: none; }
.w-carousel .swiper-wrapper { transition-timing-function: cubic-bezier(.2, .7, .25, 1); }
.w-carousel .swiper { touch-action: pan-y; }
.wc-info { min-height: 44px; padding: 0 14px 0 11px; }
.wcard .wc-audio .playbtn { width: 60px; height: 60px; }

/* photo frame: discreet tone while the photo is coming (or if it fails); the photo fades in, never moves anything */
.wc-media { background: linear-gradient(160deg, var(--night-2), var(--night)); overflow: hidden; contain: strict; }
/* only a photo handed to the loader (data-src) waits hidden; a photo already in the page is always shown */
.wc-media img.wc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .28s ease; }
.js .wc-media img.wc-img[data-src]:not(.is-in) { opacity: 0; }
.wc-media img.wc-img.no-fade { transition: none; }
.wc-media img.wc-img[data-src]:not([src]) { visibility: hidden; }
.wc-media.is-err img { display: none; }
.wc-media.is-err::after { content: ""; position: absolute; left: 50%; top: 38%; width: 34px; height: 34px; margin: -17px 0 0 -17px; opacity: .28;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fffaf3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h3l2-3h6l2 3h3v11H4z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E"); }
.wc-media .ph.wc-img { position: absolute; inset: 0; display: grid; place-items: center; color: rgb(255 250 243 / .3); }
@media (prefers-reduced-motion: reduce) { .wc-media img.wc-img { transition: none; } }

/* « Projets soutenus en cours cette année »: compact list — thumbnail, title, Info */
.sp-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 680px; }
.sp-row { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 8px 10px 8px 8px; }
.sp-row:hover { border-color: var(--framboise); }
.sp-row-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-height: 72px; }
.sp-row-main .thumb img { width: 100%; height: 100%; }
.sp-row-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.sp-row-t { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; hyphens: auto; }
.sp-info { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px 0 11px; border-radius: 999px; border: 1.5px solid var(--framboise); color: var(--framboise-hover); font: 600 .88rem var(--sans); text-decoration: none; }
.sp-info .ic { width: 18px; height: 18px; }
.sp-info:hover { background: #ad493612; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sp-info { border-color: var(--peach); color: var(--peach); } }

/* ═════════ v3.3 — stable cards, softer swipe, projects, Infos, close button ═════════ */
/* design system: a sage green that sits with ivory, framboise and night (used for budget progress) */
:root { --sauge: #4f7a52; --sauge-soft: #e2ebdc; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sauge: #9cc794; --sauge-soft: #3f4a35; } }

/* carousel cards: a little taller on phones, ONE height whatever the player does (no resize when it opens or closes);
   while the player is shown, the text and buttons of the cards slide up inside the card so the player never covers them */
.wcard, body.has-player .wcard { --card-h: clamp(350px, calc(100svh - 292px), 680px); transition: none; }
@media (min-height: 860px) { .wcard, body.has-player .wcard { --card-h: clamp(430px, calc(100svh - 312px), 700px); } }
.wc-over { transition: padding-bottom .3s cubic-bezier(.22, .61, .36, 1); }
body.has-player .wcard .wc-over { padding-bottom: calc(14px + var(--player-lift, 0px)); }
@media (prefers-reduced-motion: reduce) { .wc-over { transition: none; } }
/* a little more air between the cards (JS: spaceBetween) and between the cards and the progress bar */
.w-carousel .swiper { padding-bottom: 20px; }
.w-carousel .swiper-pagination-progressbar { bottom: 4px; }
/* softer stop after a swipe: the carousel leaves the finger at about its speed and slows down progressively */
.w-carousel .swiper-wrapper { transition-timing-function: cubic-bezier(.25, .75, .35, 1); }

/* supported projects: compact row with a slim budget bar (sage), photos of a project in frames of the same height */
.sp-mini { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 2px; }
.sp-mini .bar { flex: 1 1 auto; min-width: 60px; max-width: 180px; height: 6px; border-radius: 99px; background: var(--sauge-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sauge) 22%, transparent); overflow: hidden; }
.sp-mini .bar span { display: block; height: 100%; border-radius: 99px; background: var(--sauge); }
.sp-mini small { font: 600 .78rem var(--sans); color: var(--ink-2); white-space: nowrap; }
.sp-row-body { flex: 1 1 auto; }
.sp-gallery figure { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-l); background: var(--surface-2); }
.sp-gallery img, .sp-gallery figure img { width: 100%; height: 100%; max-height: none; object-fit: cover; border-radius: 0; display: block; }
.sp-hero { aspect-ratio: 4 / 3; max-height: none; height: auto; object-fit: cover; }

/* « Infos »: same side margins as the other pages, even spacing inside and between the blocks, room above the bar */
.infos { display: grid; gap: 14px; margin-top: 4px; }
.infos .card { margin: 0; padding: 14px 16px; }
.infos .card + .card { margin-top: 0; }
.info-block h2 { display: flex; align-items: center; gap: 8px; font: 600 1.02rem/1.3 var(--sans); margin: 0 0 8px; color: var(--ink); }
.info-block h2 .ic { width: 20px; height: 20px; color: var(--framboise); flex: none; }
.info-block p { margin: 0; line-height: 1.55; }
.info-block p + p { margin-top: 6px; }
.info-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.info-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); line-height: 1.4; }
.info-rows li:last-child { border-bottom: 0; padding-bottom: 0; }
.info-rows li:first-child { padding-top: 0; }
.info-rows .d { color: var(--ink-2); flex: 1 1 auto; min-width: 0; }
.info-rows .h.wrap { white-space: normal; flex: 0 1 auto; }
.info-rows li:has(.h.wrap) .d { flex: none; }
.info-rows .h { flex: none; white-space: nowrap; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.info-block .small { margin-top: 8px; color: var(--ink-3); }
.info-block a { overflow-wrap: anywhere; }
.info-links { display: grid; gap: 10px; margin: 0; }
.info-links .btn { margin: 0; }
.infos-pending { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; vertical-align: 1px; }
.infos-end { height: 8px; }

/* fiche: « × » close button, top right, visible from the start and over the photos while scrolling */
.f-close-wrap { position: sticky; top: 64px; z-index: 15; height: 0; transition: top .28s cubic-bezier(.22, .61, .36, 1); }
body.top-hidden .f-close-wrap { top: 8px; }
.f-close { position: absolute; right: 0; top: 8px; width: 46px; height: 46px; border-radius: 999px; display: grid; place-items: center; color: var(--ink);
  background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); box-shadow: 0 6px 18px -8px rgb(48 38 34 / .45), 0 1px 2px rgb(48 38 34 / .12);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); text-decoration: none; }
.f-close .ic { width: 22px; height: 22px; stroke-width: 2.2; }
.f-close:hover { color: var(--framboise-hover); border-color: var(--framboise); }
.f-close::before { content: ""; position: absolute; inset: -4px; }   /* 54 px touch area */
.chip-row.f-chips { padding-right: 56px; }
@media (prefers-reduced-motion: reduce) { .f-close-wrap { transition: none; } }
