/* ════════════════════════════════════════════
   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: #050d1a;         /* 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: #9370c8;
}
.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, #1a0a3a 0%, transparent 100%);
  border-bottom: 1px solid #4a1d8a44;
}

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, #c084fc, #a855f7, #7c3aed);
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header p {
  grid-column: 2;
  color: #9370c8;
  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 #4a1d8a44;
  padding: 5% 1rem 1.5rem;
  color: #9370c8;
  background: linear-gradient(180deg, transparent 0%, #1a0a3a 100%);
}

footer p{
  color: #9370c8;
  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 (zone de contenu centrale)
════════════════════════════════════════════ */
main {
  width: 100%;
  max-width: 600px;
  padding: 2rem 1rem 4rem;
  flex: 1;
}


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

/* Carte bleue foncée avec bordure violette */
.card {
  background: #0d1b35;
  border: 1px solid #2a1a5e;
  border-radius: 16px;
  padding: 1.5rem;
  margin : 1em 0 0 0;
}

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

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

input[type="text"] {
  flex: 1;
  background: #060f22;
  border: 1px solid #2a1a5e;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  color: #e8e8f0;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
input[type="text"]:focus     { border-color: #7c3aed; }
input[type="text"]::placeholder { color: #3d3060; }

/* Bouton standard violet */
.btn {
  background: #4a1d8a;
  color: #e2d4ff;
  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: #6324b8; }
.btn:active { transform: scale(0.97); }

/* Bouton principal (lancer la partie) */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff;
  padding: 0.9rem;
  font-size: 1.1rem;
  border-radius: 12px;
  margin-top: -0.5rem;
  letter-spacing: 0.04em;
}
.btn-primary:hover { background: linear-gradient(135deg, #9333ea, #6d28d9); }
.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: #1c0a40;
  border: 1px solid #4a1d8a;
  border-radius: 999px;
  padding: 0.3rem 0.75rem 0.3rem 1rem;
  font-size: 0.9rem;
  color: #d8b4fe;
}
.player-tag button {
  background: none;
  border: none;
  color: #7c3aed;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  transition: color 0.15s;
}
.player-tag button:hover { color: #e879f9; }

.empty-hint {
  color: #3d3060;
  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: #7c3aed;
  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: #e2d4ff;
}

/* Badge "Vérité" ou "Action" */
.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.verite {
  background: #0a400c;
  color: #60fa68;
  border: 1px solid #25eb39;
}
.type-badge.action {
  background: #0a400c;
  color: #60fa68;
  border: 1px solid #25eb39;
}
.type-badge.bois {
  background: #3a2e00;
  color: #fde047;
  border: 1px solid #ca9a04;
}

/* ════════════════════════════════════════════
   SWITCH TOGGLE — Mode Bois
════════════════════════════════════════════ */
.switch-card {
  margin-bottom: 1.5em;
  padding: 1rem 1.5rem;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.switch-desc {
  font-size: 0.8rem;
  color: #5a4a7a;
  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: #1c0a40;
  border: 1px solid #2a1a5e;
  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: #4a1d8a;
  border-radius: 50%;
  transition: transform 0.25s, background 0.25s;
}

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

/* Carte qui affiche la question */
.question-card {
  background: #0d1b35;
  border: 1px solid #2a1a5e;
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
/* Lueur violette décorative en haut de la carte */
.question-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: radial-gradient(ellipse at 50% 0%, #2a0a5a22 0%, transparent 70%);
  pointer-events: none;
}

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

/* Barre du bas avec la liste des joueurs */
.footer-bar {
  background: #0d1b35;
  border: 1px solid #2a1a5e;
  border-radius: 16px;
  padding: 1rem 1.5rem;
}
.footer-title {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4a1d8a;
  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: #1c0a40;
  color: #7c3aed;
  border: 1px solid #2a1a5e;
  transition: all 0.3s;
}
/* Joueur actif (surligné) */
.player-chip.active {
  background: #4a1d8a;
  color: #f0e6ff;
  border-color: #7c3aed;
  font-weight: 600;
}

/* Bouton Suivant */
.btn-next {
  width: 100%;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  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, #9333ea, #6d28d9); }
.btn-next:active { transform: scale(0.98); }

/* Bouton Quitter (discret) */
.btn-quit {
  width: 100%;
  background: transparent;
  color: #4a2080;
  border: 1px solid #2a1a5e;
  border-radius: 12px;
  padding: 0.65rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.btn-quit:hover { color: #9333ea; border-color: #4a1d8a; }

/* 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;
}

/* ════════════════════════════════════════════
   MODE CARDS — steppers de pourcentage
════════════════════════════════════════════ */
.mode-card {
  padding: 1rem 1.5rem;
  margin-top: 1em;
}

.mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mode-info {
  flex: 1;
}

.mode-hint {
  font-size: 0.72rem;
  color: #3d3060;
  margin-top: 0.1rem;
}

/* Stepper +/- */
.pct-stepper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.pct-val {
  min-width: 3rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fde047;
}

.pct-val.pct-spicy   { color: #ff6b35; }
.pct-val.pct-ultra   { color: #dd2222; }

.btn-step {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3a2e00;
  color: #fde047;
  border: 1px solid #ca9a04;
  transition: background 0.15s, transform 0.1s;
}
.btn-step:hover  { background: #5a4800; }
.btn-step:active { transform: scale(0.93); }

.btn-step-spicy {
  background: #3a1500;
  color: #ff6b35;
  border-color: #cc4400;
}
.btn-step-spicy:hover { background: #5a2200; }

.btn-step-ultra {
  background: #400a0a;
  color: #fc8484;
  border-color: #8a1d1d;
}
.btn-step-ultra:hover { background: #601010; }

/* Carte Ultra Spicy */
.mode-ultraspicy-card {
  border-color: #391a5e;
}

.ultraspicy-title {
  color: #b155f7 !important;
}

/* Fix gap before Lancer la partie button */
.btn-primary {
  margin-top: 1em !important;
}

/* Warning total % */
.pct-warning {
  margin-top: 0.75rem;
  padding: 0.4rem 0.8rem;
  background: #3a0a0a;
  border: 1px solid #8a1d1d;
  border-radius: 8px;
  color: #ff6b6b;
  font-size: 0.82rem;
}

/* ════════════════════════════════════════════
   BADGES Spicy / Ultra Spicy
════════════════════════════════════════════ */
.type-badge.spicy {
  background: #3a1500;
  color: #ff8c42;
  border: 1px solid #ff6b35;
}
.type-badge.ultraspicy {
  background: #400a0a;
  color: #feb4b4;
  border: 1px solid #ed3a3a;
}

/* Switch bois caché (remplacé par stepper) */
#switch-bois { display: none; }

/* ════════════════════════════════════════════
   MODE SOFT — stepper vert
════════════════════════════════════════════ */
.mode-soft-card {
  border-color: #2a1a5e;
}

.soft-title {
  color: #4ade80 !important;
}

.pct-val.pct-soft { color: #4ade80; }

.btn-step-soft {
  background: #0a2e10;
  color: #4ade80;
  border: 1px solid #166534;
}
.btn-step-soft:hover { background: #14532d; }

/* ════════════════════════════════════════════
   BADGES COMBINÉS — Vérité/Action × mode
════════════════════════════════════════════ */

/* Soft : garde les couleurs d'origine */
/* .verite et .action existent déjà */

/* Spicy : teinte orange */
.type-badge.verite-spicy {
  background: #2a1200;
  color: #ffa04a;
  border: 1px solid #ff6b35;
}
.type-badge.action-spicy {
  background: #3a0a00;
  color: #ff6b35;
  border: 1px solid #cc4400;
}

/* Ultra Spicy : teinte rouge-foncé (couleurs de l'utilisateur) */
.type-badge.verite-ultra {
  background: #400a0a;
  color: #feb4b4;
  border: 1px solid #8a1d1d;
}
.type-badge.action-ultra {
  background: #400a0a;
  color: #fc8484;
  border: 1px solid #ed3a3a;
}
