/* ==========================================================================
   yannisroy.com
   ========================================================================== */

:root {
  --bg: #06070b;
  --panel: rgba(13, 15, 23, .78);
  --ink: #eeede8;
  --muted: #a2a4b4;
  --faint: #666a7e;
  --line: rgba(238, 237, 232, .11);

  --gold: #f4b942;
  --cyan: #63d6e8;
  --violet: #a992ff;
  --green: #74e3a6;
  --rose: #ff8098;
  --accent: var(--gold);

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --r: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: #111; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 800; font-stretch: 82%; letter-spacing: -.02em; text-wrap: balance; }
em { font-style: normal; }
kbd { font: 500 .68rem/1 var(--mono); padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.mono { font: 500 .72rem/1.4 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.dim { color: var(--faint); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ico { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Décor ---------- */
#space { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.nebula {
  position: fixed; inset: -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 34% at 20% 22%, rgba(99, 214, 232, .08), transparent 70%),
    radial-gradient(44% 40% at 84% 74%, rgba(169, 146, 255, .08), transparent 70%);
}
main, .foot { position: relative; z-index: 1; }

.xp { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; background: rgba(255, 255, 255, .05); }
.xp i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--gold), var(--cyan)); box-shadow: 0 0 12px rgba(244, 185, 66, .6); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px; padding-inline: clamp(16px, 4vw, 40px);
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(6, 7, 11, .86); border-bottom-color: var(--line); }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--gold); color: #14110a; font: 800 .82rem/1 var(--mono); letter-spacing: -.02em;
}
.brand-name { font: 500 .82rem/1 var(--mono); color: var(--muted); }
.brand-name em { color: var(--faint); }

.nav-links { display: flex; gap: 2px; }
.nav-links a { white-space: nowrap; padding: 8px 11px; border-radius: 99px; font-size: .9rem; color: var(--muted); transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-current { color: var(--ink); background: rgba(255, 255, 255, .07); }

.nav-right { display: flex; align-items: center; gap: 10px; }
.lvl { color: var(--gold); white-space: nowrap; }
.kbd-btn, .nav .btn { white-space: nowrap; }
.kbd-btn { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border: 1px solid var(--line); border-radius: 99px; font-size: .86rem; color: var(--muted); transition: color .2s, border-color .2s; }
.kbd-btn:hover { color: var(--ink); border-color: rgba(255, 255, 255, .3); }
.lang-btn { display: flex; align-items: center; gap: 5px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--faint); transition: border-color .2s; }
.lang-btn:hover { border-color: rgba(255, 255, 255, .3); }
.lang-btn i { font-style: normal; opacity: .5; }
html[lang="fr"] .lang-btn [data-l="fr"], html[lang="en"] .lang-btn [data-l="en"] { color: var(--ink); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: .82em 1.35em; border: 1px solid rgba(238, 237, 232, .26); border-radius: 99px;
  font-weight: 600; font-size: 1rem; line-height: 1;
  transition: translate .25s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn:hover { translate: 0 -2px; border-color: var(--ink); }
.btn-primary { background: var(--ink); color: #0b0c11; border-color: var(--ink); }
.btn-primary:hover { background: var(--gold); border-color: var(--gold); }
.btn-sm { padding: .62em 1em; font-size: .88rem; }

/* ---------- Cartes ---------- */
/* --rx / --ry : inclinaison 3D au survol (JS). --rv : bascule d'apparition. */
.card {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  transform: perspective(1100px) rotateX(calc(var(--rx, 0deg) + var(--rv, 0deg))) rotateY(var(--ry, 0deg));
  transition: border-color .3s, transform .7s var(--ease), translate .4s var(--ease);
}
.card.is-tilting { transition: border-color .3s, transform .14s linear, translate .4s var(--ease); }
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s; border-radius: inherit;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 65%);
}
.card:hover::before { opacity: 1; }
.card > * { position: relative; }

