/* Dionysus Games — feuille de style commune à tout le site.
   Chaque page de jeu redéfinit les variables --accent / --bg… dans son <body class="theme-xxx">. */

:root {
  --bg: #120a16;
  --bg-2: #1c1022;
  --surface: #241530;
  --line: #3a2446;
  --text: #f6ecdf;
  --muted: #b9a7b8;
  --accent: #e8b44a;   /* or */
  --accent-2: #d2639a; /* raisin */
  --accent-ink: #1a0f12;
  --radius: 18px;
  --max: 1120px;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Nom du studio : même police sur toutes les pages */
  --brand-font: "Unbounded", var(--body);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
em { font-style: italic; color: var(--accent); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(64px, 10vw, 120px) 0; }
.eyebrow {
  display: inline-block; font: 600 .78rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.lead { font-size: clamp(1.08rem, 2vw, 1.25rem); color: var(--muted); max-width: 40em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* ─── En-tête ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 1.15rem/1 var(--brand-font); }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; gap: 6px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface); }
@media (max-width: 560px) {
  .brand span { display: none; }
  .nav a { padding: 8px 10px; font-size: .9rem; }
}

/* ─── Boutons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px;
  font: 600 1rem/1 var(--body); text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 85%, white); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; transform: none; }
.btn small { display: block; font-weight: 400; font-size: .72rem; opacity: .8; margin-bottom: 3px; }
.btn .stack { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ─── Accueil : héros ─────────────────────────────────────── */
.hero { position: relative; padding: clamp(72px, 12vw, 150px) 0 clamp(64px, 9vw, 110px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent-2) 35%, transparent), transparent);
  filter: blur(20px); pointer-events: none;
}
.hero .wrap { position: relative; }
.hero h1 { max-width: 12ch; }
.hero .lead { margin-bottom: 32px; max-width: 34em; }
.hero-mark { position: absolute; right: 20px; top: 50%; translate: 0 -50%; width: min(34vw, 360px); opacity: .9; }
.hero-mark img { width: 100%; animation: sway 7s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes sway { 50% { rotate: -4deg; } }
@media (prefers-reduced-motion: reduce) { .hero-mark img { animation: none; } }
@media (max-width: 1040px) { .hero-mark { display: none; } }

/* ─── Grille des jeux ─────────────────────────────────────── */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head p { margin: 0; color: var(--muted); max-width: 32em; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 22px; }

.game-card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text);
  transition: transform .2s ease, border-color .2s ease;
}
a.game-card:hover { transform: translateY(-4px); border-color: var(--card-accent, var(--accent)); color: var(--text); }
.game-card .cover { aspect-ratio: 4 / 3; background: var(--card-bg, var(--bg-2)); position: relative; }
.game-card .cover canvas { width: 100%; height: 100%; }
.game-card .body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game-card h3 { margin: 0; font-size: 1.6rem; }
.game-card p { margin: 0; color: var(--muted); font-size: .97rem; }
.game-card .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 12px; }
.tag {
  font: 600 .72rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase;
  padding: 7px 10px; border-radius: 999px; background: var(--bg-2); color: var(--muted); border: 1px solid var(--line);
}
.tag.live { color: var(--card-accent, var(--accent)); border-color: currentColor; }

.game-card.soon { border-style: dashed; background: transparent; }
.game-card.soon .cover { display: grid; place-items: center; background:
  repeating-linear-gradient(45deg, transparent 0 14px, color-mix(in srgb, var(--line) 45%, transparent) 14px 15px); }
.game-card.soon .cover span { font: 600 4rem/1 var(--display); color: var(--line); }

/* ─── Studio ──────────────────────────────────────────────── */
.studio { background: var(--bg-2); border-block: 1px solid var(--line); }
.studio-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 860px) { .studio-grid { grid-template-columns: 1fr; } }
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.values li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.values strong { display: block; font-family: var(--display); font-size: 1.15rem; margin-bottom: 4px; }
.values span { color: var(--muted); font-size: .96rem; }

/* ─── Contact ─────────────────────────────────────────────── */
.contact { text-align: center; }
.contact .lead { margin-inline: auto; }
.contact .btn-row { justify-content: center; margin-top: 28px; }

/* ─── Pied de page ────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ─── Pages de texte (légal) ──────────────────────────────── */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.prose h2 { font-size: 1.6rem; margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.prose ul { padding-left: 1.2em; }
.prose .updated { color: var(--muted); font-size: .95rem; }
.todo { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); padding: 1px 6px; border-radius: 4px; font-weight: 500; }

/* ═══ Thème Echo (page du jeu) ═════════════════════════════ */
.theme-echo {
  --bg: #07061a;
  --bg-2: #0d0b26;
  --surface: #12102e;
  --line: #25224f;
  --text: #eef2ff;
  --muted: #a3a8d4;
  --accent: #3df5ff;
  --accent-2: #d27bff;
  --accent-ink: #04121a;
  --display: "Unbounded", var(--body);
}
.theme-echo h1, .theme-echo h2, .theme-echo h3 { font-weight: 700; letter-spacing: -.02em; }
.theme-echo em { color: var(--accent-2); font-style: normal; }

.game-hero { position: relative; padding: clamp(40px, 7vw, 90px) 0; overflow: hidden; }
.game-hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
@media (max-width: 860px) { .game-hero .wrap { grid-template-columns: 1fr; } }
.game-hero h1 { font-size: clamp(3.2rem, 10vw, 6.4rem); text-shadow: 0 0 32px color-mix(in srgb, var(--accent) 45%, transparent); }
.game-hero .lead { margin-bottom: 30px; }
.back { display: block; width: fit-content; color: var(--muted); text-decoration: none; font-size: .92rem; margin-bottom: 26px; }
.back:hover { color: var(--accent); }

.phone {
  justify-self: center; width: min(100%, 320px); aspect-ratio: 9 / 18; border-radius: 40px; padding: 10px;
  background: linear-gradient(160deg, #2b2860, #0b0a22); box-shadow: 0 30px 80px -20px rgba(61, 245, 255, .35), 0 0 0 1px #34307a inset;
}
.phone canvas { width: 100%; height: 100%; border-radius: 31px; background: #07061a; }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: color-mix(in srgb, var(--c, var(--accent)) 16%, transparent); color: var(--c, var(--accent)); font-size: 1.3rem; }
.feature h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }

.steps { counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; padding: 24px; border-left: 2px solid var(--accent); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent); border-radius: 0 14px 14px 0; }
.steps li::before { content: "0" counter(s); display: block; font: 700 .85rem/1 var(--display); color: var(--accent); margin-bottom: 12px; letter-spacing: .1em; }
.steps strong { display: block; font-size: 1.1rem; margin-bottom: 6px; }
.steps span { color: var(--muted); font-size: .95rem; }

.zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.zone { border-radius: 14px; padding: 18px 16px 16px; background: var(--z-bg); border: 1px solid var(--z-grid);
  background-image: linear-gradient(var(--z-grid) 1px, transparent 1px), linear-gradient(90deg, var(--z-grid) 1px, transparent 1px);
  background-size: 18px 18px; }
.zone b { display: block; font: 700 1rem/1.2 var(--display); color: var(--z-wall); text-shadow: 0 0 14px var(--z-wall); }
.zone small { color: var(--muted); font-size: .8rem; }

.cta-band { text-align: center; background: radial-gradient(60% 120% at 50% 0%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent), var(--bg-2); border-top: 1px solid var(--line); }
.cta-band .btn-row { justify-content: center; margin-top: 26px; }
.cta-band .lead { margin-inline: auto; }
