/**
 * Bloc d'inscription à la lettre d'information.
 *
 * Volontairement discret : il se loge dans une colonne du pied de page et ne
 * doit pas peser plus qu'un des groupes de liens qui l'entourent.
 *
 * Les couleurs sont lues depuis les variables du thème, avec un repli codé en
 * dur : le plugin doit rester présentable si le thème change un jour.
 */

.calinac-nl {
	margin-block-start: 1.5rem;
	max-width: 24rem;
}

.calinac-nl__titre {
	margin: 0 0 0.6rem;
	font-size: 0.94rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--wp--preset--color--texte, #333);
}

.calinac-nl__form {
	margin: 0;
}

/* Champ et bouton accolés en une seule pilule : une bordure unique autour des
   deux, le bouton venant s'y encastrer à droite. */
.calinac-nl__champ {
	display: flex;
	align-items: stretch;
	background: #fff;
	border: 1px solid var(--wp--preset--color--bordure, #95C9BC);
	border-radius: 999px;
	overflow: hidden;
}

.calinac-nl__champ input[type="email"] {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.55rem 0.95rem;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: 0.92rem;
	color: inherit;
}

.calinac-nl__champ input[type="email"]:focus {
	outline: none;
}

/* Le contour de focus est porté par le conteneur : le champ n'ayant pas de
   bordure propre, un contour sur lui seul apparaîtrait à l'intérieur de la
   pilule et se verrait mal. */
.calinac-nl__champ:focus-within {
	outline: 3px solid var(--wp--preset--color--principale-sombre, #487D70);
	outline-offset: 2px;
}

.calinac-nl__bouton {
	flex: 0 0 auto;
	padding: 0.55rem 1.1rem;
	border: 0;
	background: var(--wp--preset--color--secondaire, #8C214A);
	color: #fff;
	font-family: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	transition: filter 0.15s ease;
}

.calinac-nl__bouton:hover {
	filter: brightness(1.1);
}

.calinac-nl__mention {
	margin: 0.5rem 0 0;
	font-size: 0.76rem;
	line-height: 1.4;
	color: var(--wp--preset--color--texte-doux, #656565);
}

.calinac-nl__message {
	margin: 0 0 0.6rem;
	padding: 0.55rem 0.8rem;
	border-radius: 8px;
	border-inline-start: 3px solid;
	font-size: 0.85rem;
}

.calinac-nl__message--succes {
	background: #E8F4EC;
	border-color: #487D70;
}

.calinac-nl__message--erreur {
	background: #FDECEA;
	border-color: #B3261E;
}

/* Champ piège : masqué sans `display: none`, que certains robots savent
   détecter et contourner. */
.calinac-nl__piege {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Sous 380 px, la pilule ne peut plus contenir les deux à la fois sans que le
   champ devienne inutilisable : on les empile. */
@media (max-width: 380px) {
	.calinac-nl__champ {
		flex-direction: column;
		border-radius: 14px;
	}

	.calinac-nl__bouton {
		border-radius: 0;
	}
}

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