/**
 * Popup d’accueil — overlay plein écran.
 */

.flash-home-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(1rem, 4vh, 2.5rem) clamp(1rem, 4vw, 2rem);
	box-sizing: border-box;
}

.flash-home-popup[hidden] {
	display: none !important;
}

.flash-home-popup.is-open {
	display: flex;
}

.flash-home-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
	cursor: pointer;
}

.flash-home-popup__panel {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: min(92vw, 56rem);
	max-height: calc(100vh - clamp(2rem, 8vh, 5rem));
	width: auto;
}

.flash-home-popup__close {
	position: absolute;
	top: -0.35rem;
	right: -0.35rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(245, 245, 245, 0.35);
	border-radius: 9999px;
	background: #0e0e0e;
	color: #f5f5f5;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	transform: translate(35%, -35%);
}

.flash-home-popup__close:hover,
.flash-home-popup__close:focus-visible {
	background: #f5f5f5;
	color: #0e0e0e;
	border-color: #f5f5f5;
	outline: none;
}

.flash-home-popup__close-icon {
	display: block;
	margin-top: -0.1em;
}

.flash-home-popup__media,
.flash-home-popup__link {
	display: block;
	max-width: 100%;
	max-height: inherit;
	line-height: 0;
}

.flash-home-popup__link {
	cursor: pointer;
	text-decoration: none;
}

.flash-home-popup__image {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - clamp(2rem, 8vh, 5rem));
	width: auto;
	height: auto;
	object-fit: contain;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

@media (max-width: 640px) {
	.flash-home-popup__close {
		top: 0;
		right: 0;
		transform: translate(20%, -20%);
		width: 2.25rem;
		height: 2.25rem;
		font-size: 1.5rem;
	}
}

body.flash-home-popup-open {
	overflow: hidden;
}
