/* ============================================================================
   QZR vNext — Host « grand écran » (projection 16:9) — F6
   ----------------------------------------------------------------------------
   Vue plein écran que l'hôte projette (vidéoprojecteur / TV). 3 états mirroir du
   flux joueur, mais en PAYSAGE, gros texte, sans contrôles perso :
     Host 1 Lobby     — code + QR + joueurs (clair)
     Host 2 Question  — question + tuiles + timer + « N/M ont répondu » (SOMBRE)
     Host 3 Final     — podium (g) + classement (d) (clair)
   Réf : docs/vnext/mockups/host_large_screen.png. Basé sur les tokens vNext.
   État piloté par la classe is-lobby / is-question / is-final sur #hostBigScreen.
   ============================================================================ */

.qzr-host {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; flex-direction: column;
  padding: clamp(16px, 3vw, 40px);
  color: var(--qz-text, #10211B);
  background: var(--qz-screen, #F1FAF6);
  overflow: hidden;
}
.qzr-host.is-question { background: linear-gradient(165deg, var(--qz-600, #0F6E56), var(--qz-900, #06342A)); color: #FFFFFF; }

.qzr-host__view { display: none; flex: 1; min-height: 0; flex-direction: column; }
.qzr-host.is-lobby    .qzr-host__view[data-host-view="lobby"],
.qzr-host.is-question .qzr-host__view[data-host-view="question"],
.qzr-host.is-final    .qzr-host__view[data-host-view="final"] { display: flex; }

.qzr-host__close {
  position: absolute; top: 18px; right: 18px; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%;
  border: none; background: rgba(0, 0, 0, .08); color: inherit; font-size: 1.1rem; cursor: pointer;
}
.qzr-host.is-question .qzr-host__close { background: rgba(255, 255, 255, .16); color: #FFFFFF; }
.qzr-host__mascot { position: absolute; top: 16px; right: 74px; width: clamp(48px, 5vw, 84px); height: clamp(48px, 5vw, 84px); z-index: 2; }
.qzr-host__mascot svg { width: 100%; height: 100%; }
.qzr-host:not(.is-lobby) .qzr-host__mascot { display: none; }

/* Header commun (lobby / final) */
.qzr-host__top { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(12px, 2vw, 28px); padding-right: 120px; }
.qzr-host__title { font-size: clamp(1.4rem, 2.4vw, 2.2rem); font-weight: 800; margin: 0; }
.qzr-host__count, .qzr-host__mvp {
  margin-left: auto; display: inline-flex; align-items: center; gap: 9px;
  background: var(--qz-accent-soft, #E1F5EE); color: var(--qz-accent-ink, #0A4F40);
  font-size: clamp(.9rem, 1.4vw, 1.15rem); font-weight: var(--qz-fw-strong, 500);
  padding: var(--qz-2) var(--qz-4); border-radius: var(--qz-r-pill, var(--qz-r-pill));
}
.qzr-host__count i, .qzr-host__mvp i { color: var(--qz-accent, #16A87A); }

/* ── Host 1 : LOBBY ─────────────────────────────────────────────────────────── */
.qzr-host__lobbybody { flex: 1; display: grid; grid-template-columns: minmax(280px, 32%) 1fr; gap: clamp(16px, 3vw, 40px); min-height: 0; }
.qzr-host__codecard {
  background: var(--qz-surface, #FFFFFF); border-radius: var(--qz-r-card, 16px);
  padding: clamp(16px, 2vw, 28px); display: flex; flex-direction: column; align-items: center; gap: 12px; justify-content: center;
}
.qzr-host__join { font-size: clamp(1rem, 1.5vw, 1.3rem); color: var(--qz-muted, #5F7B72); text-align: center; }
.qzr-host__join b { color: var(--qz-accent-ink, #0F6E56); }
.qzr-host__qr {
  width: clamp(120px, 12vw, 200px); aspect-ratio: 1; border: 2px solid var(--qz-line, #DCEFE8); border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: clamp(3rem, 6vw, 5rem); color: var(--qz-accent-ink, #0F6E56); background: #FFFFFF;
}
.qzr-host__qr img, .qzr-host__qr canvas, .qzr-host__qr svg { width: 100%; height: 100%; }
.qzr-host__codelabel { font-size: clamp(.9rem, 1.2vw, 1.1rem); color: var(--qz-muted, #5F7B72); }
.qzr-host__code { font-size: clamp(2rem, 4.5vw, 4.4rem); font-weight: 800; letter-spacing: .06em; color: var(--qz-accent-ink, #0F6E56); line-height: 1.05; text-align: center; }
.qzr-host__players { min-width: 0; }
.qzr-host__playerslabel { font-size: clamp(1rem, 1.5vw, 1.3rem); color: var(--qz-muted, #5F7B72); margin-bottom: var(--qz-4); }
.qzr-host__playersgrid { display: flex; flex-wrap: wrap; gap: 12px; align-content: flex-start; overflow: auto; max-height: 72vh; }
.qzr-host__pchip {
  display: flex; align-items: center; gap: 10px; background: var(--qz-surface, #FFFFFF); border: 1px solid var(--qz-line, #DCEFE8);
  border-radius: var(--qz-r-pill, var(--qz-r-pill)); padding: var(--qz-2) var(--qz-5) var(--qz-2) var(--qz-2); font-size: clamp(.9rem, 1.3vw, 1.15rem); font-weight: var(--qz-fw-strong, 500);
  animation: qzrHostPop .35s var(--qz-ease-pop, cubic-bezier(.2, 1.5, .4, 1));
}
.qzr-host__pava { width: 36px; height: 36px; border-radius: 50%; background: var(--qz-accent, #16A87A); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: 0 0 auto; }
@keyframes qzrHostPop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.qzr-host__playersempty { color: var(--qz-muted, #5F7B72); font-size: clamp(1rem, 1.4vw, 1.2rem); }

/* ── Host 2 : QUESTION (sombre) ─────────────────────────────────────────────── */
.qzr-host__qhead { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(8px, 1.5vw, 20px); }
.qzr-host__qnum { flex: 1; text-align: center; font-size: clamp(1.1rem, 1.8vw, 1.5rem); font-weight: var(--qz-fw-strong, 500); color: rgba(255, 255, 255, .92); }
.qzr-host__timer {
  flex: 0 0 auto; width: clamp(56px, 5vw, 84px); aspect-ratio: 1; border-radius: 50%; border: 4px solid #FFFFFF; color: #FFFFFF;
  display: flex; align-items: center; justify-content: center; font-size: clamp(1.5rem, 2.5vw, 2.4rem); font-weight: 800;
}
.qzr-host__qtext { text-align: center; font-size: clamp(1.6rem, 3.3vw, 3rem); font-weight: var(--qz-fw-strong, 500); color: #FFFFFF; margin: clamp(10px, 2vw, 26px) auto; max-width: 26ch; }
.qzr-host__answers { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 22px); }
.qzr-host__ans { display: flex; align-items: center; gap: 16px; background: #FFFFFF; border-radius: 16px; padding: clamp(14px, 1.8vw, 26px); font-size: clamp(1.1rem, 2vw, 1.7rem); font-weight: var(--qz-fw-strong, 500); color: var(--qz-text, #10211B); box-shadow: 0 10px 24px -14px rgba(6, 52, 42, .6); }
.qzr-host__anskey { width: clamp(38px, 3.2vw, 52px); aspect-ratio: 1; border-radius: 10px; background: var(--qz-accent, #16A87A); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: clamp(1rem, 1.6vw, 1.4rem); flex: 0 0 auto; }
.qzr-host__ans.correct { background: #ECFBF4; box-shadow: inset 0 0 0 3px var(--qz-accent, #16A87A); }
.qzr-host__answered { text-align: center; color: rgba(255, 255, 255, .85); font-size: clamp(1rem, 1.5vw, 1.3rem); font-weight: var(--qz-fw-strong, 500); margin-top: clamp(12px, 2vw, 24px); min-height: 1em; }

/* ── Host 3 : FINAL (podium + classement) ───────────────────────────────────── */
.qzr-host__finalbody { flex: 1; display: grid; grid-template-columns: minmax(300px, 40%) 1fr; gap: clamp(16px, 3vw, 44px); align-items: center; min-height: 0; }
.qzr-host__podium { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: clamp(14px, 2vw, 28px); padding-top: 40px; }
.qzr-host__pslot { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qzr-host__pslot--1 { order: 2; }
.qzr-host__pslot--2 { order: 1; margin-bottom: clamp(20px, 3vw, 44px); }
.qzr-host__pslot--3 { order: 3; margin-bottom: clamp(34px, 5vw, 70px); }
.qzr-host__pslot .qzr-host__pava { box-shadow: 0 6px 16px -6px rgba(6, 52, 42, .5); }
.qzr-host__pslot--1 .qzr-host__pava { width: clamp(72px, 7vw, 118px); height: clamp(72px, 7vw, 118px); font-size: clamp(1.6rem, 2.6vw, 2.6rem); background: var(--qz-accent, #16A87A); }
.qzr-host__pslot--2 .qzr-host__pava { width: clamp(56px, 5.4vw, 90px); height: clamp(56px, 5.4vw, 90px); font-size: clamp(1.2rem, 2vw, 2rem); background: var(--qz-500, #0F8A64); }
.qzr-host__pslot--3 .qzr-host__pava { width: clamp(54px, 5vw, 84px); height: clamp(54px, 5vw, 84px); font-size: clamp(1.2rem, 1.9vw, 1.9rem); background: var(--qz-200, #5DCAA5); }
.qzr-host__pname { font-size: clamp(.95rem, 1.4vw, 1.3rem); font-weight: var(--qz-fw-strong, 500); }
.qzr-host__pslot--2 .qzr-host__pname, .qzr-host__pslot--3 .qzr-host__pname { color: var(--qz-muted, #5F7B72); }
.qzr-host__pcrown {
  display: inline-flex; align-items: center; gap: 6px; background: var(--qz-accent-deep, #0F6E56); color: #FFFFFF;
  font-size: clamp(.7rem, 1vw, .9rem); font-weight: 800; padding: var(--qz-1) var(--qz-3); border-radius: var(--qz-r-pill, var(--qz-r-pill));
}
.qzr-host__pcrown i { color: var(--qz-energy, #F5C542); }
.qzr-host__standings { background: var(--qz-surface, #FFFFFF); border-radius: var(--qz-r-card, 16px); padding: clamp(8px, 1vw, 16px) clamp(10px, 1.4vw, 22px); overflow: auto; max-height: 80vh; }
.qzr-host__srow { display: flex; align-items: center; gap: 16px; padding: clamp(10px, 1.4vw, 18px) 4px; border-bottom: 1px solid var(--qz-line, #DCEFE8); font-size: clamp(1rem, 1.6vw, 1.4rem); }
.qzr-host__srow:last-child { border-bottom: none; }
.qzr-host__srank { font-weight: 800; color: var(--qz-muted, #5F7B72); min-width: 1.5em; text-align: center; }
.qzr-host__sava { width: clamp(36px, 3vw, 48px); height: clamp(36px, 3vw, 48px); border-radius: 10px; background: var(--qz-accent, #16A87A); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: 0 0 auto; }
.qzr-host__sname { flex: 1; font-weight: var(--qz-fw-strong, 500); min-width: 0; }
.qzr-host__sscore { font-weight: 800; white-space: nowrap; }
.qzr-host__confetti { position: absolute; inset: -10px 0 auto; height: 60px; pointer-events: none; }
.qzr-host__confetti i { position: absolute; width: 10px; height: 10px; border-radius: 2px; opacity: .85; }

/* Bouton « Grand écran » dans le lobby joueur */
.qzr-lobby-hostbtn {
  width: 100%; margin-top: var(--qz-3);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--qz-surface, #FFFFFF); border: 1.5px solid var(--qz-line-strong, #CDE7DC);
  border-radius: var(--qz-r-control, 12px); padding: var(--qz-3) var(--qz-4);
  font-size: .95rem; font-weight: var(--qz-fw-strong, 500); color: var(--qz-accent-ink, #0F6E56);
}
