/* Tacticia — feuille commune. Chaque page pose un thème (.t-home, .t-tcg, .t-sub, .t-ete)
   qui ne fait que redéfinir des variables ; la structure reste la même partout. */

:root {
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Thèmes ---------- */
.t-home {
  --font-display: "Marcellus", "Times New Roman", serif;
  --bg: #0d0e11; --bg2: #15171c; --panel: #181a20;
  --ink: #eeeff2; --muted: #a2a7b1; --line: rgba(255, 255, 255, .09);
  --accent: #cfa55b; --accent2: #d7dbe2; --accent-ink: #17130a;
  --glow: rgba(207, 165, 91, .22);
  --grad: linear-gradient(135deg, #f1dca8 0%, #cfa55b 45%, #8a6a2e 100%);
}
.t-tcg {
  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --bg: #0a0c13; --bg2: #11141e; --panel: #141826;
  --ink: #f2f4f9; --muted: #9ba4b8; --line: rgba(200, 215, 255, .12);
  --accent: #bcd0ff; --accent2: #d9dee7; --accent-ink: #0b0e18;
  --glow: rgba(160, 190, 255, .20);
  --holo: linear-gradient(115deg, #ff9fd6 0%, #a9d8ff 22%, #b9ffe0 40%, #fff2a6 58%, #d1adff 76%, #ff9fd6 100%);
  --grad: linear-gradient(135deg, #ffffff 0%, #c9d1df 40%, #8e98ab 100%);
}
.t-sub {
  --font-display: "Chakra Petch", "Consolas", ui-monospace, monospace;
  --bg: #070b0c; --bg2: #0d1315; --panel: #10181a;
  --ink: #e2f3ef; --muted: #8ba49f; --line: rgba(46, 242, 208, .14);
  --accent: #2ef2d0; --accent2: #a06bff; --accent-ink: #03110e;
  --glow: rgba(46, 242, 208, .22);
  --grad: linear-gradient(100deg, #2ef2d0 0%, #6fb6ff 50%, #a06bff 100%);
}
.t-ete {
  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --bg: #110a08; --bg2: #1b1210; --panel: #211614;
  --ink: #f5ece5; --muted: #b8a89c; --line: rgba(255, 180, 120, .13);
  --accent: #d8353a; --accent2: #ff9e45; --accent-ink: #1a0506;
  --glow: rgba(255, 120, 60, .20);
  --grad: linear-gradient(180deg, #ffd29a 0%, #ff8a3d 45%, #c4262c 100%);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: .01em; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink);
  padding: 10px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* Fond d'ambiance commun, teinté par le thème */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 40vmax at 85% -10%, var(--glow), transparent 70%),
    radial-gradient(50vmax 40vmax at -10% 110%, var(--glow), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}
.ambient::after { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%);
}

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.brand span { font-family: "Marcellus", Georgia, serif; font-size: 20px; letter-spacing: .14em; text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff, #b9bec8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 2px; }
.nav a { position: relative; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--muted);
  padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  border-radius: 2px; background: var(--accent); }

/* ---------- Boutons & étiquettes ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; font: 700 15px/1 var(--font-body);
  padding: 14px 22px; border-radius: 12px; text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 26px -10px var(--accent); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: rgba(255,255,255,.03); }
.btn-ghost:hover { background: rgba(255,255,255,.07); }
.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .6; transform: none; box-shadow: none;
  background: rgba(255,255,255,.04); color: var(--muted); border-color: var(--line); }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.03); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* ---------- Sections ---------- */
section { padding-block: clamp(56px, 8vw, 104px); }
.section-head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); margin-top: 10px; }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 17px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Logo carré : présenté dans un cadre assumé, bordé à la couleur du thème */
.logo-frame { position: relative; margin-inline: auto; border-radius: 28px; overflow: hidden; background: #111317;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  box-shadow: 0 40px 100px -46px var(--accent), 0 0 0 8px rgba(255,255,255,.018); }
.logo-frame img { width: 100%; transform: scale(1.04); }
.t-tcg .logo-frame { padding: 2px; border: 0; background: var(--holo); background-size: 300% 300%; animation: holoPan 10s ease-in-out infinite alternate;
  box-shadow: 0 40px 100px -46px rgba(169,216,255,.7); }
.t-tcg .logo-frame img { border-radius: 26px; transform: none; }
.t-sub .logo-frame { border-color: rgba(46,242,208,.45); box-shadow: 0 0 0 1px rgba(160,107,255,.25), 0 30px 90px -40px rgba(46,242,208,.8), 0 0 60px -20px rgba(160,107,255,.45); }
.t-ete .logo-frame { border-color: rgba(216,53,58,.55); box-shadow: 0 40px 100px -40px rgba(255,120,50,.7), 0 0 0 8px rgba(255,255,255,.02); }
@keyframes holoPan { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
/* (ancien fondu de bords, gardé pour réemploi) */
.logo-fade { -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 58%, transparent 100%); }

/* ---------- Accueil ---------- */
.home-hero { padding-top: clamp(32px, 6vw, 72px); text-align: center; position: relative; }
.home-hero .logo-wrap { width: min(400px, 82vw); margin: 0 auto 28px; }
.home-hero h1 { font-size: clamp(30px, 5.2vw, 56px); max-width: 16ch; margin: 8px auto 0; }
.home-hero .lead { color: var(--muted); font-size: clamp(16px, 2vw, 19px); max-width: 560px; margin: 18px auto 0; }
.home-hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

.games { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 24px); }
.game-card { position: relative; display: flex; flex-direction: column; text-decoration: none; overflow: hidden;
  border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; isolation: isolate; }
.game-card::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 70% at 50% 0%, var(--glow), transparent 65%); }
.game-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 24px 60px -24px var(--accent); }
.game-card .art { aspect-ratio: 1 / 1; overflow: hidden; }
.game-card .art img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); transition: transform .6s var(--ease); }
.game-card:hover .art img { transform: scale(1.24); }
.game-card .body { padding: 4px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game-card h3 { font-size: 24px; }
.game-card p { color: var(--muted); font-size: 15.5px; }
.game-card .more { margin-top: auto; padding-top: 8px; font-weight: 700; font-size: 14px; color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px; }
.game-card .more svg { transition: transform .25s var(--ease); }
.game-card:hover .more svg { transform: translateX(4px); }
.game-card.t-tcg h3 { background: var(--holo); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.game-card.t-sub h3 { color: var(--accent); text-shadow: 0 0 18px rgba(46,242,208,.45); letter-spacing: .06em; }
.game-card.t-ete h3 { color: #f3e3d3; letter-spacing: .06em; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.step::before { counter-increment: s; content: "0" counter(s); display: block; font-family: var(--font-display);
  font-size: 34px; line-height: 1; margin-bottom: 16px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step h3 { font-size: 21px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15.5px; }
.note { margin-top: 22px; display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 14px;
  border: 1px dashed var(--line); color: var(--muted); font-size: 15px; }
.note svg { flex-shrink: 0; color: var(--accent); margin-top: 2px; }
.note strong { color: var(--ink); }

/* ---------- Pages de jeu ---------- */
.g-hero { padding-top: clamp(28px, 5vw, 64px); position: relative; }
.g-hero .grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.g-hero h1 { font-size: clamp(38px, 6.4vw, 72px); margin-top: 14px; }
.g-hero .tagline { font-family: var(--font-display); font-size: clamp(18px, 2.4vw, 24px); margin-top: 12px; color: var(--accent); }
.g-hero .desc { color: var(--muted); font-size: 17px; margin-top: 20px; max-width: 52ch; }
.g-hero .desc + .desc { margin-top: 12px; }
.status { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 30px; }
.status small { color: var(--muted); font-size: 14px; }
.g-hero figure { margin: 0; position: relative; }
.g-hero figure { max-width: 500px; width: 100%; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { position: relative; padding: 24px 22px 26px; border-radius: var(--radius); background: var(--panel);
  border: 1px solid var(--line); overflow: hidden; }
.feature .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.split .copy p { color: var(--muted); font-size: 17px; margin-top: 14px; }

.others { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.other { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: var(--radius); text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); transition: border-color .25s, transform .25s var(--ease); }
.other:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.other img { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; transform: scale(1.15); }
.other .ow { overflow: hidden; border-radius: 12px; flex-shrink: 0; }
.other strong { display: block; font-family: var(--font-display); font-size: 19px; color: var(--accent); }
.other span { color: var(--muted); font-size: 14px; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(24px, 4vw, 48px); padding-block: 36px 44px;
  background: rgba(0,0,0,.25); font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: auto 1fr; gap: 20px 32px; align-items: start; }
.site-footer .fb { display: flex; align-items: center; gap: 10px; }
.site-footer .fb img { width: 34px; height: 34px; }
.site-footer .fb span { font-family: "Marcellus", Georgia, serif; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.site-footer .legal { display: grid; gap: 6px; }
.site-footer .age { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.site-footer .age b { display: inline-grid; place-items: center; min-width: 38px; height: 26px; padding: 0 6px; border-radius: 6px;
  border: 1.5px solid currentColor; font-size: 13px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--ink); text-decoration: underline; }
.site-footer .copy { grid-column: 1 / -1; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- Entrée en scène au défilement (progressive : sans JS tout est visible) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .games { grid-template-columns: 1fr; }
  .game-card { flex-direction: row; align-items: center; }
  .game-card .art { width: 40%; flex-shrink: 0; }
  .game-card .body { padding: 24px 28px 24px 8px; }
}
@media (max-width: 760px) {
  .g-hero .grid, .split { grid-template-columns: 1fr; }
  .g-hero figure { order: -1; max-width: 340px; }
  .steps { grid-template-columns: 1fr; }
  .others { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .game-card { flex-direction: column; align-items: stretch; }
  .game-card .art { width: 100%; max-height: 300px; }
  .game-card .art img { transform: scale(1.12); }
  .game-card .body { padding: 4px 20px 22px; }
  .features { grid-template-columns: 1fr; }
  .brand span { display: none; }
  .nav a { padding: 8px 9px; font-size: 13.5px; }
  .nav a[aria-current="page"]::after { left: 9px; right: 9px; }
}
@media (max-width: 360px) {
  .nav a { padding: 8px 6px; font-size: 13px; }
}

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