/* ===== Reset & tokens ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #060606;
  --bg-2: #0b0b0b;
  --surface: #121212;
  --text: #f6f6f4;
  --muted: rgba(246, 246, 244, 0.62);
  --line: rgba(255, 255, 255, 0.12);
  --head: "Syne", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --max: 1320px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text); font-family: var(--body);
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--head); font-weight: 600; font-size: 15px;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn--solid { background: var(--text); color: #0a0a0a; }
.btn--solid:hover { transform: translateY(-2px); background: #fff; }
.btn--ghost { color: var(--text); border-color: var(--line); background: rgba(255,255,255,0.06); }
.btn--ghost:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.1); }
.btn--lg { padding: 16px 32px; font-size: 16px; }

/* ===== Logo ===== */
.logo { font-family: var(--head); font-weight: 800; font-style: italic; font-size: 24px; letter-spacing: 1px; }
.logo--sm { font-size: 20px; }

/* ===== Header ===== */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease;
}
.header.is-scrolled { background: rgba(6,6,6,0.72); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header__inner { max-width: var(--max); margin: 0 auto; padding: 0 40px; height: 80px; display: flex; align-items: center; justify-content: space-between; }

/* ===== Hero ===== */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 110px; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__video { width: 100%; height: 100%; object-fit: cover; opacity: 0.4; transform: translateZ(0); }
.hero__filter {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6,6,6,0.55) 0%, rgba(6,6,6,0.30) 40%, rgba(6,6,6,0.95) 100%),
    radial-gradient(120% 80% at 50% 25%, transparent 40%, rgba(6,6,6,0.55) 100%);
}
.hero__content { position: relative; z-index: 2; max-width: var(--max); width: 100%; margin: 0 auto; padding: 0 40px; }
.hero__title { font-family: var(--head); font-weight: 600; font-size: clamp(40px, 6.5vw, 86px); line-height: 1.04; letter-spacing: -0.02em; max-width: 16ch; text-wrap: balance; }
.hero__sub { font-size: clamp(16px, 1.6vw, 20px); color: var(--muted); max-width: 56ch; margin-top: 24px; }
.hero__sub strong { color: var(--text); font-weight: 600; }
.hero__actions { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }

.scroll-hint {
  position: absolute; z-index: 3; bottom: 36px; left: 50%; transform: translateX(-50%);
  font-family: var(--head); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 2px; color: var(--muted);
  display: flex; align-items: center; gap: 12px;
}
.scroll-hint::after { content: ""; width: 1px; height: 34px; background: linear-gradient(var(--muted), transparent); animation: scrolldown 1.8s ease-in-out infinite; }
@keyframes scrolldown { 0%,100% { opacity:.3; transform: scaleY(.5); } 50% { opacity:1; transform: scaleY(1); } }

/* ===== Sections génériques ===== */
.section-head { max-width: var(--max); margin: 0 auto; padding: 0 40px; }
.section-title { font-family: var(--head); font-weight: 600; font-size: clamp(28px, 4vw, 46px); line-height: 1.05; letter-spacing: -0.02em; }
.section-sub { color: var(--muted); font-size: 17px; margin-top: 12px; }

.games { padding: 110px 0 90px; }
.cats { padding: 30px 0 120px; }

