/* ============================================================
   Popup maison — remplace Lightview (mode iframe) sur mobile.
   Carte centrée en position absolute + translate(-50%,-50%) (pas de
   flexbox sur l'overlay) : centrage garanti quelle que soit la taille
   de la carte, insensible aux quirks de dimensionnement flex-item.
   Coins arrondis + ombre douce (reprend les codes visuels du skin
   "light" Lightview actuel).
   Tailles en clamp() : fluide entre mobile et desktop, plafonné
   sur grand écran pour rester lisible (jamais du vw brut sans cap).
   ============================================================ */

.popup-maison-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	transition: opacity 200ms ease-out;
}

.popup-maison-overlay.is-open {
	opacity: 1;
}

.popup-maison-card {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.96);
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	overflow: hidden;
	transition: transform 220ms ease-out;
	display: flex;
	box-sizing: border-box;
}

.popup-maison-overlay.is-open .popup-maison-card {
	transform: translate(-50%, -50%) scale(1);
}

.popup-maison-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: #9F0070;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.popup-maison-close:hover {
	background: #7a0057;
}

.popup-maison-iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

/* --- Mode image (remplace le mode image de Lightview) --- */

.popup-maison-card.popup--image {
	background: transparent;
	box-shadow: none;
	border-radius: 10px;
	width: auto;
	height: auto;
}

.popup-maison-image {
	display: block;
	max-width: 95vw;
	max-height: 90dvh;
	border-radius: 10px;
}

/* Badge d'invite tap-to-flip (tactile uniquement, injecté par cartes-tirage-hover.js) */
.popup-flip-hint {
	position: absolute;
	left: 50%;
	bottom: 14px;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font-size: 0.85rem;
	padding: 6px 14px;
	border-radius: 999px;
	white-space: nowrap;
	pointer-events: none;
	animation: popup-flip-hint-pulse 1.8s ease-in-out infinite;
}

@keyframes popup-flip-hint-pulse {
	0%, 100% { opacity: 0.9; }
	50% { opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
	.popup-flip-hint {
		animation: none;
	}
}

/* --- Variantes (tailles), une seule fois par preset ---
   width/height en clamp(plancher, préféré-fluide, plafond) :
   suit 90vw/dvh sur mobile/tablette, se fige au plafond desktop. */

.popup--sceau {
	width: clamp(320px, 90vw, 800px);
	height: clamp(420px, 88dvh, 760px);
}

.popup--connexion {
	width: clamp(300px, 90vw, 600px);
	height: clamp(360px, 85dvh, 450px);
}

.popup--audio {
	width: clamp(300px, 90vw, 480px);
	height: clamp(360px, 82dvh, 430px);
	border-radius: 14px; /* radius:20 côté Lightview d'origine (vs 30 pour les autres) */
}

.popup--newsletter {
	width: clamp(300px, 90vw, 560px);
	height: clamp(200px, 40dvh, 260px);
}

.popup--citation {
	width: clamp(300px, 90vw, 700px);
	height: clamp(360px, 85dvh, 640px);
}

/* Sceau sur mobile : petite marge tout autour pour que le cadre arrondi
   reste entièrement visible à l'écran (même esprit que desktop/tablette,
   le fond rose du dessous structure la page plutôt que de la parasiter). */
@media (max-width: 600px) {
	.popup--sceau {
		width: calc(100vw - 24px);
		height: calc(100dvh - 24px);
		max-width: calc(100vw - 24px);
		border-radius: 20px;
	}
	/* Coin droit trop proche du bord/encoche sur certains mobiles,
	   on décale juste la position à gauche — même style (rond plein, croix blanche) qu'ailleurs. */
	.popup-maison-overlay--sceau .popup-maison-close {
		top: 16px;
		right: auto;
		left: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.popup-maison-overlay,
	.popup-maison-card {
		transition: opacity 120ms linear;
		transform: none !important;
	}
}
