/* ============================================================
   05-SIDEBAR — Sidebar Desktop & Offcanvas Mobile
   Fait partie de : poudlard-refondu (split modulaire)

   Mobile-first : base = mobile, enrichi via min-width
   Breakpoints : sm=576px, md=768px, lg=992px
   ============================================================ */

/* ══════════════════════════════════════════════════════════════
   SIDEBAR DESKTOP — Fond violet (identique au mobile)
   ══════════════════════════════════════════════════════════════ */

.sidebar-desktop {
  background: linear-gradient(180deg, #1a0a2e 0%, #2d1452 50%, #1a0a2e 100%) !important;
  border-right: 1px solid rgba(160,80,220,0.15) !important;
  box-shadow: 2px 0 16px rgba(0,0,0,0.4) !important;
}

/* Logo : ne rétrécit jamais */
.sb-logo-wrap { flex-shrink: 0; }

/* Profil (avatar + barres + boutons) : reste en haut, ne scrolle pas */
.sb-profile { flex-shrink: 0; }
.sidebar-separator { flex-shrink: 0; margin: 2px 0; }

/* Navigation : prend l'espace restant et scrolle indépendamment */
.sb-nav-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(160,80,220,0.2) transparent;
}
.sb-nav-scroll::-webkit-scrollbar { width: 4px; }
.sb-nav-scroll::-webkit-scrollbar-thumb { background: rgba(160,80,220,0.2); border-radius: 2px; }

body:not([class*="maison-"]) .sidebar-desktop {
  background: linear-gradient(180deg, #1a0a2e 0%, #2d1452 50%, #1a0a2e 100%) !important;
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR OFFCANVAS MOBILE
   ══════════════════════════════════════════════════════════════ */

.sidebar-offcanvas {
  background: linear-gradient(180deg,
    var(--bg-sidebar, #0a0918) 0%,
    var(--bg-abyss, #12103a) 50%,
    var(--bg-sidebar, #080816) 100%
  ) !important;
  color: var(--text-parchment) !important;
  width: 260px !important;
  border-right: 1px solid var(--border-subtle, var(--border-gold-xs)) !important;
}

.sidebar-offcanvas .offcanvas-header {
  border-bottom-color: var(--border-gold-xs) !important;
}

/* Visiteurs (pas de maison) — sidebar violet */
body:not([class*="maison-"]) .sidebar-offcanvas {
  background: linear-gradient(180deg, #1a0a2e 0%, #2d1452 50%, #1a0a2e 100%) !important;
}

/* ══════════════════════════════════════════════════════════════
   BARRE DE TITRE — Salle des Portraits
   ══════════════════════════════════════════════════════════════ */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,
    var(--bg-sidebar, rgba(9,8,20,0.97)) 0%,
    var(--bg-abyss, rgba(22,19,52,0.97)) 25%,
    var(--bg-stone, rgba(30,26,68,0.97)) 50%,
    var(--bg-abyss, rgba(22,19,52,0.97)) 75%,
    var(--bg-sidebar, rgba(9,8,20,0.97)) 100%
  );
  color: var(--text-accent, var(--text-gold));
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-subtle, var(--border-gold-sm));
  text-shadow: 0 0 25px var(--accent-glow, var(--gold-glow)), 0 0 60px var(--accent-glow-sm, var(--gold-glow-sm));
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  padding: 6px 1.2rem;
}

.top-bar .top-bar-title {
  position: absolute;
  left: 1.2rem;
  margin: 0;
  font-size: clamp(0.7rem, 1.5vw, 1rem);
  letter-spacing: 0.15em;
  white-space: nowrap;
}

.top-bar-logo {
  display: inline-block;
  line-height: 0;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.top-bar-logo img {
  max-width: 200px;
  height: auto;
  filter: drop-shadow(0 0 14px rgba(212,168,40,0.35)) drop-shadow(0 2px 8px rgba(0,0,0,0.6));
}
.top-bar-logo:hover {
  transform: scale(1.04);
}
.top-bar-logo:hover img {
  filter: drop-shadow(0 0 22px rgba(212,168,40,0.55)) drop-shadow(0 0 50px rgba(212,168,40,0.2)) drop-shadow(0 2px 8px rgba(0,0,0,0.6));
}

/* Ligne lumineuse inférieure */
.top-bar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, var(--border-gold-sm) 10%, var(--gold-deep) 30%,
    var(--gold-bright) 50%, var(--gold-deep) 70%, var(--border-gold-sm) 90%, transparent 100%
  );
}

/* Lueur de torche en défilement */
.top-bar::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212,168,40,0.06), transparent);
  animation: torchSweep 10s ease-in-out infinite;
  pointer-events: none;
}

