/* ─────────────────────────────────────────────────────────────
   PINGGY DASHBOARD
   Aesthetic: Dark tech, sharp & editorial
   Fonts: Syne (display) + DM Sans (body)
───────────────────────────────────────────────────────────── */

:root {
  --bg:          #0a0a0f;
  --bg-2:        #111118;
  --bg-3:        #18181f;
  --border:      rgba(255,255,255,0.07);
  --border-hover:rgba(255,255,255,0.15);
  --text:        #f0f0f5;
  --text-muted:  #6b6b7e;
  --text-sub:    #9898a8;
  --accent:      #e8445a;
  --accent-2:    #ff6b6b;
  --twitch:      #9146ff;
  --youtube:     #ff0000;
  --kick:        #53fc18;
  --success:     #22c55e;
  --warning:     #f59e0b;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 8px 32px rgba(0,0,0,0.4);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.3);
}

/* ─── Light theme override ───────────────────────────────────── */
[data-theme="light"] {
  --bg:          #f6f6f9;
  --bg-2:        #ffffff;
  --bg-3:        #eeeef4;
  --border:      rgba(10,10,15,0.09);
  --border-hover:rgba(10,10,15,0.18);
  --text:        #14141c;
  --text-muted:  #8a8a9c;
  --text-sub:    #4a4a5c;
  --shadow:      0 8px 32px rgba(20,20,28,0.08);
  --shadow-card: 0 2px 12px rgba(20,20,28,0.06);
}

body { transition: background 0.2s ease, color 0.2s ease; }

/* ─── Scrollbars ─────────────────────────────────────────────── */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-hover) transparent;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Theme toggle button ────────────────────────────────────── */
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.theme-toggle:hover { background: var(--bg-3); color: var(--text); }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }

/* ─── Language switcher ──────────────────────────────────────── */
.lang-switch { position: relative; }
.lang-toggle {
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-toggle:hover { background: var(--bg-3);
color: var(--text); }
.lang-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 150px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 500;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.97);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}
.lang-menu.open { opacity: 1; pointer-events: all; transform: translateY(0) scale(1); }
.lang-item {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: var(--text-sub);
  transition: all 0.15s;
}
.lang-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.lang-item.active { color: var(--accent); font-weight: 600; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ─── NAVBAR ─────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: var(--bg-2);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 6px var(--accent); }
  50%       { box-shadow: 0 0 16px var(--accent), 0 0 24px var(--accent); }
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-sub);
}

/* ─── MAIN CONTENT ───────────────────────────────────────── */
.main-content {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* ─── PAGE HEADER ────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.page-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.header-badge {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.badge-count {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
}

/* ─── GUILDS GRID ────────────────────────────────────────── */
.guilds-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.guild-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.guild-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.2s;
}

.guild-card.bot-present::before { background: var(--success); }
.guild-card.bot-absent::before  { background: var(--border); }

.guild-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-3);
  transform: translateX(2px);
}

/* Icône serveur */
.guild-icon-wrap {
  position: relative;
  flex-shrink: 0;
}

.guild-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.guild-icon-fallback {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-sub);
  letter-spacing: -0.02em;
}

.guild-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bg-2);
}

.guild-status-dot.online  { background: var(--success); }
.guild-status-dot.offline { background: var(--text-muted); }

/* Infos */
.guild-info {
  flex: 1;
  min-width: 0;
}

