/*
 * IA & Marketing — Produits numériques
 * Styles de la modale de paiement [iem_checkout].
 * Le thème "custom" ne définit volontairement que des variables neutres :
 * il est destiné à être surchargé par la classe CSS de la landing page,
 * sans modification du plugin.
 */

.iem-checkout-wrapper {
	--iem-font: "Poppins", Arial, sans-serif;
	--iem-bg: #001f39;
	--iem-card-from: #07395e;
	--iem-card-to: #001629;
	--iem-cyan: #38d0ff;
	--iem-orange: #ff6100;
	--iem-white: #ffffff;
	--iem-text: rgba(255, 255, 255, 0.82);
	--iem-text-soft: rgba(255, 255, 255, 0.6);
	--iem-line: rgba(255, 255, 255, 0.16);
	--iem-radius: 8px;
	display: inline-block;
}

.iem-checkout-trigger {
	font-family: var(--iem-font);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--iem-orange);
	color: var(--iem-white);
	border: none;
	border-radius: var(--iem-radius);
	padding: 15px 26px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	min-height: 52px;
	transition: transform 0.2s ease, background 0.2s ease;
}

.iem-checkout-trigger:hover {
	background: #dc5300;
	transform: translateY(-2px);
}

.iem-checkout-trigger:focus-visible {
	outline: 3px solid var(--iem-cyan);
	outline-offset: 2px;
}

/* Overlay + dialog ------------------------------------------------------ */

.iem-checkout-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 8, 16, 0.62);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	font-family: var(--iem-font);
}

.iem-checkout-overlay.iem-is-open {
	display: flex;
}

.iem-checkout-dialog {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: 92vh;
	overflow-y: auto;
	background: linear-gradient(145deg, var(--iem-card-from), var(--iem-card-to));
	border: 1px solid var(--iem-cyan);
	border-radius: var(--iem-radius);
	box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
	padding: 40px 32px 32px;
	color: var(--iem-white);
}

.iem-checkout-dialog::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	border-radius: var(--iem-radius);
	background-image:
		linear-gradient(rgba(56, 208, 255, 0.05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(56, 208, 255, 0.05) 1px, transparent 1px);
	background-size: 28px 28px;
	-webkit-mask-image: linear-gradient(180deg, transparent, #000 15%, #000 85%, transparent);
	mask-image: linear-gradient(180deg, transparent, #000 15%, #000 85%, transparent);
}

.iem-checkout-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid var(--iem-line);
	background: rgba(255, 255, 255, 0.06);
	color: var(--iem-white);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}

.iem-checkout-close:hover {
	background: rgba(255, 255, 255, 0.14);
}

.iem-checkout-header {
	position: relative;
	z-index: 1;
	text-align: center;
	margin-bottom: 18px;
}

.iem-checkout-eyebrow {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: var(--iem-cyan);
}

.iem-checkout-header h2 {
	margin: 0;
	font-size: 24px;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.iem-checkout-subtitle {
	margin: 10px auto 0;
	max-width: 380px;
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--iem-text);
}

.iem-checkout-product {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	border: 1px solid var(--iem-line);
	border-radius: var(--iem-radius);
	padding: 12px 16px;
	margin: 18px 0 6px;
	background: rgba(255, 255, 255, 0.04);
}

.iem-checkout-product-name {
	font-size: 13px;
	font-weight: 600;
}

.iem-checkout-product-price {
	font-size: 15px;
	font-weight: 800;
	color: var(--iem-cyan);
}

.iem-checkout-reassurance {
    position: relative;
    z-index: 1;
    margin: 12px 0 4px;
    text-align: center !important;
    font-size: 10.5px !important;
    color: var(--iem-text-soft);
}

.iem-checkout-form {
	position: relative;
	z-index: 1;
	margin-top: 14px;
}

.iem-checkout-field {
	margin-bottom: 14px;
}

.iem-checkout-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 12.5px;
	font-weight: 600;
}

.iem-checkout-email {
	width: 100%;
	box-sizing: border-box;
	font-family: var(--iem-font);
	font-size: 14px;
	color: var(--iem-white);
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(56, 208, 255, 0.42);
	border-radius: var(--iem-radius);
	padding: 12px 14px;
}

.iem-checkout-email::placeholder {
	color: rgba(255, 255, 255, 0.5);
}

.iem-checkout-email:focus {
	outline: none;
	border-color: var(--iem-cyan);
	box-shadow: 0 0 0 3px rgba(56, 208, 255, 0.15);
}

.iem-checkout-payment-element {
	margin: 4px 0 16px;
	padding: 12px;
	border: 1px solid rgba(56, 208, 255, 0.3);
	border-radius: var(--iem-radius);
	background: rgba(255, 255, 255, 0.03);
	min-height: 44px;
}

