/* ============================================================
   NexIA SaaS - Style global (cohérence avec site vitrine)
   ============================================================ */

:root {
  --bg: #fbfbfd;
  --bg-2: #ffffff;
  --bg-dark: #0a0a0a;
  --bg-soft: #f5f5f7;
  --ink: #1d1d1f;
  --ink-soft: #3d3d42;
  --ink-mute: #6e6e73;
  --line: rgba(0,0,0,0.08);
  --accent: #0071e3;
  --accent-dark: #0058b8;
  --gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.01em;
  min-height: 100vh;
}

/* ====== NAV ====== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 52px;
  background: rgba(251,251,253,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}
.nav-inner {
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gradient);
  background-size: 200% 200%;
  animation: gradShift 4s ease infinite;
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.88;
  transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 1; }
.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-soft);
}
.nav-user a {
  color: var(--accent);
  text-decoration: none;
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: white;
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 16px;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-secondary {
  background: white;
  color: var(--ink);
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 16px;
  border: 1px solid var(--line);
}
.btn-secondary:hover {
  background: var(--bg-soft);
  border-color: var(--ink-soft);
}
.btn-dark {
  background: var(--bg-dark);
  color: white;
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 16px;
}
.btn-dark:hover { opacity: 0.85; }
.btn-link {
  color: var(--accent);
  font-size: 14px;
  text-decoration: none;
  background: none;
  padding: 0;
}
.btn-link:hover { opacity: 0.7; }

/* ====== AUTH PAGES ====== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 40px;
  background: linear-gradient(135deg, #fbfbfd 0%, #f5f5f7 100%);
}
.auth-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 48px 40px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.06);
}
.auth-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  text-align: center;
}
.auth-subtitle {
  font-size: 16px;
  color: var(--ink-soft);
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.4;
}
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}
.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg-soft);
  transition: all 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.1);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-button-full {
  width: 100%;
  margin-top: 8px;
}
.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}
.auth-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

/* ====== ALERTS ====== */
.alert {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.4;
}
.alert-error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  color: #b91c1c;
}
.alert-success {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  color: #047857;
}
.alert-info {
  background: rgba(0,113,227,0.08);
  border: 1px solid rgba(0,113,227,0.2);
  color: #0058b8;
}

/* ====== PLAN BADGES ====== */
.plan-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.plan-pill {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: white;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.plan-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.plan-pill:hover { border-color: var(--ink-soft); }
.plan-pill.selected {
  border-color: var(--accent);
  background: rgba(0,113,227,0.04);
  color: var(--accent);
}
.plan-pill .price {
  display: block;
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 2px;
  font-weight: 400;
}
.plan-pill.selected .price { color: var(--accent); }

/* ====== UTILITY ====== */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-mute { color: var(--ink-mute); }
.text-small { font-size: 13px; }

/* ====== RESPONSIVE ====== */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .auth-card { padding: 32px 24px; }
  .auth-title { font-size: 28px; }
  .form-row { grid-template-columns: 1fr; }
}
