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

:root {
  --bg: #0b0f19;
  --bg2: #111827;
  --panel: rgba(17, 24, 39, 0.85);
  --card: rgba(30, 41, 59, 0.6);
  --card-hover: rgba(30, 41, 59, 0.85);
  --border: rgba(148, 163, 184, 0.12);
  --border-hover: rgba(148, 163, 184, 0.25);
  --txt: #f1f5f9;
  --txt2: #94a3b8;
  --txt3: #64748b;
  --accent: #6366f1;
  --accent2: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.12);
  --orange: #f59e0b;
  --orange-bg: rgba(245, 158, 11, 0.12);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.12);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-w: 240px;
  --topbar-h: 64px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Sidebar --- */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--panel);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 28px;
}
.brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; color: #fff;
  flex-shrink: 0;
}
.brand-text { font-weight: 700; font-size: 16px; white-space: nowrap; }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--txt2);
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: all var(--transition);
  position: relative;
}
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-item:hover { color: var(--txt); background: rgba(255,255,255,0.05); }
.nav-item.active {
  color: #fff;
  background: var(--accent-glow);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 24px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.user-badge { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #ec4899, #a855f7);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; color: #fff;
}
.user-name { font-size: 13px; font-weight: 500; color: var(--txt2); }

/* --- Main --- */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin-left var(--transition);
}
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  background: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.menu-btn {
  display: none;
  background: none; border: none; color: var(--txt2); cursor: pointer;
  padding: 6px;
}
.menu-btn svg { width: 22px; height: 22px; }
.page-title { font-size: 20px; font-weight: 700; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.page { display: none; padding: 24px 28px 100px; }
.page.active { display: block; }

/* --- Mobile --- */
.mobile-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--panel);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
}
.mob-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--txt3);
  text-decoration: none;
  font-size: 10px; font-weight: 500;
  transition: all var(--transition);
}
.mob-item svg { width: 22px; height: 22px; }
.mob-item.active { color: var(--accent2); }

/* Mobile responsive -> voir mobile.css */

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }
