/* Couleurs du jeu (src/config.ts) : nuit, cible cyan, anneau rose, laser jaune. */
:root {
  --bg: #0b0b1a;
  --panel: #12122a;
  --text: #e8f6ff;
  --muted: #7f8fb0;
  --cyan: #29e7ff;
  --pink: #ff3df2;
  --yellow: #fff35c;
  --accent: var(--cyan);
  --line: #23244a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; }
header { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
header a.home {
  font-weight: 800; font-size: 1.1rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text); text-decoration: none; text-shadow: 0 0 12px rgba(41, 231, 255, 0.55);
}
header a.home::before {
  content: ''; display: inline-block; width: 0.8em; height: 0.8em; margin-right: 0.5em; vertical-align: -0.05em;
  border: 2px solid var(--cyan); border-radius: 50%; box-shadow: 0 0 0 3px rgba(255, 61, 242, 0.55);
}
h1 { font-size: 1.8rem; margin: 32px 0 4px; text-shadow: 0 0 18px rgba(255, 61, 242, 0.35); }
h2 { font-size: 1.2rem; margin: 32px 0 8px; color: var(--cyan); }
.updated { color: var(--muted); margin: 0 0 24px; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--pink); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }
strong { color: #fff; }
table { border-collapse: collapse; width: 100%; margin: 8px 0 16px; }
th, td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--line); }
th { color: var(--cyan); }
footer { color: var(--muted); font-size: 0.9rem; margin-top: 48px; }
footer a { margin-right: 16px; }

/* ---------- Page d'accueil ---------- */

.home-page { overflow-x: hidden; }
#stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.site { position: relative; z-index: 1; transition: opacity 0.8s ease 0.3s; }
.home { max-width: none; padding: 0; }

/* Intro : seul le canvas est visible ; le site apparaît quand le titre monte. */
.intro .site { opacity: 0; visibility: hidden; transition: none; }
.intro body { overflow: hidden; }
.skip-intro {
  position: fixed; z-index: 2; display: none;
  bottom: calc(20px + env(safe-area-inset-bottom)); right: calc(16px + env(safe-area-inset-right));
}
.intro .skip-intro { display: inline-flex; animation: fade-in 0.4s 0.6s both; }

.skip-intro, .sound-toggle, .replay-intro {
  align-items: center; gap: 6px; cursor: pointer; color: var(--text);
  font: 600 13px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 8px 16px; border: 2px solid var(--pink); background: rgba(255, 61, 242, 0.12); border-radius: 999px;
  transition: background 0.2s, box-shadow 0.2s;
}
.skip-intro:hover, .sound-toggle:hover, .replay-intro:hover { background: rgba(255, 61, 242, 0.25); box-shadow: 0 0 16px rgba(255, 61, 242, 0.45); }
.corner {
  position: fixed; z-index: 3; display: flex; gap: 8px; align-items: center;
  top: calc(14px + env(safe-area-inset-top)); right: calc(16px + env(safe-area-inset-right));
}
.sound-toggle { display: inline-flex; }
.lang-flags { display: flex; gap: 6px; }
.lang-flags a {
  display: block; width: 30px; height: 20px; border-radius: 4px; overflow: hidden;
  opacity: 0.5; transition: opacity 0.2s, box-shadow 0.2s;
}
.lang-flags svg { display: block; width: 100%; height: 100%; }
.lang-flags a:hover { opacity: 1; }
.lang-flags a[aria-current="page"] { opacity: 1; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--cyan); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sound-toggle[aria-pressed="true"] { border-color: var(--cyan); background: rgba(41, 231, 255, 0.15); }

