/*
 * Leçon offerte au départ du visiteur. Reprend la bande verte de l'optin,
 * en carte centrée : photo du produit d'un côté, formulaire de l'autre.
 */

.cdsc-popup {
	position: fixed;
	inset: 0;
	z-index: 1200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--edge);
}

.cdsc-popup[hidden] {
	display: none;
}

.cdsc-popup-fond {
	position: absolute;
	inset: 0;
	background: rgba(12, 22, 17, .82);
	backdrop-filter: blur(3px);
	animation: cdsc-popup-fondu .25s ease both;
}

.cdsc-popup-carte {
	position: relative;
	display: grid;
	grid-template-columns: 260px 1fr;
	width: min(880px, 100%);
	max-height: calc(100vh - 2 * var(--edge));
	overflow: auto;
	border-radius: 20px;
	background: var(--forest-2);
	color: #fff;
	/* La fiche produit est elle-même vert forêt : sans ce liseré, la carte s'y fond. */
	outline: 1px solid rgba(231, 162, 58, .28);
	box-shadow: 0 40px 90px -30px rgba(10, 24, 17, .85);
	animation: cdsc-popup-monte .3s cubic-bezier(.2, .8, .3, 1) both;
}

.cdsc-popup-photo {
	background-size: cover;
	background-position: center;
	min-height: 320px;
}

.cdsc-popup-corps {
	padding: clamp(26px, 3.4vw, 40px);
}

.cdsc-popup-corps .cdsc-eyebrow {
	color: var(--honey);
}

.cdsc-popup-corps h2 {
	font-family: var(--display);
	font-weight: 600;
	font-size: clamp(1.5rem, 3vw, 2rem);
	line-height: 1.15;
	margin: 0 0 .5em;
	color: #fff;
}

.cdsc-popup-corps h2 em {
	font-style: italic;
	color: var(--honey);
}

.cdsc-popup-sub {
	font-family: var(--body);
	color: #DCEAE0;
	margin: 0 0 1.4em;
	max-width: 42ch;
}

.cdsc-popup-form {
	display: flex;
	gap: 10px;
}

.cdsc-popup-form .cdsc-field {
	flex: 1;
	min-width: 0;
	border: none;
	margin: 0;
}

.cdsc-popup-fine {
	color: #9FB6A6;
	font-size: .76rem;
	margin: 12px 0 0;
}

.cdsc-popup-croix {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	/* En mobile la croix passe au-dessus de la photo : fond sombre obligatoire. */
	background: rgba(12, 22, 17, .55);
	color: #fff;
	cursor: pointer;
	transition: background .15s ease;
}

.cdsc-popup-croix:hover {
	background: rgba(12, 22, 17, .8);
}

@keyframes cdsc-popup-fondu {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes cdsc-popup-monte {
	from { opacity: 0; transform: translateY(14px) scale(.985); }
	to   { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
	.cdsc-popup-carte {
		grid-template-columns: 1fr;
	}

	.cdsc-popup-photo {
		min-height: 132px;
	}

	.cdsc-popup-form {
		flex-direction: column;
	}

	.cdsc-popup-form .cdsc-btn {
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cdsc-popup-fond,
	.cdsc-popup-carte {
		animation: none;
	}
}
