@font-face {
  font-family: 'Great Vibes';
  src: url('../assets/fonts/great-vibes-latin.woff2') format('woff2');
  font-display: swap;
}
:root {
  --bg: #0b0e14;
  --panel: rgba(14, 18, 26, 0.82);
  --line: rgba(255, 255, 255, 0.12);
  --text: #eef0e6;
  --muted: #aab0a2;
  --glow: #d9ff6b;
  --glow-soft: rgba(217, 255, 107, 0.18);
  --kraft: #c9a06c;
  --water: #5fc9d8;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --calli: 'Great Vibes', 'Snell Roundhand', 'Apple Chancery', 'Segoe Script', cursive;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); }
a { color: var(--glow); }
kbd {
  display: inline-block; min-width: 1.6em; padding: 0.05em 0.35em; margin: 0 0.1em;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px;
  font: 0.85em var(--sans); text-align: center; background: rgba(255, 255, 255, 0.06);
}
.hidden { display: none !important; }
.small { font-size: 0.85rem; color: var(--muted); }
.title { font-family: var(--serif); font-weight: 600; letter-spacing: 0.01em; margin: 0; }
.calli {
  font-family: var(--calli); font-weight: 400; letter-spacing: 0; line-height: 1.05;
  color: #f6f8e6; text-shadow: 0 0 18px rgba(217, 255, 107, 0.35), 0 0 2px rgba(217, 255, 107, 0.5);
}
.btn svg, .tab svg, .dock-btn svg { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.subtitle { font-family: var(--serif); font-style: italic; color: var(--kraft); margin: 0.3rem 0 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  padding: 0.7em 1.2em; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06); color: var(--text); font: 600 0.98rem var(--sans);
  cursor: pointer; text-decoration: none; transition: background 0.2s, border-color 0.2s, transform 0.1s;
}
.btn:hover { background: rgba(255, 255, 255, 0.12); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--glow); color: #18200a; border-color: transparent; box-shadow: 0 0 24px var(--glow-soft); }
.btn.primary:hover { background: #e7ff98; }
.btn.ghost { background: transparent; }

/* ---------- application 3D ---------- */
body.app { overflow: hidden; overscroll-behavior: none; touch-action: none; }
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; outline: none; }
#scene.grabbing { cursor: grabbing; }
/* éclair : voile lumineux bref sur la scène (sous l'interface) */
.flash {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: screen; will-change: opacity;
  background: radial-gradient(ellipse at 50% 15%, rgb(235, 241, 255) 0%, rgb(190, 205, 240) 60%, rgb(150, 165, 205) 100%);
}

.loading, .intro {
  position: fixed; inset: 0; display: grid; place-items: center; z-index: 20; padding: 1rem;
}
.loading { background: radial-gradient(ellipse at 50% 40%, #1a2230 0%, var(--bg) 70%); transition: opacity 0.6s; }
.loading-inner { text-align: center; width: min(420px, 90vw); }
.loading .title { font-size: clamp(3rem, 9vw, 5rem); }
.bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 1.4rem 0 0.6rem; }
.bar span { display: block; height: 100%; width: 0; background: var(--glow); box-shadow: 0 0 12px var(--glow); transition: width 0.25s; }

.intro { background: linear-gradient(180deg, rgba(8, 10, 16, 0.25) 0%, rgba(8, 10, 16, 0.65) 100%); padding-top: 5rem; }
.intro-card {
  width: min(560px, 94vw); padding: 2rem 2rem 1.4rem; border-radius: 20px;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.intro-card .title { font-size: clamp(2.8rem, 7vw, 4rem); }
.intro-card p { line-height: 1.55; }
.intro-card .quest { color: var(--glow); }
.intro-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.2rem 0 0.8rem; }
body.touch .hint-desktop, body:not(.touch) .hint-touch { display: none; }

.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  gap: 0.8rem; padding: max(0.7rem, env(safe-area-inset-top)) 1rem 0.7rem; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 7, 12, 0.55), rgba(5, 7, 12, 0));
}
.hud > * { pointer-events: auto; }
.hud-title { font-family: var(--serif); font-size: 1.25rem; color: var(--text); text-decoration: none; text-shadow: 0 1px 8px #000; white-space: nowrap; }
.hud-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem; }
.chip {
  padding: 0.45em 0.85em; border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); font: 600 0.85rem var(--sans); cursor: pointer; backdrop-filter: blur(6px);
}
.chip:hover { border-color: rgba(217, 255, 107, 0.5); }
.chip.on { border-color: var(--glow); color: var(--glow); }