.guild-name {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.guild-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.offline-meta { color: var(--text-muted); }

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

/* Actions */
.guild-action { flex-shrink: 0; }

.btn-manage,
.btn-invite {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-manage {
  background: var(--accent);
  color: #fff;
}

.btn-manage:hover {
  background: var(--accent-2);
  box-shadow: 0 4px 16px rgba(232,68,90,0.35);
  transform: translateY(-1px);
}

.btn-invite {
  background: transparent;
  color: var(--text-sub);
  border: 1px solid var(--border);
}

.btn-invite:hover {
  border-color: var(--twitch);
  color: var(--twitch);
  background: rgba(145,70,255,0.07);
}

/* ─── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
}

.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-family: 'Syne', sans-serif; font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }
.empty-state p  { font-size: 0.9rem; }

/* ─── ERROR PAGE ─────────────────────────────────────────── */
.error-page {
  text-align: center;
  padding: 5rem 2rem;
}

.error-code {
  font-family: 'Syne', sans-serif;
  font-size: 6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  color: var(--text-sub);
  font-weight: 500;
}

/* ─── ALERTS ─────────────────────────────────────────────── */
.alert {
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.alert-error {
  background: rgba(232,68,90,0.1);
  border: 1px solid rgba(232,68,90,0.25);
  color: var(--accent-2);
}

/* ─── LOGIN PAGE ─────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-lang-switch {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 5;
  display: flex;
  gap: 0.4rem;
}
.login-lang-item {
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-muted);
  font-size: 0.78rem;
  transition: all 0.2s;
}
.login-lang-item:hover { background: var(--bg-3); color: var(--text); }
.login-lang-item.active { color: var(--accent); border-color: var(--accent); }

.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: float-orb 8s ease-in-out infinite;
}

.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--accent), transparent);
  top: -150px; left: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--twitch), transparent);
  bottom: -100px; right: -80px;
  animation-delay: 3s;
}

.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #3b82f6, transparent);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 6s;
  opacity: 0.12;
}

@keyframes float-orb {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-30px) scale(1.05); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Login card */
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 3rem 2.5rem;
  background: var(--bg-2);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  text-align: center;
  animation: card-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  overflow-wrap: anywhere;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.logo-icon {
  animation: spin-slow 12s linear infinite;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.login-title {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.btn-discord {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: #5865F2;
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  margin-bottom: 1.25rem;
}

.btn-discord:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(88,101,242,0.4);
}

.discord-icon {
  width: 20px;
  height: 20px;
}

.login-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.btn-stoat-invite {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.9rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  transition: filter 0.2s, transform 0.2s;
}

.btn-stoat-invite:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* ─── FOOTER ─────────────────────────────────────────────── */
.footer-main {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 3rem 2rem 1.5rem;
}

.footer-top {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-brand { max-width: 320px; }

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.footer-tagline { color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; }

.footer-col { display: flex; flex-direction: column; gap: 0.7rem; }

.footer-col-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.footer-col a { color: var(--text-sub); font-size: 0.85rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-copyright { font-size: 0.78rem; color: var(--text-muted); }

.footer-lang-group { display: flex; gap: 0.5rem; }
.footer-lang {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.footer-lang:hover { color: var(--text); background: var(--bg-3); }
.footer-lang.active { opacity: 1; color: var(--accent); font-weight: 600; }

@media (max-width: 720px) {
  .footer-top { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-brand { max-width: none; }
}

/* ─── ANIMATIONS STAGGERED (guilds) ─────────────────────── */
.guild-card {
  animation: slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.guild-card:nth-child(1) { animation-delay: 0.05s; }
.guild-card:nth-child(2) { animation-delay: 0.10s; }
.guild-card:nth-child(3) { animation-delay: 0.15s; }
.guild-card:nth-child(4) { animation-delay: 0.20s; }
.guild-card:nth-child(5) { animation-delay: 0.25s; }
.guild-card:nth-child(6) { animation-delay: 0.30s; }
.guild-card:nth-child(n+7) { animation-delay: 0.35s; }

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

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .main-content { padding: 2rem 1rem; }
  .page-header  { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .guild-card   { padding: 1rem; gap: 1rem; }
  .navbar       { padding: 0 1rem; }

  .tabs {
    overflow-x: auto;
    scrollbar-width: thin;
    margin-inline: -1rem;
    padding-inline: 1rem;
  }
  .tab {
    flex: 0 0 auto;
    padding-inline: 0.9rem;
  }

  .notif-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.75rem;
  }
  .notif-info { min-width: 0; }
  .live-badge { align-self: start; }
  .notif-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-end;
    padding-top: 0.25rem;
    border-top: 1px solid var(--border);
  }

  .lh-name { min-width: 0; overflow-wrap: anywhere; }
  .lh-date { white-space: normal; text-align: right; }

  .prize-row { flex-wrap: wrap; }
  .prize-label { min-width: 0; flex-basis: calc(100% - 2rem); overflow-wrap: anywhere; }
  .prize-amount { min-width: 0; flex: 1 1 55%; overflow-wrap: anywhere; }
  .prize-winrate { margin-left: auto; }

  .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .navbar-right { gap: 0.45rem; }
  .user-name {
    max-width: 6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .guild-header-left { min-width: 0; }
  .gh-name { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .stats-grid-2 { gap: 0.8rem; }
}

@media (max-width: 360px) {
  .main-content { padding-inline: 0.75rem; }
  .navbar { padding-inline: 0.75rem; }
  .user-name { display: none; }
  .gh-name { max-width: 12rem; }
  .notif-card { padding: 0.85rem; }
}

@media (max-width: 640px) {
  .admin-card-wide .prize-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.6rem;
  }
  .admin-card-wide .prize-color { grid-column: 1; grid-row: 1; }
  .admin-card-wide .prize-label {
    grid-column: 2 / 5;
    grid-row: 1;
    width: auto;
    flex: none;
  }
  .admin-card-wide .prize-amount {
    grid-column: 2 / 4;
    grid-row: 2;
    width: auto;
    flex: none;
  }
  .admin-card-wide .prize-winrate {
    grid-column: 4;
    grid-row: 2;
    margin-left: 0;
  }
  .admin-card-wide .prize-order-controls {
    grid-column: 1 / 3;
    grid-row: 3;
  }
  .admin-card-wide .prize-row > form {
    grid-row: 3;
    margin: 0;
  }
  .admin-card-wide .prize-row > form:nth-of-type(1) { grid-column: 3; }
  .admin-card-wide .prize-row > form:nth-of-type(2) { grid-column: 4; }
}

/* ─── VOTE PAGE ─────────────────────────────────────────── */
.vote-layout {
  display: block;
}

.vote-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.9rem;
  color: var(--text);
  background: var(--accent);
  border: 1px solid var(--accent-2);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  transition: transform 0.2s, background 0.2s;
}

.vote-header-cta:hover { transform: translateY(-2px); background: var(--accent-2); }

.vote-status {
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin: -0.5rem 0 1rem;
  width: fit-content;
}
.vote-status-cooldown { color: var(--text-muted); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); }
.vote-status-ready { color: #e6db2f; background: rgba(230, 219, 47, 0.08); border: 1px solid rgba(230, 219, 47, 0.3); }

.vote-board { min-width: 0; }
.vote-period-label { margin: 0 0 0.9rem; color: var(--warning); font: 700 0.78rem 'Syne', sans-serif; letter-spacing: 0.08em; text-transform: uppercase; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 1rem; min-height: 244px; }
.podium-place { min-width: 0; text-align: center; padding: 1.25rem 0.75rem 1rem; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); animation: slide-in 0.4s both; }
.podium-place-1 { min-height: 208px; border-color: rgba(230, 219, 47, 0.50); background: linear-gradient(180deg, rgba(230, 219, 47, 0.12), var(--bg-2) 65%); animation-delay: 0.08s; }
.podium-place-2 { min-height: 178px; animation-delay: 0.02s; }
.podium-place-3 { min-height: 164px; animation-delay: 0.14s; }
.podium-avatar-wrap { width: 58px; height: 58px; margin: 0 auto 0.65rem; position: relative; }
.podium-place-1 .podium-avatar-wrap { width: 70px; height: 70px; }
.podium-avatar { width: 100%; height: 100%; display: block; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-hover); background: var(--bg-3); }
.podium-place-1 .podium-avatar { border-color: rgba(230, 219, 47, 0.45); }
.podium-avatar-fallback { display: flex; align-items: center; justify-content: center; font-family: 'Syne', sans-serif; font-weight: 800; color: var(--text-sub); }
.podium-medal { position: absolute; right: -0.2rem; bottom: -0.25rem; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: white; font: 700 0.72rem 'Syne', sans-serif; }
.podium-place-1 .podium-medal { background: var(--warning); color: var(--bg); }
.podium-name, .vote-row-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'Syne', sans-serif; font-size: 0.88rem; }
.podium-votes, .vote-row-count { display: block; margin-top: 0.25rem; color: var(--text-muted); font-size: 0.75rem; }
.podium-reward { display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem; margin-top: 0.7rem; color: var(--warning); font: 700 0.78rem 'Syne', sans-serif; }
.coin-icon { width: 1.05rem; height: 1.05rem; fill: rgba(230, 219, 47, 0.22); stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.vote-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.25rem; }
.vote-row { display: grid; grid-template-columns: 30px 30px minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; min-height: 44px; padding: 0.4rem 0.75rem; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); animation: slide-in 0.4s both; }
.vote-rank { color: var(--accent-2); font: 700 0.95rem 'Syne', sans-serif; text-align: center; }
.vote-row-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--bg-3); }
.vote-row-count { margin: 0; }
.vote-empty { padding: 1rem; color: var(--text-muted); text-align: center; font-size: 0.82rem; border: 1px dashed var(--border-hover); border-radius: var(--radius-sm); }

@media (max-width: 760px) {
  .vote-layout { display: block; }
}

@media (max-width: 460px) {
  .podium { gap: 0.4rem; }
  .podium-place { padding-inline: 0.35rem; }
  .podium-name { font-size: 0.76rem; }
  .vote-row { gap: 0.5rem; grid-template-columns: 26px 28px minmax(0, 1fr); }
  .vote-row-count { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   GUILD PAGE
═══════════════════════════════════════════════════════════════ */

/* ─── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.bc-link { color: var(--text-muted); transition: color 0.2s; }
.bc-link:hover { color: var(--text); }
.bc-sep { opacity: 0.4; }
.bc-current { color: var(--text-sub); }

/* ─── Toast ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  animation: toast-in 0.35s cubic-bezier(0.16,1,0.3,1) both;
  transition: opacity 0.4s, transform 0.4s;
}
.toast-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34,197,94,0.3);
  color: #4ade80;
}
.toast-error {
  background: rgba(232,68,90,0.15);
  border: 1px solid rgba(232,68,90,0.3);
  color: var(--accent-2);
}
.toast-hide { opacity: 0; transform: translateY(12px); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Guild Header ───────────────────────────────────────────── */
.guild-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.guild-header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.gh-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 2px solid var(--border);
}
.gh-icon-fallback {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  background: var(--bg-3);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-sub);
}
.gh-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.4rem;
}
.gh-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.gh-sep { opacity: 0.4; }

