@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@800;900&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --or-clair: #FFDA44;
  --or-fonce: #E08604;
  --accent: #FDCA31;
  --gris: #D9D9D9;
  --gris-mute: #b8b8b8;
  --noir: #0a0a0b;
  --noir-chaud: #1a1006;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--noir);
  color: #fff;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.titre {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.degrade-or {
  background: linear-gradient(90deg, var(--or-clair), var(--or-fonce));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ecran {
  min-height: 100dvh;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(255,218,68,0.16) 0%, rgba(255,218,68,0) 55%),
    linear-gradient(165deg, #0a0a0b 0%, #16110a 55%, #1d1206 100%);
}

.ecran__contenu {
  position: relative;
  z-index: 1;
  flex-grow: 1;
  width: 100%;
  box-sizing: border-box;
  padding: 64px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.logo-flottant {
  width: 108px;
  height: 108px;
  object-fit: contain;
  animation: flotter 4.5s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(255, 180, 20, 0.28));
}

@keyframes flotter {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.wordmark { font-size: 26px; }
.souscription {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gris-mute);
}

.carte {
  width: 100%;
  max-width: 342px;
  box-sizing: border-box;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,218,68,0.22);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.champ-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.champ-code {
  box-sizing: border-box;
  width: 100%;
  text-align: center;
  font-family: 'Archivo', sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #fff;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  padding: 14px 8px;
}
.champ-code:focus { outline: 2px solid var(--or-clair); }

.champ-texte {
  box-sizing: border-box;
  width: 100%;
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  padding: 14px 16px;
}
.champ-texte:focus { outline: 2px solid var(--or-clair); }

.bouton-principal {
  width: 100%;
  box-sizing: border-box;
  padding: 15px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--or-clair), var(--or-fonce));
  color: #1a1000;
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(255,180,20,0.28);
}
.bouton-principal:disabled { opacity: 0.5; cursor: not-allowed; }
@media (hover: hover) {
  .bouton-principal:hover { filter: brightness(1.06); }
}

.separateur {
  width: 100%;
  max-width: 342px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.separateur__ligne { flex-grow: 1; height: 1px; background: rgba(255,255,255,0.12); }
.separateur__texte {
  font-size: 11px; color: #7a7a7a; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}

.lien-ghost {
  width: 100%;
  max-width: 342px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255,218,68,0.35);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}
@media (hover: hover) {
  .lien-ghost:hover { background: rgba(255,218,68,0.08); }
}

.pied {
  position: relative;
  z-index: 1;
  padding-bottom: 22px;
  font-size: 11px;
  color: #6b6b6b;
  text-align: center;
}

.message-erreur {
  color: #ff6b6b;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* --- Salle d'attente --- */
.salle {
  min-height: 100dvh;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: #0a0a0b;
  display: flex;
  flex-direction: column;
}

#vue-attente { display: flex; flex-direction: column; flex-grow: 1; width: 100%; }

.salle__fond {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #2a1c08 0%, #1a1006 45%, #0a0a0b 100%);
}
.salle__fond video, .salle__fond iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
}
.salle__voile {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,11,0) 0%, rgba(10,10,11,0.55) 55%, #0a0a0b 88%);
}

.salle__barre-haute {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  padding: 18px 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bouton-rond {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pastille-code {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,218,68,0.3);
  border-radius: 999px;
}
.pastille-code__label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gris-mute);
}
.pastille-code__valeur {
  font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 17px;
  letter-spacing: 0.14em; color: var(--accent);
}

.salle__centre {
  position: relative;
  z-index: 2;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 24px;
}

.logo-halo { position: relative; width: 128px; height: 128px; display: flex; align-items: center; justify-content: center; }

