:root {
  --bg-dark: #0f172a;
  --panel-bg: rgba(30, 41, 59, 0.85);
  --border-color: rgba(255, 255, 255, 0.12);
  --accent: #6366f1;
  --accent-gold: #fbbf24;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

body {
  background: radial-gradient(circle at top, #1e1b4b 0%, #0f172a 60%, #090d16 95%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  user-select: none;
}

.wrap {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.retour {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.retour a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.panneau {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(8px);
}

.entete-jeu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.titre-groupe h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #818cf8;
}

.stats-bar {
  display: flex;
  gap: 16px;
}

.stat-box {
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  text-align: center;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-valeur {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.canvas-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 480px;
  background: linear-gradient(to bottom, #0f172a 0%, #1e1b4b 100%);
  border-radius: 14px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.6);
  touch-action: none;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: ew-resize;
}

.overlay-instruction {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 23, 42, 0.92);
  border: 2px solid #6366f1;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  max-width: 90%;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.bouton-jouer {
  background: linear-gradient(135deg, #818cf8 0%, #4f46e5 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
  transition: transform 0.1s, filter 0.1s;
}

.bouton-jouer:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.mode-badge {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
}