/* ─── Tabs ───────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.tab {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── Notification Cards ─────────────────────────────────────── */
.notif-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.notif-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
  animation: slide-in 0.3s cubic-bezier(0.16,1,0.3,1) both;
}
.notif-card.inactive { opacity: 0.5; }
.notif-card:hover { border-color: var(--border-hover); }

/* Platform badge */
.notif-platform {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}
.notif-platform-twitch  { background: rgba(145,70,255,0.15); color: #a970ff; border: 1px solid rgba(145,70,255,0.25); }
.notif-platform-youtube { background: rgba(255,0,0,0.12);   color: #ff5252; border: 1px solid rgba(255,0,0,0.2); }
.notif-platform-kick    { background: rgba(83,252,24,0.12); color: #80ff52; border: 1px solid rgba(83,252,24,0.25); }

/* Infos */
.notif-info { flex: 1; min-width: 0; }
.notif-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.notif-role { color: var(--twitch); }
.notif-last { font-style: italic; }

/* Live badge */
.live-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  background: rgba(232,68,90,0.15);
  border: 1px solid rgba(232,68,90,0.3);
  color: var(--accent-2);
  border-radius: 999px;
  animation: pulse-live 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-live {
  0%,100% { box-shadow: 0 0 0 0 rgba(232,68,90,0); }
  50%      { box-shadow: 0 0 0 4px rgba(232,68,90,0.15); }
}

/* Actions */
.notif-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-toggle.on  { color: var(--success); border-color: rgba(34,197,94,0.3); }
.btn-toggle.off { color: var(--text-muted); }
.btn-toggle:hover { background: var(--bg-3); }
.btn-delete:hover { color: var(--accent); border-color: rgba(232,68,90,0.3); background: rgba(232,68,90,0.07); }
.btn-edit:hover { color: var(--warning); border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.07); }
a.btn-icon { text-decoration: none; }
.btn-customize:hover { color: #a970ff; border-color: rgba(169,112,255,0.35); background: rgba(169,112,255,0.08); }

/* ─── Audit log ──────────────────────────────────────────────── */
.audit-log-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.audit-log-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  flex-wrap: wrap;
}
.audit-log-action { font-weight: 600; white-space: nowrap; }
.audit-log-details { color: var(--text-sub); flex: 1; }
.audit-log-actor,
.audit-log-date { color: var(--text-muted); white-space: nowrap; }

.activity-card.settings-card { max-width: none; width: 100%; }
.activity-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.activity-filters .form-select { max-width: 260px; }
.activity-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}
.btn-load-more {
  padding: 0.6rem 1.5rem;
  background: transparent;
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-load-more:hover:not(:disabled) { background: var(--bg-3); color: var(--text); }
.btn-load-more:disabled { opacity: 0.6; cursor: default; }

@media (max-width: 640px) {
  .audit-log-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    align-items: start;
    gap: 0.5rem 0.75rem;
  }
  .audit-log-action,
  .audit-log-details,
  .audit-log-actor,
  .audit-log-date {
    min-width: 0;
    white-space: normal;
    overflow-wrap: break-word;
  }
  .audit-log-action { grid-column: 1; font-size: 0.78rem; }
  .audit-log-details { grid-column: 2; }
  .audit-log-actor { grid-column: 1; }
  .audit-log-date { grid-column: 2; text-align: right; }
  .audit-log-actor,
  .audit-log-date { font-size: 0.72rem; }
}


/* ─── Settings Tab ───────────────────────────────────────────── */
.settings-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 520px;
}
.settings-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.settings-form { display: flex; flex-direction: column; gap: 1.25rem; }

