/* Style Interface Joueur / Duos de Profs */

body.player-body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background-color: #0b0f19;
  background-image: url('/assets/da/fondtest.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  overflow: hidden;
  touch-action: manipulation;
  font-family: 'Trasandina Regular', var(--font-body), sans-serif;
}

/* Écran de sélection d'équipe initiale */
.team-select-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-dark-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.team-select-screen.hidden {
  display: none;
}

/* Modale Mot de Passe Département */
.team-password-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 13, 24, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
}
.team-password-modal.hidden {
  display: none;
}
.team-password-card {
  background: var(--bg-dark-secondary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.select-title {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  text-align: center;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.select-subtitle {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 1.1rem;
  text-align: center;
}

.team-grid-select {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 600px;
  width: 100%;
}

.team-card-btn {
  background: var(--bg-dark-secondary);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.team-card-btn:active {
  transform: scale(0.96);
}

.team-card-btn.gb { border-color: var(--team-gb); }
.team-card-btn.info { border-color: var(--team-info); }
.team-card-btn.mmi { border-color: var(--team-mmi); }
.team-card-btn.sco { border-color: var(--team-sco); }
.team-card-btn.tc { border-color: var(--team-tc); }

.team-card-name {
  font-size: 2rem;
  font-weight: 900;
}
.team-card-full {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

/* Header Joueur */
.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #0f172a;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.player-info-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-score-tag {
  background: rgba(255,255,255,0.1);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-accent);
}

.player-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* Zone d'état / Question pour le joueur */
.player-status-bar {
  padding: 12px 18px;
  text-align: center;
  background: rgba(0,0,0,0.25);
  font-size: 1.1rem;
  font-weight: 600;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
}

.player-status-bar.warning {
  color: #fca5a5;
  animation: pulse-glow 1s infinite alternate;
}

.player-status-bar.success {
  color: #86efac;
}/* ===================================================
   GRILLE & BOUTONS PLAYER (1, 2, 3, 4 AU-DESSUS DU TEXTE)
=================================================== */
.player-choices-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 16px;
  padding: 16px;
  height: 100%;
}

/* Bouton principal de choix (Agencement vertical) */
.player-choice-btn {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 88px;
  padding: 12px 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, filter 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
  user-select: none;
  overflow: hidden;
}

/* Texture géométrique en filigrane */
.player-choice-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.12) 25%, transparent 25%), 
    linear-gradient(225deg, rgba(255, 255, 255, 0.12) 25%, transparent 25%), 
    linear-gradient(45deg, rgba(255, 255, 255, 0.12) 25%, transparent 25%), 
    linear-gradient(315deg, rgba(255, 255, 255, 0.12) 25%, transparent 25%);
  background-position: 12px 0, 12px 0, 0 0, 0 0;
  background-size: 24px 24px;
  opacity: 0.22;
  pointer-events: none;
}

/* Badge diamant du numéro (Placé au-dessus du texte) */
.player-choice-btn::after {
  position: relative;
  transform: none;
  top: auto;
  right: auto;
  margin-bottom: 6px;
  width: 30px;
  height: 30px;
  background: #fff8e7;
  border: 2px solid #fde68a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', 'Cal Sans', sans-serif;
  font-weight: 900;
  font-size: 1.05rem;
  color: #581c87;
  z-index: 5;
  flex-shrink: 0;
}

/* Numéros dynamiques */
.player-choice-btn.choice-1::after { content: '1'; }
.player-choice-btn.choice-2::after { content: '2'; }
.player-choice-btn.choice-3::after { content: '3'; }
.player-choice-btn.choice-4::after { content: '4'; }

/* Dégradés officiels de la DA */
.player-choice-btn.choice-1 {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, rgba(225, 29, 72, 0.75) 45%, #e11d48 100%);
}
.player-choice-btn.choice-2 {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, rgba(249, 115, 22, 0.75) 45%, #ea580c 100%);
}
.player-choice-btn.choice-3 {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, rgba(234, 179, 8, 0.75) 45%, #ca8a04 100%);
}
.player-choice-btn.choice-4 {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, rgba(16, 185, 129, 0.75) 45%, #059669 100%);
}

/* Texte de la proposition (Sous le numéro) */
.player-choice-btn .choice-label {
  position: relative;
  z-index: 2;
  font-family: 'Trasandina Regular', var(--font-body), sans-serif;
  font-size: clamp(1rem, 2.8vw, 1.45rem);
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(126, 34, 206, 0.85), 0 2px 4px rgba(0, 0, 0, 0.95);
  line-height: 1.2;
  text-align: left;
  width: 100%;
  margin: 0;
}

/* --- ÉTATS INTERACTIFS --- */

.player-choice-btn:active:not(:disabled) {
  transform: scale(0.97);
}

/* Option sélectionnée */
.player-choice-btn.selected {
  filter: brightness(1.25) drop-shadow(0 0 18px rgba(255, 255, 255, 0.7));
  border-color: #ffffff;
  transform: scale(1.02);
}

.player-choice-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.player-choice-btn:disabled.selected {
  opacity: 1;
}

/* Révélation bonne réponse */
.player-choice-btn.correct-reveal {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.25) 0%, rgba(34, 197, 94, 0.85) 40%, #16a34a 100%) !important;
  filter: drop-shadow(0 0 24px rgba(34, 197, 94, 0.9)) !important;
  border-color: #4ade80 !important;
  opacity: 1 !important;
}

/* Révélation mauvaises réponses */
.player-choice-btn.wrong-reveal {
  opacity: 0.35 !important;
  filter: grayscale(0.5);
}


/* Overlay plein écran verrouillé / attente */
.player-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 13, 24, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  z-index: 50;
  transition: opacity 0.3s ease;
}

.player-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: float 2s infinite ease-in-out;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.overlay-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.overlay-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Écrans spéciaux : Élimination & Finale */
.player-special-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, #171f38, #070913);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  z-index: 500;
  animation: fadeIn 0.4s ease-out;
}

.player-special-screen.hidden {
  display: none;
}

.special-screen-icon {
  font-size: 5rem;
  margin-bottom: 20px;
  animation: float 2.5s infinite ease-in-out;
}

.special-screen-title {
  font-family: var(--font-title);
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.special-screen-text {
  font-size: 1.3rem;
  color: #ffffff;
  font-weight: 600;
  max-width: 480px;
  margin-bottom: 18px;
  line-height: 1.4;
}

.special-screen-hint {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.05);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
