/**
 * Bloc « Proche de chez vous » (webecom/proche-de-vous).
 *
 * Bloc « image + texte » générique en 2 colonnes. À l'origine dédié à
 * l'accueil (remplace `.territoire-grid`), étendu pour être réutilisé pour
 * toute section « image + texte » (fond réglable, position de l'image,
 * liste à puces optionnelle, CTA optionnel sous l'image). Styles scopés à
 * .wb-proche-de-vous, tokens theme.json. Kicker/coches en `accent-ink`
 * (posés sur fond clair, cf. précédent WCAG AA de agenda-interentreprise).
 */

.wb-proche-de-vous {
	padding-block: var( --wp--preset--spacing--section );
	padding-inline: var( --wp--preset--spacing--50 );
}

/* Neutralise le margin-block-start injecté par le layout constrained natif
   (`:root :where(.is-layout-constrained) > *`) : section pleine largeur qui
   doit coller au bloc précédent, sans espace au-dessus. */
:root .wb-proche-de-vous {
	margin-block-start: 0;
}

.wb-proche-de-vous--bg-surface-warm {
	background: var( --wp--preset--color--surface-warm );
}

.wb-proche-de-vous--bg-base {
	background: var( --wp--preset--color--base );
}

.wb-proche-de-vous__inner {
	width: 100%;
	max-width: var( --wp--style--global--wide-size, 1080px );
	margin-inline: auto;
	display: grid;
	grid-template-columns: 0.95fr 1.05fr;
	gap: clamp( 1.5rem, 5vw, 3.5rem );
	align-items: center;
}

/* Image à droite : la vignette média reste 1ʳᵉ dans le DOM (lecture/a11y
   inchangée), seul l'ordre visuel est inversé. */
.wb-proche-de-vous--media-right .wb-proche-de-vous__inner {
	grid-template-columns: 1.05fr 0.95fr;
}

.wb-proche-de-vous--media-right .wb-proche-de-vous__media {
	order: 2;
}

.wb-proche-de-vous--media-right .wb-proche-de-vous__content {
	order: 1;
}

.wb-proche-de-vous__media img {
	width: 100%;
	height: auto;
	border-radius: var( --wp--custom--radius--md );
	box-shadow: var( --wp--custom--shadow--soft );
}

.wb-proche-de-vous__media-cta {
	text-align: center;
	margin-top: 1.25rem;
}

.wb-proche-de-vous__media-cta-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var( --wp--preset--font-family--heading );
	font-weight: 600;
	font-size: 0.9375rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var( --wp--preset--color--primary );
	background: transparent;
	border: 2px solid var( --wp--preset--color--primary );
	border-radius: var( --wp--custom--radius--sm, 6px );
	padding: 0.85rem 1.5rem;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.wb-proche-de-vous__media-cta-link:hover {
	background: var( --wp--preset--color--primary );
	color: var( --wp--preset--color--base );
}

.wb-proche-de-vous__kicker {
	margin: 0 0 0.75rem;
	font-family: var( --wp--preset--font-family--heading );
	font-weight: 600;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 4px;
	color: var( --wp--preset--color--accent-ink );
}

.wb-proche-de-vous__heading {
	margin-bottom: 0.9rem;
}

.wb-proche-de-vous__body {
	max-width: 52ch;
	margin: 0 0 1.6rem;
	color: var( --wp--preset--color--neutral );
}

.wb-proche-de-vous__list {
	list-style: none;
	margin: -0.6rem 0 1.75rem;
	padding: 0;
	display: grid;
	gap: 0.8rem;
}

.wb-proche-de-vous__list li {
	display: flex;
	gap: 0.7rem;
	align-items: flex-start;
	font: 600 0.9375rem var( --wp--preset--font-family--heading );
	color: var( --wp--preset--color--primary );
}

.wb-proche-de-vous__list svg {
	width: 20px;
	height: 20px;
	stroke: var( --wp--preset--color--accent-ink );
	flex: none;
	margin-top: 2px;
}

.wb-proche-de-vous__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var( --wp--preset--font-family--heading );
	font-weight: 600;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var( --wp--preset--color--base );
	background: var( --wp--preset--color--accent );
	border-radius: var( --wp--custom--radius--sm, 6px );
	padding: 0.85rem 1.5rem;
	text-decoration: none;
}

@media ( max-width: 900px ) {
	.wb-proche-de-vous__inner,
	.wb-proche-de-vous--media-right .wb-proche-de-vous__inner {
		grid-template-columns: 1fr;
	}

	.wb-proche-de-vous--media-right .wb-proche-de-vous__media,
	.wb-proche-de-vous--media-right .wb-proche-de-vous__content {
		order: initial;
	}
}

/* Aperçu éditeur */
.wb-proche-de-vous__media-wrap {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.wb-proche-de-vous__media-wrap img {
	width: 100%;
	border-radius: var( --wp--custom--radius--md );
}

.wb-proche-de-vous__editor-row {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid var( --wp--preset--color--surface );
}
