/* ===== HEADER NAVIGATION - ANNONCECLAIR ===== */
/* Style cohérent avec le site principal https://annonceclair.com/ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #E2E8F0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #1A202C;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
}

.logo img {
    border-radius: 8px;
    width: 40px;
    height: 40px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    text-decoration: none;
    color: #4A5568;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    color: #FF6B35;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white !important;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* Bouton hamburger - caché par défaut sur desktop */
.mobile-menu-toggle {
    display: none;
}

/* Adjust body padding for fixed header */
body {
    padding-top: 68px;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    .nav {
        padding: 0 16px;
        height: 60px;
    }

    body {
        padding-top: 60px;
    }

    .logo {
        font-size: 17px;
        gap: 8px;
    }

    .logo img {
        width: 34px !important;
        height: 34px !important;
    }

    /* Garder le texte logo visible */
    .logo span {
        display: inline !important;
    }

    /* Bouton hamburger - 3 barres visibles */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 6px;
        width: 40px;
        height: 40px;
        z-index: 1100;
        flex-shrink: 0;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 24px;
        height: 2.5px;
        background: #1A202C;
        border-radius: 2px;
        transition: all 0.3s ease;
        pointer-events: none;
    }

    /* Animation X quand actif */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translateY(7px);
    }
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-7px);
    }

    /* Menu déroulant mobile */
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0 16px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        z-index: 999;
        transform: translateY(-110%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s ease, opacity 0.3s ease;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu li a {
        display: block;
        padding: 14px 20px;
        font-size: 16px;
        border-bottom: 1px solid #F3F4F6;
        color: #1A202C;
    }

    .nav-menu li span {
        display: block;
        padding: 14px 20px;
        font-size: 15px;
        color: #4A5568;
        border-bottom: 1px solid #F3F4F6;
    }

    /* Bouton connexion dans le menu mobile */
    .nav-menu .login-trigger,
    .nav-menu .btn-primary {
        display: block !important;
        margin: 12px 16px 4px;
        padding: 14px 20px !important;
        width: calc(100% - 32px);
        text-align: center;
        border-radius: 10px !important;
        font-size: 16px !important;
    }

    /* User menu wrapper dans nav mobile */
    .user-menu-wrapper {
        padding: 8px 16px;
    }

    /* Overlay sombre */
    .mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        cursor: pointer;
    }

    .mobile-overlay.active {
        display: block;
    }
}
