/**
 * Popup : bandeau en bas de page (comme sur Wix) ou fenêtre centrée.
 * Fonds : dégradé La Lucarne (repris de Wix), blanc, lavande ou image.
 */

.ll-popup {
	position: fixed;
	z-index: 900;
	inset: auto 0 0;
	display: flex;
	justify-content: center;
	padding: 40px 24px;
	color: #303030;
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.ll-popup[hidden] {
	display: none;
}

.ll-popup.is-open {
	opacity: 1;
	transform: none;
}

/* ---------- Fonds ---------- */

.ll-popup--bg-gradient {
	background:
		radial-gradient(circle at 0% 100%, #97b49d 0%, 24%, rgba(151, 180, 157, 0) 24%),
		radial-gradient(circle at 4% 36%, #27784f 0%, 35%, rgba(39, 120, 79, 0) 35%),
		radial-gradient(circle at 27.5% 92.8%, #004623 0%, 40%, rgba(0, 70, 35, 0) 40%),
		radial-gradient(circle at 53.4% 100%, rgba(215, 53, 1, 0.99) 0%, 50%, rgba(215, 53, 1, 0) 50%),
		radial-gradient(circle at 42.3% 20.6%, #ff4401 0%, 70%, rgba(255, 68, 1, 0) 70%),
		radial-gradient(circle at 93.7% 11.4%, #ffb993 0%, 70%, rgba(255, 185, 147, 0) 70%),
		radial-gradient(circle at 48.9% 49.5%, #f0f0f0 0%, 100%, rgba(240, 240, 240, 0) 100%);
}

.ll-popup--bg-white {
	background: var(--wp--preset--color--white);
	border-top: 1px solid #303030;
}

.ll-popup--bg-lavender {
	background: var(--wp--preset--color--lavender);
}

.ll-popup--bg-image {
	background: #303030 var(--ll-popup-image) center / cover no-repeat;
}

/* ---------- Boîte ---------- */

.ll-popup__box {
	position: relative;
	width: min(887px, 100%);
	padding: 36px 64px 40px;
	text-align: center;
}

.ll-popup--bg-gradient .ll-popup__box,
.ll-popup--bg-image .ll-popup__box {
	background: rgba(255, 255, 255, 0.45);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.ll-popup__content > * + * {
	margin-top: 16px;
}

.ll-popup__content :where(h1, h2, h3, h4) {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 25px;
	font-weight: 700;
	line-height: 1.25;
	color: #000;
}

.ll-popup__content p {
	max-width: 620px;
	margin-inline: auto;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 19px;
	font-weight: 400;
	line-height: 1.3;
}

.ll-popup__content .wp-block-buttons {
	justify-content: center;
	margin-top: 28px;
}

.ll-popup__content .wp-block-button.is-style-arrow .wp-block-button__link {
	background: #f0f0f0;
	border-color: #303030;
}

/* ---------- Fermeture ---------- */

.ll-popup__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: none;
	color: #000;
	cursor: pointer;
	appearance: none;
	transition: transform var(--wp--custom--transition), color var(--wp--custom--transition);
}

.ll-popup__close::before,
.ll-popup__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 30px;
	height: 2px;
	background: currentColor;
	transform: translate(-50%, -50%) rotate(45deg);
}

.ll-popup__close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.ll-popup__close:hover {
	color: var(--wp--preset--color--accent);
	transform: rotate(90deg);
}

.ll-popup__close:focus:not(:focus-visible) {
	outline: none;
}

/* ---------- Fenêtre centrée ---------- */

.ll-popup--center {
	inset: 0;
	align-items: center;
	padding: 24px;
	background-color: rgba(255, 255, 255, 0.5);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.ll-popup--center .ll-popup__box {
	width: min(640px, 100%);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
}

/* Fenêtre centrée : le fond choisi s'applique à la boîte, pas à tout l'écran. */
.ll-popup--center.ll-popup--bg-white,
.ll-popup--center.ll-popup--bg-lavender,
.ll-popup--center.ll-popup--bg-gradient,
.ll-popup--center.ll-popup--bg-image {
	background: rgba(255, 255, 255, 0.5);
	border: 0;
}

.ll-popup--center.ll-popup--bg-white .ll-popup__box {
	background: var(--wp--preset--color--white);
	border: 1px solid #303030;
}

.ll-popup--center.ll-popup--bg-lavender .ll-popup__box {
	background: var(--wp--preset--color--lavender);
}

.ll-popup--center.ll-popup--bg-gradient .ll-popup__box {
	background:
		linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.45)),
		radial-gradient(circle at 0% 100%, #97b49d 0%, 30%, rgba(151, 180, 157, 0) 30%),
		radial-gradient(circle at 10% 20%, #27784f 0%, 40%, rgba(39, 120, 79, 0) 40%),
		radial-gradient(circle at 55% 100%, #d73501 0%, 50%, rgba(215, 53, 1, 0) 50%),
		radial-gradient(circle at 60% 10%, #ff4401 0%, 60%, rgba(255, 68, 1, 0) 60%),
		radial-gradient(circle at 100% 20%, #ffb993 0%, 70%, rgba(255, 185, 147, 0) 70%),
		#f0f0f0;
}

.ll-popup--center.ll-popup--bg-image .ll-popup__box {
	background:
		linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.55)),
		#303030 var(--ll-popup-image) center / cover no-repeat;
}

/* ---------- Mobile ---------- */

@media (max-width: 781px) {
	.ll-popup {
		padding: 16px;
	}

	.ll-popup__box {
		padding: 44px 22px 28px;
	}

	.ll-popup__content :where(h1, h2, h3, h4) {
		font-size: 21px;
	}

	.ll-popup__content p {
		font-size: 15px;
	}

	.ll-popup__content .wp-block-button.is-style-arrow .wp-block-button__link {
		padding-inline: 16px;
		font-size: 13px;
		letter-spacing: 0.08em;
		white-space: nowrap;
	}

	.ll-popup__content .wp-block-buttons {
		margin-top: 20px;
	}

	.ll-popup__close {
		top: 6px;
		right: 6px;
	}

	.ll-popup__close::before,
	.ll-popup__close::after {
		width: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ll-popup {
		transform: none;
		transition: none;
	}
}
