/* ==========================================================================
   Invenio — « Une journée »
   Clair = la journée ; sombre = la même journée vue en fin de soirée.
   ========================================================================== */

/* jetons communs : css/socle.css ; ici seulement ce que pilote la journée */
:root {
  /* pilotées par le défilement (js) */
  --sky-ink: #1E1A16;
  --sky-ink-soft: rgba(30, 26, 22, .72);
  --sky-shadow: rgba(255, 240, 225, .55);
  --stage-dim: 1;
}

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --stage-dim: .86; } }
:root[data-theme="dark"] { --stage-dim: .86; }

/* ==========================================================================
   LA JOURNÉE — scène collante + chapitres qui défilent par-dessus
   ========================================================================== */
.journey { position: relative; }

.stage { display: none; }
.motion .stage {
  display: block;
  position: sticky; top: 0;
  height: 100vh; height: 100lvh;
  overflow: hidden;
  z-index: 0;
  filter: brightness(var(--stage-dim));
  contain: strict;
}
.sky { position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--s0, #d4bcc4) 0%, var(--s1, #f3d6d4) 42%, var(--s2, #fde3d8) 72%, var(--s3, #fdeede) 100%); }
.sun {
  position: absolute; left: 0; top: 0; width: 90vmax; height: 90vmax; margin: -45vmax 0 0 -45vmax;
  background: radial-gradient(circle at center, var(--sun-core, rgba(255,240,220,.95)) 0, var(--sun-c, rgba(255,210,170,.6)) 9%, transparent 52%);
  transform: translate3d(var(--sun-x, 8vw), var(--sun-y, 60vh), 0);
  opacity: var(--sun-o, 1);
  mix-blend-mode: screen;
  will-change: transform, opacity;
}
.stars { position: absolute; inset: 0; width: 100%; height: 100%; opacity: var(--stars, 0); }
.stars-b { animation: twinkle 5.5s ease-in-out infinite alternate; }
@keyframes twinkle { from { filter: brightness(.6); } to { filter: brightness(1.25); } }
.moon {
  position: absolute; left: 42vw; top: 13vh; width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fffaf0, #f2e7cf 60%, #d8ccb4);
  box-shadow: 0 0 40px 12px rgba(255, 244, 220, .22), 0 0 120px 40px rgba(180, 190, 255, .08);
  opacity: var(--moon, 0);
}
.birds { position: absolute; left: 0; top: 14vh; width: 220px; color: rgba(40, 34, 30, .55); opacity: var(--birds, 0);
  animation: fly 26s linear infinite; }
.birds svg { width: 100%; overflow: visible; }
.bird { animation: flap .9s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.b2 { animation-delay: -.3s; } .b3 { animation-delay: -.6s; }
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(.45); } }
@keyframes fly { from { transform: translate3d(-260px, 4vh, 0); } to { transform: translate3d(105vw, -2vh, 0); } }

.big-clock {
  position: absolute; right: var(--gutter); top: 86px;
  font: 300 clamp(64px, 9.5vw, 168px)/1 var(--serif);
  font-variation-settings: "opsz" 144;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums lining-nums;
  color: var(--sky-ink); opacity: .82;
  text-shadow: 0 2px 30px var(--sky-shadow);
}