/* Haut de page : le titre en cercles est dessiné sur le canvas, dans .hero-title. */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 88px 16px 24px; }
.hero-h1 {
  margin: 0; font-size: clamp(2.6rem, 10vw, 5rem); font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cyan); text-shadow: 0 0 24px rgba(255, 61, 242, 0.6);
}
.js .hero-h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero-title { display: none; }
.js .hero-title { display: block; width: min(86vw, 640px); aspect-ratio: 58 / 6; }
@media (max-width: 600px) { .js .hero-title { width: min(72vw, 320px); aspect-ratio: 34 / 15; } }
.pitch { margin: 48px 0 10px; max-width: 34em; font-size: clamp(1.05rem, 2.4vw, 1.25rem); font-weight: 600; }
.pitch-fr { margin: 0; max-width: 38em; color: var(--muted); }
.ready .pitch { animation: rise 0.7s 0.6s both; }
.ready .pitch-fr { animation: rise 0.7s 0.75s both; }

/* Sections */
.band { max-width: 960px; margin: 0 auto; padding: 56px 16px; text-align: center; }
.eyebrow { margin: 0 0 20px; color: var(--pink); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; }

.platform-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.platform, .link-card {
  background: linear-gradient(180deg, rgba(41, 231, 255, 0.06), rgba(255, 61, 242, 0.04)), var(--panel);
  border: 1px solid var(--line); border-radius: 20px;
}
.platform { position: relative; padding: 40px 16px; overflow: hidden; }
.platform-name { font-size: 1.4rem; font-weight: 800; letter-spacing: 0.04em; opacity: 0.55; }
/* Tampon encreur : double cadre, légèrement de travers, encre irrégulière. */
.stamp {
  position: absolute; left: 50%; top: 50%; padding: 4px 14px;
  color: var(--yellow); font-weight: 900; font-size: 1.05rem; letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap;
  border: 3px solid currentColor; outline: 1px solid currentColor; outline-offset: 3px; border-radius: 6px;
  transform: translate(-50%, -50%) rotate(-12deg);
  -webkit-mask-image: repeating-radial-gradient(circle at 30% 40%, #000 0 2px, rgba(0, 0, 0, 0.75) 2px 3px);
  mask-image: repeating-radial-gradient(circle at 30% 40%, #000 0 2px, rgba(0, 0, 0, 0.75) 2px 3px);
  text-shadow: 0 0 12px rgba(255, 243, 92, 0.35);
}
.js .platform.in .stamp { animation: stamp 0.45s cubic-bezier(0.3, 1.6, 0.6, 1) 0.35s both; }
.platform:nth-child(2) .stamp { animation-delay: 0.5s; }
.platform:nth-child(3) .stamp { animation-delay: 0.65s; }

.credits .studio { font-size: clamp(1.6rem, 5vw, 2.6rem); font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 16px; }
.credits .studio a { color: var(--cyan); text-decoration: none; text-shadow: 0 0 22px rgba(41, 231, 255, 0.55); }
.credits .studio a:hover { color: var(--pink); text-shadow: 0 0 22px rgba(255, 61, 242, 0.55); }

.info { padding-top: 24px; }
.links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; text-align: left; }
.link-card {
  display: flex; flex-direction: column; height: 100%; padding: 16px 18px 16px 52px; position: relative;
  color: var(--text); text-decoration: none; transition: border-color 0.2s, transform 0.2s;
}
.link-card::before {
  content: ''; position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  border: 3px solid var(--cyan); border-radius: 50%; transition: box-shadow 0.25s;
}
.link-card:hover { color: var(--text); border-color: var(--cyan); transform: translateY(-2px); }
.link-card:hover::before { box-shadow: 0 0 0 4px rgba(255, 61, 242, 0.7); }
.link-title { font-weight: 800; }
.link-fr { color: var(--muted); font-size: 0.9rem; }

.home-footer { max-width: 960px; margin: 0 auto; padding: 28px 16px calc(36px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); text-align: center; }
.home-footer p { margin: 0 0 16px; }
.replay-intro { display: inline-flex; }

/* Apparition au défilement (seulement avec JS : sans lui, tout reste visible). */
.js .fade-up { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .fade-up.in { opacity: 1; transform: none; }

@keyframes stamp { from { opacity: 0; transform: translate(-50%, -50%) rotate(-24deg) scale(2.2); } to { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .fade-up { opacity: 1; transform: none; }
}
