/* Menu Ultra Design - Cuir Auto */

.navbar-container {
    position: fixed;
    width: 100%;
    z-index: 10;
    height: var(--navbar-height);
}

.sub-menu {
    height: var(--navbar-height)
}

.navbar {
    z-index: 10;
    width: 100%;
    background-color: rgba(var(--background-secondary), 0.5);
    color: rgba(var(--text-primary), var(--text-opacity)) !important;
    --webkit-position: sticky;
    position: sticky;
    top: 0;
    left: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.2rem 0.7rem;
    transition: transform 0.4s ease-out, border-radius 0.4s ease-out, background 0.4s ease-out, width 0.4s ease-out;
    min-height: var(--navbar-height);
    height: var(--navbar-height);
}

.navbar.scrolled {
    border-radius: var(--nav-border-radius);
    transform: translate(1%, 0.8vh);
    width: 98%;
    border: 1px rgba(0, 0, 0, 0.2) solid;
    border-top: 2px rgba(0, 0, 0, 0.1) solid;

    &::before {
        border-radius: var(--nav-border-radius);
    }
}

.navbar::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    transition: transform 0.4s ease-out, border-radius 0.4s ease-out, background 0.4s ease-out, width 0.4s ease-out;
}

@media (max-width: 1200px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        display: block !important;
        opacity: 0;
        height: 0px;
        pointer-events: none;
        background-color: transparent;
        -webkit-transition: 0.5s;
        -moz-transition: 0.5s;
        -o-transition: 0.5s;
        background-color: rgba(var(--background-secondary), 0.5);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        transition: height 0.4s ease-in-out;
        width: 100vw;
        padding: 0 3rem;
        z-index: -1;

        * {
            opacity: 0;
            transition: opacity 0.3s ease-in-out;
        }
    }

    .navbar-collapse.collapsing,
    .navbar-collapse.show {
        opacity: 1;
        padding-top: calc(var(--navbar-height));
    }

    .navbar-collapse.show {
        height: 100vh;
        max-height: 100vh;
        pointer-events: all;
        opacity: 1;

        * {
            opacity: 1;
        }
    }
}

.navbar-elements-xl {
    /* border-bottom: 1px rgba(var(--background-tertiary), var(--background-opacity))
      solid; */
}

.nav_icon_menu {
    fill: rgba(var(--text-primary), var(--text-opacity));
}

.dropdown-item,
.dropdown-item:hover {
    color: rgba(var(--text-primary), var(--text-opacity));
}

@media (min-width: 1200px) {
    .navbar-elements-xl {
        border-bottom: none;
        padding-left: 0px;
    }

    .nav-item-search-1 {
        display: none;
    }

    .d-lg-1 {
        width: calc(100vh);
        display: flex;
    }
}

@media (max-width: 1199px) {
    .navbar-nav {
        margin-top: 20px;
        font-size: 110%;
        padding-bottom: 100%;
        height: calc(100vh);
    }

    .navbar-toggler,
    .navbar-brand {
        width: 33% !important;
    }
}

@media (max-width: 576px) {
    .button_menu {
        display: none !important;
    }
}

.button_menu,
.button_menu:checked,
.button_menu:enabled {
    border: none;
    box-shadow: none;
    margin-left: -3px;
}

.navbar-toggler {
    padding: var(--bs-navbar-toggler-padding-y) 0;
}

.nav-link,
.nav-link:hover,
.nav-link::after,
.nav-link:focus {
    color: rgba(var(--text-primary), var(--text-opacity));
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    border: none;
}

.navbar-brand {
    padding-top: 0px;
    padding-bottom: 0px;
    color: rgba(var(--text-primary), var(--text-opacity)) !important;
    margin-right: 0;

    &.second {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    &.third {
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
}

.navbar:not(:has(.navbar-toggler)) {
    .navbar-brand.second {
        justify-content: start;
    }
}

.navbar:has(.navbar-toggler):not(:has(.navbar-toggler.collapsed)),
.navbar:has(.navbar-toggler):has(.navbar-collapse.collapsing) {}

.img-logo-nav {
    vertical-align: top;
    margin-top: 0px;
    width: auto;
    height: 28px;
}

.navbar-item,
.nav-link {
    background-color: transparent;
    color: rgba(var(--text-primary), var(--text-opacity));
}

#globalnav {
    position: absolute;
}

#globalnav .menuicon-bread-crust {
    display: inline-block;
    width: 17px;
    height: 1px;
    border-radius: 10px;
    background-color: rgba(var(--text-primary), var(--text-opacity));
    color: rgba(var(--text-primary), var(--text-opacity));
    position: absolute;
    left: 7px;
    z-index: 10;
}