.decompte {
  flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
}
.decompte__logo {
  width: 96px; height: 96px; object-fit: contain;
  animation: decompteLogoPulse 1s ease-in-out infinite;
  filter: drop-shadow(0 6px 18px rgba(255,180,20,0.35));
}
.decompte__chiffre {
  font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 56px;
  color: var(--or-clair, #FFDA44); letter-spacing: 0.02em;
}
.decompte__chiffre--anime { animation: decompteChiffrePop 0.5s cubic-bezier(.34,1.56,.64,1); }
@keyframes decompteLogoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
@keyframes decompteChiffrePop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}
.logo-halo__anneau {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--accent);
  animation: anneau 2.6s ease-out infinite;
}
.logo-halo__anneau--delai { animation-delay: 1.3s; }
@keyframes anneau {
  0% { transform: scale(0.85); opacity: 0.5; }
  70% { transform: scale(1.4); opacity: 0; }
  100% { opacity: 0; }
}
.logo-halo img {
  width: 96px; height: 96px; object-fit: contain;
  animation: flotter 4.5s ease-in-out infinite;
  filter: drop-shadow(0 6px 18px rgba(255,180,20,0.35));
}

.statut-attente { font-size: 13px; font-weight: 600; color: var(--gris); display: flex; align-items: center; gap: 4px; }
.statut-attente span { animation: clignoter 1.4s ease-in-out infinite; }
.statut-attente span:nth-child(2) { animation-delay: .2s; }
.statut-attente span:nth-child(3) { animation-delay: .4s; }

.qr-rejoindre {
  display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 6px;
  padding: 12px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,218,68,0.25); border-radius: 16px;
}
.qr-rejoindre img { border-radius: 8px; background: #fff; padding: 6px; }
.qr-rejoindre__legende { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--gris-mute); }
@keyframes clignoter { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

.salle__joueurs { position: relative; z-index: 2; padding: 0 20px 14px; box-sizing: border-box; }
.salle__joueurs-titre {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gris-mute); margin-bottom: 10px;
}
.joueurs-liste { display: flex; flex-wrap: wrap; gap: 8px; }
.joueur-chip { padding: 8px 14px; background: rgba(255,255,255,0.08); border-radius: 999px; font-size: 13px; font-weight: 700; }

.salle__animateur {
  position: relative; z-index: 2; box-sizing: border-box;
  padding: 14px 20px 26px; display: flex; flex-direction: column; gap: 8px;
}
.salle__animateur-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #7a7a7a; text-align: center;
}

