/* Pop-up Ouverture — styles (la police est héritée du thème). */

.lfpo-root {
	--lfpo-ink: #15213b;
	--lfpo-blue: #1f4f8f;
	--lfpo-blue-dark: #173d70;
	--lfpo-amber: #b9803a;
	--lfpo-amber-soft: #f8f1e7;
	--lfpo-muted: #5a6376;
	--lfpo-line: #e6e8ee;
	--lfpo-soft: #f5f6f9;
	--lfpo-radius: 20px;
	--lfpo-radius-sm: 12px;

	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	font-family: inherit;
	color: var(--lfpo-ink);
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
}

.lfpo-root[hidden] { display: none !important; }

.lfpo-root *,
.lfpo-root *::before,
.lfpo-root *::after { box-sizing: border-box; }

html.lfpo-lock,
html.lfpo-lock body { overflow: hidden !important; }

/* Voile */
.lfpo-overlay {
	position: absolute;
	inset: 0;
	background: rgba(13, 20, 36, 0.55);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 0.35s ease;
	cursor: pointer;
}

/* Fenêtre */
.lfpo-dialog {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
	width: 100%;
	max-width: 880px;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	background: #fff;
	border-radius: var(--lfpo-radius);
	box-shadow: 0 30px 80px -20px rgba(13, 20, 36, 0.45), 0 2px 8px rgba(13, 20, 36, 0.08);
	overflow: hidden;
	opacity: 0;
	transform: translateY(16px) scale(0.98);
	transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
	outline: none;
}

.lfpo-root.is-open .lfpo-overlay { opacity: 1; }
.lfpo-root.is-open .lfpo-dialog { opacity: 1; transform: none; }

/* Bouton fermer : zone tactile 44px */
.lfpo-root .lfpo-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 1px solid var(--lfpo-line);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--lfpo-ink);
	box-shadow: 0 4px 14px rgba(13, 20, 36, 0.12);
	cursor: pointer;
	line-height: 1;
	transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}
.lfpo-root .lfpo-close:hover { background: #fff; color: var(--lfpo-blue); transform: rotate(90deg); }
.lfpo-root .lfpo-close:focus-visible { outline: 3px solid rgba(31, 79, 143, 0.35); outline-offset: 2px; }
.lfpo-root .lfpo-close svg { display: block; }

/* Image */
.lfpo-media {
	position: relative;
	min-height: 100%;
	background: var(--lfpo-blue-dark);
}
.lfpo-media picture { display: contents; }
.lfpo-root .lfpo-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	object-position: 62% 40%;
	border-radius: 0;
}

/* Contenu */
.lfpo-body {
	padding: 40px 40px 32px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}

.lfpo-root p { margin: 0; padding: 0; }

.lfpo-root .lfpo-eyebrow {
	display: inline-block;
	margin-bottom: 14px;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--lfpo-amber-soft);
	color: var(--lfpo-amber);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.lfpo-root .lfpo-title {
	margin: 0 44px 14px 0;
	padding: 0;
	color: var(--lfpo-ink);
	font-family: inherit;
	font-size: clamp(22px, 2.6vw, 28px);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-transform: none;
}

.lfpo-root .lfpo-lead {
	margin-bottom: 8px;
	font-size: 16px;
	font-weight: 600;
	color: var(--lfpo-ink);
}

.lfpo-root .lfpo-text {
	margin-bottom: 12px;
	font-size: 15px;
	color: var(--lfpo-muted);
}

.lfpo-root .lfpo-tagline {
	margin-bottom: 20px;
	font-size: 15px;
	font-weight: 700;
	color: var(--lfpo-blue);
	letter-spacing: 0.01em;
}

/* Compte à rebours */
.lfpo-countdown {
	margin-bottom: 16px;
	padding: 16px;
	border-radius: var(--lfpo-radius-sm);
	background: var(--lfpo-soft);
}
.lfpo-root .lfpo-cd-label {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	font-size: 14px;
	font-weight: 600;
	color: var(--lfpo-ink);
}
.lfpo-cd-label svg { color: var(--lfpo-amber); flex: none; }

.lfpo-cd-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
}
.lfpo-cd-unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 4px 8px;
	border: 1px solid var(--lfpo-line);
	border-radius: 10px;
	background: #fff;
}
.lfpo-cd-num {
	font-size: 26px;
	font-weight: 700;
	line-height: 1.1;
	color: var(--lfpo-ink);
	font-variant-numeric: tabular-nums;
}
.lfpo-cd-days { border-color: transparent; background: var(--lfpo-blue); }
.lfpo-cd-days .lfpo-cd-num,
.lfpo-cd-days .lfpo-cd-txt { color: #fff; }
.lfpo-cd-txt {
	margin-top: 2px;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--lfpo-muted);
}

.lfpo-root .lfpo-teaser {
	margin-bottom: 20px;
	font-size: 15px;
	font-style: italic;
	color: var(--lfpo-muted);
}

/* Formulaire */
.lfpo-form { margin: 0; padding-top: 20px; border-top: 1px solid var(--lfpo-line); }

.lfpo-root .lfpo-form-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	font-size: 16px;
	font-weight: 700;
	color: var(--lfpo-ink);
}
.lfpo-form-title svg { color: var(--lfpo-blue); flex: none; }

.lfpo-field { display: flex; gap: 8px; }

.lfpo-root .lfpo-input {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
	height: 50px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid #d5d9e2;
	border-radius: var(--lfpo-radius-sm);
	background: #fff;
	color: var(--lfpo-ink);
	font-family: inherit;
	font-size: 16px; /* 16px évite le zoom automatique sur iOS */
	line-height: normal;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.lfpo-root .lfpo-input::placeholder { color: #8b93a5; opacity: 1; }
.lfpo-root .lfpo-input:focus {
	outline: none;
	border-color: var(--lfpo-blue);
	box-shadow: 0 0 0 3px rgba(31, 79, 143, 0.15);
}
.lfpo-root .lfpo-input[aria-invalid="true"] { border-color: #b3261e; }

.lfpo-root .lfpo-btn {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 50px;
	margin: 0;
	padding: 0 22px;
	border: 0;
	border-radius: var(--lfpo-radius-sm);
	background: var(--lfpo-ink);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.01em;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.2s ease, transform 0.1s ease;
	-webkit-tap-highlight-color: transparent;
}
.lfpo-root .lfpo-btn:hover { background: var(--lfpo-blue); color: #fff; }
.lfpo-root .lfpo-btn:active { transform: translateY(1px); }
.lfpo-root .lfpo-btn:focus-visible { outline: 3px solid rgba(31, 79, 143, 0.35); outline-offset: 2px; }
.lfpo-root .lfpo-btn[disabled] { opacity: 0.65; cursor: wait; }

.lfpo-root .lfpo-msg { min-height: 0; margin-top: 10px; font-size: 14px; font-weight: 500; }
.lfpo-root .lfpo-msg:empty { display: none; }
.lfpo-root .lfpo-msg.is-error { color: #b3261e; }
.lfpo-root .lfpo-msg.is-success {
	padding: 12px 14px;
	border-radius: var(--lfpo-radius-sm);
	background: #eef5ee;
	color: #25613a;
}
.lfpo-form.is-done .lfpo-field { display: none; }

.lfpo-root .lfpo-legal {
	margin-top: 12px;
	font-size: 12px;
	line-height: 1.5;
	color: #8b93a5;
}
.lfpo-root .lfpo-legal a { color: inherit; text-decoration: underline; }

/* Accessibilité */
.lfpo-sr,
.lfpo-hp {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Badge reCAPTCHA masqué (mention légale affichée dans le formulaire) */
.grecaptcha-badge { visibility: hidden !important; }

/* PC : titre réduit d'environ 8 % (28px → 26px) */
@media (min-width: 1025px) {
	.lfpo-root .lfpo-title { font-size: 26px; }
}

/* Tablette */
@media (max-width: 900px) {
	.lfpo-dialog { max-width: 720px; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
	.lfpo-body { padding: 32px 28px 26px; }
}

/* Mobile & tablette portrait : image en bandeau */
@media (max-width: 680px) {
	.lfpo-root { padding: 12px; align-items: center; }
	.lfpo-dialog {
		display: flex;
		flex-direction: column;
		max-width: 480px;
		max-height: calc(100vh - 24px);
		max-height: calc(100dvh - 24px);
		border-radius: 18px;
	}
	.lfpo-media { flex: none; height: 150px; min-height: 0; }
	.lfpo-root .lfpo-img { object-position: 55% 38%; }
	.lfpo-body { flex: 1 1 auto; padding: 22px 20px 20px; }
	.lfpo-root .lfpo-close { top: 10px; right: 10px; }
	.lfpo-root .lfpo-title { margin-right: 0; font-size: 21px; }
	.lfpo-root .lfpo-lead { font-size: 15px; }
	.lfpo-root .lfpo-text,
	.lfpo-root .lfpo-tagline,
	.lfpo-root .lfpo-teaser { font-size: 14px; }
	.lfpo-root .lfpo-tagline { margin-bottom: 16px; }
	.lfpo-countdown { padding: 12px; }
	.lfpo-cd-grid { gap: 6px; }
	.lfpo-cd-num { font-size: 21px; }
	.lfpo-cd-txt { font-size: 10px; }
	.lfpo-form { padding-top: 16px; }
	.lfpo-field { flex-direction: column; }
	.lfpo-root .lfpo-btn { width: 100%; }
}

@media (max-width: 360px) {
	.lfpo-media { height: 120px; }
	.lfpo-root .lfpo-title { font-size: 19px; }
	.lfpo-cd-num { font-size: 18px; }
}

/* Écrans peu hauts (mobile paysage) */
@media (max-height: 560px) and (min-width: 681px) {
	.lfpo-body { padding: 24px 28px; }
}
@media (max-height: 560px) and (max-width: 680px) {
	.lfpo-media { display: none; }
	.lfpo-root .lfpo-title { margin-right: 44px; }
}

@media (prefers-reduced-motion: reduce) {
	.lfpo-overlay,
	.lfpo-dialog,
	.lfpo-root .lfpo-close { transition: none; }
}
