/* ═══════════════════════════════════════════════════════════════════
   Hullabaloo — Site vitrine
   Palette fidèle à l'app Flutter (app_colors.dart)
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --background: #0F0B2E;
  --surface: #1A1545;
  --surface-light: #252052;
  --primary: #A855F7;
  --secondary: #3B82F6;
  --accent: #FF6B8A;
  --gold: #FFB800;
  --text-primary: #F8FAFC;
  --text-secondary: #A5B4FC;
  --gradient-start: #00E5FF;
  --gradient-mid: #BF5AF2;
  --gradient-end: #FF6482;
  --glass-bg: rgba(26, 21, 69, 0.7);
  --glass-border: rgba(168, 85, 247, 0.2);
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1100px;
}

/* ── Reset ─────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover { opacity: 0.8; }

img { max-width: 100%; height: auto; display: block; }

/* ── Container ─────────────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Navigation ────────────────────────────────────────────────── */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 11, 46, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.75rem 0;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
  opacity: 1;
}

/* ── Language selector ─────────────────────────────────────────── */

.lang-selector {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.lang-btn {
  background: none;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 2px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  opacity: 0.5;
  transition: opacity 0.2s, border-color 0.2s;
}

.lang-btn:hover { opacity: 0.8; }

.lang-btn.active {
  opacity: 1;
  border-color: var(--primary);
}

/* ── Hero ──────────────────────────────────────────────────────── */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5.5rem 1.5rem 2.5rem;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  position: relative;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 1.5rem;
}

.hero-screenshot {
  width: 220px;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(168, 85, 247, 0.25);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Store badges ──────────────────────────────────────────────── */

.store-badge {
  height: 52px;
  transition: transform 0.2s;
}

.store-badge:hover { transform: scale(1.05); }

.store-badge-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ── Sections ──────────────────────────────────────────────────── */

section {
  padding: 5rem 0;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
}

/* ── Glass card ────────────────────────────────────────────────── */

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.2s, border-color 0.3s;
}

.glass-card:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.4);
}

/* ── How to play ───────────────────────────────────────────────── */

.how-to-play-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.step-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.step-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ── Rules grid ────────────────────────────────────────────────── */

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.rule-card {
  padding: 1.5rem;
}

.rule-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gold);
}

.rule-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Screenshots ───────────────────────────────────────────────── */

.screenshots-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 0 2rem;
  -webkit-overflow-scrolling: touch;
}

.screenshots-scroll::-webkit-scrollbar { display: none; }

.screenshot-item {
  flex: 0 0 auto;
  width: 240px;
  scroll-snap-align: center;
}

.screenshot-placeholder {
  width: 240px;
  height: 426px;
  background: var(--surface);
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}

.screenshot-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ── Features grid ─────────────────────────────────────────────── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.5rem;
}

.feature-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ── Download CTA ──────────────────────────────────────────────── */

.download-section {
  text-align: center;
  padding: 5rem 0;
  position: relative;
}

.download-section::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 400px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Footer ────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--glass-border);
  padding: 2.5rem 0;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-links a:hover { color: var(--text-primary); }

.footer-copy {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* ── Animations ────────────────────────────────────────────────── */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav-links { gap: 1rem; }

  .hero { padding: 5rem 1rem 2rem; }

  .hero-screenshot { width: 180px; }

  section { padding: 3rem 0; }

  .how-to-play-grid { grid-template-columns: 1fr 1fr; }

  .features-grid { grid-template-columns: 1fr; }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .how-to-play-grid { grid-template-columns: 1fr; }

  .hero-buttons { flex-direction: column; align-items: center; }

  .nav-links .nav-link-text { display: none; }
}
