/* G2 Theme : Pop-up affiliation Lustery (DA Riso Zine).
   Déclenchement à 50 % de scroll, 1× par session (cf. assets/js/popup.js). */

.g2-popup {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.g2-popup[hidden] { display: none; }

.g2-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(26, 26, 26, .62);
}

.g2-popup__modal {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: calc(100vh - 56px);
	overflow-y: auto;
	background: var(--g2-white);
	border: var(--g2-bd);
	box-shadow: var(--g2-sh-blue-8);
	padding: 44px 28px 26px;
	text-align: center;
	animation: g2-popup-in .28s cubic-bezier(.16,.84,.44,1) both;
}

@keyframes g2-popup-in {
	from { opacity: 0; transform: translateY(18px) rotate(-1deg); }
	to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.g2-popup__modal { animation: none; }
}

/* --- Fermeture ---
   Dans la carte (et non en débordement) : l'overflow-y de la modale
   rognerait un bouton posé à l'extérieur. */
.g2-popup__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--g2-font-body);
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
	color: var(--g2-ink);
	background: var(--g2-pink);
	border: var(--g2-bd);
	cursor: pointer;
	padding: 0 0 2px;
}
.g2-popup__close:hover { background: var(--g2-ink); color: #fff; }

/* --- Contenu --- */
.g2-popup__title {
	font-family: var(--g2-font-display);
	font-weight: 400;
	font-size: 32px;
	line-height: 1;
	color: var(--g2-blue);
	text-shadow: 3px 3px 0 var(--g2-pink);
	margin: 0 0 22px;
	text-wrap: balance;
}

.g2-popup__media {
	border: var(--g2-bd);
	overflow: hidden;
	margin-bottom: 18px;
	line-height: 0;
	transform: rotate(-1deg);
}
.g2-popup__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1024 / 282;
}

.g2-popup__tagline {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	text-transform: lowercase;
	color: var(--g2-ink);
	background: var(--g2-pink);
	padding: 6px 12px;
	margin: 0 0 14px;
	transform: rotate(-1.5deg);
}

.g2-popup__text {
	font-size: 13.5px;
	line-height: 1.7;
	color: var(--g2-ink);
	margin: 0 0 20px;
}

.g2-popup__cta {
	display: block;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	text-transform: lowercase;
	text-decoration: none;
	color: #fff;
	background: var(--g2-blue);
	padding: 14px 20px;
	margin-right: 4px;
	box-shadow: var(--g2-sh-pink-4);
	transition: background-color .15s ease;
}
.g2-popup__cta:hover { background: var(--g2-ink); color: #fff; }

.g2-popup__free {
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
	font-size: 11px;
	text-transform: lowercase;
	color: var(--g2-muted);
}
.g2-popup__free li::before { content: '+ '; color: var(--g2-blue); font-weight: 700; }

.g2-popup__dismiss {
	display: block;
	margin: 14px auto 0;
	padding: 0;
	background: none;
	border: 0;
	font-family: var(--g2-font-body);
	font-size: 13px;
	font-weight: 700;
	text-transform: lowercase;
	color: var(--g2-ink);
	text-decoration: underline;
	text-decoration-color: var(--g2-pink);
	text-decoration-thickness: 3px;
	text-underline-offset: 4px;
	cursor: pointer;
}
.g2-popup__dismiss:hover { color: var(--g2-blue); }

@media (max-width: 480px) {
	.g2-popup { padding: 16px; }
	.g2-popup__modal { padding: 42px 20px 22px; box-shadow: 6px 6px 0 var(--g2-blue); }
	.g2-popup__title { font-size: 27px; }
}