.iem-checkout-terms label {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-size: 12px;
	line-height: 1.5;
	color: var(--iem-text);
	font-weight: 400;
	cursor: pointer;
}

.iem-checkout-terms input[type="checkbox"] {
	margin-top: 3px;
	accent-color: var(--iem-cyan);
}

.iem-checkout-terms a {
	color: var(--iem-cyan);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.iem-checkout-error {
	margin: 4px 0 14px;
	padding: 10px 12px;
	border-radius: var(--iem-radius);
	border: 1px solid rgba(255, 97, 0, 0.5);
	background: rgba(255, 97, 0, 0.1);
	color: #ffd7bd;
	font-size: 12.5px;
	line-height: 1.5;
}

.iem-checkout-status {
	margin: 4px 0 14px;
	font-size: 12.5px;
	color: var(--iem-text);
	text-align: center;
}

.iem-checkout-submit {
	width: 100% !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: var(--iem-orange);
	color: var(--iem-white);
	border: none;
	border-radius: 10px !important;
	font-family: var(--iem-font);
	font-size: 15px;
	font-weight: 800;
	min-height: 52px;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.iem-checkout-submit:hover {
	background: #dc5300;
}

.iem-checkout-submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.iem-checkout-spinner {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: var(--iem-white);
	animation: iem-spin 0.7s linear infinite;
}

@keyframes iem-spin {
	to {
		transform: rotate(360deg);
	}
}

.iem-checkout-legal {
	margin: 10px 0 0;
	text-align: center;
	font-size: 10.5px;
	line-height: 1.5;
	color: var(--iem-text-soft);
}

.iem-checkout-success {
	position: relative;
	z-index: 1;
	text-align: center;
	padding: 10px 4px 4px;
}

.iem-checkout-success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: rgba(56, 208, 255, 0.12);
	border: 1px solid var(--iem-cyan);
	color: var(--iem-cyan);
	font-size: 24px;
	margin-bottom: 14px;
}

.iem-checkout-success h3 {
	margin: 0 0 8px;
	font-size: 19px;
}

.iem-checkout-success p {
	margin: 0;
	font-size: 13px;
	color: var(--iem-text);
	line-height: 1.55;
}

@media (max-width: 560px) {
	.iem-checkout-dialog {
		padding: 34px 20px 26px;
	}
}

/* Thème "minimal" -------------------------------------------------------- */

.iem-theme-minimal .iem-checkout-dialog {
	--iem-card-from: #ffffff;
	--iem-card-to: #f4f6f8;
	--iem-cyan: #2f6fed;
	--iem-orange: #111827;
	color: #111827;
	border-color: #d7dce3;
}

.iem-theme-minimal .iem-checkout-eyebrow,
.iem-theme-minimal .iem-checkout-product-price {
	color: #2f6fed;
}

.iem-theme-minimal .iem-checkout-subtitle,
.iem-theme-minimal .iem-checkout-reassurance,
.iem-theme-minimal .iem-checkout-legal,
.iem-theme-minimal .iem-checkout-terms label,
.iem-theme-minimal .iem-checkout-status {
	color: #4b5563;
}

.iem-theme-minimal .iem-checkout-dialog::before {
	display: none;
}

.iem-theme-minimal .iem-checkout-email,
.iem-theme-minimal .iem-checkout-payment-element {
	background: #ffffff;
	border-color: #d7dce3;
	color: #111827;
}

.iem-theme-minimal .iem-checkout-close {
	border-color: #d7dce3;
	background: #ffffff;
	color: #111827;
}

.iem-theme-minimal .iem-checkout-submit,
.iem-theme-minimal .iem-checkout-trigger {
	background: #111827;
}

.iem-theme-minimal .iem-checkout-submit:hover,
.iem-theme-minimal .iem-checkout-trigger:hover {
	background: #000000;
}

/* Thème "sales-dark" ------------------------------------------------------ */

.iem-theme-sales-dark .iem-checkout-dialog {
	--iem-card-from: #1a0f07;
	--iem-card-to: #0a0603;
	--iem-cyan: #ffb545;
	--iem-orange: #ff6100;
	border-color: #ffb545;
}

.iem-theme-sales-dark .iem-checkout-payment-element,
.iem-theme-sales-dark .iem-checkout-product {
	border-color: rgba(255, 181, 69, 0.35);
}

.iem-theme-sales-dark .iem-checkout-email {
	border-color: rgba(255, 181, 69, 0.4);
}

/* Thème "custom" ----------------------------------------------------------
 * Volontairement sans surcharge : ajoutez une classe via l'attribut
 * "class" du shortcode et stylez-la depuis le CSS de votre landing page.
 */