#globalnav .header {
    padding: 0;
}

.menuicon {
    list-style-type: none;
    position: absolute;
}

.menuicon-bread {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 30px;
    height: 30px;
    box-sizing: content-box;
    cursor: pointer;
    translate: 0% -50%;
}

#menustate {
    display: none;
}

.menuicon-bread-top {
    transition: transform 0.1806s cubic-bezier(0.04, 0.04, 0.12, 0.96),
        -webkit-transform 0.1806s cubic-bezier(0.04, 0.04, 0.12, 0.96);
    transform: none;
}

.menuicon-bread-crust-top {
    top: 14px;
    transform: translateY(-3px);
    transition: transform 0.1596s cubic-bezier(0.52, 0.16, 0.52, 0.84) 0.1008s,
        -webkit-transform 0.1596s cubic-bezier(0.52, 0.16, 0.52, 0.84) 0.1008s;
}

.menuicon-bread-bottom {
    transition: transform 0.1806s cubic-bezier(0.04, 0.04, 0.12, 0.96),
        -webkit-transform 0.1806s cubic-bezier(0.04, 0.04, 0.12, 0.96);
    transform: none;
}

.menuicon-bread-crust-bottom {
    bottom: 14px;
    transform: translateY(3px);
    transition: transform 0.1596s cubic-bezier(0.52, 0.16, 0.52, 0.84) 0.1008s,
        -webkit-transform 0.1596s cubic-bezier(0.52, 0.16, 0.52, 0.84) 0.1008s;
}

#menustate:checked~#globalnav .menuicon-bread-top {
    transition: transform 0.3192s cubic-bezier(0.04, 0.04, 0.12, 0.96) 0.1008s,
        -webkit-transform 0.3192s cubic-bezier(0.04, 0.04, 0.12, 0.96) 0.1008s;
    transform: rotate(45deg);
}

#menustate:checked~#globalnav .menuicon-bread-crust-top {
    transition: transform 0.1806s cubic-bezier(0.04, 0.04, 0.12, 0.96),
        -webkit-transform 0.1806s cubic-bezier(0.04, 0.04, 0.12, 0.96);
    transform: none;
}

#menustate:checked~#globalnav .menuicon-bread-bottom {
    transition: transform 0.3192s cubic-bezier(0.04, 0.04, 0.12, 0.96) 0.1008s,
        -webkit-transform 0.3192s cubic-bezier(0.04, 0.04, 0.12, 0.96) 0.1008s;
    transform: rotate(-45deg);
}

#menustate:checked~#globalnav .menuicon-bread-crust-bottom {
    transition: transform 0.1806s cubic-bezier(0.04, 0.04, 0.12, 0.96),
        -webkit-transform 0.1806s cubic-bezier(0.04, 0.04, 0.12, 0.96);
    transform: none;
}


/* ==================== */
/* Navbar Container     */
/* ==================== */
.navbar-container {
    position: fixed;
    width: 100%;
    z-index: 1000;
    height: var(--navbar-height);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-menu {
    height: var(--navbar-height);
}

/* ==================== */
/* Navbar Principal     */
/* ==================== */
.navbar {
    z-index: 1000;
    width: 100%;
    background: linear-gradient(135deg,
            rgba(var(--background-secondary), 0.85) 0%,
            rgba(var(--background-quaternary), 0.8) 100%);
    color: rgba(var(--text-secondary), var(--text-opacity)) !important;
    position: sticky;
    top: 0;
    left: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: var(--navbar-height);
    height: var(--navbar-height);
    box-shadow: 0 4px 20px rgba(var(--black-primary), 0.2);

    /* Effet backdrop blur sophistiqué */
    &::before {
        content: "";
        position: absolute;
        z-index: -1;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg,
                rgba(var(--background-secondary), 0.3) 0%,
                rgba(var(--background-quaternary), 0.2) 100%);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Ligne dorée subtile en bas */
    &::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg,
                transparent 0%,
                rgba(var(--accent-gold), 0.5) 20%,
                rgba(var(--accent-gold), 0.8) 50%,
                rgba(var(--accent-gold), 0.5) 80%,
                transparent 100%);
        opacity: 0;
        transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    &:hover::after {
        opacity: 1;
    }

    /* État scrollé - navbar arrondie */
    &.scrolled {
        border-radius: var(--nav-border-radius);
        transform: translate(1%, 0.8vh);
        width: 98%;
        border: 1px solid rgba(var(--accent-gold), 0.3);
        border-top: 2px solid rgba(var(--accent-gold), 0.2);
        box-shadow:
            0 8px 32px rgba(var(--black-primary), 0.3),
            0 0 0 1px rgba(var(--accent-gold), 0.1),
            inset 0 0 20px rgba(var(--accent-gold), 0.05);

        &::before {
            border-radius: var(--nav-border-radius);
            backdrop-filter: blur(24px) saturate(200%);
            -webkit-backdrop-filter: blur(24px) saturate(200%);
        }

        &::after {
            border-radius: 0 0 var(--nav-border-radius) var(--nav-border-radius);
        }
    }
}

