:root {
  --bg: #0d0f14;
  --bg-soft: #14171f;
  --card: rgba(255, 255, 255, 0.045);
  --card-solid: #171a22;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eaf0;
  --muted: #8b93a3;
  --accent: #5865f2;
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --danger: #ed4245;
  --ok: #23a55a;
  --topbar-bg: rgba(13, 15, 20, 0.7);
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scrollbar-color: var(--accent) transparent; }
body {
  margin: 0;
  font-family: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(155, 89, 182, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
}
::selection { background: var(--accent); color: #fff; }

/* ===================== Connexion ===================== */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; width: 100%; }
.login-card {
  background: var(--card-solid);
  border: 1px solid var(--border);
  padding: 3rem 2.5rem;
  border-radius: 20px;
  text-align: center;
  max-width: 400px;
  width: calc(100% - 2rem);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 80px var(--accent-soft);
  animation: rise 0.5s ease;
}
.login-card h1 { margin: 0 0 0.6rem; font-size: 2rem; font-weight: 800; }
.login-card p { color: var(--muted); }
.error { color: var(--danger); }
.login-logo {
  width: 150px;
  border-radius: 24px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 34px var(--accent-soft);
  animation: logo-glow 4s ease-in-out 1.6s infinite;
}
@keyframes logo-glow {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 14px var(--accent)); }
}

/* ===================== Sidebar ===================== */
.sidebar {
  width: 230px;
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--bg-soft);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.3rem 1.2rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}
.logo-icon { filter: drop-shadow(0 0 8px var(--accent)); }
.logo-img { width: 34px; height: 34px; border-radius: 9px; flex: none; }

/* ===================== Splash (démarrage) ===================== */
#splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(700px 420px at 50% 42%, var(--accent-soft), transparent 65%),
    var(--bg);
  cursor: pointer;
  transition: opacity 0.5s ease;
}
#splash.done { opacity: 0; pointer-events: none; }
#splash img {
  width: min(230px, 55vw);
  border-radius: 34px;
  animation:
    splash-in 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.25) both,
    splash-pulse 1.4s ease-in-out 0.9s infinite;
}
#splash::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(340px, 70vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  animation: splash-halo 1.8s ease-in-out infinite;
  z-index: -1;
}
@keyframes splash-in {
  from { opacity: 0; transform: scale(0.45) rotate(-8deg); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes splash-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
  50% { transform: scale(1.045); filter: drop-shadow(0 0 26px var(--accent)); }
}
@keyframes splash-halo {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.92); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}
.no-anim #splash { display: none; }
.nav { flex: 1; padding: 0.4rem 0.7rem; display: flex; flex-direction: column; gap: 0.15rem; overflow-y: auto; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  background: none;
  border: none;
  border-radius: 9px;
  color: var(--muted);
  padding: 0.65rem 0.8rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.nav-item i { font-style: normal; width: 1.3rem; display: inline-flex; align-items: center; justify-content: center; }
.nav-item:hover { background: var(--card); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--text); box-shadow: inset 2.5px 0 0 var(--accent); }
.nav-item .soon {
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 20px;
  padding: 0.12rem 0.45rem;
  margin-left: auto;
}
.nav-sep { height: 1px; background: var(--border); margin: 0.55rem 0.4rem; }
.side-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.2rem;
  border-top: 1px solid var(--border);
}
.side-user img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--accent); }
.side-user-info { display: flex; flex-direction: column; line-height: 1.25; }
.side-user-info b { font-size: 0.88rem; }
.side-user-info a { font-size: 0.75rem; color: var(--muted); text-decoration: none; }
.side-user-info a:hover { color: var(--danger); }

/* ===================== Contenu ===================== */
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.8rem;
  border-bottom: 1px solid var(--border);
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.guild-select { max-width: 260px; }
.topbar-right { display: flex; align-items: center; gap: 0.8rem; }
.voice-pill {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
}
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--danger); transition: background 0.3s; }
.dot.online { background: var(--ok); box-shadow: 0 0 10px var(--ok); }

