/* =========================================================
   La Cité des rêves — site de fan
   Palette tirée des captures officielles : nacre, or éveillé,
   brume turquoise, cristal bleu, nuit du Récif.
   ========================================================= */

@property --curse { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --progress { syntax: '<number>'; inherits: true; initial-value: 0; }

:root {
  --night: #060a16;
  --deep: #0a1124;
  --navy: #111b38;
  --panel: rgba(11, 17, 36, .82);
  --panel-solid: #0c1328;
  --line: rgba(225, 232, 255, .13);
  --line-strong: rgba(225, 232, 255, .32);
  --pearl: #f3eee4;
  --ink: #e7ebf5;
  --muted: #a8b1ca;
  --faint: #6e7898;
  --gold: #d8b46a;
  --gold-hi: #f1dba4;
  --teal: #8fe6df;
  --cyan: #7ad4ff;
  --crystal: #5aa2ff;
  --violet: #a28dff;
  --exotic: #ceae33;
  --exotic-dark: #6b5a1c;

  --font-ui: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-lore: 'Cormorant Garamond', Georgia, serif;
  --gutter: clamp(16px, 5vw, 72px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --photo-filter: none;
  color-scheme: dark;
}

body[data-curse="2"] { --curse: .5; --photo-filter: saturate(.72) brightness(.9) hue-rotate(-8deg); }
body[data-curse="3"] { --curse: 1; --photo-filter: saturate(.3) brightness(.74) contrast(1.08); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--ink);
  font-family: var(--font-ui); font-size: 16px; line-height: 1.65; font-weight: 400;
  overflow-x: hidden; transition: --curse 1.6s ease;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(122, 212, 255, .3); color: #fff; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.sprite-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.photo { filter: var(--photo-filter); transition: filter 1.6s ease; }

/* ---------- Éléments communs ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  font-size: .74rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
}
.kicker svg { width: 8px; height: 8px; }

.panel-title {
  margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
  font-size: .72rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}

.tag { margin: 0; font-size: .68rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }

.d-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .55); background: rgba(8, 12, 26, .35);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff;
  transition: background .25s, color .25s, border-color .25s;
}
.d-btn svg { width: 8px; height: 8px; }
.d-btn:hover { background: #fff; color: var(--night); border-color: #fff; }
.d-btn--solid { background: var(--pearl); color: var(--night); border-color: var(--pearl); }
.d-btn--solid:hover { background: var(--gold-hi); border-color: var(--gold-hi); }
.d-btn--small { min-height: 38px; padding: 0 16px; font-size: .7rem; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px; padding: 18px var(--gutter);
  transition: padding .35s ease;
}
.nav::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s;
  background: rgba(6, 10, 22, .86); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.nav.scrolled { padding-block: 10px; }
.nav.scrolled::before { opacity: 1; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; font-size: .82rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--pearl); }
.brand svg { width: 30px; height: 30px; color: var(--gold-hi); }
.nav-menu { margin-left: auto; }
.nav-menu ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-menu a {
  position: relative; display: block; padding: 8px 12px;
  font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(231, 235, 245, .72);
  transition: color .25s;
}
.nav-menu a::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--pearl); transform: scaleX(0); transition: transform .35s var(--ease); }
.nav-menu a:hover, .nav-menu a.active { color: #fff; }
.nav-menu a.active::after, .nav-menu a:hover::after { transform: scaleX(1); }

.sound {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-height: 36px; padding: 0 14px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-strong);
  font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  transition: border-color .25s, color .25s;
}
.sound:hover, .sound[aria-pressed="true"] { color: #fff; border-color: #fff; }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 2px; height: 4px; background: currentColor; }
.eq i:nth-child(2) { height: 9px; } .eq i:nth-child(3) { height: 6px; } .eq i:nth-child(4) { height: 11px; }
.sound[aria-pressed="true"] .eq i { animation: eq 1.1s ease-in-out infinite; }
.sound[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: -.3s; }
.sound[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: -.6s; }
.sound[aria-pressed="true"] .eq i:nth-child(4) { animation-delay: -.9s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }

.burger { display: none; position: relative; z-index: 2; width: 42px; height: 42px; padding: 0; cursor: pointer; background: transparent; border: 1px solid var(--line-strong); }
.burger i { position: absolute; left: 11px; right: 11px; height: 1.5px; background: #fff; transition: transform .35s var(--ease), opacity .25s; }
.burger i:nth-child(1) { top: 14px; } .burger i:nth-child(2) { top: 20px; } .burger i:nth-child(3) { top: 26px; }
.nav.open .burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.open .burger i:nth-child(2) { opacity: 0; }
.nav.open .burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Héros ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; isolation: isolate; background: var(--night); }
.slides, .slide { position: absolute; inset: 0; margin: 0; }
.slide { opacity: 0; transition: opacity 1.8s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; }
.slide.is-active img { animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.12) translate(var(--kx, 0), var(--ky, 0)); } to { transform: scale(1); } }
#motes { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.hero-shade {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 10, 22, .82) 0%, rgba(6, 10, 22, .4) 38%, rgba(6, 10, 22, 0) 66%),
    linear-gradient(0deg, var(--night) 0%, rgba(6, 10, 22, .55) 16%, rgba(6, 10, 22, 0) 42%),
    linear-gradient(180deg, rgba(6, 10, 22, .55) 0%, rgba(6, 10, 22, 0) 16%);
}
.hero-content {
  position: absolute; z-index: 5; left: var(--gutter); right: var(--gutter); bottom: clamp(120px, 20vh, 200px);
  max-width: 760px;
}
.hero-title {
  margin: 14px 0 16px; font-size: clamp(3rem, 8.6vw, 7.6rem); line-height: .9; letter-spacing: -.01em;
  text-transform: uppercase; color: var(--pearl); text-shadow: 0 4px 40px rgba(0, 0, 0, .45);
}
.hero-title span { display: block; }
.hero-title span:first-child { font-weight: 800; }
.hero-title span:last-child { font-weight: 300; letter-spacing: .02em; }
.hero-lede { margin: 0 0 30px; max-width: 520px; font-family: var(--font-lore); font-style: italic; font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.35; color: #e9e3d6; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.js .hero-content > * { opacity: 0; transform: translateY(18px); animation: rise-in 1.1s var(--ease) forwards; }
.js .hero-content > :nth-child(2) { animation-delay: .12s; }
.js .hero-content > :nth-child(3) { animation-delay: .3s; }
.js .hero-content > :nth-child(4) { animation-delay: .45s; }
@keyframes rise-in { to { opacity: 1; transform: none; } }

.hero-foot {
  position: absolute; z-index: 5; left: var(--gutter); right: var(--gutter); bottom: 28px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
}
.hero-status { display: flex; flex-direction: column; gap: 2px; padding-left: 12px; border-left: 2px solid var(--gold); }
.status-label { font-size: .64rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--faint); }
.status-value { font-size: .82rem; font-weight: 600; letter-spacing: .06em; color: var(--pearl); }
.slide-ui { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.slide-caption { margin: 0; display: flex; flex-direction: column; align-items: flex-end; }
.cap-kind { font-size: .64rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.cap-name { font-size: .95rem; font-weight: 600; color: var(--pearl); }
.slide-dots { display: flex; gap: 8px; }
.slide-dot { position: relative; width: 46px; height: 18px; padding: 0; border: 0; background: none; cursor: pointer; }
.slide-dot::before, .slide-dot::after { content: ''; position: absolute; left: 0; top: 8px; height: 2px; }
.slide-dot::before { right: 0; background: rgba(255, 255, 255, .25); }
.slide-dot::after { width: 0; background: var(--pearl); }
.slide-dot.is-active::after { animation: dot-fill var(--dur, 7s) linear forwards; }
.slide-dot.is-past::after { width: 100%; }
@keyframes dot-fill { to { width: 100%; } }

/* taches des Corrompus */
.blights { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.blight {
  position: absolute; width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle, #000 0 50%, #06040b 56%, rgba(255, 255, 255, .95) 61%, rgba(215, 225, 255, .3) 67%, transparent 72%);
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, .45));
  opacity: clamp(0, (var(--curse) - var(--th)) * 3, 1);
  animation: blight-float var(--dur) ease-in-out infinite alternate;
}
@keyframes blight-float { to { transform: translate(var(--dx), var(--dy)); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(80px, 10vw, 140px) var(--gutter); }
.container { position: relative; max-width: 1280px; margin: 0 auto; }
.sec-head { max-width: 780px; margin: 0 0 clamp(40px, 5vw, 64px); }
.sec-title {
  margin: 12px 0 14px; font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 700; line-height: 1.05;
  letter-spacing: -.005em; text-transform: uppercase; color: var(--pearl); text-wrap: balance;
}
.sec-sub { margin: 0; font-size: 1.05rem; line-height: 1.7; color: var(--muted); }

.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- I · Lieux ---------- */
.atlas { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 0; margin-bottom: 28px; border: 1px solid var(--line); background: var(--panel-solid); }
.atlas-photo { position: relative; margin: 0; min-height: 340px; overflow: hidden; }
.atlas-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.atlas-photo figcaption { position: absolute; left: 20px; bottom: 16px; font-size: .72rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .8); }
.atlas-list { padding: 26px 28px; }
.regions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
.regions li { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: .88rem; color: var(--ink); border-bottom: 1px solid rgba(255, 255, 255, .05); }
.regions li::before { content: ''; flex: 0 0 6px; height: 6px; transform: rotate(45deg); background: var(--gold); opacity: .8; }

.places { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.place { position: relative; background: var(--panel-solid); border: 1px solid var(--line); transition: border-color .3s, transform .4s var(--ease), box-shadow .4s; }
.place:hover { border-color: rgba(255, 255, 255, .7); transform: translateY(-4px); box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .8); }
.place-img { aspect-ratio: 16 / 9; overflow: hidden; }
.place-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter 1.6s ease; }
.place:hover .place-img img { transform: scale(1.06); }
.place-body { padding: 18px 20px 22px; }
.place-body h3 { margin: 6px 0 8px; font-size: 1.08rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--pearl); }
.place-body p:last-child { margin: 0; font-size: .92rem; line-height: 1.6; color: var(--muted); }