@keyframes torchSweep {
  0%, 100% { left: -100%; }
  50%       { left: 150%; }
}

/* Bouton déconnexion topbar */
.top-bar-logout {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 1rem;
  border-radius: var(--r-sm);
  background: rgba(174, 0, 1, 0.15);
  border: 1px solid rgba(220, 40, 40, 0.30);
  color: #e84040;
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow: none;
  transition: all 0.25s ease;
}

.top-bar-logout:hover {
  background: rgba(174, 0, 1, 0.35);
  border-color: rgba(220, 60, 40, 0.55);
  color: #ff6050;
  box-shadow: 0 0 16px rgba(174, 0, 1, 0.35), 0 0 40px rgba(174, 0, 1, 0.12);
  transform: translateY(-50%) translateY(-1px);
}

.top-bar-logout i {
  font-size: 0.85rem;
  transition: transform 0.25s ease;
}
.top-bar-logout:hover i {
  transform: translateX(2px);
}

/* ══════════════════════════════════════════════════════════════
   TITRE PRINCIPAL
   ══════════════════════════════════════════════════════════════ */

.main-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1rem, 3vw, 1.55rem);
  color: var(--text-gold);
  line-height: 1.4;
  padding-bottom: 1.4rem;
  position: relative;
  text-shadow: 0 0 30px var(--gold-glow), 0 0 80px var(--gold-glow-sm), 0 2px 6px rgba(0,0,0,0.6);
  letter-spacing: 0.08em;
}

.main-title::after {
  content: '— ✦ —';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  color: var(--gold-dark);
  font-size: 0.75rem;
  letter-spacing: 0.5em;
  white-space: nowrap;
  opacity: 0.7;
  font-family: var(--font-title);
  font-weight: 400;
}

/* ══════════════════════════════════════════════════════════════
   BLOCS DE CONTENU — Verre enchanté
   ══════════════════════════════════════════════════════════════ */

.content-block {
  background:
    linear-gradient(145deg, rgba(45, 38, 28, 0.12) 0%, transparent 50%),
    var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-left: 3px solid var(--accent, var(--border-gold-sm));
  border-radius: var(--r-lg);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: var(--shadow-card), var(--shadow-inset),
    inset 0 1px 0 var(--accent-glow-sm, rgba(212, 168, 40, 0.04));
  transition: all var(--dur-slow) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.content-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, rgba(255,255,255,0.08) 20%, rgba(255,255,255,0.15) 50%,
    rgba(255,255,255,0.08) 80%, transparent 100%
  );
  pointer-events: none;
}

.content-block::after {
  content: '✦';
  position: absolute;
  top: 10px; right: 14px;
  color: var(--border-gold-sm);
  font-size: 9px;
  transition: all var(--dur-slow) ease;
  pointer-events: none;
}

.content-block:hover {
  background:
    linear-gradient(145deg, rgba(45, 38, 28, 0.18) 0%, transparent 50%),
    var(--bg-glass-hover);
  border-color: var(--border-subtle, rgba(212, 168, 40, 0.12));
  border-left-color: var(--accent-bright, var(--gold-bright));
  box-shadow:
    0 16px 48px rgba(0,0,0,0.55),
    0 0 30px var(--accent-glow-sm, var(--gold-glow-sm)),
    inset 0 1px 0 var(--accent-glow-sm, rgba(212, 168, 40, 0.06)),
    var(--shadow-inset);
  transform: translateY(-3px);
}

.content-block:hover::after {
  color: var(--gold-deep);
  text-shadow: 0 0 8px var(--gold-glow);
  transform: rotate(45deg) scale(1.2);
}