/* ===== Ticker (marquee jeux) ===== */
.ticker {
  margin-top: 48px; overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker__track { display: flex; gap: 22px; width: max-content; animation: ticker 42s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

.gcard {
  position: relative; flex-shrink: 0; width: 360px; aspect-ratio: 16 / 10;
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface);
}
.gcard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gcard__ph { width: 100%; height: 100%; background: radial-gradient(80% 80% at 30% 20%, rgba(255,255,255,0.10), transparent 60%), linear-gradient(135deg, #1a1a1a, #0a0a0a); }
.gcard__meta { position: absolute; inset: auto 0 0 0; padding: 18px; background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85)); }
.gcard__tag { display: inline-block; font-family: var(--head); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 6px; }
.gcard__name { font-family: var(--head); font-weight: 600; font-size: 20px; }

/* ===== Onglets catégories ===== */
.cats__tabs { max-width: var(--max); margin: 40px auto 0; padding: 0 40px; display: flex; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.cat-tab {
  font-family: var(--head); font-weight: 600; font-size: 16px; color: var(--muted);
  background: none; border: 0; cursor: pointer; padding: 14px 6px; margin-bottom: -1px;
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.cat-tab:hover { color: var(--text); }
.cat-tab.is-active { color: var(--text); border-bottom-color: var(--text); }

/* ===== Panneaux catégories ===== */
.cat-panel { display: none; max-width: var(--max); margin: 0 auto; padding: 40px 40px 0; }
.cat-panel.is-active { display: block; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.cat-panel__video { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 9; background: #000; }
.cat-panel__video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-panel__desc { margin-top: 30px; }
.cat-panel__desc--full { margin-top: 0; }
.cat-panel__type { font-family: var(--head); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); }
.cat-panel__desc h3 { font-family: var(--head); font-weight: 600; font-size: clamp(26px, 3.5vw, 40px); line-height: 1.1; margin: 10px 0 14px; }
.cat-panel__desc > p { color: var(--muted); font-size: 17px; max-width: 64ch; }

/* ===== Liste de jeux (dans une catégorie) ===== */
.glist { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.gitem { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .2s, transform .2s; }
.gitem:hover { border-color: rgba(255,255,255,0.32); transform: translateY(-3px); }
.gitem img, .gitem__ph { width: 92px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.gitem__ph { background: radial-gradient(80% 80% at 30% 20%, rgba(255,255,255,0.10), transparent 60%), linear-gradient(135deg, #1a1a1a, #0a0a0a); }
.gitem__tag { display: block; font-family: var(--head); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin-bottom: 4px; }
.gitem h4 { font-family: var(--head); font-weight: 600; font-size: 17px; }

/* ===== Cartes univers (vers pages dédiées) ===== */
.univers { max-width: var(--max); margin: 44px auto 0; padding: 0 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.ucard { position: relative; display: block; height: 440px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.ucard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.ucard:hover img { transform: scale(1.06); }
/* image zoomée pour recadrer hors du ciel sombre (pas de bordure noire) */
.ucard img.card-zoom { transform: scale(1.5); transform-origin: 50% 58%; }
.ucard:hover img.card-zoom { transform: scale(1.57); }
.ucard__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,6,6,0.15) 0%, rgba(6,6,6,0.25) 45%, rgba(6,6,6,0.92) 100%); transition: background .3s ease; }
.ucard:hover .ucard__overlay { background: linear-gradient(180deg, rgba(6,6,6,0.1) 0%, rgba(6,6,6,0.32) 45%, rgba(6,6,6,0.96) 100%); }
.ucard__body { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 28px; }
.ucard__type { font-family: var(--head); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.ucard__body h3 { font-family: var(--head); font-weight: 600; font-size: 30px; margin: 8px 0 14px; }
.ucard__link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--head); font-weight: 600; font-size: 14px; color: var(--text); }
.ucard__link svg { width: 16px; height: 16px; transition: transform .25s ease; }
.ucard:hover .ucard__link svg { transform: translateX(5px); }

/* ===== Pages dédiées : sous-hero vidéo ===== */
.subhero { position: relative; min-height: 80svh; display: flex; align-items: flex-end; padding: 130px 0 64px; overflow: hidden; }
.subhero__bg { position: absolute; inset: 0; z-index: 0; }
.subhero__bg video { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; transform: translateZ(0); }
.subhero__content { position: relative; z-index: 2; max-width: var(--max); width: 100%; margin: 0 auto; padding: 0 40px; }
.back { display: inline-block; font-family: var(--head); font-weight: 600; font-size: 14px; color: var(--muted); margin-bottom: 22px; transition: color .2s; }
.back:hover { color: var(--text); }
.subhero__type { font-family: var(--head); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); }
.subhero__title { font-family: var(--head); font-weight: 600; font-size: clamp(48px, 9vw, 110px); line-height: 0.98; letter-spacing: -0.02em; margin: 12px 0 18px; }
.subhero__sub { color: rgba(246,246,244,0.82); font-size: clamp(16px, 1.6vw, 19px); max-width: 60ch; margin-bottom: 28px; }

/* ===== Pages dédiées : contenu ===== */
.detail { padding: 90px 0; }
.detail__inner { max-width: var(--max); margin: 0 auto; padding: 0 40px; }
.detail__intro p { color: var(--muted); font-size: 17px; max-width: 64ch; margin-top: 14px; }
.detail__subtitle { font-family: var(--head); font-weight: 600; font-size: 22px; margin-top: 60px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 24px; grid-auto-flow: dense; }
.gallery--big { grid-template-columns: repeat(5, 1fr); }
.gallery--4 { grid-template-columns: repeat(4, 1fr); }
.gallery > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); display: block; cursor: zoom-in; transition: opacity .2s; }
.gallery > img:hover { opacity: .85; }
@media (max-width: 900px) { .gallery--big, .gallery--4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .gallery--big, .gallery--4 { grid-template-columns: repeat(2, 1fr); } }

/* ===== Lightbox ===== */
.lightbox { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.93); padding: 24px; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox__close { position: absolute; top: 16px; right: 22px; background: none; border: 0; color: #fff; font-size: 40px; line-height: 1; cursor: pointer; }
.lightbox__counter { position: absolute; top: 24px; left: 24px; color: rgba(255,255,255,.8); font-family: var(--head); font-weight: 600; font-size: 14px; letter-spacing: 1px; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; transition: background .2s; }
.lightbox__nav:hover { background: rgba(255,255,255,.22); }
.lightbox__prev { left: 18px; }
.lightbox__next { right: 18px; }

/* ===== Toast "Coming soon" ===== */
.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px); z-index: 300; background: var(--text); color: #0a0a0a; font-family: var(--head); font-weight: 600; font-size: 14px; padding: 12px 22px; border-radius: 999px; box-shadow: 0 12px 34px rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 640px) {
  .lightbox__nav { width: 44px; height: 44px; font-size: 26px; }
  .lightbox__prev { left: 8px; }
  .lightbox__next { right: 8px; }
}

/* ===== Contact ===== */
.contact { border-top: 1px solid var(--line); padding: 120px 0; text-align: center; }
.contact__inner { max-width: 720px; margin: 0 auto; padding: 0 40px; }
.contact__title { font-family: var(--head); font-weight: 600; font-size: clamp(30px, 5vw, 54px); line-height: 1.05; letter-spacing: -0.02em; }
.contact__sub { color: var(--muted); font-size: 18px; margin: 20px auto 34px; max-width: 48ch; }
.contact__socials { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.contact__socials a { font-family: var(--head); font-weight: 600; font-size: 14px; color: var(--muted); transition: color .2s; }
.contact__socials a:hover { color: var(--text); }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 32px 0; }
.footer__inner { max-width: var(--max); margin: 0 auto; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer__copy { color: var(--muted); font-size: 13px; }

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .header__inner, .hero__content, .section-head, .univers, .subhero__content, .detail__inner, .footer__inner, .contact__inner { padding-left: 22px; padding-right: 22px; }
  .gcard { width: 280px; }
  .univers { grid-template-columns: 1fr; }
  .ucard { height: 360px; }
  .gallery { grid-template-columns: 1fr; }
  .scroll-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker__track { animation: none; }
  .scroll-hint::after { animation: none; }
}
