/* ==========================================================
   VARIABLES DE LA NAVBAR
   ========================================================== */
:root {
    --nav-bg: rgba(255, 255, 255, 0.85);
    --nav-dark: #343A40;
    --nav-dark-hover: #1a1e21;
    --nav-text-muted: #64748b;
    --nav-border: rgba(226, 232, 240, 0.8);
    --nav-badge-green: #10b981;
    --shadow-subtle: 0 10px 30px -10px rgba(0, 0, 0, 0.05), 0 4px 12px -2px rgba(0, 0, 0, 0.02);
    --shadow-floating: 0 20px 40px -15px rgba(52, 58, 64, 0.07), 0 0 15px rgba(0, 0, 0, 0.03);
    --radius-full: 9999px;
    --radius-lg: 16px;
    --radius-md: 12px;
}

/* ==========================================================
   HEADER & NAVBAR FLOOTTANTE (GLASSMORPHISM)
   ========================================================== */
.navbar-wrapper {
    position: fixed; /* Changé de sticky à fixed pour une animation fluide */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 1.5rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.navbar-wrapper.nav-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.navbar {
    max-width: 1240px;
    margin: 0 auto;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--nav-border);
    border-radius: var(--radius-full);
    padding: 0.6rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-subtle);
    transition: all 0.3s ease;
}

/* ==========================================================
   LOGO DÉBORDANT ET ANIMÉ
   ========================================================== */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 10;
}

.logo-container {
    display: flex;
    align-items: center;
    position: relative;
}

.logo-img {
    height: 75px; /* Taille agrandie du logo */
    width: auto;
    display: block;
    object-fit: contain;
    margin-top: -10px;
    margin-bottom: -10px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Animation au survol du logo */
.logo-link:hover .logo-img {
    transform: scale(1.05);
}

/* ==========================================================
   LIENS DE NAVIGATION & ANIMATIONS AU SURVOL
   ========================================================== */
.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    color: var(--nav-text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-full);
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-icon {
    width: 17px;
    height: 17px;
    stroke-width: 2px;
    transition: transform 0.3s ease, color 0.3s ease;
}

/* --- ANIMATIONS DES LIENS (HOVER) --- */
.nav-link:hover {
    color: var(--nav-dark);
    background-color: rgba(52, 58, 64, 0.04);
    transform: translateY(-2px); /* Élévation du lien */
}

.nav-link:hover .nav-icon {
    transform: translateY(-2px) scale(1.1);
    color: var(--nav-dark);
}

/* Lien Actif avec indicateur */
.nav-link.active {
    color: var(--nav-dark);
    font-weight: 600;
    background-color: rgba(52, 58, 64, 0.06);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 3px;
    background-color: var(--nav-dark);
    border-radius: var(--radius-full);
}

/* ==========================================================
   BOUTON RECRUTEMENT (#343A40) & ANIMATIONS
   ========================================================== */
.nav-cta-item {
    margin-left: 0.5rem;
}

.btn-recrutement {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--nav-dark);
    color: #ffffff;
    text-decoration: none;
    padding: 0.6rem 1.3rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.92rem;
    box-shadow: 0 4px 14px rgba(52, 58, 64, 0.25);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

/* Badge '3 offres' */
.btn-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Point clignotant vert */
.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: var(--nav-badge-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--nav-badge-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.btn-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

/* Hover sur le bouton Recrutement */
.btn-recrutement:hover {
    background-color: var(--nav-dark-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(52, 58, 64, 0.35);
}

.btn-recrutement:hover .btn-arrow {
    transform: translateX(4px); /* Flèche qui décale à droite */
}

/* ==========================================================
   MENU MOBILE & ANIMATION HAMBURGER
   ========================================================== */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: var(--nav-dark);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Transformation de l'icône Hamburger en X */
.mobile-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 991px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        /* Positionné exactement sous la barre de navigation principale */
        top: 85px; 
        right: 1.2rem;
        left: 1.2rem;
        background: #ffffff;
        border: 1px solid var(--nav-border);
        border-radius: var(--radius-lg);
        padding: 1.5rem 1.25rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        box-shadow: var(--shadow-floating);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px) scale(0.95);
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1002;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }

    .nav-link {
        padding: 0.9rem 1.2rem;
        font-size: 1rem;
        border-radius: var(--radius-md);
    }

    .nav-cta-item {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
    }

    .btn-recrutement {
        width: 100%;
        box-sizing: border-box;
        justify-content: space-between;
        padding: 0.9rem 1.2rem;
    }
}