/* ============================================================
   base.css — Reset + styles globaux
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

img { max-width: 100%; display: block; }

/* Scrollbar custom */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Page wrapper */
.page-wrapper {
  padding-top: var(--navbar-h);
  min-height: 100vh;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Section padding */
.section { padding: 32px 0; }

/* Page hero banner */
.page-hero {
  background: linear-gradient(135deg, #1a1060 0%, #2d1080 40%, #3b0a6e 70%, #1a0a3a 100%);
  padding: 52px 0 48px;
  position: relative;
  overflow: hidden;
  margin-bottom: 32px;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(120,60,220,0.3) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 20% 30%, rgba(60,20,150,0.4) 0%, transparent 60%);
}
.page-hero__content { position: relative; z-index: 1; }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 700;
  color: #fff;
  text-align: center;
}

/* Typography */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }

/* Utility */
.text-muted { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* Badge statut */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge--active   { background: rgba(46,204,113,0.15);  color: var(--success); border: 1px solid rgba(46,204,113,0.3); }
.badge--inactive { background: rgba(79,86,107,0.2);    color: var(--text-muted); border: 1px solid var(--border); }
.badge--pending  { background: rgba(243,156,18,0.15);  color: var(--warning); border: 1px solid rgba(243,156,18,0.3); }
.badge--partner  { background: rgba(50,140,80,0.2);    color: #5dde8a; border: 1px solid var(--partner-border); }
.badge--warning  { background: rgba(52,152,219,0.15);  color: #3498db; border: 1px solid rgba(52,152,219,0.3); }
.badge--danger   { background: rgba(231,76,60,0.15);   color: var(--danger); border: 1px solid rgba(231,76,60,0.3); }
.badge--banned   { background: rgba(231,76,60,0.12);   color: #e74c3c; border: 1px solid rgba(231,76,60,0.35); }
.badge--suspended{ background: rgba(155,89,182,0.15);  color: #9b59b6; border: 1px solid rgba(155,89,182,0.3); }

.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Loading spinner */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}
.empty-state__icon { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }
.empty-state__title { font-family: var(--font-display); font-size: 17px; color: var(--text-primary); margin-bottom: 6px; }

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
  animation: toastIn 0.3s ease;
  pointer-events: all;
  max-width: 320px;
}
.toast--success { border-left-color: var(--success); }
.toast--warning { border-left-color: var(--warning); }
.toast--error   { border-left-color: var(--danger); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: scale(1); }
.modal__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal__title { font-family: var(--font-display); font-size: 20px; }
.modal__close {
  width: 32px; height: 32px;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-secondary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal__close:hover { color: var(--text-primary); border-color: var(--border-strong); }
