﻿/* ============================================================
   APERITY — MODE SOLO
   Styles pour solo.html et les jeux solo
   Préfixe : .sl-* (page solo), .qe-* (quiz express)
   ============================================================ */

/* ---- PAGE LAYOUT ---- */
.sl-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 40px;
}

/* ---- HEADER ---- */
.sl-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.sl-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 18px;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.sl-back:hover { background: rgba(255,255,255,0.12); }

.sl-header h1 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.sl-header-emoji {
  font-size: 22px;
}

/* ---- SELECTION SCREEN ---- */
.sl-selection {
  flex: 1;
  padding: 24px 16px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.sl-intro {
  text-align: center;
  margin-bottom: 28px;
}

.sl-intro-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 8px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sl-intro-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* ---- GAMES GRID ---- */
.sl-games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (min-width: 500px) {
  .sl-games-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- GAME CARD ---- */
.sl-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  cursor: pointer;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
  user-select: none;
}

.sl-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--card-color, #8b5cf6) 0%, transparent 70%);
  opacity: 0.08;
  pointer-events: none;
}

.sl-card:hover:not(.sl-card-soon) {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.07);
}

.sl-card:active:not(.sl-card-soon) {
  transform: translateY(0);
}

.sl-card-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 10px;
}

.sl-card-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.sl-card-tagline {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0 0 10px;
  line-height: 1.3;
}

.sl-card-hiscore {
  font-size: 11px;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(251,191,36,0.12);
  border-radius: 20px;
  padding: 2px 8px;
  display: inline-block;
}

.sl-card-hiscore-empty {
  font-size: 11px;
  color: var(--text-muted);
}

/* ---- COMING SOON CARD ---- */
.sl-card-soon {
  opacity: 0.45;
  cursor: default;
  border-style: dashed;
}

.sl-card-soon .sl-card-icon {
  filter: grayscale(0.5);
}

.sl-soon-badge {
  font-size: 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 2px 8px;
  color: var(--text-muted);
  display: inline-block;
}

/* ---- GAME SCREEN ---- */
.sl-game-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sl-game-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.sl-game-back-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.sl-game-back-btn:hover { background: rgba(255,255,255,0.12); }

.sl-game-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.sl-game-hiscore {
  font-size: 12px;
  color: #fbbf24;
  font-weight: 600;
  white-space: nowrap;
}

#slGameContainer {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* ============================================================
   QUIZ EXPRESS (.qe-*)
   ============================================================ */

/* ---- CATEGORY SELECTION ---- */
.qe-cat-screen {
  padding: 8px 0;
}

.qe-cat-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
  text-align: center;
}

.qe-cat-sub {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 20px;
}

.qe-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

@media (min-width: 400px) {
  .qe-cat-grid { grid-template-columns: repeat(3, 1fr); }
}

.qe-cat-chip {
  padding: 9px 8px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
  line-height: 1.2;
}
.qe-cat-chip:hover { background: rgba(255,255,255,0.08); }
.qe-cat-chip.qe-cat-active {
  background: rgba(139,92,246,0.2);
  border-color: #8b5cf6;
  color: #a78bfa;
  font-weight: 600;
}

.qe-start-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.qe-start-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.qe-start-btn:active { transform: translateY(0); }

/* ---- QUESTION SCREEN ---- */
.qe-progress-bar {
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
}

.qe-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #06b6d4);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.qe-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.qe-counter {
  font-size: 12px;
  color: var(--text-muted);
}

.qe-score-live {
  font-size: 13px;
  font-weight: 700;
  color: #a78bfa;
}

.qe-question-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  margin-bottom: 14px;
}

.qe-category-badge {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.qe-difficulty {
  display: inline-flex;
  gap: 2px;
  margin-left: 8px;
}
.qe-difficulty span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}
.qe-difficulty span.active {
  background: #fbbf24;
}

.qe-question-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

/* ---- TIMER ---- */
.qe-timer-bar {
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  margin-bottom: 16px;
  overflow: hidden;
}

.qe-timer-fill {
  height: 100%;
  border-radius: 3px;
  background: #22c55e;
  transition: width 0.1s linear, background 0.3s ease;
}
.qe-timer-fill.qe-timer-warn { background: #f59e0b; }
.qe-timer-fill.qe-timer-urgent { background: #ef4444; }

/* ---- ANSWERS ---- */
.qe-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.qe-answer-btn {
  padding: 14px 10px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  position: relative;
  overflow: hidden;
}
.qe-answer-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}
.qe-answer-btn:disabled { cursor: default; }

.qe-answer-btn.qe-correct {
  background: rgba(34,197,94,0.2);
  border-color: #22c55e;
  color: #4ade80;
}
.qe-answer-btn.qe-wrong {
  background: rgba(239,68,68,0.15);
  border-color: #ef4444;
  color: #f87171;
}
.qe-answer-btn.qe-reveal-correct {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.3);
  color: #4ade80;
}

/* ---- FEEDBACK ---- */
.qe-feedback {
  text-align: center;
  margin-top: 14px;
  min-height: 28px;
}
.qe-feedback-correct {
  color: #4ade80;
  font-weight: 700;
  font-size: 15px;
}
.qe-feedback-wrong {
  color: #f87171;
  font-weight: 600;
  font-size: 14px;
}
.qe-feedback-timeout {
  color: var(--text-muted);
  font-size: 14px;
}
.qe-points-gained {
  font-size: 13px;
  color: #a78bfa;
  font-weight: 600;
}

/* ---- RESULTS SCREEN ---- */
.qe-results {
  text-align: center;
  padding: 20px 0;
}

.qe-results-icon {
  font-size: 56px;
  margin-bottom: 12px;
}

.qe-results-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 6px;
}

