/* ==========================================
   NAVIGATION.CSS - Styles de la navbar
   ========================================== */

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================
   LOGO
   ========================================== */

.navbar-logo {
    flex: 0 0 auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: var(--transition);
}

.logo-text:hover {
    transform: scale(1.05);
}

/* ==========================================
   MENU DE NAVIGATION
   ========================================== */

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--primary-color);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.theme-icon {
    font-size: 0.9rem;
    line-height: 1;
    opacity: 0.45;
    transition: opacity 0.2s ease;
}

.theme-track {
    width: 42px;
    height: 22px;
    border-radius: 999px;
    background: #e5e7eb;
    position: relative;
    transition: background-color 0.3s ease;
}

.theme-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.theme-toggle[data-theme="light"] .theme-icon-sun,
.theme-toggle[data-theme="dark"] .theme-icon-moon {
    opacity: 1;
}

.theme-toggle[data-theme="dark"] .theme-track {
    background: #4f46e5;
}

.theme-toggle[data-theme="dark"] .theme-thumb {
    transform: translateX(20px);
}

/* ==========================================
   HAMBURGER MENU (MOBILE)
   ========================================== */

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 0.4rem;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-8px, 8px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-7px, -7px);
}

/* ==========================================
   RESPONSIVE - MOBILE MENU
   ========================================== */

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

    .theme-toggle {
        margin-left: auto;
        margin-right: 0.75rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        gap: 0;
        padding: 2rem 0;
        box-shadow: var(--shadow-md);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        display: block;
        padding: 1rem;
        margin: 0;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link.active {
        background: var(--light-bg);
        border-left: 4px solid var(--primary-color);
    }

    .navbar-container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 0 0.5rem;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .theme-toggle {
        padding: 0.3rem 0.4rem;
        gap: 0.35rem;
    }

    .theme-track {
        width: 38px;
        height: 20px;
    }

    .theme-thumb {
        width: 16px;
        height: 16px;
    }

    .theme-toggle[data-theme="dark"] .theme-thumb {
        transform: translateX(18px);
    }

    .nav-menu {
        top: 60px;
    }
}

