/* =====================================================
   ComingSoon.build - Design System
   ===================================================== */

/* ---------- CSS Variables ---------- */
:root {
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --primary-subtle: rgba(124, 58, 237, 0.1);
    --secondary: #a78bfa;
    --accent: #e879f9;
    --bg-dark: #09090b;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --radius: 10px;
    --radius-lg: 16px;
    --transition: all 0.2s ease;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---------- Background ---------- */
.bg-grid { display: none; }

.bg-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-orbs .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
}

.bg-orbs .orb:nth-child(1) {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    right: -200px;
}

.bg-orbs .orb:nth-child(2) {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: -100px;
    left: -100px;
}

.bg-orbs .orb:nth-child(3) {
    display: none;
}

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.6rem 2rem;
    background: rgba(9, 9, 11, 0.95);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding: 0.3rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 2px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: white;
}

.btn-glow {
    background: var(--primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-glow:hover {
    background: var(--primary-hover);
    color: white;
}

.btn-danger {
    background: rgba(255, 82, 82, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 82, 82, 0.3);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: var(--radius-lg);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
}

/* ---------- Cards ---------- */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-main);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
    background: rgba(255, 255, 255, 0.08);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ---------- Alerts ---------- */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.3);
    color: var(--success);
}

.alert-error {
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid rgba(255, 82, 82, 0.3);
    color: var(--danger);
}

.alert-warning {
    background: rgba(255, 214, 0, 0.1);
    border: 1px solid rgba(255, 214, 0, 0.3);
    color: var(--warning);
}

.alert-info {
    background: var(--primary-subtle);
    border: 1px solid rgba(124, 58, 237, 0.3);
    color: var(--secondary);
}

/* ---------- Section Layouts ---------- */
.section {
    padding: 6rem 2rem;
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header .badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--primary-subtle);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: var(--primary-subtle);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease;
}

.hero-badge .pulse {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 4rem;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-stats .stat {
    text-align: center;
}

.hero-stats .stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.hero-stats .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Features Grid ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.feature-card .feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--primary-subtle);
    border: 1px solid rgba(124, 58, 237, 0.15);
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ---------- Pricing ---------- */
.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.pricing-toggle span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pricing-toggle .toggle {
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.pricing-toggle .toggle.active {
    background: var(--primary);
    border-color: var(--primary);
}

.pricing-toggle .toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
}

.pricing-toggle .toggle.active::after {
    left: 26px;
}

.pricing-save {
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 600;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    padding: 2.5rem;
    text-align: center;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary);
    background: var(--primary-subtle);
}

.pricing-card.featured::before {
    content: 'Populaire';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.3rem 1.5rem;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0 0 var(--radius) var(--radius);
}

.pricing-card .plan-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.pricing-card .plan-price {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.pricing-card .plan-price .currency {
    font-size: 1.5rem;
    vertical-align: super;
}

.pricing-card .plan-price .period {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

.pricing-card .plan-features {
    list-style: none;
    text-align: left;
    margin: 2rem 0;
}

.pricing-card .plan-features li {
    padding: 0.6rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pricing-card .plan-features li .check {
    color: var(--success);
    font-size: 1rem;
}

.pricing-card .plan-features li .cross {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ---------- Footer ---------- */
.footer {
    padding: 4rem 2rem 2rem;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand .footer-logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-brand p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---------- Dashboard ---------- */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 70px;
}

.sidebar {
    width: 260px;
    background: rgba(9, 9, 11, 0.95);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
    position: fixed;
    top: 70px;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-nav {
    list-style: none;
    padding: 0 1rem;
}

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--primary-subtle);
    color: var(--primary);
}

.sidebar-nav a .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.page-header .subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

/* ---------- Stats Cards ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
}

.stat-card .stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-subtle);
    font-size: 1.2rem;
}

.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ---------- Pages Table ---------- */
.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.page-card {
    padding: 1.5rem;
    position: relative;
}

.page-card .page-status {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.page-card .page-status.inactive {
    background: var(--text-muted);
}

.page-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    padding-right: 2rem;
}

.page-card .page-slug {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-family: monospace;
}

.page-card .page-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.page-card .page-stats span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.page-card .page-stats span strong {
    color: var(--text-primary);
}

.page-card .page-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ---------- Auth Pages ---------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 3rem;
}

.auth-card .auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-card .auth-header h1 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.auth-card .auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-card .auth-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: var(--transition);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(9, 9, 11, 0.98);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 0.8rem 0;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .pages-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.d-flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.hidden { display: none !important; }
