/* Memory : pages de jeu (solo, à deux, tour par tour, course, défi du jour).
   Une seule feuille pour les cinq pages : la grille de cartes y était recopiée quatre fois. */

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

body {
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, #0f0c29, #1e1b4b, #24243e);
  color: #e0e0e0;
  padding: 16px;
}

#app {
  position: relative; z-index: 1;
  background: rgba(20, 20, 35, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 28px 24px 24px;
  max-width: 700px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  text-align: center;
  /* Hauteur réservée au-dessus et au-dessous de la grille quand la zone de jeu est
     amenée en haut de l'écran : sert au calcul de la largeur de la grille. */
  --reserve: 185px;
}
#app.page-defi { max-width: 800px; }
#app.page-multi { --reserve: 220px; }
#app.page-course { --reserve: 255px; }
/* La barre de connexion du réseau est fixe en haut de l'écran : la zone de jeu
   remontée s'arrête juste dessous (56 px, comptés dans --reserve). */
#zone-jeu { scroll-margin-top: 56px; }

.hidden, [hidden] { display: none !important; }

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.back-link { font-size: 0.85rem; color: #c4b5fd; text-decoration: none; font-weight: 600; transition: color 0.2s; padding: 6px 0; }
.back-link:hover { color: #ddd6fe; }

h1 {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(90deg, #c4b5fd, #8b5cf6, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sous-titre { font-size: 0.88rem; color: #94a3b8; margin: -6px 0 16px; }

/* ---------- Boutons ---------- */
.btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 11px 24px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  text-decoration: none;
  min-height: 44px;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn-primary { background: linear-gradient(135deg, #7c3aed, #8b5cf6); box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4); }
.btn-secondary { background: rgba(255, 255, 255, 0.1); color: #e0e0e0; border: 1px solid rgba(255, 255, 255, 0.2); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.15); }
.actions, .overlay-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.actions { margin-top: 12px; }

.btn-mute {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 1.1rem;
  min-width: 40px;
  min-height: 40px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.btn-mute:hover { border-color: rgba(255, 255, 255, 0.3); }
.btn-mute.muted { opacity: 0.4; }

/* ---------- Écran de réglages (avant la partie) ---------- */
.reglages { text-align: center; }
.reglages h2 { font-size: 1.1rem; font-weight: 800; color: #ddd6fe; margin-bottom: 6px; }
.reglages-intro { font-size: 0.88rem; color: #94a3b8; margin-bottom: 16px; line-height: 1.5; }
.choix-grille { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.choix-grille button {
  font-family: inherit;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #e0e0e0;
  padding: 14px 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.choix-grille button:hover { background: rgba(255, 255, 255, 0.1); }
.choix-grille button[aria-pressed="true"] { border-color: #8b5cf6; background: rgba(139, 92, 246, 0.18); }
.choix-grille strong { display: block; font-size: 1rem; color: #c4b5fd; margin-bottom: 3px; }
.choix-grille span { font-size: 0.78rem; color: #94a3b8; }
.choix-grille .record { display: block; margin-top: 4px; color: #4ade80; font-weight: 600; }
.reprise {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  color: #fde68a;
}
.reprise .btn { margin-top: 8px; }

/* Réglages supplémentaires : grilles à 3 colonnes, thèmes, options */
.choix-grille.grilles-6 { grid-template-columns: repeat(3, 1fr); }
.reglage-titre { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #94a3b8; margin: 4px 0 8px; text-align: left; }
.choix-theme { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.choix-theme button, .choix-segment button {
  font-family: inherit; font-size: 0.85rem; font-weight: 600; color: #e0e0e0;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px; padding: 8px 14px; cursor: pointer; min-height: 40px;
}
.choix-theme button[aria-pressed="true"], .choix-segment button[aria-pressed="true"] { border-color: #8b5cf6; background: rgba(139, 92, 246, 0.2); color: #fff; }
.choix-theme button:disabled { opacity: 0.35; cursor: not-allowed; }
.choix-segment { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.options-solo { display: grid; gap: 10px; margin-bottom: 18px; text-align: left; }
.option-ligne { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; color: #cbd5e1; cursor: pointer; line-height: 1.4; }
.option-ligne input { width: 20px; height: 20px; margin-top: 1px; accent-color: #8b5cf6; flex-shrink: 0; }
.option-ligne small { display: block; color: #94a3b8; }
.stats-solo { margin: 20px 0 0; text-align: left; font-size: 0.85rem; }
.stats-solo h3 { font-size: 0.95rem; color: #ddd6fe; margin-bottom: 8px; }
.stats-solo table { width: 100%; border-collapse: collapse; }
.stats-solo th, .stats-solo td { padding: 6px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); text-align: left; }
.stats-solo th { color: #94a3b8; font-weight: 600; }
.stats-solo .stats-vide { color: #94a3b8; }
.limite-display { color: #fbbf24; }
.score-ia { display: flex; justify-content: center; gap: 18px; font-weight: 700; margin-bottom: 8px; }
.score-ia .moi { color: #c4b5fd; }
.score-ia .ordi { color: #fbbf24; }
.serie-defi { text-align: center; font-weight: 700; color: #fbbf24; margin: -8px 0 16px; font-size: 0.95rem; }
.serie-defi small { display: block; font-weight: 500; color: #94a3b8; font-size: 0.8rem; }
@media (max-width: 480px) { .choix-grille.grilles-6 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Barre d'infos ---------- */
.info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  gap: 16px;
}
.info-item { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 700; }
.info-icon { font-size: 1.1rem; }
.info-grille { color: #c4b5fd; }
.info-chrono { color: #22d3ee; }
.info-coups { color: #a78bfa; }
.hint { font-size: 0.78rem; color: #94a3b8; margin-bottom: 12px; min-height: 1.2em; }

/* ---------- Grille ---------- */
.board-wrapper { display: flex; justify-content: center; margin-bottom: 12px; }
/* La grille tient dans la hauteur de l'écran (PC portable, paysage) : sa largeur est
   bornée par la hauteur disponible, convertie avec le rapport colonnes / lignes et
   celui d'une carte (3/4). --cols et --rows sont posés par js/commun.js. */
.board {
  --ratio-carte: 0.75;
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  gap: 8px;
  width: 100%;
  max-width: min(600px, calc((100vh - var(--reserve)) * var(--cols, 4) * var(--ratio-carte) / var(--rows, 4)));
  max-width: min(600px, calc((100dvh - var(--reserve)) * var(--cols, 4) * var(--ratio-carte) / var(--rows, 4)));
  perspective: 1000px;
}
.card-slot {
  font: inherit;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  aspect-ratio: 3 / 4;
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s;
  container-type: inline-size;
  border-radius: 10px;
}
.card-slot:focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }
.card-slot.flipped, .card-slot.matched { transform: rotateY(180deg); }
.card-slot.matched, .board.verrouille .card-slot, .card-slot[aria-disabled="true"] { cursor: default; }
.card-face {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
}
.card-back { background: linear-gradient(135deg, #7c3aed, #8b5cf6); box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2); }
.card-back::after { content: '?'; font-size: 1.6rem; font-size: 34cqi; font-weight: 900; color: rgba(255, 255, 255, 0.2); }
.card-front {
  background: rgba(30, 27, 60, 0.95);
  transform: rotateY(180deg);
  font-size: 1.8rem;
  font-size: 52cqi;
  border: 2px solid rgba(139, 92, 246, 0.3);
}
/* Faces selon le thème : émoji, lettre ou nombre, drapeau dessiné en CSS */
.card-front { flex-direction: column; gap: 4%; }
.cf-texte { font-weight: 800; color: #ddd6fe; font-size: 0.85em; line-height: 1; }
.cf-drapeau { width: 76%; aspect-ratio: 3 / 2; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }
.cf-nom { font-size: 1rem; font-size: 13cqi; color: #cbd5e1; font-weight: 600; line-height: 1.1; max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Mode confort : sans chrono, cartes plus grandes et plus contrastées */
body.mode-confort .info-chrono { display: none; }
body.mode-confort .board { gap: 10px; max-width: min(760px, calc((100dvh - var(--reserve) + 40px) * var(--cols, 4) * var(--ratio-carte) / var(--rows, 4))); }
body.mode-confort .card-back { background: #6d28d9; border: 3px solid #ede9fe; }
body.mode-confort .card-back::after { color: rgba(255, 255, 255, 0.6); }
body.mode-confort .card-front { border-width: 3px; border-color: #c4b5fd; background: #1e1b4b; font-size: 60cqi; }
body.mode-confort .cf-nom { font-size: 15cqi; color: #fff; }
body.mode-confort .hint { font-size: 0.95rem; color: #e2e8f0; }

.card-slot.matched .card-front { box-shadow: 0 0 12px rgba(74, 222, 128, 0.4); border-color: rgba(74, 222, 128, 0.45); }
/* Paires trouvées par chaque joueur (tour par tour, à deux) */
.card-slot.matched.par-j1 .card-front { border-color: rgba(244, 114, 182, 0.6); box-shadow: 0 0 12px rgba(244, 114, 182, 0.4); }
.card-slot.matched.par-j2 .card-front { border-color: rgba(34, 211, 238, 0.6); box-shadow: 0 0 12px rgba(34, 211, 238, 0.4); }
.card-slot.matched.par-j3 .card-front { border-color: rgba(74, 222, 128, 0.6); box-shadow: 0 0 12px rgba(74, 222, 128, 0.4); }
.card-slot.matched.par-j0 .card-front { border-color: rgba(139, 92, 246, 0.7); box-shadow: 0 0 12px rgba(139, 92, 246, 0.45); }
.card-slot.matched.par-l2 .card-front { border-color: rgba(251, 191, 36, 0.6); box-shadow: 0 0 12px rgba(251, 191, 36, 0.45); }
.joueur-1 { color: #c4b5fd; }
.joueur-2 { color: #fbbf24; }

/* Paysage sur un écran bas (téléphone couché) : cartes carrées, plus grandes */
@media (orientation: landscape) and (max-height: 560px) {
  body { padding: 8px; }
  #app { padding: 14px 16px; --reserve: 160px; }
  #app.page-multi { --reserve: 190px; }
  #app.page-course { --reserve: 220px; }
  .board { --ratio-carte: 1; gap: 5px; }
  .card-slot { aspect-ratio: 1 / 1; }
}

.btn-revoir { margin: 4px auto 12px; }

/* ---------- Overlay de fin ---------- */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  justify-content: center;
  align-items: center;
  padding: 12px;
}
.overlay.visible { display: flex; }
.overlay-box {
  position: relative;
  background: rgba(30, 27, 60, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 30px 24px 24px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.overlay-fermer {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.overlay-fermer:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.overlay-box h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.overlay-box p { color: #94a3b8; font-size: 0.92rem; margin-bottom: 14px; line-height: 1.45; }
.win-text { color: #4ade80; }
.lose-text { color: #f87171; }
.draw-text { color: #fbbf24; }
.fin-rang { color: #fde68a !important; font-weight: 700; }
.fin-record { color: #4ade80 !important; font-weight: 700; }
.lien-classement-fin { display: inline-block; color: #c4b5fd; font-weight: 700; font-size: 0.9rem; text-decoration: none; margin-bottom: 16px; padding: 4px 0; }
.lien-classement-fin:hover { color: #ddd6fe; text-decoration: underline; }
.cta-score-msg { color: #c4b5fd !important; font-size: 0.85rem !important; margin-bottom: 12px !important; }
.cta-auth-btns { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; }
.partage-score { margin-bottom: 16px; }

/* ---------- Multijoueur ---------- */
.code-display { font-size: 2rem; font-weight: 800; letter-spacing: 0.3em; color: #c4b5fd; margin: 12px 0; }
.waiting-msg { color: #94a3b8; margin-bottom: 16px; font-size: 0.95rem; }
.share-link { display: flex; align-items: center; gap: 8px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.share-link input {
  font-family: 'Inter', sans-serif; font-size: 0.8rem; padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px;
  background: rgba(255, 255, 255, 0.08); color: #e0e0e0; width: 280px; max-width: 100%;
}
.share-link button {
  font-family: 'Inter', sans-serif; font-size: 0.85rem; padding: 8px 14px; min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px;
  background: rgba(255, 255, 255, 0.1); color: #e0e0e0; cursor: pointer;
}
.players-list { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; flex-wrap: wrap; }
.player-tag {
  padding: 6px 12px; border-radius: 10px; font-weight: 600; font-size: 0.85rem;
  display: flex; align-items: center; gap: 6px;
  background: rgba(139, 92, 246, 0.2); color: #c4b5fd; border: 2px solid rgba(139, 92, 246, 0.3);
}
.player-tag.actif { box-shadow: 0 0 12px rgba(255, 255, 255, 0.4); }
.player-tag.absent { opacity: 0.5; }
.player-paires { font-size: 0.75rem; opacity: 0.85; }
.turn-indicator { font-size: 0.95rem; font-weight: 700; color: #c4b5fd; margin-bottom: 10px; min-height: 1.3em; }
.turn-indicator.a-toi { color: #fbbf24; }
.alerte-joueur { font-size: 0.82rem; color: #fca5a5; margin-bottom: 8px; min-height: 1.1em; }
.jeu-entete { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.jeu-entete .players-list { margin-bottom: 0; justify-content: flex-start; }
.vue-rejoindre h3 { color: #c4b5fd; margin-bottom: 12px; }
.vue-rejoindre p { color: #94a3b8; font-size: 0.85rem; margin-bottom: 12px; }
.ligne-rejoindre { display: flex; gap: 8px; margin-bottom: 12px; }
.input-rejoindre {
  flex: 1; font-family: 'Inter', sans-serif; font-size: 1rem; padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 10px;
  background: rgba(255, 255, 255, 0.08); color: #e2e8f0; outline: none; min-width: 0;
}
.input-rejoindre:focus { border-color: rgba(139, 92, 246, 0.5); }
.input-rejoindre::placeholder { color: #64748b; }
.erreur { color: #f87171; font-size: 0.85rem; min-height: 1.2rem; }
.rematch-msg { color: #c4b5fd; font-size: 0.9rem; margin-bottom: 12px; min-height: 1.2em; }
.scores-fin { margin-bottom: 14px; }
.scores-fin span { margin: 0 6px; white-space: nowrap; }
.btn-waiting { opacity: 0.6; cursor: default !important; }
@keyframes dots { 0%, 20% { content: ''; } 40% { content: '.'; } 60% { content: '..'; } 80%, 100% { content: '...'; } }
.dots::after { content: ''; animation: dots 1.5s steps(1) infinite; }

/* ---------- Course ---------- */
.countdown {
  font-size: 5rem; font-weight: 900; color: #8b5cf6;
  text-shadow: 0 0 40px rgba(139, 92, 246, 0.5); margin: 40px 0;
  animation: countdown-pulse 1s ease-in-out infinite;
}
@keyframes countdown-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.timer-bar-container { width: 100%; height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; margin-bottom: 10px; overflow: hidden; }
.timer-bar { height: 100%; background: linear-gradient(90deg, #4ade80, #8b5cf6); border-radius: 3px; transition: width 0.5s linear; }
.timer-bar.low { background: linear-gradient(90deg, #ef4444, #f87171); }
.timer-text { font-size: 1.2rem; font-weight: 800; color: #22d3ee; }
.progress-section { margin-bottom: 10px; max-height: 132px; overflow-y: auto; }
.progress-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.progress-pseudo { font-size: 0.82rem; font-weight: 600; min-width: 80px; max-width: 140px; text-align: right; color: #cbd5e1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-bar-bg { flex: 1; height: 16px; background: rgba(255, 255, 255, 0.08); border-radius: 8px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #8b5cf6, #a78bfa); border-radius: 8px; transition: width 0.5s ease; }
.progress-bar-fill.fini { background: linear-gradient(90deg, #4ade80, #22d3ee); }
.progress-pct { font-size: 0.75rem; font-weight: 700; min-width: 36px; text-align: left; color: #94a3b8; }
.info-course { display: flex; justify-content: center; gap: 16px; margin-bottom: 8px; font-size: 0.85rem; color: #94a3b8; }
.info-course strong { color: #c4b5fd; }
.classement-final { text-align: left; margin-bottom: 16px; }
.classement-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; margin-bottom: 4px; background: rgba(255, 255, 255, 0.04); }
.classement-row.top1 { background: rgba(255, 215, 0, 0.1); }
.classement-row.moi { border: 1px solid rgba(139, 92, 246, 0.4); }
.classement-rank { font-weight: 800; min-width: 28px; color: #c4b5fd; }
.classement-pseudo { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.classement-stats { font-size: 0.8rem; color: #94a3b8; }

/* ---------- Défi du jour ---------- */
.date-defi { font-size: 0.9rem; color: #94a3b8; margin-bottom: 18px; }
.defi-cartes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.defi-carte {
  font-family: inherit; color: inherit; text-align: center;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px; padding: 16px 12px; cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.defi-carte:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(139, 92, 246, 0.35); }
.defi-carte.active { border-color: rgba(139, 92, 246, 0.7); background: rgba(139, 92, 246, 0.15); }
.defi-carte.fait { border-color: rgba(74, 222, 128, 0.45); }
.defi-carte h3 { font-size: 1rem; font-weight: 700; color: #c4b5fd; margin-bottom: 4px; }
.defi-details { font-size: 0.78rem; color: #94a3b8; }
.defi-statut { font-size: 0.8rem; margin-top: 6px; font-weight: 700; }
.statut-disponible { color: #a5b4fc; }
.statut-en-cours { color: #f59e0b; }
.statut-gagne { color: #4ade80; }
.defi-confirmation {
  background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 16px; padding: 18px; margin-bottom: 20px;
}
.defi-confirmation h2 { font-size: 1.1rem; color: #ddd6fe; margin-bottom: 8px; }
.defi-confirmation p { font-size: 0.9rem; color: #cbd5e1; margin-bottom: 14px; line-height: 1.5; }
.message-statut { font-size: 0.92rem; color: #94a3b8; padding: 12px; margin: 12px 0; background: rgba(255, 255, 255, 0.04); border-radius: 10px; }
.message-victoire { color: #4ade80; font-weight: 700; }
.classement-section {
  margin: 20px auto 0; max-width: 800px; text-align: left;
  background: rgba(148, 163, 184, 0.09); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); padding: 16px;
}
.classement-section h2 { font-size: 1.05rem; font-weight: 800; color: #ddd6fe; margin-bottom: 10px; text-align: center; }
.onglets-niveau { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.onglets-niveau button {
  font-family: inherit; font-size: 0.82rem; font-weight: 600; color: #94a3b8;
  background: none; border: none; border-bottom: 2px solid transparent; padding: 6px 10px; cursor: pointer;
}
.onglets-niveau button[aria-selected="true"] { color: #c4b5fd; border-bottom-color: #8b5cf6; }
.lien-classement-complet { display: block; text-align: center; margin-top: 12px; color: #c4b5fd; font-weight: 700; font-size: 0.88rem; text-decoration: none; }
.lien-classement-complet:hover { text-decoration: underline; }
.classement-cta-compte { text-align: center; color: #fde68a; font-size: 0.85rem; margin-top: 10px; }

/* ---------- Divers ---------- */
.confetti { position: fixed; top: -10px; z-index: 200; pointer-events: none; font-size: 1.2rem; animation: confetti-fall 3s ease-in forwards; }
@keyframes confetti-fall { to { transform: translateY(110vh) rotate(720deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .card-slot { transition: none; }
  .confetti, .countdown { animation: none; }
}

footer { font-size: 0.78rem; color: #64748b; margin-top: 12px; }
footer a { color: #c4b5fd; text-decoration: none; display: inline-block; padding: 6px 2px; }
footer a:hover { color: #ddd6fe; }

@media (max-width: 480px) {
  #app { padding: 18px 12px 16px; border-radius: 18px; }
  h1 { font-size: 1.3rem; }
  .board { gap: 5px; }
  .info-bar { padding: 8px 10px; gap: 8px; }
  .info-item { font-size: 0.8rem; }
  .defi-cartes { grid-template-columns: 1fr 1fr; gap: 8px; }
  .progress-pseudo { min-width: 60px; font-size: 0.75rem; }
}