.scene {
  position: absolute; left: 0; top: 0;
  width: var(--scene-w, 110vw); aspect-ratio: 16 / 9;
  transform-origin: 0 0;
  transform: translate3d(var(--scene-x, 0px), var(--scene-y, 0px), 0) scale(var(--scene-s, 1));
  will-change: transform;
}
.scene::after { /* ombre portée du socle sur le fond */
  content: ""; position: absolute; left: 6%; right: -4%; bottom: -3%; height: 9%;
  background: radial-gradient(ellipse at 50% 30%, rgba(20, 14, 8, .38), transparent 70%);
  filter: blur(12px); z-index: -1;
}
.shot { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.shot.s0 { opacity: 1; }
.mist { position: absolute; border-radius: 50%; pointer-events: none; opacity: var(--mist, 0);
  background: radial-gradient(ellipse at center, rgba(255, 250, 244, .85), rgba(255, 250, 244, 0) 70%); filter: blur(8px); }
.m1 { left: -8%; top: 40%; width: 60%; height: 34%; animation: drift 40s ease-in-out infinite alternate; }
.m2 { left: 30%; top: 54%; width: 70%; height: 30%; animation: drift 52s ease-in-out infinite alternate-reverse; z-index: 2; opacity: calc(var(--mist, 0) * .55); }
@keyframes drift { from { transform: translateX(-4%); } to { transform: translateX(6%); } }

.smoke { position: absolute; left: 65.6%; top: 18.6%; width: 0; height: 0; opacity: var(--smoke, .4); }
.smoke i {
  position: absolute; left: -20px; top: -20px; width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle, var(--smoke-c, rgba(214, 208, 202, .95)), rgba(214, 208, 202, 0) 68%);
  filter: blur(4px); opacity: 0;
  animation: puff 7s linear infinite;
}
.smoke i:nth-child(2) { animation-delay: -1.15s; } .smoke i:nth-child(3) { animation-delay: -2.3s; }
.smoke i:nth-child(4) { animation-delay: -3.45s; } .smoke i:nth-child(5) { animation-delay: -4.6s; }
.smoke i:nth-child(6) { animation-delay: -5.75s; }
@keyframes puff {
  0% { transform: translate(0, 0) scale(.35); opacity: 0; }
  12% { opacity: .9; }
  100% { transform: translate(var(--wind, 90px), -230px) scale(3.8); opacity: 0; }
}
.glow { position: absolute; width: 22%; aspect-ratio: 1; margin: -11% 0 0 -11%; border-radius: 50%; mix-blend-mode: screen; pointer-events: none; }
.glow-street { left: 14.1%; top: 49.6%; opacity: var(--lamp1, 0);
  background: radial-gradient(circle, rgba(255, 214, 140, .95) 0, rgba(255, 170, 80, .45) 10%, rgba(255, 150, 60, 0) 55%); }
.glow-wall { left: 72.4%; top: 56.6%; width: 16%; margin: -8% 0 0 -8%; opacity: var(--lamp2, 0);
  background: radial-gradient(circle, rgba(255, 220, 150, .95) 0, rgba(255, 180, 90, .45) 9%, rgba(255, 160, 70, 0) 55%); }
.glow.flicker { animation: flicker 1.1s steps(1) 1; }
@keyframes flicker { 0% { filter: brightness(.2); } 18% { filter: brightness(1); } 30% { filter: brightness(.35); } 46% { filter: brightness(1.1); } 62% { filter: brightness(.7); } 100% { filter: brightness(1); } }