/* ==================== */
/* Logo & Branding      */
/* ==================== */
.navbar-brand {
    padding-top: 0;
    padding-bottom: 0;
    color: rgba(var(--text-secondary), var(--text-opacity)) !important;
    margin-right: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    a {
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

        &:hover {
            transform: scale(1.05);

            .img-logo-nav {
                filter: drop-shadow(0 0 12px rgba(var(--accent-gold), 0.6));
            }

            .main-title {
                color: rgb(var(--accent-gold));
            }
        }
    }

    .main-title {
        font-weight: 700;
        font-size: 1.25rem;
        background: linear-gradient(135deg,
                rgb(var(--text-secondary)) 0%,
                rgb(var(--accent-gold)) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        transition: all 0.3s ease;
    }

    &.second {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    &.third {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 1.5rem;
    }
}

.navbar:not(:has(.navbar-toggler)) .navbar-brand.second {
    justify-content: start;
}

.img-logo-nav {
    vertical-align: top;
    margin-top: 0;
    width: auto;
    height: 32px;
    filter: drop-shadow(0 2px 8px rgba(var(--black-primary), 0.3));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== */
/* Navigation Links     */
/* ==================== */
.navbar-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-item {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    &::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: linear-gradient(90deg,
                transparent,
                rgb(var(--accent-gold)),
                transparent);
        transform: translateX(-50%);
        transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    &:hover::before {
        width: 80%;
    }
}

.nav-link {
    background-color: transparent;
    color: rgba(var(--text-secondary), var(--text-opacity)) !important;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: calc(var(--border-radius) * 0.75);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg,
                transparent,
                rgba(var(--accent-gold), 0.15),
                transparent);
        transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    &:hover {
        color: rgb(var(--accent-gold)) !important;
        background: rgba(var(--background-tertiary), 0.3);
        transform: translateY(-2px);

        &::before {
            left: 100%;
        }
    }

    &:focus,
    &::after {
        color: rgba(var(--text-secondary), var(--text-opacity));
    }

    &.active {
        color: rgb(var(--accent-gold)) !important;
        background: rgba(var(--background-tertiary), 0.4);
        box-shadow: inset 0 0 10px rgba(var(--accent-gold), 0.2);
    }
}

/* ==================== */
/* Dropdown Menus       */
/* ==================== */
.dropdown-menu {
    background: linear-gradient(135deg,
            rgba(var(--background-secondary), 0.95) 0%,
            rgba(var(--background-quaternary), 0.9) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(var(--accent-gold), 0.3);
    border-radius: calc(var(--border-radius) * 1.25);
    box-shadow:
        0 12px 40px rgba(var(--black-primary), 0.4),
        0 0 0 1px rgba(var(--accent-gold), 0.2),
        inset 0 0 20px rgba(var(--accent-gold), 0.05);
    padding: 0.75rem;
    margin-top: 0.5rem;
    overflow: hidden;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle at top right,
                rgba(var(--accent-gold), 0.08) 0%,
                transparent 60%);
        pointer-events: none;
    }
}

.dropdown-item {
    color: rgba(var(--text-secondary), var(--text-opacity)) !important;
    padding: 0.75rem 1rem;
    border-radius: calc(var(--border-radius) * 0.75);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg,
                transparent,
                rgba(var(--accent-gold), 0.2),
                transparent);
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    &:hover {
        color: rgb(var(--accent-gold)) !important;
        background: rgba(var(--background-tertiary), 0.4) !important;
        transform: translateX(8px);
        box-shadow:
            0 4px 12px rgba(var(--black-primary), 0.2),
            inset 0 0 0 1px rgba(var(--accent-gold), 0.2);

        &::before {
            left: 100%;
        }
    }

    svg {
        color: rgb(var(--accent-gold));
        margin-right: 0.5rem;
    }
}

.dropdown-divider {
    border-color: rgba(var(--accent-gold), 0.2);
    margin: 0.5rem 0;
}

