/* VAV Newsletter Gate
 * Tous les sélecteurs sont préfixés par #vav-gate pour ne pas être écrasés
 * par les styles du thème (titres, champs, cases à cocher, images…).
 * Couleurs : modifiez les variables ci-dessous.
 */
#vav-gate {
	--vg-accent: #1f2d2e; /* couleur du logo Voyage avec vue */
	--vg-text: #1b1d22;
	--vg-muted: #5b6070;
	--vg-bg: #ffffff;
	--vg-border: #d7dae2;
	--vg-error: #c62828;
	--vg-ok: #1b7f3b;

	position: fixed;
	top: 0; right: 0; bottom: 0; left: 0;
	z-index: 2147483000;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	height: 100%;
	height: 100dvh;
	margin: 0;
	padding: 16px;
	padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
	box-sizing: border-box;
	background: rgba(15, 18, 25, 0.55);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	font-family: inherit;
	text-align: left;
}

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

#vav-gate *,
#vav-gate *::before,
#vav-gate *::after { box-sizing: border-box; }

#vav-gate .vav-gate__box {
	position: relative;
	width: 100%;
	max-width: 460px;
	min-width: 0;
	margin: auto; /* centre verticalement, et laisse défiler si l'écran est trop petit */
	padding: 32px 28px;
	background: var(--vg-bg);
	color: var(--vg-text);
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
	font-size: 16px;
	line-height: 1.5;
	float: none;
	transform: none;
}

#vav-gate .vav-gate__logo {
	display: block;
	width: 100%;
	max-width: 340px;
	min-width: 0;
	height: auto;
	margin: 0 auto 22px;
	padding: 0;
	border: 0;
	box-shadow: none;
}

#vav-gate .vav-gate__title {
	margin: 0 0 8px;
	padding: 0;
	font-family: inherit;
	font-size: clamp(1.2rem, 1rem + 1.2vw, 1.5rem);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: normal;
	text-transform: none;
	color: var(--vg-text);
	overflow-wrap: break-word;
}

#vav-gate .vav-gate__intro {
	margin: 0 0 20px;
	padding: 0;
	font-size: 0.95em;
	color: var(--vg-muted);
}

#vav-gate .vav-gate__form {
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
	margin: 0;
	padding: 0;
}

#vav-gate .vav-gate__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 100%;
	margin: 0;
	font-size: 0.92em;
	font-weight: 600;
	color: var(--vg-text);
}
#vav-gate .vav-gate__field abbr { text-decoration: none; border: 0; color: var(--vg-error); }

#vav-gate .vav-gate__field input {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	height: auto;
	min-height: 46px;
	margin: 0;
	padding: 11px 12px;
	font-family: inherit;
	font-size: 16px; /* 16px minimum : évite le zoom automatique sur iPhone */
	font-weight: 400;
	line-height: 1.3;
	color: var(--vg-text);
	background: #fff;
	border: 1px solid var(--vg-border);
	border-radius: 8px;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}
#vav-gate .vav-gate__field input:focus {
	outline: 2px solid var(--vg-accent);
	outline-offset: 1px;
	border-color: var(--vg-accent);
}

#vav-gate .vav-gate__consent {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	margin: 0;
	font-size: 0.85em;
	font-weight: 400;
	line-height: 1.45;
	color: var(--vg-muted);
	cursor: pointer;
}
#vav-gate .vav-gate__consent input[type="checkbox"] {
	position: static;
	display: block;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	min-height: 0;
	margin: 2px 0 0;
	padding: 0;
	opacity: 1;
	-webkit-appearance: auto;
	appearance: auto;
	accent-color: var(--vg-accent);
}
#vav-gate .vav-gate__consent span { flex: 1 1 auto; min-width: 0; }
#vav-gate .vav-gate__consent a { color: var(--vg-accent); text-decoration: underline; }

#vav-gate .vav-gate__submit {
	display: block;
	width: 100%;
	min-height: 48px;
	margin: 4px 0 0;
	padding: 12px 16px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	text-align: center;
	white-space: normal;
	color: #fff;
	background: var(--vg-accent);
	border: 0;
	border-radius: 8px;
	box-shadow: none;
	cursor: pointer;
}
#vav-gate .vav-gate__submit:hover { filter: brightness(1.15); }
#vav-gate .vav-gate__submit:disabled { opacity: 0.6; cursor: wait; }

#vav-gate .vav-gate__msg { margin: 0; min-height: 1.4em; font-size: 0.9em; }
#vav-gate .vav-gate__msg.is-error { color: var(--vg-error); }
#vav-gate .vav-gate__msg.is-ok { color: var(--vg-ok); font-weight: 600; }

#vav-gate .vav-gate__hp {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
}

.vav-gate__noscript { position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 2147483001; text-align: center; background: #fff; padding: 12px; border-radius: 8px; }

.vav-gate-placeholder { padding: 48px 16px; text-align: center; opacity: 0.6; }

/* Téléphones */
@media (max-width: 520px) {
	#vav-gate { padding: 12px; }
	#vav-gate .vav-gate__box { padding: 24px 18px 20px; border-radius: 12px; }
	#vav-gate .vav-gate__logo { max-width: 260px; margin-bottom: 18px; }
	#vav-gate .vav-gate__intro { margin-bottom: 16px; }
	#vav-gate .vav-gate__form { gap: 12px; }
}

/* Très petits écrans (iPhone SE, anciens Android) */
@media (max-width: 360px) {
	#vav-gate { padding: 8px; }
	#vav-gate .vav-gate__box { padding: 20px 14px 16px; }
	#vav-gate .vav-gate__logo { max-width: 220px; }
}

/* Téléphone à l'horizontale : écran peu haut */
@media (max-height: 500px) and (orientation: landscape) {
	#vav-gate .vav-gate__box { padding: 16px 20px; max-width: 520px; }
	#vav-gate .vav-gate__logo { max-width: 200px; margin-bottom: 10px; }
	#vav-gate .vav-gate__intro { margin-bottom: 10px; }
	#vav-gate .vav-gate__form { gap: 8px; }
	#vav-gate .vav-gate__field input { min-height: 40px; padding: 8px 12px; }
}