.tilt { position: absolute; left: 0; right: 0; pointer-events: none; }
.tilt-top { top: 0; height: 16%; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
.tilt-bottom { bottom: 0; height: 24%; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  -webkit-mask-image: linear-gradient(transparent, #000 85%); mask-image: linear-gradient(transparent, #000 85%); }
.grain { position: absolute; inset: 0; pointer-events: none; opacity: .06; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* Le contenu défile par-dessus la scène collante */
.motion .journey > .hero { margin-top: -100vh; margin-top: -100lvh; }
.hero, .chapter { position: relative; z-index: 2; }

/* ---------- Ouverture ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  padding: 128px var(--gutter) 40px;
  display: grid; grid-template-columns: minmax(0, 560px) 1fr; grid-template-rows: 1fr auto;
  column-gap: 40px;
}
.hero-copy { grid-column: 1; align-self: center; }
.eyebrow { font-size: 15px; font-weight: 500; color: var(--sky-ink-soft); margin-bottom: 22px; max-width: 30em; }
h1 {
  font: 300 clamp(44px, 5.6vw, 84px)/1.02 var(--serif);
  font-variation-settings: "opsz" 144;
  letter-spacing: -.025em; color: var(--sky-ink);
  text-wrap: balance;
}
.ch-head h2 em { font-style: italic; color: var(--violet); }
.journey h1 em, .eyebrow .prompt { color: var(--accent-word, #4E33CC); }
.lead { margin-top: 24px; font-size: 19px; line-height: 1.55; color: var(--sky-ink); max-width: 33em; }
.lead strong { font-weight: 600; }
.typer { margin-top: 30px; display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 12px 18px; border-radius: 14px; font: 500 15px/1.3 var(--mono); color: var(--ink);
  background: var(--card-a); box-shadow: var(--shadow-soft); }
.typer-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caret { width: 9px; height: 1.15em; background: var(--violet); border-radius: 2px; animation: caret 1s steps(1) infinite; flex: none; }
@keyframes caret { 50% { opacity: 0; } }

.programme { grid-column: 1 / -1; grid-row: 2; align-self: end; margin-top: 40px; }
.programme-title { font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--sky-ink-soft); margin-bottom: 12px; }
.programme ol { list-style: none; margin: 0; padding: 6px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px;
  background: var(--card-a); border-radius: 16px; box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.programme a { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.3; height: 100%; }
.programme a:hover { background: var(--violet-tint); }
.programme time { font: 500 13px/1 var(--mono); color: var(--violet); }
.scroll-cue { display: none; }

/* ---------- Chapitres ---------- */
.chapter { padding: 0 var(--gutter); }
.ch-photo { display: none; }
.ch-head { min-height: 64vh; padding-top: 22vh; max-width: 760px; }
.ch-time { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; color: var(--sky-ink); }
.ch-time time { font: 300 clamp(36px, 3.4vw, 50px)/1 var(--serif); font-variation-settings: "opsz" 144; letter-spacing: -.02em; font-variant-numeric: tabular-nums lining-nums; }
.ch-time span { font: 500 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sky-ink-soft); }
.ch-head h2 { font: 300 clamp(34px, 3.9vw, 58px)/1.06 var(--serif); font-variation-settings: "opsz" 144; letter-spacing: -.02em; color: var(--sky-ink); text-wrap: balance; text-shadow: 0 1px 24px var(--sky-shadow); }
.ch-head h2 em { color: inherit; }

.ch-body { display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: clamp(28px, 4vw, 72px); align-items: start; }
.card { background: var(--card-a); border-radius: var(--radius); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); border: 1px solid var(--line); }
.ch-card { padding: 32px 34px 30px; }
.ch-card p { color: var(--ink-2); }
.ch-card p strong { color: var(--ink); font-weight: 600; }
.k-inv { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink); }
.ch-card .fine { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line-2); }

.ch-ui { display: grid; gap: 28px; justify-items: start; padding-top: 18vh; }
.ch-rest { height: 72vh; }
.ch-rest-last { height: 40vh; }

/* Objets : intérieurs détourés posés sur un socle de papier */
.object { position: relative; margin: 0 0 0 auto; width: min(100%, 640px); padding: 0 0 18px;
  justify-self: end; }
.object::before { content: ""; position: absolute; left: 4%; right: 4%; bottom: 0; height: 46%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 92%, transparent), var(--card)); border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.object img { position: relative; width: 100%; filter: drop-shadow(0 26px 22px rgba(40, 26, 12, .38)) drop-shadow(0 6px 6px rgba(40, 26, 12, .22)); }
.object figcaption { position: relative; display: flex; justify-content: space-between; align-items: baseline; margin: 6px 9% 0; font: 300 26px/1.1 var(--serif); color: var(--ink); }
.object figcaption time { font: 500 13px/1 var(--mono); color: var(--violet); }