main { padding: 1.6rem 1.8rem; max-width: 1150px; width: 100%; margin: auto; }
.tab-pane { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.1rem; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  backdrop-filter: blur(6px);
  animation: rise 0.35s ease;
}
.card h2 { margin: 0 0 0.7rem; font-size: 1.05rem; font-weight: 700; }
.card h3 { margin: 1rem 0 0.4rem; font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.track-name { font-size: 1.1rem; font-weight: 700; margin: 0.4rem 0 0.9rem; word-break: break-word; }
.hidden { display: none !important; }

/* --- Carte "en cours" + égaliseur --- */
.now-card { display: flex; gap: 1.3rem; align-items: flex-start; flex-wrap: wrap; }
.eq {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 52px;
  padding: 0.7rem 0.75rem;
  background: var(--accent-soft);
  border-radius: 12px;
}
.eq span {
  width: 5px;
  height: 12%;
  border-radius: 3px;
  background: var(--accent);
  transition: height 0.3s;
}
.eq.live span { animation: bounce 0.9s ease-in-out infinite; }
.eq.live span:nth-child(2) { animation-delay: 0.15s; }
.eq.live span:nth-child(3) { animation-delay: 0.3s; }
.eq.live span:nth-child(4) { animation-delay: 0.45s; }
.eq.live span:nth-child(5) { animation-delay: 0.6s; }
@keyframes bounce { 0%, 100% { height: 15%; } 50% { height: 95%; } }
.now-cover {
  flex: none;
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.now-body { flex: 1; min-width: 200px; }
.now-queue { flex-basis: 100%; }
.now-playing {
  margin: -0.4rem 0 0.9rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.92rem;
}
.listen-row { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.7rem; flex-wrap: wrap; }
.listen-row .listen-vol { flex: none; width: 120px; }
.listen-count { font-size: 0.8rem; }

/* --- Section jeux (teaser) --- */
.games-hero { grid-column: 1 / -1; text-align: center; padding: 3.5rem 2rem; }
.games-icons { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1rem; color: var(--muted); }
.games-icons span { animation: float 3s ease-in-out infinite; }
.games-icons .ic { width: 34px; height: 34px; }
.games-icons span:nth-child(2) { animation-delay: 0.4s; }
.games-icons span:nth-child(3) { animation-delay: 0.8s; }
.games-icons span:nth-child(4) { animation-delay: 1.2s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.games-hero h2 { font-size: 1.5rem; }

/* ===================== Contrôles ===================== */
/* Icônes SVG (style trait, héritent de la couleur du texte) */
.ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.fill { fill: currentColor; stroke: none; }
.nav-item .ic { width: 18px; height: 18px; }
.btn .ic, summary .ic { width: 15px; height: 15px; vertical-align: -2.5px; }
.btn .ic:first-child { margin-right: 0.4em; }
.radio-list .play .ic { width: 13px; height: 13px; }
.radio-list .del .ic, #members .ic { width: 15px; height: 15px; vertical-align: -2.5px; }
.voice-pill .ic, .now-playing .ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: 0.3em; }

.btn {
  background: var(--card-solid);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 9px;
  padding: 0.55rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:hover { filter: brightness(1.3); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.accent { background: var(--accent); border-color: transparent; color: #fff; box-shadow: 0 4px 14px var(--accent-soft); }
.btn.danger { background: var(--danger); border-color: transparent; color: #fff; }
.btn.small { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn:disabled:hover { filter: none; transform: none; }
.controls { display: flex; gap: 0.6rem; flex-wrap: wrap; }

input, select, textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  flex: 1;
  min-width: 0;
}
textarea { width: 100%; flex: 1 1 100%; resize: vertical; line-height: 1.4; }
.lyrics { margin-top: 0.5rem; }
.lyrics summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--accent); font-size: 0.85rem; font-weight: 600;
}
.lyrics summary::-webkit-details-marker { display: none; }
.lyrics summary::after { content: '▸'; transition: transform 0.15s; }
.lyrics[open] summary::after { transform: rotate(90deg); }
.lyrics pre {
  white-space: pre-wrap; word-break: break-word; font-family: inherit;
  font-size: 0.9rem; line-height: 1.55; color: var(--text);
  max-height: 340px; overflow-y: auto;
  margin: 0.6rem 0 0; padding: 0.8rem 1rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: 9px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row { display: flex; gap: 0.6rem; margin-top: 0.6rem; flex-wrap: wrap; align-items: center; }
code { background: var(--bg); padding: 0.1rem 0.35rem; border-radius: 5px; font-size: 0.85em; }

/* --- Listes --- */
.queue { margin: 0; padding-left: 1.4rem; }
.queue li { padding: 0.2rem 0; }
.radio-list { list-style: none; margin: 0.8rem 0 0; padding: 0; max-height: 340px; overflow-y: auto; }
.radio-list li { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.45rem; border-radius: 8px; }
.radio-list li:hover { background: var(--card); }
.radio-list .play {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  flex: none;
  transition: transform 0.12s;
}
.radio-list .play:hover { transform: scale(1.12); }
.radio-list span { flex: 1; }
.radio-list .del { background: none; border: none; cursor: pointer; opacity: 0.55; }
.radio-list .del:hover { opacity: 1; }
.tag {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 5px;
  padding: 0.1rem 0.4rem;
  vertical-align: middle;
}
.add-radio { margin-top: 1rem; }
.add-radio summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.add-radio summary:hover { color: var(--text); }

/* --- Bannière --- */
.banner { background: var(--danger); color: #fff; padding: 0.6rem 1.8rem; font-size: 0.9rem; font-weight: 600; }

/* --- Logs --- */
.logs {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.85rem;
  font-size: 0.78rem;
  max-height: 480px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.warn-list { list-style: none; padding: 0; margin: 0.4rem 0; }
.warn-list li { padding: 0.35rem 0; border-bottom: 1px solid var(--border); }

/* --- Règlement --- */
.rules-list { list-style: none; padding: 0; margin: 0.9rem 0 0.4rem; display: flex; flex-direction: column; gap: 0.55rem; }
.rule-row { display: flex; gap: 0.55rem; align-items: center; animation: rise 0.25s ease; }
.rule-order { display: flex; flex-direction: column; gap: 3px; }
.rule-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  padding: 0.28rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}
.rule-btn:hover:not(:disabled) { color: var(--text); border-color: var(--accent); }
.rule-btn:disabled { opacity: 0.3; cursor: default; }
.rule-btn .ic { width: 13px; height: 13px; }
.rule-btn.del { align-self: stretch; padding: 0 0.6rem; }
.rule-btn.del:hover { color: var(--danger); border-color: var(--danger); }
.rule-fields { display: flex; flex-direction: column; gap: 0.4rem; flex: 1; min-width: 0; }
.rule-fields .rule-title { font-weight: 700; }
#rules-count { font-size: 0.8rem; }

/* Aperçu façon embed Discord (toujours sombre, comme sur Discord) */
.embed-preview {
  background: #2b2d31;
  color: #dbdee1;
  border-left: 4px solid #ef3265;
  border-radius: 4px 8px 8px 4px;
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
}
.embed-preview .emb-author { display: flex; align-items: center; gap: 0.45rem; font-weight: 600; font-size: 0.8rem; color: #f2f3f5; margin-bottom: 0.45rem; }
.embed-preview .emb-author img { width: 20px; height: 20px; border-radius: 50%; }
.embed-preview .emb-title { font-weight: 700; color: #fff; margin-bottom: 0.35rem; }
.embed-preview .emb-desc { color: #b5bac1; margin-bottom: 0.55rem; }
.emb-field { margin: 0.5rem 0; }
.emb-field b { display: block; color: #fff; font-size: 0.86rem; margin-bottom: 0.15rem; }
.emb-field span { color: #b5bac1; font-size: 0.85rem; white-space: pre-wrap; word-break: break-word; }
.emb-footer { margin-top: 0.75rem; font-size: 0.72rem; color: #949ba4; }

/* ===================== Paramètres ===================== */
.pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.pref-row:last-of-type { border-bottom: none; }
.pref-row > div:first-child { min-width: 0; }
.pref-row select, .pref-row input[type="range"] { flex: none; }

.swatches { display: flex; gap: 0.5rem; }
.swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--sw);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.swatch:hover { transform: scale(1.15); }
.swatch.active { border-color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 12px var(--sw); }

.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { display: none; }
.switch span {
  position: absolute;
  inset: 0;
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}
.switch span::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  top: 3px;
  left: 4px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s, background 0.2s;
}
.switch input:checked + span { background: var(--accent); border-color: transparent; }
.switch input:checked + span::before { transform: translateX(19px); background: #fff; }

.vol-ctl { display: flex; align-items: center; gap: 0.7rem; flex: none; }
.vol-ctl span { font-weight: 700; min-width: 3.2rem; text-align: right; }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 170px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: var(--card-solid);
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-soft);
}
input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
}

/* ===================== Profils (admin) ===================== */
.profile-list {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 480px;
  overflow-y: auto;
}
.profile-row {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.profile-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.profile-info { min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.88rem; }
.profile-info .muted { font-size: 0.76rem; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }
.profile-actions .btn .ic { width: 12px; height: 12px; }

/* ===================== Mon profil (membres) ===================== */
.pf-h3 { margin: 1.1rem 0 0.2rem; font-size: 0.95rem; }
.profile-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.6rem;
}
.pf-salons { display: flex; flex-wrap: wrap; gap: 0.45rem 0.9rem; margin-top: 0.4rem; }
.pf-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.pf-check:has(input:checked) { border-color: var(--accent); color: var(--accent); }

/* ===================== Présence du bot (admin) ===================== */
.presence-preview {
  margin-top: 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.pres-dot { width: 10px; height: 10px; border-radius: 50%; background: #23a55a; flex: none; }
.pres-dot.idle { background: #f0b232; }
.pres-dot.dnd { background: #f23f43; }
.pres-dot.invisible { background: #80848e; }

/* ===================== Toast ===================== */
#toast {
  position: fixed;
  bottom: 1.3rem;
  left: 50%;
  transform: translateX(-50%) translateY(160%);
  background: var(--card-solid);
  border: 1px solid var(--border);
  padding: 0.75rem 1.3rem;
  border-radius: 11px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  z-index: 50;
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.error { background: var(--danger); border-color: transparent; color: #fff; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.no-anim *, .no-anim *::before, .no-anim *::after { animation: none !important; transition: none !important; }

/* ===================== Mode clair ===================== */
html.light {
  --bg: #eef0f6;
  --bg-soft: #ffffff;
  --card: rgba(20, 24, 40, 0.05);
  --card-solid: #ffffff;
  --border: rgba(20, 24, 40, 0.1);
  --text: #23273a;
  --muted: #5c6376;
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --topbar-bg: rgba(255, 255, 255, 0.75);
}
html.light .login-card { box-shadow: 0 24px 60px rgba(30, 35, 70, 0.16), 0 0 80px var(--accent-soft); }
html.light .login-logo { box-shadow: 0 14px 40px rgba(30, 35, 70, 0.22), 0 0 34px var(--accent-soft); }
html.light .now-cover { box-shadow: 0 8px 24px rgba(30, 35, 70, 0.2); }
html.light #toast { box-shadow: 0 10px 30px rgba(30, 35, 70, 0.25); }
html.light .dot.online { box-shadow: 0 0 10px rgba(35, 165, 90, 0.6); }

/* Variantes du logo selon le thème (wordmark clair vs nuit) */
.logo-light { display: none; }
html.light .logo-light { display: inline-block; }
html.light .logo-dark { display: none; }

/* ===================== Menu burger & responsive ===================== */
/* Cachés sur desktop : la sidebar fixe suffit */
.burger {
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  padding: 0.42rem 0.5rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: border-color 0.15s, background 0.15s;
}
.burger:hover { border-color: var(--accent-soft); }
.burger .ic { width: 20px; height: 20px; }
.topbar-brand { display: none; } /* logo rappelé dans le tiroir — topbar allégée */
.nav-overlay { display: none; }

@media (max-width: 860px) {
  body { flex-direction: column; }

  /* Sidebar → tiroir latéral ouvert par le burger */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 70;
    width: min(280px, 84vw);
    height: 100dvh;
    transform: translateX(-106%);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: none;
  }
  body.nav-open .sidebar {
    transform: none;
    box-shadow: 30px 0 80px rgba(0, 0, 0, 0.55);
  }
  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(5, 7, 11, 0.6);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
  }
  body.nav-open .nav-overlay { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  .burger { display: inline-flex; }
  .topbar { padding: 0.7rem 0.9rem; gap: 0.6rem; }
  .topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    flex: none;
  }
  .topbar-brand .logo-img { width: 27px; height: 27px; }
  .guild-select { max-width: none; }
  main { padding: 1rem 0.9rem; }

  /* colonnes moins larges : évite le débordement sur petit écran */
  .tab-pane { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
  .radio-list li { flex-wrap: wrap; }
  .pref-row { flex-wrap: wrap; gap: 0.6rem; }
  #toast { max-width: 92vw; }
}

/* Très petit écran : topbar compacte */
@media (max-width: 480px) {
  .topbar-brand .logo-text { display: none; }
  .voice-pill { font-size: 0.72rem; padding: 0.25rem 0.6rem; }
  .login-card { padding: 2rem 1.4rem; }
  .card { padding: 1.05rem 1rem; }
}

/* --- Blind test --- */
.bt-switch { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 500; cursor: pointer; }

/* Modale de jeu */
.bt-modal {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  padding: 1rem; background: rgba(6, 8, 13, 0.78); backdrop-filter: blur(8px);
  animation: bt-fadein 0.22s ease;
}
@keyframes bt-fadein { from { opacity: 0; } to { opacity: 1; } }
.bt-modal-card {
  position: relative; width: min(580px, 100%); max-height: 92vh; overflow-y: auto;
  background: linear-gradient(160deg, #1a1e28, var(--bg-soft));
  border: 1px solid var(--border); border-radius: 18px; padding: 1.3rem 1.5rem 1.5rem;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65), 0 0 70px var(--accent-soft);
  animation: bt-zoomin 0.32s cubic-bezier(0.2, 1.35, 0.4, 1);
}
@keyframes bt-zoomin {
  from { opacity: 0; transform: translateY(26px) scale(0.92); }
  to { opacity: 1; transform: none; }
}
.bt-close {
  position: absolute; top: 0.75rem; right: 0.85rem; z-index: 2;
  background: none; border: none; color: var(--muted); font-size: 1.05rem;
  cursor: pointer; padding: 0.3rem 0.45rem; border-radius: 7px; transition: all 0.15s;
}
.bt-close:hover { color: var(--danger); background: rgba(237, 66, 69, 0.12); }
.bt-disc.loading { animation: bt-discpulse 1.5s ease-in-out infinite; }
@keyframes bt-discpulse {
  0%, 100% { box-shadow: 0 6px 22px rgba(0,0,0,0.55), 0 0 0 0 var(--accent-soft); }
  50% { box-shadow: 0 6px 30px var(--accent-soft), 0 0 26px 4px var(--accent-soft); }
}
.bt-glow { box-shadow: 0 0 0 0 var(--accent-soft); animation: bt-glowpulse 2.4s ease-in-out infinite; }
@keyframes bt-glowpulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft), 0 4px 14px var(--accent-soft); }
  50% { box-shadow: 0 0 22px 2px var(--accent-soft), 0 4px 14px var(--accent-soft); }
}

/* barre du haut : points de manche + score */
.bt-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.bt-dots { display: flex; gap: 0.45rem; }
.bt-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--accent-soft); transition: all 0.3s; }
.bt-dot.done { background: var(--accent); border-color: var(--accent); }
.bt-dot.now { border-color: var(--accent); animation: bt-dotpulse 1.2s ease-in-out infinite; }
@keyframes bt-dotpulse { 0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); } 50% { box-shadow: 0 0 0 5px var(--accent-soft); } }
.bt-score-wrap { display: flex; align-items: baseline; gap: 0.25rem; font-weight: 700; color: var(--accent); }
.bt-score-wrap span { font-size: 1.5rem; line-height: 1; }
.bt-score-wrap small { font-size: 0.75rem; opacity: 0.8; }
.bt-score-wrap.bump span { animation: bt-bump 0.45s ease; }
@keyframes bt-bump { 0% { transform: scale(1); } 40% { transform: scale(1.55); } 100% { transform: scale(1); } }

/* scène : vinyle + equalizer + barre de clip */
.bt-stage {
  display: flex; flex-direction: column; align-items: center; gap: 0.85rem;
  padding: 1.4rem 1rem 1.1rem; margin-bottom: 0.9rem;
  background: radial-gradient(420px 160px at 50% 20%, var(--accent-soft), transparent 70%), var(--card);
  border-radius: 14px;
}
.bt-disc-wrap { position: relative; width: 120px; height: 120px; display: grid; place-items: center; }
.bt-disc {
  width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 50%, #2a2d36 0 17%, transparent 17.5%),
    repeating-radial-gradient(circle at 50% 50%, #101216 0 3px, #1a1d24 3px 6px);
  box-shadow: 0 6px 22px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.06);
  transition: box-shadow 0.4s;
}
.bt-disc-hole {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 1rem;
}
.bt-disc.playing { animation: bt-spin 2.6s linear infinite; box-shadow: 0 6px 30px var(--accent-soft), inset 0 0 0 1px rgba(255,255,255,0.08); }
@keyframes bt-spin { to { transform: rotate(360deg); } }
.bt-disc.playing::after {
  content: ''; position: absolute; inset: -14px; border-radius: 50%;
  border: 2px solid var(--accent-soft); animation: bt-ring 1.8s ease-out infinite;
}
@keyframes bt-ring { 0% { transform: scale(0.82); opacity: 0.9; } 100% { transform: scale(1.25); opacity: 0; } }
.bt-eq { position: absolute; bottom: -4px; display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.bt-eq span { width: 4px; height: 15%; border-radius: 2px; background: var(--accent); transition: height 0.3s; }
.bt-eq.live span { animation: bounce 0.85s ease-in-out infinite; }
.bt-eq.live span:nth-child(2) { animation-delay: 0.12s; }
.bt-eq.live span:nth-child(3) { animation-delay: 0.24s; }
.bt-eq.live span:nth-child(4) { animation-delay: 0.36s; }
.bt-eq.live span:nth-child(5) { animation-delay: 0.48s; }
.bt-eq.live span:nth-child(6) { animation-delay: 0.6s; }
.bt-eq.live span:nth-child(7) { animation-delay: 0.72s; }
.bt-clipbar { width: 100%; max-width: 340px; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.bt-clipbar i { display: block; width: 0%; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), #8b9bff); transition: width 0.25s linear; }
.bt-playbtn { min-width: 190px; display: inline-flex; align-items: center; justify-content: center; position: relative; }
.bt-playbtn.loading { pointer-events: none; opacity: 0.85; }
.bt-playbtn.loading::after {
  content: ''; width: 14px; height: 14px; margin-left: 0.5rem; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff;
  animation: bt-spin 0.8s linear infinite;
}

/* choix QCM */
.bt-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 0.7rem; }
.bt-choice {
  text-align: left; white-space: normal; line-height: 1.35; padding: 0.7rem 0.85rem;
  opacity: 0; animation: bt-fadeup 0.35s ease forwards; animation-delay: calc(var(--i, 0) * 80ms);
  border: 1px solid transparent; transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s, opacity 0.3s;
}
@keyframes bt-fadeup { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.bt-choice:hover:not(:disabled) { border-color: var(--accent-soft); box-shadow: 0 4px 18px var(--accent-soft); }
.bt-choice:disabled { opacity: 0.45; cursor: default; }
.bt-choice.correct { opacity: 1; border-color: #57f287; background: rgba(87,242,135,0.14); color: #57f287; box-shadow: 0 0 18px rgba(87,242,135,0.25); }
.bt-choice.wrong { opacity: 1; border-color: var(--danger); background: rgba(237,66,69,0.12); color: var(--danger); animation: bt-shake 0.4s ease; }
@keyframes bt-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(4px); }
}

/* feedback */
.bt-fb { border-radius: 10px; padding: 0.7rem 0.9rem; margin-bottom: 0.6rem; animation: bt-pop 0.3s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes bt-pop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
.bt-fb.ok { background: rgba(87, 242, 135, 0.12); color: #57f287; }
.bt-fb.ko { background: rgba(237, 66, 69, 0.12); color: var(--danger); }
.bt-actions { justify-content: space-between; }

/* écran de fin */
.bt-end { text-align: center; padding: 1.2rem 0; }
.bt-medal { font-size: 3.4rem; line-height: 1; animation: bt-drop 0.7s cubic-bezier(0.2, 1.5, 0.4, 1); filter: drop-shadow(0 6px 14px rgba(0,0,0,0.5)); }
@keyframes bt-drop { 0% { opacity: 0; transform: translateY(-46px) scale(0.4); } 70% { transform: translateY(4px) scale(1.08); } 100% { opacity: 1; transform: none; } }
.bt-finalscore { font-size: 2.2rem; font-weight: 800; color: var(--accent); margin: 0.3rem 0 0.1rem; }
.bt-finalscore small { font-size: 1rem; font-weight: 600; opacity: 0.7; }

/* classement : podiums */
.bt-scores li:first-child span b, .bt-scores li { font-variant-numeric: tabular-nums; }
.bt-rank { display: inline-block; min-width: 1.6em; font-weight: 700; }
.bt-rank.r1 { color: #ffd700; } .bt-rank.r2 { color: #c0c0c0; } .bt-rank.r3 { color: #cd7f32; }

/* admin */
.bt-style-actions { display: flex; gap: 0.35rem; flex: none; flex-wrap: wrap; }
.bt-tracklist { max-height: 240px; }
.bt-chip { display: inline-block; font-size: 0.72rem; font-style: normal; padding: 0.1rem 0.45rem; border-radius: 20px; background: var(--accent-soft); color: var(--accent); margin-left: 0.3rem; vertical-align: 1px; }
.bt-chip.off { background: rgba(237,66,69,0.14); color: var(--danger); }
#bt-style-details summary { cursor: pointer; }

@media (max-width: 700px) {
  .bt-modal { padding: 0.5rem; }
  .bt-modal-card { padding: 1rem 1rem 1.2rem; border-radius: 14px; }
  .bt-choices { grid-template-columns: 1fr; }
  .bt-disc-wrap { transform: scale(0.85); }
}

/* ========== Blind test multijoueur ========== */
.btr-layout { display: grid; grid-template-columns: 1fr 210px; gap: 1.2rem; }
.btr-side { border-left: 1px solid var(--border, rgba(255,255,255,0.08)); padding-left: 1rem; }
.btr-side h4 { margin: 0 0 0.6rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.6; }
#btr-players { list-style: none; margin: 0 0 0.8rem; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; max-height: 380px; overflow-y: auto; }
#btr-players li { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.35rem 0.55rem; border-radius: 8px; font-size: 0.88rem; background: rgba(255,255,255,0.03); }
#btr-players li.me { outline: 1px solid var(--accent-soft); background: var(--accent-soft); }
#btr-players li b { font-variant-numeric: tabular-nums; }
.btr-ok { color: #57f287; font-style: normal; }
.btr-code { font-weight: 800; letter-spacing: 0.18em; color: var(--accent); font-size: 0.95rem; }
.btr-tag { display: inline-block; font-weight: 800; letter-spacing: 0.12em; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 0.05rem 0.5rem; margin-right: 0.4rem; }
.btr-phase { text-align: center; font-size: 0.9rem; margin-top: 0.4rem; min-height: 1.2em; }
.btr-pane { animation: bt-pop 0.3s ease; }
.bt-choice.dim { opacity: 0.35; }

@media (max-width: 700px) {
  .btr-layout { grid-template-columns: 1fr; }
  .btr-side { border-left: none; border-top: 1px solid rgba(255,255,255,0.08); padding: 0.8rem 0 0; }
}

/* ========== Lanceur d'applications (onglet Jeux) ========== */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.game-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.45rem; padding: 1.6rem 1rem 1.2rem; border: 1px solid var(--border, rgba(255,255,255,0.08)); border-radius: 16px; background: var(--card, rgba(255,255,255,0.03)); color: var(--text); cursor: pointer; font: inherit; text-align: center; transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.game-tile:hover:not(.locked) { transform: translateY(-3px); border-color: var(--accent-soft); box-shadow: 0 10px 30px rgba(0,0,0,0.35), 0 0 22px var(--accent-soft); }
.game-tile b { font-size: 1.05rem; }
.game-tile-desc { font-size: 0.8rem; opacity: 0.6; line-height: 1.35; }
.game-tile-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); margin-bottom: 0.2rem; }
.game-tile-icon svg { width: 30px; height: 30px; }
.game-tile.locked { opacity: 0.55; cursor: not-allowed; }
.game-tile-lock { position: absolute; top: 0.6rem; right: 0.6rem; font-size: 0.72rem; background: rgba(0,0,0,0.4); border-radius: 20px; padding: 0.15rem 0.5rem; }

/* ========== Fenêtre applicative ========== */
.bt-app-head { display: flex; align-items: center; gap: 0.6rem; margin: -0.4rem 0 1.1rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--border, rgba(255,255,255,0.08)); }
.bt-app-head b { font-size: 1.05rem; }
.bt-app-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.bt-app-head .bt-close { position: static; margin-left: auto; }
.bt-app-head .btr-code:not(.hidden) { margin-left: auto; margin-right: 0.4rem; }
.bt-app-head .btr-code:not(.hidden) + .bt-close { margin-left: 0; }
.btr-side-col { display: flex; flex-direction: column; gap: 0.45rem; }
.btr-roomlist { max-height: 220px; overflow-y: auto; }
.btr-roomlist li { font-size: 0.85rem; }

/* ---------- Géo challenge ---------- */
.geo-card { max-width: 620px; }
.geo-photo-wrap { position: relative; display: grid; place-items: center; min-height: 240px; border-radius: 12px; overflow: hidden; background: var(--bg-soft); border: 1px solid var(--border); }
.geo-photo-wrap img { display: block; width: 100%; max-height: 54vh; object-fit: contain; }
.geo-photo-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; color: var(--muted); font-size: 0.85rem; }
.geo-photo-loading a { color: var(--accent); }
.geo-spin { width: 26px; height: 26px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: geo-spin 0.8s linear infinite; }
@keyframes geo-spin { to { transform: rotate(360deg); } }
.geo-levels { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0 0.4rem; }
.geo-chip { padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.78rem; border: 1px solid var(--border); background: var(--card); }
.geo-chip b { color: var(--accent); margin-left: 0.25rem; }
.geo-chip.hit { border-color: var(--ok); background: rgba(35, 165, 90, 0.15); color: #7ee2a8; }
.geo-chip.hit b { color: #7ee2a8; }
.geo-chip.na { opacity: 0.4; text-decoration: line-through; }
.geo-tries { font-size: 0.78rem; margin: 0.2rem 0 0.6rem; }
/* Géo challenge : photo + carte à épingle (Leaflet) */
.geo-card { max-width: 880px; }
.geo-play { display: grid; grid-template-columns: 1.35fr 1fr; gap: 0.8rem; align-items: stretch; }
.geo-map-wrap { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.geo-map { flex: 1; min-height: 320px; border-radius: 12px; border: 1px solid var(--border); background: #dde6ee; z-index: 0; }
.geo-map-hint { font-size: 0.72rem; margin: 0; text-align: center; }
/* Visionneuse de rue (Panoramax/Mapillary) du Géo challenge */
.geo-view-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #14202e; border: 1px solid var(--border); min-height: 300px; }
.geo-view { display: flex; flex-direction: column; width: 100%; height: 52vh; min-height: 340px; }
.geo-view pnx-photo-viewer { display: block; width: 100%; height: 100%; }
.gv-canvas { position: relative; height: 100%; min-height: inherit; }
.gv-nav { display: flex; align-items: center; justify-content: center; gap: 0.8rem; padding: 0.4rem 0.5rem; background: rgba(0,0,0,.35); }
.gv-pos { font-size: 0.78rem; color: #cfd8e3; min-width: 4.5ch; text-align: center; }
.gv-btn { padding: 0.45rem 1rem; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--fg, #e8ecf1); font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.gv-btn:hover:not(:disabled) { border-color: var(--accent); }
.gv-btn:disabled { opacity: 0.35; cursor: default; }
.gv-back { position: absolute; top: 10px; left: 10px; z-index: 20; padding: 0.4rem 0.8rem; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(10,14,20,.72); color: #e8ecf1; font-size: 0.78rem; font-weight: 600; cursor: pointer; backdrop-filter: blur(4px); }
.gv-back:hover { border-color: var(--accent); }
/* Quiz émission (web) */
.quiz-q { font-size: 1.15rem; font-weight: 700; margin: 0.8rem 0 0.4rem; line-height: 1.4; }
.quiz-timer { font-size: 0.85rem; color: var(--accent); font-weight: 600; min-height: 1.2em; }
.quiz-choices { display: grid; gap: 0.5rem; margin: 0.6rem 0; }
.quiz-choice { text-align: left; }
.quiz-themes { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; font-size: 0.85rem; }
.quiz-themes label { display: flex; align-items: center; gap: 0.25rem; cursor: pointer; }
#pub-quiz-input { display: flex; gap: 0.5rem; margin: 0.5rem 0; }



.geo-view-err { display: grid; place-items: center; height: 100%; color: var(--muted); }
.geo-view-wrap > #pub-geo-loading, .geo-view-wrap > #geo-photo-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 0.6rem; color: var(--muted); font-size: 0.85rem;
  background: #14202e; z-index: 5;
}
.geo-view-wrap > #pub-geo-loading a, .geo-view-wrap > #geo-photo-loading a { color: var(--accent); }
@media (max-width: 900px) { .geo-view { height: 42vh; min-height: 260px; } }

.geo-dot { background: none; border: none; }
.geo-dot i {
  display: block; width: 18px; height: 18px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.45);
  position: relative; left: -1px; top: -1px;
}
.geo-dot.mine i { background: #4f8ef7; }
.geo-dot.other i { background: #98a4b5; }
.geo-dot.answer i { background: #23a55a; }
.leaflet-tooltip { font-size: 0.78rem; }
@media (max-width: 900px) {
  .geo-card { max-width: 620px; }
  .geo-play { grid-template-columns: 1fr; }
  .geo-map { min-height: 38vh; }
}

@media (max-width: 480px) {
  .geo-photo-wrap img { max-height: 42vh; }
}

/* ========== Jeux publics (play.php — sans compte Discord) ========== */
.pub-page { align-items: flex-start; padding: 3vh 0 4vh; overflow-y: auto; }
.pub-wrap { width: min(980px, 94vw); margin: 0 auto; }
.pub-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.1rem; }
.pub-head h1 { margin: 0; font-size: 1.4rem; font-weight: 800; }
.pub-head p { margin: 0.15rem 0 0; font-size: 0.85rem; }
.pub-login-link { margin-left: auto; white-space: nowrap; font-size: 0.85rem; }
.pub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.pub-grid select, .pub-grid input { margin-bottom: 0.5rem; }
.pub-code-big { font-size: 1.9rem; letter-spacing: 0.3em; color: var(--accent); }

/* Jeux invités : tuiles de sélection + lobby */
.pub-games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin: 0.5rem 0 0.8rem; }
.pub-tile { padding: 1rem 0.6rem; }
.pub-tile .game-tile-icon { width: 42px; height: 42px; }
.pub-tile .game-tile-icon svg { width: 24px; height: 24px; }
.pub-tile.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), 0 0 18px var(--accent-soft); }
.pub-tile.locked { opacity: 0.45; pointer-events: none; }
.pub-code-big { margin: 0.3rem 0; }
@media (max-width: 700px) {
  .pub-grid { grid-template-columns: 1fr; }
  .pub-games { grid-template-columns: 1fr; }
  .pub-tile { flex-direction: row; align-items: center; text-align: left; padding: 0.8rem; gap: 0.7rem; }
  .pub-tile .game-tile-icon { margin-bottom: 0; }
}

#pub-players { list-style: none; margin: 0 0 0.8rem; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; max-height: 380px; overflow-y: auto; }
#pub-players li { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.35rem 0.55rem; border-radius: 8px; font-size: 0.88rem; background: rgba(255,255,255,0.03); }
#pub-players li.me { outline: 1px solid var(--accent-soft); background: var(--accent-soft); }
#pub-players li b { font-variant-numeric: tabular-nums; }
html.light #pub-players li { background: rgba(30,35,70,0.05); }
@media (max-width: 720px) {
  .pub-grid { grid-template-columns: 1fr; }
  .pub-head p { display: none; }
}

/* ========== Zoom photo Géo challenge (geozoom.js) ========== */
.geo-photo-wrap img.geo-zoomable { cursor: zoom-in; }
.geo-photo-wrap::after {
  content: '🔍'; position: absolute; right: 0.55rem; bottom: 0.55rem;
  background: rgba(0,0,0,0.55); border-radius: 8px; padding: 0.15rem 0.45rem;
  font-size: 0.85rem; pointer-events: none; opacity: 0.8;
}
.gz-overlay {
  position: fixed; inset: 0; z-index: 4000; overflow: hidden;
  background: rgba(8, 10, 18, 0.94); cursor: grab; touch-action: none;
}
.gz-overlay.hidden { display: none; }
.gz-overlay:active { cursor: grabbing; }
.gz-img {
  position: absolute; left: 0; top: 0; max-width: none; max-height: none;
  transform-origin: 0 0; user-select: none; -webkit-user-drag: none;
}
.gz-tools {
  position: absolute; top: 0.8rem; right: 0.8rem; display: flex; gap: 0.4rem; z-index: 1;
}
.gz-btn {
  width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border, rgba(255,255,255,0.15));
  background: rgba(20, 24, 40, 0.85); color: var(--text, #fff); font-size: 1.2rem;
  cursor: pointer; display: grid; place-items: center;
}
.gz-btn:hover { background: var(--accent-soft, rgba(124,92,255,0.25)); }
.gz-hint {
  position: absolute; bottom: 0.7rem; left: 50%; transform: translateX(-50%);
  margin: 0; font-size: 0.72rem; color: rgba(255,255,255,0.55); white-space: nowrap;
  pointer-events: none;
}
@media (max-width: 720px) { .gz-hint { display: none; } }

/* ========== Responsive page publique (invités) ========== */
@media (max-width: 720px) {
  .pub-page { padding: 2vh 0 5vh; }
  .pub-head { flex-wrap: wrap; gap: 0.6rem; }
  .pub-head h1 { font-size: 1.15rem; }
  .pub-head p { font-size: 0.78rem; flex-basis: 100%; order: 3; }
  .pub-head img { height: 32px !important; }
  .pub-login-link { font-size: 0.8rem; }
  .pub-wrap { width: min(980px, 96vw); }
  .card { padding: 0.9rem; }
  .pub-grid { grid-template-columns: 1fr; }
  .pub-games { grid-template-columns: 1fr; gap: 0.45rem; }
  .pub-tile { flex-direction: row; align-items: center; text-align: left; padding: 0.65rem 0.8rem; gap: 0.7rem; }
  .pub-tile .game-tile-icon { margin-bottom: 0; width: 36px; height: 36px; }
  .pub-tile .game-tile-icon svg { width: 20px; height: 20px; }
  .pub-tile b { font-size: 0.95rem; }
  .pub-tile .game-tile-desc { font-size: 0.72rem; }
  .pub-code-big { font-size: clamp(1.4rem, 7vw, 1.9rem); letter-spacing: 0.18em; }
  .bt-medal { font-size: 2.2rem !important; }
  .quiz-q { font-size: 1rem; }
  #pub-quiz-input { flex-direction: column; }
  #pub-quiz-input input { width: 100%; min-width: 0; }
  .quiz-themes { display: grid; grid-template-columns: 1fr 1fr; font-size: 0.8rem; }
  .quiz-themes label { white-space: nowrap; }
  .row { flex-wrap: wrap; }
  .row input, .row select { min-width: 0; flex: 1 1 auto; }
  #pub-code { max-width: none; flex: 1 1 120px; }
  .geo-map { height: 38vh !important; min-height: 220px; }
  .btr-layout { gap: 0.7rem; }
  .btr-side { max-height: none; }
  #pub-players { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0; }
  #pub-players li { list-style: none; background: var(--accent-soft); border-radius: 14px; padding: 0.2rem 0.65rem; font-size: 0.8rem; }
  .bt-actions .btn, .pub-grid .btn, .bt-end .btn { min-height: 44px; font-size: 0.95rem; }
  .bt-choices, .quiz-choices { gap: 0.4rem; }
  .bt-choice, .quiz-choice { padding: 0.7rem 0.8rem; font-size: 0.92rem; min-height: 44px; }
  .btr-code { letter-spacing: 0.12em; font-size: 0.85rem; }
}
@media (max-width: 380px) {
  .pub-code-big { letter-spacing: 0.1em; }
  .quiz-themes { grid-template-columns: 1fr; }
}

/* Formulaire « Créer une partie » : options par jeu */
.pub-opt { margin: 0.4rem 0 0.7rem; text-align: left; }
.pub-opt-lbl { display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.55; margin: 0 0 0.3rem 0.1rem; }
.pub-opt-row { display: flex; gap: 1rem; margin-top: 0.6rem; flex-wrap: wrap; }
.pub-opt-row > div { flex: 1 1 140px; }
.pub-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pub-chip { border: 1px solid var(--border, rgba(255,255,255,0.1)); background: transparent; color: var(--text); border-radius: 20px; padding: 0.35rem 0.8rem; font: inherit; font-size: 0.82rem; cursor: pointer; opacity: 0.55; transition: all 0.15s; }
.pub-chip.sel { opacity: 1; border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pub-seg { display: flex; border: 1px solid var(--border, rgba(255,255,255,0.1)); border-radius: 10px; overflow: hidden; }
.pub-seg-btn { flex: 1; border: none; background: transparent; color: var(--text); padding: 0.5rem 0.6rem; font: inherit; font-size: 0.82rem; cursor: pointer; opacity: 0.55; transition: all 0.15s; white-space: nowrap; }
.pub-seg-btn.sel { opacity: 1; background: var(--accent); color: #fff; font-weight: 700; }
.pub-seg-btn + .pub-seg-btn { border-left: 1px solid var(--border, rgba(255,255,255,0.1)); }
.pub-stepper { display: flex; align-items: center; border: 1px solid var(--border, rgba(255,255,255,0.1)); border-radius: 10px; overflow: hidden; width: fit-content; }
.pub-stepper button { border: none; background: transparent; color: var(--text); font-size: 1.15rem; width: 40px; height: 38px; cursor: pointer; font-weight: 700; }
.pub-stepper button:hover { background: var(--accent-soft); color: var(--accent); }
.pub-stepper input { width: 44px; text-align: center; border: none; background: transparent; color: var(--text); font: inherit; font-weight: 700; font-size: 0.95rem; }
@media (max-width: 720px) {
  .pub-opt-row { gap: 0.7rem; }
  .pub-chip { padding: 0.4rem 0.7rem; font-size: 0.78rem; }
  .pub-seg-btn { padding: 0.55rem 0.5rem; min-height: 42px; }
  .pub-stepper button { width: 48px; height: 44px; }
}

