/*
###############################################################################################################################################################
MENU SIDEBAR
###############################################################################################################################################################
*/

.dropdown {
	float: left;
	overflow: hidden;
	height: 100%;
}

.dropdown .dropbtn {
	height: 100%;
	border: none;
	border-radius: var(--BUTTON_BORDER_RADIUS);
	outline: none;
	color: white;
	padding: 10px 25px;
	background-color: inherit;
	font-family: inherit;
	margin: 0;
	white-space: nowrap;
    text-decoration: none;
}

.menu-sidebar {
    position: fixed;
    top: var(--HEADER_HEIGHT);
    right: 0;
    width: 350px;
    height: auto; /* height: calc(100vh - var(--HEADER_HEIGHT)); */
    background-color: var(--SEARCH_BAR_BACKGROUND_COLOR);
    -webkit-backdrop-filter: blur(45px) saturate(180%);
    backdrop-filter: blur(45px) saturate(180%);
    background-clip: padding-box;
    /* transform-origin: right center; */
    transform: translateX(100%) perspective(1000px) rotateY(90deg);
    will-change: transform;
    z-index: 15;
    /* transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); */
    /* box-shadow: 
        -5px 0 25px rgba(0, 0, 0, 0.3),
        inset 0 0 2px rgba(255, 255, 255, 0.15),
        -20px 0 50px rgba(0, 0, 0, 0.2); */
    padding: 5px 20px;
    overflow-x: hidden;
    /* border-radius: var(--BUTTON_BORDER_RADIUS) 0 0 var(--BUTTON_BORDER_RADIUS);
    box-sizing: border-box; */
}

.menu-sidebar.active {
    transform: translateX(0) perspective(1000px) rotateY(0deg);
    right: 0;
    height: calc(100% - var(--MOBILE_NAV_HEIGHT))!important;
}

.menu-sidebar-item {
    border-radius: var(--BUTTON_BORDER_RADIUS);
    margin: 18px 0;
    transform: translateZ(20px);
    transition: transform 0.3s ease;
}

.menu-sidebar-item:hover {
    transform: translateZ(30px) scale(1.02);
}

.menu-sidebar-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--COLOR_SURFACE_80) 30%, var(--COLOR_SURFACE_80) 70%, transparent);
}

.menu-sidebar-button {
    width: 100%;
    padding: 15px 20px;
    background: transparent;
    border: none;
    color: white;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: var(--BUTTON_BORDER_RADIUS);
}

.menu-sidebar-button:hover,
.menu-sidebar-button:focus,
.menu-sidebar-button.active {
    background: linear-gradient(to right, var(--COLOR_ACTION_40), var(--COLOR_ACTION_60));
    color: white;
    box-shadow: 
    inset 4px 4px 8px rgba(0, 0, 0, 0.05),
    inset -4px -4px 8px rgba(255, 255, 255, 0.3);
}

.menu-sidebar-button:focus,
.menu-sidebar-button.active {
    font-weight: 400;
    border-radius: var(--BUTTON_BORDER_RADIUS) var(--BUTTON_BORDER_RADIUS) 0 0;
}

.menu-sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 var(--BUTTON_BORDER_RADIUS) var(--BUTTON_BORDER_RADIUS);
}

.menu-sidebar-submenu.active {
    max-height: 500px;
}

.menu-sidebar-submenu a {
    display: block;
    padding: 12px 20px 12px 40px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.menu-sidebar-submenu a:hover {
    background-image: linear-gradient(to right, var(--COLOR_ACTION_40), var(--COLOR_ACTION_60));
    color: white;
    box-shadow: 
    4px 4px 8px rgba(0, 0, 0, 0.15),
    -4px -4px 8px rgba(255, 255, 255, 0.1),
    inset 4px 4px 8px rgba(255, 255, 255, 0.2),
    inset -4px -4px 8px rgba(255, 255, 255, 0.3);

}

.arrow-down {
    width: 12px;
    height: 12px;
    fill: var(--COLOR_ACTION_50);
    transition: transform 0.3s ease;
}

.arrow-up {
    width: 12px;
    height: 12px;
    fill: var(--COLOR_ACTION_50);
    transition: transform 0.3s ease;
    transform: rotate(180deg);
}


.menu-sidebar-button.active .arrow-down {
    transform: rotate(180deg);
}

/* body {
    position: relative;  A NE PAS METTRE CAR CASSE L'IMPRESSION PDF (1 SEULE PAGE IMPRIMEE)
    overflow-x: hidden;
    width: 100%;
} */

/*
###############################################################################################################################################################
RESPONSIVE
###############################################################################################################################################################
*/

@media screen and (max-width: 896px) {
	.dropdown .dropbtn {
	display: none;
	padding: 10px 10px;
	}
}

@media screen and (max-width: 480px) {
    .menu-sidebar {
        width: 100%;
        right: -100%;
    }

    .menu-sidebar-item:not(:last-child)::after {
        width: 90%;
    }
}

@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none) {
    .menu-sidebar {
        -webkit-backdrop-filter: blur(45px) saturate(180%);
        backdrop-filter: blur(45px) saturate(180%);
    }
}