/* -------------------------------------------------------------------------- */

/*	17. Plugin Newsletter — styles (dont footer CRT Minitel)
/* -------------------------------------------------------------------------- */

.tnp.tnp-subscription,
.tnp.tnp-subscription-minimal {
	max-width: 640px;
	margin-inline: auto;
}

.tnp.tnp-subscription .tnp-form,
.tnp.tnp-subscription-minimal .tnp-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.tnp.tnp-subscription p {
	text-align: center;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
	color: #fff;
}

.tnp .tnp-field {
	margin: 0;
}

.tnp .tnp-field label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: var(--fs-sm);
	font-weight: 600;
	color: inherit;
}

.tnp .tnp-email,
.tnp .tnp-name,
.tnp .tnp-surname {
	width: 100%;
	box-sizing: border-box;
	padding: 0.65rem 0.85rem;
	border: 1px solid rgba(15, 23, 42, 0.18);
	border-radius: var(--radius-sm);
	font: inherit;
	font-size: var(--fs-base);
	line-height: 1.35;
	background: #fff;
	color: var(--color-text);
}

.tnp .tnp-email:focus,
.tnp .tnp-name:focus,
.tnp .tnp-surname:focus {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
	border-color: var(--color-primary);
}

.tnp .tnp-field-button {
	position: relative;
	display: flex;
	justify-content: center;
	width: fit-content;
	max-width: 100%;
	margin-inline: auto;
	text-align: center !important;
	clip-path: var(--clip-btn-pixel-outer);
}

.tnp .tnp-field-button::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	pointer-events: none;
	background: #fff;
	clip-path: var(--clip-btn-pixel-border);
}

.tnp .tnp-field-button .tnp-submit {
	margin-top: 0.25rem;
}

/* Submit newsletter — secondary blanc, coins pixelisés (technique pixelcorners) */
.tnp input.tnp-submit,
.tnp button.tnp-submit {
	position: relative;
	z-index: 1;
	border: var(--btn-pixel-border) solid transparent;
	border-radius: 0;
	background-color: transparent;
	color: #fff;
	clip-path: var(--clip-btn-pixel-inner);
	box-shadow: none;
}

.tnp input.tnp-submit:hover,
.tnp button.tnp-submit:hover,
.tnp input.tnp-submit:focus-visible,
.tnp button.tnp-submit:focus-visible {
	background-color: rgb(255 255 255 / 12%);
	color: #fff;
	box-shadow:
		0 0 18px rgb(255 255 255 / 28%),
		inset 0 0 12px rgb(255 255 255 / 8%);
	text-decoration: none;
}

.tnp input.tnp-submit:focus-visible,
.tnp button.tnp-submit:focus-visible {
	outline: none;
	box-shadow:
		0 0 0 2px rgb(255 255 255 / 35%),
		0 0 22px rgb(255 255 255 / 38%),
		inset 0 0 12px rgb(255 255 255 / 10%);
}

/* Footer CRT — contraste Minitel */
.footer-crt .tnp.tnp-subscription,
.footer-crt .tnp.tnp-subscription-minimal {
	max-width: 450px;
}

.footer-crt .tnp .tnp-field label {
	font-family: var(--font-minitel), "Courier Prime", monospace;
	font-size: 1.25rem;
	font-weight: 400;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: left;
	color: #fff;
	text-shadow: 0 0 8px rgba(255, 255, 255, 0.38);
}

.footer-crt .tnp .tnp-field:not(.tnp-field-button) {
	text-align: left;
	width: 100%;
}

.footer-crt .tnp .tnp-field {
	position: relative;
}

.footer-crt .tnp .tnp-email,
.footer-crt .tnp .tnp-name,
.footer-crt .tnp .tnp-surname {
	border: 0;
	border-radius: 0;
	padding-right: 0.2rem;
	padding-left: 0.2rem;
	box-shadow: none;
	font-family: var(--font-minitel), "Courier Prime", monospace;
	font-size: clamp(1.7rem, 1.4rem + 0.8vw, 2.4rem);
	letter-spacing: 0.08em;
	background-color: rgba(4, 12, 18, 0.2);
	background-image: none;
	color: #fff;
	text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.footer-crt .tnp .tnp-field.is-minitel-caret-ready::after {
	content: "";
	position: absolute;
	right: 0.2rem;
	bottom: 0.18rem;
	left: 0.2rem;
	z-index: 1;
	height: 0.28rem;
	pointer-events: none;
	background-image: radial-gradient(circle, rgba(255, 255, 255, 0.48) 0 1.5px, transparent 1.6px);
	background-repeat: repeat-x;
	background-size: 0.72em 0.28rem;
}

.footer-crt .tnp .tnp-field.is-minitel-caret-ready .tnp-email {
	caret-color: transparent;
}

.footer-crt .tnp .footer-crt-text-caret {
	position: absolute;
	top: var(--footer-crt-caret-top, 50%);
	left: var(--footer-crt-caret-left, 0);
	z-index: 2;
	display: none;
	width: 0.58em;
	height: 1.35em;
	pointer-events: none;
	background: rgba(255, 255, 255, 0.9);
	box-shadow:
		0 0 8px rgba(255, 255, 255, 0.8),
		0 0 18px rgba(255, 255, 255, 0.42);
	transform: translateY(-50%);
	animation: footer-crt-input-caret-blink 1s steps(1, end) infinite;
}

.footer-crt .tnp .tnp-field.is-minitel-caret-ready .footer-crt-text-caret {
	display: block;
}

.footer-crt .tnp .tnp-field.is-minitel-caret-focused::after {
	background-image: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 1.6px, transparent 1.7px);
}

.footer-crt .tnp .tnp-email::placeholder,
.footer-crt .tnp .tnp-name::placeholder,
.footer-crt .tnp .tnp-surname::placeholder {
	color: rgba(255, 255, 255, 0.62);
	opacity: 1;
	text-transform: uppercase;
}

.footer-crt .tnp .tnp-email:focus,
.footer-crt .tnp .tnp-name:focus,
.footer-crt .tnp .tnp-surname:focus {
	outline: none;
	background-color: rgba(4, 12, 18, 0.8);
	box-shadow: none;
}

.footer-crt .tnp .tnp-email:-webkit-autofill,
.footer-crt .tnp .tnp-email:-webkit-autofill:hover,
.footer-crt .tnp .tnp-email:-webkit-autofill:focus {
	border: 0;
	-webkit-box-shadow: 0 0 0 100vmax rgb(4, 12, 18) inset;
	box-shadow: 0 0 0 100vmax rgb(4, 12, 18) inset;
	-webkit-text-fill-color: #fff;
	caret-color: transparent;
	transition: background-color 9999s ease-out;
}

.footer-crt .tnp .tnp-email:autofill {
	border: 0;
	box-shadow: 0 0 0 100vmax rgb(4, 12, 18) inset;
	color: #fff;
	caret-color: transparent;
}

.footer-crt .tnp input.tnp-submit,
.footer-crt .tnp button.tnp-submit {
	min-width: 8rem;
	font-family: var(--font-minitel), "Courier Prime", monospace;
	font-size: clamp(1.1rem, 0.95rem + 0.45vw, 1.35rem);
	font-weight: 400;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-shadow: 0 0 8px rgb(255 255 255 / 45%);
}

@keyframes footer-crt-input-caret-blink {
	0%,
	49% {
		opacity: 1;
	}

	50%,
	100% {
		opacity: 0.18;
	}
}

@media (prefers-reduced-motion: reduce) {
	.footer-crt .tnp .footer-crt-text-caret {
		animation: none;
	}
}
