/* NEXIS — compléments à theme.json. Couleurs et tailles : variables WordPress (--wp--preset--*). */

:root {
	--nexis-radius: 12px;
	--nexis-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- En-tête ---------- */
.nexis-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.admin-bar .nexis-header { top: var(--wp-admin--admin-bar--height, 32px); }

.nexis-topbar a { color: inherit; text-decoration: none; }
.nexis-topbar a:hover { text-decoration: underline; }

.nexis-brand .wp-block-site-title { line-height: 1.1; }
.nexis-brand .wp-block-site-tagline { margin: 0; }

@media (max-width: 781px) {
	.nexis-topbar .nexis-topbar__address { display: none; }
}

/* ---------- Typographie utilitaire ---------- */
.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--copper-text);
}
.has-navy-background-color .is-style-eyebrow,
.has-navy-dark-background-color .is-style-eyebrow,
.is-style-card-dark .is-style-eyebrow {
	color: var(--wp--preset--color--copper);
}

.has-navy-background-color :where(h1, h2, h3, h4),
.has-navy-dark-background-color :where(h1, h2, h3, h4),
.has-deep-blue-background-color :where(h1, h2, h3, h4),
.is-style-card-dark :where(h1, h2, h3, h4) {
	color: var(--wp--preset--color--white);
}
.has-navy-background-color a:where(:not(.wp-element-button)),
.has-navy-dark-background-color a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--white);
}

/* Boutons contour sur fond sombre */
:where(.has-navy-background-color, .has-navy-dark-background-color, .has-deep-blue-background-color) .is-style-outline .wp-element-button {
	color: var(--wp--preset--color--white);
}

/* ---------- Cartes ---------- */
.is-style-card,
.is-style-card-dark {
	border-radius: var(--nexis-radius);
	padding: var(--wp--preset--spacing--30);
	height: 100%;
	transition: box-shadow 0.25s var(--nexis-ease), transform 0.25s var(--nexis-ease);
}
.is-style-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
}
.is-style-card-dark {
	background: var(--wp--preset--color--navy);
	color: rgba(255, 255, 255, 0.85);
}
.is-style-card:hover { box-shadow: var(--wp--preset--shadow--card); }
.is-style-card > :first-child { margin-top: 0; }

/* Carte entièrement cliquable via son titre */
.nexis-linked-card { position: relative; }
.nexis-linked-card .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}
.nexis-linked-card:focus-within { outline: 2px solid var(--wp--preset--color--deep-blue); outline-offset: 2px; }

.wp-block-post-template.is-layout-grid > li { display: flex; }
.wp-block-post-template.is-layout-grid > li > * { flex: 1; }

/* ---------- Icônes ---------- */
.nexis-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 10px;
	background: var(--wp--preset--color--offwhite);
	color: var(--wp--preset--color--copper-text);
}
.is-style-card-dark .nexis-icon,
.has-navy-background-color .nexis-icon { background: rgba(255, 255, 255, 0.08); color: var(--wp--preset--color--copper); }

/* ---------- Listes à coches ---------- */
.is-style-checks { list-style: none; padding-left: 0; }
.is-style-checks li {
	position: relative;
	padding-left: 1.75rem;
	margin-bottom: 0.5rem;
}
.is-style-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.35em;
	width: 1.05rem;
	height: 1.05rem;
	border-radius: 50%;
	background: var(--wp--preset--color--copper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B1F33' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 0.65rem no-repeat;
}

/* ---------- Étapes (Notre approche) ---------- */
.nexis-steps { counter-reset: nexis-step; }
.nexis-step { counter-increment: nexis-step; position: relative; }
.nexis-step::before {
	content: counter(nexis-step, decimal-leading-zero);
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 800;
	color: var(--wp--preset--color--copper-text);
	margin-bottom: 0.5rem;
}
.has-navy-background-color .nexis-step::before { color: var(--wp--preset--color--copper); }

/* ---------- Chaîne de valeur (§35) ---------- */
.nexis-flow {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
	counter-reset: none;
}
.nexis-flow li {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.55rem 0.9rem;
	border: 1px solid rgba(198, 146, 74, 0.45);
	border-radius: 999px;
	color: var(--wp--preset--color--white);
}
.nexis-flow li:not(:last-child)::after {
	content: "→";
	margin-left: 0.6rem;
	color: var(--wp--preset--color--copper);
}

/* ---------- Hero ---------- */
.nexis-hero {
	background:
		radial-gradient(ellipse 60% 80% at 85% 20%, rgba(22, 78, 112, 0.55), transparent 70%),
		radial-gradient(ellipse 40% 60% at 10% 100%, rgba(198, 146, 74, 0.12), transparent 70%),
		var(--wp--preset--color--navy);
}
.nexis-hero .has-hero-font-size { text-wrap: balance; }
.nexis-hero p { color: rgba(255, 255, 255, 0.82); }

