nav {
    position: fixed;
    top: 0px;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 15px 15px;
    background: #fafafa;
    box-shadow: inset 0px -1px 0px #c5c5c6;
    z-index: 1;
}

.nav-icon {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 20px;
}

.nav-icon span {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 25px;
    margin-left: 10px;
    font-weight: 400;
    color: #333;
}

.nav-icon img { width: 40px; }

.hamburger { display: none; }

.navlinks-container a {
    margin: 0 10px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    color: #414141;
    display: inline-block;
    position: relative;
}

.navlinks-container a::after {
    content: "";
    display: block;
    position: absolute;
    bottom: -3px;
    width: 100%;
    height: 3px;
    transform: scaleX(0);
    transform-origin: left;
    background: rgb(93, 102, 206);
    /*transition: transform 0.3s ease-out;*/
}

.navlinks-container a:hover::after { transform: scaleX(1) }

.nav-authentification { margin-left: auto; }

.sign-btns { display: none; }

.sign-btns button {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 16px;
    min-width: 90px;
    padding: 10px 5px;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
    border: none;
}

.sign-btns button:nth-child(2) {
    border: none;
    background: #92c3eeb7;
}

.sign-user {
    display: block;
    cursor: pointer;
    border: none;
}

.sign-user img { width: 20px; }

.navlinks-container a.active {
    color: #28a745;  /* Couleur verte comme vos boutons */
}

.navlinks-container a.active::after {
    transform: scaleX(1);  /* Garde le soulignement visible */
    background: #28a745;   /* Même couleur verte */
}

@media (max-width: 815px) {
    nav {
        padding: 15px 15px;
        position: fixed;
        display: flex;
        top: 0px;
    }

    .nav-navlinks { order: 1 }

    /* Debut menu hamburger */
    .hamburger {
        width: 20px;
        height: 20px;
        cursor: pointer;
        border: none;
        display: flex;
        background: #fafafa;    
        align-items: center;
        position: relative;
    }

    .hamburger span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #333;
        position: absolute;
        pointer-events: none;
        transition: opacity 0.3s 0.15s ease-out;
    }

    .hamburger span:nth-child(1),
    .hamburger span:nth-child(3) { transition: transform 0.3s 0.15s ease-out; }

    .hamburger span:nth-child(1) { transform: translateY(7px); }

    .hamburger span:nth-child(3) { transform: translateY(-7px); }

    .hamburger.open span:nth-child(1) { transform: translate(0) rotate(135deg); }

    .hamburger.open span:nth-child(2) {
        opacity: 0;
        transition: opacity 0.2s ease-out;
    }   

    .hamburger.open span:nth-child(3) { transform: translate(0) rotate(-135deg); }
    /* Fin du menu hamburger */

    .navlinks-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        background: #fafafa;
        top: 100%;
        left: 0;
        height: auto;
        width: auto;
        padding: 5px 40px 10px 20px;
        border-right: 1px solid #c5c5c6;
        border-bottom: 1px solid #c5c5c6;
        transform: translate(-100%);
        transition: transform 0.3s ease-out;
    }

    .open { transform: translate(0%); }

    .navlinks-container a {
        font-size: 18px;
        margin: 5px 0;
    }

    .nav-icon {
        order: 2;
        margin: auto;
        position:relative;
    }

    .nav-icon span{ font-size: 22px; }

    .nav-authentification {
        order: 3;
        margin-left: 0;
    }

    .sign-btns { display: none; }

    .sign-user {
        display: block;
        cursor: pointer;
        border: none;
    }

    .sign-user img { width: 20px; }
}

.navlinks-container a.active {
    color: #28a745;  /* Couleur verte comme vos boutons */
}

.navlinks-container a.active::after {
    transform: scaleX(1);  /* Garde le soulignement visible */
    background: #28a745;   /* Même couleur verte */
}

@media (max-width: 500px) {
    .nav-icon span { font-size: 20px }
}