#globalnav {
    position: absolute;

    .menuicon-bread-crust {
        display: inline-block;
        width: 20px;
        height: 2px;
        border-radius: 10px;
        background-color: rgba(var(--text-secondary), var(--text-opacity));
        color: rgba(var(--text-secondary), var(--text-opacity));
        position: absolute;
        left: 7px;
        z-index: 1;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .header {
        padding: 0;
    }
}

.menuicon {
    list-style-type: none;
    position: absolute;

    &-bread {
        position: absolute;
        top: 0;
        left: 0;
        width: 35px;
        height: 35px;
        box-sizing: content-box;
        cursor: pointer;
        translate: 0% -50%;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

        &-top {
            transition: transform 0.18s cubic-bezier(0.04, 0.04, 0.12, 0.96);
            transform: none;
        }

        &-bottom {
            transition: transform 0.18s cubic-bezier(0.04, 0.04, 0.12, 0.96);
            transform: none;
        }

        &-crust-top {
            top: 16px;
            transform: translateY(-4px);
            transition: transform 0.16s cubic-bezier(0.52, 0.16, 0.52, 0.84) 0.1s;
        }

        &-crust-bottom {
            bottom: 16px;
            transform: translateY(4px);
            transition: transform 0.16s cubic-bezier(0.52, 0.16, 0.52, 0.84) 0.1s;
        }
    }
}

/* ==================== */
/* Avatar & User Menu   */
/* ==================== */
.navbar-brand.third {
    .dropdown-toggle {
        position: relative;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

        &::after {
            display: none;
        }

        &:hover {
            transform: scale(1.1);
            filter: drop-shadow(0 0 12px rgba(var(--accent-gold), 0.5));
        }
    }
}

/* ==================== */
/* Responsive Design    */
/* ==================== */
@media (max-width: 1200px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        display: block !important;
        opacity: 0;
        height: 0;
        pointer-events: none;
        background: linear-gradient(135deg,
                rgba(var(--background-secondary), 0.98) 0%,
                rgba(var(--background-quaternary), 0.95) 100%);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        width: 100vw;
        padding: 0 2rem;
        z-index: -1;
        border-bottom: 2px solid rgba(var(--accent-gold), 0.3);

        * {
            opacity: 0;
            transition: opacity 0.4s ease-in-out;
        }

        &.collapsing,
        &.show {
            opacity: 1;
            padding-top: calc(var(--navbar-height) + 1rem);
        }

        &.show {
            height: 100vh;
            max-height: 100vh;
            pointer-events: all;
            opacity: 1;

            * {
                opacity: 1;
            }
        }
    }


    .navbar-elements-xl {
        border-bottom: 1px solid rgba(var(--accent-gold), 0.2);
        padding: 1rem 0;

        &:last-child {
            border-bottom: none;
        }
    }

    .nav-link {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }


    .navbar-brand {
        width: 33% !important;
    }
}

@media (min-width: 1200px) {
    .navbar-elements-xl {
        border-bottom: none;
        padding-left: 0;
    }

    .nav-item-search-1 {
        display: none;
    }
}

@media (max-width: 576px) {
    .button_menu {
        display: none !important;
    }

    .navbar {
        padding: 0.3rem 0.8rem;
    }

    .img-logo-nav {
        height: 26px;
    }

    .main-title {
        font-size: 1rem !important;
    }
}

/* ==================== */
/* Animations           */
/* ==================== */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scaleInFromTopCenter {
    animation: slideInFromTop 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.scaleInFromTopRight {
    animation: slideInFromTop 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ==================== */
/* Nav Tabs Override    */
/* ==================== */
.nav-tabs {

    .nav-link.active,
    .nav-item.show .nav-link {
        border: none;
        background: rgba(var(--background-tertiary), 0.4);
        color: rgb(var(--accent-gold)) !important;
        box-shadow: inset 0 0 10px rgba(var(--accent-gold), 0.2);
    }
}

/* ==================== */
/* Icon Notif           */
/* ==================== */
.iconNotif {
    left: 0;
    opacity: 0.6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    &.active {
        opacity: 1;
    }

    &:hover {
        transform: scale(1.1);
        opacity: 1;
    }
}

.badgeNotif {
    display: none;
    position: absolute;
    top: 5px;
    left: 80%;
    border-radius: 50%;
    height: 12px;
    width: 12px;
    transform: translate(-50%, -50%) !important;
    background-color: rgba(var(--bs-danger-rgb), var(--background-opacity)) !important;
    box-shadow: 0 0 10px rgba(var(--bs-danger-rgb), 0.6);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.iconNotif.active .badgeNotif {
    display: block;
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

/* ==================== */
/* Accessibilité        */
/* ==================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}