/* =========================================
   HUB DE JEU & MODALE DE CONFIGURATION
   ========================================= */

.hub-main {
  padding-top: 150px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  min-height: 75vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* --- TITRES --- */
.text-center {
  text-align: center;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.mt-3 {
  margin-top: 2rem;
}

.section-title h2 {
  font-family: var(--font-heading);
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.section-title h2 span {
  color: var(--accent-purple);
  font-style: italic;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin-bottom: 4rem;
}

.separator-small {
  width: 70px;
  height: 4px;
  background: var(--accent-purple);
  border-radius: 2px;
  margin-top: 15px;
  margin-bottom: 2rem;
  box-shadow: 0 0 10px rgba(162, 56, 255, 0.4);
}

/* --- MODES DE JEU --- */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.mode-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 3.5rem 2rem;
  text-align: center;
  position: relative;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.mode-card.active {
  border-top: 4px solid var(--accent-purple);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  background-image: radial-gradient(
    circle at 50% 0%,
    rgba(162, 56, 255, 0.08) 0%,
    transparent 60%
  );
}

.mode-card.active:hover {
  transform: translateY(-8px);
}

.mode-card.locked {
  opacity: 0.5;
  filter: grayscale(100%);
  background: rgba(255, 255, 255, 0.02);
}

.mode-icon {
  font-size: 3.5rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.mode-card.active .mode-icon {
  color: var(--accent-purple);
}

.mode-card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  font-family: var(--font-heading);
}

.mode-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
}

.mode-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  text-transform: uppercase;
  margin-top: 2rem;
}

.mode-badge.locked {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.pulse-anim {
  animation: pulse-shadow 2s infinite;
}

@keyframes pulse-shadow {
  0% {
    box-shadow: 0 0 0 0 rgba(162, 56, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(162, 56, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(162, 56, 255, 0);
  }
}

/* =========================================
   LA MODALE DE CONFIGURATION
   ========================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal-overlay.hidden {
  display: none;
}

.config-modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--accent-purple);
  border-radius: 16px;
  width: 100%;
  max-width: 650px;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 0 40px rgba(162, 56, 255, 0.2);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto; /* Permet de scroller si l'écran est petit */
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 25px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s;
}
.close-modal:hover {
  color: var(--accent-purple);
}

.config-modal-content h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 2rem;
}
.config-modal-content h2 span {
  color: var(--accent-purple);
  font-style: italic;
}

.config-block {
  margin-bottom: 2rem;
}
.config-block label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Grille Playlist (Plus d'options = grille de 3) */
.playlist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.playlist-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.playlist-card i {
  font-size: 1.5rem;
  color: var(--text-secondary);
}
.playlist-card span {
  font-weight: 600;
  font-size: 0.85rem;
}

/* Effet "Sélectionné" */
.playlist-card.active {
  background: rgba(162, 56, 255, 0.15);
  border-color: var(--accent-purple);
}
.playlist-card.active i {
  color: var(--accent-purple);
}

/* Petite coche verte quand sélectionné (Optionnel mais joli) */
.playlist-card::after {
  content: "\f00c"; /* Check icône FontAwesome */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 5px;
  right: 8px;
  color: var(--accent-purple);
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.2s;
}
.playlist-card.active::after {
  opacity: 1;
}

/* Paramètres */
.settings-row {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.setting-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.setting-label {
  font-size: 0.85rem;
  color: #888;
}

.options-pill {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  padding: 4px;
}

.full-width-pill {
  width: 100%;
}

.pill {
  flex: 1;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 10px 5px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.pill.active {
  background: var(--accent-purple);
  color: #fff;
}

.config-footer {
  margin-top: 2.5rem;
}
.full-width {
  width: 100%;
  padding: 18px;
  font-size: 1.1rem;
}

@media (max-width: 600px) {
  .settings-row {
    flex-direction: column;
    gap: 1.5rem;
  }
  .playlist-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .config-modal-content {
    padding: 2rem 1.5rem;
  }
  .hub-main {
    padding-top: 120px;
  }
  .options-pill {
    flex-direction: column;
    border-radius: 12px;
  }
  .pill {
    padding: 12px;
    border-radius: 8px;
  }
}
/* Permet aux pilules de passer à la ligne si besoin (pour les années) */
.options-pill.flex-wrap {
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  border-radius: 12px;
}
.options-pill.flex-wrap .pill {
  flex: 0 0 auto; /* Empêche les pilules de s'étirer à l'infini */
  padding: 8px 16px;
}
/* --- NOUVEAUTÉS MULTIJOUEUR --- */

/* Boutons de la carte multijoueur */
.multi-actions {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.multi-actions button {
  flex: 1;
  padding: 12px;
  font-size: 0.95rem;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

/* Modale Rejoindre - Champs de saisie */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.form-input {
  width: 100%;
  padding: 15px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-body);
  transition: border-color 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 10px rgba(162, 56, 255, 0.2);
}
