/* ──────────────────────────────────────────────────────────────────────────
   shared/theme.css — styles communs à tout le Game Center.
   Extrait du CSS dupliqué dans les 31 jeux + l'accueil.
   Un jeu peut redéfinir sa couleur d'accent via  body { --accent: #5dcaa5 }.
   ────────────────────────────────────────────────────────────────────────── */
:root {
  --bg: #1a1240;
  --accent: #a89fff;
  --txt: #fff;
}

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

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem 2.5rem;
  color: var(--txt);
  -webkit-user-select: none;
  user-select: none;
}

/* ── Bouton retour (identique dans tous les jeux) ── */
.back {
  align-self: flex-start;
  text-decoration: none;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 0.9rem;
  padding: 8px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,0.13);
  border: 1.5px solid rgba(255,255,255,0.28);
  transition: background 0.15s, transform 0.1s;
}
.back:hover { background: rgba(255,255,255,0.24); }
.back:active { transform: scale(0.96); }

/* ── Titres ── */
h1 { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 0.2rem; }
h1 span { color: var(--accent); }
.subtitle { font-size: 13px; color: rgba(255,255,255,0.45); margin-bottom: 1rem; text-align: center; }

/* ── Pills (catégories / niveaux / etc.) ── */
.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 6px;
  text-align: center;
}
.pill-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 1.2rem;
  background: rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 5px;
  justify-content: center;
  flex-wrap: wrap;
}
.pill-btn {
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-family: inherit;
}
.pill-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.pill-btn.active { color: #1a1240; background: var(--accent); }

/* ── HUD / stats ── */
.stat { text-align: center; }
.stat-val { font-size: 24px; font-weight: 700; line-height: 1; color: #fff; }
.stat-lbl { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.04em; }

/* ── Grille de réponses (quiz, tables, alphabet…) ── */
#answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 420px; }
.answer {
  border: 2px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.07);
  color: #fff;
  border-radius: 12px;
  padding: 14px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.08s;
}
.answer:active { transform: scale(0.97); }
.answer.correct { background: #5dcaa5; color: #1a1240; }
.answer.wrong   { background: #e24b4a; color: #fff; }

/* ── Barre du haut (retour + titre + sélecteur de langue) ── */
.topbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.8rem;
}
.topbar .back { margin-bottom: 0; flex-shrink: 0; }
/* Titre centré entre le bouton retour (gauche) et le sélecteur de langue (droite) */
.topbar h1 {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 1.45rem;
  margin-bottom: 0;
}
.topbar #lang-switch { flex-shrink: 0; }

@media (max-width: 380px) {
  .topbar h1 { font-size: 1.2rem; }
}

/* ── Sélecteur de langue (FR / EN / PT) ── */
.lang-switch {
  display: inline-flex;
  gap: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 4px;
}
.lang-btn {
  border: none;
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.lang-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.lang-btn.active { color: #1a1240; background: var(--accent); }
