/* ================================================
   NEOXIA — Design System Premium
   Inspiré de Stripe, Vercel, Cloudflare
   Typographie : Inter (Google Fonts)
================================================ */

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

/* ── Variables ── */
:root {
  --bg:          #060b14;
  --bg-card:     #0d1424;
  --bg-elevated: #111827;
  --border:      rgba(255,255,255,0.07);
  --border-hover:rgba(255,255,255,0.14);

  --blue:        #3b82f6;
  --blue-dark:   #2563eb;
  --blue-light:  #60a5fa;
  --violet:      #8b5cf6;
  --violet-dark: #7c3aed;

  --text:        #f1f5f9;
  --text-muted:  #64748b;
  --text-subtle: #94a3b8;

  --green:       #10b981;
  --green-bg:    rgba(16,185,129,0.1);
  --red:         #ef4444;
  --red-bg:      rgba(239,68,68,0.1);
  --orange:      #f59e0b;
  --orange-bg:   rgba(245,158,11,0.1);

  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --shadow-blue: 0 0 40px rgba(59,130,246,0.15);
}

/* ── Reset ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { font-size:16px; scroll-behavior:smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ── Layout ── */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.text-center { text-align: center; }

/* ── Navbar ── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 64px;
  background: rgba(6,11,20,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1200;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #fff 0%, var(--blue-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.nav-left  { display: flex; align-items: center; gap: 0.25rem; }
.nav-menu  { display: flex; align-items: center; }
.nav-right { display: flex; align-items: center; gap: 0.5rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  align-items: center;
  gap: 6px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.btn:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59,130,246,0.35);
}
.btn:active { transform: translateY(0); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: 1px solid var(--border-hover);
  color: var(--text-subtle);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue-light);
  background: rgba(59,130,246,0.06);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.btn-violet {
  background: var(--violet);
}
.btn-violet:hover {
  background: var(--violet-dark);
  box-shadow: 0 4px 16px rgba(139,92,246,0.35);
}

.btn-danger { background: var(--red); }
.btn-danger:hover { background: #dc2626; box-shadow: 0 4px 16px rgba(239,68,68,0.3); }

/* ── Dropdowns ── */
.dropdown { position: relative; }

.dropbtn {
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s;
  font-family: 'Inter', sans-serif;
}
.dropbtn:hover { color: var(--text); }

.dropdown-content {
  display: none;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: max-content;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 1300;
}
.nav-right .dropdown-content { left: auto; right: 0; min-width: 200px; }

.dropdown.is-open .dropdown-content {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dropdown-content a,
.dropdown-content button {
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.12s;
  font-family: 'Inter', sans-serif;
}
.dropdown-content a:hover,
.dropdown-content button:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.logout-btn {
  width: 100%; padding: 10px 16px; text-align: left;
  background: none; border: none; color: var(--red);
  font-size: 13px; font-weight: 500; cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.logout-btn:hover { background: var(--red-bg); }

.dropdown-arrow {
  font-size: 10px;
  opacity: 0.5;
  transition: transform 0.2s ease;
  display: inline-block;
}
.dropdown.is-open .dropdown-arrow { transform: rotate(180deg); }

/* Dropdown Offres enrichi */
.dropdown-offres { padding: 8px; min-width: 280px; }

.dropdown-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 6px 12px 3px;
  pointer-events: none;
  font-weight: 600;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-subtle);
  text-decoration: none;
  transition: all 0.12s;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
}
.dropdown-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.dropdown-item-disabled { opacity: 0.3; pointer-events: none; }

.dropdown-item-icon {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-sm);
  font-size: 16px;
  flex-shrink: 0;
}

.dropdown-item-body { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.dropdown-item-title { font-size: 13px; font-weight: 600; color: var(--text); }
.dropdown-item-desc  { font-size: 11px; color: var(--text-muted); }

/* ── Hero ── */
.hero {
  position: relative;
  padding: 7rem 1.5rem 5rem;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, rgba(59,130,246,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.015'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.25);
  color: var(--blue-light);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--blue-light) 0%, var(--violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-subtle);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.hero-stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.hero-stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Features Grid ── */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.feature {
  background: var(--bg);
  padding: 2.5rem 2rem;
  transition: background 0.2s;
}
.feature:hover { background: var(--bg-card); }

.feature-icon-wrap {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius);
  font-size: 20px;
  margin-bottom: 1.25rem;
}

.feature h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.feature p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 1rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-light);
  transition: gap 0.15s;
}
.feature-link:hover { gap: 8px; }