/* ---------- Fragments d'interface ---------- */
.ui { width: min(100%, 500px); background: var(--card); color: var(--ink); border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; font-size: 14px; line-height: 1.45; }
.ui-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper-2) 55%, var(--card)); }
.ui-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.bot-ico { width: 18px; height: auto; color: var(--violet); }
.ui-btn { font: 600 13px/1 var(--sans); padding: 9px 13px; border-radius: 9px; border: 0; background: color-mix(in srgb, var(--stone) 16%, transparent); color: var(--ink); cursor: default; }
.ui-primary { background: var(--violet); color: #fff; }
:root:not([data-theme="light"]) .ui-primary { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ui-primary { background: #6E55F0; } }
.ui-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); }
.ui-note { padding: 10px 16px 0; color: var(--stone); font-size: 13px; }
.fine-ui { font-size: 12.5px; color: var(--stone); }

.inbox { list-style: none; margin: 0; padding: 6px 0; }
.inbox li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: start; padding: 11px 16px; }
.inbox li + li { border-top: 1px solid var(--line); }
.inbox b { display: block; font-weight: 600; }
.inbox div span { display: block; color: var(--ink-2); }
.inbox .act { display: inline-block; margin-top: 6px; font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--violet); background: var(--violet-tint); padding: 4px 8px; border-radius: 7px; }
.inbox .dim b, .inbox .dim div span { color: var(--stone); }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 600 12px/1 var(--sans); background: #E7D7C1; color: #5B4428; }
.av-2 { background: #D8E3D2; color: #2F5130; } .av-3 { background: #DCD6F2; color: #3D2E86; } .av-4 { background: #E4E0DA; color: #57514A; }
.fold { font-size: 11.5px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line-2); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }

.msgs { padding: 16px; display: grid; gap: 12px; }
.msg { max-width: 92%; }
.msg.me { justify-self: end; background: var(--user); color: var(--user-fg); padding: 11px 14px; border-radius: 16px 16px 4px 16px; }
.msg.bot { justify-self: start; }
.msg.bot > p { color: var(--ink); }
.att { display: flex; align-items: center; gap: 6px; margin-top: 8px; font: 500 12px/1 var(--mono); opacity: .85; }
.ico { width: 15px; height: 15px; flex: none; display: inline-block; vertical-align: -2px; }
.msg .ico-mic { margin-right: 6px; }
.doc { margin-top: 10px; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--paper) 40%, var(--card)); }
.doc-h { display: flex; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc-h span { color: var(--stone); }
.doc table { width: 100%; border-collapse: collapse; font-size: 13px; }
.doc td { padding: 7px 12px; border-bottom: 1px solid var(--line); }
.doc td:nth-child(2) { color: var(--stone); text-align: center; white-space: nowrap; }
.doc td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.doc .tot td { font-weight: 700; border-bottom: 0; }
.acts { display: flex; gap: 8px; margin-top: 12px; }

.call { padding: 14px 16px 16px; }
.call-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.call-h span:last-child { color: var(--stone); font-size: 13px; }
.call-ico { width: 26px; height: 26px; border-radius: 50%; background: var(--ok-tint); position: relative; }
.call-ico::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--ok); }
.call h4 { margin: 14px 0 6px; font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--stone); }
.call > p { color: var(--ink-2); }
.rdv { margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: var(--violet-tint); color: var(--ink) !important; }
.rdv b { color: var(--violet); margin-right: 6px; }
.tr { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 13px; color: var(--ink-2); }
.tr b { display: inline-block; min-width: 82px; font-weight: 600; color: var(--ink); }
.call .fine-ui { margin-top: 10px; }

