.game-over-title {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Global */
html, body {
  margin: 0;
  padding: 0;
  height: 100vh;           /* force la hauteur à celle de la fenêtre */
  width: 100vw;            /* force la largeur à celle de la fenêtre */
  box-sizing: border-box;  /* inclut padding et border */
  overflow: hidden;        /* empêche le scroll de body */
  font-family: 'Segoe UI', 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  background: radial-gradient(circle at 30% 0%, #90a4d4 0%, #5b4b9a 55%, #3a2e6e 100%);
}

/* Container principal plein écran avec marge de 1px */
.container {
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  height: 100%;
  margin: 0;
  padding: 18px 16px 24px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  overflow-y: auto;
}

/* Barre du haut avec logo + titre de room */
.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 500px;
  margin-bottom: 10px;
}

.topbar-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.topbar h2 {
  margin: 0;
}

.room-category {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px;
}

#gameArea {
  display: flex;
  flex-direction: column;  /* éléments empilés verticalement */
  align-items: center;
  justify-content: center; /* commence en haut */
  width: 100%;
  max-width: 560px;        /* empêche le contenu de s'étirer sur toute la largeur en grand écran */
  margin: 0 auto;
  height: 100%;
  box-sizing: border-box;
}

/* Titres */
h2, h3 {
  text-align: center;
  margin-bottom: 12px;
  word-wrap: break-word;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Input & labels */
label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #e6e6e6;
}

input {
  padding: 8px;
  margin: 4px 0;
  width: 100%;
  box-sizing: border-box;
}

/* Ligne de boutons */
.button-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin: 25px 0;
  width: 100%;
  max-width: 500px;
}

