/* ═══════════════════════════════════════════════
   VENTE GROUPE — Global Design System
   ═══════════════════════════════════════════════ */

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

:root {
  /* Colors */
  --bg:          #06060e;
  --bg-2:        #0d0d1b;
  --bg-3:        #131326;
  --surface:     rgba(255,255,255,0.03);
  --surface-2:   rgba(255,255,255,0.06);
  --border:      rgba(255,255,255,0.07);
  --border-2:    rgba(255,255,255,0.13);
  --text:        #eeeef8;
  --text-2:      rgba(238,238,248,0.55);
  --text-3:      rgba(238,238,248,0.3);
  --indigo:      #5b5bd6;
  --indigo-2:    #818cf8;
  --purple:      #7c3aed;
  --cyan:        #22d3ee;
  --green:       #10b981;
  --red:         #ef4444;
  --amber:       #f59e0b;

  /* Radius */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   18px;
  --r-xl:   24px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.25);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.35);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.5);
  --glow:       0 0 40px rgba(91,91,214,0.2);

  /* Transitions */
  --t-fast:   .18s cubic-bezier(.16,1,.3,1);
  --t-base:   .3s cubic-bezier(.16,1,.3,1);
  --t-slow:   .5s cubic-bezier(.16,1,.3,1);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
::selection { background: var(--indigo); color: #fff; }

/* ── Layout ── */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 600px) { .container { padding: 0 20px; } }

