:root {
    --gestion: #6366f1;
    --gestion-dark: #4f46e5;
    --gestion-light: rgba(99, 102, 241, 0.08);
    --location: #10b981;
    --location-dark: #059669;
    --location-light: rgba(16, 185, 129, 0.08);
    --facture: #06b6d4;
    --facture-dark: #0891b2;
    --facture-light: rgba(6, 182, 212, 0.08);
    --free: #f59e0b;
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #f8fafc;
    color: #0f172a;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
}

/* === TOP BANNER === */
.top-banner {
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
    color: #000;
    text-align: center;
    padding: 0.6rem 1rem;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    transition: top 0.3s;
    z-index: 101;
    animation: pulse-bg 3s infinite alternate;
}

@keyframes pulse-bg {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

/* === NAVBAR === */
.navbar {
    position: fixed;
    top: 38px;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 6%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.navbar .logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.navbar .logo i {
    color: #6366f1;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #0f172a;
}

/* Dropdown Styles */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 15px;
    z-index: 10;
}

.dropbtn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #64748b;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    text-decoration: none;
}

.dropbtn:hover {
    color: #0f172a;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 240px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 0.5rem;
    margin-top: 0.75rem;
    overflow: hidden;
    text-align: left;
}

.dropdown-content a {
    color: #475569 !important;
    padding: 0.75rem 1rem !important;
    text-decoration: none;
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem !important;
    transition: all 0.2s;
    border-radius: 8px;
    margin-left: 0 !important;
}

.dropdown-content a:hover {
    background: #f1f5f9;
    color: #6366f1 !important;
    transform: translateX(5px);
}

.nav-dropdown:hover .dropdown-content {
    display: block;
    animation: slideInNav 0.2s ease-out;
}

@keyframes slideInNav {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-free-badge {
    background: rgba(245, 158, 11, 0.2);
    color: #d97706;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 800;
    border: 1px solid rgba(245, 158, 11, 0.4);
    display: inline-block;
}

.mobile-toggle {
    font-size: 1.5rem;
    color: #0f172a;
    background: none;
    border: none;
    cursor: pointer;
    display: none;
    z-index: 1100;
    position: relative;
}

@media (max-width: 900px) {
    .mobile-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 5rem 2rem;
        transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        gap: 1.8rem;
        align-items: flex-start;
        text-align: left;
    }

    .nav-links.active {
        right: 0;
    }

    /* Ensure toggle icon stays on top and is visible */
    .mobile-toggle {
        display: block;
        z-index: 1100 !important;
        position: relative;
        color: #0f172a !important;
        /* Ensure it's not white on white */
    }

    .nav-dropdown {
        width: 100%;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1.5rem;
        margin-top: 0;
        display: block;
        max-height: 0;
        overflow: hidden;
        transition: 0.3s;
    }

    .nav-dropdown:hover .dropdown-content,
    .nav-dropdown.mobile-open .dropdown-content {
        max-height: 350px;
        margin-top: 1rem;
    }
}

/* RTL Overrides for Navigation */
[dir="rtl"] .navbar .logo {
    gap: 0.75rem;
}

[dir="rtl"] .dropdown-content {
    left: auto;
    right: 0;
    text-align: right;
}

[dir="rtl"] .dropdown-content a {
    flex-direction: row-reverse;
}

[dir="rtl"] .dropdown-content a:hover {
    transform: translateX(-5px);
}

@media (max-width: 900px) {
    [dir="rtl"] .nav-links {
        right: auto;
        left: -100%;
        align-items: flex-end;
        text-align: right;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    }
    
    [dir="rtl"] .nav-links.active {
        left: 0;
        right: auto;
    }
    
    [dir="rtl"] .dropdown-content {
        padding-left: 0;
        padding-right: 1.5rem;
    }
}