/* Popups Vitrine. Posées par-dessus la page (position fixe) : aucun décalage du contenu. */

.vtr-pp {
	--vtr-pp-fond: #fff;
	--vtr-pp-texte: #14171f;
	--vtr-pp-filet: #e6e6e1;
	position: fixed;
	z-index: 9990;
	color: var(--vtr-pp-texte);
	font-weight: 300;
	line-height: 1.55;
}
.vtr-pp[hidden] {
	display: none;
}
.vtr-pp.is-fond-beige { --vtr-pp-fond: #f3f1ec; }
.vtr-pp.is-fond-encre { --vtr-pp-fond: #14171f; --vtr-pp-texte: #fff; --vtr-pp-filet: rgba(255, 255, 255, .2); }
.vtr-pp.is-fond-olive { --vtr-pp-fond: #4b5636; --vtr-pp-texte: #fff; --vtr-pp-filet: rgba(255, 255, 255, .25); }
.vtr-pp.is-fond-jaune { --vtr-pp-fond: #ffe200; }

.vtr-pp *,
.vtr-pp *::before,
.vtr-pp *::after {
	box-sizing: border-box;
}
.vtr-pp__boite {
	position: relative;
	background: var(--vtr-pp-fond);
	color: var(--vtr-pp-texte);
}
.vtr-pp__contenu > :first-child {
	margin-top: 0;
}
.vtr-pp__contenu > :last-child {
	margin-bottom: 0;
}
.vtr-pp__contenu :where(h1, h2, h3, h4, p, li, a:not(.wp-element-button)) {
	color: inherit;
}
.vtr-pp.is-fond-encre .wp-element-button:not(.has-background),
.vtr-pp.is-fond-olive .wp-element-button:not(.has-background) {
	background: #fff;
	color: #14171f;
	border-color: #fff;
}
.vtr-pp__fermer {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
	opacity: .7;
	transition: opacity .2s ease, background-color .2s ease;
}
.vtr-pp__fermer:hover,
.vtr-pp__fermer:focus-visible {
	opacity: 1;
	background: rgba(20, 23, 31, .06);
}
.vtr-pp.is-fond-encre .vtr-pp__fermer:hover,
.vtr-pp.is-fond-olive .vtr-pp__fermer:hover,
.vtr-pp.is-fond-encre .vtr-pp__fermer:focus-visible,
.vtr-pp.is-fond-olive .vtr-pp__fermer:focus-visible {
	background: rgba(255, 255, 255, .14);
}
.vtr-pp__fermer:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 2px;
}
.vtr-pp__boite:focus {
	outline: none;
}

/* ---------- Fenêtre centrale ---------- */
.vtr-pp--fenetre {
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.vtr-pp__voile {
	position: absolute;
	inset: 0;
	background: rgba(20, 23, 31, .45);
	opacity: 0;
	transition: opacity .3s ease;
}
.vtr-pp--fenetre .vtr-pp__boite {
	width: 100%;
	max-width: var(--vtr-pp-largeur, 560px);
	max-height: calc(100vh - 40px);
	max-height: calc(100dvh - 40px);
	overflow-y: auto;
	padding: clamp(28px, 4vw, 48px);
	box-shadow: 0 24px 60px rgba(20, 23, 31, .22);
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .3s ease, transform .35s cubic-bezier(.2, .7, .2, 1);
}
.vtr-pp--fenetre.is-ouverte .vtr-pp__voile {
	opacity: 1;
}
.vtr-pp--fenetre.is-ouverte .vtr-pp__boite {
	opacity: 1;
	transform: none;
}
/* Image collée aux bords en haut de la fenêtre (premier bloc image ou couverture). */
.vtr-pp--fenetre .vtr-pp__contenu > :is(.wp-block-image, .wp-block-cover):first-child {
	margin: calc(-1 * clamp(28px, 4vw, 48px)) calc(-1 * clamp(28px, 4vw, 48px)) 24px;
}
.vtr-pp--fenetre .vtr-pp__contenu > .wp-block-image:first-child img {
	display: block;
	width: 100%;
}
html.vtr-pp-fige {
	overflow: hidden;
}

/* ---------- Encart dans un coin ---------- */
.vtr-pp--coin {
	right: 20px;
	bottom: 20px;
	width: min(380px, calc(100vw - 40px));
}
.vtr-pp--coin .vtr-pp__boite {
	padding: 28px 28px 24px;
	border: 1px solid var(--vtr-pp-filet);
	box-shadow: 0 16px 44px rgba(20, 23, 31, .16);
	opacity: 0;
	transform: translateY(20px);
	transition: opacity .3s ease, transform .35s cubic-bezier(.2, .7, .2, 1);
}
.vtr-pp--coin.is-ouverte .vtr-pp__boite {
	opacity: 1;
	transform: none;
}

/* ---------- Bandeaux (bas ou haut), par-dessus la page ---------- */
.vtr-pp--bandeau-bas,
.vtr-pp--bandeau-haut {
	left: 0;
	right: 0;
}
.vtr-pp--bandeau-bas {
	bottom: 0;
}
.vtr-pp--bandeau-haut {
	top: var(--wp-admin--admin-bar--height, 0px);
}
.vtr-pp--bandeau-bas .vtr-pp__boite,
.vtr-pp--bandeau-haut .vtr-pp__boite {
	padding: 18px 64px 18px clamp(20px, 4vw, 48px);
	box-shadow: 0 -8px 30px rgba(20, 23, 31, .12);
	transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}
.vtr-pp--bandeau-bas .vtr-pp__boite {
	transform: translateY(100%);
}
.vtr-pp--bandeau-haut .vtr-pp__boite {
	box-shadow: 0 8px 30px rgba(20, 23, 31, .12);
	transform: translateY(-100%);
}
.vtr-pp--bandeau-bas.is-ouverte .vtr-pp__boite,
.vtr-pp--bandeau-haut.is-ouverte .vtr-pp__boite {
	transform: none;
}
.vtr-pp--bandeau-bas .vtr-pp__fermer,
.vtr-pp--bandeau-haut .vtr-pp__fermer {
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
}
/* Contenu du bandeau sur une ligne quand il y a la place (texte, puis bouton). */
.vtr-pp--bandeau-bas .vtr-pp__contenu,
.vtr-pp--bandeau-haut .vtr-pp__contenu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 24px;
	text-align: center;
}
.vtr-pp--bandeau-bas .vtr-pp__contenu > *,
.vtr-pp--bandeau-haut .vtr-pp__contenu > * {
	margin: 0;
}

@media (max-width: 600px) {
	.vtr-pp--coin {
		right: 12px;
		left: 12px;
		bottom: 12px;
		width: auto;
	}
	.vtr-pp--bandeau-bas .vtr-pp__boite,
	.vtr-pp--bandeau-haut .vtr-pp__boite {
		padding: 16px 52px 16px 20px;
	}
	.vtr-pp--bandeau-bas .vtr-pp__contenu,
	.vtr-pp--bandeau-haut .vtr-pp__contenu {
		justify-content: flex-start;
		text-align: left;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vtr-pp *,
	.vtr-pp__voile {
		transition: none !important;
	}
}