.counter {
  position: fixed; left: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 10;
  display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.9rem; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); font-weight: 700;
}
body.touch .counter { left: 50%; transform: translateX(-50%); bottom: auto; top: 6.6rem; }
.counter .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 10px 3px var(--glow-soft), 0 0 4px var(--glow); }
.toast {
  position: fixed; left: 50%; top: 18%; transform: translate(-50%, -10px); z-index: 15; opacity: 0;
  padding: 0.7rem 1.2rem; border-radius: 14px; background: var(--panel); border: 1px solid rgba(217, 255, 107, 0.45);
  color: var(--glow); font-weight: 600; text-align: center; max-width: 90vw; transition: opacity 0.3s, transform 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.crosshair { position: fixed; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(255, 255, 255, 0.75); z-index: 9; pointer-events: none; box-shadow: 0 0 4px #000; }
.lock-hint { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); white-space: nowrap; z-index: 9; padding: 0.4rem 0.9rem; border-radius: 999px; background: var(--panel); font-size: 0.85rem; color: var(--muted); }

.sky-panel {
  position: fixed; right: 1rem; top: 4.4rem; z-index: 11; width: min(340px, 92vw); padding: 1rem 1.1rem;
  border-radius: 16px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px);
  display: flex; flex-direction: column; gap: 0.6rem; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.sky-head { display: flex; justify-content: space-between; align-items: center; }
.sky-head h2 { margin: 0; font-family: var(--serif); font-size: 1.3rem; }
.sky-panel label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.88rem; }
.sky-panel input, .sky-panel select { font: inherit; padding: 0.4rem 0.5rem; border-radius: 8px; border: 1px solid var(--line); background: #0d1119; color: var(--text); }
.sky-panel input[type=range] { padding: 0; accent-color: var(--glow); }
.sky-panel p { margin: 0; }
.sky-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
#sky-hour-label { color: var(--glow); font-weight: 700; }
/* panneau météo : cinq choix avec icône, intensité de la pluie ou de la neige */
.wx-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }
.wx {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.5rem 0.2rem; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--text); font: 600 0.7rem/1.15 var(--sans);
  cursor: pointer; text-align: center; transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.wx svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wx:hover { border-color: rgba(217, 255, 107, 0.5); }