/* ==================== BOUTONS GÉNÉRIQUES (jeu, classement) ==================== */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 999px; padding: 13px 22px;
  font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 13px;
  letter-spacing: 0.02em; text-transform: uppercase; cursor: pointer;
}
.bouton--or { background: linear-gradient(100deg, var(--or-clair), var(--or-fonce)); color: #1a1000; box-shadow: 0 8px 20px rgba(255,180,20,0.25); }
.bouton--fantome { background: transparent; border: 1px solid rgba(255,255,255,0.22); color: #fff; }
.bouton--petit { padding: 8px 14px; font-size: 11px; }
.bouton:disabled { opacity: 0.6; cursor: not-allowed; }

/* ==================== DÉROULÉ DE JEU (lot 3) ==================== */
.jeu {
  position: relative;
  z-index: 2;
  width: 100%;
  flex-grow: 1;
  box-sizing: border-box;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.jeu__entete { display: flex; flex-direction: column; gap: 8px; }
.jeu__progression { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gris-mute); }
.jeu__barre-temps { width: 100%; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.12); overflow: hidden; }
.jeu__minuteur-controles { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.jeu__barre-temps-remplissage { height: 100%; width: 100%; background: linear-gradient(90deg, var(--or-clair), var(--or-fonce)); transition: width 0.1s linear; }

.jeu__enonce { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.jeu__image { max-width: 100%; max-height: 160px; border-radius: 14px; object-fit: cover; }
.jeu__enonce-texte { font-size: 18px; font-weight: 800; line-height: 1.3; }
.jeu__indice { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 0.03em; }

.jeu__zone-reponse { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; }

.tuiles-reponses { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tuile {
  display: flex; flex-direction: column; padding: 12px 14px; border: none; border-radius: 14px;
  color: #fff; font-weight: 700; font-size: 14px; text-align: left; cursor: pointer;
}
.tuile__ligne { display: flex; align-items: center; gap: 10px; }
.tuile__forme { font-size: 18px; opacity: 0.9; }
.tuile--rouge { background: #e21b3c; }
.tuile--bleu { background: #1368ce; }
.tuile--jaune { background: #d89e00; }
.tuile--vert { background: #26890c; }
.tuile--estompee { opacity: 0.35; }
.tuile--choisie { outline: 3px solid #fff; }
.tuile--bonne-reponse { outline: 3px solid #FFDA44; box-shadow: 0 0 0 4px rgba(255,218,68,0.3); }
.tuile:disabled { cursor: default; }

.tuiles-vf { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tuile-vf {
  padding: 28px 14px; border: none; border-radius: 14px; color: #fff;
  font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 18px; cursor: pointer;
}
.tuile-vf--vrai { background: #26890c; }
.tuile-vf--faux { background: #e21b3c; }
.tuile-vf:disabled { cursor: default; }

.reponse-courte-form { display: flex; flex-direction: column; gap: 12px; }
.reponse-courte-form input {
  font-family: 'Manrope', sans-serif; font-size: 16px; color: #fff; text-align: center;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.16); border-radius: 12px; padding: 14px;
}

.jeu__statut { text-align: center; font-size: 14px; font-weight: 700; padding: 8px; }
.jeu__statut--correct { color: #6fe07a; }
.jeu__statut--incorrect { color: #ff8a8a; }

.distribution { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.distribution__ligne { display: grid; grid-template-columns: 90px 1fr 28px; align-items: center; gap: 8px; font-size: 12px; }
.distribution__label { color: var(--gris-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.distribution__barre-fond { height: 10px; border-radius: 999px; background: rgba(255,255,255,0.1); overflow: hidden; }
.distribution__barre { height: 100%; background: #1368ce; }
.distribution__barre--bonne { background: #26890c; }
.distribution__valeur { text-align: right; color: var(--gris-mute); }

.annonces-classement { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 6px; }
.annonce-ligne {
  font-size: 13px; font-weight: 700; padding: 8px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.05); text-align: center;
}
.annonce-ligne--serie { color: #ffb02e; }
.annonce-ligne--montee { color: #6fe07a; }
.badge-serie { font-size: 11px; font-weight: 800; color: #ffb02e; }

.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding: 20px 0; }
.podium__marche {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 12px; border-radius: 14px 14px 0 0; min-width: 90px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,218,68,0.2);
}
.podium__marche--1 { order: 2; height: 150px; background: rgba(255,218,68,0.14); border-color: var(--or-clair); }
.podium__marche--2 { order: 1; height: 116px; }
.podium__marche--3 { order: 3; height: 96px; }
.podium__rang { font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 20px; color: var(--accent); }
.podium__pseudo { font-weight: 700; font-size: 13px; text-align: center; }
.podium__score { font-size: 12px; color: var(--gris-mute); }

.classement-reste { display: flex; flex-direction: column; gap: 6px; max-width: 320px; margin: 0 auto; width: 100%; }
.classement-ligne { display: flex; justify-content: space-between; font-size: 13px; padding: 8px 14px; background: rgba(255,255,255,0.04); border-radius: 10px; }

/* ==================== RESPONSIVE : TABLETTE ET DESKTOP ==================== */
/* Mobile d'abord par défaut ci-dessus ; on élargit progressivement la mise en
   page sur des écrans plus grands, sans jamais dépasser une largeur de lecture
   confortable (le contenu reste centré, comme une "carte" sur la page). */

@media (min-width: 700px) {
  .ecran {
    max-width: none;
    min-height: 100dvh;
  }
  .ecran__contenu {
    max-width: 480px;
    margin: 0 auto;
    padding: 72px 24px 40px;
    gap: 32px;
  }
  .logo-flottant { width: 128px; height: 128px; }
  .wordmark { font-size: 30px; }

  .salle {
    max-width: 680px;
    min-height: auto;
    height: 780px;
    margin: 32px auto;
    border-radius: 28px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.55);
  }
}

@media (min-width: 1024px) {
  .ecran__contenu { max-width: 520px; padding: 96px 24px 56px; }

  .salle { max-width: 760px; height: 820px; }
  .logo-halo { width: 148px; height: 148px; }
  .logo-halo img { width: 112px; height: 112px; }
  .joueurs-liste { gap: 10px; }
  .joueur-chip { font-size: 14px; padding: 9px 16px; }
}
