/* ================================
   11. BARRES DE JEU & TOPBAR DE JEU
   ================================ */

/* Barre de statut de jeu (points, ID) */
.game-topbar {
  position: relative;
  margin: 0 auto;
  max-width: 850px;
  width: 100%;
  background-color: #1e1e1e;
  backdrop-filter: blur(6px);
  border-left: 3px solid #000;
  border-right: 3px solid #000;
  border-bottom: 3px solid #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  padding: 1rem;
}

.game-topbar.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Zone centrale de la topbar */
#topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Affichage des points par joueur */
.player-points-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100% !important;
  margin: 0 auto;
  margin-bottom: 1rem;
  padding: 0.75rem 1.2rem;
  background-color: rgba(26, 26, 26, 0.5);
  border: 1px solid #333;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.player-points-bar .player-points {
  font-size: 1.2rem;
  font-weight: 600;
  color: #f0f0f0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Affichage de l’ID de partie */
.game-id {
  font-size: 3rem;
  color: #0ff;
}

/* 1) Cible la topbar de jeu */
#game-topbar .quit-btn,
#game-topbar .bonus-btn,
#game-topbar .permanent-btn {
  width: auto;            /* enlève la largeur fixe de 300px */
  padding: 0.4rem;        /* réduit le padding interne */
  font-size: 0.9rem;      /* taille de texte plus petite */
  border-radius: 4px;     /* coins un peu plus carrés */
  margin: 0 0.3rem;       /* espace horizontal réduit */
}

/* 2) Si tu veux un bouton parfaitement carré avec seulement l’icône */
#game-topbar .quit-btn,
#game-topbar .bonus-btn,
#game-topbar .permanent-btn {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 3) Ajuste la taille de l’icône à l’intérieur */
#game-topbar .quit-btn i,
#game-topbar .bonus-btn i,
#game-topbar .permanent-btn i {
  width: 1.2rem;
  height: 1.2rem;
}

/* 4) Optionnel : remet un petit halo au hover si besoin */
#game-topbar .quit-btn:hover,
#game-topbar .bonus-btn:hover,
#game-topbar .permanent-btn:hover {
  box-shadow:
    0 0 6px rgba(255,255,255,0.2),
    inset 0 0 3px rgba(255,255,255,0.1);
}

.avatar-container {
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
}
.avatar-container img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #0ff;
  box-shadow: 0 0 10px rgba(0,255,255,0.6);
  transition: transform 0.3s ease;
}
.avatar-container img:hover {
  transform: scale(1.05);
}

/* avatar dans le header à gauche */
.header-avatar {
  width: 50px;             /* ou la taille souhaitée */
  height: 50px;
  border-radius: 50%;      /* rond */
  border: 2px solid #0ff;  /* bordure bleue */
  box-shadow: 0 0 6px rgba(0,255,255,0.6);
  object-fit: cover;       /* pour garder le ratio */
}

.avatar-small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #0ff;              /* ta bordure bleu néon */
  box-shadow: 0 0 4px rgba(0,255,255,0.6);
  object-fit: cover;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.player-points-bar .point-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #0ff;
  box-shadow: 0 0 6px rgba(0,255,255,0.6);
  object-fit: cover;
}

.header-avatar,
.point-avatar {
  border: 2px solid #0ff;
  box-shadow: 0 0 6px rgba(0,255,255,0.6);
}

.header-avatar.female,
.point-avatar.female {
  border-color: #f0f;
  box-shadow: 0 0 8px rgba(255,0,255,0.7);
}

.header-avatar {
  border: 2px solid #0ff;           /* couleur par défaut (bleu) */
  border-radius: 50%;
}
.header-avatar.female {
  border-color: #FF00FF;            /* rose-violet néon */
  box-shadow: 0 0 8px rgba(255,0,255,0.7);
}

/* === Bouton permanent challenge === */
.permanent-btn {
  background-color: #00bfff;          /* bleu flashy */
  color: white;
  border: none;
  padding: 0.4em 0.6em;
  border-radius: 8px;
  font-size: 1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 10px #00bfff80;
  transition: transform 0.2s ease;
}

.permanent-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px #00bfff;
}

/* halo clignotant */
@keyframes pulse-blue {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 191, 255, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 191, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 191, 255, 0);
  }
}

.permanent-btn.blinking-halo {
  animation: pulse-blue 1.8s infinite;
}
