/* Bientôt — maquette design/accueil.dc.html l. 181-230 ; états des boutons btn() l. 674-677. ADR-015.
 * Fond, rembourrages, marges, polices, tailles et couleurs de texte : portés par les blocs.
 * Ici : largeurs de texte, carte vedette (image, réticule, coordonnées), grille, cartes, jauge, « Me prévenir ». */

.sdl-soon .sdl-soon__title {
	max-width: 18ch;
}

.sdl-soon .sdl-soon__lede {
	max-width: 54ch;
	text-wrap: pretty;
}

/* Listes des boucles : sans puces ni marges (role="list" ajouté au rendu pour la grille). */
.sdl-soon .sdl-soon__feature,
.sdl-soon .sdl-soon__grid {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sdl-soon .sdl-soon__feature > li,
.sdl-soon .sdl-soon__grid > li {
	margin: 0;
}

/* ---------- Carte vedette (StarScout) ---------- */

.sdl-soon .sdl-hw-feature {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 440px;
	margin-bottom: var(--wp--preset--spacing--20);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--preset--border-radius--18);
	overflow: hidden;
}

.sdl-soon .sdl-hw-feature__media {
	position: absolute;
	inset: 0;
	margin: 0;
}

.sdl-soon .sdl-hw-feature__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: brightness(0.8);
}

/* Décor de plate solving (aria-hidden) : réticule, repères d'étoiles, coordonnées. */
.sdl-soon .sdl-hw-feature__decor > span {
	position: absolute;
}

.sdl-soon .sdl-hw-feature__ring {
	left: 50%;
	top: 44%;
	width: 180px;
	height: 180px;
	margin: -90px 0 0 -90px;
	border: 1.5px solid var(--wp--preset--color--accent);
	border-radius: 50%;
}

.sdl-soon .sdl-hw-feature__cross {
	left: 50%;
	top: 44%;
	background: color-mix(in srgb, var(--wp--preset--color--accent) 70%, transparent);
}

.sdl-soon .sdl-hw-feature__cross.is-h {
	width: 260px;
	height: 1px;
	margin-left: -130px;
}

.sdl-soon .sdl-hw-feature__cross.is-v {
	width: 1px;
	height: 260px;
	margin-top: -130px;
}

.sdl-soon .sdl-hw-feature__star {
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--text) 70%, transparent);
}

.sdl-soon .sdl-hw-feature__star.is-1 {
	left: 22%;
	top: 18%;
	width: 26px;
	height: 26px;
}

.sdl-soon .sdl-hw-feature__star.is-2 {
	left: 71%;
	top: 30%;
	width: 22px;
	height: 22px;
}

.sdl-soon .sdl-hw-feature__star.is-3 {
	left: 36%;
	top: 66%;
	width: 20px;
	height: 20px;
}

.sdl-soon .sdl-hw-feature__coords {
	right: 18px;
	top: 16px;
	padding: 6px 10px;
	border-radius: var(--wp--preset--border-radius--6);
	background: color-mix(in srgb, var(--wp--preset--color--base-deep) 75%, transparent);
	color: var(--wp--preset--color--accent-pale);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--12);
	line-height: var(--wp--custom--line-height--mono);
	text-align: right;
}

/* Bandeau bas : dégradé deep-fade-up porté par le bloc ; passe devant l'image et le décor. */
.sdl-soon .sdl-hw-feature__body {
	position: relative;
	width: 100%;
}

.sdl-soon .sdl-hw-feature__intro {
	max-width: 560px;
}

.sdl-soon .sdl-hw-feature__soon {
	padding: 5px 10px;
	border: 1px solid var(--wp--preset--color--line-3);
	border-radius: var(--wp--preset--border-radius--pill);
}

/* ---------- Grille ---------- */

.sdl-soon .sdl-soon__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	gap: var(--wp--preset--spacing--20);
}

.sdl-soon .sdl-soon__grid > li {
	display: flex;
}

.sdl-soon .sdl-hw {
	flex: 1;
	min-width: 0;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--preset--border-radius--16);
	overflow: hidden;
}

