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

:root {
    --bg: #0a0e17;
    --bg2: #111827;
    --bg3: #1f2937;
    --surface: #1a1f2e;
    --border: #2d3548;
    --text: #e5e7eb;
    --text2: #9ca3af;
    --accent: #3b82f6;
    --accent2: #2563eb;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

html { 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; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ═══ NAV ═══ */
.nav { position: fixed; top: 0; width: 100%; z-index: 100; background: rgba(10,14,23,0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { font-size: 1.3rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px; }
.nav-logo span { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text2); font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links .btn-sm { padding: 8px 20px; background: var(--accent); color: #fff; border-radius: 8px; font-weight: 600; font-size: 0.85rem; }
.nav-links .btn-sm:hover { background: var(--accent2); }

/* ═══ HERO ═══ */
.hero { padding: 140px 24px 80px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle at 50% 30%, rgba(59,130,246,0.08) 0%, transparent 50%); pointer-events: none; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; margin-bottom: 20px; }
.hero h1 span { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: var(--text2); font-size: 1.2rem; max-width: 600px; margin: 0 auto 40px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ═══ BUTTONS ═══ */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px; border-radius: 10px; font-weight: 600; font-size: 1rem; border: none; transition: all 0.2s; }
.btn-primary { background: var(--gradient); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(59,130,246,0.3); text-decoration: none; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm2 { padding: 8px 16px; font-size: 0.85rem; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ═══ SECTIONS ═══ */
.section { padding: 80px 24px; max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.section-subtitle { text-align: center; color: var(--text2); margin-bottom: 48px; }

/* ═══ FEATURES GRID ═══ */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; transition: transform 0.2s, border-color 0.2s; }
.feature-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.feature-icon { font-size: 2rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-card p { color: var(--text2); font-size: 0.9rem; }

/* ═══ PRICING ═══ */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; max-width: 800px; margin: 0 auto; }
.pricing-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 32px; text-align: center; position: relative; }
.pricing-card.featured { border-color: var(--accent); }
.pricing-card.featured::before { content: 'Populaire'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--gradient); color: #fff; padding: 4px 16px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.pricing-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.pricing-price { font-size: 3rem; font-weight: 800; margin: 16px 0; }
.pricing-price small { font-size: 1rem; color: var(--text2); font-weight: 400; }
.pricing-features { list-style: none; text-align: left; margin: 24px 0; }
.pricing-features li { padding: 8px 0; color: var(--text2); font-size: 0.9rem; display: flex; gap: 8px; align-items: flex-start; }
.pricing-features li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* ═══ AUTH FORMS ═══ */
.auth-container { max-width: 440px; margin: 120px auto 60px; padding: 40px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.auth-container h2 { text-align: center; margin-bottom: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text2); margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group select { width: 100%; padding: 12px 16px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 0.95rem; transition: border-color 0.2s; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--accent); }
.form-error { color: var(--danger); font-size: 0.85rem; margin-top: 4px; }
.form-submit { width: 100%; }
.form-footer { text-align: center; margin-top: 20px; color: var(--text2); font-size: 0.9rem; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 0.9rem; }
.alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: var(--success); }
.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: var(--danger); }

/* ═══ DASHBOARD ═══ */
.dash { padding: 80px 24px 40px; max-width: 1200px; margin: 0 auto; }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.dash-header h1 { font-size: 1.8rem; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.stat-card .stat-label { color: var(--text2); font-size: 0.85rem; margin-bottom: 4px; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; }
.stat-card .stat-value.text-success { color: var(--success); }
.stat-card .stat-value.text-warning { color: var(--warning); }
.stat-card .stat-value.text-danger { color: var(--danger); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.card h2 { font-size: 1.2rem; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }

/* ═══ TABLES ═══ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px; font-size: 0.8rem; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); }
td { padding: 12px; font-size: 0.9rem; border-bottom: 1px solid var(--border); }
tr:hover td { background: rgba(59,130,246,0.05); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-danger { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-info { background: rgba(59,130,246,0.15); color: var(--accent); }

/* ═══ LICENSE KEY DISPLAY ═══ */
.license-key { font-family: 'JetBrains Mono', 'Fira Code', monospace; background: var(--bg); padding: 12px 20px; border-radius: 8px; font-size: 1.1rem; letter-spacing: 2px; display: inline-flex; align-items: center; gap: 12px; border: 1px solid var(--border); }
.license-key .copy-btn { background: none; border: none; color: var(--accent); font-size: 0.9rem; cursor: pointer; }

/* ═══ TABS ═══ */
.tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.tab { padding: 10px 20px; color: var(--text2); background: none; border: none; font-size: 0.9rem; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 0.2s; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab:hover { color: var(--text); }

/* ═══ FOOTER ═══ */
.footer { padding: 40px 24px; text-align: center; color: var(--text2); font-size: 0.85rem; border-top: 1px solid var(--border); margin-top: 80px; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .nav-links { gap: 12px; }
    .hero h1 { font-size: 2rem; }
    .pricing-grid { grid-template-columns: 1fr; }
    .dash-grid { grid-template-columns: 1fr 1fr; }
    .auth-container { margin: 80px 16px 40px; padding: 24px; }
}
@media (max-width: 480px) {
    .dash-grid { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; align-items: center; }
}

/* ═══ LOADING ═══ */
.spinner { width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay { display: flex; align-items: center; justify-content: center; padding: 60px; }

/* ═══ HIDDEN ═══ */
[hidden] { display: none !important; }