.week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 14px 16px 16px; }
.wd { font: 500 11px/1 var(--mono); color: var(--stone); text-transform: uppercase; letter-spacing: .08em; }
.ev { font-size: 12.5px; font-weight: 600; padding: 8px 10px; border-radius: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-a { background: #E9DBC3; color: #5A4020; } .ev-b { background: #DCD6F2; color: #3D2E86; } .ev-c { background: #D8E3D2; color: #2F5130; }

.op { padding: 12px 16px; }
.op + .op { border-top: 1px solid var(--line); }
.op-h { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.op-h .in { color: var(--ok); white-space: nowrap; } .op-h .out { color: var(--bad); white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .op-h .out { color: #F0A27F; } }
.sug { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 8px; font-size: 13px; }
.sug a { font-weight: 600; text-decoration: underline; }
.sug .why { color: var(--stone); flex-basis: 100%; }
.pill { font: 700 11.5px/1 var(--mono); padding: 5px 8px; border-radius: 999px; }
.pill-ok { background: var(--ok-tint); color: var(--ok); } .pill-mid { background: var(--warn-tint); color: var(--warn); }
.rel { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rel th { text-align: left; font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--stone); padding: 12px 16px 8px; }
.rel td { padding: 10px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.rel td span { display: block; color: var(--stone); font-size: 12.5px; }
.rel td:nth-child(2) { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--warn); font-weight: 600; }

.stock { list-style: none; margin: 0; padding: 8px 16px; }
.stock li { display: grid; grid-template-columns: 1fr 110px 70px; gap: 12px; align-items: center; padding: 9px 0; }
.stock li + li { border-top: 1px solid var(--line); }
.stock b { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
.bar { height: 6px; border-radius: 9px; background: color-mix(in srgb, var(--stone) 18%, transparent); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--warn); border-radius: 9px; }
.stock .ok .bar i { background: var(--ok); }
.kv { margin: 0; display: grid; gap: 0; min-width: 260px; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.kv div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 12px; }
.kv div + div { border-top: 1px solid var(--line); }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.kv .hl { background: var(--violet-tint); } .kv .hl dd { color: var(--violet); }
.ui-marge .fine-ui { margin-top: 8px; }

.missions { list-style: none; margin: 0; padding: 4px 0; }
.missions li { display: grid; gap: 3px; padding: 12px 16px; }
.missions li + li { border-top: 1px solid var(--line); }
.missions span { color: var(--ink-2); font-size: 13px; }
.missions em { font-style: normal; font: 500 12px/1.4 var(--mono); color: var(--violet); }
.ui-missions .fine-ui { padding: 0 16px 14px; }
.files { list-style: none; margin: 0; padding: 8px 16px; display: grid; gap: 2px; }
.files li { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.f { width: 40px; text-align: center; font: 700 10.5px/1 var(--mono); padding: 7px 0; border-radius: 7px; background: color-mix(in srgb, var(--stone) 16%, transparent); color: var(--ink-2); }

/* décalages en quinconce des fragments (bureau) */
.ch-ui .ui:nth-child(odd) { justify-self: start; }
@media (min-width: 1100px) {
  .ch-ui .object + .ui { margin-top: -120px; margin-left: -60px; position: relative; z-index: 2; }
  .ch-ui .ui + .ui { justify-self: end; margin-top: -10px; }
}

/* ==========================================================================
   Sections après la journée
   ========================================================================== */

.assist-grid { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.convo { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.convo-bar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 600; }
.convo-bar .tag { margin-left: auto; }
.convo-list { list-style: none; margin: 0; padding: 20px 18px; display: grid; gap: 14px; min-height: 460px; align-content: start; }
.convo-list .msg.bot { background: color-mix(in srgb, var(--paper) 50%, var(--card)); border: 1px solid var(--line); padding: 12px 14px; border-radius: 16px 16px 16px 4px; }
.mini { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.mini b { color: var(--ink); }
.convo-input { display: flex; align-items: center; gap: 10px; margin: 0 14px 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); }
.ph { color: var(--stone); flex: 1; }
.mic-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--violet); position: relative; }
.mic-btn { display: grid; place-items: center; color: #fff; }
.mic-btn .ico { width: 16px; height: 16px; }
.motion .convo [data-step] { opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s cubic-bezier(.2,.7,.2,1); }
.motion .convo [data-step].on { opacity: 1; transform: none; }

.modes { display: grid; grid-template-columns: 1fr; gap: 12px; }
.mode { padding: 22px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.mode h3 { font: 400 24px/1.15 var(--serif); margin-bottom: 8px; }
.mode p { color: var(--ink-2); font-size: 15.5px; }
.mode-rule { background: var(--violet-tint); border-color: transparent; }
.mode { display: grid; grid-template-columns: 170px 1fr; gap: 6px 20px; align-items: baseline; }
.mode h3 { margin: 0; }
.asks { margin-top: 56px; }
.asks-title { font: 500 13px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--stone); margin-bottom: 14px; }
.asks-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.asks-list li { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-2); font: 500 14.5px/1.45 var(--mono); color: var(--ink); }

.capot-grid { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.ui-droits { width: 100%; }
.droits { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.droits th, .droits td { padding: 12px 12px; text-align: left; border-top: 1px solid var(--line); }
.droits thead th { border-top: 0; font: 500 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--stone); }
.droits tbody th { font-weight: 600; }
.lv { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 7px; white-space: nowrap; }
.lv-w { background: var(--ok-tint); color: var(--ok); } .lv-r { background: var(--violet-tint); color: var(--violet); } .lv-n { background: color-mix(in srgb, var(--stone) 14%, transparent); color: var(--stone); }



/* ---------- Nuit : appel final ---------- */


/* ---------- Apparitions (pilotées par GSAP) ---------- */
.motion [data-reveal] { opacity: 0; }

/* ==========================================================================
   Version statique (mouvement réduit ou sans JS) : complète et posée
   ========================================================================== */
html:not(.motion) .hero { min-height: auto; padding-top: 120px; padding-bottom: 72px; --sky-ink: var(--ink); --sky-ink-soft: var(--stone);
  background: linear-gradient(180deg, color-mix(in srgb, #f6dcd4 50%, var(--paper)) 0%, var(--paper) 100%); }
html:not(.motion) .journey { --sky-ink: var(--ink); --sky-ink-soft: var(--stone); --sky-shadow: transparent; }
html:not(.motion) .chapter { padding-top: 72px; padding-bottom: 24px; }
html:not(.motion) .ch-photo { display: block; margin: 0 0 32px; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); max-width: 1100px; }
html:not(.motion) .ch-photo img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
html:not(.motion) .ch-head { min-height: 0; padding-top: 0; margin-bottom: 32px; }
html:not(.motion) .ch-ui { padding-top: 0; }
html:not(.motion) .ch-rest { display: none; }
html:not(.motion) .card { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--card); }
html:not(.motion) .typer .caret { animation: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .programme ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .hero { grid-template-columns: 1fr; }
  .ch-body { grid-template-columns: 1fr; }
  .ch-ui { padding-top: 0; justify-items: stretch; }
  .ui { width: 100%; max-width: 560px; }
  .object { margin: 0 auto; }
  .assist-grid, .capot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 699px) {
  .big-clock { display: none; }
  .programme { display: none; }
  .hero { padding: 88px 16px 28px; }
  .hero-copy { align-self: start; }
  .eyebrow { font-size: 14px; margin-bottom: 14px; }
  h1 { font-size: 40px; }
  .lead { font-size: 17px; margin-top: 16px; }
  .typer { display: none; }
  .programme { margin-top: 28px; }
  .programme ol { grid-template-columns: 1fr 1fr; }
  .programme a { padding: 10px; font-size: 13.5px; }
  .chapter { padding: 0 16px; }
  .ch-head { padding-top: 16vh; min-height: 52vh; }
  .ch-card { padding: 24px 20px; }
  .ch-ui { gap: 20px; margin-top: 20px; }
  .ch-rest { height: 60vh; }
  .ui { font-size: 13.5px; }
  .inbox li { grid-template-columns: 30px 1fr; }
  .inbox .fold { grid-column: 2; justify-self: start; }
  .av { width: 30px; height: 30px; }
  .stock li { grid-template-columns: 1fr 64px 60px; }
  .tilt { display: none; }
  .mode { grid-template-columns: 1fr; }
  .asks-list { grid-template-columns: 1fr; }
  .droits { font-size: 12px; }
  .droits th, .droits td { padding: 9px 6px; }
  .ui-droits { overflow-x: auto; }
}
@media (max-width: 380px) {
  h1 { font-size: 36px; }
}

/* le premier chapitre laisse l'ouverture sortir de l'écran avant d'entrer */
.motion .hero + .chapter .ch-head { padding-top: 48vh; }

/* ==========================================================================
   Après la journée : la nuit continue
   ========================================================================== */
.nightfall { position: relative; z-index: 3; height: 82vh; margin-top: -36vh; margin-bottom: -1px; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,10,30,0) 0%, rgba(0,10,30,.85) 26%, #031a3a 46%, #3a3550 66%, color-mix(in srgb, #E9B98A 30%, var(--paper)) 86%, var(--paper) 100%); overflow: hidden; }
.nightfall .stars { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 1;
  -webkit-mask-image: linear-gradient(#000 0%, transparent 60%); mask-image: linear-gradient(transparent 10%, #000 34%, transparent 72%); }
.nf-lamp { position: absolute; left: 50%; top: 70%; width: 70vw; height: 70vw; margin: -35vw 0 0 -35vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 120, .45), rgba(255, 170, 90, .12) 30%, transparent 62%); mix-blend-mode: screen; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nightfall { background: linear-gradient(180deg, rgba(0,10,30,0) 0%, rgba(0,10,30,.85) 26%, #031a3a 46%, #2a2230 72%, var(--paper) 100%); } }
:root[data-theme="dark"] .nightfall { background: linear-gradient(180deg, rgba(0,10,30,0) 0%, rgba(0,10,30,.85) 26%, #031a3a 46%, #2a2230 72%, var(--paper) 100%); }


/* ==========================================================================
   Page des offres : le voyage de la camionnette
   ========================================================================== */
.offres-more { margin-top: 18px; }
.road { position: relative; z-index: 1; padding-top: 68px; background: var(--paper); }
.road-view { position: relative; height: clamp(360px, 62vh, 620px); overflow: hidden; background: #EDE3D6; isolation: isolate; }
.trip-scene { position: absolute; inset: 0; overflow: hidden; }
.trip-static { opacity: 0; transition: opacity .6s; }
.trip-static.is-on { opacity: 1; }
.trip-static img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 72%; }
html:not(.js) .trip-static { opacity: 1; }
.trip-cam { position: absolute; inset: 0; transform-origin: 50% 60%; will-change: transform; }
.trip-world { position: absolute; left: 0; top: 0; width: 3072px; height: 1728px; /* 1536 × 864 × WK (js/offres.js) */ transform-origin: 0 0; will-change: transform; }
.trip-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  }
.trip-van { position: absolute; left: 0; top: 0; height: 0; transform-origin: 0 0; will-change: transform; }
.trip-hd { position: absolute; left: 0; top: 0; width: 0; height: 0; max-width: none; }
.trip-van3d { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; display: none; will-change: transform; }
.van-3d .trip-van3d { display: block; }
.van-3d .trip-van { display: none; }
.trip-van-turn { position: absolute; left: -50%; bottom: -4%; width: 100%; transition: transform .45s cubic-bezier(.4,0,.2,1); }
.trip-van-body { position: relative; animation: bump 1.5s ease-in-out infinite; }
.trip-van-body img { display: block; width: 100%; height: auto; transition: opacity .35s; filter: drop-shadow(0 1px 1px rgba(20, 14, 8, .35)); }
.trip-van-body .v-34 { position: absolute; left: 6%; bottom: 0; width: 84%; opacity: 0; }
.trip-van.is-34 .v-profil { opacity: 0; }
.trip-van.is-34 .v-34 { opacity: 1; }
.trip-van-shadow { position: absolute; left: 4%; right: 4%; bottom: -5%; height: 16%; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(20, 14, 6, .55), rgba(20, 14, 6, 0) 70%); filter: blur(1.5px); }
@keyframes bump { 0%, 100% { transform: translateY(0) rotate(0); } 23% { transform: translateY(-2.2%) rotate(-.35deg); }
  41% { transform: translateY(.6%) rotate(.15deg); } 67% { transform: translateY(-1.2%) rotate(.2deg); } 82% { transform: translateY(.4%) rotate(0); } }
html:not(.motion) .trip-van-body { animation: none; }
.trip-label { position: absolute; z-index: 5; left: var(--gutter); bottom: 22px; margin: 0; font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: #FFF8EE; background: rgba(30, 26, 22, .42); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 8px 12px; border-radius: 999px; }
.trip-label.pop { animation: pop .8s cubic-bezier(.2,.7,.2,1); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
html:not(.motion) .trip-label { display: none; }
.road .tilt { z-index: 4; }
.road .tilt-top { height: 22%; } .road .tilt-bottom { height: 26%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .road-view { background: #1B2236; }
  :root:not([data-theme="light"]) .trip-van-body img { filter: brightness(.78) saturate(.9) drop-shadow(0 1px 1px rgba(0,0,0,.5)); } }

@media (max-width: 699px) {
  .road { padding-top: 60px; }
  .road-view { height: 46vh; min-height: 300px; }
  .trip-label { left: 16px; bottom: 14px; }
}

/* raccords du voyage */
.trip-scene { will-change: opacity; }
.trip-grade { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; mix-blend-mode: soft-light; }
.trip-streak { position: absolute; inset: -20%; z-index: 3; pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(from 0deg at 50% 30%, rgba(255,250,240,.0) 0deg 2.2deg, rgba(255,250,240,.32) 2.6deg, rgba(255,250,240,0) 3.4deg 6deg);
  -webkit-mask-image: radial-gradient(circle at 50% 38%, transparent 0, transparent 14%, #000 55%); mask-image: radial-gradient(circle at 50% 38%, transparent 0, transparent 14%, #000 55%);
  filter: blur(2px); }
.is-soir .trip-streak { background: repeating-conic-gradient(from 0deg at 50% 30%, rgba(180,200,255,0) 0deg 2.2deg, rgba(180,200,255,.22) 2.6deg, rgba(180,200,255,0) 3.4deg 6deg); }
.trip-defs { position: absolute; }
/* le tronc de premier plan : écorce floue + feuillage, très proche de l'objectif */
.trip-wipe { position: absolute; top: -8%; bottom: -8%; left: 0; z-index: 3; pointer-events: none; opacity: 0; will-change: transform; }
.trip-wipe i { position: absolute; display: block; }
.trip-wipe i:nth-child(1) { left: 22%; right: 22%; top: 0; bottom: 0; border-radius: 40%;
  background: linear-gradient(90deg, #2a1d12 0%, #4a3523 22%, #6b5038 40%, #3c2a1b 62%, #20150d 100%),
    repeating-linear-gradient(93deg, transparent 0 18px, rgba(0,0,0,.25) 18px 22px);
  background-blend-mode: multiply; filter: blur(14px); }
.trip-wipe i:nth-child(2) { left: -30%; right: -10%; top: -10%; height: 46%; border-radius: 50%;
  background: radial-gradient(circle at 30% 60%, #4c5a2a 0 18%, transparent 19%), radial-gradient(circle at 60% 40%, #5f6b30 0 22%, transparent 23%),
    radial-gradient(circle at 80% 70%, #3e4a22 0 20%, transparent 21%), radial-gradient(ellipse at 50% 50%, #44502a 0 55%, transparent 70%);
  filter: blur(20px); }
.trip-wipe i:nth-child(3) { left: 8%; right: 8%; bottom: -6%; height: 22%; border-radius: 50%; background: radial-gradient(ellipse, #2b2016 0 50%, transparent 72%); filter: blur(16px); }
.is-soir .trip-wipe i:nth-child(1) { background: linear-gradient(90deg, #0b0a0c 0%, #1b1714 30%, #2a221c 45%, #141012 70%, #08070a 100%); }
.is-soir .trip-wipe i:nth-child(2) { background: radial-gradient(ellipse at 50% 50%, #151a14 0 55%, transparent 70%); }
/* variante feuillage (forêt → mer) : une masse de feuilles d'automne floue au premier plan, sans tronc */
.trip-wipe.is-leaf i:nth-child(1) { opacity: 0; }
.trip-wipe.is-leaf i:nth-child(2) { left: -10%; right: -10%; top: -4%; height: 108%; border-radius: 0;
  /* découpé dans l'image de la forêt : le gros chêne roux du premier plan, flouté comme un premier plan hors champ */
  background: url(../img/v2-foret-jour-1536.webp) 2% 96% / 330% auto no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 78%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 78%);
  filter: blur(16px) saturate(1.1) brightness(.85); }
.trip-wipe.is-leaf i:nth-child(3) { left: 20%; right: -10%; bottom: 10%; height: 40%; background: radial-gradient(ellipse, #3c1d0c 0 45%, transparent 72%); filter: blur(26px); }
.is-soir .trip-wipe.is-leaf i:nth-child(2) { background-image: url(../img/v2-foret-soir-1536.webp); }