/* Visuel 4:3 : image agrandie à 124 % et recadrée (inset -12 %), comme la maquette. */
.sdl-soon .sdl-hw__media {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.sdl-soon .sdl-hw__img {
	position: absolute;
	inset: 0;
	margin: 0;
}

.sdl-soon .sdl-hw__img img {
	position: absolute;
	inset: -12%;
	width: 124%;
	max-width: none;
	height: 124%;
	object-fit: cover;
	filter: brightness(0.75);
}

.sdl-soon .sdl-hw__img.is-blurred img {
	filter: blur(18px) brightness(0.55) saturate(0.8);
}

.sdl-soon .sdl-hw__code {
	position: absolute;
	left: 14px;
	top: 14px;
	padding: 4px 8px;
	border-radius: var(--wp--preset--border-radius--5);
	background: color-mix(in srgb, var(--wp--preset--color--base-deep) 75%, transparent);
}

.sdl-soon .sdl-hw__code:empty {
	display: none;
}

.sdl-soon .sdl-hw__body {
	flex: 1;
}

/* Jauge d'avancement : 4 segments, allumés jusqu'à l'étape courante. */
.sdl-soon .sdl-hw__gauge {
	display: flex;
	gap: var(--wp--preset--spacing--4);
}

.sdl-soon .sdl-hw__gauge > span {
	flex: 1;
	height: 4px;
	border-radius: var(--wp--preset--border-radius--2);
	background: var(--wp--preset--color--line-panel);
}

.sdl-soon .sdl-hw__gauge > .is-on {
	background: var(--wp--preset--color--accent);
}

/* Matériel doté d'une page (ADR-082, écart à la maquette) : le nom est un lien qui couvre toute la carte ;
 * « Me prévenir » reste cliquable au-dessus. Survol et focus comme les cartes-ancres des pages logiciel. */
.sdl-soon .sdl-hw:has(.sdl-hw__link) {
	position: relative;
}

.sdl-soon .sdl-hw__link {
	color: inherit;
	text-decoration: none;
}

.sdl-soon .sdl-hw__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}

.sdl-soon .sdl-hw__link:focus-visible {
	outline: none;
}

.sdl-soon .sdl-hw:has(.sdl-hw__link):hover {
	border-color: var(--wp--preset--color--accent);
}

.sdl-soon .sdl-hw:has(.sdl-hw__link:focus-visible) {
	outline: 2px solid var(--wp--preset--color--link);
	outline-offset: 3px;
}

.sdl-soon .sdl-hw:has(.sdl-hw__link) .sdl-notify {
	position: relative;
	z-index: 2;
}

/* Bouton collé en bas : boutons alignés d'une carte à l'autre. */
.sdl-soon .sdl-hw .sdl-hw__notify,
.sdl-soon .sdl-hw .sdl-notify {
	margin-top: auto;
}

/* ---------- Phrase commune ---------- */

.sdl-soon .sdl-soon__common {
	max-width: 40ch;
	margin-right: auto;
	margin-left: auto;
	text-align: center;
	text-wrap: balance;
}

.sdl-soon .sdl-soon__more {
	text-align: center;
}

/* ---------- « Me prévenir » ----------
 * État normal = bouton clair de la maquette ; au clic (assets/js/bientot.js), le formulaire MailPoet du produit
 * apparaît (email + « Me prévenir ») ; après envoi, « Vous serez prévenu ✓ » au format de l'état « prévenu ».
 * Premier rendu : seul le déclencheur est visible (pas de saut de mise en page). Sans JS : règle <noscript>
 * (inc/bientot.php) qui affiche le formulaire et masque le déclencheur. */

.sdl-soon .sdl-notify {
	width: 100%;
}

.sdl-soon .sdl-hw-feature .sdl-notify {
	width: auto;
	max-width: 100%;
}

.sdl-soon .sdl-notify__button,
.sdl-soon .sdl-notify input.mailpoet_submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: var(--wp--custom--button--height-sm);
	margin: 0;
	padding: 0 var(--sdl-btn-px-md);
	border: 1px solid var(--wp--preset--color--text);
	border-radius: var(--sdl-btn-radius);
	background: var(--wp--preset--color--text);
	color: var(--wp--preset--color--base);
	font-family: inherit;
	font-size: var(--sdl-btn-fs-lg);
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	white-space: normal;
	cursor: pointer;
}

.sdl-soon .sdl-hw-feature .sdl-notify__button,
.sdl-soon .sdl-hw-feature .sdl-notify input.mailpoet_submit {
	width: auto;
}

