/**
 * Sabine Be - Slideout Menu Styles
 *
 * @package    Sabine_Be
 * @subpackage Sabine_Be/public/css
 * @since      1.3.0
 */

/* ==========================================================================
   Variables CSS
   ========================================================================== */

:root {
	--sbe-slideout-width: 400px;
	--sbe-slideout-bg: var(--blanc, #ffffff);
	--sbe-slideout-text: var(--texte, #1a1a1a);
	--sbe-slideout-accent: var(--rouge, #c8102e);
	--sbe-slideout-border: var(--gris, #cccccc);
	--sbe-slideout-transition: 0.3s ease;
	--sbe-slideout-z-index: 99999;
}

/* ==========================================================================
   Bouton Trigger
   ========================================================================== */

.sbe-slideout-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	padding: 0;
	cursor: pointer;
	transition: opacity var(--sbe-slideout-transition);
}

.sbe-slideout-trigger:hover,
.sbe-slideout-trigger:focus {
	background: transparent;
	opacity: 0.7;
}

.sbe-slideout-trigger .gp-icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.sbe-slideout-trigger svg {
	width: 24px;
	height: 24px;
	fill: var(--sbe-slideout-text);
	top: 0;
}

/* ==========================================================================
   Panel Slideout
   ========================================================================== */

.sbe-slideout-nav {
	position: fixed;
	top: 0;
	left: 0;
	width: var(--sbe-slideout-width);
	height: 100vh;
	height: 100dvh;
	background-color: var(--sbe-slideout-bg);
	z-index: var(--sbe-slideout-z-index);
	transform: translateX(calc(var(--sbe-slideout-width) * -1));
	transition: transform var(--sbe-slideout-transition);
	overflow-y: auto;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
}

.sbe-slideout-nav.sbe-slideout-is-open {
	transform: translateX(0);
}

/* ==========================================================================
   Contenu interne
   ========================================================================== */

.sbe-slideout-inner {
	padding: 80px 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

/* ==========================================================================
   Bouton Exit (fermeture)
   ========================================================================== */

.sbe-slideout-exit {
	position: absolute;
	top: 20px;
	left: 20px;
	background: transparent;
	border: none;
	padding: 10px;
	cursor: pointer;
	transition: opacity var(--sbe-slideout-transition);
	z-index: 1;
}

.sbe-slideout-exit:hover,
.sbe-slideout-exit:focus {
	background: transparent;
	opacity: 0.7;
}

.sbe-slideout-exit .gp-icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.sbe-slideout-exit svg {
	width: 20px;
	height: 20px;
	fill: var(--sbe-slideout-text);
}

/* ==========================================================================
   Menus
   ========================================================================== */

.sbe-slideout-main-nav,
.sbe-slideout-secondary-nav {
	width: 100%;
}

.sbe-slideout-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sbe-slideout-menu li {
	margin: 0;
	padding: 0;
	position: relative;
}

.sbe-slideout-menu li a {
	display: block;
	text-decoration: none;
	color: var(--sbe-slideout-text);
	transition: color var(--sbe-slideout-transition);
	position: relative;
}

.sbe-slideout-menu li a:hover,
.sbe-slideout-menu li a:focus {
	color: var(--sbe-slideout-accent);
}

/* Menu principal */
.sbe-slideout-main-nav .sbe-slideout-menu li a {
	line-height: 50px;
	padding: 0 10%;
	font-weight: bold;
	font-size: 22px;
}

/* Menu secondaire */
.sbe-slideout-secondary-nav {
	border-top: 1px solid var(--sbe-slideout-border);
	margin-top: 10px;
	padding-top: 15px;
}

.sbe-slideout-secondary-nav .sbe-slideout-menu li a {
	line-height: 40px;
	padding: 0 10%;
	font-size: 16px;
}

/* ==========================================================================
   Header Mobile (croix + compte + langue) - Masqué par défaut
   ========================================================================== */

.sbe-slideout-mobile-header {
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	margin-bottom: 20px;
}

/* Groupe droite (compte + langue) */
.sbe-slideout-mobile-header-right {
	display: flex;
	align-items: center;
	gap: 15px;
}

.sbe-slideout-account-link {
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: opacity var(--sbe-slideout-transition);
}

.sbe-slideout-account-link:hover,
.sbe-slideout-account-link:focus {
	opacity: 0.7;
}

.sbe-slideout-account-icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.sbe-slideout-account-icon svg {
	width: 24px;
	height: 24px;
	fill: var(--sbe-slideout-text);
}

/* ==========================================================================
   Indicateurs visuels (chevrons)
   ========================================================================== */

.sbe-slideout-menu li a::before {
	content: "";
	display: block;
	width: 0;
	position: absolute;
	left: calc(40px - 2em);
	top: 50%;
	margin-top: -0.5em;
	border-top: 1em solid;
	transition: width var(--sbe-slideout-transition);
	border-color: var(--sbe-slideout-text);
	border-radius: 0;
}

.sbe-slideout-menu li:nth-of-type(odd) a::before {
	border-color: var(--sbe-slideout-accent);
	border-radius: 20px;
}

.sbe-slideout-menu li a:hover::before,
.sbe-slideout-menu li a:focus::before,
.sbe-slideout-menu li a:active::before {
	width: 1em;
}

/* ==========================================================================
   Overlay
   ========================================================================== */

.sbe-slideout-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: calc(var(--sbe-slideout-z-index) - 1);
	visibility: hidden;
	opacity: 0;
	transition: visibility var(--sbe-slideout-transition), opacity var(--sbe-slideout-transition);
}

.sbe-slideout-overlay.sbe-slideout-is-open {
	visibility: visible;
	opacity: 1;
}

/* ==========================================================================
   Body state
   ========================================================================== */

body.sbe-slideout-open {
	overflow: hidden;
}

/* ==========================================================================
   Admin Bar Adjustment
   ========================================================================== */

body.admin-bar .sbe-slideout-nav {
	top: 32px;
	height: calc(100vh - 32px);
	height: calc(100dvh - 32px);
}

body.admin-bar .sbe-slideout-overlay {
	top: 32px;
	height: calc(100% - 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar .sbe-slideout-nav {
		top: 46px;
		height: calc(100vh - 46px);
		height: calc(100dvh - 46px);
	}

	body.admin-bar .sbe-slideout-overlay {
		top: 46px;
		height: calc(100% - 46px);
	}
}

/* ==========================================================================
   Media Queries - Responsive
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
	:root {
		--sbe-slideout-width: 50vw;
	}
}

/* Mobile */
@media (max-width: 768px) {
	:root {
		--sbe-slideout-width: 100vw;
	}

	.sbe-slideout-inner {
		padding: 20px 15px;
	}

	.sbe-slideout-main-nav .sbe-slideout-menu li a {
		font-size: 20px;
		line-height: 45px;
	}

	.sbe-slideout-secondary-nav .sbe-slideout-menu li a {
		font-size: 15px;
		line-height: 38px;
	}

	/* Afficher le header mobile (croix + compte + langue) */
	.sbe-slideout-mobile-header {
		display: flex;
	}

	/* Masquer le bouton exit absolu sur mobile (il est dans le header) */
	.sbe-slideout-exit.sbe-slideout-exit-absolute {
		display: none;
	}

	/* Bouton exit dans le header mobile */
	.sbe-slideout-mobile-header .sbe-slideout-exit {
		position: static;
		padding: 0;
	}
}

/* Touch devices */
@media (hover: none) {
	.sbe-slideout-menu li a:active::before {
		transition: width 0.1s;
	}
}
