/* === Bloks Mania — surcharge identité jeu (tétriminos) === */

/* Bandeau joueur le plus actif */
.bandeau-joueur-actif {
  margin-bottom: 16px;
  padding: 9px 18px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 10px;
  text-align: center;
  font-size: 0.82rem;
  color: #cbd5e1;
  overflow: hidden;
  animation: bandeau-apparition 0.8s ease both;
}
.bandeau-joueur-actif strong { color: #a855f7; font-weight: 700; }
.bandeau-carousel { position: relative; height: 1.4em; }
.bandeau-msg {
  position: absolute; inset: 0;
  text-align: center; line-height: 1.4em;
  opacity: 0; transform: translateY(100%);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.bandeau-msg-visible { opacity: 1; transform: translateY(0); }
.bandeau-msg-sortie { opacity: 0; transform: translateY(-100%); }
.bandeau-msg-entree { opacity: 0; transform: translateY(100%); }
@keyframes bandeau-apparition {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 480px) {
  .bandeau-joueur-actif { font-size: 0.78rem; padding: 8px 12px; }
  .bandeau-carousel { height: 3.6em; }
}

/* Hero — décor empilable de tetriminos statiques en arrière-plan */
.hero-blocs {
  position: relative;
  padding: 32px 20px 28px;
  margin: -40px -32px 28px;
  border-radius: 24px 24px 0 0;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(34, 211, 238, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 100%, rgba(168, 85, 247, 0.18) 0%, transparent 55%),
    rgba(10, 5, 25, 0.45);
  overflow: hidden;
}
/* Léger motif "grille" pour évoquer un puits Tetris */
.hero-blocs::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(168, 85, 247, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  opacity: 0.7;
}

/* Layout flex hero */
.hero-flex {
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 1;
}
.hero-visual-block {
  flex: 0 0 170px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mini-puits décoratif fait de mini-blocs colorés (CSS pur, pas de canvas) */
.tetris-deco {
  position: relative;
  width: 140px;
  height: 168px;
  background: rgba(5, 2, 20, 0.65);
  border: 2px solid #a855f7;
  border-radius: 8px;
  box-shadow:
    0 0 22px rgba(168, 85, 247, 0.45),
    inset 0 0 18px rgba(34, 211, 238, 0.12);
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 1px;
  padding: 4px;
  overflow: hidden;
}
.tetris-deco span {
  display: block;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  animation: bloc-pulse 4s ease-in-out infinite;
  will-change: opacity;
}
.tetris-deco span.b-empty { background: transparent; box-shadow: none; }
.tetris-deco span.b-i { background: linear-gradient(180deg, #67e8f9, #06b6d4); }
.tetris-deco span.b-o { background: linear-gradient(180deg, #fde68a, #eab308); }
.tetris-deco span.b-t { background: linear-gradient(180deg, #d8b4fe, #a855f7); }
.tetris-deco span.b-s { background: linear-gradient(180deg, #86efac, #16a34a); }
.tetris-deco span.b-z { background: linear-gradient(180deg, #fca5a5, #dc2626); }
.tetris-deco span.b-j { background: linear-gradient(180deg, #93c5fd, #2563eb); }
.tetris-deco span.b-l { background: linear-gradient(180deg, #fdba74, #ea580c); }
@keyframes bloc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.78; }
}
@media (prefers-reduced-motion: reduce) {
  .tetris-deco span { animation: none; }
}

.hero-text { flex: 1; min-width: 0; }
.hero-blocs .hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 10px;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--color-light), var(--color-mid), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-blocs .hero-h1 {
  font-size: 1rem;
  font-weight: 400;
  margin: 0 0 10px;
  line-height: 1.4;
}
.hero-blocs .subtitle { margin-bottom: 20px; }

/* Bouton CTA hero */
.btn-cta-hero {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 14px 36px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  color: #050214;
  background: linear-gradient(135deg, #22d3ee, #fde047);
  box-shadow: 0 6px 24px rgba(34, 211, 238, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}
.btn-cta-hero:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.45);
}

/* Indicateur "live" (statique) */
.hero-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.82rem;
  color: #94a3b8;
}
.live-dot { width: 8px; height: 8px; background: #22d3ee; border-radius: 50%; }

/* Cartes modes */
.modes { gap: 14px; margin-bottom: 24px; }
.mode-card {
  position: relative;
  padding: 24px 18px;
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s, border-color 0.3s;
}
.mode-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-light), var(--color-mid));
  opacity: 0;
  transition: opacity 0.3s;
}
.mode-card:hover::before { opacity: 1; }
.mode-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.3);
}
.mode-icon {
  font-size: 2.8rem !important;
  display: block;
  margin-bottom: 4px;
  transition: transform 0.3s ease;
}
.mode-card:hover .mode-icon { transform: scale(1.15); }

.mode-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 6px;
}
.badge-solo {
  background: rgba(34, 211, 238, 0.15);
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.25);
}
.badge-action {
  background: rgba(168, 85, 247, 0.12);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.modes-header {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #64748b;
  margin-bottom: 14px;
}

/* Boutons primaires */
.btn-primary {
  font-size: 1rem;
  padding: 14px 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6b21a8, #a855f7);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.3);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.45);
}
.btn-primary:active { transform: translateY(0); }

/* Section rules */
.rules {
  position: relative;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.rules::before {
  content: '\25A0';
  position: absolute;
  top: 16px; right: 20px;
  font-size: 2rem;
  opacity: 0.1;
  color: #a855f7;
}
.rules kbd {
  display: inline-block;
  padding: 1px 6px;
  background: rgba(34, 211, 238, 0.15);
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.78rem;
  color: #67e8f9;
}

/* Responsive */
@media (max-width: 600px) {
  .hero-blocs { padding: 24px 14px 22px; margin: -28px -18px 22px; }
  .hero-flex { flex-direction: column; gap: 14px; text-align: center; }
  .hero-visual-block { flex-basis: auto; }
  .tetris-deco { width: 120px; height: 144px; }
  .hero-blocs .hero-title { font-size: 1.8rem; }
  .hero-blocs .hero-h1 { font-size: 0.95rem; }
  .btn-cta-hero { font-size: 1rem; padding: 12px 28px; }
}