/* Survol : aucun effet, comme la maquette. */
.sdl-soon a.sdl-notify__button:hover {
	color: var(--wp--preset--color--base);
}

/* Formulaire replié derrière le déclencheur jusqu’au clic. */
.sdl-soon .sdl-notify:not(.is-open) > .sdl-notify__panel,
.sdl-soon .sdl-notify.is-open > .sdl-notify__toggle {
	display: none;
}

@media (prefers-reduced-motion: no-preference) {
	.sdl-soon .sdl-notify.is-open > .sdl-notify__panel {
		animation: sdl-notify-in 0.15s ease-out;
	}
}

@keyframes sdl-notify-in {
	from {
		opacity: 0;
	}
}

.sdl-soon .sdl-notify .mailpoet_form {
	position: relative;
	margin: 0;
	padding: 0;
	font-family: var(--wp--preset--font-family--body);
}

/* Grille : champ puis bouton, pleine largeur. Vedette : sur une ligne quand la place le permet. */
.sdl-soon .sdl-notify form.mailpoet_form {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--10);
}

.sdl-soon .sdl-hw-feature .sdl-notify form.mailpoet_form {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: stretch;
}

.sdl-soon .sdl-notify .mailpoet_paragraph {
	margin: 0;
}

.sdl-soon .sdl-hw-feature .sdl-notify .mailpoet_paragraph:has(.mailpoet_text) {
	flex: 1 1 240px;
	min-width: 0;
}

.sdl-soon .sdl-hw-feature .sdl-notify .mailpoet_paragraph:has(.mailpoet_submit) {
	flex: 0 1 auto;
	max-width: 100%;
}

.sdl-soon .sdl-notify input.mailpoet_text {
	width: 100%;
	min-height: var(--wp--custom--button--height-sm);
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--wp--preset--color--line-3);
	border-radius: var(--sdl-field-radius);
	background: color-mix(in srgb, var(--wp--preset--color--base) 80%, transparent);
	color: var(--wp--preset--color--text);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--16);
}

/* Messages MailPoet : zone live toujours dans l'arbre d'accessibilité, masquée visuellement quand vide.
 * Sans JS, MailPoet rend le <p> de succès sans attribut style : il reste affiché. */
.sdl-soon .sdl-notify .mailpoet_message {
	flex-basis: 100%;
	margin: 0;
	padding: 0;
}

.sdl-soon .sdl-notify .mailpoet_message:not(:has(> p:not([style*="none"]))),
.sdl-soon .sdl-notify .mailpoet_form_loading {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.sdl-soon .sdl-notify .mailpoet_message > p {
	margin: 0;
}

/* Envoyé : champ et bouton laissent place à « Vous serez prévenu ✓ », état « prévenu » de la maquette
 * (fond transparent, texte accent pâle, bordure accent). */
.sdl-soon .sdl-notify form.mailpoet_form_successfully_send > :not(.mailpoet_message) {
	display: none;
}

.sdl-soon .sdl-notify .mailpoet_message > .mailpoet_validate_success {
	position: static;
	transform: none;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	padding: 0 var(--sdl-btn-px-md);
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: var(--sdl-btn-radius);
	background: transparent;
	color: var(--wp--preset--color--accent-pale);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--sdl-btn-fs-lg);
	font-weight: 600;
	/* Hauteur du bouton (52 px) moins les bordures. */
	line-height: calc(var(--wp--custom--button--height-sm) - 2px);
	text-align: center;
}

.sdl-soon .sdl-hw-feature .sdl-notify .mailpoet_message > .mailpoet_validate_success {
	width: fit-content;
}

.sdl-soon .sdl-notify .mailpoet_validate_error,
.sdl-soon .sdl-notify .parsley-errors-list {
	color: var(--wp--preset--color--accent-soft);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--14);
}

.sdl-soon .sdl-notify .parsley-errors-list {
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}

/* Sous 500 px, la feuille MailPoet impose 16px / 1.4 !important au champ et au bouton :
 * la taille est déjà celle de la maquette (16 px), on rétablit l'interligne du bouton. */
@media (max-width: 499px) {
	.sdl-soon .sdl-notify .mailpoet_form input.mailpoet_submit {
		line-height: 1.3 !important;
	}
}