.qe-results-score {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 800;
  margin: 4px 0 8px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.qe-results-max {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.qe-record-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(251,191,36,0.15);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 20px;
  padding: 6px 14px;
  color: #fbbf24;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 16px;
  animation: qe-record-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes qe-record-pop {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.qe-prev-best {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ---- BREAKDOWN ---- */
.qe-breakdown {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
  text-align: left;
}

.qe-breakdown-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.qe-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.qe-breakdown-row:last-child { border-bottom: none; }

.qe-breakdown-q {
  flex: 1;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 8px;
}

.qe-breakdown-pts {
  font-weight: 700;
  white-space: nowrap;
}
.qe-breakdown-pts.correct { color: #4ade80; }
.qe-breakdown-pts.wrong { color: #f87171; }

/* ---- ACTION BUTTONS ---- */
.qe-actions {
  display: flex;
  gap: 10px;
  flex-direction: column;
}

.qe-replay-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.qe-replay-btn:hover { opacity: 0.9; transform: translateY(-1px); }

.qe-back-menu-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.qe-back-menu-btn:hover { background: rgba(255,255,255,0.05); }

/* ============================================================
   MENU.HTML — Bannière Solo
   ============================================================ */
.hub-solo-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin: 0 1.25rem 16px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  cursor: pointer;
}

.hub-solo-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139,92,246,0.08) 0%, rgba(6,182,212,0.05) 100%);
  pointer-events: none;
}

.hub-solo-banner:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(139,92,246,0.45);
  transform: translateY(-1px);
}

.hub-solo-icon {
  font-size: 30px;
  flex-shrink: 0;
}

.hub-solo-text {
  flex: 1;
  min-width: 0;
}

.hub-solo-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.hub-solo-text span {
  font-size: 12px;
  color: var(--text-muted);
}

.hub-solo-arrow {
  font-size: 18px;
  color: #a78bfa;
  font-weight: 700;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .hub-solo-banner { margin: 0 2rem 16px; }
}

@media (min-width: 1024px) {
  .hub-solo-banner { max-width: 960px; margin: 0 auto 16px; }
}

/* ============================================================
   MOTUS (.mt-*)
   ============================================================ */

.mt-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.mt-row {
  display: flex;
  gap: 5px;
}

.mt-cell {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.12);
  color: var(--text-primary);
  text-transform: uppercase;
  transition: transform 0.15s ease, background 0.3s ease, border-color 0.3s ease;
}

@media (max-width: 400px) {
  .mt-cell { width: 46px; height: 46px; font-size: 20px; }
}

.mt-cell.mt-active {
  border-color: rgba(255,255,255,0.35);
}

.mt-cell.mt-filled {
  transform: scale(1.05);
}

.mt-cell.mt-correct {
  background: rgba(34,197,94,0.35);
  border-color: #22c55e;
  color: #4ade80;
  animation: mt-flip 0.4s ease;
}

.mt-cell.mt-present {
  background: rgba(251,191,36,0.3);
  border-color: #fbbf24;
  color: #fde68a;
  animation: mt-flip 0.4s ease;
}

.mt-cell.mt-absent {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.06);
  color: var(--text-muted);
  animation: mt-flip 0.4s ease;
}

.mt-cell.mt-hint {
  background: rgba(34,197,94,0.2);
  border-color: rgba(34,197,94,0.4);
  color: #4ade80;
}

@keyframes mt-flip {
  0% { transform: scaleY(0); }
  50% { transform: scaleY(0); }
  100% { transform: scaleY(1); }
}

/* Keyboard */
.mt-keyboard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
}

.mt-kb-row {
  display: flex;
  gap: 4px;
}

.mt-key {
  min-width: 30px;
  height: 42px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), transform var(--transition-fast);
  user-select: none;
}

.mt-key:hover { background: rgba(255,255,255,0.14); }
.mt-key:active { transform: scale(0.93); }

.mt-key-wide { min-width: 48px; font-size: 16px; }

.mt-key.mt-key-correct {
  background: rgba(34,197,94,0.35);
  border-color: #22c55e;
  color: #4ade80;
}
.mt-key.mt-key-present {
  background: rgba(251,191,36,0.3);
  border-color: #fbbf24;
  color: #fde68a;
}
.mt-key.mt-key-absent {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.25);
}