/* ── Cards / Feature cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

/* ── Plan Cards ── */
.plan-card {
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.plan-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.plan-popular {
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 1px var(--blue), var(--shadow-blue) !important;
}

.plan-popular-badge {
  position: absolute;
  top: -13px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--blue), var(--violet));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.plan-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.plan-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.plan-price {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.plan-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}

.plan-specs {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.plan-specs li {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-specs li:last-child { border-bottom: none; }

/* ── Forms ── */
form { margin: 0; }

label {
  display: block;
  margin: 0.875rem 0 0.35rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-subtle);
  letter-spacing: -0.01em;
}

input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  margin-bottom: 0.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
input::placeholder { color: var(--text-muted); }

.password-invalid { border-color: var(--red) !important; }
.password-valid   { border-color: var(--green) !important; }

/* ── Auth cards ── */
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

/* ── Profile card ── */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

/* ── Alerts ── */
.alert-msg {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-success { background: var(--green-bg);  border: 1px solid rgba(16,185,129,0.3); color: #34d399; }
.alert-warning  { background: var(--orange-bg); border: 1px solid rgba(245,158,11,0.3); color: #fbbf24; }
.alert-info     { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.25); color: var(--blue-light); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-green  { background: var(--green-bg);  color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.badge-red    { background: var(--red-bg);    color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.badge-grey   { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border); }
.badge-blue   { background: rgba(59,130,246,0.1); color: var(--blue-light); border: 1px solid rgba(59,130,246,0.25); }
.badge-violet { background: rgba(139,92,246,0.1); color: #a78bfa; border: 1px solid rgba(139,92,246,0.25); }

/* ── Utilities ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

.history-row {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-subtle);
  flex-wrap: wrap;
  gap: 0.5rem;
  transition: border-color 0.15s;
}
.history-row:hover { border-color: var(--border-hover); }

/* ── Footer ── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  padding: 1.5rem;
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }

/* ── Legal pages ── */
.legal-section { margin-bottom: 2.5rem; }
.legal-section h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.02em;
}
.legal-section p { font-size: 14px; color: var(--text-subtle); margin-bottom: 0.75rem; line-height: 1.7; }
.legal-section ul { padding-left: 1.25rem; margin-bottom: 0.75rem; }
.legal-section ul li { font-size: 14px; color: var(--text-subtle); margin-bottom: 0.4rem; }

/* ── Slider ── */
input[type="range"] {
  width: 100%;
  margin: 0; padding: 0;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--border-hover);
  outline: none;
  cursor: pointer;
  border: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--blue);
  cursor: pointer;
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--blue), 0 2px 8px rgba(59,130,246,0.4);
  transition: box-shadow 0.15s;
}
input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 3px var(--blue), 0 4px 12px rgba(59,130,246,0.5);
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--blue);
  cursor: pointer;
  border: 3px solid var(--bg-card);
}

.slider-ticks { position: relative; height: 20px; margin-top: 6px; }
.slider-ticks span {
  position: absolute;
  font-size: 11px;
  color: var(--text-muted);
  transform: translateX(-50%);
  white-space: nowrap;
  top: 0;
  font-weight: 500;
}

/* ── Dashboard table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.data-table tbody td { padding: 12px 14px; color: var(--text-subtle); }
.data-table tbody tr:last-child { border-bottom: none; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 64px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    z-index: 1150;
    box-shadow: var(--shadow);
  }
  .navbar.is-mobile-open .nav-menu { display: flex; }
  .nav-right { flex-direction: column; align-items: stretch; gap: 0.5rem; width: 100%; }
  .nav-right .btn { width: 100%; justify-content: center; }
  .nav-right > a { display: block; text-align: center; padding: 8px 0; }
  .dropdown { width: 100%; }
  .dropbtn { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
  .dropdown-content { position: static; width: 100%; margin-top: 6px; box-shadow: none; }
  .nav-right .dropdown-content { left: 0; right: 0; min-width: 100%; }
  .features { grid-template-columns: 1fr; }
  .hero { padding: 4rem 1.5rem 3rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn, .hero-actions .btn-outline { width: 100%; max-width: 300px; }
  .hero-stats { gap: 1.5rem; }
  .container { padding: 0 1rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }
  .auth-card { padding: 1.5rem; }
}
