/* ═══════════════════════════════════════════════════════
   FPS TOOLKIT — style.css
   Stack: HTML · CSS Vanilla · JavaScript Vanilla
   ═══════════════════════════════════════════════════════ */

/* ── CSS VARIABLES ──────────────────────────────────── */
:root {
  /* Core palette */
  --bg-base:        #0d0e14;
  --bg-card:        #13141d;
  --bg-card-alt:    #181923;
  --bg-elevated:    #1e2030;
  --border:         #252738;
  --border-bright:  #333650;

  /* Accent system */
  --accent:         #7c6af7;
  --accent-light:   #9d8fff;
  --accent-dim:     rgba(124, 106, 247, 0.15);
  --accent-glow:    rgba(124, 106, 247, 0.35);
  --accent-2:       #4fd1c5;   /* secondary teal */

  /* Text */
  --text-primary:   #e8eaf6;
  --text-secondary: #8b8fad;
  --text-muted:     #4a4e6a;
  --text-bright:    #ffffff;

  /* Status colors */
  --wrist-color:    #f87171;
  --hybrid-color:   #fbbf24;
  --arm-color:      #34d399;

  /* Typography */
  --font-display:   'Rajdhani', sans-serif;
  --font-mono:      'JetBrains Mono', monospace;
  --font-body:      'Inter', sans-serif;

  /* Spacing */
  --nav-height:     64px;
  --radius-sm:      6px;
  --radius:         12px;
  --radius-lg:      20px;
}

/* ── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── NAVBAR ─────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(13, 14, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 1px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.logo-bracket { color: var(--text-muted); }
.logo-text    { color: var(--text-primary); }
.logo-accent  { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-item a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-item.active a {
  color: var(--accent-light);
  background: var(--accent-dim);
}
.nav-item.coming a {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.nav-item a:hover { color: var(--text-primary); background: var(--bg-elevated); }
.nav-item.coming a:hover { background: none; color: var(--text-secondary); }

.nav-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  background: var(--accent);
  color: #fff;
  line-height: 1.6;
}
.nav-badge.soon {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-tags {
  display: flex;
  gap: 6px;
}
.game-tag {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  border: 1px solid var(--border-bright);
  color: var(--text-muted);
}

.btn-coffee {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1a1000;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.3);
}
.btn-coffee:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5);
}
.btn-coffee:active { transform: translateY(0); }

/* ── HERO ───────────────────────────────────────────── */
.hero {
  margin-top: var(--nav-height);
  position: relative;
  overflow: hidden;
  padding: 64px 24px 48px;
  text-align: center;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 106, 247, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 106, 247, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}

.hero-glow {
  position: absolute;
  top: -80px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text-bright);
  margin-bottom: 16px;
}
.title-accent {
  color: var(--accent);
  -webkit-text-stroke: 1px var(--accent-light);
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
  font-weight: 300;
}

/* ── AD ZONES ───────────────────────────────────────── */
.ad-zone {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 24px;
}

.ad-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 90px;
  border: 2px dashed var(--border-bright);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.015);
  transition: background 0.2s;
}
.ad-inner:hover { background: rgba(255,255,255,0.03); }

.ad-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.ad-size {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--border-bright);
}

/* ── MAIN TOOL ──────────────────────────────────────── */
.main-tool {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── RESULTS PANEL ──────────────────────────────────── */
.results-panel {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 32px 24px;
  gap: 8px;
}

.result-card {
  flex: 1;
  text-align: center;
  padding: 20px 12px;
  border-radius: var(--radius);
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.result-card.card-highlight {
  background: var(--accent-dim);
  border-color: var(--accent);
  box-shadow: 0 0 30px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.05);
}
.result-card.has-value { border-color: var(--border-bright); }
.result-card.card-highlight.has-value {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
}

.card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.card-value {
  font-family: var(--font-mono);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
}
.card-highlight .card-value { color: var(--accent-light); }

.card-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 300;
}

