/* ============================================================
   ÉCRAN LOBBY
   ============================================================ */
.lobby-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--brown);
}

.lobby-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--beige);
  flex: 1;
  text-align: center;
}

.lobby-code-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 20px 16px;
}

.lobby-code-label {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin: 0;
}

.lobby-code-big {
  font-family: 'Courier New', Courier, monospace;
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--amber);
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 10px 24px;
  min-width: 220px;
  text-align: center;
}

.lobby-players {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lobby-player-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.lobby-player-icon {
  font-size: 1.3rem;
  min-width: 28px;
  text-align: center;
}

.lobby-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
  vertical-align: middle;
}

.lobby-player-name {
  flex: 1;
  color: var(--beige);
  font-weight: 600;
}

.lobby-player-status {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

.lobby-player-status.joined {
  color: #4ade80;
}

.lobby-footer {
  padding: 16px;
  background: var(--brown);
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ============================================================
   ÉCRAN JOIN
   ============================================================ */
.join-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px;
  gap: 24px;
  height: 100%;
  background: var(--brown);
}

.join-layout h2 {
  color: var(--beige);
  font-size: 1.5rem;
  margin: 0;
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 360px;
}

.join-form input {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: var(--beige);
  font-size: 1rem;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  outline: none;
  transition: border-color 0.2s;
}

#join-name-input {
  text-transform: none;
  letter-spacing: normal;
}

.join-form input:focus {
  border-color: var(--amber);
}

.join-form input::placeholder {
  color: rgba(255,255,255,0.35);
  text-transform: none;
  letter-spacing: normal;
}

/* ============================================================
   OVERLAY "En attente" sur la grille draft (mode online)
   ============================================================ */
.draft-pending-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  z-index: 10;
  pointer-events: all;
}

.draft-pending-overlay-text {
  color: var(--beige);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  padding: 16px;
}

/* ============================================================
   TOAST ONLINE (connexion perdue, etc.)
   ============================================================ */
.online-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30,20,10,0.92);
  color: var(--beige);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--amber);
  z-index: 9999;
  white-space: nowrap;
  animation: toast-in 0.25s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================================
   SETUP — Mode online-draft
   ============================================================ */
.setup-mode-btn[data-mode="online-draft"].active {
  background: var(--amber);
  color: var(--brown);
}

.player-type-btn[data-type="remote"].active {
  background: #3b82f6;
  color: #fff;
}

.player-slot-host-badge {
  font-size: 0.7rem;
  background: var(--amber);
  color: var(--brown);
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
  margin-left: 4px;
}

/* ============================================================
   BANNERIÈRE DÉCONNEXION (mode online-draft)
   ============================================================ */
.online-disconnection-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(160, 45, 20, 0.95);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-bottom: 2px solid rgba(255,120,60,0.5);
  border-top: 2px solid rgba(255,120,60,0.5);
  animation: banner-in 0.25s ease;
}

.online-disconnection-banner .banner-message {
  flex: 1;
  min-width: 0;
}

.online-disconnection-banner .banner-quit-btn {
  flex-shrink: 0;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.5);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  transition: background 0.15s;
}

.online-disconnection-banner .banner-quit-btn:hover  { background: rgba(255,255,255,0.25); }
.online-disconnection-banner .banner-quit-btn:active { background: rgba(255,255,255,0.35); }

@keyframes banner-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   HINT CONTEXTUEL SOUS LE TOGGLE DE MODE
   ============================================================ */
.setup-mode-hint {
  margin: 8px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--brown);
  font-size: 0.82rem;
  line-height: 1.45;
}

.setup-mode-hint strong {
  color: #b45309;
}

/* Bouton quitter la partie online */
.btn-draft-quit {
  color: rgba(255, 180, 150, 0.85);
}
.btn-draft-quit:hover,
.btn-draft-quit:active {
  color: #fff;
  background: rgba(200, 60, 30, 0.5);
}