/* ---------- Mention réglementaire ---------- */
.nexis-regulatory {
	display: flex;
	gap: 0.9rem;
	align-items: flex-start;
	padding: 1rem 1.25rem;
	border-left: 4px solid var(--wp--preset--color--copper);
	background: var(--wp--preset--color--offwhite);
	border-radius: 0 var(--nexis-radius) var(--nexis-radius) 0;
	font-size: var(--wp--preset--font-size--small);
}
.nexis-regulatory svg { flex-shrink: 0; color: var(--wp--preset--color--copper-text); margin-top: 0.15rem; }
.nexis-regulatory p { margin: 0 0 0.35rem; }
.nexis-regulatory__title {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	color: var(--wp--preset--color--navy);
}

/* ---------- Partenaires ---------- */
.nexis-partner .wp-block-post-featured-image img { object-fit: contain; max-height: 64px; width: auto; }
.nexis-partner .wp-block-post-terms a {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	background: var(--wp--preset--color--offwhite);
	color: var(--wp--preset--color--deep-blue);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	text-decoration: none;
	pointer-events: none;
}

/* ---------- Formulaires (Forminator) ---------- */
.forminator-ui.forminator-custom-form {
	font-family: var(--wp--preset--font-family--body) !important;
}
.forminator-ui .forminator-button-submit {
	background: var(--wp--preset--color--navy) !important;
	color: var(--wp--preset--color--white) !important;
	font-family: var(--wp--preset--font-family--heading) !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	border-radius: 3px !important;
}

/* ---------- Pied de page ---------- */
.nexis-footer a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.nexis-footer a:hover { color: var(--wp--preset--color--copper); text-decoration: underline; }
.nexis-footer .wp-block-navigation__container { gap: 0.4rem; }

/* ---------- Bouton WhatsApp (discret) ---------- */
.nexis-whatsapp {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 60;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 1rem;
	border-radius: 999px;
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(11, 31, 51, 0.25);
}
.nexis-whatsapp svg { color: var(--wp--preset--color--copper); }
.nexis-whatsapp:hover { background: var(--wp--preset--color--deep-blue); color: var(--wp--preset--color--white); }
@media (max-width: 600px) { .nexis-whatsapp span { display: none; } .nexis-whatsapp { padding: 0.8rem; } }

/* ---------- Accessibilité / mouvement ---------- */
:where(a, button, .wp-element-button):focus-visible {
	outline: 2px solid var(--wp--preset--color--copper);
	outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Listes sans puces (pied de page) */
.is-unstyled { list-style: none; }


/* En-tête : le titre et le bouton ne se replient pas */
.nexis-brand .wp-block-site-title,
.nexis-header .wp-block-button__link { white-space: nowrap; }
@media (max-width: 1100px) and (min-width: 782px) {
	.nexis-header .wp-block-navigation { font-size: 0.8125rem; }
	.nexis-header .wp-block-navigation__container { gap: 0.9rem !important; }
}
.nexis-brand .wp-block-site-tagline,
.nexis-brand p { white-space: nowrap; }

/* ---------- Formulaires Forminator (style « aucun » : la charte NEXIS s'applique) ---------- */
.forminator-ui[data-design="none"] .forminator-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.25rem;
	margin-bottom: 1rem;
}
.forminator-ui[data-design="none"] .forminator-col { flex: 1 1 16rem; min-width: 0; }
.forminator-ui[data-design="none"] .forminator-label {
	display: block;
	margin-bottom: 0.35rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--navy);
}
.forminator-ui[data-design="none"] .forminator-required { color: var(--wp--preset--color--copper-text); }
.forminator-ui[data-design="none"] :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], select, textarea) {
	box-sizing: border-box;
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	background: var(--wp--preset--color--white);
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--anthracite);
}
.forminator-ui[data-design="none"] textarea { min-height: 7.5rem; resize: vertical; }
.forminator-ui[data-design="none"] :is(input, select, textarea):focus {
	outline: none;
	border-color: var(--wp--preset--color--deep-blue);
	box-shadow: 0 0 0 3px rgba(22, 78, 112, 0.15);
}
.forminator-ui[data-design="none"] .forminator-title {
	margin: 1rem 0 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--navy);
}
.forminator-ui[data-design="none"] :is(.forminator-description, .forminator-checkbox__label, .forminator-gdpr-label) {
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--muted);
}
.forminator-ui[data-design="none"] .forminator-description { display: block; margin-top: 0.3rem; }
.forminator-ui[data-design="none"] .forminator-error-message { color: #a3311f; font-size: var(--wp--preset--font-size--x-small); }
.forminator-ui[data-design="none"] .forminator-button-submit {
	padding: 0.9rem 1.75rem;
	border: 0;
	cursor: pointer;
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.02em;
}
.forminator-ui[data-design="none"] .forminator-button-submit:hover {
	background: var(--wp--preset--color--deep-blue) !important;
	color: var(--wp--preset--color--white) !important;
}
.forminator-ui[data-design="none"] .forminator-response-message.forminator-success {
	padding: 1rem 1.25rem;
	border-left: 4px solid var(--wp--preset--color--copper);
	background: var(--wp--preset--color--white);
}

/* Les parties d'en-tête et de pied de page collent au contenu */
.wp-site-blocks > footer.wp-block-template-part,
.wp-site-blocks > main,
.wp-site-blocks > .wp-block-group { margin-block-start: 0; }