.result-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 0 8px;
}
.divider-line {
  width: 1px;
  height: 24px;
  background: var(--border);
}
.divider-icon {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Slot rolling animation */
.slot {
  display: inline-block;
  transition: opacity 0.05s;
}
.slot.rolling {
  animation: slot-blur 0.05s linear infinite;
}
@keyframes slot-blur {
  0%   { opacity: 1; transform: translateY(0); }
  50%  { opacity: 0.4; transform: translateY(-2px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── GAME BREAKDOWN ─────────────────────────────────── */
.game-breakdown {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 32px;
  opacity: 0.4;
  transition: opacity 0.4s;
}
.game-breakdown.revealed { opacity: 1; }

.breakdown-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.breakdown-game {
  display: flex;
  align-items: center;
  gap: 8px;
}
.breakdown-game-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}
.game-logo {
  height: 20px;
  filter: brightness(0.7);
}
.breakdown-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-light);
}
.breakdown-separator {
  width: 1px;
  height: 32px;
  background: var(--border);
  margin: 0 32px;
}

/* ── GAUGE ──────────────────────────────────────────── */
.gauge-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  opacity: 0.4;
  transition: opacity 0.4s;
}
.gauge-section.revealed { opacity: 1; }

.gauge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.gauge-label-left,
.gauge-label-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.gauge-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--text-muted);
}

.gauge-track {
  position: relative;
  height: 12px;
  background: var(--bg-elevated);
  border-radius: 100px;
  overflow: visible;
  border: 1px solid var(--border);
}

.gauge-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--arm-color), var(--hybrid-color), var(--wrist-color));
  width: 0%;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gauge-cursor {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--text-bright);
  border: 3px solid var(--bg-base);
  box-shadow: 0 0 12px rgba(0,0,0,0.5);
  left: 0%;
  transition: left 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

.gauge-zones {
  display: flex;
  position: absolute;
  left: 0; right: 0;
  top: 20px;
}
.gauge-zone {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-top: 4px;
}

.gauge-verdict {
  margin-top: 40px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  min-height: 28px;
  transition: color 0.4s;
}

/* ── ROLL BUTTON ────────────────────────────────────── */
.roll-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.btn-roll {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 280px;
  height: 64px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  overflow: hidden;
  background: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 30px var(--accent-glow), 0 0 0 1px var(--accent);
}

.btn-roll-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), #5b4fd4);
  transition: opacity 0.2s;
}
.btn-roll::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-roll:hover { transform: translateY(-2px); box-shadow: 0 8px 40px var(--accent-glow), 0 0 0 1px var(--accent-light); }
.btn-roll:hover::before { opacity: 1; }
.btn-roll:active { transform: translateY(0); }
.btn-roll:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.btn-roll-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.btn-icon {
  transition: transform 0.6s;
}
.btn-roll.rolling .btn-icon {
  animation: spin 0.4s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.roll-hint {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 300;
}
.roll-hint strong { color: var(--text-secondary); }

/* ── INFO CARDS ─────────────────────────────────────── */
.info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s, transform 0.2s;
}
.info-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.info-card-icon {
  font-size: 24px;
  margin-bottom: 10px;
}
.info-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}
.info-card-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-weight: 300;
}

/* ── FOOTER ─────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}
.footer-coffee {
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-coffee:hover { color: #f59e0b; }

/* ── HAMBURGER BUTTON (caché sur desktop) ───────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  margin-left: auto; /* pousse le bouton à droite */
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 768px) {

  /* Affiche le bouton hamburger */
  .hamburger {
    display: flex;
  }

  /* Cache les tags de jeu */
  .nav-tags { display: none; }

  /* Menu fermé par défaut sur mobile */
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background-color: rgba(13, 14, 20, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 0 24px;
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    text-align: center;
    gap: 4px;
  }

  /* Menu ouvert quand .active est ajouté par le JS */
  .nav-links.active {
    display: flex;
  }

  /* Ajuste les items dans le menu mobile */
  .nav-item {
    justify-content: center;
    padding: 4px 24px;
  }
  .nav-item a {
    font-size: 15px;
    padding: 10px 20px;
  }

  /* Cache les actions de nav (bouton coffee) sur mobile */
  .nav-actions {
    display: none;
  }

  /* Layout résultats en colonne */
  .results-panel {
    flex-direction: column;
    gap: 16px;
  }
  .result-divider {
    flex-direction: row;
    transform: none;
  }
  .divider-line {
    width: 40px; height: 1px;
  }

  .info-cards {
    grid-template-columns: 1fr;
  }

  .game-breakdown {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
  .breakdown-separator {
    width: 100%;
    height: 1px;
    margin: 0;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