/* ---------- Citation ---------- */
.quote-band { position: relative; overflow: hidden; padding: clamp(110px, 16vw, 200px) var(--gutter); text-align: center; isolation: isolate; }
.quote-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.quote-band::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(6, 10, 22, .35), rgba(6, 10, 22, .88)), linear-gradient(180deg, var(--night), transparent 20%, transparent 80%, var(--night)); }
.quote-band blockquote { max-width: 900px; margin: 0 auto; }
.quote-band p { margin: 0; font-family: var(--font-lore); font-style: italic; font-size: clamp(1.7rem, 4vw, 3rem); line-height: 1.25; color: var(--pearl); text-shadow: 0 2px 30px rgba(0, 0, 0, .6); }
.quote-band cite { display: block; margin-top: 20px; font-style: normal; font-size: .72rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--exotic); }

/* ---------- II · Malédiction ---------- */
.curse { overflow: hidden; isolation: isolate; }
.curse-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .5; }
.curse::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6, 10, 22, .95) 0%, rgba(6, 10, 22, .78) 50%, rgba(6, 10, 22, .55) 100%), linear-gradient(180deg, var(--night), transparent 18%, transparent 82%, var(--night)); }
.curse-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 90px); align-items: center; }
.sec-head.left { margin-bottom: 22px; }
.lead { margin: 0; font-size: 1.05rem; line-height: 1.75; color: #cdd3e6; }
.weeks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 30px 0 26px; }
.week-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; cursor: pointer; text-align: left;
  background: rgba(8, 12, 26, .6); border: 1px solid var(--line-strong); color: var(--muted);
  transition: background .3s, border-color .3s, color .3s;
}
.week-btn:hover { border-color: #fff; color: #fff; }
.week-btn .num { font-size: .66rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.week-btn .num::before { content: 'Semaine '; }
.week-btn .lbl { font-size: .95rem; font-weight: 600; }
.week-btn[aria-checked="true"] { background: var(--pearl); border-color: var(--pearl); color: var(--night); }
.week-btn[aria-checked="true"] .num { color: #8a6a24; }
.week-info h3 { margin: 0 0 6px; font-size: 1.2rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--pearl); }
.week-info > p { margin: 0 0 22px; color: var(--muted); min-height: 3.4em; }
.meters { display: grid; gap: 14px; }
.meter { display: grid; grid-template-columns: 190px minmax(0, 1fr) 52px; align-items: center; gap: 14px; }
.meter span { font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.meter b { font-size: .88rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.bar { position: relative; height: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-hi)); transition: width 1.3s var(--ease); }
.meter.taken .bar i { background: linear-gradient(90deg, #555a6a, #fff); }

.dial { width: min(100%, 460px); aspect-ratio: 1; margin: 0 auto; }
.dial svg { width: 100%; height: 100%; overflow: visible; }
.dial .rot-slow { transform-box: view-box; transform-origin: 50% 50%; animation: spin 160s linear infinite; }
.dial .rot-rev { transform-box: view-box; transform-origin: 50% 50%; animation: spin 100s linear infinite reverse; }
.dial .runes { font-family: var(--font-ui); font-weight: 600; font-size: 11px; letter-spacing: 3px; fill: rgba(241, 219, 164, .7); }
.dial .seg { fill: none; stroke-width: 6; stroke: rgba(255, 255, 255, .14); transition: stroke .8s; }
.dial .seg.on { stroke: var(--gold-hi); }
.dial .seg-3.on { stroke: #fff; }
.dial .seg-label { font-family: var(--font-ui); font-weight: 700; font-size: 14px; fill: var(--faint); text-anchor: middle; dominant-baseline: central; transition: fill .6s; }
.dial .seg-label.on { fill: var(--pearl); }
.dial .needle { transform-box: view-box; transform-origin: 50% 50%; transition: transform 1.4s var(--ease); }
.dial .moon-shadow { transition: transform 1.8s var(--ease); }
.dial .corona { opacity: var(--curse); transition: opacity 1s; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- III · Mur des souhaits ---------- */
.wall-sec { background: radial-gradient(ellipse 70% 50% at 40% 40%, rgba(120, 60, 30, .14), transparent 70%); }
.wall-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 28px; align-items: start; }

.stage {
  --cx: 0; --cy: 0; --cw: 1080; --ch: 600;
  position: relative; overflow: hidden; aspect-ratio: var(--cw) / var(--ch);
  background: #160b08; border: 1px solid var(--line);
  user-select: none; -webkit-user-select: none;
}
.stage-inner { position: absolute; width: calc(1080 / var(--cw) * 100%); aspect-ratio: 1080 / 600; left: calc(var(--cx) / var(--cw) * -100%); top: calc(var(--cy) / var(--ch) * -100%); }
.stage-photo { width: 100%; height: 100%; }
.plates { position: absolute; inset: 0; }
.plate {
  position: absolute; left: calc(var(--x) / 1080 * 100%); top: calc(var(--y) / 600 * 100%);
  width: calc(66 / 1080 * 100%); aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%;
  transform: translate(-50%, -50%); background: transparent; cursor: crosshair;
}
.plate::before { content: ''; position: absolute; inset: -6%; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 228, 190, 0); transition: box-shadow .2s; }
.plate:hover::before, .plate:focus-visible::before { box-shadow: inset 0 0 0 2px rgba(255, 228, 190, .75), 0 0 18px rgba(255, 200, 140, .35); }
.plate:focus-visible { outline: none; }
.plate img {
  position: absolute; inset: 4%; width: 92%; height: 92%; border-radius: 50%;
  opacity: 0; transform: scale(.8); transition: opacity .16s ease, transform .2s ease;
  filter: sepia(.18) brightness(.94);
  box-shadow: 0 0 16px rgba(255, 214, 160, .35);
}
.plate.has img { opacity: 1; transform: scale(1); }
.plate.hit::after { content: ''; position: absolute; inset: -12%; border-radius: 50%; border: 2px solid rgba(255, 240, 215, .95); animation: hit .32s ease-out forwards; pointer-events: none; }
@keyframes hit { from { opacity: 1; transform: scale(.7); } to { opacity: 0; transform: scale(1.15); } }
.plate.granted img { animation: grant 1.7s ease forwards; }
@keyframes grant {
  0% { filter: sepia(.18) brightness(.94); }
  22%, 62% { filter: brightness(3.2) saturate(0); box-shadow: 0 0 34px 10px rgba(255, 255, 255, .85); opacity: 1; }
  100% { filter: brightness(3) saturate(0); box-shadow: 0 0 0 rgba(255, 255, 255, 0); opacity: 0; transform: scale(.92); }
}
.plate.rejected img { animation: reject 1.7s ease forwards; }
@keyframes reject {
  0% { filter: sepia(.18) brightness(.94); }
  18%, 62% { filter: sepia(1) saturate(7) hue-rotate(-28deg) brightness(.92); box-shadow: 0 0 26px 6px rgba(255, 90, 30, .7); opacity: 1; }
  100% { filter: sepia(1) saturate(7) hue-rotate(-28deg) brightness(.6); box-shadow: 0 0 0 rgba(255, 90, 30, 0); opacity: 0; }
}
.floor {
  position: absolute; left: calc(512 / 1080 * 100%); top: calc(500 / 600 * 100%);
  width: calc(190 / 1080 * 100%); height: calc(54 / 600 * 100%);
  padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer;
}
.floor-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 rgba(150, 255, 230, 0); transition: box-shadow .3s; }
.floor:hover .floor-ring, .floor:focus-visible .floor-ring { box-shadow: 0 0 34px 10px rgba(150, 255, 230, .4), inset 0 0 18px rgba(150, 255, 230, .5); }
.floor:focus-visible { outline: none; }
.floor.active .floor-ring { animation: floor-pulse 1s ease-out; }
@keyframes floor-pulse { 0% { box-shadow: 0 0 0 0 rgba(170, 255, 235, .9), inset 0 0 30px rgba(170, 255, 235, .9); } 100% { box-shadow: 0 0 60px 30px rgba(170, 255, 235, 0), inset 0 0 0 rgba(170, 255, 235, 0); } }
.stage-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse 60% 70% at 50% 45%, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%); }
.stage-flash.go { animation: stage-flash 1.4s ease-out; }
.stage-flash.bad { background: radial-gradient(ellipse 60% 70% at 50% 45%, rgba(255, 110, 40, .55), rgba(255, 110, 40, 0) 70%); animation: stage-flash 1.4s ease-out; }
@keyframes stage-flash { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }

.wall-hud { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 14px 16px; background: var(--panel-solid); border: 1px solid var(--line); border-top: 0; }
.hud-help { margin: 0; font-size: .8rem; color: var(--muted); }
.hud-help b { color: var(--pearl); font-weight: 600; }
.hud-actions { display: flex; align-items: center; gap: 10px; }
.hud-count { font-size: .78rem; font-weight: 700; letter-spacing: .1em; color: var(--gold); font-variant-numeric: tabular-nums; }
.wall-status { min-height: 1.6em; margin: 14px 0 26px; font-family: var(--font-lore); font-style: italic; font-size: 1.25rem; color: var(--pearl); }
.wall-status.ok { color: #fff; text-shadow: 0 0 18px rgba(255, 255, 255, .5); }
.wall-status.bad { color: #ffb08a; }

.legend { padding: 20px; background: var(--panel-solid); border: 1px solid var(--line); }
.legend-rows { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.legend-family p { margin: 0 0 8px; font-size: .68rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.legend-family ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.legend-family li { position: relative; }
.legend-family img { width: 100%; aspect-ratio: 1; border-radius: 50%; }
.legend-family span { position: absolute; right: -2px; bottom: -2px; min-width: 18px; padding: 0 3px; font-size: .6rem; font-weight: 700; line-height: 16px; text-align: center; background: var(--night); color: var(--muted); border: 1px solid var(--line-strong); }

.codex { background: var(--panel-solid); border: 1px solid var(--line); padding: 20px 18px 8px; }
.codex-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.codex-head .panel-title { flex: 1; }
.codex-count { margin: 0 0 14px; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.codex-count b { color: var(--gold-hi); font-size: 1rem; }
.codex-list { margin: 0; padding: 0 4px 0 0; list-style: none; max-height: 1060px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.wish { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.wish:last-child { border-bottom: 0; }
.wish-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; align-self: start; padding: 4px; background: #1a0e0a; border: 1px solid rgba(255, 210, 160, .15); }
.wish-grid i { aspect-ratio: 1; border-radius: 50%; background: #070404; box-shadow: inset 0 0 0 1px rgba(255, 210, 160, .18); overflow: hidden; }
.wish-grid img { width: 100%; height: 100%; }
.wish-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.wish h3 { margin: 0; font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pearl); }
.wish .state { font-size: .6rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.wish.granted .state { color: var(--exotic); }
.wish .text { margin: 4px 0 4px; font-family: var(--font-lore); font-style: italic; font-size: 1.08rem; line-height: 1.3; color: #ece4d0; }
.wish .effect { margin: 0 0 8px; font-size: .8rem; line-height: 1.5; color: var(--muted); }
.wish .fill { padding: 0; border: 0; background: none; cursor: pointer; font-size: .66rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); }
.wish .fill:hover { color: #fff; }
.wish.locked .wish-grid { opacity: .35; }
.wish.flash { animation: wish-flash 1.6s ease; }
@keyframes wish-flash { 25% { background: rgba(206, 174, 51, .16); } }

/* ---------- IV · Chroniques ---------- */
.timeline { position: relative; max-width: 980px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line); }
.tl-fill { position: absolute; left: 50%; top: 0; width: 1px; height: calc(var(--progress) * 100%); background: linear-gradient(180deg, var(--gold-hi), var(--pearl)); box-shadow: 0 0 10px rgba(241, 219, 164, .6); }
.event { position: relative; width: 50%; padding: 0 48px 60px 0; text-align: right; }
.event:nth-of-type(even) { margin-left: 50%; padding: 0 0 60px 48px; text-align: left; }
.event .node { position: absolute; top: 6px; right: -6px; width: 12px; height: 12px; transform: rotate(45deg); border: 1px solid var(--gold); background: var(--night); transition: background .6s, box-shadow .6s; }
.event:nth-of-type(even) .node { right: auto; left: -6px; }
.event.in .node { background: var(--gold-hi); box-shadow: 0 0 14px rgba(241, 219, 164, .8); }
.era { margin: 0; font-size: .68rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.event h3 { margin: 4px 0 8px; font-size: 1.3rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--pearl); }
.event p:last-child { margin: 0; color: var(--muted); }

/* ---------- V · Personnages ---------- */
.voices { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.voice { position: relative; background: var(--panel-solid); border: 1px solid var(--line); overflow: hidden; transition: border-color .3s, transform .4s var(--ease); }
.voice::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 2; background: var(--accent); }
.voice:hover { border-color: rgba(255, 255, 255, .7); transform: translateY(-4px); }
.voice-img { aspect-ratio: 3 / 4; overflow: hidden; }
.voice-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter 1.6s ease; }
.voice:hover .voice-img img { transform: scale(1.05); }
.voice-body { padding: 16px 18px 20px; }
.voice .tag { color: var(--accent); }
.voice h3 { margin: 4px 0 8px; font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--pearl); }
.voice-body p:last-child { margin: 0; font-size: .86rem; line-height: 1.55; color: var(--muted); }

/* ---------- VI · Raid & donjon ---------- */
.raid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0; min-height: 560px; margin-bottom: 28px; border: 1px solid var(--line); background: var(--panel-solid); overflow: hidden; isolation: isolate; }
.raid-img { position: absolute; inset: 0; z-index: -1; }
.raid-img img { width: 100%; height: 100%; object-fit: cover; }
.raid-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 10, 22, .92) 0%, rgba(6, 10, 22, .55) 45%, rgba(6, 10, 22, .2) 70%, rgba(6, 10, 22, .65) 100%), linear-gradient(0deg, rgba(6, 10, 22, .7), transparent 50%); }
.raid-body { align-self: end; padding: clamp(24px, 4vw, 48px); max-width: 560px; }
.raid h3 { margin: 8px 0 6px; font-size: clamp(2.2rem, 4.5vw, 3.6rem); font-weight: 800; line-height: 1; text-transform: uppercase; color: var(--pearl); }
.raid-quote { margin: 0 0 24px; font-family: var(--font-lore); font-style: italic; font-size: 1.3rem; color: #e9e3d6; }
.encounters { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.encounters li { display: flex; align-items: center; gap: 14px; padding: 10px 6px; border-bottom: 1px solid var(--line); font-size: .92rem; font-weight: 500; transition: background .4s, color .4s; }
.encounters .n { flex: 0 0 24px; height: 24px; display: grid; place-items: center; font-size: .72rem; font-weight: 700; border: 1px solid var(--line-strong); color: var(--muted); }
.encounters li.target { background: rgba(255, 255, 255, .92); color: var(--night); }
.encounters li.target .n { border-color: var(--night); color: var(--night); }

.item-card { align-self: start; margin: clamp(16px, 3vw, 32px); background: rgba(10, 12, 20, .92); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9); }
.item-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; background: linear-gradient(90deg, #c8a92f, #a8891d); color: #fff; }
.item-head img { border: 1px solid rgba(255, 255, 255, .5); }
.item-name { margin: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1.1; }
.item-type, .item-tier { margin: 2px 0 0; font-size: .74rem; font-weight: 500; opacity: .85; }
.item-tier { align-self: start; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.item-shot { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.item-flavor { margin: 0; padding: 14px 16px 16px; font-family: var(--font-lore); font-style: italic; font-size: 1.02rem; line-height: 1.35; color: #d9d2c1; }

/* ---------- Pied de page ---------- */
.footer { padding: 80px var(--gutter) 46px; border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--night), #04070f); }
.footer-inner { display: grid; justify-items: center; gap: 18px; text-align: center; }
.footer-crest { width: 44px; height: 44px; color: var(--gold-hi); }
.f-title { margin: 0; font-size: 1rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--pearl); }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.footer-nav a { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); transition: color .25s; }
.footer-nav a:hover { color: #fff; }
.legal { max-width: 760px; margin: 8px 0 0; font-size: .76rem; line-height: 1.7; color: var(--faint); }

/* ---------- Effets ---------- */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; }
.taken-veil { position: fixed; inset: 0; z-index: 45; pointer-events: none; opacity: calc(var(--curse) * .85); background: radial-gradient(ellipse 110% 85% at 50% 50%, transparent 55%, rgba(0, 0, 0, .8) 100%); }
.fx-flash { position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: 0; background: #fff; }
.fx-flash.go { animation: tp-flash 1.3s ease-out; }
@keyframes tp-flash { 0% { opacity: 0; } 15% { opacity: 1; } 45% { opacity: 1; } 100% { opacity: 0; } }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.toast {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center;
  width: min(400px, calc(100vw - 40px)); padding: 12px 16px 12px 12px; pointer-events: auto;
  background: rgba(8, 12, 24, .94); border: 1px solid var(--line-strong); border-left: 3px solid var(--pearl);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .9);
  animation: toast-in .5s var(--ease);
}
.toast.out { animation: toast-out .45s ease forwards; }
.toast.exotic { border-left-color: var(--exotic); }
.toast.bad { border-left-color: #ff8a5c; }
.toast-icon { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .35); background: #1a1f30; overflow: hidden; }
.toast-icon img { width: 100%; height: 100%; object-fit: cover; }
.toast-icon svg { width: 22px; height: 22px; color: var(--gold-hi); }
.toast-kicker { margin: 0; font-size: .62rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.toast-title { margin: 1px 0 2px; font-size: .92rem; font-weight: 700; color: #fff; }
.toast-text { margin: 0; font-size: .8rem; line-height: 1.45; color: var(--muted); }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

.petra-banner {
  position: fixed; top: 76px; left: 50%; z-index: 60; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 16px;
  background: rgba(40, 6, 14, .92); border: 1px solid #e86a8a; color: #ffd9e1;
  font-size: .8rem; box-shadow: 0 10px 30px -10px rgba(232, 106, 138, .6);
}
.petra-banner[hidden] { display: none; }
.petra-banner svg { width: 8px; height: 8px; color: #e86a8a; }
.petra-banner p { margin: 0; }
.petra-banner b { text-transform: uppercase; letter-spacing: .12em; }
.petra-banner button { width: 26px; height: 26px; border: 0; background: none; color: #ffd9e1; font-size: 1.1rem; cursor: pointer; }

/* lecteur du huitième vœu */
.now-playing {
  position: fixed; left: 20px; bottom: 20px; z-index: 90; width: min(380px, calc(100vw - 40px));
  background: rgba(8, 12, 24, .95); border: 1px solid var(--line-strong); border-left: 3px solid var(--exotic);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .9);
  opacity: 0; transform: translateX(-30px); transition: opacity .45s ease, transform .45s var(--ease);
}
.now-playing[hidden] { display: none; }
.now-playing.show { opacity: 1; transform: none; }
.np-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 10px 12px 14px; }
.np-eq { display: flex; align-items: flex-end; gap: 3px; width: 22px; height: 18px; color: var(--exotic); }
.np-eq i { flex: 1; height: 30%; background: currentColor; animation: eq 1s ease-in-out infinite; }
.np-eq i:nth-child(2) { animation-delay: -.25s; } .np-eq i:nth-child(3) { animation-delay: -.5s; } .np-eq i:nth-child(4) { animation-delay: -.75s; }
.now-playing.paused .np-eq i { animation-play-state: paused; }
.np-kicker { margin: 0; font-size: .6rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--exotic); }
.np-title { margin: 1px 0 0; font-size: .95rem; font-weight: 700; color: #fff; }
.np-artist { margin: 0; font-size: .8rem; color: var(--muted); }
.np-close { width: 32px; height: 32px; align-self: start; border: 0; background: none; color: var(--muted); font-size: 1.3rem; cursor: pointer; }
.np-close:hover { color: #fff; }
.np-media:empty { display: none; }
.np-media iframe { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; border: 0; }
.np-player { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0 14px 12px; }
.np-play { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-strong); background: transparent; color: #fff; cursor: pointer; font-size: .8rem; }
.np-play:hover { background: #fff; color: var(--night); }
.np-bar { position: relative; height: 4px; background: rgba(255, 255, 255, .12); cursor: pointer; }
.np-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--exotic); }
.np-time { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.np-note { margin: 0; padding: 0 14px 10px; font-size: .78rem; line-height: 1.5; color: var(--muted); }
.np-note code { font-size: .74rem; color: var(--pearl); }
.np-link { display: block; padding: 10px 14px; border-top: 1px solid var(--line); font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); }
.np-link:hover { color: #fff; }

.eggs { position: fixed; inset: 0; z-index: 65; pointer-events: none; }
.egg {
  position: absolute; width: 46px; height: 62px; padding: 0; border: 0; cursor: crosshair; pointer-events: auto;
  border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%;
  background: radial-gradient(ellipse at 40% 35%, #2a2a33, #000 60%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 0 22px 6px rgba(255, 255, 255, .45);
  animation: egg-float 3.2s ease-in-out infinite alternate;
}
@keyframes egg-float { to { transform: translateY(-12px) rotate(4deg); } }

body.corrupted { --photo-filter: grayscale(1) contrast(1.55) brightness(.62) !important; }
body.corrupted .taken-veil { opacity: .9; }
.big-heads :is(h1, h2, h3) { scale: 1.32; transition: scale .6s cubic-bezier(.3, 1.6, .5, 1); }
:is(h1, h2, h3) { transition: scale .6s ease; }

/* ---------- Adaptatif ---------- */
@media (max-width: 1180px) {
  .voices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .places { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-menu a { padding: 8px 8px; letter-spacing: .1em; }
}
@media (max-width: 1020px) {
  .burger { display: block; }
  .nav-menu {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 86vw); padding: 96px 28px 40px;
    background: rgba(6, 10, 22, .97); border-left: 1px solid var(--line);
    transform: translateX(100%); visibility: hidden; transition: transform .5s var(--ease), visibility .5s;
  }
  .nav.open .nav-menu { transform: none; visibility: visible; }
  .nav-menu ul { flex-direction: column; gap: 4px; }
  .nav-menu a { padding: 12px 0; font-size: .9rem; }
  .nav-menu a::after { left: 0; right: auto; width: 40px; }
  .sound { margin-left: auto; }
  .wall-layout, .curse-grid { grid-template-columns: minmax(0, 1fr); }
  .codex-list { max-height: none; }
  .raid { grid-template-columns: minmax(0, 1fr); }
  .item-card { max-width: 420px; margin-top: 0; }
  .atlas { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  body { font-size: 15px; }
  .sound-label { display: none; }
  .brand span { font-size: .72rem; letter-spacing: .14em; }
  .places { grid-template-columns: minmax(0, 1fr); }
  .voices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .regions { grid-template-columns: minmax(0, 1fr); }
  .hero-content { bottom: 120px; }
  .hero-shade { background: linear-gradient(0deg, var(--night) 0%, rgba(6, 10, 22, .78) 34%, rgba(6, 10, 22, .3) 62%, rgba(6, 10, 22, .55) 100%); }
  .hero-status { display: none; }
  .hero-foot { flex-direction: column; align-items: stretch; gap: 14px; bottom: 22px; }
  .slide-ui { align-items: flex-start; }
  .slide-caption { align-items: flex-start; }
  .stage { --cx: 300; --cy: 118; --cw: 470; --ch: 446; }
  .plate { width: calc(70 / 1080 * 100%); }
  .legend-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wish { grid-template-columns: 96px minmax(0, 1fr); }
  .timeline::before, .tl-fill { left: 6px; }
  .event, .event:nth-of-type(even) { width: 100%; margin-left: 0; padding: 0 0 44px 34px; text-align: left; }
  .event .node, .event:nth-of-type(even) .node { left: 0; right: auto; }
  .meter { grid-template-columns: minmax(0, 1fr) 46px; gap: 6px 12px; }
  .meter span { grid-column: 1 / -1; }
  .weeks .lbl { font-size: .8rem; }
  .petra-banner { top: 66px; width: calc(100vw - 32px); }
  .now-playing { left: 16px; right: 16px; top: 70px; bottom: auto; width: auto; }
}
@media (max-width: 420px) {
  .voices { grid-template-columns: minmax(0, 1fr); }
  .hud-actions { width: 100%; }
  .hud-actions .d-btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
