/* Nexafresh — mise en page des sections. Couleurs et polices : theme.json. */

:root {
	--nx-navy: var(--wp--preset--color--navy, #182245);
	--nx-navy-dark: var(--wp--preset--color--navy-dark, #10183a);
	--nx-leaf: var(--wp--preset--color--leaf, #729167);
	--nx-leaf-dark: var(--wp--preset--color--leaf-dark, #4a6b41);
	--nx-mint: var(--wp--preset--color--mint, #f2f5ef);
	--nx-muted: var(--wp--preset--color--muted, #4b5168);
	--nx-line: var(--wp--preset--color--line, #e3e7ee);
	--nx-head: var(--wp--preset--font-family--montserrat, Montserrat, sans-serif);
	--nx-gutter: clamp(1rem, 4vw, 2rem);
}

body { margin: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* ---------- Structure */
.nx-wrap {
	box-sizing: border-box;
	width: 100%;
	max-width: calc(1240px + 2 * var(--nx-gutter));
	margin-inline: auto !important;
	padding-inline: var(--nx-gutter);
}
.nx-main { margin-block: 0; }
.nx-main > .wp-block-post-content > .alignfull,
.nx-main > .wp-block-post-content > .alignfull + * { margin-block-start: 0; }
.nx-main > .wp-block-post-content > :not(.alignfull):last-child { margin-bottom: clamp(3.5rem, 8vw, 6rem); }
.nx-main > .wp-block-post-content > .alignfull + :not(.alignfull) { margin-top: clamp(2.5rem, 6vw, 4rem); }
.nx-main > .wp-block-post-content > h2:not(:first-child) { margin-top: 2.5rem; font-size: 1.35rem; }
.nx-main-default { padding-block: clamp(3rem, 7vw, 5rem); }

.nx-section { padding-block: clamp(4rem, 8vw, 6.5rem); }
.nx-section .nx-wrap > * + * { margin-block-start: 0; }
.nx-bg-navy { background: var(--nx-navy); color: #fff; }
.nx-bg-navy :where(h1, h2, h3) { color: #fff; }
.nx-bg-navy a:where(:not(.wp-element-button)) { color: #fff; }
.nx-bg-mint { background: var(--nx-mint); }
.nx-bg-leaf { background: var(--nx-leaf-dark); color: #fff; }
.nx-bg-leaf :where(h1, h2, h3) { color: #fff; }

/* ---------- Titres et textes */
.nx-kicker {
	font-family: var(--nx-head);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--nx-leaf-dark);
	margin: 0 0 0.9rem;
}
.nx-kicker-light { color: #b9d1af; }
.nx-section h2 { margin: 0 0 1rem; }
.nx-section h2 + :not(p) { margin-top: 2.75rem; }
.nx-h2-wide { max-width: 760px; }
.nx-intro { font-size: 1.15rem; color: var(--nx-muted); max-width: 760px; margin: 0 0 2.75rem; }
.nx-lead { font-size: 1.2rem; color: #c9cfe0; max-width: 560px; }
.nx-section:not(.nx-bg-navy) .nx-lead { color: var(--nx-muted); }

/* ---------- Boutons */
.wp-block-button.nx-btn-leaf .wp-block-button__link { background: var(--nx-leaf-dark); color: #fff; }
.wp-block-button.nx-btn-leaf .wp-block-button__link:hover { background: #3c5935; }
.wp-block-button.nx-btn-navy .wp-block-button__link { background: var(--nx-navy); color: #fff; }
.wp-block-button.nx-btn-ghost .wp-block-button__link { background: transparent; color: #fff; border: 1.5px solid #6d779a; }
.wp-block-button.nx-btn-ghost .wp-block-button__link:hover { border-color: #fff; }
.nx-btn-wa .wp-block-button__link::before {
	content: "";
	display: inline-block;
	width: 1.1em; height: 1.1em;
	margin-right: 0.55em;
	vertical-align: -0.2em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-12.6 7.3L3 21l2.3-5.3A8.4 8.4 0 1 1 21 11.5z'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-12.6 7.3L3 21l2.3-5.3A8.4 8.4 0 1 1 21 11.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- En-tête */
.nx-header { background: #fff; border-bottom: 1px solid var(--nx-line); }
.nx-header-row { padding-block: 1rem; align-items: center; }
.nx-header .wp-block-site-logo img { width: 190px; height: auto; }
.nx-nav { font-family: var(--nx-head); font-size: 0.9rem; font-weight: 600; gap: 1.75rem; }
.nx-nav a { color: var(--nx-navy); text-decoration: none; }
.nx-nav a:hover { color: var(--nx-leaf-dark); }
.nx-nav .nx-nav-cta > a { background: var(--nx-navy); color: #fff !important; padding: 0.75rem 1.2rem; border-radius: 6px; }
.nx-nav .nx-nav-cta > a:hover { background: var(--nx-navy-dark); }
.nx-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 2rem var(--nx-gutter); }
.nx-nav .is-menu-open .wp-block-navigation-item { font-size: 1.15rem; }

/* ---------- Héros */
.nx-hero { padding: 0; overflow: hidden; }
.nx-hero-cols { gap: 0 !important; margin: 0 auto !important; align-items: stretch !important; }
.nx-hero-text { padding-block: clamp(3.5rem, 8vw, 6rem); padding-right: clamp(0px, 4vw, 3.5rem); align-self: center; }
.nx-hero-text h1 { color: #fff; margin: 0 0 1.5rem; }
.nx-hero-text .wp-block-buttons { margin-top: 2rem; }
.nx-hero-media { position: relative; min-height: 420px; }
.nx-hero-media .wp-block-image { position: absolute; inset: 0; margin: 0; }
.nx-hero-media .wp-block-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nx-hero-small { padding-block: clamp(3.5rem, 7vw, 5rem); }
.nx-hero-small h1 { margin: 0 0 1rem; }

/* ---------- Bandeau arguments */
.nx-ticks { padding-block: 1.6rem; border-bottom: 1px solid #e1e8dc; }
.nx-ticks-grid { gap: 1.25rem; }
.nx-tick {
	margin: 0;
	font-family: var(--nx-head);
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--nx-navy);
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.nx-tick::before, .nx-checks li::before {
	content: "";
	flex: 0 0 auto;
	width: 1.15em; height: 1.15em;
	background: var(--nx-leaf-dark);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Étapes */
.nx-steps { gap: 1.75rem; }
.nx-step { border-top: 3px solid var(--nx-navy); padding-top: 1.35rem; }
.nx-step:last-child { border-top-color: var(--nx-leaf); }
.nx-step > * { margin: 0; }
.nx-step-num { font-family: var(--nx-head); font-size: 1.85rem; font-weight: 800; color: var(--nx-leaf-dark); }
.nx-step h3 { margin: 0.6rem 0 0.5rem; font-size: 1.1rem; }
.nx-step p:last-child { font-size: 0.97rem; color: var(--nx-muted); }

/* ---------- Formules */
.nx-formules { gap: 1.75rem; }
.nx-formule { background: #fff; border: 1px solid #dfe4ea; border-radius: 12px; padding: clamp(1.75rem, 4vw, 2.75rem); }
.nx-formule > * { margin: 0; }
.nx-formule h3 { font-size: 1.75rem; margin: 1.3rem 0 0.75rem; }
.nx-formule > p:not(.nx-badge) { color: var(--nx-muted); margin-bottom: 1.5rem; }
.nx-formule-dark { background: var(--nx-navy); border-color: var(--nx-navy); color: #fff; }
.nx-formule-dark h3 { color: #fff; }
.nx-formule-dark > p:not(.nx-badge) { color: #c9cfe0; }
.nx-formule-dark .wp-block-buttons { margin-top: 1.5rem; }
.nx-badge {
	display: inline-block;
	background: var(--nx-leaf-dark);
	color: #fff;
	font-family: var(--nx-head);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 0.45rem 0.75rem;
	border-radius: 4px;
}
.nx-badge-light { background: #e8eef5; color: var(--nx-navy); }
.nx-checks { list-style: none; margin: 0; padding: 0; }
.nx-checks li { border-top: 1px solid var(--nx-line); padding: 0.8rem 0; display: flex; gap: 0.75rem; align-items: baseline; }
.nx-checks li::before { transform: translateY(0.18em); }
.nx-formule-dark .nx-checks li { border-top-color: #343e66; }
.nx-formule-dark .nx-checks li::before { background: #b9d1af; }
.nx-split .nx-checks { margin-top: 1.5rem; }

/* ---------- Produits */
.nx-products { gap: 1.75rem; }
.nx-product { border: 1px solid var(--nx-line); border-radius: 12px; overflow: hidden; background: #fff; }
.nx-product > * { margin: 0 !important; }
.nx-product .wp-block-image img { width: 100%; height: 240px; object-fit: cover; display: block; }
.nx-product-body { padding: 1.35rem 1.5rem 1.6rem; }
.nx-product-body > * { margin: 0; }
.nx-product-body h3 { font-size: 1.2rem; margin-bottom: 0.35rem; }
.nx-product-body p { color: var(--nx-muted); font-size: 0.97rem; }
.nx-product-body .nx-season {
	margin-top: 0.75rem;
	font-family: var(--nx-head);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--nx-leaf-dark);
}
.nx-note { margin-top: 2.25rem !important; background: var(--nx-mint); border-radius: 8px; padding: 1.25rem 1.5rem; }
.nx-note strong { font-family: var(--nx-head); color: var(--nx-navy); }

/* ---------- Bandeau vert */
.nx-section-band { padding-block: clamp(3rem, 6vw, 4rem); }
.nx-band { align-items: center; gap: 1.75rem; }
.nx-band-text { flex: 1 1 520px; }
.nx-band-text > * { margin: 0; }
.nx-band-text h2 { margin: 0 0 0.6rem; font-size: clamp(1.6rem, 3vw, 2rem); }
.nx-band-text p:last-child { font-size: 1.1rem; color: #eef4ea; }

/* ---------- Références */
.nx-refs { gap: 1rem; }
.nx-refs .wp-block-image { margin: 0; }
.nx-refs .wp-block-image img { width: 100%; height: 220px; object-fit: cover; border-radius: 10px; display: block; }

/* ---------- Tuiles (épicerie) */
.nx-tiles { gap: 1.5rem; }
.nx-tile { background: #fff; border-radius: 12px; padding: 1.75rem; }
.nx-tile > * { margin: 0; }
.nx-tile h3 { margin-bottom: 0.5rem; }
.nx-tile p { color: var(--nx-muted); }
.nx-tile-line { border: 1px solid var(--nx-line); border-top: 3px solid var(--nx-navy); border-radius: 0 0 12px 12px; }
.nx-split { gap: clamp(2rem, 5vw, 4rem) !important; }

/* ---------- Contact */
.nx-contact-cols { gap: clamp(2.5rem, 6vw, 4rem) !important; margin: 0 !important; }
.nx-contact-text > * { margin-top: 0; }
.nx-contact-text .wp-block-buttons { margin-top: 2rem; }
.nx-coords { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid #343e66; }
.nx-coords > * { margin: 0 0 0.6rem; }
.nx-coords-name { font-family: var(--nx-head); font-weight: 700; font-size: 1.1rem; }
.nx-contact-page .nx-coords { border-top-color: var(--nx-line); }
.nx-contact-page .nx-coords-name { color: var(--nx-navy); }
.nx-form-card { background: #fff; color: var(--wp--preset--color--ink, #1c2238); border-radius: 12px; padding: clamp(1.5rem, 4vw, 2.5rem); }
.nx-contact-page .nx-form-card { border: 1px solid var(--nx-line); }
.nx-form-card h3 { color: var(--nx-navy) !important; margin: 0 0 1rem; font-size: 1.35rem; }

/* ---------- Formulaire */
.nx-form p { margin: 0 0 1rem; }
.nx-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 1rem; }
.nx-form label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--nx-navy); }
.nx-form input, .nx-form textarea {
	box-sizing: border-box;
	width: 100%;
	font: inherit;
	padding: 0.75rem 0.9rem;
	border: 1px solid #b8c0d1;
	border-radius: 6px;
	background: #fff;
	color: inherit;
}
.nx-form input:focus, .nx-form textarea:focus { outline: 2px solid var(--nx-leaf-dark); outline-offset: 1px; border-color: var(--nx-leaf-dark); }
.nx-form textarea { resize: vertical; }
.nx-form .nx-form-submit { border: 0; cursor: pointer; min-height: 48px; }
.nx-form-legal { font-size: 0.85rem; color: var(--nx-muted); }
.nx-form-legal a { color: var(--nx-navy) !important; }
.nx-hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }
.nx-form-msg { padding: 0.9rem 1rem; border-radius: 6px; font-weight: 600; }
.nx-form-ok { background: #e7f0e3; color: #2f4a29; }
.nx-form-err { background: #fbe9e7; color: #8a2a1d; }

/* ---------- Pied de page */
.nx-footer { background: var(--nx-navy-dark); color: #b3bbd2; font-size: 0.9rem; }
.nx-footer-row { padding-block: 1.75rem; gap: 1rem; }
.nx-footer p { margin: 0; }
.nx-footer a { color: #dfe4f0; }
.nx-footer a:hover { color: #fff; }

/* ---------- Mobile */
@media (max-width: 781px) {
	.nx-hero-text { padding-right: 0; padding-bottom: 2.5rem; }
	.nx-hero-media { min-height: 280px; margin-inline: calc(-1 * var(--nx-gutter)); }
	.nx-header .wp-block-site-logo img { width: 150px; }
	.nx-product .wp-block-image img { height: 210px; }
}