.wx.on { color: var(--glow); border-color: var(--glow); background: rgba(217, 255, 107, 0.1); }
#wx-int-label { color: var(--glow); font-weight: 700; }
#wx-int.dim { opacity: 0.5; }
.help { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(0, 0, 0, 0.5); }
.help-card { width: min(520px, 94vw); padding: 1.6rem; border-radius: 18px; background: #121722; border: 1px solid var(--line); }
.help-card h2 { font-family: var(--serif); margin-top: 0; }
.quality-row { display: flex; flex-direction: column; gap: 0.3rem; margin: 0.8rem 0; font-size: 0.9rem; }
.quality-row select { font: inherit; padding: 0.4rem 0.5rem; border-radius: 8px; border: 1px solid var(--line); background: #0d1119; color: var(--text); }
.quality-row input[type="range"] { width: 100%; accent-color: #7ec8e3; }
@media (prefers-reduced-motion: reduce) {
  .dock-btn, .tab, .caption, .toast { transition: none !important; animation: none !important; }
}
.search-panel { position: fixed; inset: 0; z-index: 28; display: grid; place-items: start center; padding: 12vh 1rem 1rem; background: rgba(0,0,0,.45); }
.search-panel.hidden { display: none; }
.search-card { width: min(420px, 94vw); background: #121722; border: 1px solid var(--line); border-radius: 16px; padding: 1rem; }
.search-label { display: flex; flex-direction: column; gap: .4rem; font-size: .9rem; }
.search-label input { font: inherit; padding: .55rem .7rem; border-radius: 10px; border: 1px solid var(--line); background: #0d1119; color: var(--text); }
.search-list { margin: .75rem 0; max-height: 42vh; overflow: auto; display: flex; flex-direction: column; gap: .35rem; }
.search-list button { all: unset; cursor: pointer; padding: .55rem .65rem; border-radius: 10px; background: #0d1119; border: 1px solid transparent; }
.search-list button:hover { border-color: var(--line); }
.search-list b { display: block; }
.search-list span { color: #9aa3b5; font-size: .82rem; }
.search-list .empty { color: #9aa3b5; margin: .4rem 0; }
.help-card { max-height: 92vh; overflow: auto; }
.help-card table { width: 100%; border-collapse: collapse; margin-bottom: 0.8rem; }
.help-card td { padding: 0.35rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.help-card td:first-child { white-space: nowrap; padding-right: 1rem; }

.joystick {
  position: fixed; left: max(1.2rem, env(safe-area-inset-left)); bottom: max(1.4rem, env(safe-area-inset-bottom)); z-index: 12;
  width: 130px; height: 130px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); touch-action: none;
}
.joystick .stick { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(217, 255, 107, 0.55); box-shadow: 0 0 18px var(--glow-soft); }
.jump {
  position: fixed; right: max(1.2rem, env(safe-area-inset-right)); bottom: max(2rem, env(safe-area-inset-bottom)); z-index: 12;
  width: 84px; height: 84px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-weight: 700;
}
@media (max-width: 760px) {
  .hud { flex-direction: column; align-items: flex-start; }
  .hud-actions { justify-content: flex-start; }
  .chip { font-size: 0.78rem; padding: 0.4em 0.7em; }
}

/* ---------- barre du haut (commune à la maquette et à la présentation) ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 25; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 1rem; padding: max(0.55rem, env(safe-area-inset-top)) 1.1rem 0.55rem;
  background: linear-gradient(180deg, rgba(7, 9, 14, 0.82), rgba(7, 9, 14, 0.45) 70%, rgba(7, 9, 14, 0));
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar.static { position: sticky; background: linear-gradient(180deg, rgba(11, 14, 20, 0.95), rgba(11, 14, 20, 0.8)); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); margin: 0 calc(50% - 50vw); padding-left: max(1.1rem, calc(50vw - 590px)); padding-right: max(1.1rem, calc(50vw - 590px)); }
body.presentation { overflow-x: clip; }
.brand {
  justify-self: start; font-family: var(--calli); font-size: clamp(1.7rem, 2.6vw, 2.3rem); line-height: 1; white-space: nowrap;
  color: #f6f8e6; text-decoration: none; text-shadow: 0 0 14px rgba(217, 255, 107, 0.35), 0 1px 6px #000; padding: 0.1em 0.15em;
  transition: text-shadow 0.25s;
}
.brand:hover { text-shadow: 0 0 22px rgba(217, 255, 107, 0.7), 0 1px 6px #000; }
.tabs {
  display: flex; gap: 0.25rem; padding: 0.25rem; border-radius: 999px; background: rgba(14, 18, 26, 0.78);
  border: 1px solid var(--line); backdrop-filter: blur(10px); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.tab {
  display: inline-flex; align-items: center; gap: 0.45em; padding: 0.5em 1em; border-radius: 999px; color: var(--muted);
  text-decoration: none; font: 600 0.9rem var(--sans); white-space: nowrap; transition: background 0.2s, color 0.2s;
}
.tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.tab.active { background: var(--glow); color: #18200a; box-shadow: 0 0 18px var(--glow-soft); }
.tab:focus-visible, .seg button:focus-visible, .dock-btn:focus-visible, .brand:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
.seg { justify-self: end; display: flex; padding: 0.2rem; border-radius: 999px; background: rgba(14, 18, 26, 0.78); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.seg button {
  border: 0; background: none; color: var(--muted); font: 600 0.82rem var(--sans); padding: 0.45em 0.95em; border-radius: 999px; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: rgba(255, 255, 255, 0.14); color: var(--text); box-shadow: inset 0 0 0 1px rgba(217, 255, 107, 0.45); }
.seg button.busy { opacity: 0.6; cursor: progress; }
.topbar-spacer { justify-self: end; }
.dock {
  --dock-top: calc(var(--topbar-h, 64px) + 10px);
  --dock-room: calc(100dvh - var(--topbar-h, 64px) - 20px - var(--dock-reserve, 0px));
  position: fixed; right: max(0.9rem, env(safe-area-inset-right)); z-index: 20;
  top: calc(var(--dock-top) + var(--dock-room) / 2); transform: translateY(-50%); max-height: var(--dock-room);
  display: flex; flex-direction: column; gap: 0.35rem; padding: 0.4rem; border-radius: 999px;
  background: rgba(14, 18, 26, 0.72); border: 1px solid var(--line); backdrop-filter: blur(10px); box-shadow: 0 10px 34px rgba(0, 0, 0, 0.4);
}
.dock-sep { flex: none; height: 1px; margin: 0.15rem 0.5rem; background: var(--line); }
.dock.compact { gap: 0.15rem; padding: 0.3rem; }
.dock.compact .dock-btn { width: 38px; height: 38px; font-size: 1rem; }
.dock.compact .dock-sep { margin: 0.1rem 0.45rem; }
.dock.scroll {
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; border-radius: 26px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}
.dock.scroll::-webkit-scrollbar { display: none; }
.dock.scroll .dock-btn .tip { display: none; }            /* dans une barre qui défile, l'infobulle serait coupée */
.dock-btn {
  flex: none; position: relative; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: transparent; color: var(--text); cursor: pointer; font-size: 1.1rem; transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.dock-btn:hover { background: rgba(255, 255, 255, 0.1); }
.dock-btn.on { color: var(--glow); background: rgba(217, 255, 107, 0.12); box-shadow: inset 0 0 0 1px rgba(217, 255, 107, 0.5); }
.dock-btn .tip {
  position: absolute; right: calc(100% + 0.7rem); top: 50%; transform: translate(6px, -50%); white-space: nowrap; pointer-events: none;
  padding: 0.35rem 0.7rem; border-radius: 10px; background: rgba(10, 13, 19, 0.94); border: 1px solid var(--line);
  color: var(--text); font: 600 0.8rem var(--sans); opacity: 0; transition: opacity 0.15s, transform 0.15s;
}
.dock-btn:hover .tip, .dock-btn:focus-visible .tip { opacity: 1; transform: translate(0, -50%); }
.dock-btn .tip kbd { font-size: 0.75em; margin-left: 0.3em; }
#btn-night .i-sun, #btn-night.is-night .i-moon { display: none; }
#btn-night.is-night .i-sun { display: inline; }
#btn-sound .i-on, #btn-sound.on .i-off { display: none; }
#btn-sound.on .i-on { display: inline; }
.sky-panel { right: calc(max(0.9rem, env(safe-area-inset-right)) + 68px) !important; top: 50% !important; transform: translateY(-50%); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; row-gap: 0.45rem; }
  .tabs { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .seg { grid-column: 2; grid-row: 1; }
}
@media (max-width: 560px) {
  .tab { padding: 0.5em 0.75em; font-size: 0.8rem; }
  .tab span { max-width: 9.5em; overflow: hidden; text-overflow: ellipsis; }
  .tab[data-nav="presentation"] span, .tab[href="presentation.html"] span { display: none; }
  .brand { font-size: 1.6rem; }
  body.touch .dock-btn .tip { display: none; }
  .sky-panel { top: auto !important; bottom: 1rem; transform: none; right: calc(max(0.9rem, env(safe-area-inset-right)) + 66px) !important; left: 0.6rem; width: auto; max-height: 70vh; overflow: auto; }
  .wx-choices { gap: 0.25rem; }
  .wx { font-size: 0.7rem; padding: 0.4rem 0.1rem; }
}

/* ---------- page de présentation ---------- */
body.presentation { line-height: 1.6; background: radial-gradient(ellipse at 50% -10%, #1b2433 0%, var(--bg) 55%) fixed; }
.page { width: min(1180px, 94vw); margin: 0 auto; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; }
.top .brand { font-family: var(--serif); font-size: 1.2rem; color: var(--text); text-decoration: none; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2.5rem; align-items: center; padding: 2.5rem 0 3rem; }
.hero h1 { font-size: clamp(3.4rem, 8vw, 6rem); line-height: 1.05; }
.hero .lead { font-size: 1.15rem; color: #d7dbcf; }
.hero-img { position: relative; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5); border: 1px solid var(--line); }
.hero-img img { display: block; width: 100%; height: auto; }
.fireflies-deco { position: absolute; inset: 0; pointer-events: none; }
.fireflies-deco i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 12px 4px var(--glow-soft), 0 0 4px var(--glow); animation: float 6s ease-in-out infinite; opacity: 0.85; }
@keyframes float { 0%, 100% { transform: translate(0, 0); opacity: 0.2; } 50% { transform: translate(14px, -18px); opacity: 1; } }
section { padding: 2.5rem 0; border-top: 1px solid var(--line); }
section h2 { font-family: var(--serif); font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: 0 0 0.6rem; }
section > p.intro-text { max-width: 760px; color: #d7dbcf; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.feature { padding: 1.1rem 1.2rem; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.feature h3 { margin: 0 0 0.3rem; font-size: 1.05rem; color: var(--glow); }
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.compare-list { display: grid; gap: 2.2rem; margin-top: 1.6rem; }
.compare-item { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1.4rem; align-items: center; }
.compare-item.portrait { grid-template-columns: minmax(0, 520px) 1fr; }
.compare-item figcaption h3 { font-family: var(--serif); margin: 0 0 0.3rem; font-size: 1.3rem; }
.compare-item figcaption p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.compare {
  position: relative; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: #15181e;
  user-select: none; touch-action: pan-y; cursor: ew-resize; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}
.compare img { display: block; width: 100%; height: auto; pointer-events: none; }
.compare .layer-3d { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.compare .layer-3d img, .compare .layer-3d canvas { width: 100%; height: 100%; object-fit: cover; }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; margin-left: -1px; background: var(--glow); box-shadow: 0 0 12px var(--glow); }
.compare .knob {
  position: absolute; top: 50%; left: var(--pos, 50%); width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  background: var(--glow); color: #18200a; display: grid; place-items: center; font-weight: 800; box-shadow: 0 0 20px var(--glow-soft);
}
.compare .tag { position: absolute; top: 10px; padding: 0.2rem 0.6rem; border-radius: 999px; background: rgba(0, 0, 0, 0.6); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; }
.compare .tag.left { left: 10px; color: var(--glow); }
.compare .tag.right { right: 10px; color: #fff; }
.compare .pending { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 0.9rem; background: rgba(10, 12, 16, 0.55); }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.8rem; margin-top: 1.2rem; }
.gallery button { padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: zoom-in; background: none; aspect-ratio: 4 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.gallery button:hover img { transform: scale(1.04); }
.lightbox { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(0, 0, 0, 0.88); cursor: zoom-out; padding: 2vh 2vw; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 10px; box-shadow: 0 20px 60px #000; }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 0.8rem; max-width: 860px; }
.steps li { counter-increment: s; position: relative; padding: 0.8rem 1rem 0.8rem 3.2rem; border-radius: 12px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); color: #d7dbcf; }
.steps li::before { content: counter(s); position: absolute; left: 1rem; top: 0.8rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--kraft); color: #20160a; font-weight: 800; font-size: 0.9rem; }
.cta { text-align: center; padding: 3rem 0 4rem; }
.cta h2 { font-family: var(--serif); }
footer { padding: 1.5rem 0 2.5rem; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 1rem; }
  .compare-item, .compare-item.portrait { grid-template-columns: 1fr; }
}

/* ---------- points d'info ---------- */
.info-pins { position: fixed; inset: 0; pointer-events: none; z-index: 8; }
.info-pin {
  position: absolute; left: 0; top: 0; margin: -16px 0 0 -16px; pointer-events: auto; display: flex; align-items: center; gap: 0.4rem;
  border: 0; background: none; padding: 0; cursor: pointer; color: var(--text);
}
.info-pin .i {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: italic 700 1rem var(--serif);
  background: rgba(14, 18, 26, 0.78); border: 1.5px solid var(--glow); color: var(--glow);
  box-shadow: 0 0 14px var(--glow-soft); animation: pin 2.6s ease-in-out infinite;
}
.info-pin .lbl {
  opacity: 0; transform: translateX(-4px); transition: opacity 0.15s, transform 0.15s; white-space: nowrap;
  padding: 0.25rem 0.6rem; border-radius: 8px; background: rgba(10, 13, 19, 0.9); font: 600 0.8rem var(--sans);
}
.info-pin:hover .lbl, .info-pin:focus-visible .lbl { opacity: 1; transform: none; }
.info-pin .lbl { pointer-events: none; }      /* l'étiquette invisible ne doit pas intercepter les clics sur la maquette */
@keyframes pin { 0%, 100% { box-shadow: 0 0 8px var(--glow-soft); } 50% { box-shadow: 0 0 20px rgba(217, 255, 107, 0.45); } }
/* téléphone : pastilles plus petites et plus discrètes, avec une zone de toucher plus large que le dessin */
@media (max-width: 600px), (max-height: 600px) {
  .info-pin { margin: -13px 0 0 -13px; }
  .info-pin .i { width: 26px; height: 26px; font-size: 0.82rem; border-width: 1.2px; background: rgba(14, 18, 26, 0.6); animation: none; box-shadow: 0 0 8px var(--glow-soft); }
  .info-pin::before { content: ''; position: absolute; left: -9px; top: -9px; width: 44px; height: 44px; }
  .info-pin .lbl { display: none; }
}
.info-card { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(0, 0, 0, 0.55); padding: 1rem; }
.info-inner {
  width: min(760px, 96vw); display: grid; grid-template-columns: 1.15fr 1fr; border-radius: 18px; overflow: hidden;
  background: #121722; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.info-inner img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 240px; }
.info-text { padding: 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; }
.info-text h2 { margin: 0; font-family: var(--calli); font-weight: 400; font-size: 2.3rem; color: #f6f8e6; }
.info-text p { margin: 0; line-height: 1.55; color: #d7dbcf; flex: 1; }
.info-text .btn { align-self: flex-start; }
@media (max-width: 640px) { .info-inner { grid-template-columns: 1fr; } .info-inner img { max-height: 40vh; } }

/* ---------- visite guidée, fin de quête, fluidité ---------- */
.tour-caption {
  position: fixed; left: 50%; bottom: max(1.4rem, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 22;
  width: min(760px, 92vw); display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem 1rem; border-radius: 16px;
  background: rgba(10, 13, 19, 0.82); border: 1px solid var(--line); backdrop-filter: blur(8px);
}
.tour-caption p { margin: 0; flex: 1; font-family: var(--serif); font-size: 1.08rem; line-height: 1.45; }
.tour-caption .n { color: var(--glow); font-weight: 700; font-size: 0.8rem; white-space: nowrap; }
.quest-end { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; background: radial-gradient(ellipse at center, rgba(40, 50, 10, 0.35), rgba(0, 0, 0, 0.6)); }
.quest-card { width: min(480px, 92vw); text-align: center; padding: 1.8rem 1.6rem; border-radius: 20px; background: rgba(14, 18, 26, 0.9); border: 1px solid rgba(217, 255, 107, 0.5); box-shadow: 0 0 60px rgba(217, 255, 107, 0.2); }
.quest-card h2 { font-size: 3.4rem; margin: 0 0 0.4rem; }
.quest-card .intro-actions { justify-content: center; }
.quest-stats strong { color: var(--glow); }
.fps {
  position: fixed; left: 1rem; top: 6.2rem; z-index: 12; padding: 0.3rem 0.65rem; border-radius: 8px;
  background: rgba(10, 13, 19, 0.75); font: 600 0.78rem ui-monospace, Consolas, monospace; color: #b9f27a;
}
.fps.slow { color: #ffb37a; }
.check-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; margin: 0.4rem 0; }
.jump.down { bottom: calc(max(2rem, env(safe-area-inset-bottom)) + 96px); }

/* ---------- Neige, la mascotte (présentation) ---------- */
.title-row { display: flex; align-items: center; gap: 0.6rem; }
.title-row .title { flex: 0 1 auto; }
.mascot-spot { position: relative; flex: none; }
.mascot-host .mascot { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45)); }
.mascot-host .mascot:focus-visible { outline: 2px solid var(--glow); outline-offset: 4px; border-radius: 50%; }
.mascot-bubble {
  position: absolute; left: calc(100% - 14px); top: 4px; transform: translate(-6px, 0); width: max-content; max-width: 200px; z-index: 2;
  margin: 0; padding: 0.45rem 0.75rem; border-radius: 14px; background: #f6f8e6; color: #1d2416; font: 600 0.82rem var(--sans);
  text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
}
.mascot-bubble::after { content: ''; position: absolute; right: 100%; top: 14px; border: 7px solid transparent; border-right-color: #f6f8e6; }
.mascot-bubble.show { opacity: 1; transform: none; }
@media (max-width: 560px) { .title-row { flex-direction: column-reverse; align-items: flex-start; } .mascot-host .mascot { width: 120px !important; height: 120px !important; } }
