/* Vénètes – Popup : coquille seulement (le contenu a son propre CSS, saisi dans l'onglet Popup) */

.vpop {
	--vpop-max: 900px;
	--vpop-bg: #faf8f4;
	--vpop-veil: rgba( 22, 20, 17, 0.62 );

	position: fixed;
	inset: 0;
	z-index: 99990; /* sous le loader (999999) et le bandeau cookies */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
}

.vpop[hidden] {
	display: none !important;
}

.vpop *,
.vpop *::before,
.vpop *::after {
	box-sizing: border-box;
}

.vpop-backdrop {
	position: absolute;
	inset: 0;
	background: var( --vpop-veil );
	opacity: 0;
	transition: opacity 0.45s ease;
}

.vpop-dialog {
	position: relative;
	width: 100%;
	max-width: var( --vpop-max );
	max-height: calc( 100vh - 48px );
	overflow: auto;
	overscroll-behavior: contain;
	background: var( --vpop-bg );
	box-shadow: 0 30px 80px rgba( 0, 0, 0, 0.35 );
	outline: none;
	opacity: 0;
	transform: translateY( 18px );
	transition: opacity 0.45s ease, transform 0.55s cubic-bezier( 0.22, 1, 0.36, 1 );
}

.vpop.is-open .vpop-backdrop {
	opacity: 1;
}

.vpop.is-open .vpop-dialog {
	opacity: 1;
	transform: none;
}

.vpop-body > :first-child {
	margin-top: 0;
}

.vpop-body > :last-child {
	margin-bottom: 0;
}

.vpop-body img {
	max-width: 100%;
	height: auto;
}

/* ---------- Bouton fermer (neutralise les styles de bouton du thème) ---------- */

.vpop .vpop-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0 !important;
	margin: 0 !important;
	border-top: 0 !important;
	border-right: 0 !important;
	border-bottom: 0 !important;
	border-left: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: #1f1d1a !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background 0.2s ease;
}

.vpop .vpop-close:hover,
.vpop .vpop-close:focus-visible {
	background: rgba( 0, 0, 0, 0.06 ) !important;
}

/* ---------- Variante « en bas à droite » (pas de voile, page utilisable) ---------- */

.vpop--corner {
	inset: auto 24px 24px auto;
	padding: 0;
	width: min( var( --vpop-max ), calc( 100vw - 48px ) );
}

.vpop--corner .vpop-dialog {
	max-height: calc( 100vh - 48px );
}

/* Défilement de la page bloqué pendant l'ouverture (mode centré). */
html.vpop-lock,
html.vpop-lock body {
	overflow: hidden !important;
}

@media ( max-width: 720px ) {
	.vpop {
		padding: 16px;
	}

	.vpop-dialog {
		max-height: calc( 100vh - 32px );
		max-height: calc( 100dvh - 32px );
	}

	.vpop .vpop-close {
		top: 8px;
		right: 8px;
		background: rgba( 255, 255, 255, 0.92 ) !important;
	}

	.vpop .vpop-close:hover,
	.vpop .vpop-close:focus-visible {
		background: #ffffff !important;
	}

	.vpop--corner {
		inset: auto 16px 16px 16px;
		width: auto;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.vpop-backdrop,
	.vpop-dialog {
		transition: none;
	}
}