/* Message */
.mt-message {
  text-align: center;
  min-height: 32px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.mt-message-error {
  color: #f87171;
  font-weight: 600;
  animation: mt-shake 0.3s ease;
}

@keyframes mt-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.mt-message-win {
  color: #4ade80;
  font-weight: 700;
  font-size: 16px;
}

.mt-message-lose {
  color: #f87171;
  font-weight: 600;
}

.mt-word-reveal {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 4px;
  margin-top: 6px;
}

/* ============================================================
   QUI VEUT DES GORGÉES (.qv-*)
   ============================================================ */

/* Intro screen */
.qv-intro {
  text-align: center;
  padding: 24px 0;
}

.qv-intro-icon {
  font-size: 64px;
  margin-bottom: 12px;
  animation: qv-glow 2s ease-in-out infinite alternate;
}

@keyframes qv-glow {
  from { filter: brightness(1); }
  to { filter: brightness(1.3); }
}

.qv-intro-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.qv-intro-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.qv-intro-start {
  width: 100%;
  max-width: 300px;
  padding: 14px;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  border: none;
  border-radius: var(--radius-md);
  color: #1a1a2e;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.qv-intro-start:hover { opacity: 0.9; transform: translateY(-1px); }

/* Layout principal */
.qv-game-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Jokers bar */
.qv-jokers {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}

.qv-joker-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.qv-joker-btn:hover:not(:disabled) { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.qv-joker-btn:disabled {
  opacity: 0.3;
  cursor: default;
  border-style: dashed;
}
.qv-joker-btn .qv-joker-icon { font-size: 16px; }

/* Pyramid / ladder */
.qv-pyramid {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: 10px;
  max-height: 260px;
  overflow-y: auto;
}

.qv-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.qv-step-num { font-weight: 600; min-width: 24px; }
.qv-step-value { font-weight: 700; }

.qv-step.qv-step-milestone {
  border: 1px solid rgba(251,191,36,0.25);
  background: rgba(251,191,36,0.06);
  color: #fbbf24;
}

.qv-step.qv-step-current {
  background: rgba(139,92,246,0.2);
  border: 1px solid #8b5cf6;
  color: #a78bfa;
  font-weight: 700;
}

.qv-step.qv-step-done {
  color: rgba(255,255,255,0.3);
}

/* Question card */
.qv-question-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  margin-bottom: 10px;
}

.qv-q-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.qv-q-number {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.qv-q-value {
  font-size: 13px;
  font-weight: 700;
  color: #fbbf24;
}

.qv-q-text {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

/* Answers */
.qv-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.qv-answer-btn {
  padding: 14px 10px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  transition: all var(--transition-fast);
  position: relative;
}
.qv-answer-btn:hover:not(:disabled):not(.qv-selected) {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}
.qv-answer-btn:disabled { cursor: default; }

.qv-answer-btn.qv-selected {
  background: rgba(139,92,246,0.25);
  border-color: #8b5cf6;
  color: #c4b5fd;
}

.qv-answer-btn.qv-correct {
  background: rgba(34,197,94,0.25);
  border-color: #22c55e;
  color: #4ade80;
}

.qv-answer-btn.qv-wrong {
  background: rgba(239,68,68,0.2);
  border-color: #ef4444;
  color: #f87171;
}

.qv-answer-btn.qv-eliminated {
  opacity: 0.2;
  pointer-events: none;
  border-style: dashed;
}

/* Suspense animation */
.qv-answer-btn.qv-suspense {
  animation: qv-pulse 0.6s ease-in-out infinite alternate;
}
@keyframes qv-pulse {
  from { border-color: #8b5cf6; box-shadow: 0 0 8px rgba(139,92,246,0.3); }
  to { border-color: #c4b5fd; box-shadow: 0 0 20px rgba(139,92,246,0.5); }
}

/* Public opinion chart */
.qv-public {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.06);
}

.qv-pub-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.qv-pub-fill-wrap {
  width: 100%;
  height: 60px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.qv-pub-fill {
  width: 100%;
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
  border-radius: 4px 4px 0 0;
  transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.qv-pub-pct {
  font-size: 13px;
  font-weight: 700;
  color: #a78bfa;
}

.qv-pub-label {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Action buttons */
.qv-actions {
  display: flex;
  gap: 8px;
}

.qv-confirm-btn {
  flex: 1;
  padding: 14px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.qv-confirm-btn:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.qv-confirm-btn:disabled { opacity: 0.3; cursor: default; }

.qv-cashout-btn {
  padding: 14px 18px;
  background: rgba(251,191,36,0.12);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: var(--radius-md);
  color: #fbbf24;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.qv-cashout-btn:hover { background: rgba(251,191,36,0.2); border-color: #fbbf24; }

/* Game over / Win */
.qv-result {
  text-align: center;
  padding: 20px 0;
}

.qv-result-icon {
  font-size: 56px;
  margin-bottom: 10px;
}

.qv-result-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px;
}

.qv-result-reason {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.qv-result-score {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  margin: 8px 0;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.qv-result-max {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.qv-milestone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(251,191,36,0.15);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 20px;
  padding: 6px 14px;
  color: #fbbf24;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ============================================================
   EMOJI DEVINETTE (.ed-*)
   ============================================================ */

.ed-cat-screen { padding: 8px 0; }

.ed-cat-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
  text-align: center;
}

.ed-cat-sub {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 20px;
}

.ed-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
@media (min-width: 400px) {
  .ed-cat-grid { grid-template-columns: repeat(3, 1fr); }
}

.ed-cat-chip {
  padding: 9px 8px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
  line-height: 1.2;
}
.ed-cat-chip:hover { background: rgba(255,255,255,0.08); }
.ed-cat-chip.ed-cat-active {
  background: rgba(236,72,153,0.2);
  border-color: #ec4899;
  color: #f472b6;
  font-weight: 600;
}

/* Question */
.ed-progress-bar {
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
}
.ed-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ec4899, #f97316);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.ed-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.ed-counter { font-size: 12px; color: var(--text-muted); }
.ed-score-live { font-size: 13px; font-weight: 700; color: #f472b6; }

.ed-emoji-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  margin-bottom: 14px;
  text-align: center;
}

.ed-category-badge {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.ed-emoji-display {
  font-size: 56px;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: 4px;
  animation: ed-emoji-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes ed-emoji-pop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.ed-emoji-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* Timer */
.ed-timer-bar {
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  margin-bottom: 16px;
  overflow: hidden;
}
.ed-timer-fill {
  height: 100%;
  border-radius: 3px;
  background: #22c55e;
  transition: width 0.1s linear, background 0.3s ease;
}
.ed-timer-fill.ed-timer-warn { background: #f59e0b; }
.ed-timer-fill.ed-timer-urgent { background: #ef4444; }

/* Answers */
.ed-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ed-answer-btn {
  padding: 14px 10px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  transition: all var(--transition-fast);
}
.ed-answer-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}
.ed-answer-btn:disabled { cursor: default; }
.ed-answer-btn.ed-correct {
  background: rgba(34,197,94,0.2);
  border-color: #22c55e;
  color: #4ade80;
}
.ed-answer-btn.ed-wrong {
  background: rgba(239,68,68,0.15);
  border-color: #ef4444;
  color: #f87171;
}

/* Feedback */
.ed-feedback {
  text-align: center;
  margin-top: 14px;
  min-height: 28px;
}
.ed-feedback-correct { color: #4ade80; font-weight: 700; font-size: 15px; }
.ed-feedback-wrong { color: #f87171; font-weight: 600; font-size: 14px; }
.ed-feedback-timeout { color: var(--text-muted); font-size: 14px; }
.ed-points-gained { font-size: 13px; color: #f472b6; font-weight: 600; }

/* Breakdown */
.ed-breakdown {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
  text-align: left;
}
.ed-breakdown-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ed-breakdown-row:last-child { border-bottom: none; }
.ed-breakdown-emoji { font-size: 18px; flex-shrink: 0; }
.ed-breakdown-answer {
  flex: 1;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   VRAI OU FAUX (.vf-*)
   ============================================================ */

.vf-cat-screen { padding: 8px 0; }

.vf-cat-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
  text-align: center;
}

.vf-cat-sub {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 20px;
}

.vf-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
@media (min-width: 400px) {
  .vf-cat-grid { grid-template-columns: repeat(3, 1fr); }
}

.vf-cat-chip {
  padding: 9px 8px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
  line-height: 1.2;
}
.vf-cat-chip:hover { background: rgba(255,255,255,0.08); }
.vf-cat-chip.vf-cat-active {
  background: rgba(59,130,246,0.2);
  border-color: #3b82f6;
  color: #60a5fa;
  font-weight: 600;
}

/* Progress */
.vf-progress-bar {
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
}
.vf-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.vf-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}
.vf-counter { font-size: 12px; color: var(--text-muted); }
.vf-score-live { font-size: 13px; font-weight: 700; color: #60a5fa; flex: 1; text-align: right; }

.vf-streak-badge {
  font-size: 12px;
  font-weight: 700;
  color: #f97316;
  background: rgba(249,115,22,0.15);
  border-radius: 20px;
  padding: 2px 10px;
  animation: vf-streak-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes vf-streak-pop {
  from { transform: scale(0.7); }
  to { transform: scale(1); }
}

/* Statement card */
.vf-statement-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  margin-bottom: 14px;
  text-align: center;
}

.vf-category-badge {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.vf-statement-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

/* Timer */
.vf-timer-bar {
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  margin-bottom: 16px;
  overflow: hidden;
}
.vf-timer-fill {
  height: 100%;
  border-radius: 3px;
  background: #22c55e;
  transition: width 0.1s linear, background 0.3s ease;
}
.vf-timer-fill.vf-timer-warn { background: #f59e0b; }
.vf-timer-fill.vf-timer-urgent { background: #ef4444; }

/* Choices (big buttons) */
.vf-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.vf-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.vf-choice-icon { font-size: 32px; }
.vf-choice-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.vf-choice-vrai:hover:not(:disabled) {
  background: rgba(34,197,94,0.12);
  border-color: #22c55e;
}
.vf-choice-faux:hover:not(:disabled) {
  background: rgba(239,68,68,0.12);
  border-color: #ef4444;
}
.vf-choice-btn:disabled { cursor: default; }

.vf-choice-btn.vf-correct-choice {
  background: rgba(34,197,94,0.2);
  border-color: #22c55e;
}
.vf-choice-btn.vf-correct-choice .vf-choice-label { color: #4ade80; }

.vf-choice-btn.vf-wrong-choice {
  background: rgba(239,68,68,0.15);
  border-color: #ef4444;
}
.vf-choice-btn.vf-wrong-choice .vf-choice-label { color: #f87171; }

/* Feedback */
.vf-feedback {
  text-align: center;
  min-height: 60px;
}
.vf-feedback-correct { color: #4ade80; font-weight: 700; font-size: 15px; }
.vf-feedback-wrong { color: #f87171; font-weight: 600; font-size: 14px; }
.vf-feedback-timeout { color: var(--text-muted); font-size: 14px; }
.vf-points-gained { font-size: 13px; color: #60a5fa; font-weight: 600; margin-left: 6px; }

.vf-streak-bonus {
  font-size: 13px;
  color: #f97316;
  font-weight: 700;
  margin-top: 4px;
  animation: vf-streak-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vf-explanation {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  line-height: 1.4;
}

/* Stats */
.vf-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 12px 0 16px;
}
.vf-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.vf-stat-value { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.vf-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }

/* Breakdown */
.vf-breakdown {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
  text-align: left;
  max-height: 300px;
  overflow-y: auto;
}
.vf-breakdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.vf-breakdown-row:last-child { border-bottom: none; }
.vf-breakdown-icon { font-size: 14px; flex-shrink: 0; }
.vf-breakdown-text {
  flex: 1;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vf-breakdown-truth {
  font-weight: 700;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ============================================================
   CALCUL MENTAL (.cm-*)
   ============================================================ */

/* Intro */
.cm-intro {
  text-align: center;
  padding: 16px 0;
}
.cm-intro-icon { font-size: 56px; margin-bottom: 12px; }
.cm-intro-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #22c55e, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cm-intro-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}
.cm-level-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}
.cm-level-tag {
  font-size: 11px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  color: var(--text-muted);
}

/* Game layout */
.cm-game {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cm-top-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cm-timer-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 3px solid #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.3s ease;
}

.cm-timer-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #4ade80;
  transition: color 0.3s ease;
}
.cm-timer-value.cm-timer-warn { color: #f59e0b; }
.cm-timer-value.cm-timer-warn ~ .cm-timer-circle,
.cm-timer-warn { border-color: #f59e0b !important; color: #f59e0b; }
.cm-timer-value.cm-timer-urgent { color: #ef4444; }
.cm-timer-urgent { border-color: #ef4444 !important; color: #ef4444; }

.cm-score-display {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cm-score-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #4ade80;
}
.cm-combo-badge {
  font-size: 12px;
  font-weight: 700;
  color: #f97316;
  animation: cm-combo-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cm-combo-pop {
  from { transform: scale(0.7); }
  to { transform: scale(1); }
}

.cm-level-badge {
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  color: #4ade80;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Timer bar */
.cm-timer-bar {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.cm-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #06b6d4);
  border-radius: 2px;
  transition: width 0.1s linear;
}

/* Problem card */
.cm-problem-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 28px 16px;
  text-align: center;
}

.cm-problem-text {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 2px;
  animation: cm-problem-in 0.25s ease;
}
@keyframes cm-problem-in {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Input area */
.cm-input-area {
  display: flex;
  gap: 8px;
}

.cm-input {
  flex: 1;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.15);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color var(--transition-fast);
  -moz-appearance: textfield;
}
.cm-input::-webkit-outer-spin-button,
.cm-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.cm-input:focus {
  border-color: #22c55e;
}

.cm-submit-btn {
  padding: 14px 24px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #22c55e, #06b6d4);
  border: none;
  color: white;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  flex-shrink: 0;
}
.cm-submit-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.cm-submit-btn:active { transform: translateY(0); }

/* Numpad */
.cm-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-width: 300px;
  margin: 0 auto;
}

.cm-num-btn {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}
.cm-num-btn:hover { background: rgba(255,255,255,0.12); }
.cm-num-btn:active { transform: scale(0.95); }
.cm-num-minus { color: #f87171; }
.cm-num-del { color: var(--text-muted); font-size: 18px; }

/* Feedback flash */
.cm-feedback {
  text-align: center;
  min-height: 24px;
}
.cm-fb-correct {
  color: #4ade80;
  font-weight: 700;
  font-size: 16px;
  animation: cm-fb-pop 0.3s ease;
}
.cm-fb-wrong {
  color: #f87171;
  font-weight: 600;
  font-size: 14px;
  animation: cm-fb-shake 0.3s ease;
}
@keyframes cm-fb-pop {
  from { transform: scale(1.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes cm-fb-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Stats bar */
.cm-stats-bar {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Result stats */
.cm-result-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 12px 0 16px;
}
.cm-result-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
}
.cm-result-stat-value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}
.cm-result-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════
   MOT DE PASSE (.mp-*)
   Couleur: #f97316 (orange)
   ══════════════════════════════════════════════ */

/* Category screen */
.mp-cat-screen { display: flex; flex-direction: column; align-items: center; padding: 2rem 1rem; gap: 1rem; }
.mp-cat-title { font-family: var(--font-display); font-size: 1.6rem; background: linear-gradient(135deg, #f97316, #fbbf24); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.mp-cat-sub { color: var(--text-secondary); font-size: 0.9rem; }
.mp-cat-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; max-width: 500px; }
.mp-cat-chip { padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: var(--text-secondary); font-size: 0.85rem; cursor: pointer; transition: all 0.2s; }
.mp-cat-chip:hover { background: rgba(249,115,22,0.1); border-color: rgba(249,115,22,0.3); }
.mp-cat-active { background: rgba(249,115,22,0.2) !important; border-color: #f97316 !important; color: #fb923c !important; }

/* Intro */
.mp-intro { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1.5rem; gap: 1rem; text-align: center; min-height: 400px; }
.mp-intro-icon { font-size: 3.5rem; }
.mp-intro-title { font-family: var(--font-display); font-size: 1.8rem; background: linear-gradient(135deg, #f97316, #fbbf24); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.mp-intro-sub { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }
.mp-start-btn { padding: 0.8rem 2.5rem; border-radius: 12px; border: none; background: linear-gradient(135deg, #f97316, #fb923c); color: #fff; font-size: 1rem; font-weight: 600; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.mp-start-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(249,115,22,0.3); }

/* Game meta */
.mp-meta { display: flex; justify-content: space-between; align-items: center; padding: 0 0.5rem 0.5rem; gap: 0.5rem; }
.mp-round-num { font-size: 0.85rem; color: var(--text-secondary); }
.mp-score { font-family: var(--font-display); font-size: 1rem; color: #fb923c; }
.mp-streak { font-size: 0.8rem; color: #fbbf24; background: rgba(251,191,36,0.1); padding: 0.2rem 0.6rem; border-radius: 999px; }

/* Clue timer bar */
.mp-clue-timer-bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; margin-bottom: 0.75rem; overflow: hidden; }
.mp-clue-timer-fill { height: 100%; background: linear-gradient(90deg, #f97316, #fbbf24); border-radius: 2px; transition: width 0.05s linear; }

/* Points hint */
.mp-points-hint { display: flex; justify-content: space-between; padding: 0 0.5rem; margin-bottom: 0.5rem; }
.mp-points-indicator { font-size: 0.8rem; color: #fb923c; font-weight: 600; }
.mp-clues-count { font-size: 0.8rem; color: var(--text-muted); }

/* Clue card */
.mp-clue-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 1rem; margin-bottom: 1rem; min-height: 180px; }
.mp-clue-item { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.mp-clue-item:last-child { border-bottom: none; }
.mp-clue-num { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: rgba(249,115,22,0.15); color: #fb923c; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.mp-clue-text { font-size: 0.95rem; color: var(--text-primary); line-height: 1.4; }
.mp-clue-new { animation: mp-clue-in 0.4s ease-out; }
@keyframes mp-clue-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

/* Letter hint */
.mp-letter-hint { margin-top: 0.75rem; text-align: center; font-family: var(--font-display); font-size: 1.4rem; letter-spacing: 4px; color: #fb923c; background: rgba(249,115,22,0.08); padding: 0.5rem; border-radius: 8px; }

/* Theme hint */
.mp-theme-hint { font-size: 0.85rem; color: #fbbf24; background: rgba(251,191,36,0.1); padding: 0.3rem 0.8rem; border-radius: 8px; margin-bottom: 0.5rem; display: inline-block; animation: mp-clue-in 0.3s ease-out; }

/* Input area */
.mp-input-area { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.mp-input { flex: 1; padding: 0.75rem 1rem; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: var(--text-primary); font-size: 1rem; outline: none; transition: border-color 0.2s; }
.mp-input:focus { border-color: #f97316; box-shadow: 0 0 0 3px rgba(249,115,22,0.15); }
.mp-validate-btn { padding: 0.75rem 1.2rem; border-radius: 12px; border: none; background: linear-gradient(135deg, #f97316, #fb923c); color: #fff; font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: transform 0.2s; white-space: nowrap; }
.mp-validate-btn:hover { transform: translateY(-1px); }

/* Jokers */
.mp-jokers { display: flex; gap: 0.5rem; justify-content: center; }
.mp-joker-btn { flex: 1; padding: 0.6rem; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: var(--text-primary); font-size: 0.8rem; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 0.3rem; }
.mp-joker-btn:hover:not(:disabled) { background: rgba(249,115,22,0.1); border-color: rgba(249,115,22,0.3); }
.mp-joker-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.mp-joker-icon { font-size: 1rem; }

/* Feedback overlay */
.mp-feedback-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); z-index: 10; animation: mp-fade-in 0.3s; border-radius: 16px; }
@keyframes mp-fade-in { from { opacity: 0; } to { opacity: 1; } }
.mp-feedback { text-align: center; padding: 2rem; }
.mp-feedback-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.mp-feedback-word { font-family: var(--font-display); font-size: 1.4rem; color: var(--text-primary); margin: 0.3rem 0; }
.mp-feedback-text { font-size: 0.9rem; color: var(--text-secondary); }
.mp-feedback-pts { font-size: 1rem; font-weight: 600; margin-top: 0.3rem; }
.mp-feedback-correct .mp-feedback-pts { color: #4ade80; }
.mp-feedback-wrong .mp-feedback-pts { color: #f87171; }
.mp-feedback-skip .mp-feedback-pts { color: var(--text-muted); }
.mp-feedback-streak { color: #fbbf24; font-size: 0.9rem; margin-top: 0.3rem; }

/* Results */
.mp-result { display: flex; flex-direction: column; align-items: center; padding: 1.5rem 1rem; gap: 0.75rem; }
.mp-result-icon { font-size: 3rem; }
.mp-result-title { font-family: var(--font-display); font-size: 1.4rem; color: var(--text-primary); }
.mp-result-score { font-family: var(--font-display); font-size: 2.2rem; background: linear-gradient(135deg, #f97316, #fbbf24); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.mp-result-stats { display: flex; gap: 1.5rem; margin: 0.5rem 0; }
.mp-stat { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.mp-stat-val { font-family: var(--font-display); font-size: 1.2rem; color: var(--text-primary); }
.mp-stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.mp-breakdown { width: 100%; max-width: 450px; max-height: 250px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.mp-bd-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.6rem; border-radius: 8px; font-size: 0.8rem; background: rgba(255,255,255,0.03); }
.mp-bd-correct { border-left: 3px solid #4ade80; }
.mp-bd-wrong { border-left: 3px solid #f87171; opacity: 0.7; }
.mp-bd-icon { flex-shrink: 0; }
.mp-bd-word { flex: 1; color: var(--text-primary); font-weight: 500; }
.mp-bd-clues { color: var(--text-muted); font-size: 0.75rem; }
.mp-bd-pts { color: var(--text-secondary); font-weight: 600; white-space: nowrap; }

/* ══════════════════════════════════════════════
   REFLEXE (.rf-*)
   Couleur: #ef4444 (rouge)
   ══════════════════════════════════════════════ */

/* Intro */
.rf-intro { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1.5rem; gap: 1rem; text-align: center; min-height: 400px; }
.rf-intro-icon { font-size: 3.5rem; }
.rf-intro-title { font-family: var(--font-display); font-size: 1.8rem; background: linear-gradient(135deg, #ef4444, #f97316); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.rf-intro-sub { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }
.rf-intro-types { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.5rem 0; text-align: left; }
.rf-type-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--text-secondary); }
.rf-type-icon { font-size: 1.2rem; }
.rf-start-btn { padding: 0.8rem 2.5rem; border-radius: 12px; border: none; background: linear-gradient(135deg, #ef4444, #f97316); color: #fff; font-size: 1rem; font-weight: 600; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.rf-start-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(239,68,68,0.3); }

/* Meta */
.rf-meta { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem; gap: 0.5rem; }
.rf-round-num { font-size: 0.85rem; color: var(--text-secondary); }
.rf-score { font-family: var(--font-display); font-size: 1rem; color: #f87171; }
.rf-combo { font-size: 0.8rem; color: #fbbf24; background: rgba(251,191,36,0.1); padding: 0.2rem 0.6rem; border-radius: 999px; }

/* Color tap */
.rf-colortap { display: flex; align-items: center; justify-content: center; min-height: 350px; border-radius: 20px; cursor: pointer; transition: background 0.15s; user-select: none; -webkit-tap-highlight-color: transparent; }
.rf-wait { background: rgba(239,68,68,0.12); border: 2px solid rgba(239,68,68,0.2); }
.rf-go { background: rgba(34,197,94,0.2); border: 2px solid rgba(34,197,94,0.4); animation: rf-flash 0.15s ease-out; }
@keyframes rf-flash { from { transform: scale(0.95); } to { transform: scale(1); } }
.rf-colortap-text { font-family: var(--font-display); font-size: 2rem; color: var(--text-primary); pointer-events: none; }
.rf-wait .rf-colortap-text { color: #f87171; }
.rf-go .rf-colortap-text { color: #4ade80; font-size: 2.5rem; }

/* Find different */
.rf-find-challenge { display: flex; flex-direction: column; align-items: center; padding: 1rem; gap: 1rem; }
.rf-find-title { color: var(--text-secondary); font-size: 1rem; }
.rf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; }
.rf-grid-item { width: 80px; height: 80px; font-size: 2.5rem; border-radius: 16px; border: 2px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; -webkit-tap-highlight-color: transparent; }
.rf-grid-item:hover { background: rgba(255,255,255,0.08); transform: scale(1.05); }
.rf-grid-correct { border-color: #4ade80 !important; background: rgba(34,197,94,0.15) !important; }
.rf-grid-wrong { border-color: #ef4444 !important; background: rgba(239,68,68,0.15) !important; }

/* Math flash */
.rf-math-challenge { display: flex; flex-direction: column; align-items: center; padding: 2rem 1rem; gap: 1.5rem; }
.rf-math-number { font-family: var(--font-display); font-size: 3rem; color: var(--text-primary); }
.rf-math-question { color: var(--text-secondary); font-size: 1.1rem; }
.rf-math-choices { display: flex; gap: 1rem; }
.rf-math-btn { padding: 1.2rem 2.5rem; border-radius: 16px; border: 2px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: var(--text-primary); font-size: 1.3rem; font-weight: 600; cursor: pointer; transition: all 0.15s; min-width: 120px; -webkit-tap-highlight-color: transparent; }
.rf-math-btn:hover { background: rgba(255,255,255,0.08); transform: scale(1.03); }
.rf-btn-correct { border-color: #4ade80 !important; background: rgba(34,197,94,0.15) !important; }
.rf-btn-wrong { border-color: #ef4444 !important; background: rgba(239,68,68,0.15) !important; }

/* Feedback overlay */
.rf-feedback-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 10; animation: mp-fade-in 0.2s; border-radius: 16px; }
.rf-feedback { text-align: center; padding: 1.5rem; }
.rf-feedback-icon { font-size: 2.5rem; margin-bottom: 0.3rem; }
.rf-feedback-ms { font-family: var(--font-display); font-size: 1.8rem; color: var(--text-primary); }
.rf-feedback-text { font-size: 1.2rem; color: var(--text-primary); }
.rf-feedback-pts { font-size: 1rem; font-weight: 600; margin-top: 0.2rem; }
.rf-feedback-fast .rf-feedback-ms { color: #4ade80; }
.rf-feedback-fast .rf-feedback-pts { color: #4ade80; }
.rf-feedback-good .rf-feedback-ms { color: #fbbf24; }
.rf-feedback-good .rf-feedback-pts { color: #fbbf24; }
.rf-feedback-slow .rf-feedback-ms { color: #f97316; }
.rf-feedback-slow .rf-feedback-pts { color: #f97316; }
.rf-feedback-error .rf-feedback-pts { color: #f87171; }

/* Results */
.rf-result { display: flex; flex-direction: column; align-items: center; padding: 1.5rem 1rem; gap: 0.75rem; }
.rf-result-icon { font-size: 3rem; }
.rf-result-title { font-family: var(--font-display); font-size: 1.4rem; color: var(--text-primary); }
.rf-result-score { font-family: var(--font-display); font-size: 2.2rem; background: linear-gradient(135deg, #ef4444, #f97316); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.rf-result-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 0.5rem 0; }
.rf-stat { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.rf-stat-val { font-family: var(--font-display); font-size: 1.1rem; color: var(--text-primary); }
.rf-stat-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; text-align: center; }
.rf-breakdown { width: 100%; max-width: 400px; max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.rf-bd-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.6rem; border-radius: 8px; font-size: 0.8rem; background: rgba(255,255,255,0.03); }
.rf-bd-correct { border-left: 3px solid #4ade80; }
.rf-bd-wrong { border-left: 3px solid #f87171; opacity: 0.7; }
.rf-bd-type { flex-shrink: 0; }
.rf-bd-time { flex: 1; color: var(--text-secondary); }
.rf-bd-pts { color: var(--text-secondary); font-weight: 600; }

/* ══════════════════════════════════════════════
   ANAGRAMME (.ag-*)
   Couleur: #14b8a6 (teal)
   ══════════════════════════════════════════════ */

/* Intro */
.ag-intro { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1.5rem; gap: 1rem; text-align: center; min-height: 400px; }
.ag-intro-icon { font-size: 3.5rem; }
.ag-intro-title { font-family: var(--font-display); font-size: 1.8rem; background: linear-gradient(135deg, #14b8a6, #06b6d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.ag-intro-sub { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }
.ag-start-btn { padding: 0.8rem 2.5rem; border-radius: 12px; border: none; background: linear-gradient(135deg, #14b8a6, #06b6d4); color: #fff; font-size: 1rem; font-weight: 600; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.ag-start-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(20,184,166,0.3); }

/* Meta */
.ag-meta { display: flex; justify-content: space-between; align-items: center; padding: 0 0.5rem 0.5rem; gap: 0.5rem; }
.ag-round-num { font-size: 0.85rem; color: var(--text-secondary); }
.ag-score { font-family: var(--font-display); font-size: 1rem; color: #2dd4bf; }
.ag-timer-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }

/* Timer bar */
.ag-timer-bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; margin-bottom: 0.75rem; overflow: hidden; }
.ag-timer-fill { height: 100%; background: linear-gradient(90deg, #14b8a6, #06b6d4); border-radius: 2px; transition: width 1s linear; }
.ag-timer-urgent { background: linear-gradient(90deg, #ef4444, #f97316) !important; }

/* Word info */
.ag-word-info { text-align: center; margin-bottom: 0.5rem; }
.ag-word-length { font-size: 0.85rem; color: var(--text-muted); }

/* Answer slots */
.ag-answer-slots { display: flex; justify-content: center; gap: 6px; margin-bottom: 1.5rem; padding: 0.5rem; }
.ag-slot { width: 44px; height: 52px; border-radius: 10px; border: 2px dashed rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: transparent; transition: all 0.15s; }
.ag-slot-filled { border-style: solid; border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.06); color: var(--text-primary); cursor: pointer; animation: ag-slot-in 0.15s ease-out; }
.ag-slot-filled:hover { background: rgba(255,255,255,0.1); transform: scale(1.05); }
.ag-slot-hint { border-color: #14b8a6 !important; background: rgba(20,184,166,0.12) !important; color: #2dd4bf !important; cursor: default !important; }
.ag-slot-hint:hover { transform: none !important; }
@keyframes ag-slot-in { from { transform: translateY(-8px); opacity: 0.5; } to { transform: translateY(0); opacity: 1; } }

/* Scrambled tiles */
.ag-scrambled { display: flex; justify-content: center; gap: 6px; margin-bottom: 1.5rem; flex-wrap: wrap; padding: 0.5rem; }
.ag-tile { width: 48px; height: 52px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--text-primary); cursor: pointer; transition: all 0.15s; -webkit-tap-highlight-color: transparent; }
.ag-tile:hover:not(:disabled) { background: rgba(20,184,166,0.12); border-color: rgba(20,184,166,0.3); transform: translateY(-3px); }
.ag-tile-used { opacity: 0.15; pointer-events: none; transform: scale(0.9); }
.ag-tile-hint { border-color: #14b8a6; background: rgba(20,184,166,0.12); color: #2dd4bf; }

/* Action buttons */
.ag-actions { display: flex; gap: 0.5rem; padding: 0 0.5rem; }
.ag-hint-btn { flex: 1; padding: 0.65rem; border-radius: 10px; border: 1px solid rgba(20,184,166,0.3); background: rgba(20,184,166,0.08); color: #2dd4bf; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.ag-hint-btn:hover:not(:disabled) { background: rgba(20,184,166,0.15); }
.ag-hint-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.ag-clear-btn { flex: 0.6; padding: 0.65rem; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: var(--text-secondary); font-size: 0.85rem; cursor: pointer; transition: all 0.2s; }
.ag-clear-btn:hover { background: rgba(255,255,255,0.08); }
.ag-validate-btn { flex: 1; padding: 0.65rem; border-radius: 10px; border: none; background: linear-gradient(135deg, #14b8a6, #06b6d4); color: #fff; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.ag-validate-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(20,184,166,0.25); }
.ag-validate-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Feedback overlay */
.ag-feedback-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); z-index: 10; animation: mp-fade-in 0.3s; border-radius: 16px; }
.ag-feedback { text-align: center; padding: 2rem; }
.ag-feedback-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.ag-feedback-word { font-family: var(--font-display); font-size: 1.4rem; color: var(--text-primary); margin: 0.3rem 0; letter-spacing: 2px; }
.ag-feedback-text { font-size: 0.9rem; color: var(--text-secondary); }
.ag-feedback-pts { font-size: 1rem; font-weight: 600; margin-top: 0.3rem; }
.ag-feedback-correct .ag-feedback-pts { color: #2dd4bf; }
.ag-feedback-wrong .ag-feedback-pts { color: #f87171; }

/* Results */
.ag-result { display: flex; flex-direction: column; align-items: center; padding: 1.5rem 1rem; gap: 0.75rem; }
.ag-result-icon { font-size: 3rem; }
.ag-result-title { font-family: var(--font-display); font-size: 1.4rem; color: var(--text-primary); }
.ag-result-score { font-family: var(--font-display); font-size: 2.2rem; background: linear-gradient(135deg, #14b8a6, #06b6d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.ag-result-sub { color: var(--text-secondary); font-size: 0.9rem; }
.ag-breakdown { width: 100%; max-width: 400px; max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.ag-bd-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.6rem; border-radius: 8px; font-size: 0.8rem; background: rgba(255,255,255,0.03); }
.ag-bd-correct { border-left: 3px solid #2dd4bf; }
.ag-bd-wrong { border-left: 3px solid #f87171; opacity: 0.7; }
.ag-bd-word { flex: 1; color: var(--text-primary); font-weight: 500; letter-spacing: 1px; }
.ag-bd-time { color: var(--text-muted); font-size: 0.75rem; }
.ag-bd-pts { color: var(--text-secondary); font-weight: 600; white-space: nowrap; }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 400px) {
  .rf-grid-item { width: 65px; height: 65px; font-size: 2rem; }
  .rf-math-btn { padding: 1rem 1.5rem; font-size: 1.1rem; min-width: 90px; }
  .rf-result-stats { grid-template-columns: repeat(2, 1fr); }
  .ag-tile, .ag-slot { width: 38px; height: 44px; font-size: 1.1rem; }
  .mp-joker-btn { font-size: 0.7rem; padding: 0.5rem 0.3rem; }
}

/* ============================================================
   PENDU - prefixe .pd-*
   ============================================================ */
.pd-game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}
.pd-hangman {
  width: 200px;
  max-width: 60vw;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}
.pd-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.75));
}
.pd-errors strong { color: #ef4444; }
.pd-word {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 0.75rem 0;
  font-family: ui-monospace, "Courier New", monospace;
}
.pd-letter {
  width: 2.2rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary, #fff);
  border-bottom: 3px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px 4px 0 0;
  transition: background 0.2s;
}
.pd-letter-shown {
  background: rgba(34, 197, 94, 0.15);
  border-bottom-color: #22c55e;
  animation: pdLetterReveal 0.3s ease-out;
}
@keyframes pdLetterReveal {
  from { transform: scale(0.5) rotate(-10deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}
.pd-keyboard {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.75rem;
  width: 100%;
  max-width: 480px;
}
.pd-keyboard-row {
  display: flex;
  gap: 0.3rem;
  justify-content: center;
}
.pd-key {
  flex: 1;
  min-width: 1.8rem;
  max-width: 2.5rem;
  aspect-ratio: 1 / 1.2;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary, #fff);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.pd-key:not(:disabled):hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
}
.pd-key:active { transform: scale(0.92); }
.pd-key-correct {
  background: rgba(34, 197, 94, 0.25) !important;
  border-color: rgba(34, 197, 94, 0.5) !important;
  color: #4ade80;
}
.pd-key-wrong {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #f87171;
  text-decoration: line-through;
}
.pd-key:disabled { opacity: 0.6; cursor: default; }
.pd-results {
  text-align: center;
  padding: 2rem 1rem;
}
.pd-results-icon { font-size: 3.5rem; margin-bottom: 0.5rem; }
.pd-results-title {
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
  color: var(--text-primary, #fff);
}
.pd-results-word { color: var(--text-secondary, rgba(255, 255, 255, 0.7)); margin: 0.5rem 0; }
.pd-results-word strong {
  color: var(--accent-primary, #8b5cf6);
  font-size: 1.1em;
  letter-spacing: 0.05em;
}
.pd-results-score {
  font-size: 2.8rem;
  font-weight: 700;
  margin: 0.75rem 0;
  background: linear-gradient(135deg, #8b5cf6, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pd-record-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
  border-radius: 999px;
  font-weight: 600;
  margin: 0.5rem 0 1rem;
}
.pd-prev-best { color: var(--text-muted, rgba(255, 255, 255, 0.5)); margin: 0.5rem 0 1rem; }
.pd-stats-final { color: var(--text-secondary, rgba(255, 255, 255, 0.65)); margin: 0.5rem 0 1.5rem; }
.pd-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}
.pd-replay-btn, .pd-back-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: filter 0.15s, transform 0.1s;
}
.pd-replay-btn {
  background: var(--accent-primary, #8b5cf6);
  color: #fff;
}
.pd-back-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary, rgba(255, 255, 255, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.pd-replay-btn:hover, .pd-back-btn:hover { filter: brightness(1.15); }
.pd-replay-btn:active, .pd-back-btn:active { transform: scale(0.97); }

/* ============================================================
   MEMORY - prefixe .mem-*
   ============================================================ */
.mem-difficulty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 1rem;
}
.mem-diff-title {
  font-size: 1.3rem;
  color: var(--text-primary, #fff);
  margin: 0;
}
.mem-diff-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.mem-diff-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: var(--text-primary, #fff);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  min-width: 130px;
}
.mem-diff-btn:hover {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.4);
  transform: translateY(-2px);
}
.mem-diff-grid {
  width: 60px;
  height: 60px;
  display: grid;
  gap: 2px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: 8px;
}
.mem-diff-grid-easy { grid-template: repeat(3, 1fr) / repeat(4, 1fr); }
.mem-diff-grid-medium { grid-template: repeat(4, 1fr) / repeat(4, 1fr); }
.mem-diff-grid-hard { grid-template: repeat(4, 1fr) / repeat(6, 1fr); }
.mem-diff-grid > * {
  background: rgba(14, 165, 233, 0.5);
  border-radius: 2px;
}
.mem-diff-label { font-size: 0.9rem; font-weight: 600; }

.mem-game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem;
}
.mem-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.75));
  font-variant-numeric: tabular-nums;
}
.mem-stat strong { color: var(--text-primary, #fff); }
.mem-board {
  display: grid;
  gap: 0.5rem;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
}
.mem-card {
  position: relative;
  aspect-ratio: 1;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  perspective: 600px;
  -webkit-tap-highlight-color: transparent;
}
.mem-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.4s;
  transform-style: preserve-3d;
}
.mem-card-flipped .mem-card-inner {
  transform: rotateY(180deg);
}
.mem-card-back, .mem-card-front {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  font-size: clamp(1.5rem, 7vw, 2.4rem);
  user-select: none;
}
.mem-card-back {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: rgba(255, 255, 255, 0.4);
  font-weight: 700;
}
.mem-card-front {
  background: rgba(255, 255, 255, 0.95);
  transform: rotateY(180deg);
}
.mem-card-matched .mem-card-front {
  background: rgba(34, 197, 94, 0.25);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.5), 0 0 20px rgba(34, 197, 94, 0.3);
  animation: memMatched 0.4s ease-out;
}
@keyframes memMatched {
  0% { transform: rotateY(180deg) scale(1); }
  50% { transform: rotateY(180deg) scale(1.1); }
  100% { transform: rotateY(180deg) scale(1); }
}
.mem-card:not(:disabled):active { transform: scale(0.96); }

.mem-results {
  text-align: center;
  padding: 2rem 1rem;
}
.mem-results-icon { font-size: 3.5rem; margin-bottom: 0.5rem; }
.mem-results-title { font-size: 1.6rem; margin: 0 0 0.5rem; color: var(--text-primary, #fff); }
.mem-results-score {
  font-size: 2.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0.75rem 0;
}
.mem-record-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
  border-radius: 999px;
  font-weight: 600;
  margin: 0.5rem 0;
}
.mem-prev-best { color: var(--text-muted, rgba(255, 255, 255, 0.5)); margin: 0.5rem 0; }
.mem-stats-final { margin: 1rem 0 1.5rem; color: var(--text-secondary, rgba(255, 255, 255, 0.7)); }
.mem-stat-line { padding: 0.3rem 0; }
.mem-stat-line strong { color: var(--text-primary, #fff); }
.mem-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}
.mem-replay-btn, .mem-back-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: filter 0.15s, transform 0.1s;
}
.mem-replay-btn {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
}
.mem-back-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary, rgba(255, 255, 255, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.mem-replay-btn:hover, .mem-back-btn:hover { filter: brightness(1.15); }
.mem-replay-btn:active, .mem-back-btn:active { transform: scale(0.97); }

