.navbar {
    border-bottom: 1.5px solid black;
    top: 0;
    padding: 0.75% 1.5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #c043e5, #4a7aff);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    backdrop-filter: blur(12px);
    position: sticky;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-logo img {
    height: 60px;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.nav-logo img:hover {
    transform: scale(1.08);
}

.nav-links {
    width: 75%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12%;
}

.nav-links.connected {
    width: 60%;
}

.nav-links a {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: clamp(12px, 2vw, 26px);
    letter-spacing: 0.5px;
    position: relative;
    transition: color 0.3s;
}

.nav-links a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: white;
    transition: width 0.3s;
}

.nav-links a:hover {
    color: lightgrey;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 18px;
}

.user-avatar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    background: none !important;
    border: none !important;
}

.user-avatar {
    height: 65px;
    width: 65px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s;
    background: transparent !important;
}

.user-avatar-link:hover .user-avatar {
    transform: scale(1.1);
}

#mobile-banner {
    top: 0;
    position: fixed;
    display: none;
    z-index: 1001;
    width: 99.5%;
}

#mobile-banner img {
    flex-grow: 1;
    width: 50%;
    height: 20px;
    object-fit: contain;
    padding: 0 10px;
}

.icon-container {
    flex-grow: 1;
    text-align: center;
}

.icon-container a {
    display: block;
    color: white;
}

.icon-container p {
    margin: 0;
    font-size: clamp(11px, 2vw, 16px);
    font-family: Bahnschrift;
}

.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff3b3b;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
}

#mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 99990;
    display: none;
}

body.overlay-active > *:not(#mobile-overlay) {
    filter: blur(6px);
    pointer-events: none;
}

.notif-dropdown,
.profile-dropdown,
#mobile-notif-dropdown,
#mobile-profile-dropdown {
    filter: none !important;
    pointer-events: auto !important;
    z-index: 999999 !important;
}

.notif-dropdown,
.profile-dropdown,
#mobile-overlay {
    filter: none !important;
    pointer-events: auto;
    z-index: 999999 !important;
}

@media screen and (max-width: 600px) {
    .navbar {
        display: none;
    }

    #mobile-banner {
        display: flex;
        background: linear-gradient(90deg, #c043e5, #4a7aff);
        justify-content: space-between;
        align-items: center;
        border: 1px solid white;
        padding: 1% 1.5%;
    }

    /* CLOCHE PLUS PETITE */
    .notif-icon {
        font-size: 20px !important;
        margin-right: 6px !important;
    }

    /* RAPPROCHEMENT NOTIF <-> PROFIL */
    .notification-bell {
        margin-right: 5px !important;
    }

    #mobile-profile-btn img {
        width: 35px !important;
        height: 35px !important;
        border-radius: 50%;
        object-fit: cover;
        background: transparent !important;
    }

    #mobile-banner .icon-container img {
        width: 25px;
        height: 25px;
        object-fit: contain;
        margin: 0 auto;
    }

    #mobile-banner .icon-container:first-child img {
        width: 60px;
        height: 25px;
    }
}

.profile-menu-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-bell {
    position: relative;
    margin-right: 20px;
}

.notif-icon {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.notif-icon:hover {
    transform: scale(1.2) rotate(15deg);
}

.notif-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: linear-gradient(135deg, #0e1c2f, #1f2f49);
    border: 2px solid #50dfdb;
    border-radius: 15px;
    min-width: 280px;
    box-shadow: 0 0 20px rgba(80,223,219,0.3);
    z-index: 200000;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity .25s ease, transform .25s ease;
}

.notif-dropdown.show {
    opacity: 1;
    transform: scale(1);
}

.notif-header {
    padding: 12px 16px;
    font-weight: bold;
    color: #50dfdb;
    border-bottom: 1px solid rgba(80,223,219,0.3);
    font-size: 14px;
}

.notif-list {
    max-height: 300px;
    overflow-y: auto;
}

.notif-item {
    padding: 14px 16px;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.45;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    text-align: left;
    display: block;
    text-decoration: none;
}

.profile-dropdown {
    position: absolute;
    top: 80px;
    right: 0;
    background: linear-gradient(135deg, #0e1c2f, #1f2f49);
    border: 2px solid #50dfdb;
    border-radius: 15px;
    min-width: 220px;
    box-shadow: 0 0 20px rgba(80,223,219,0.3);
    z-index: 200000;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity .25s ease, transform .25s ease;
}

.profile-dropdown.show {
    opacity: 1;
    transform: scale(1);
}

.dropdown-item {
    display: block;
    padding: 14px 16px;
    color: #aee5e3;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid rgba(80,223,219,0.2);
}

.dropdown-item.logout {
    color: #ff6b6b;
}

.user-menu-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu-mobile .notif-icon {
    font-size: 20px !important;
    margin: 0 !important;
}

.user-menu-mobile .user-avatar {
    width: 32px !important;
    height: 32px !important;
}


@media screen and (max-width: 600px) {
    .notif-dropdown,
    .profile-dropdown {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 85% !important;
        max-width: 350px !important;
        border-radius: 18px !important;
        background: linear-gradient(135deg, #0e1c2f, #1f2f49) !important;
        z-index: 200000 !important;
        box-shadow: 0 0 25px rgba(0,0,0,0.5) !important;
        opacity: 0;
        transition: opacity .25s ease;
    }

    .notif-dropdown.show,
    .profile-dropdown.show {
        opacity: 1 !important;
    }
    

    html, body {
        width: 100%;
        overflow-x: hidden !important;
    }

    #mobile-banner img,
    .user-avatar {
        max-width: 100% !important;
    }

    #mobile-banner {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .nav-links a::after {
        display: none !important;
    }

    .nav-links a {
        text-decoration: none !important;
    }

    a {
        -webkit-tap-highlight-color: transparent !important;
    }
    
    #mobile-banner a,
    #mobile-banner a:active,
    #mobile-banner a:focus,
    #mobile-banner a:visited {
        text-decoration: none !important;
        outline: none !important;
        border: none !important;
    }
}