/* coins HUD */
.hud::after {
  content: ""; position: absolute; inset: 9px; pointer-events: none; opacity: .75;
  --c: var(--accent);
  background:
    linear-gradient(var(--c), var(--c)) top left / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 1px 14px no-repeat;
}

.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 9px; box-shadow: 0 0 0 0 rgba(116, 227, 166, .6); animation: pulse 2.2s infinite; vertical-align: 1px; }


/* ---------- Hero ---------- */
.hero {
  min-height: 100svh; max-width: 1320px; margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr); grid-template-rows: 1fr auto;
  align-items: center; gap: 28px clamp(24px, 5vw, 72px);
  padding: 96px var(--gutter) 72px;
}
.eyebrow { color: var(--muted); margin-bottom: 18px; animation: fade .8s .1s both; }

h1 { font-size: clamp(4.4rem, 14.5vw, 11.5rem); line-height: .86; letter-spacing: -.015em; font-stretch: 80%; }
h1 .line { display: block; }
h1 .line > span { display: inline-block; animation: rise 1s var(--ease) both; }
h1 .line:nth-child(1) > span { animation-delay: .15s; }
h1 .line:nth-child(2) > span { animation-delay: .3s; }
.h1-b { color: var(--gold); text-shadow: 0 0 60px rgba(244, 185, 66, .28); }

.role { margin-top: 26px; font: 500 clamp(1rem, 2.1vw, 1.35rem)/1.3 var(--mono); color: var(--cyan); min-height: 1.3em; animation: fade .8s .55s both; }
.role .prompt { color: var(--faint); margin-right: .4em; }
.caret { display: inline-block; width: .55em; height: 1.05em; margin-left: .15em; background: currentColor; vertical-align: -.16em; animation: blink 1.05s steps(1) infinite; }

