/* G3 Theme — Pop-up affiliation Lustery (habillage néo-brutaliste G3) */

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

.g3-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 10, 0.82);
	cursor: pointer;
}

.g3-popup__modal {
	position: relative;
	width: min(520px, 100%);
	max-height: 88vh;
	overflow-y: auto;
	box-sizing: border-box;
	background: var(--g3-paper);
	color: var(--g3-ink);
	border: var(--g3-border);
	border-radius: var(--g3-radius);
	box-shadow: var(--g3-shadow-12);
	padding: 44px 32px 26px;
	font-family: var(--g3-font-body);
	animation: g3-popup-in 0.3s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
@keyframes g3-popup-in {
	from { transform: translateY(14px); opacity: 0; }
	to   { transform: translateY(0); opacity: 1; }
}

.g3-popup__close {
	position: absolute;
	top: -2px;
	right: -2px;
	width: 44px;
	height: 44px;
	background: var(--g3-accent);
	color: var(--g3-paper);
	border: var(--g3-border);
	border-radius: 0;
	cursor: pointer;
	font-family: var(--g3-font-fat);
	font-size: 22px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}
.g3-popup__close:hover,
.g3-popup__close:focus-visible { background: var(--g3-ink); }

.g3-popup__title {
	font-family: var(--g3-font-display);
	font-size: 34px;
	line-height: 0.98;
	letter-spacing: -0.01em;
	text-align: center;
	color: var(--g3-ink);
	text-transform: uppercase;
	margin: 0 0 22px;
	padding: 4px 4px 0;
}

.g3-popup__media {
	border: var(--g3-border);
	border-radius: var(--g3-radius);
	overflow: hidden;
	margin-bottom: 22px;
	line-height: 0;
}
.g3-popup__media img {
	width: 100%;
	display: block;
}

.g3-popup__tagline {
	font-family: var(--g3-font-mono);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.4;
	color: var(--g3-accent);
	text-align: center;
	margin: 0 0 14px;
}

.g3-popup__text {
	font-family: var(--g3-font-body);
	font-size: 16px;
	line-height: 1.5;
	text-align: center;
	color: var(--g3-ink);
	margin: 0 0 24px;
}

.g3-popup__cta {
	display: block;
	width: fit-content;
	max-width: 100%;
	background: var(--g3-accent2);
	color: var(--g3-ink);
	text-align: center;
	font-family: var(--g3-font-fat);
	font-size: 16px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 16px 36px;
	border: var(--g3-border);
	border-radius: var(--g3-radius);
	box-shadow: var(--g3-shadow-6);
	text-decoration: none;
	margin: 0 auto 18px;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.g3-popup__cta:hover,
.g3-popup__cta:focus-visible {
	transform: translate(-2px, -2px);
	box-shadow: var(--g3-shadow-8);
}

.g3-popup__free {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	justify-content: center;
	gap: 18px;
	flex-wrap: wrap;
	font-family: var(--g3-font-mono);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--g3-ink);
}
.g3-popup__free li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.g3-popup__free li::before {
	content: "\2713";
	width: 18px;
	height: 18px;
	background: var(--g3-accent2);
	border: var(--g3-border);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	color: var(--g3-ink);
	flex-shrink: 0;
}

.g3-popup__dismiss {
	display: block;
	margin: 16px auto 0;
	background: none;
	border: none;
	cursor: pointer;
	font-family: var(--g3-font-mono);
	font-size: 12px;
	letter-spacing: 0.02em;
	color: var(--g3-ink-soft);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.g3-popup__dismiss:hover,
.g3-popup__dismiss:focus-visible { color: var(--g3-ink); }

/* Mobile */
@media (max-width: 600px) {
	.g3-popup { padding: 14px; }
	.g3-popup__modal { padding: 38px 20px 22px; box-shadow: var(--g3-shadow-6); }
	.g3-popup__title { font-size: 27px; }
	.g3-popup__cta { box-shadow: 5px 5px 0 var(--g3-ink); }
}

/* Accessibilité : respect du reduced-motion */
@media (prefers-reduced-motion: reduce) {
	.g3-popup__modal { animation: none; }
	.g3-popup__cta { transition: none; }
}