.btn-save {
  align-self: flex-start;
  padding: 0.65rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.5rem;
}
.btn-save:hover { background: var(--accent-2); box-shadow: 0 4px 16px rgba(232,68,90,0.3); transform: translateY(-1px); }

/* ─── Side Panel ─────────────────────────────────────────────── */
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.panel-overlay.open { opacity: 1; pointer-events: all; }

/* ─── Games page ─────────────────────────────────────────────── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.game-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.game-card-icon { font-size: 2rem; }
.game-card-title { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
.game-card-desc { font-size: 0.85rem; color: var(--text-muted); flex: 1; }
.game-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.5rem; }
.game-cost { font-size: 0.78rem; color: var(--text-sub); }

/* ─── Wheel modal ─────────────────────────────────────────────── */
.wheel-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  z-index: 201;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  max-width: 92vw;
}
.wheel-modal.open { opacity: 1; pointer-events: all; transform: translate(-50%, -50%) scale(1); }
.wheel-modal-close { position: absolute; top: 1rem; right: 1rem; }
.wheel-modal-title { font-family: 'Syne', sans-serif; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.wheel-balance { font-size: 0.9rem; color: var(--text-sub); }
.wheel-wrap { position: relative; width: 360px; height: 360px; max-width: 80vw; max-height: 80vw; }
.wheel-wrap canvas { width: 100%; height: 100%; cursor: pointer; border-radius: 50%; box-shadow: 0 0 0 6px var(--bg-3), 0 8px 30px rgba(0,0,0,0.4); }
.wheel-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 22px solid var(--accent);
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.wheel-center-mascot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-2);
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  background: var(--bg-3);
  cursor: pointer;
  pointer-events: none;
}
.wheel-hint { font-size: 0.85rem; color: var(--text-muted); text-align: center; min-height: 1.2em; }

.games-low-balance-hint,
.profile-low-balance-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(230, 219, 47, 0.08);
  border: 1px solid rgba(230, 219, 47, 0.3);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin: 0.5rem 0 1rem;
}
.games-low-balance-hint a,
.profile-low-balance-hint a {
  color: #e6db2f;
  font-weight: 600;
  text-decoration: none;
}
.games-low-balance-hint a:hover,
.profile-low-balance-hint a:hover {
  text-decoration: underline;
}

