/* ================================
   POPVAULT — Design System
   Couleurs officielles : Bleu + Orange/Doré + Blanc
   ================================ */
:root {
  --blue: #1B4FD8;
  --blue-dark: #1340B0;
  --blue-light: #3B6FE8;
  --gold: #F5A623;
  --gold-dark: #D4891A;
  --gold-light: #FFB84D;
  --dark: #0a0e1a;
  --dark-2: #111827;
  --dark-3: #1a2235;
  --dark-4: #212c42;
  --dark-5: #2a3650;
  --border: rgba(27,79,216,0.2);
  --border-hover: rgba(245,166,35,0.4);
  --text: #e8edf5;
  --text-muted: #8896b3;
  --text-dim: #4a5568;
  --success: #00e676;
  --warning: #F5A623;
  --danger: #ff5252;
  --info: #1B4FD8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-blue: 0 0 30px rgba(27,79,216,0.2);
  --shadow-gold: 0 0 30px rgba(245,166,35,0.15);
}

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

body {
  background: var(--dark);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark-2); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 3px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

/* ── Navbar ── */
.navbar {
  background: rgba(10,14,26,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.navbar-brand .logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 1px solid rgba(245,166,35,0.3);
}

.navbar-brand span {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.navbar-brand span em {
  color: var(--gold);
  font-style: normal;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.navbar-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.navbar-nav a:hover, .navbar-nav a.active {
  color: var(--text);
  background: var(--dark-4);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-user img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--gold);
}

.navbar-user .username {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

/* ── Sidebar Admin ── */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}

.sidebar {
  background: var(--dark-2);
  border-right: 1px solid var(--border);
  padding: 24px 12px;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.sidebar-section { margin-bottom: 24px; }

.sidebar-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 12px;
  margin-bottom: 8px;
}

.sidebar-nav { list-style: none; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.sidebar-nav a:hover { color: var(--text); background: var(--dark-4); }
.sidebar-nav a.active { color: var(--gold); background: rgba(245,166,35,0.1); border-left: 2px solid var(--gold); }
.sidebar-nav a .icon { font-size: 16px; width: 20px; text-align: center; }

.admin-content { padding: 32px; overflow-y: auto; }

/* ── Cards ── */
.card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}

.card:hover { border-color: rgba(245,166,35,0.3); }

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--gold));
}

.stat-card:hover { border-color: rgba(245,166,35,0.3); transform: translateY(-2px); }

.stat-icon { font-size: 28px; margin-bottom: 12px; }
.stat-value { font-size: 32px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── Table ── */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }

th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text);
}

tr:hover td { background: var(--dark-3); }
tr:last-child td { border-bottom: none; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success { background: rgba(0,230,118,0.15); color: var(--success); }
.badge-warning { background: rgba(245,166,35,0.15); color: var(--warning); }
.badge-danger { background: rgba(255,82,82,0.15); color: var(--danger); }
.badge-info { background: rgba(27,79,216,0.15); color: #6B9FFF; }
.badge-orange { background: rgba(245,166,35,0.15); color: var(--gold); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: white;
  border: 1px solid rgba(245,166,35,0.2);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--blue-light), var(--blue)); transform: translateY(-1px); box-shadow: var(--shadow-blue); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0e1a;
  font-weight: 700;
}
.btn-gold:hover { background: linear-gradient(135deg, var(--gold-light), var(--gold)); transform: translateY(-1px); box-shadow: var(--shadow-gold); }

.btn-secondary {
  background: var(--dark-4);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: rgba(245,166,35,0.3); }

.btn-discord {
  background: #5865f2;
  color: white;
}
.btn-discord:hover { background: #4752c4; transform: translateY(-1px); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ── Page Header ── */
.page-header { margin-bottom: 32px; }

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.page-subtitle { color: var(--text-muted); font-size: 14px; }

/* ── Hero ── */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(27,79,216,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 50%, rgba(245,166,35,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245,166,35,0.1);
  border: 1px solid rgba(245,166,35,0.3);
  color: var(--gold);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -2px;
}

.hero-title .accent { color: var(--gold); }
.hero-title .accent-blue { color: #6B9FFF; }

.hero-desc {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Services Grid ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 48px 0;
}

.service-card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--gold));
  opacity: 0;
  transition: opacity 0.3s;
}

.service-card:hover {
  border-color: rgba(245,166,35,0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}

.service-card:hover::after { opacity: 1; }

.service-icon { font-size: 36px; margin-bottom: 16px; display: block; }
.service-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.service-desc { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* ── Product Cards ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
}

.product-card:hover {
  border-color: rgba(245,166,35,0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.product-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--dark-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.product-body { padding: 16px; }
.product-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.product-price { font-size: 20px; font-weight: 700; color: var(--gold); }
.product-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── Avatar ── */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.avatar-sm { width: 28px; height: 28px; }

/* ── Progress bar ── */
.progress { background: var(--dark-4); border-radius: 10px; height: 8px; overflow: hidden; }

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--gold));
  border-radius: 10px;
  transition: width 0.5s;
}

/* ── Alerts ── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-info { background: rgba(27,79,216,0.1); border: 1px solid rgba(27,79,216,0.3); color: #6B9FFF; }
.alert-success { background: rgba(0,230,118,0.1); border: 1px solid rgba(0,230,118,0.3); color: #6ee7b7; }

/* ── Footer ── */
.footer {
  background: var(--dark-2);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 36px; }
}