/* JoyMailer Newsletter — bloc + volet d'inscription en bas de page */

/* ---------- Bloc ---------- */
.jmn-block,
.jmn-block *,
.jmn-drawer,
.jmn-drawer * { box-sizing: border-box; }

.jmn-block {
	background: var(--jmn-block-bg, #0b1870);
	color: var(--jmn-block-color, #fff);
	padding: var(--jmn-block-pad, 60px) 20px;
	text-align: center;
}
.jmn-block__inner {
	max-width: 560px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
}
.jmn-block__icon {
	color: inherit;
	display: block;
}
.jmn-block__text {
	margin: 0;
	color: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.6;
}
.jmn-block__button {
	appearance: none;
	background: transparent;
	color: inherit;
	border: 2px solid currentColor;
	border-radius: 8px;
	padding: 10px 20px;
	margin: 6px 0 0;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	line-height: 1.3;
	min-height: 0;
	cursor: pointer;
	transition: background-color .2s, color .2s;
}
.jmn-block__button:hover,
.jmn-block__button:focus-visible {
	background: var(--jmn-block-color, #fff);
	color: var(--jmn-block-bg, #0b1870);
	outline: none;
}

/* ---------- Volet ---------- */
.jmn-drawer[hidden] { display: none; }
.jmn-drawer {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100000;
	background: var(--jmn-drawer-bg, #f7f4ef);
	color: var(--jmn-drawer-color, #111);
	box-shadow: 0 -8px 32px rgba(0, 0, 0, .14);
	padding: 44px 24px calc(44px + env(safe-area-inset-bottom));
	transform: translateY(100%);
	transition: transform .35s ease;
	max-height: 90vh;
	overflow-y: auto;
}
.jmn-drawer.is-open { transform: translateY(0); }
.jmn-drawer__inner {
	max-width: 1220px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr 1.25fr;
	gap: 32px 48px;
	align-items: center;
}
.jmn-drawer__title {
	margin: 0 0 8px;
	font-size: 30px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -.01em;
	color: inherit;
}
.jmn-drawer__text {
	margin: 0;
	font-size: 17px;
	line-height: 1.5;
	color: inherit;
	opacity: .85;
}
.jmn-drawer__close {
	position: absolute;
	top: 16px;
	right: 16px;
	appearance: none;
	background: none;
	border: 0;
	padding: 6px;
	margin: 0;
	min-height: 0;
	color: inherit;
	cursor: pointer;
	line-height: 0;
}
.jmn-drawer__close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ---------- Formulaire ---------- */
.jmn-form { margin: 0; }
.jmn-form__row {
	display: flex;
	gap: 14px;
	align-items: stretch;
}
.jmn-form__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 54px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid #8a8a8a;
	border-radius: 4px;
	background: #fff;
	color: #111;
	font-size: 17px;
	box-shadow: none;
}
.jmn-form__input--first { flex: 0 1 34%; }
.jmn-form__input:focus { border-color: #111; outline: 2px solid rgba(17, 17, 17, .15); outline-offset: 0; }
.jmn-form__submit {
	flex: 0 0 auto;
	appearance: none;
	height: 54px;
	margin: 0;
	padding: 0 34px;
	border: 0;
	border-radius: 999px;
	background: var(--jmn-button-bg, #111);
	color: var(--jmn-button-color, #fff);
	font-size: 16px;
	font-weight: 700;
	text-transform: none;
	letter-spacing: 0;
	line-height: 1;
	min-height: 0;
	cursor: pointer;
	transition: opacity .2s;
}
.jmn-form__submit:hover { opacity: .88; }
.jmn-form__submit[disabled] { opacity: .55; cursor: wait; }
.jmn-form__legal {
	margin: 12px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: inherit;
	opacity: .8;
}
.jmn-form__legal a { color: inherit; text-decoration: underline; }
.jmn-form__message { margin: 10px 0 0; font-size: 15px; font-weight: 600; min-height: 1em; }
.jmn-form__message.is-error { color: #c62828; }
.jmn-form__message.is-success { color: #1b7f3b; }
.jmn-form__message.is-warning { color: #e07a00; }
.jmn-form.is-done .jmn-form__row { display: none; }

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

/* ---------- Mobile ---------- */
@media (max-width: 849px) {
	.jmn-drawer { padding: 40px 18px calc(24px + env(safe-area-inset-bottom)); }
	.jmn-drawer__inner { grid-template-columns: 1fr; gap: 18px; }
	.jmn-drawer__title { font-size: 23px; padding-right: 28px; }
	.jmn-drawer__text { font-size: 15px; }
	.jmn-form__row { flex-direction: column; gap: 10px; }
	.jmn-form__input,
	.jmn-form__input--first { flex: none; width: 100%; height: 50px; font-size: 16px; }
	.jmn-form__submit { width: 100%; height: 50px; }
	.jmn-block__button { letter-spacing: .03em; }
}

@media (prefers-reduced-motion: reduce) {
	.jmn-drawer { transition: none; }
}
