/* ---- Lobby ---- */
.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-name { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: 0.2px; }

.me {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 500;
  font-size: 14px;
  transition: border-color 0.15s ease;
}
.me:hover { border-color: var(--line-strong); }
.me .avatar { width: 30px; height: 30px; border-radius: 50%; font-size: 14px; }

.lobby {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 56px) 80px;
}

.hero { margin-bottom: 56px; max-width: 680px; }
.hero h1 { font-size: clamp(38px, 6vw, 60px); letter-spacing: -0.02em; }
.hero p { margin-top: 16px; color: var(--cream-dim); font-size: clamp(16px, 2vw, 19px); line-height: 1.5; }

.rooms-block { margin-bottom: 48px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.block-head h2 { font-size: 26px; }
.block-tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--cream-dim);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 999px;
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.room-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--espresso-2);
  padding: 22px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.room-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }

.room-card .fav {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--cream-dim);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  z-index: 2;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.room-card .fav:hover { transform: scale(1.1); color: var(--accent); }
.room-card .fav.on { color: var(--accent); border-color: var(--accent); }

.room-card h3 { font-size: 23px; padding-right: 42px; }

.acct-menu {
  position: fixed;
  z-index: 60;
  background: var(--espresso-2);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  min-width: 170px;
}
.acct-item {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--cream);
}
.acct-item:hover { background: rgba(244, 234, 215, 0.06); }
.room-card .tagline { color: var(--cream-dim); font-size: 13.5px; margin-top: 6px; line-height: 1.4; }

.room-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.room-badges .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 9px 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  line-height: 1;
}
.room-badges .badge .icon { width: 13px; height: 13px; flex-shrink: 0; }
.room-badges .badge-mine {
  color: var(--honey);
  border-color: var(--honey);
  background: rgba(0, 0, 0, 0.2);
}
.room-badges .badge-private {
  color: var(--cream-dim);
  background: rgba(0, 0, 0, 0.18);
}
.room-card.mine { border-color: var(--honey); }
.room-card.mine:hover { border-color: var(--honey); }

.room-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--cream-dim);
}
.live .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 106, 75, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(201, 106, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 106, 75, 0); }
}
.enter {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}
.theme-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  color: var(--cream);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.theme-tile:hover { transform: translateY(-2px); }
.theme-tile.selected { border-color: var(--cream); }
.theme-tile .tdot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 2px rgba(0,0,0,0.25); }

.custom-colors { display: flex; gap: 16px; margin-top: 14px; }
.custom-colors label { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--cream-dim); }
.custom-colors input[type='color'] {
  width: 42px; height: 32px;
  border-radius: 8px;
  padding: 2px;
}
.modal-wide { max-width: 520px; }

.theme-pick {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--cream-dim);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.theme-pick::before {
  content: '';
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--pick, var(--accent));
}
.theme-pick.selected { border-color: var(--pick, var(--accent)); color: var(--cream); }

.empty-hint { color: var(--cream-dim); font-size: 14px; padding: 8px 2px; }
.empty-hint.hidden { display: none; }

/* Focus clavier visible et cohérent */
.theme-tile:focus-visible,
.room-card .fav:focus-visible,
.theme-pick:focus-visible,
.acct-item:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 106, 75, 0.12);
}

@media (max-width: 560px) {
  .hero { margin-bottom: 40px; }
  .block-head { flex-direction: column; align-items: flex-start; }
}