.content-block p {
  color: var(--text-parchment);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.85;
}

.content-block .avatar {
  width: 64px; height: 64px;
  object-fit: cover;
  border: 2px solid var(--gold-deep);
  border-radius: 12px;
  box-shadow: 0 0 16px rgba(212,168,40,0.25), 0 6px 16px rgba(0,0,0,0.5);
  transition: all var(--dur-base) ease;
}

.content-block:hover .avatar {
  border-color: #c8a82c;
  box-shadow: 0 0 22px rgba(212,168,40,0.40), 0 6px 16px rgba(0,0,0,0.5);
  transform: scale(1.04);
}

/* ══════════════════════════════════════════════════════════════
   BOUTON OR — Sort Lumos
   ══════════════════════════════════════════════════════════════ */

.btn-gold {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1a0e00;
  background: linear-gradient(135deg,
    var(--gold-pale) 0%, var(--gold-bright) 40%,
    var(--gold-true) 70%, var(--gold-deep) 100%
  );
  background-size: 200% 200%;
  border: 1px solid var(--gold-dark);
  border-radius: var(--r-sm);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.25),
    inset 0 -1px 0 rgba(0,0,0,0.2);
  transition: all var(--dur-base) var(--ease-smooth);
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(255,255,255,0.15);
}

.btn-gold::before {
  content: '';
  position: absolute;
  top: 0; left: -130%;
  width: 80%; height: 100%;
  background: linear-gradient(105deg,
    transparent 0%, rgba(255,255,255,0.20) 40%, rgba(255,255,255,0.35) 50%,
    rgba(255,255,255,0.20) 60%, transparent 100%
  );
  transition: left 0.55s var(--ease-smooth);
}

.btn-gold:hover {
  background-position: 100% 0%;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5), 0 0 30px var(--gold-glow),
    inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -1px 0 rgba(0,0,0,0.2);
  transform: translateY(-2px);
  color: #0e0600;
}
.btn-gold:hover::before { left: 120%; }
.btn-gold:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(0,0,0,0.4); }

/* ══════════════════════════════════════════════════════════════
   FLASH MESSAGES
   ══════════════════════════════════════════════════════════════ */

.alert-magical {
  background: rgba(20, 18, 48, 0.80);
  border: 1px solid var(--border-gold-sm);
  border-left: 3px solid var(--gold-bright);
  color: var(--text-parchment);
  backdrop-filter: blur(20px);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  font-family: var(--font-body);
  font-size: 0.88rem;
  animation: alertSlideIn 0.4s var(--ease-smooth);
}

@keyframes alertSlideIn {
  from { opacity: 0; transform: translateY(-16px) scale(0.96); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0)     scale(1);    filter: blur(0); }
}

.alert-magical.alert-danger  { border-left-color: var(--ember-true); background: rgba(174,0,1,0.10); }
.alert-magical.alert-success { border-left-color: var(--color-success); background: rgba(46,204,113,0.08); }

/* ══════════════════════════════════════════════════════════════
   PROFIL SIDEBAR — Fond complet = couleur maison
   ══════════════════════════════════════════════════════════════ */

/* ── Séparateur runique — fond sombre ── */
.sidebar-separator::after {
  background: #2d1452;
}

/* ── Logo sidebar desktop ── */
.sb-logo-wrap {
  padding: 14px 6px 6px;
  text-align: center;
}

.sb-logo-link {
  display: inline-block;
  line-height: 0;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.sb-logo-link:hover { transform: scale(1.05); }

.sb-logo-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border: none !important;
  box-shadow: none !important;
  filter: drop-shadow(0 0 10px rgba(212,168,40,0.25));
  transition: filter 0.3s ease;
}
.sb-logo-link:hover .sb-logo-img {
  filter: drop-shadow(0 0 18px rgba(212,168,40,0.45)) drop-shadow(0 0 40px rgba(212,168,40,0.15));
}

.sb-spacer { padding-top: 8px; }