.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 100vw;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
  overflow-y: auto;
}
.side-panel.open { transform: translateX(0); }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-2);
  z-index: 1;
}
.panel-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.panel-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.panel-close:hover { color: var(--text); border-color: var(--border-hover); }

.panel-form {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ─── Formulaire générique ───────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.req { color: var(--accent); }
.form-input, .form-select, .form-textarea {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  padding: 0.65rem 0.9rem;
  transition: border-color 0.2s;
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-select option { background: var(--bg-3); }
.form-hint { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.form-hint code {
  font-family: monospace;
  background: var(--bg-3);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-size: 0.8em;
  color: var(--accent-2);
}

/* Checkbox simple (ex : lier le titre au live) */
.form-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-sub);
  cursor: pointer;
  width: fit-content;
}
.form-checkbox-row input { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }

/* Ligne "champ" de l'embed (nom / valeur / en ligne) */
.embed-field-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.embed-field-row .field-name-input { flex: 1; }
.embed-field-row .field-value-input { flex: 2; }
.field-inline-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.field-inline-toggle:has(input:checked) {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(145, 70, 255, 0.1);
}
.field-inline-toggle input { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; }

/* Color picker */
.color-row { display: flex; align-items: center; gap: 0.75rem; }
.form-color {
  width: 48px;
  height: 36px;
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-3);
  cursor: pointer;
}
.color-label { font-family: monospace; font-size: 0.85rem; color: var(--text-sub); }

/* Submit */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.5rem;
}
.btn-submit:hover { background: var(--accent-2); box-shadow: 0 4px 20px rgba(232,68,90,0.35); transform: translateY(-1px); }
.btn-submit:disabled,
.btn-submit:disabled:hover {
  background: var(--bg-3);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .guild-header { flex-direction: column; align-items: flex-start; }
  .side-panel { width: 100vw; }
  .notif-card { flex-wrap: wrap; }
  .notif-platform { order: -1; }
}

