/* ════════════════════════════════════════════
   RESET & BASE
   On repart de zéro : supprime les marges
   et paddings par défaut du navigateur
════════════════════════════════════════════ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #1a051a;         /* fond bleu très sombre */
  color: #e8e8f0;              /* texte blanc cassé */
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}


/* ════════════════════════════════════════════
   HEADER
════════════════════════════════════════════ */
.home p{
  color: #fa15cc;
}
.home img{
  width: 25%;
  height: auto;
}
.home {
  grid-column: 1;
  text-align: left;
}

@media (max-width: 1150px) {
  .home img{
      width: 50%;
  }
}

header {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  width: 100%;
  padding: 2em 1em 2%;
  background: linear-gradient(180deg, #3b0035 0%, transparent 100%);
  border-bottom: 1px solid #ca04b644;
}

header h1 {
  grid-column: 2;
  font-size: clamp(2rem, 6vw, 3.5rem); /* taille responsive */
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fd47dc, #fa15ee, #ea08db);
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header p {
  grid-column: 2;
  color: #fa15e7;
  font-size: 0.9rem;
  margin-top: 0.4rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.header-center {
  grid-column: 2;
  text-align: center;
}

footer{
  display: grid;
  grid-column: 1fr 1fr 1fr;
  width: 100%;
  border-top: 1px solid #ca04c744;
  padding: 5% 1rem 1.5rem;
  color: #fa15e3;
  background: linear-gradient(180deg, transparent 0%, #3b0038 100%);
}

footer p{
  color: #fa15cc;
  font-size: 0.9rem;
  margin-top: 0.4rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-left{
  grid-column: 1;
  text-align: left;
}
.footer-right{
  grid-column: 3;
  text-align: right;
}

/* ════════════════════════════════════════════
   MAIN
════════════════════════════════════════════ */
main {
  width: 100%;
  max-width: 600px;
  padding: 2rem 1rem 4rem;
  flex: 1;
}


/* ════════════════════════════════════════════
   ÉCRAN SETUP (ajout des joueurs)
════════════════════════════════════════════ */
#screen-setup {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Carte bleue foncée avec bordure violette */
.card {
  margin : -0.5em 0 0 0;
  background: #350d31;
  border: 1px solid #850e71;
  border-radius: 16px;
  padding: 1.5rem;
}

.card-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fa15e7;
  margin-bottom: 1rem;
}

/* Ligne input + bouton côte à côte */
.input-row {
  display: flex;
  gap: 0.5rem;
}

input[type="text"] {
  flex: 1;
  background: #210622;
  border: 1px solid #850e7d;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  color: #f0e8ef;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
input[type="text"]:focus{ border-color: #df08ea; }
input[type="text"]::placeholder { color: #6c1271; }

/* Bouton standard violet */
.btn {
  background: #ca04a2;
  color: #fdc7fe;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn:hover  { background: #d906c7; }
.btn:active { transform: scale(0.97); }

/* Bouton principal (lancer la partie) */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #e308ea, #c706d9);
  color: #fff;
  padding: 0.9rem;
  font-size: 1.1rem;
  border-radius: 12px;
  margin-top: -0.5em;
  letter-spacing: 0.04em;
}
.btn-primary:hover    { background: linear-gradient(135deg, #ee47fd, #f50be9); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; }

/* Liste des joueurs ajoutés */
#player-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  min-height: 1rem;
}

/* Pastille joueur avec bouton supprimer */
.player-tag {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #400642;
  border: 1px solid #9f04ca;
  border-radius: 999px;
  padding: 0.3rem 0.75rem 0.3rem 1rem;
  font-size: 0.9rem;
  color: #fd8ae4;
}
.player-tag button {
  background: none;
  border: none;
  color: #ea08e3;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  transition: color 0.15s;
}
.player-tag button:hover { color: #e879f9; }

.empty-hint {
  color: #71126c;
  font-size: 0.9rem;
  font-style: italic;
  padding: 0.5rem 0;
}


/* ════════════════════════════════════════════
   ÉCRAN JEU
════════════════════════════════════════════ */
#screen-game {
  display: none;            /* caché par défaut, affiché par le JS */
  flex-direction: column;
  gap: 1.5rem;
}

/* En-tête du tour (nom du joueur + badge) */
.turn-title{
  display: grid;
  grid-column: 1fr 1fr;
  margin-bottom: 0.3rem;
}

.turn-header { text-align: center; }

.turn-label {
  grid-column: 1;
  font-size: 1.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #df08ea;
  text-align: right;
}

.turn-player {
  margin: 0 0 0 0.2em;
  text-align: left;
  grid-column: 2;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fbc7fe;
}

/* Badge situation ou spicy */
.type-badge {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.3rem 1.2rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.type-badge.situation {
  background: #0a400c;
  color: #60fa68;
  border: 1px solid #25eb39;
}
.type-badge.spicy {
  background: #400a0c;
  color: #f85e5e;
  border: 1px solid #ed3a40;
}

/* ════════════════════════════════════════════
   SWITCH TOGGLE — Spicy
════════════════════════════════════════════ */
.switch-card {
  padding: 1rem 1.5rem;
  width: 100%;
  margin: -0.5em 0 0 0;
}
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.switch-desc {
  font-size: 0.8rem;
  color: #920e7c;
  margin-top: 0.2rem;
}

/* Le toggle lui-même */
.toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #420641;
  border: 1px solid #850e6b;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: #ca04a6;
  border-radius: 50%;
  transition: transform 0.25s, background 0.25s;
}

/* État activé */
.toggle input:checked + .toggle-slider {
  background: #3a0000;
  border-color: #ca0404;
}
.toggle input:checked + .toggle-slider::before {
  transform: translate(24px, -50%);
  background: #fd4747;
}

/* Carte qui affiche la question */
.question-card {
  background: #350d35;
  border: 1px solid #850e7b;
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  min-height: 160px;
  display: grid;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.question-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: radial-gradient(ellipse at 50% 0%, #5a0a5922 0%, transparent 70%);
  pointer-events: none;
}

#question-text {
  font-size: clamp(1rem, 3vw, 1.3rem);
  line-height: 1.6;
  color: #f0e8f0;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

/* Barre du bas avec la liste des joueurs */
.footer-bar {
  background: #350d2e;
  border: 1px solid #850e83;
  border-radius: 16px;
  padding: 1rem 1.5rem;
}
.footer-title {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ca04bd;
  margin-bottom: 0.6rem;
}
.players-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Pastille joueur dans la barre du bas */
.player-chip {
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: #42063a;
  color: #ea08db;
  border: 1px solid #850e71;
  transition: all 0.3s;
}
/* Joueur actif (surligné) */
.player-chip.active {
  background: #ca04ac;
  color: #fffbe6;
  border-color: #ea08bd;
  font-weight: 600;
}

/* Bouton Suivant */
.btn-next {
  width: 100%;
  background: linear-gradient(135deg, #ea08d7, #d906af);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.2s, transform 0.1s;
}
.btn-next:hover  { background: linear-gradient(135deg, #fd47f4, #f50bed); }
.btn-next:active { transform: scale(0.98); }

/* Bouton Quitter (discret) */
.btn-quit {
  width: 100%;
  background: transparent;
  color: #a1078c;
  border: 1px solid #850e6f;
  border-radius: 12px;
  padding: 0.65rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.btn-quit:hover { color: #fd47e5; border-color: #ca04a9; }
/* Warning */
section{
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #350d0d;
  border: 1px solid #8a1d1d44;
  border-radius: 16px;
  padding: 1.5rem;
  width: calc(100% - 0.5rem) calc(100% - 0.5rem) calc(100%) calc(100% - 0.5rem);
  text-align: center;
  transition: border-color 0.3s ease-in-out, transform 0.3s ease-in-out;
}
section p{
  color:#c87070; 
}
section h2{
  color:#ff0000; 
}

section h4{
  color:#ff0000
}

section img{
  width: 17px;
}


/* ════ COMPTEUR SPICY +/- ════ */
.spicy-counter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.spicy-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #850e7b66;
  background: #420641;
  color: #fd8ae4;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.spicy-btn:hover  { background: #ca04a2; border-color: #ea08d7; color: #fff; }
.spicy-btn:active { transform: scale(0.93); }
.spicy-val {
  min-width: 42px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fd8ae4;
}