/* ── Typography ── */
.font-sora { font-family: 'Sora', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

/* ── NAVBAR ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  padding: 20px 0;
  transition: all var(--t-base);
}
.navbar.scrolled {
  background: rgba(6,6,14,0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; }
.nav-logo {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'Sora', sans-serif;
  font-weight: 700; font-size: 1.05rem;
  color: var(--text);
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  border-radius: 10px;
  display: grid; place-items: center;
  box-shadow: 0 4px 20px rgba(91,91,214,0.4);
  flex-shrink: 0;
}
.logo-icon svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nav-menu { display: flex; align-items: center; gap: 40px; }
.nav-menu a { font-size: 0.875rem; color: var(--text-2); transition: color var(--t-fast); }
.nav-menu a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
@media (max-width: 860px) { .nav-menu { display: none; } }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--r-md);
  font-size: 0.875rem; font-weight: 500; font-family: 'Inter', sans-serif;
  border: 1px solid transparent;
  cursor: pointer; transition: all var(--t-base);
  white-space: nowrap; text-decoration: none; line-height: 1;
}
.btn-sm  { padding: 8px 16px; font-size: 0.82rem; border-radius: var(--r-sm); }
.btn-lg  { padding: 14px 28px; font-size: 0.95rem; border-radius: var(--r-lg); }
.btn-xl  { padding: 16px 36px; font-size: 1rem; border-radius: var(--r-lg); }

.btn-ghost  { color: var(--text-2); }
.btn-ghost:hover { color: var(--text); }

.btn-border { border-color: var(--border-2); color: var(--text); }
.btn-border:hover { border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.04); }

.btn-primary {
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  color: #fff;
  box-shadow: 0 4px 24px rgba(91,91,214,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(91,91,214,0.5); }

.btn-white {
  background: #fff; color: #06060e; font-weight: 600;
  box-shadow: var(--shadow-md);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,0,0,0.5); }

.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.btn-danger:hover { box-shadow: 0 4px 16px rgba(239,68,68,0.4); }

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: 0.78rem; font-weight: 500;
  color: var(--text-2); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.form-input {
  width: 100%; padding: 13px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md); color: var(--text);
  font-family: 'Inter', sans-serif; font-size: 0.92rem;
  outline: none; transition: all var(--t-fast);
}
.form-input::placeholder { color: var(--text-3); }
.form-input:focus {
  border-color: rgba(91,91,214,0.5);
  background: rgba(91,91,214,0.05);
  box-shadow: 0 0 0 3px rgba(91,91,214,0.1);
}
.form-input.with-icon { padding-left: 46px; }
.input-wrap { position: relative; }
.input-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px;
  stroke: var(--text-3); fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none; transition: stroke var(--t-fast);
}
.input-wrap:has(.form-input:focus) .input-icon { stroke: var(--indigo-2); }
.input-suffix {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 4px;
  display: flex; align-items: center;
  color: var(--text-3); transition: color var(--t-fast);
}
.input-suffix:hover { color: var(--text-2); }
.input-suffix svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── ALERTS ── */
.alert {
  padding: 12px 16px; border-radius: var(--r-md);
  font-size: 0.875rem; margin-bottom: 20px;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert svg { width: 16px; height: 16px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; margin-top: 1px; }
.alert-error  { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); color: #fca5a5; }
.alert-error svg { stroke: #f87171; }
.alert-success { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2); color: #6ee7b7; }
.alert-success svg { stroke: #34d399; }
.alert-info   { background: rgba(91,91,214,0.08); border: 1px solid rgba(91,91,214,0.2); color: var(--indigo-2); }
.alert-info svg { stroke: var(--indigo-2); }

/* ── CARDS ── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: all var(--t-base);
}
.card:hover { border-color: var(--border-2); box-shadow: var(--shadow-md); }
.card-glass {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-xl);
}

/* ── BADGES / PILLS ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.04em;
}
.badge-indigo { background: rgba(91,91,214,0.12); border: 1px solid rgba(91,91,214,0.2); color: var(--indigo-2); }
.badge-green  { background: rgba(16,185,129,0.1);  border: 1px solid rgba(16,185,129,0.2); color: #34d399; }
.badge-red    { background: rgba(239,68,68,0.1);   border: 1px solid rgba(239,68,68,0.2);  color: #fca5a5; }
.badge-amber  { background: rgba(245,158,11,0.1);  border: 1px solid rgba(245,158,11,0.2); color: #fcd34d; }
.badge-cyan   { background: rgba(34,211,238,0.1);  border: 1px solid rgba(34,211,238,0.2); color: var(--cyan); }

/* ── SECTION HELPERS ── */
.section-label {
  display: inline-block;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--indigo-2);
  margin-bottom: 14px;
}
.section-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.1;
  margin-bottom: 16px;
}
.section-sub { color: var(--text-2); font-size: 1rem; line-height: 1.75; }

/* ── DIVIDER ── */
.divider-line {
  display: flex; align-items: center; gap: 16px; margin: 24px 0;
}
.divider-line::before, .divider-line::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider-line span { font-size: 0.72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead th {
  padding: 14px 18px;
  background: var(--bg-2); color: var(--text-3);
  font-weight: 500; text-align: left;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
}
tbody tr { border-bottom: 1px solid var(--border); transition: background var(--t-fast); }
tbody tr:last-child { border-bottom: 0; }
tbody tr:hover { background: var(--surface); }
tbody td { padding: 14px 18px; color: var(--text-2); vertical-align: middle; }
tbody td strong { color: var(--text); font-weight: 500; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes float {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  33%     { transform: translate(24px,-16px) rotate(4deg); }
  66%     { transform: translate(-16px,24px) rotate(-3deg); }
}
@keyframes pulse-glow {
  0%,100% { box-shadow: 0 4px 20px rgba(91,91,214,0.35); }
  50%     { box-shadow: 0 4px 30px rgba(124,58,237,0.5); }
}

.animate-fade-up  { animation: fadeUp .7s cubic-bezier(.16,1,.3,1) both; }
.animate-fade-in  { animation: fadeIn .5s ease both; }

/* ── AUTH SHARED (connexion + register) ── */
.auth-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  position: relative; overflow-x: hidden;
}
.auth-body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(91,91,214,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 20%, rgba(124,58,237,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(34,211,238,0.06) 0%, transparent 60%);
  animation: bgPulse 10s ease-in-out infinite alternate;
}
@keyframes bgPulse {
  0%   { opacity: 0.6; }
  100% { opacity: 1; }
}
.auth-orb {
  position: fixed; border-radius: 50%; filter: blur(90px);
  opacity: 0.3; z-index: 0; pointer-events: none;
  animation: float 14s ease-in-out infinite;
}
.auth-orb-1 { width: 460px; height: 460px; background: linear-gradient(135deg, var(--indigo), var(--purple)); top: -10%; left: -8%; }
.auth-orb-2 { width: 380px; height: 380px; background: linear-gradient(135deg, #3b82f6, var(--cyan)); bottom: -10%; right: -8%; animation-delay: -5s; }
.auth-orb-3 { width: 260px; height: 260px; background: linear-gradient(135deg, var(--purple), #ec4899); top: 50%; left: 55%; animation-delay: -9s; }
.auth-grid {
  position: fixed; inset: 0; z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}
.auth-wrap { position: relative; z-index: 10; width: 100%; max-width: 460px; padding: 24px; }
.auth-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(48px);
  -webkit-backdrop-filter: blur(48px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-xl);
  padding: 48px 44px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), var(--shadow-lg), var(--glow);
  animation: fadeUp .8s cubic-bezier(.16,1,.3,1) both;
}
@media (max-width: 480px) { .auth-card { padding: 36px 24px; } }
.auth-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-3); font-size: 0.8rem; font-weight: 500;
  margin-bottom: 28px; transition: color var(--t-fast);
}
.auth-back:hover { color: var(--indigo-2); }
.auth-back svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth-brand { text-align: center; margin-bottom: 36px; }
.auth-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  animation: pulse-glow 3s ease-in-out infinite;
}
.auth-icon svg { width: 28px; height: 28px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth-brand h1 {
  font-family: 'Sora', sans-serif;
  font-size: 1.6rem; font-weight: 700; color: #fff; letter-spacing: -0.02em;
}
.auth-brand p { font-size: 0.875rem; color: var(--text-3); margin-top: 6px; }
.auth-submit {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  border: none; border-radius: var(--r-md); color: #fff;
  font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all var(--t-base);
  position: relative; overflow: hidden; margin-top: 8px;
}
.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(91,91,214,0.45); }
.auth-submit:active { transform: translateY(0); }
.auth-footer { text-align: center; margin-top: 28px; }
.auth-footer p { font-size: 0.875rem; color: var(--text-3); }
.auth-footer a { color: var(--indigo-2); font-weight: 500; transition: color var(--t-fast); }
.auth-footer a:hover { color: #a5b4fc; }

/* ── DASHBOARD SHARED ── */
.dash-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.dash-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 260px;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100;
}
.dash-main { margin-left: 260px; }
.dash-topbar {
  height: 64px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  position: sticky; top: 0; z-index: 50;
}
.dash-content { padding: 32px; }
@media (max-width: 900px) {
  .dash-sidebar { transform: translateX(-100%); transition: transform var(--t-base); }
  .dash-main { margin-left: 0; }
}

/* ── UTILITY ── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-2); }
.text-dim    { color: var(--text-3); }
.text-indigo { color: var(--indigo-2); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
