@font-face { font-family: "Bebas Kai"; src: url("fonts/BebasKai.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Comfortaa"; src: url("fonts/Comfortaa-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Comfortaa"; src: url("fonts/Comfortaa-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --night: #070403;      /* galeries creusées */
  --loam: #120b07;       /* terre profonde */
  --earth: #24170d;      /* terre */
  --clay: #7a4a26;       /* terre éclairée */
  --sand: #d9a25c;       /* salles éclairées */
  --amber: #f2b441;      /* l'ambre du HUD */
  --cream: #f6ead6;
  --muted: #b5a089;
  --line: rgba(246, 234, 214, .12);
  --accent: var(--amber); /* recoloré par l'espèce choisie */
  --gutter: clamp(18px, 5vw, 72px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --display: "Bebas Kai", "Bebas Neue", Impact, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0; background: var(--loam); color: var(--cream);
  font: 400 17px/1.65 "Comfortaa", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
p, h1, h2, h3, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h2, h3, .tag, .btn, .kicker, .num, .panel__title { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .04em; }
h2 { font-size: clamp(2.6rem, 6.2vw, 5.4rem); line-height: .95; text-wrap: balance; }
h3 { font-size: 1.6rem; line-height: 1.1; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
::selection { background: var(--amber); color: #1c1108; }

/* Grain de pellicule sur toute la page */
.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%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");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { to { transform: translate(6%, -4%); } }

.kicker { font-size: 1.05rem; letter-spacing: .32em; color: var(--amber); }
.num { font-size: 1rem; letter-spacing: .2em; color: var(--amber); }
.lede { color: var(--muted); font-size: 1.1rem; max-width: 60ch; margin-top: 22px; }

/* Étiquette de salle, comme dans le jeu */
.tag {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px;
  padding: 7px 16px 5px; border-radius: 999px;
  background: rgba(7, 4, 3, .8); border: 1px solid rgba(242, 180, 65, .35);
  font-size: 1rem; letter-spacing: .14em;
}
.tag::before { content: ""; width: 9px; height: 9px; background: var(--amber); border-radius: 2px; margin-top: -2px; box-shadow: 0 0 10px var(--amber); }

/* --- Boutons --- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 12px; overflow: hidden;
  padding: 16px 32px 13px; border-radius: 12px; text-decoration: none;
  background: linear-gradient(180deg, #ffd06a, var(--amber) 55%, #d9942a); color: #23160a;
  font-size: 1.35rem; box-shadow: 0 10px 30px -8px rgba(242, 180, 65, .55), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -8px rgba(242, 180, 65, .7), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn:hover::after { transform: translateX(120%); }
.btn--ghost { background: rgba(7, 4, 3, .5); color: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(246, 234, 214, .4); backdrop-filter: blur(8px); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--amber); }
.btn--small { padding: 9px 18px 7px; font-size: 1.05rem; border-radius: 10px; }
.play { width: 0; height: 0; border-left: 11px solid var(--amber); border-block: 7px solid transparent; margin-top: -3px; }

/* --- Navigation --- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40; display: flex; align-items: center; gap: 22px;
  padding: 12px var(--gutter); border-bottom: 1px solid transparent; transition: background .4s, border-color .4s;
}
.nav.is-stuck { background: rgba(7, 4, 3, .78); backdrop-filter: blur(14px) saturate(1.3); border-color: var(--line); }
.nav__brand { display: flex; align-items: center; gap: 10px; font: 400 1.7rem var(--display); letter-spacing: .06em; color: var(--amber); text-decoration: none; }
.nav__brand img { border-radius: 8px; }
.nav__links { display: flex; gap: clamp(14px, 2vw, 28px); margin-left: auto; font-size: .86rem; }
.nav__links a { position: relative; text-decoration: none; opacity: .8; padding: 6px 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--amber); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav__links a:hover, .nav__links a.is-on { opacity: 1; }
.nav__links a:hover::after, .nav__links a.is-on::after { transform: scaleX(1); }
@media (max-width: 1080px) { .nav__links { display: none; } .nav .btn { margin-left: auto; } }

/* Points de navigation latéraux */
.dots { position: fixed; right: 18px; top: 50%; translate: 0 -50%; z-index: 30; display: grid; gap: 14px; }
.dots a { position: relative; display: block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid rgba(246, 234, 214, .5); transition: all .3s; }
.dots a.is-on { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 12px var(--amber); scale: 1.25; }
.dots a span { position: absolute; right: 22px; top: 50%; translate: 8px -50%; white-space: nowrap; font: 400 .85rem var(--display); letter-spacing: .14em; text-transform: uppercase; background: rgba(7, 4, 3, .85); padding: 5px 10px 3px; border-radius: 6px; opacity: 0; pointer-events: none; transition: all .25s; }
.dots a:hover span { opacity: 1; translate: 0 -50%; }
@media (max-width: 900px) { .dots { display: none; } }

/* ============ HÉROS ============ */
.hero { position: relative; height: 100svh; min-height: 640px; display: grid; place-items: center; overflow: hidden; background: var(--night); }
.hero__layer { position: absolute; inset: -6%; will-change: transform; }
.hero__art img { width: 100%; height: 100%; object-fit: cover; object-position: 32% 50%; animation: heroIn 2.4s var(--ease) both; }
@keyframes heroIn { from { transform: scale(1.18); filter: blur(12px) brightness(.4); } }
.hero__rays {
  position: absolute; inset: -20%; pointer-events: none; mix-blend-mode: screen; opacity: .55;
  background: repeating-conic-gradient(from 200deg at 72% 18%, rgba(255, 196, 110, 0) 0deg, rgba(255, 196, 110, .16) 3deg, rgba(255, 196, 110, 0) 7deg, rgba(255, 196, 110, 0) 13deg);
  -webkit-mask-image: radial-gradient(circle at 72% 18%, #000, transparent 62%); mask-image: radial-gradient(circle at 72% 18%, #000, transparent 62%);
  animation: rays 14s ease-in-out infinite alternate;
}
@keyframes rays { to { transform: rotate(5deg) scale(1.06); opacity: .8; } }
.hero__motes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
.hero__shade { position: absolute; inset: 0; background:
  radial-gradient(ellipse 55% 48% at 50% 46%, rgba(7, 4, 3, .58), transparent 72%),
  linear-gradient(to bottom, rgba(7, 4, 3, .5), transparent 20%, transparent 55%, var(--loam) 99%); }
.hero__content { position: relative; z-index: 2; text-align: center; padding: 60px var(--gutter) 150px; }
.hero__kicker { animation: rise 1s var(--ease) .5s both; }
.hero__title { animation: logoIn 1.6s var(--ease) .2s both; }
.hero__title img { width: min(680px, 84vw); height: auto; margin: -10px auto -22px; filter: drop-shadow(0 22px 34px rgba(0, 0, 0, .6)) drop-shadow(0 0 60px rgba(242, 180, 65, .25)); }
@keyframes logoIn { from { opacity: 0; transform: scale(.86) translateY(30px); filter: blur(14px); } }
.hero__tagline { font: 400 clamp(1.4rem, 3vw, 2.2rem) var(--display); letter-spacing: .1em; text-transform: uppercase; text-shadow: 0 2px 16px rgba(0, 0, 0, .8); animation: rise 1s var(--ease) .8s both; }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 34px; animation: rise 1s var(--ease) 1s both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
.hero__facts {
  position: absolute; z-index: 2; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); background: linear-gradient(to bottom, rgba(7, 4, 3, .35), rgba(7, 4, 3, .75)); backdrop-filter: blur(8px);
  animation: rise 1s var(--ease) 1.3s both;
}
.hero__facts li { display: flex; align-items: baseline; justify-content: center; gap: 12px; padding: 18px 12px 14px; border-left: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.hero__facts li:first-child { border-left: 0; }
.hero__facts strong { font: 400 2.4rem/1 var(--display); color: var(--amber); }
.hero__scroll { position: absolute; z-index: 2; bottom: 96px; left: 50%; translate: -50% 0; width: 24px; height: 40px; border-radius: 14px; border: 1.5px solid rgba(246, 234, 214, .5); }
.hero__scroll span { position: absolute; left: 50%; top: 7px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--amber); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 60% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
@media (max-width: 700px) {
  .hero__facts { grid-template-columns: repeat(2, 1fr); }
  .hero__facts li { flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 8px; text-align: center; font-size: .72rem; border-top: 1px solid var(--line); }
  .hero__facts strong { font-size: 1.7rem; }
  .hero__content { padding-bottom: 190px; }
  .hero__scroll { display: none; }
}

/* ============ MANIFESTE ============ */
.manifesto { padding: clamp(110px, 18vw, 240px) var(--gutter); max-width: 1300px; margin: 0 auto; }
.manifesto__text { font: 400 clamp(2.8rem, 9vw, 8.4rem)/.92 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.manifesto__text span { opacity: .12; transition: opacity .5s, color .5s; }
.manifesto__text span.is-lit { opacity: 1; }
.manifesto__text span.is-lit:nth-child(n+5) { color: var(--amber); }
.manifesto__sub { margin-top: 40px; max-width: 58ch; color: var(--muted); font-size: 1.15rem; }

/* ============ DESCENTE ============ */
.descent { position: relative; height: 380vh; }
.descent__stage { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--night); }
.descent__layer { position: absolute; inset: 0; will-change: transform, clip-path; }
.descent__layer img { width: 100%; height: 100%; object-fit: cover; }
.descent__layer[data-l="1"], .descent__layer[data-l="2"] { clip-path: circle(0% at 50% 50%); }
.descent__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 4, 3, .88) 0%, rgba(7, 4, 3, .5) 36%, transparent 62%), linear-gradient(to top, rgba(7, 4, 3, .7), transparent 30%); }
.descent__captions { position: absolute; left: var(--gutter); top: 50%; translate: 0 -50%; width: min(480px, 80vw); }
.descent__cap { position: absolute; top: 50%; left: 0; translate: 0 -50%; width: 100%; opacity: 0; transform: translateY(40px); transition: opacity .6s var(--ease), transform .6s var(--ease); pointer-events: none; }
.descent__cap.is-on { opacity: 1; transform: none; }
.descent__cap.is-past { transform: translateY(-40px); }
.descent__cap h2 { margin: 6px 0 18px; }
.descent__cap p { color: #e3d3bb; font-size: 1.1rem; text-shadow: 0 1px 10px rgba(0, 0, 0, .8); }
.descent__gauge { position: absolute; left: var(--gutter); bottom: 40px; display: flex; align-items: center; gap: 14px; font: 400 .95rem var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.descent__gauge div { width: min(240px, 40vw); height: 3px; background: rgba(246, 234, 214, .2); border-radius: 3px; }
.descent__gauge i { display: block; height: 100%; width: 0; background: var(--amber); border-radius: 3px; box-shadow: 0 0 12px var(--amber); }
@media (max-width: 700px) {
  .descent__shade { background: linear-gradient(to top, rgba(7, 4, 3, .95) 0%, rgba(7, 4, 3, .6) 45%, transparent 70%); }
  .descent__captions { top: auto; bottom: 96px; translate: none; width: auto; right: var(--gutter); }
  .descent__cap { top: auto; bottom: 0; translate: none; }
}

/* ============ BANDES ============ */
.band { position: relative; max-width: 1360px; margin: 0 auto; padding: clamp(90px, 13vw, 190px) var(--gutter) 0; }
.band__head { max-width: 820px; }
.frame { position: relative; overflow: hidden; border-radius: 18px; aspect-ratio: 16 / 9; background: var(--night); border: 1px solid var(--line); box-shadow: 0 50px 90px -30px rgba(0, 0, 0, .85), 0 0 0 1px rgba(0, 0, 0, .4); }
.frame > img { width: 100%; height: 100%; object-fit: cover; }
figure { margin-top: 56px; }
figcaption { margin-top: 16px; font-size: .9rem; color: var(--muted); }
[data-tilt] { transform-style: preserve-3d; transition: transform .5s var(--ease); will-change: transform; }

.panel { padding: 20px 24px; background: rgba(7, 4, 3, .78); border: 1px solid var(--line); border-radius: 16px; backdrop-filter: blur(6px); }
.panel__title { display: block; font-size: 1rem; letter-spacing: .14em; color: var(--muted); margin-bottom: 12px; }

/* ============ ESPÈCES ============ */
.species { transition: --accent .4s; }
.species::before { content: ""; position: absolute; inset: 20% -20% -10%; z-index: -1; background: radial-gradient(ellipse 50% 50% at 30% 55%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); transition: background .6s; pointer-events: none; }
.species__wrap { margin-top: 60px; }
.species__tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.species__tabs button { position: relative; display: grid; gap: 8px; justify-items: center; padding: 12px 6px 10px; border-radius: 14px; background: rgba(7, 4, 3, .6); border: 1.5px solid var(--line); transition: all .3s var(--ease); }
.species__tabs img { width: 64px; height: 64px; object-fit: cover; object-position: 50% 30%; border-radius: 50%; border: 2px solid var(--c); filter: saturate(.6) brightness(.8); transition: filter .3s; }
.species__tabs span { font: 400 1.05rem/1.1 var(--display); letter-spacing: .06em; text-transform: uppercase; text-align: center; }
.species__tabs button:hover { transform: translateY(-3px); border-color: var(--c); }
.species__tabs button[aria-selected="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, rgba(7, 4, 3, .8)); box-shadow: 0 14px 34px -14px var(--c); }
.species__tabs button[aria-selected="true"] img { filter: none; }
.species__tabs button[aria-selected="true"] span { color: var(--c); }
.species__panel { display: grid; grid-template-columns: minmax(220px, 380px) 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; margin-top: 28px; padding: clamp(22px, 4vw, 52px); border-radius: 22px; background: linear-gradient(140deg, rgba(36, 23, 13, .9), rgba(7, 4, 3, .9)); border: 1px solid var(--line); }
.species__portrait { border-radius: 16px; overflow: hidden; border: 2px solid var(--accent); box-shadow: 0 30px 70px -20px color-mix(in srgb, var(--accent) 60%, transparent); transition: border-color .5s, box-shadow .5s, transform .5s var(--ease); }
.species__portrait img { width: 100%; height: auto; }
.species__panel.is-swap .species__portrait img { animation: swapImg .6s var(--ease); }
.species__panel.is-swap .species__info > * { animation: rise .55s var(--ease) both; }
.species__panel.is-swap .species__info > *:nth-child(2) { animation-delay: .04s; } .species__panel.is-swap .species__info > *:nth-child(3) { animation-delay: .08s; } .species__panel.is-swap .species__info > *:nth-child(4) { animation-delay: .12s; } .species__panel.is-swap .species__info > *:nth-child(5) { animation-delay: .16s; } .species__panel.is-swap .species__info > *:nth-child(6) { animation-delay: .2s; } .species__panel.is-swap .species__info > *:nth-child(7) { animation-delay: .24s; }
@keyframes swapImg { from { opacity: 0; transform: scale(1.12); filter: blur(8px); } }
.species__latin { font-style: italic; color: var(--accent); letter-spacing: .04em; transition: color .5s; }
.species__name { font-size: clamp(2.2rem, 4.6vw, 3.8rem); line-height: 1; margin: 4px 0 14px; }
.species__desc { color: #dccab0; max-width: 56ch; }
.species__proscons { display: grid; gap: 6px; margin: 18px 0 22px; font-size: .95rem; }
.species__proscons li { display: flex; gap: 10px; }
.species__proscons li::before { font: 400 1.2rem/1.2 var(--display); width: 14px; }
.species__proscons .pro::before { content: "+"; color: #9fd162; } .species__proscons .con::before { content: "−"; color: #e8795a; }
.gauges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; max-width: 520px; }
.gauge { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 10px; font-size: .82rem; color: var(--muted); }
.gauge__pips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.gauge__pips i { height: 8px; border-radius: 2px; background: rgba(246, 234, 214, .12); transform-origin: left; }
.gauge__pips i.is-on { background: var(--accent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 70%, transparent); animation: pip .5s var(--ease) both; }
@keyframes pip { from { transform: scaleX(0); opacity: 0; } }
.species__meta { display: flex; flex-wrap: wrap; gap: 14px 36px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .9rem; }
.species__meta dt { font: 400 .85rem var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.species__tip { margin-top: 22px; padding-left: 16px; border-left: 2px solid var(--accent); font-size: .92rem; color: var(--muted); transition: border-color .5s; }
@media (max-width: 800px) {
  .species__tabs { grid-template-columns: repeat(5, minmax(96px, 1fr)); overflow-x: auto; padding-bottom: 8px; }
  .species__panel { grid-template-columns: 1fr; }
  .species__portrait { max-width: 260px; }
  .gauges { grid-template-columns: 1fr; }
}

/* ============ CASTES ============ */
.lineup { display: flex; align-items: flex-end; justify-content: center; gap: clamp(2px, 1.2vw, 18px); margin-top: 60px; padding: 30px clamp(8px, 2vw, 30px) 0; border-radius: 22px; background: #000; border: 1px solid var(--line); overflow-x: auto; }
/* Les planches sont sur fond noir : le mode « lighten » efface ce noir */
.lineup__ant { flex: 0 1 calc(var(--w) * 1px); min-width: 78px; display: grid; justify-items: center; padding-bottom: 18px; opacity: .45; transition: opacity .35s, transform .45s var(--ease), filter .35s; filter: saturate(.7); }
.lineup__ant img { width: 100%; height: auto; mix-blend-mode: lighten; }
.lineup__ant span { font: 400 1rem var(--display); letter-spacing: .12em; text-transform: uppercase; margin-top: 4px; padding: 5px 10px 3px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.lineup__ant:hover { opacity: .85; }
.lineup__ant.is-on { opacity: 1; filter: none; transform: translateY(-10px); }
.lineup__ant.is-on span { color: var(--amber); border-color: rgba(242, 180, 65, .5); }
@media (max-width: 700px) { .lineup { justify-content: flex-start; } .lineup__ant { flex: none; width: calc(var(--w) * .46px); min-width: 0; } }
.caste-card { max-width: 720px; margin: 26px auto 0; text-align: center; min-height: 120px; }
.caste-card h3 { color: var(--amber); font-size: 2rem; }
.caste-card p { color: #dccab0; margin-top: 6px; }
.caste-card.is-swap > * { animation: rise .45s var(--ease) both; }
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 880px; margin: 50px auto 0; }
.slider { display: flex; align-items: center; gap: 14px; font-size: .85rem; }
.slider__track { flex: 1; height: 4px; border-radius: 4px; background: rgba(246, 234, 214, .18); position: relative; }
.slider__track i { position: absolute; inset: 0 auto 0 0; width: 50%; background: var(--amber); border-radius: 4px; animation: prio 7s ease-in-out infinite alternate; }
.slider__track i::after { content: ""; position: absolute; right: -8px; top: -6px; width: 16px; height: 16px; border-radius: 50%; background: var(--cream); box-shadow: 0 0 0 4px rgba(242, 180, 65, .25); }
@keyframes prio { from { width: 20%; } to { width: 80%; } }
.hatch { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 12px; font-size: .85rem; margin-top: 8px; }
.hatch div { height: 4px; border-radius: 4px; background: rgba(246, 234, 214, .18); }
.hatch i { display: block; height: 100%; width: var(--v); background: var(--amber); border-radius: 4px; }

/* ============ NID ============ */
.hotspot { position: absolute; left: var(--x); top: var(--y); width: 26px; height: 26px; margin: -13px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 6px rgba(242, 180, 65, .25); z-index: 2; }
.hotspot::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--amber); animation: ping 2s ease-out infinite; }
.hotspot::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; color: #23160a; font: 700 18px/1 "Comfortaa"; }
@keyframes ping { to { transform: scale(3); opacity: 0; } }
.hotspot span { position: absolute; left: 50%; bottom: 40px; translate: -50% 8px; width: 260px; padding: 12px 14px; border-radius: 12px; background: rgba(7, 4, 3, .94); border: 1px solid rgba(242, 180, 65, .4); font-size: .85rem; line-height: 1.45; text-align: left; opacity: 0; pointer-events: none; transition: all .3s var(--ease); }
.hotspot:hover span, .hotspot:focus span { opacity: 1; translate: -50% 0; }
.rooms { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; margin-top: 60px; border-top: 1px solid var(--line); }
.rooms li { padding: 26px 22px 30px 0; border-bottom: 1px solid var(--line); }
.rooms h3 { margin: 6px 0 8px; }
.rooms p { color: var(--muted); font-size: .92rem; }

/* ============ SURFACE ============ */
.trail__stage { cursor: crosshair; touch-action: none; }
.trail__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.trail__hint { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; padding: 9px 18px 7px; border-radius: 999px; background: rgba(7, 4, 3, .82); border: 1px solid rgba(242, 180, 65, .4); font-size: .82rem; white-space: nowrap; pointer-events: none; transition: opacity .4s; }
.trail__stage.is-drawn .trail__hint { opacity: 0; }
.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px; margin-top: 60px; }
.trio h3 { margin: 14px 0 6px; }
.trio p { color: var(--muted); font-size: .95rem; }
.chip { display: block; width: 46px; height: 46px; border-radius: 50%; }
.chip--trail { background: radial-gradient(circle, #ffe9a8 0 18%, rgba(242, 180, 65, .6) 20% 40%, rgba(242, 180, 65, .15) 42% 100%); }
.chip--guard { border: 2px dashed #7fc4ff; background: radial-gradient(circle, rgba(127, 196, 255, .35), transparent 70%); }
.chip--danger { border: 2px dashed #ff6a4d; background: radial-gradient(circle, rgba(255, 106, 77, .35), transparent 70%); }

/* ============ RESSOURCES ============ */
.res { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; margin-top: 60px; }
.res__card { grid-column: span 3; position: relative; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: linear-gradient(160deg, rgba(36, 23, 13, .9), rgba(7, 4, 3, .92)); border: 1px solid var(--line); transition: transform .5s var(--ease), border-color .4s, box-shadow .5s; }
.res__card:hover { transform: translateY(-6px); border-color: rgba(242, 180, 65, .45); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .9); }
.res__card .frame { border-radius: 0; border: 0; box-shadow: none; aspect-ratio: 3 / 2; }
.res__card .frame img { transition: transform 1.4s var(--ease); }
.res__card:hover .frame img { transform: scale(1.08); }
.res__card--wide { grid-column: span 8; flex-direction: row; }
.res__card--wide + .res__card { grid-column: span 4; }
.res__card--wide .frame { flex: 1.5; aspect-ratio: auto; min-height: 320px; }
.res__card--wide .res__body { flex: 1; align-self: center; }
.res__body { padding: 22px 24px 26px; }
.res__body h3 { font-size: 1.9rem; margin: 10px 0 8px; }
.res__body p { color: var(--muted); font-size: .93rem; }
.res__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.res__tags i { font-style: normal; font-size: .72rem; letter-spacing: .06em; padding: 3px 10px 2px; border-radius: 999px; border: 1px solid currentColor; color: var(--muted); }
.res__tags .t-sugar { color: #ff8f7a; } .res__tags .t-seed { color: var(--amber); } .res__tags .t-prey { color: #d9a25c; }
.res__tags .t-renew { color: #9fd162; }
@media (max-width: 1000px) { .res { grid-template-columns: repeat(2, 1fr); } .res__card, .res__card--wide, .res__card--wide + .res__card { grid-column: span 1; flex-direction: column; } .res__card--wide { grid-column: span 2; } .res__card--wide .frame { min-height: 0; aspect-ratio: 16 / 9; flex: none; } }
@media (max-width: 620px) { .res { grid-template-columns: 1fr; } .res .res__card { grid-column: span 1; } }
.worth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(24px, 4vw, 60px); align-items: center; margin-top: 60px; padding: clamp(22px, 4vw, 44px); border-radius: 20px; background: rgba(7, 4, 3, .6); border: 1px solid var(--line); }
.worth__head h3 { font-size: 2rem; color: var(--amber); }
.worth__head p { color: var(--muted); font-size: .93rem; margin-top: 8px; }
.worth__table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.worth__table th { font: 400 1rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0 10px 10px 0; }
.worth__table td { padding: 9px 10px 9px 0; border-top: 1px solid var(--line); }
.worth__table td:first-child { font-style: italic; white-space: nowrap; }
.worth__table .pips { display: flex; gap: 3px; }
.worth__table .pips i { width: 14px; height: 8px; border-radius: 2px; background: rgba(246, 234, 214, .12); }
.worth__table .pips i.is-on { background: var(--c); }
.worth__table .is-best .pips i.is-on { box-shadow: 0 0 8px var(--c); }
@media (max-width: 800px) { .worth { grid-template-columns: 1fr; } .worth__table .pips i { width: 9px; } }

.flora { margin: clamp(60px, 9vw, 130px) auto calc(clamp(60px, 9vw, 130px) * -1); max-width: 1400px; padding: 0 var(--gutter); }
.flora img { width: 100%; height: auto; mix-blend-mode: lighten; }

/* ============ BESTIAIRE ============ */
.bestiary__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(30px, 5vw, 80px); align-items: center; }
.beasts { margin-top: 36px; }
.beasts li { padding: 18px 0; border-top: 1px solid var(--line); }
.beasts h3 em { font: 400 .78rem "Comfortaa"; letter-spacing: .08em; text-transform: none; color: var(--amber); margin-left: 8px; padding: 3px 9px; border: 1px solid rgba(242, 180, 65, .4); border-radius: 999px; vertical-align: middle; }
.beasts p { color: var(--muted); font-size: .95rem; margin-top: 4px; }
.bestiary__shot { margin: 0; }
.bestiary__shot .frame { aspect-ratio: 4 / 3.4; }
.bestiary__shot .frame img { object-position: 36% 45%; transform: scale(1.25); transition: transform 8s linear; }
.bestiary__shot.is-in .frame img { transform: scale(1.05); }
@media (max-width: 900px) { .bestiary__grid { grid-template-columns: 1fr; } }

/* ============ MONDE ============ */
.cycle__stage { aspect-ratio: 3024 / 1898; }
/* même vue à chaque heure : un simple fondu, sans mouvement, pour que seule la lumière change */
.cycle__stage img { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.cycle__stage img.is-on { opacity: 1; }
.cycle__clock { position: absolute; left: 22px; bottom: 20px; display: grid; padding: 12px 18px 10px; border-radius: 14px; background: rgba(7, 4, 3, .8); border: 1px solid var(--line); backdrop-filter: blur(6px); }
.cycle__clock b { font: 400 2.4rem/1 var(--display); letter-spacing: .06em; color: var(--amber); }
.cycle__clock span { font-size: .8rem; color: var(--muted); }
.cycle__tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-width: 760px; margin: 22px auto 0; padding: 6px; border-radius: 16px; background: rgba(7, 4, 3, .7); border: 1px solid var(--line); }
.cycle__tabs button { padding: 10px 2px 8px; border-radius: 11px; font: 400 clamp(.8rem, 2.6vw, 1.1rem) var(--display); letter-spacing: .08em; text-transform: uppercase; border: 1.5px solid transparent; transition: all .3s; }
.cycle__tabs button.is-on { color: var(--amber); border-color: var(--amber); background: rgba(242, 180, 65, .12); }

/* ============ REGARD ============ */
.gazeband__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(30px, 5vw, 80px); align-items: center; }
.gazeband figure { margin: 0; }
.ticks { margin-top: 26px; display: grid; gap: 10px; font-size: .95rem; }
.ticks li { display: flex; gap: 12px; }
.ticks li::before { content: ""; flex: none; width: 9px; height: 9px; margin-top: 8px; background: var(--amber); border-radius: 2px; }
.gaze__stage { cursor: none; --gx: 58%; --gy: 46%; }
.gaze__stage { --px: 0%; --py: 0%; }
.gaze__stage > div { position: absolute; inset: 0; }
/* l'image déborde du cadre pour pouvoir glisser vers le point regardé */
.gaze__stage img { position: absolute; left: -8%; top: -8%; width: 116%; height: 116%; max-width: none; object-fit: cover; transform: translate(var(--px), var(--py)); transition: transform .9s cubic-bezier(.2, .7, .2, 1); will-change: transform; }
.gaze__blur img { filter: blur(9px) brightness(.72) saturate(.8); }
.gaze__sharp { -webkit-mask-image: radial-gradient(circle 170px at var(--gx) var(--gy), #000 40%, transparent 100%); mask-image: radial-gradient(circle 170px at var(--gx) var(--gy), #000 40%, transparent 100%); }
.gaze__ring { position: absolute; left: var(--gx); top: var(--gy); width: 26px; height: 26px; margin: -13px; border-radius: 50%; border: 1.5px solid rgba(246, 234, 214, .8); box-shadow: 0 0 0 5px rgba(246, 234, 214, .12); pointer-events: none; }
@media (max-width: 900px) { .gazeband__grid { grid-template-columns: 1fr; } }

/* ============ OBJECTIFS ============ */
.rail { display: flex; gap: 0; margin: 60px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 24px; overflow-x: auto; scroll-snap-type: x proximity; counter-reset: step; scrollbar-width: thin; scrollbar-color: var(--clay) transparent; cursor: grab; }
.rail li { flex: 0 0 230px; scroll-snap-align: start; position: relative; padding: 44px 26px 0 0; counter-increment: step; }
.rail li::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 2px; background: linear-gradient(90deg, var(--amber), rgba(242, 180, 65, .25)); }
.rail li::after { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--loam); border: 2px solid var(--amber); display: grid; place-items: center; font: 400 .8rem var(--display); color: var(--amber); }
.rail li:last-child::after { background: var(--amber); color: #23160a; box-shadow: 0 0 18px var(--amber); }
.rail b { display: block; font: 400 1.7rem/1.05 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.rail span { display: block; margin-top: 6px; color: var(--muted); font-size: .88rem; }

/* ============ IMAGES ============ */
.clips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.clip { position: relative; overflow: hidden; border-radius: 16px; aspect-ratio: 16 / 9; border: 1px solid var(--line); background: var(--night); }
.clip--wide { grid-column: span 4; aspect-ratio: 21 / 8; }
.clip video { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.clip:hover video { transform: scale(1.05); }
.clip::before { content: ""; position: absolute; z-index: 1; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px; border-radius: 50%; background: rgba(7, 4, 3, .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l10 6-10 6z' fill='%23f2b441'/%3E%3C/svg%3E") center / 26px no-repeat; border: 1.5px solid var(--amber); backdrop-filter: blur(6px); opacity: 0; scale: .8; transition: all .3s var(--ease); }
.clip:hover::before { opacity: 1; scale: 1; }
.clip span { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 12px; text-align: left; font: 400 1.15rem var(--display); letter-spacing: .1em; text-transform: uppercase; background: linear-gradient(transparent, rgba(7, 4, 3, .85)); }
@media (max-width: 900px) { .clips { grid-template-columns: repeat(2, 1fr); } .clip--wide { grid-column: span 2; aspect-ratio: 16 / 9; } }
.extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 26px 30px; margin-top: 70px; padding-top: 40px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.extras b { display: block; font: 400 1.3rem var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--cream); }

/* ============ TÉLÉCHARGEMENT ============ */
.final { position: relative; margin-top: clamp(90px, 13vw, 190px); min-height: 86vh; display: grid; place-items: center; overflow: hidden; }
.final__art { position: absolute; inset: -10% 0; width: 100%; height: 120%; object-fit: cover; object-position: 30% 50%; }
.final__shade { position: absolute; inset: 0; background: linear-gradient(to bottom, var(--loam), transparent 30%, transparent 60%, #000), radial-gradient(ellipse 50% 50% at 50% 50%, rgba(7, 4, 3, .7), transparent 75%); }
.final__content { position: relative; text-align: center; padding: 120px var(--gutter); }
.final h2 { font-size: clamp(3.4rem, 10vw, 8.5rem); margin-top: 8px; text-shadow: 0 6px 40px rgba(0, 0, 0, .8); }
.downloads { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 38px; }
.dl { display: grid; gap: 2px; min-width: 250px; padding: 22px 30px 20px; text-align: left; text-decoration: none; border-radius: 16px; background: rgba(7, 4, 3, .72); border: 1.5px solid rgba(246, 234, 214, .25); backdrop-filter: blur(10px); transition: all .3s var(--ease); }
.dl:hover { border-color: var(--amber); transform: translateY(-4px); box-shadow: 0 20px 44px -14px rgba(242, 180, 65, .5); }
.dl strong { font: 400 2.2rem/1.1 var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--amber); }
.dl span { font-size: .85rem; color: var(--muted); }

.footer { background: #000; padding: 54px var(--gutter) 44px; display: grid; justify-items: center; gap: 8px; font-size: .85rem; color: var(--muted); text-align: center; }
.footer img { margin-bottom: 12px; }
.footer a { color: var(--amber); }
.footer__legal { opacity: .6; margin-top: 10px; }

/* Visionneuse */
.lightbox { width: min(1400px, 94vw); padding: 0; border: 0; background: none; overflow: visible; }
.lightbox::backdrop { background: rgba(0, 0, 0, .88); backdrop-filter: blur(8px); }
.lightbox video { width: 100%; border-radius: 14px; box-shadow: 0 40px 100px rgba(0, 0, 0, .8); }
.lightbox__close { position: absolute; right: 0; top: -40px; font: 400 1.1rem var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--cream); }

/* Apparition au défilement */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.band__head > * { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.band__head.is-in > * { opacity: 1; transform: none; }
.band__head.is-in > *:nth-child(2) { transition-delay: .1s; } .band__head.is-in > *:nth-child(3) { transition-delay: .2s; } .band__head.is-in > *:nth-child(4) { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .reveal, .band__head > * { opacity: 1; transform: none; transition: none; }
  .manifesto__text span { opacity: 1; }
  .hero__motes, .grain { display: none; }
}