/* ─── Avatar fallback ────────────────────────────────────── */
.user-avatar-fallback {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── btn-add (bouton principal header) ──────────────────── */
.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-add:hover {
  background: var(--accent-2);
  box-shadow: 0 4px 16px rgba(232,68,90,0.35);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   PANEL 2 ÉTAPES + RESOLVER
═══════════════════════════════════════════════════════════════ */

.step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}
.step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-label { font-size: 0.875rem; font-weight: 600; color: var(--text-sub); }

.resolve-row {
  display: flex;
  gap: 0.5rem;
}
.resolve-row .form-input { flex: 1; }

.btn-resolve {
  padding: 0.65rem 1rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-resolve:hover { border-color: var(--accent); color: var(--accent); }
.btn-resolve:disabled { opacity: 0.5; cursor: not-allowed; }

.resolve-error {
  margin-top: 0.5rem;
  padding: 0.6rem 0.9rem;
  background: rgba(232,68,90,0.1);
  border: 1px solid rgba(232,68,90,0.25);
  border-radius: var(--radius-sm);
  color: var(--accent-2);
  font-size: 0.82rem;
}

.resolve-preview {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(34,197,94,0.07);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius-sm);
}
.preview-platform {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  flex-shrink: 0;
}
.pp-twitch  { background: rgba(145,70,255,0.15); color: #a970ff; }
.pp-youtube { background: rgba(255,0,0,0.12); color: #ff5252; }
.pp-kick    { background: rgba(83,252,24,0.12); color: #80ff52; }
.preview-info { flex: 1; }
.preview-name  { font-weight: 700; font-size: 0.9rem; }
.preview-login { font-size: 0.78rem; color: var(--text-muted); }
.preview-check { color: var(--success); font-size: 1.2rem; }

/* Résumé étape 2 */
.resolved-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  margin: 0 0 0.5rem;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.rs-platform {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  flex-shrink: 0;
}
.rsp-twitch  { background: rgba(145,70,255,0.15); color: #a970ff; }
.rsp-youtube { background: rgba(255,0,0,0.12); color: #ff5252; }
.rsp-kick    { background: rgba(83,252,24,0.12); color: #80ff52; }
.rs-name  { font-weight: 700; font-size: 0.95rem; }
.rs-login { font-size: 0.78rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════
   ADMIN PAGE
═══════════════════════════════════════════════════════════════ */

.owner-badge {
  padding: 0.4rem 1rem;
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.3);
  color: #fbbf24;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border-hover); }
.stat-icon  { font-size: 1.5rem; margin-bottom: 0.5rem; }
.stat-value { font-family: 'Syne', sans-serif; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.04em; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.admin-tabs { margin-bottom: 1.5rem; }
.admin-section-hidden { display: none !important; }
.admin-tabs .tab { white-space: nowrap; }
.admin-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.admin-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.card-icon { font-size: 1.1rem; }
.admin-form { display: flex; flex-direction: column; gap: 1rem; }
.admin-card-api { min-width: 0; }
.admin-table-wrap { width: 100%; overflow-x: auto; }
.admin-table {
  width: 100%;
  min-width: 430px;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.admin-table th,
.admin-table td {
  padding: 0.65rem 0.5rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.admin-table th {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table td { color: var(--text-sub); }

.api-status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.api-status-heading { font-size: 0.8rem; font-weight: 700; color: var(--text-sub); }
.api-status-items { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; }
.api-status-item { display: flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; }
.api-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); }
.api-status-ok { background: var(--success); }
.api-status-rate_limit { background: #f59e0b; }
.api-status-error { background: var(--accent); }
.api-status-platform { color: var(--text); font-weight: 600; }
.api-status-label { color: var(--text-muted); }
.api-status-time { color: var(--text-muted); white-space: nowrap; }

@media (max-width: 700px) {
  .api-status-strip { align-items: flex-start; flex-direction: column; }
  .api-status-items { width: 100%; }
  .api-status-item { flex-wrap: wrap; }
}

/* Toggle switch */
.toggle-row { display: flex; align-items: center; gap: 0.75rem; }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  left: 3px; top: 3px;
  transition: 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: rgba(232,68,90,0.2); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); background: var(--accent); }
.toggle-label { font-size: 0.875rem; color: var(--text-sub); }

/* Recent list */
.recent-list { display: flex; flex-direction: column; gap: 0.4rem; }
.recent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.recent-name { font-size: 0.875rem; font-weight: 500; }
.recent-meta { font-size: 0.75rem; color: var(--text-muted); }
.recent-name { min-width: 0; overflow-wrap: anywhere; }
.recent-meta { flex-shrink: 0; }

/* Roue de la fortune — admin */
.admin-card-wide { grid-column: 1 / -1; }
.prize-list { display: flex; flex-direction: column; gap: 0.5rem; }
.prize-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.prize-row-inactive { opacity: 0.5; }
.prize-color { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.2); }
.prize-label { font-size: 0.875rem; font-weight: 600; flex: 1; }
.prize-amount { font-size: 0.8rem; color: var(--text-sub); }
.prize-label,
.prize-amount { min-width: 0; overflow-wrap: anywhere; }
.prize-row > form { flex: 0 0 auto; }
.prize-winrate { font-size: 0.8rem; color: var(--text-muted); min-width: 3.5rem; text-align: right; }
.prize-order-controls { display: flex; gap: 0.25rem; }
.prize-order-controls form { display: contents; }
.prize-order-controls .btn-icon:disabled { cursor: not-allowed; opacity: 0.35; }
.prize-fulfilled { font-size: 0.78rem; color: var(--success); white-space: nowrap; }
.prize-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 1rem; }
.prize-form-row > .form-group { min-width: 0; }
.vote-tier-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.vote-tier-row:first-child { padding-top: 0; border-top: 0; }
.vote-tier-title {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.vote-tier-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.wheel-cost-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.wheel-cost-row .form-input { flex: 1 1 8rem; max-width: 150px; }

/* Admin dashboard: keep dense controls usable on narrow screens. */
.admin-page,
.admin-page .admin-grid,
.admin-page .admin-card,
.admin-page .admin-form { min-width: 0; }
.admin-page .form-input,
.admin-page .form-select,
.admin-page .form-textarea { max-width: 100%; }

@media (max-width: 900px) {
  .admin-page .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-page .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-page .admin-card-wide { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .admin-tabs { overflow-x: auto; margin-inline: 0; }
  .admin-tabs .tab { flex: 0 0 auto; padding-inline: 0.85rem; }
  .admin-page .page-header { align-items: flex-start; }
  .admin-page .owner-badge { align-self: flex-start; }
  .admin-page .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .admin-page .stat-card { padding: 0.9rem 0.65rem; }
  .admin-page .stat-value { font-size: 1.2rem; overflow-wrap: anywhere; }
  .admin-page .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-page .admin-card,
  .admin-page .admin-card-wide { grid-column: 1; padding: 1rem; }
  .admin-page .prize-form-row { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
  .admin-page .vote-tier-fields { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
  .admin-page .wheel-cost-row { align-items: stretch; }
  .admin-page .wheel-cost-row .form-input { max-width: none; }
  .admin-page .wheel-cost-row .btn-save { flex: 0 0 auto; }
}

@media (max-width: 420px) {
  .admin-page .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-page .stat-icon { font-size: 1.2rem; }
  .admin-page .stat-label { min-height: 2.2em; }
  .admin-page .admin-card-title { font-size: 0.95rem; }
  .admin-page .admin-table { min-width: 390px; }
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR V2 — dropdown + nav links + live status
═══════════════════════════════════════════════════════════════ */

.navbar-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* ─── Nav links ──────────────────────────────────────────────── */
.navbar-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
  position: relative;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--text); background: rgba(255,255,255,0.07); }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
}

/* Admin link spécial */
.nav-link-admin {
  color: #fbbf24;
}
.nav-link-admin:hover { color: #fcd34d; background: rgba(245,158,11,0.08); }
.nav-link-admin.active { color: #fcd34d; background: rgba(245,158,11,0.1); }
.nav-link-admin.active::after { background: #fbbf24; }

.admin-pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
  animation: pulse-dot 2s ease-in-out infinite;
  margin-left: 2px;
}

/* ─── Live status indicator ──────────────────────────────────── */
.nav-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: default;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.3s;
  flex-shrink: 0;
}
.status-dot.status-live {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot 1.5s ease-in-out infinite;
}
.status-text { font-variant-numeric: tabular-nums; }

/* ─── User dropdown ──────────────────────────────────────────── */
.user-dropdown {
  position: relative;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}
.user-chip:hover,
.user-chip.active { border-color: var(--border-hover); background: var(--bg-2); }

.chevron {
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.user-chip.active .chevron { transform: rotate(180deg); }

/* Dropdown menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 220px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 500;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.97);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}
.dropdown-menu.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-3);
}
.dropdown-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.dropdown-username {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
}
.dropdown-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: var(--text-sub);
  transition: all 0.15s;
  cursor: pointer;
}
.dropdown-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }

.dropdown-item-admin {
  color: #fbbf24;
  justify-content: space-between;
}
.dropdown-item-admin:hover { background: rgba(245,158,11,0.07); color: #fcd34d; }

.dropdown-item-danger { color: var(--text-muted); }
.dropdown-item-danger:hover { background: rgba(232,68,90,0.07); color: var(--accent-2); }

.dropdown-item-form {
  margin: 0;
  width: 100%;
}
.dropdown-item-form .dropdown-item {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  color: var(--text-muted);
  appearance: none;
  -webkit-appearance: none;
}
.dropdown-item-form .dropdown-item:hover {
  background: rgba(232,68,90,0.07);
  color: var(--accent-2);
}

.dropdown-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.3);
  color: #fbbf24;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ─── Btn connexion (non connecté) ───────────────────────────── */
.btn-discord-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #5865F2;
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-discord-nav:hover { background: #4752c4; transform: translateY(-1px); }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .navbar-links { display: none; }
  .nav-status   { display: none; }
  .navbar-left  { gap: 1rem; }
}

/* ═══════════════════════════════════════════════════════════════
   EMBED PREVIEW
═══════════════════════════════════════════════════════════════ */
.embed-preview {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  background: #2b2d31;
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 0.82rem;
  transition: all 0.2s;
}
.embed-bar {
  width: 4px;
  background: #9146FF;
  flex-shrink: 0;
  border-radius: 4px 0 0 4px;
  transition: background 0.2s;
}
.embed-body {
  padding: 0.75rem 0.9rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.embed-platform-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-bottom: 0.15rem;
}
.ept-twitch  { background: rgba(145,70,255,0.2); color: #c4a6ff; }
.ept-youtube { background: rgba(255,0,0,0.15); color: #ff8080; }
.ept-kick    { background: rgba(83,252,24,0.15); color: #80ff52; }
.embed-title {
  font-weight: 700;
  color: #fff;
  font-size: 0.875rem;
  line-height: 1.3;
}
.embed-title-link { color: #00a8fc; text-decoration: underline; cursor: pointer; }
.embed-author {
  font-weight: 600;
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.3;
}
.embed-field { min-width: 0; }
.embed-desc {
  color: #dbdee1;
  font-size: 0.8rem;
  line-height: 1.5;
}
.embed-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.25rem;
}
.embed-field-inline { flex: 1 1 auto; min-width: 90px; }
.embed-field-block  { flex: 1 1 100%; }
.embed-field-name  { font-size: 0.72rem; font-weight: 700; color: #fff; margin-bottom: 0.1rem; }
.embed-field-value { font-size: 0.78rem; color: #dbdee1; }
.embed-muted  { color: #80848e !important; }
.embed-link   { color: #00a8fc !important; }
.embed-footer {
  font-size: 0.7rem;
  color: #80848e;
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.embed-stream-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  margin-top: 0.35rem;
  background: linear-gradient(135deg, #3a3d44, #1e2024);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: rgba(255,255,255,0.35);
}
.embed-stream-thumb-badge {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  background: #ed4245;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
}
.embed-stream-thumb-play { opacity: 0.6; }

/* ═══════════════════════════════════════════════════════════════
   BOUTON REFRESH
═══════════════════════════════════════════════════════════════ */
.btn-refresh {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-refresh:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--bg-2);
}

/* ═══════════════════════════════════════════════════════════════
   STATS TAB
═══════════════════════════════════════════════════════════════ */
.stats-section { display: flex; flex-direction: column; gap: 1.25rem; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}
@media (max-width: 860px) { .stats-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 500px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

.stat-mini-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  transition: border-color 0.2s;
}
.stat-mini-card:hover { border-color: var(--border-hover); }
.stat-mini-val {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-mini-label { font-size: 0.75rem; color: var(--text-muted); }

.stats-grid-2 {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
}
@media (max-width: 700px) { .stats-grid-2 { grid-template-columns: 1fr; } }

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.donut-legend { display: flex; flex-direction: column; gap: 0.5rem; }
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-sub);
}
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.recent-lives-list { display: flex; flex-direction: column; gap: 0.4rem; }
.live-history-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.8rem;
}
.lh-name  { font-weight: 600; flex: 1; }
.lh-date  { color: var(--text-muted); font-size: 0.75rem; white-space: nowrap; }

/* Test notif */
.test-notif-list { display: flex; flex-direction: column; gap: 0.4rem; }
.test-notif-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.test-notif-name    { font-weight: 600; font-size: 0.875rem; }
.test-notif-channel { font-size: 0.78rem; color: var(--text-muted); }

.btn-test {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.25);
  color: #fbbf24;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-test:hover {
  background: rgba(245,158,11,0.2);
  border-color: rgba(245,158,11,0.4);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN V2 — Layout 2 colonnes
═══════════════════════════════════════════════════════════════ */
.login-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 4rem;
  align-items: center;
  width: 100%;
  max-width: 1000px;
  padding: 2rem;
  margin: auto;
}

@media (max-width: 768px) {
  .login-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
  }
  .login-brand { display: none; }
}

@media (max-width: 480px) {
  .login-layout  { padding: 1rem; }
  .login-card    { padding: 2.25rem 1.5rem; }
  .login-title   { font-size: 1.6rem; }
  .login-subtitle{ margin-bottom: 1.5rem; }
  .logo-icon svg { width: 26px; height: 26px; }
}

@media (max-width: 360px) {
  .login-card { padding: 1.75rem 1.1rem; border-radius: 16px; }
  .btn-discord { padding: 0.8rem 1rem; font-size: 0.88rem; gap: 0.5rem; }
}

/* Côté gauche */
.login-brand {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: card-in 0.6s cubic-bezier(0.16,1,0.3,1) both;
}

.login-mascot {
  width: 260px;
  height: 260px;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(232,68,90,0.2));
  animation: mascot-float 3s ease-in-out infinite;
}

@keyframes mascot-float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.login-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-brand-name {
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.login-brand-tagline {
  font-size: 1.05rem;
  color: var(--text-sub);
  line-height: 1.6;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.lf-item {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.lf-item::before { content: ''; }

/* ═══════════════════════════════════════════════════════════════
   MASCOTTES — Empty states
═══════════════════════════════════════════════════════════════ */
.empty-mascot {
  width: 160px;
  height: 160px;
  object-fit: contain;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
  animation: mascot-float 4s ease-in-out infinite;
}

/* Mascotte stats tab */
.stats-mascot {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

/* ═══════════════════════════════════════════════════════════════
   PROFILE PAGE
═══════════════════════════════════════════════════════════════ */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.75rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.profile-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(232,68,90,0.05), transparent 60%);
  pointer-events: none;
}

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 20px rgba(232,68,90,0.25);
}
.profile-status-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--bg-2);
  box-shadow: 0 0 8px var(--success);
}

.profile-username {
  font-family: 'Syne', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.2rem;
}
.profile-id {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: monospace;
  margin-bottom: 0.6rem;
}
.profile-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.profile-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-sub);
}
.profile-badge-winner { color: var(--warning); border-color: rgba(230, 219, 47, 0.3); }

/* Layout */
.profile-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 860px) { .profile-layout { grid-template-columns: 1fr; } }

.profile-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }

/* Stats grid */
.profile-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.profile-stat {
  text-align: center;
  padding: 0.75rem 0.5rem;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.profile-stat-val {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.profile-stat-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.1rem; }
.profile-stat-winner .profile-stat-val { color: var(--warning); }

/* Bouton profil */
.btn-profile-danger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: transparent;
  border: 1px solid rgba(232,68,90,0.2);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
}
.btn-profile-danger:hover {
  background: rgba(232,68,90,0.07);
  border-color: rgba(232,68,90,0.4);
  color: var(--accent-2);
}

/* ─── Docs page ──────────────────────────────────────────────── */
.docs-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.docs-toc-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.5rem;
}
.docs-toc-link {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-sub);
  transition: all 0.2s;
}
.docs-toc-link:hover { border-color: var(--accent); color: var(--accent); background: rgba(232,68,90,0.07); }

.docs-article-list { display: flex; flex-direction: column; gap: 1.75rem; }

.docs-article {
  display: flex;
  gap: 2rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  scroll-margin-top: 6.5rem;
}

.docs-article-media { flex-shrink: 0; width: 140px; display: flex; align-items: flex-start; justify-content: center; }
.docs-article-img { width: 120px; height: 120px; object-fit: contain; }

.docs-article-body { flex: 1; min-width: 0; }
.docs-article-badge {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(232,68,90,0.1);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}
.docs-article-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.docs-article-summary { color: var(--text-sub); font-size: 0.9rem; line-height: 1.6; margin-bottom: 0.4rem; }
.docs-article-meta { color: var(--text-muted); font-size: 0.78rem; }

.docs-steps {
  list-style: none;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.docs-step { display: flex; align-items: flex-start; gap: 0.85rem; }
.docs-step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-sub);
}
.docs-step-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.2rem; }
.docs-step-text { color: var(--text-muted); font-size: 0.85rem; line-height: 1.55; }

@media (max-width: 720px) {
  .docs-article { flex-direction: column; }
  .docs-article-media { width: 100%; }
}

/* ─── Terms / CGU page ───────────────────────────────────────── */
.terms-content {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.terms-section:not(:last-child) {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.terms-section-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.terms-section-body { color: var(--text-sub); font-size: 0.88rem; line-height: 1.65; }
