/*
 * Fenêtre de redirection vers La Vie du Rail (lot R66, tâches Odoo 198 et 197 ; includes/class-lvdr-fenetre-bascule.php).
 * Dessin de la maquette de Pierre (27/10/2026), réécrit sous le préfixe .lvdr-fenetre-bascule. Chargée sur Rail Passion
 * et En Train seulement. Couleurs de la maquette par site (exception voulue à la règle « couleurs du kit » : la maquette
 * les fixe) ; surface blanche de jour comme de nuit (illustration dessinée pour un fond clair), voile plus sombre la nuit.
 * !important sur ce que le thème impose aux <h2>, <p> et <button> (feuille chargée avant celles du thème).
 */
.lvdr-fenetre-bascule {
	--lvdr-fb-accent: #0B2A5B;
	--lvdr-fb-sur-accent: #FFFFFF;
	--lvdr-fb-texte: #1E1E1E;
	align-items: center;
	background: rgba(0, 0, 0, .55);
	box-sizing: border-box;
	display: flex;
	inset: 0;
	justify-content: center;
	opacity: 0;
	padding: 16px;
	position: fixed;
	transition: opacity .2s ease;
	z-index: 2147483000;
}

.lvdr-fenetre-bascule.lvdr-fenetre-bascule--en-train {
	--lvdr-fb-accent: #FFB800;
	--lvdr-fb-sur-accent: #1E1E1E;
}

.lvdr-fenetre-bascule[hidden] {
	display: none !important;
}

.lvdr-fenetre-bascule.is-open {
	opacity: 1;
}

html.cmsmasters-mode-switcher-active .lvdr-fenetre-bascule {
	background: rgba(0, 0, 0, .72);
}

.lvdr-fenetre-bascule .lvdr-fenetre-bascule__dialogue {
	-webkit-overflow-scrolling: touch;
	background: #FFFFFF;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
	box-sizing: border-box;
	color: var(--lvdr-fb-texte);
	font-family: inherit;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	max-width: 720px;
	overflow-y: auto;
	padding: clamp(24px, 5vw, 44px) clamp(20px, 5vw, 48px);
	position: relative;
	text-align: center;
	transform: translateY(12px) scale(.98);
	transition: transform .25s ease;
	width: 100%;
}

.lvdr-fenetre-bascule.is-open .lvdr-fenetre-bascule__dialogue {
	transform: none;
}

/* Piège du thème : Glossier peint le remplissage des <button> dans un calque ::before/::after. */
.lvdr-fenetre-bascule button::before,
.lvdr-fenetre-bascule button::after {
	content: none !important;
	display: none !important;
}

.lvdr-fenetre-bascule .lvdr-fenetre-bascule__fermer {
	align-items: center !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	color: #666666 !important;
	cursor: pointer;
	display: inline-flex !important;
	font-family: inherit !important;
	font-size: 28px !important;
	font-weight: 400 !important;
	height: 44px !important;
	justify-content: center !important;
	letter-spacing: 0 !important;
	line-height: 1 !important;
	margin: 0 !important;
	min-height: 0 !important;
	min-width: 0 !important;
	padding: 0 !important;
	position: absolute;
	right: 8px;
	text-transform: none !important;
	top: 8px;
	width: 44px !important;
}

.lvdr-fenetre-bascule .lvdr-fenetre-bascule__fermer:hover,
.lvdr-fenetre-bascule .lvdr-fenetre-bascule__fermer:focus {
	background: #F2F2F2 !important;
	color: #1E1E1E !important;
}

.lvdr-fenetre-bascule .lvdr-fenetre-bascule__illu {
	display: block;
	height: auto;
	margin: 0 auto;
	width: 100%;
}

.lvdr-fenetre-bascule .lvdr-fenetre-bascule__illu--haute {
	display: none;
	max-width: min(260px, 28vh);
	max-width: min(260px, 28dvh);
}

.lvdr-fenetre-bascule .lvdr-fenetre-bascule__titre {
	color: var(--lvdr-fb-texte) !important;
	font-family: inherit !important;
	font-size: clamp(20px, 4.6vw, 26px) !important;
	font-style: normal !important;
	font-weight: 700 !important;
	letter-spacing: 0 !important;
	line-height: 1.3 !important;
	margin: 18px 0 12px !important;
	text-transform: none !important;
}

.lvdr-fenetre-bascule .lvdr-fenetre-bascule__texte {
	color: #333333 !important;
	font-family: inherit !important;
	font-size: clamp(15px, 3.8vw, 17px) !important;
	line-height: 1.55 !important;
	margin: 0 0 26px !important;
}

.lvdr-fenetre-bascule .lvdr-fenetre-bascule__texte strong {
	color: inherit !important;
	font-weight: 700 !important;
}

.lvdr-fenetre-bascule .lvdr-fenetre-bascule__bouton {
	align-items: center !important;
	background: var(--lvdr-fb-accent) !important;
	border: 0 !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	color: var(--lvdr-fb-sur-accent) !important;
	cursor: pointer;
	display: inline-flex !important;
	font-family: inherit !important;
	font-size: 17px !important;
	font-weight: 700 !important;
	justify-content: center !important;
	letter-spacing: 0 !important;
	line-height: 1.2 !important;
	margin: 0 !important;
	min-height: 48px !important;
	min-width: 200px !important;
	padding: 12px 34px !important;
	text-transform: none !important;
	transition: filter .15s ease, transform .15s ease;
}

.lvdr-fenetre-bascule .lvdr-fenetre-bascule__bouton:hover,
.lvdr-fenetre-bascule .lvdr-fenetre-bascule__bouton:focus {
	background: var(--lvdr-fb-accent) !important;
	color: var(--lvdr-fb-sur-accent) !important;
	filter: brightness(1.1);
}

.lvdr-fenetre-bascule .lvdr-fenetre-bascule__bouton:active {
	transform: scale(.98);
}

.lvdr-fenetre-bascule .lvdr-fenetre-bascule__bouton:focus-visible,
.lvdr-fenetre-bascule .lvdr-fenetre-bascule__fermer:focus-visible {
	outline: 3px solid #E3262F !important;
	outline-offset: 3px;
}

.lvdr-fenetre-bascule .lvdr-fenetre-bascule__chevron {
	animation: lvdr-fenetre-bascule-pulse 1.2s infinite ease-in-out;
}

.lvdr-fenetre-bascule .lvdr-fenetre-bascule__chevron--1 {
	animation-delay: .2s;
}

.lvdr-fenetre-bascule .lvdr-fenetre-bascule__chevron--2 {
	animation-delay: .4s;
}

@keyframes lvdr-fenetre-bascule-pulse {
	0%,
	100% {
		opacity: .25;
	}

	50% {
		opacity: 1;
	}
}

html.lvdr-fenetre-bascule-ouverte,
html.lvdr-fenetre-bascule-ouverte body {
	overflow: hidden !important;
}

@media (max-width: 600px) {
	.lvdr-fenetre-bascule .lvdr-fenetre-bascule__illu--large {
		display: none;
	}

	.lvdr-fenetre-bascule .lvdr-fenetre-bascule__illu--haute {
		display: block;
	}

	.lvdr-fenetre-bascule .lvdr-fenetre-bascule__bouton {
		width: 100% !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lvdr-fenetre-bascule,
	.lvdr-fenetre-bascule .lvdr-fenetre-bascule__dialogue,
	.lvdr-fenetre-bascule .lvdr-fenetre-bascule__bouton {
		transition: none;
	}

	.lvdr-fenetre-bascule .lvdr-fenetre-bascule__chevron {
		animation: none;
		opacity: 1;
	}
}