.sb-profile {
  margin: 0 6px;
  border-radius: 12px;
  overflow: hidden;
  background: color-mix(in srgb, var(--mc, #2a2a4a), #000 35%);
  border: 1px solid rgba(255,255,255,0.08);
}

/* ── HAUT : 2 colonnes ── */
.sb-top-row {
  display: flex;
  align-items: center;
  padding: 10px 8px 8px;
}

.sb-top-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 60px;
}

.sb-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  position: relative;
  border: 2px solid rgba(255,255,255,0.20);
  background: rgba(0,0,0,0.25);
  color: #d0d0e0;
  transition: all 0.2s;
}
.sb-circle i { font-size: 1.3rem; }
.sb-circle:hover {
  border-color: rgba(255,255,255,0.45);
  background: rgba(0,0,0,0.4);
  color: #fff;
}

.sb-circle-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

/* Badges — bleu=msg, orange=notif */
.sb-badge {
  position: absolute;
  font-size: 0.55rem;
  font-weight: 800;
  width: 18px; height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  border: 2px solid var(--mc, #2a2a4a);
}
.sb-badge-blue   { bottom: -4px; left: -6px;  background: #3b82f6; box-shadow: 0 0 8px rgba(59,130,246,0.7); }
.sb-badge-orange { bottom: -4px; right: -6px; background: #f97316; box-shadow: 0 0 8px rgba(249,115,22,0.7); }

/* Séparateur pointillé vertical */
.sb-vsep {
  width: 0;
  align-self: stretch;
  margin: 8px;
  border-left: 2px dotted rgba(255,255,255,0.15);
}

/* ── Avatar avec badges ── */
.sb-top-right {
  flex: 1;
  display: flex;
  justify-content: center;
}

.sb-avatar-wrap {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.sb-avatar {
  width: 90px; height: 90px;
  border-radius: 10px;
  border: 3px solid rgba(255,255,255,0.2);
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  transition: all 0.2s ease;
}

.sb-avatar-wrap:hover .sb-avatar {
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}

/* Badges sur l'avatar */
.sb-avatar-badge {
  position: absolute;
  bottom: -4px;
  font-size: 0.55rem;
  font-weight: 800;
  width: 20px; height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  border: 2px solid var(--mc, #2a2a4a);
  z-index: 2;
}
.sb-avatar-badge-left  { left: -6px;  background: #3b82f6; box-shadow: 0 0 8px rgba(59,130,246,0.7); }
.sb-avatar-badge-right { right: -6px; background: #f97316; box-shadow: 0 0 8px rgba(249,115,22,0.7); }

/* ── BARRES PV / Endurance / XP ── */
.sb-bars {
  padding: 4px 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sb-bar-group {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 14px;
}

.sb-bar-label {
  font-size: 0.58rem;
  font-weight: 800;
  white-space: nowrap;
  min-width: 72px;
  color: var(--mc-text, #000) !important;
  opacity: 1 !important;
}

.sb-bar-gallions .sb-bar-label {
  color: #d4a828 !important;
  font-size: 0.6rem;
}
.sb-bar-gallions .sb-bar-label .bi-coin {
  margin-right: 2px;
}

.sb-bar-track {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(0,0,0,0.3);
  overflow: hidden;
}

.sb-bar-fill {
  height: 100%;
  border-radius: 20px;
  width: var(--bw, 0%);
  transition: width 1s cubic-bezier(0.34,1.56,0.64,1);
}

.sb-fill-hp  { background: linear-gradient(90deg,#1a8a1a,#2ecc40,#50e868); }
.sb-fill-end { background: linear-gradient(90deg,#c03020,#e04040,#f06060); }
.sb-fill-xp  { background: linear-gradient(90deg,#3070d0,#5098f0,#70b8ff); }

/* ── BOUTON CARTE DU MARAUDEUR ── */
.sb-carte-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 8px 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent, rgba(212,168,40,0.15)), rgba(212,168,40,0.05));
  border: 1px solid var(--border-mid, rgba(212,168,40,0.2));
  color: var(--house-primary, #d4a828);
  font-family: var(--font-title, 'Cinzel', serif);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all 0.25s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.sb-carte-btn:hover {
  background: linear-gradient(135deg, var(--accent, rgba(212,168,40,0.25)), rgba(212,168,40,0.1));
  border-color: var(--house-primary, #d4a828);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 12px var(--accent-glow-sm, rgba(212,168,40,0.15));
  transform: translateY(-1px);
  color: #fff;
}
.sb-carte-btn.active {
  background: var(--house-gradient, linear-gradient(135deg, #b88820, #e8c040));
  color: #0a0818;
  border-color: var(--house-primary, #d4a828);
}
.sb-carte-btn i { font-size: 0.9rem; }

/* ── BOURSE (Gallions) ── */
.sb-wallet {
  padding: 6px 14px 4px;
}
.sb-wallet-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: linear-gradient(135deg, rgba(212,168,40,.12), rgba(139,90,30,.08));
  border: 1px solid rgba(212,168,40,.2);
  border-radius: 8px;
  text-decoration: none;
  color: #d4a828;
  transition: all .25s;
}
.sb-wallet-link:hover {
  background: linear-gradient(135deg, rgba(212,168,40,.2), rgba(139,90,30,.14));
  border-color: rgba(212,168,40,.4);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(212,168,40,.15);
  color: #f0d060;
}
.sb-wallet-icon {
  font-size: .9rem;
  filter: drop-shadow(0 0 3px rgba(212,168,40,.4));
}
.sb-wallet-amount {
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  font-weight: 800;
  color: #f0d060;
  text-shadow: 0 0 6px rgba(212,168,40,.2);
}
.sb-wallet-label {
  font-size: .48rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(212,168,40,.6);
  margin-left: auto;
}

/* ── BOUTONS : Combat | Coffre | Auberge ── */
.sb-actions {
  display: flex;
  align-items: stretch;
  background: rgba(0,0,0,0.3);
  border-radius: 0 0 12px 12px;
  padding: 4px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sb-act {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 5px 2px;
  text-decoration: none;
  color: rgba(255,255,255,0.85);
  font-size: 0.6rem;
  transition: all 0.2s;
}
.sb-act i { font-size: 1rem; transition: transform 0.2s; }
.sb-act span { font-size: 0.52rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.sb-act:hover { color: #fff; }
.sb-act:hover i { transform: scale(1.12); }

.sb-adot {
  width: 0;
  align-self: stretch;
  margin: 6px 0;
  border-left: 2px dotted rgba(255,255,255,0.12);
}

/* ── Changer de personnage ── */
.sb-switch-perso {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  margin: 0 6px;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-ui, 'Nunito', sans-serif);
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-top: 1px solid rgba(255,255,255,0.06);
  transition: color 0.2s;
}
.sb-switch-perso:hover { color: #fff; }
.sb-switch-perso i { font-size: 0.75rem; }

/* ── Auth box (visiteur non connecté) ── */
.sb-auth-box {
  margin: 10px 6px;
  padding: 14px 12px;
  background: rgba(80,30,120,0.35);
  border: 1px solid rgba(160,80,220,0.2);
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sb-auth-crest {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 1.2rem;
  color: #d4a828;
  margin-bottom: 2px;
}

.sb-auth-stars {
  display: inline-block;
  width: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,168,40,0.4));
}
.sb-auth-stars-r {
  background: linear-gradient(90deg, rgba(212,168,40,0.4), transparent);
}

.sb-auth-title {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #d4a828;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.sb-auth-divider {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,168,40,0.3), transparent);
  margin: 0 auto;
}

.sb-auth-tagline {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.4;
  margin: 0;
}

.sb-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.2s;
}

.sb-auth-primary {
  background: linear-gradient(135deg, var(--gold-deep, #8b6914), #d4a828);
  color: #0a0818;
  box-shadow: 0 3px 12px rgba(212,168,40,0.25);
}
.sb-auth-primary:hover {
  box-shadow: 0 5px 20px rgba(212,168,40,0.4);
  transform: translateY(-1px);
}
.sb-auth-secondary {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(212,168,40,0.2);
  color: #d4a828;
}
.sb-auth-secondary:hover {
  background: rgba(212,168,40,0.1);
  border-color: #d4a828;
}

/* ══════════════════════════════════════════════════════════════
   NAVIGATION PLATE (flat nav) — remplace les accordéons
   ══════════════════════════════════════════════════════════════ */

.sb-nav-flat {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 4px;
}

/* Nouvelles classes flat nav */
.sb-nav-label {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: #d4a828 !important;
  padding: 0.5rem 0.8rem 0.3rem;
  text-align: center;
  border-bottom: 1px solid rgba(212,168,40,0.15);
  border-top: 1px solid rgba(212,168,40,0.15);
  background: rgba(212,168,40,0.06);
  letter-spacing: 0.06em;
}
.sb-nav-label i { display: none; }

.sb-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
  color: #e0c878 !important;
  text-decoration: none;
  transition: all 0.15s;
  font-family: 'EB Garamond', Georgia, serif;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  position: relative;
  min-height: 40px;
}
.sb-nav-link i { display: none; }
.sb-nav-link span { flex: 0 0 auto; }
.sb-nav-link:hover {
  background: rgba(212,168,40,0.1);
  color: #f0d878 !important;
}
.sb-nav-link.active {
  background: rgba(212,168,40,0.14);
  color: #f0d878 !important;
  font-weight: 700;
}

/* Anciennes classes (fallback si ancien markup en prod) */
.sidebar-desktop .sidebar-section-title {
  color: #d4a828 !important;
}
.sidebar-desktop .sidebar-section a,
.sidebar-desktop .sidebar-auth a {
  color: #e0c878 !important;
}
.sidebar-desktop .sidebar-section a:hover,
.sidebar-desktop .sidebar-section a.active,
.sidebar-desktop .sidebar-auth a:hover,
.sidebar-desktop .sidebar-auth a.active {
  color: #f0d878 !important;
}

.sb-nav-link .sb-link-badge {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: #ae0001;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: 9px;
  font-family: 'Cinzel', serif;
  line-height: 1;
}

/* ── Décor visiteur en bas de sidebar ── */
.sb-visitor-deco {
  padding: 16px 12px;
  text-align: center;
  margin-top: auto;
}

.sb-deco-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,168,40,0.15), transparent);
  margin: 8px 0;
}

.sb-deco-emblem {
  font-size: 1.1rem;
  color: rgba(212,168,40,0.3);
  margin: 6px 0;
}

.sb-deco-quote {
  font-size: 0.62rem;
  font-style: italic;
  color: rgba(255,255,255,0.35);
  line-height: 1.5;
  margin: 8px 0 4px;
}

.sb-deco-attribution {
  font-size: 0.58rem;
  color: rgba(212,168,40,0.35);
  font-family: 'Cinzel', serif;
  font-weight: 700;
}

/* ── Actions rapides mobile (bas du sidebar offcanvas) ── */
.sidebar-mobile-actions {
  border-top: 2px solid rgba(212,168,40,0.2);
  padding: 10px 14px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sb-mobile-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: none;
  background: rgba(212,168,40,0.06);
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 8px;
  color: #d4a828;
  font-size: 0.85rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  min-height: 44px;
}
.sb-mobile-action-btn i { font-size: 1.1rem; }
.sb-mobile-action-btn:hover {
  background: rgba(212,168,40,0.12);
  color: #f0d878;
}

.sb-mobile-action-danger {
  color: #ff6b6b;
  background: rgba(231,76,60,0.06);
}
.sb-mobile-action-danger:hover {
  background: rgba(231,76,60,0.12);
  color: #ff8c8c;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile-First
   ══════════════════════════════════════════════════════════════ */

/* --- Extra-small (< 375px) --- */
@media (max-width: 375px) {
  .sidebar-offcanvas { width: 80vw !important; }
  .sb-profile { padding: 0.3rem !important; }
  .sb-top-row { padding: 8px 6px; }
  .sb-avatar { width: 70px !important; height: 70px !important; }
  .sb-circle { width: 40px; height: 40px; }
  .sb-circle i { font-size: 1.1rem; }
  .sb-circle-label { font-size: 0.55rem; }
  .sb-bar-label { font-size: 0.52rem; min-width: 60px; }
  .sb-nav-link { font-size: 0.72rem; }
}

/* --- Small (≥ 576px) — tablettes portrait --- */
@media (min-width: 576px) {
  .sb-avatar { width: 110px; height: 110px; }
  .sb-circle { width: 54px; height: 54px; }
  .sb-circle i { font-size: 1.5rem; }
  .sb-top-left { min-width: 70px; }
  .sb-top-row { padding: 12px 10px 10px; }
  .sb-bar-label { font-size: 0.62rem; min-width: 80px; }
}

/* --- Touch targets (< 576px) --- */
@media (max-width: 576px) {
  .sb-nav-link { min-height: 44px; display: flex; align-items: center; }
  .sb-nav-label { min-height: 36px; display: flex; align-items: center; justify-content: center; }
  .sb-act { min-height: 44px; }
  .sb-auth-btn { min-height: 44px; }
}

/* --- Desktop (≥ 992px) — sidebar visible --- */
@media (min-width: 992px) {
  .sb-avatar { width: 100px; height: 100px; }
  .sb-top-row { padding: 6px 8px 4px; }
  .sb-circle { width: 42px; height: 42px; }
  .sb-circle i { font-size: 1.2rem; }
  .sb-circle-label { font-size: 0.58rem; }
  .sb-bar-label { font-size: 0.58rem; min-width: 70px; }
  .sb-bar-track { height: 5px; }
  .sb-bars { padding: 0 8px; gap: 2px; }
  .sb-act { padding: 2px 2px; }
  .sb-act i { font-size: 0.95rem; }
  .sb-act span { font-size: 0.5rem; }
  .sb-nav-link { font-size: 0.78rem; padding: 0.35rem 0.6rem; }
  .sb-profile { padding: 0.2rem; }
}

/* --- Grand desktop (≥ 1200px) + hauteur suffisante --- */
@media (min-width: 1200px) and (min-height: 800px) {
  .sb-avatar { width: 120px; height: 120px; }
  .sb-top-row { padding: 10px 10px 8px; }
  .sb-circle { width: 50px; height: 50px; }
  .sb-circle i { font-size: 1.4rem; }
  .sb-circle-label { font-size: 0.65rem; }
  .sb-bar-label { font-size: 0.62rem; min-width: 80px; }
  .sb-bar-track { height: 6px; }
  .sb-bars { padding: 0 12px; }
  .sb-nav-link { font-size: 0.82rem; padding: 0.4rem 0.7rem; }
  .sb-profile { padding: 0.3rem; }
}

/* --- Écrans courts (hauteur < 700px) — compacter la sidebar --- */
@media (max-height: 700px) and (min-width: 992px) {
  .sb-avatar { width: 70px; height: 70px; }
  .sb-top-row { padding: 4px 6px 2px; }
  .sb-circle { width: 36px; height: 36px; }
  .sb-circle i { font-size: 1rem; }
  .sb-circle-label { font-size: 0.5rem; }
  .sb-bar-label { font-size: 0.52rem; min-width: 60px; }
  .sb-bar-track { height: 4px; }
  .sb-bars { padding: 0 6px; gap: 1px; }
  .sb-act { padding: 1px 2px; }
  .sb-act i { font-size: 0.85rem; }
  .sb-act span { font-size: 0.45rem; }
  .sb-nav-link { font-size: 0.7rem; padding: 0.25rem 0.5rem; }
  .sb-profile { padding: 0.15rem; }
}

/* --- Ultra-wide / 4K (>= 2560px) --- */
@media (min-width: 2560px) {
  .sidebar-desktop { min-width: 280px; }
  .sb-avatar { width: 160px !important; height: 160px !important; }
  .sb-circle { width: 56px; height: 56px; }
  .sb-circle i { font-size: 1.6rem; }
  .sb-bar-label { font-size: 0.75rem; }
  .sb-bar-track { height: 7px; }
  .sb-nav-link { font-size: 1rem; padding: 0.6rem 1rem; }
  .sb-nav-label { font-size: 0.75rem; }
  .sb-act { font-size: 0.75rem; }
  .sb-act i { font-size: 1.4rem; }
  .sb-act span { font-size: 0.65rem; }
}