.lede { margin-top: 20px; max-width: 36ch; font-size: clamp(1.12rem, 1.75vw, 1.42rem); line-height: 1.4; color: #d5d4d0; animation: fade .8s .7s both; }
.lede strong { color: var(--gold); font-weight: 600; }

.traits { display: flex; flex-wrap: wrap; gap: 6px 0; margin-top: 20px; color: var(--muted); animation: fade .8s .8s both; }
.traits li { display: flex; align-items: center; }
.traits li + li::before { content: ""; width: 4px; height: 4px; margin-inline: 12px; background: var(--gold); transform: rotate(45deg); }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.hero .cta { animation: fade .8s .9s both; }

/* Fiche de personnage — vraie profondeur : les éléments flottent au-dessus du fond de carte. */
.sheet {
  padding: 26px 26px 20px; --accent: var(--cyan);
  overflow: visible; transform-style: preserve-3d;
  transition: border-color .3s;                      /* l'inclinaison est lissée en JS */
  animation: fadeIn 1s .6s both;
}
.sheet.hud::after { transform: translateZ(30px); }
.sheet-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); transform: translateZ(24px); }
.avatar { position: relative; width: 172px; height: 172px; margin: 26px auto 24px; display: grid; place-items: center; perspective: 620px; transform-style: preserve-3d; transform: translateZ(54px); }
.avatar-face {
  display: grid; place-items: center; width: 128px; height: 128px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 30% 25%, #2a3040, #10131c 70%);
  border: 1px solid rgba(255, 255, 255, .16);
  font: 800 1.9rem/1 var(--display); font-stretch: 76%; letter-spacing: -.03em; color: var(--gold);
}
.avatar-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Gyroscope : trois anneaux qui tournent sur des axes différents, devant et derrière le visage. */
.orbit { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(99, 214, 232, .5); }
.orbit.o1 { animation: gy1 14s linear infinite; }
.orbit.o1::after { content: ""; position: absolute; top: 50%; left: -4px; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.orbit.o2 { inset: 6px; border-color: transparent; border-top-color: var(--gold); border-left-color: rgba(244, 185, 66, .35); animation: gy2 9s linear infinite; }
.orbit.o3 { inset: -5px; border: 1px dashed rgba(238, 237, 232, .24); animation: gy3 24s linear infinite; }
.sheet-stats { margin: 0; transform: translateZ(16px); }
.sheet-stats > div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.sheet-stats dt { font: 500 .68rem/1.4 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.sheet-stats dd { margin: 0; text-align: right; font-weight: 600; font-size: .95rem; line-height: 1.3; }
.sheet-stats dd small { font: 400 .72rem var(--mono); color: var(--muted); margin-left: 4px; }
.sheet-stats dd.ok { color: var(--green); font-weight: 500; }

.now { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-top: 18px; border-top: 1px solid var(--line); animation: fade .8s 1s both; }
.now a { display: inline-block; padding: 7px 14px; border: 1px solid var(--line); border-radius: 99px; font-size: .92rem; color: var(--muted); transition: color .2s, border-color .2s; }
.now a b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.now a:hover { color: var(--ink); border-color: rgba(255, 255, 255, .35); }
.scroll-hint { margin-left: auto; }

/* ---------- Sections ---------- */
.sec { padding-block: clamp(84px, 13vh, 150px); }
.sec-head { margin-bottom: clamp(32px, 5vw, 56px); }
.kicker { color: var(--accent); margin-bottom: 14px; }
h2 { font-size: clamp(2.5rem, 6.4vw, 5rem); line-height: .96; }
h2 em { color: var(--accent); }
.sec-intro { margin-top: 20px; max-width: 58ch; font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--muted); }

/* ---------- Valeurs ---------- */
.values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.value { padding: 26px 24px 28px; }
.value:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.value-n { position: absolute; top: 22px; right: 22px; color: var(--faint); }
.value-ico { width: 34px; height: 34px; color: var(--accent); stroke-width: 1.4; margin-bottom: 22px; }
.value h3 { font-size: clamp(1.45rem, 2.1vw, 1.8rem); line-height: 1.05; margin-bottom: 12px; }
.value p:not(.mono) { color: var(--muted); font-size: 1rem; }

.stack { margin-bottom: 18px; }

/* ---------- Constellation 3D ---------- */
.skills { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.sky { aspect-ratio: 4 / 3; min-height: 420px; }
.sky-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky-lines line { stroke: rgba(238, 237, 232, .16); stroke-width: 1; transition: stroke .3s, stroke-width .3s; }
.sky-lines line.is-on { stroke: var(--accent); stroke-width: 1.6; }

/* `scale` porte la profondeur (JS, sans transition) ; `transform` porte le survol. */
.sky .node {
  --k: 1;
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 0 4px rgba(238, 237, 232, .08), 0 0 14px rgba(238, 237, 232, .5);
  transform: scale(var(--k));
  transition: transform .3s var(--ease), background .2s, box-shadow .3s;
}
.sky .node::after { content: ""; position: absolute; inset: -16px; border-radius: 50%; }
.sky .node > span {
  position: absolute; top: calc(100% + 9px); left: 50%;
  transform: translateX(-50%) scale(calc(1 / var(--k))); transform-origin: 50% 0;
  font: 500 .7rem/1.2 var(--mono); letter-spacing: .03em; white-space: nowrap; color: var(--muted);
  transition: color .2s, transform .3s var(--ease);
}
.sky .node.hub { width: 16px; height: 16px; margin: -8px 0 0 -8px; background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent), 0 0 20px var(--accent); }
.sky .node.hub > span { color: var(--ink); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.sky .node.core { width: 46px; height: 46px; margin: -23px 0 0 -23px; background: var(--gold); box-shadow: 0 0 0 7px rgba(244, 185, 66, .14), 0 0 40px rgba(244, 185, 66, .6); }
.sky .node.core > span { position: static; transform: none; display: grid; place-items: center; height: 100%; font: 800 .86rem/1 var(--mono); color: #14110a; }
.sky .node:hover, .sky .node.is-active { --k: 1.35; background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent), 0 0 24px var(--accent); }
.sky .node.core:hover, .sky .node.core.is-active { --k: 1.08; background: var(--gold); box-shadow: 0 0 0 9px rgba(244, 185, 66, .18), 0 0 50px rgba(244, 185, 66, .75); }
.sky .node:hover > span, .sky .node.is-active > span { color: var(--ink); }
.sky .node.core:hover > span, .sky .node.core.is-active > span { color: #14110a; }

.sky-detail { padding: 34px 30px; display: flex; flex-direction: column; }
.sky-detail h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1; margin-bottom: 14px; }
.sky-detail p:not(.mono) { color: var(--muted); font-size: 1.05rem; }
.sky-detail .hint { margin-top: auto; padding-top: 28px; }

/* ---------- Lubie du moment : IA efficace, humain aux bons endroits ---------- */
.obsession { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: 18px; padding: clamp(28px, 4vw, 48px); border-color: rgba(99, 214, 232, .38); background: linear-gradient(120deg, rgba(99, 214, 232, .1), rgba(13, 15, 23, .8) 58%), var(--panel); }
.obsession h3 { font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.02; }
.obsession h3 em { color: var(--accent); }
.split { margin: 0; display: grid; gap: 14px; }
.split > div { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .025); }
.split dt { color: var(--muted); margin-bottom: 8px; }
.split dd { margin: 0; color: #d5d4d0; }
.split-human { border-color: rgba(244, 185, 66, .45) !important; background: rgba(244, 185, 66, .06) !important; }
.split-human dt { color: var(--gold); }
.pillars { display: flex; flex-wrap: wrap; gap: 8px; }
.pillars li { padding: 7px 14px; border-radius: 99px; background: var(--gold); color: #14110a; font-weight: 700; font-size: .98rem; line-height: 1.2; }

.zones { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 28px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.zones ul { display: flex; flex-wrap: wrap; gap: 8px 30px; }
.zones li { color: var(--muted); font-size: .98rem; }
.zones b { color: var(--ink); font-weight: 600; margin-right: 5px; }

/* ---------- Défis ---------- */
.quest-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font: 500 .68rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 5px 10px; }
.tag-main { color: #14110a; background: var(--gold); border-color: var(--gold); font-weight: 700; }
.badge { display: inline-flex; align-items: center; gap: 7px; font: 500 .68rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--green); border: 1px solid rgba(116, 227, 166, .35); border-radius: 99px; padding: 5px 10px; }
.badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2.2s infinite; }

.feature { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(26px, 5vw, 64px); padding: clamp(28px, 4.5vw, 56px); border-color: rgba(244, 185, 66, .42); background: linear-gradient(135deg, rgba(244, 185, 66, .13), rgba(244, 185, 66, .025) 46%, rgba(13, 15, 23, .8)), var(--panel); }
.feature h3 { font-size: clamp(3.4rem, 9vw, 7rem); line-height: .86; font-stretch: 80%; letter-spacing: -.012em; }
.feature .quest-role { margin: 12px 0 18px; }
.feature-main > p:not([class]) { max-width: 46ch; font-size: 1.1rem; color: #d5d4d0; }
.quip { margin-top: 14px; font: 500 .86rem/1.5 var(--mono); color: var(--gold); }
.quip::before { content: "// "; opacity: .6; }
.feature .btn { margin-top: 26px; }
.feature-stats { display: grid; align-content: center; gap: 22px; padding-left: clamp(0px, 3vw, 40px); border-left: 1px solid rgba(244, 185, 66, .25); }
.feature-stats b { display: block; font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1; font-weight: 800; font-stretch: 78%; letter-spacing: -.03em; color: var(--gold); font-variant-numeric: tabular-nums; }
.feature-stats li > span { color: var(--muted); font-size: .98rem; }

.quests { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.quest { padding: 26px 26px 28px; display: flex; flex-direction: column; }
.quest:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.quest h3 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: 1; }
.quest-role { margin: 8px 0 14px; font: 500 .78rem/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.quest > p:not([class]) { color: var(--muted); }
.quest-ico { width: 30px; height: 30px; color: var(--accent); margin-bottom: 18px; }
.more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 20px; font: 500 .8rem/1 var(--mono); color: var(--ink); }
.more .ico { transition: translate .25s var(--ease); }
.more:hover { color: var(--accent); }
.more:hover .ico { translate: 2px -2px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; display: grid; gap: 18px; padding-left: 38px; max-width: 860px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 12px; bottom: 12px; width: 1px; background: linear-gradient(var(--accent), rgba(169, 146, 255, .08)); }
.tl-item { position: relative; }
.tl-item::before { content: ""; position: absolute; left: -35px; top: 32px; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 2px solid var(--faint); }
.tl-item.is-live::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 6px rgba(169, 146, 255, .16), 0 0 22px var(--accent); }
.tl-item.is-live .quest { border-color: rgba(169, 146, 255, .45); background: linear-gradient(135deg, rgba(169, 146, 255, .12), rgba(13, 15, 23, .8) 55%), var(--panel); }
.tl-item.is-live h3 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.tl-item .quest > p:not([class]) { max-width: 58ch; }

/* ---------- Fun fact ---------- */
.funfact { display: flex; align-items: center; gap: clamp(20px, 4vw, 44px); padding: clamp(26px, 4vw, 44px); margin-bottom: 18px; border-color: rgba(255, 128, 152, .4); background: linear-gradient(120deg, rgba(255, 128, 152, .12), rgba(13, 15, 23, .8) 60%), var(--panel); }
.funfact-ico { width: clamp(56px, 9vw, 104px); height: clamp(56px, 9vw, 104px); stroke-width: 1; color: var(--accent); }
.funfact-text { font-size: clamp(1.5rem, 3.4vw, 2.6rem); line-height: 1.08; font-weight: 800; font-stretch: 82%; letter-spacing: -.015em; text-wrap: balance; }
.funfact-text em { color: var(--accent); }

.funfact-body { flex: 1; min-width: 0; }
.facts { display: grid; align-items: center; }
.sheet-stats dd.facts { justify-items: end; }
.fact { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: perspective(700px) rotateX(-55deg); transform-origin: 50% 0; transition: opacity .45s, transform .6s var(--ease), visibility 0s .45s; }
.fact.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.fact-dots { display: flex; gap: 4px; margin: 14px 0 -8px -8px; }
.fact-dots button { width: 26px; height: 26px; display: grid; place-items: center; }
.fact-dots button::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--faint); transition: width .3s var(--ease), background .2s; }
.fact-dots button[aria-current="true"]::before { width: 20px; background: var(--accent); }

