/* ============================================================
   display.css — Vue grand écran TV
   Lecture obligatoire à 5m+ : tout est gros, contrasté, sobre.
   ============================================================ */

:root {
  --bg:        #0b0b1f;
  --bg-2:      #1a1a3a;
  --fg:        #f8f8ff;
  --muted:     #9aa0c4;
  --accent:    #ffd166;
  --accent-2:  #ef476f;
  --ok:        #06d6a0;
  --pill-bg:   #1f1f44;
  --radius:    18px;
  --shadow:    0 10px 40px rgba(0,0,0,.4);
  --font:      system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: radial-gradient(1200px 800px at 20% 10%, var(--bg-2), var(--bg) 70%);
  color: var(--fg);
  font-family: var(--font);
  overflow: hidden;
}

.display {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

/* -------- Lobby ------------------------------------------------ */

.lobby {
  width: 100%;
  max-width: 1800px;
  padding: 4vh 4vw;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 4vh;
}

.lobby__header { text-align: center; }
.lobby__title {
  margin: 0;
  font-size: clamp(48px, 6vw, 96px);
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.lobby__subtitle {
  margin: 8px 0 0 0;
  font-size: clamp(20px, 1.6vw, 32px);
  color: var(--muted);
}

.lobby__pair {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 1.4fr;
  gap: 4vw;
  align-items: center;
}

/* -------- QR + URL --------------------------------------------- */

.qr-block { text-align: center; }

.qr {
  width: clamp(320px, 28vw, 520px);
  height: clamp(320px, 28vw, 520px);
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b0b1f;
  font-weight: 800;
  font-size: 80px;
  position: relative;
  overflow: hidden;
}
.qr__placeholder {
  background: repeating-linear-gradient(45deg, #0b0b1f, #0b0b1f 10px, #1a1a3a 10px, #1a1a3a 20px);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.qr canvas, .qr img, .qr svg { width: 100%; height: 100%; display: block; }

.join-url {
  margin-top: 24px;
  font-size: clamp(20px, 1.6vw, 28px);
  color: var(--muted);
  line-height: 1.4;
}
.join-url strong {
  display: inline-block;
  margin-top: 6px;
  padding: 8px 18px;
  background: var(--pill-bg);
  border-radius: 12px;
  font-size: clamp(22px, 1.8vw, 32px);
  color: var(--fg);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* -------- Liste des équipes ------------------------------------ */

.teams-block {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 32px 36px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.teams-block__title {
  margin: 0 0 24px 0;
  font-size: clamp(28px, 2.4vw, 40px);
  display: flex;
  align-items: center;
  gap: 16px;
}
.teams-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 56px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #1a1a3a;
  font-weight: 900;
  font-size: 28px;
}

.teams-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  overflow-y: auto;
}
.teams-list li {
  background: var(--pill-bg);
  padding: 18px 22px;
  border-radius: 14px;
  font-size: clamp(20px, 1.5vw, 28px);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: pop-in 320ms cubic-bezier(.2,1.6,.4,1) both;
}
.teams-list li::before {
  content: "▶";
  color: var(--accent);
  font-size: 0.9em;
}
.teams-list__empty {
  background: transparent !important;
  color: var(--muted);
  font-style: italic;
  font-weight: 500;
  animation: none !important;
}
.teams-list__empty::before { content: "" !important; }

@keyframes pop-in {
  from { opacity: 0; transform: scale(.85) translateY(8px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* -------- Footer ----------------------------------------------- */

.lobby__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 18px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--pill-bg);
  font-weight: 600;
}
.pill::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--muted);
}
.pill--idle::before     { background: var(--muted); }
.pill--connected::before { background: var(--ok); box-shadow: 0 0 12px var(--ok); }
.pill--error::before     { background: var(--accent-2); }