/* Tous les boutons de la ligne ont la même largeur */
.button-row .btn {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  padding: 13px 0;
  text-align: center;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.button-row .btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.button-row .btn:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

/* Play button */
.play-btn {
  background: linear-gradient(135deg, #66d17a, #4CAF50);
}

/* Pause button */
.pause-btn {
  background: linear-gradient(135deg, #ff6b5e, #F44336);
}

/* Next button */
.next-btn {
  background: linear-gradient(135deg, #33cfff, #00acee);
}

/* Réponse button */
.reveal-btn {
  background: linear-gradient(135deg, #a238a2, #800080);
}

/* Quitter button */
.quit-btn {
  background: linear-gradient(135deg, #ff9800, #f57c00);
}


/* Buzzers */
.buzzer {
  display: block;
  margin: auto auto;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 30px 60px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
  width: 80%;
  height: 15%;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}


/* Buzzers actif/inactif */
.buzzer.active {
  background: linear-gradient(135deg, #66d17a, #4CAF50);
  color: white;
  animation: buzzPulse 1.4s ease-in-out infinite;
}

.buzzer.active:active {
  transform: scale(0.97);
}

.buzzer.inactive {
  background: linear-gradient(135deg, #ff6b5e, #F44336);
  color: white;
  cursor: not-allowed;
  opacity: 0.75;
}

@keyframes buzzPulse {
  0%, 100% { box-shadow: 0 10px 25px rgba(76, 175, 80, 0.35); }
  50%      { box-shadow: 0 10px 35px rgba(76, 175, 80, 0.7); }
}

/* Notifications buzz */
#buzzInfo {
  text-align: center;
  font-weight: bold;
  margin-top: 12px;
  word-wrap: break-word;
  color: #fff;
}

.buzzLabel {
  min-height: 30px; /* espace réservé */
  text-align: center;
  font-weight: bold;
  word-wrap: break-word; /* coupe les mots longs */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis; /* ajoute ... si le texte est trop long */
}

/* Flux des réponses en direct (mode texte) */
.answer-feed {
  width: 100%;
  max-width: 500px;
  margin: 0 auto 16px;
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.answer-feed-line {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 12px;
  color: #f2f2f2;
  font-size: 14px;
}

.answer-feed-line.complete {
  border-color: rgba(76, 175, 80, 0.5);
  background: rgba(76, 175, 80, 0.12);
}

.answer-feed-line.first {
  border-color: rgba(255, 193, 7, 0.6);
  background: rgba(255, 193, 7, 0.15);
  font-weight: 700;
}

/* Mode texte : champ de réponse */
.answer-form {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto 10px;
}

.answer-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  box-sizing: border-box;
}

.answer-form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.answer-form input:focus {
  outline: none;
  border-color: #f57c00;
}

.answer-form .btn {
  width: auto;
  padding: 0 22px;
  margin-top: 0;
}

.personal-feedback {
  min-height: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.personal-feedback.positive { color: #7ee08a; }
.personal-feedback.negative { color: #ff9d94; }

/* Responsive Media Queries */
@media (max-width: 600px) {
  .container {
    padding: 14px 12px 20px;
  }

  .buzzer {
    font-size: 28px;
    padding: 20px 40px;
  }

  .button-row .btn {
    font-size: 14px;
    padding: 10px 0;
  }

  .scoreboard {
    font-size: 13px;
  }
}
/* ---------- Écrans de formulaire (mode de jeu, création/rejoindre, playlist) ---------- */
.form-screen {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.form-card {
  width: 100%;
  max-width: 400px;
  padding: 36px 32px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  text-align: center;
  box-sizing: border-box;
}

.form-card-wide {
  max-width: 560px;
}

.form-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  margin-bottom: 14px;
}

.form-card h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 0;
  color: #ffffff;
}

.form-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin: 10px 0 26px;
  line-height: 1.5;
}

/* Champs labellisés */
.field {
  display: block;
  text-align: left;
  margin-bottom: 16px;
}

.field span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  box-sizing: border-box;
  margin: 0;
}

.field input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.field input:focus {
  outline: none;
  border-color: #f57c00;
}

.form-error {
  color: #ff9d94;
  font-size: 13px;
  margin-top: 14px;
  min-height: 18px;
}

.form-success {
  color: #7ee08a;
  font-size: 13px;
  margin-top: 14px;
  min-height: 18px;
}

.form-switch {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  margin-top: 16px;
}

.form-switch a {
  color: #ffb74d;
  font-weight: 700;
  text-decoration: none;
}

.form-switch a:hover {
  text-decoration: underline;
}

.form-step-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
  text-align: center;
}

/* Boutons des formulaires */
.form-btn {
  display: block;
  width: 100%;
  padding: 13px 0;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, filter 0.15s ease;
  margin-top: 10px;
}

.form-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.form-btn:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

.form-btn-primary {
  background: linear-gradient(135deg, #66d17a, #4CAF50);
}

.form-btn-online {
  background: linear-gradient(135deg, #33cfff, #00acee);
}

.form-btn-ghost {
  background: rgba(231, 76, 60, 0.85);
}

.form-btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  color: #3c4043;
  text-decoration: none;
  box-sizing: border-box;
}

.form-btn-google:hover {
  filter: none;
  background: #f7f7f7;
}

.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.form-divider {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  text-align: center;
  margin: 14px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Grille de playlists Deezer */
.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  text-align: left;
}

.playlist-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, background 0.15s ease;
}

.playlist-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.14);
}

.playlist-card-title {
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  word-break: break-word;
}

.playlist-card-count {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.playlist-message {
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

/* Responsive pour petits écrans */
@media (max-width: 500px) {
  .form-card {
    padding: 22px 18px;
  }
}

.role-selection {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 22px 0 0;
  width: 100%;
}

.home-btn {
  background: rgba(231, 76, 60, 0.9);
  color: white;
  border: none;
  padding: 12px 15px;
  margin-top: 10px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, filter 0.15s ease;
  width: 100%;
}

.home-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}


#playerContainer {
  width: 80%;
  max-width: 600px;
  margin: auto;
  margin-top: -11px;
  z-index: 1;
}

#progressContainer {
  width: 100%;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.08);
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
  border-bottom-left-radius: 7px;
  border-bottom-right-radius: 7px;
  overflow: hidden;
}

#progressBar {
  height: 100%;
  width: 100%; /* commence pleine largeur */
  background: linear-gradient(90deg, #ff9800, #f57c00);
  transition: width 0.2s linear, background-color 0.2s linear;
}

/* Tableau des scores */
.scoreboard {
  width: 100%;
  max-width: 500px;
}