/* ---------- Inventaire ---------- */
.inventory { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; }
.slots { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-content: start; }
.slot {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  transition: translate .3s var(--ease), color .2s, border-color .2s, background .2s;
}
.slot .ico { width: 44%; height: 44%; stroke-width: 1.3; }
.slot:hover, .slot.is-active { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--panel)); translate: 0 -4px; }
.slot.is-active::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--accent); }
.item { padding: 22px 26px; }
.item h3 { font-size: 1.7rem; line-height: 1; margin-bottom: 8px; }
.item .kicker { margin-bottom: 10px; }
.item p:not(.mono) { color: var(--muted); }

.arcade { margin-top: 34px; }
.arcade-title { color: var(--muted); margin-bottom: 12px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel); color: var(--muted); font-size: .92rem; font-weight: 600; line-height: 1.2; transition: color .2s, border-color .2s, background .2s; }
.tabs button:hover { color: var(--ink); border-color: rgba(255, 255, 255, .35); }
.tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #1a0d10; }
.guitar { padding: 22px 0 18px; }
.guitar-head, .guitar-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-inline: 26px; }
.guitar-head .mono { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.chords { display: flex; gap: 6px; }
.chords button { min-width: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; font: 700 .82rem/1 var(--mono); color: var(--muted); transition: all .2s; }
.chords button:hover { color: var(--ink); border-color: rgba(255, 255, 255, .35); }
.chords button.is-active { background: var(--accent); border-color: var(--accent); color: #1a0d10; }
.strings {
  position: relative; margin: 18px 0 14px; padding: 8px 0; cursor: crosshair;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(12.5% - 2px), rgba(238, 237, 232, .13) calc(12.5% - 2px) 12.5%),
    linear-gradient(rgba(255, 255, 255, .03), rgba(255, 255, 255, .012));
  border-block: 1px solid var(--line);
}
.string { display: block; width: 100%; height: 30px; position: relative; cursor: crosshair; }
.string i { position: absolute; left: 0; right: 0; top: 50%; height: var(--h, 2px); margin-top: calc(var(--h, 2px) / -2); background: linear-gradient(90deg, #8f8a7c, #e9e3d2 30%, #b9b3a2 70%, #8f8a7c); box-shadow: 0 2px 4px rgba(0, 0, 0, .55); border-radius: 2px; }
.string:nth-child(1) i { --h: 4px; }
.string:nth-child(2) i { --h: 3.4px; }
.string:nth-child(3) i { --h: 2.8px; }
.string:nth-child(4) i { --h: 2.2px; }
.string:nth-child(5) i { --h: 1.6px; }
.string:nth-child(6) i { --h: 1.2px; }
.string.vib i { animation: vib .55s linear; background: linear-gradient(90deg, var(--accent), #fff 50%, var(--accent)); }
.string.is-muted i { opacity: .35; }

/* ---------- Mini-jeux ---------- */
.item .more { margin-top: 0; padding-top: 14px; color: var(--accent); cursor: pointer; }
.game { padding: 22px 0 16px; }
.game-head, .game-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-inline: 26px; }
.game-head .mono:first-child { color: var(--accent); }
.game-stage { position: relative; height: 330px; margin: 16px 0 12px; overflow: hidden; border-block: 1px solid var(--line); background: linear-gradient(rgba(255, 255, 255, .03), rgba(255, 255, 255, .012)); }
.game-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.game.is-playing .game-stage { touch-action: none; cursor: crosshair; }
.game-dom { position: absolute; inset: 0; display: grid; place-items: center; }
.game-dom:empty { display: none; }
.game-overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 20px; text-align: center; background: rgba(6, 7, 11, .62); }
.game.is-playing .game-overlay { display: none; }
.game-msg { max-width: 30ch; font-size: 1.3rem; font-weight: 700; line-height: 1.2; text-wrap: balance; }

/* Grimoire : cartes qui se retournent en 3D */
.runes { display: grid; grid-template-columns: repeat(4, 66px); gap: 10px; perspective: 900px; }
.rune { position: relative; width: 66px; height: 66px; border-radius: 12px; transform-style: preserve-3d; transition: transform .45s var(--ease); }
.rune.is-up { transform: rotateY(180deg); }
.rune > span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.rune .back { background: var(--panel); color: var(--faint); font: 700 1rem var(--mono); }
.rune .face { transform: rotateY(180deg); background: color-mix(in srgb, var(--accent) 14%, #0d0f17); border-color: var(--accent); color: var(--accent); }
.rune .face .ico { width: 28px; height: 28px; }
.rune.is-done .face { opacity: .5; }

/* Platine */
.deck-wrap { position: relative; width: 250px; height: 250px; }
.deck { position: absolute; inset: 0; border-radius: 50%; cursor: grab; touch-action: none; background: repeating-radial-gradient(circle, #101014 0 2px, #1c1c22 2px 4px); border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 14px 44px rgba(0, 0, 0, .65); }
.deck:active { cursor: grabbing; }
.deck::before { content: ""; position: absolute; inset: 33%; border-radius: 50%; background: conic-gradient(var(--accent), var(--gold), var(--accent), var(--gold), var(--accent)); }
.deck::after { content: ""; position: absolute; inset: calc(50% - 5px); border-radius: 50%; background: var(--bg); }
.deck-shine { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; background: conic-gradient(from 25deg, transparent 0 38deg, rgba(255, 255, 255, .13) 52deg, transparent 68deg 205deg, rgba(255, 255, 255, .08) 222deg, transparent 238deg); }

/* ---------- Liens ---------- */
.inline-link { border-bottom: 1px solid color-mix(in srgb, var(--gold) 60%, transparent); transition: color .2s; }
.inline-link:hover { color: var(--gold); }
.foot-links { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .68rem; }
.foot-links a { color: var(--muted); transition: color .2s; }
.foot-links a:hover { color: var(--gold); }

/* ---------- Contact ---------- */
.sec-contact { text-align: center; padding-bottom: clamp(100px, 16vh, 180px); }
.sec-contact h2 { font-size: clamp(3rem, 9.5vw, 8rem); line-height: .88; font-stretch: 80%; letter-spacing: -.015em; }
.sec-contact .sec-intro { margin-inline: auto; margin-top: 26px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px; }
.chips li { padding: 7px 14px; border: 1px solid var(--line); border-radius: 99px; font: 500 .74rem/1.2 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sec-contact .cta { justify-content: center; margin-top: 36px; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 26px 86px; color: var(--muted); font-size: .9rem; background: rgba(6, 7, 11, .7); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.ach { display: flex; align-items: center; gap: 12px; color: var(--faint); }
.ach b { color: var(--muted); font-weight: 500; }
.pips { display: flex; gap: 6px; }
.pips i { width: 8px; height: 8px; border-radius: 2px; border: 1px solid var(--faint); transform: rotate(45deg); transition: all .4s; }
.pips i.on { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 10px rgba(244, 185, 66, .7); }

/* ---------- Palette ---------- */
.palette { width: min(580px, calc(100vw - 28px)); margin: 16vh auto 0; padding: 0; border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px; background: #0d0f17; color: var(--ink); box-shadow: 0 40px 120px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .4); overflow: hidden; }
.palette::backdrop { background: rgba(3, 4, 7, .66); backdrop-filter: blur(5px); }
.palette[open] { animation: pop .22s var(--ease); }
.palette-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette-top .prompt { color: var(--gold); font-size: 1rem; }
.palette input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: 500 1.05rem var(--display); }
.palette input::placeholder { color: var(--faint); }
#palList { max-height: min(52vh, 400px); overflow: auto; padding: 8px; }
#palList li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 12px; border-radius: 10px; cursor: pointer; }
#palList li[aria-selected="true"] { background: rgba(244, 185, 66, .13); }
#palList li[aria-selected="true"] .pal-label { color: var(--gold); }
#palList .pal-hint { font: 500 .66rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
#palList .pal-empty { color: var(--faint); cursor: default; }

/* ---------- Toast & bandeau prototype ---------- */
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; align-items: center; gap: 12px; max-width: min(360px, calc(100vw - 36px)); padding: 13px 18px 13px 14px; border: 1px solid rgba(244, 185, 66, .5); border-radius: 14px; background: #12131b; box-shadow: 0 18px 60px rgba(0, 0, 0, .6), 0 0 30px rgba(244, 185, 66, .14); transform: translateY(24px); opacity: 0; pointer-events: none; transition: transform .45s var(--ease), opacity .3s; }
.toast.show { transform: none; opacity: 1; }
.toast .t-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--gold); color: #14110a; flex: none; }
.toast .t-ico .ico { stroke-width: 2; }
.toast small { display: block; font: 500 .64rem/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--gold); }
.toast b { display: block; font-size: 1rem; line-height: 1.2; }
.toast span { display: block; font-size: .84rem; color: var(--muted); line-height: 1.3; }


.lang-hint { position: fixed; left: 14px; bottom: 14px; z-index: 70; display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 16px; border: 1px solid var(--line); border-radius: 99px; background: #12131b; font-size: .92rem; }
.lang-hint a:hover { color: var(--gold); }
.lang-hint button { width: 28px; height: 28px; border-radius: 50%; color: var(--muted); }
.lang-hint button:hover { color: var(--ink); }

/* ---------- Apparitions ---------- */
/* `translate` (et non `transform`) pour ne pas entrer en conflit avec l'inclinaison 3D des cartes. */
.js [data-reveal] { opacity: 0; translate: 0 28px; transition: opacity .8s var(--ease), translate .8s var(--ease); transition-delay: var(--d, 0s); }
.js .card[data-reveal] { transition: opacity .8s var(--ease), translate .8s var(--ease), transform .9s var(--ease), border-color .3s; transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; translate: none; }
.js [data-reveal]:not(.in) { --rv: 14deg; }
.js .card[data-reveal].is-tilting { transition: opacity .8s var(--ease), translate .4s var(--ease), transform .14s linear, border-color .3s; }

/* ---------- Keyframes ---------- */
@keyframes rise { from { transform: translateY(42%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(116, 227, 166, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(116, 227, 166, 0); } }
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes gy1 { from { transform: rotateX(68deg) rotateZ(0deg); } to { transform: rotateX(68deg) rotateZ(360deg); } }
@keyframes gy2 { from { transform: rotateY(0deg) rotateX(58deg); } to { transform: rotateY(360deg) rotateX(58deg); } }
@keyframes gy3 { from { transform: rotateZ(0deg) rotateY(64deg); } to { transform: rotateZ(-360deg) rotateY(64deg); } }
@keyframes vib {
  0% { transform: translateY(-3px); } 10% { transform: translateY(3px); } 20% { transform: translateY(-2.4px); } 30% { transform: translateY(2.4px); }
  40% { transform: translateY(-1.8px); } 50% { transform: translateY(1.8px); } 60% { transform: translateY(-1.1px); } 70% { transform: translateY(1.1px); }
  80% { transform: translateY(-.6px); } 90% { transform: translateY(.6px); } 100% { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .brand-name { display: none; }
}
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; grid-template-rows: auto; padding-top: 104px; gap: 30px; }
  .sheet { max-width: 460px; }
  .scroll-hint { display: none; }
  .skills, .inventory, .feature, .obsession { grid-template-columns: 1fr; }
  .sky { aspect-ratio: 5 / 6; min-height: 0; }
  .sky-detail { padding: 26px 24px; }
  .sky-detail .hint { padding-top: 16px; }
  .feature-stats { border-left: 0; border-top: 1px solid rgba(244, 185, 66, .25); padding: 26px 0 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
  .quests { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .lvl, .kbd-btn kbd { display: none; }
  .kbd-btn { padding: 8px 12px; }
  .nav { gap: 8px; }
  .nav-right { gap: 6px; }
  .values { grid-template-columns: 1fr; }
  .sky { aspect-ratio: 3 / 4.6; }
  .sky .node > span { font-size: .62rem; }
  .slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .chords { flex-wrap: wrap; }
  .game-stage { height: 300px; }
  .runes { grid-template-columns: repeat(4, 58px); gap: 8px; }
  .rune { width: 58px; height: 58px; }
  .deck-wrap { width: 220px; height: 220px; }
  .feature-stats { grid-template-columns: 1fr; }
  .funfact { flex-direction: column; align-items: flex-start; }
  .timeline { padding-left: 30px; }
  .tl-item::before { left: -27px; }
  .foot-in { flex-direction: column; align-items: flex-start; }
  .toast { bottom: 64px; }
  .sec-contact .cta .btn { flex: 1 1 40%; justify-content: center; }
  .sec-contact .cta .btn-primary { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .js [data-reveal] { opacity: 1; translate: none; --rv: 0deg; }
}
