/**
 * Du projet au chantier — 3 étapes lisibles + bâtiments illustrés
 */

html:has(.wpcursor-projet-chantier) {
	overflow-x: clip;
}

.entry-content > .wpcursor-component.wpcursor-projet-chantier,
.entry-content[data-ast-blocks-layout] > .wpcursor-component.wpcursor-projet-chantier,
.wpcursor-component.wpcursor-projet-chantier.alignfull {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	max-width: 100vw;
	width: 100vw;
}

.wpcursor-projet-chantier {
	--sr-navy: #022b60;
	--sr-orange: #fbaf3f;
	--sr-muted: #5b6b82;
	--sr-bg: #f7f6f3;
	--sr-font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
	--sr-ease: cubic-bezier(0.22, 1, 0.36, 1);
	background: var(--sr-bg);
	box-sizing: border-box;
	color: var(--sr-navy);
	font-family: var(--sr-font);
	isolation: isolate;
	overflow: clip;
	padding: clamp(3.25rem, 7vw, 5.25rem) 0 clamp(3rem, 6vw, 4.5rem);
	position: relative;
	width: 100%;
}

.wpcursor-projet-chantier *,
.wpcursor-projet-chantier *::before,
.wpcursor-projet-chantier *::after {
	box-sizing: border-box;
}

.wpcursor-projet-chantier__inner {
	width: min(1120px, calc(100% - clamp(2rem, 5vw, 3.5rem)));
	margin: 0 auto;
	position: relative;
}

/* ——— Header ——— */
.wpcursor-projet-chantier__header {
	max-width: 40rem;
	margin: 0 0 clamp(1.75rem, 4vw, 2.5rem);
}

.wpcursor-projet-chantier[data-enhanced="1"] .wpcursor-projet-chantier__header {
	opacity: 0;
	transform: translateY(0.8rem);
	transition: opacity 0.55s var(--sr-ease), transform 0.55s var(--sr-ease);
}

.wpcursor-projet-chantier[data-enhanced="1"].is-revealed .wpcursor-projet-chantier__header {
	opacity: 1;
	transform: none;
}

.wpcursor-projet-chantier__eyebrow {
	margin: 0 0 0.75rem;
	font-family: var(--sr-font);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--sr-orange) !important;
	line-height: 1.4;
}

.wpcursor-projet-chantier__title {
	margin: 0 0 0.9rem;
	font-family: var(--sr-font);
	font-size: clamp(1.5rem, 2.4vw, 2.1rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--sr-navy) !important;
}

.wpcursor-projet-chantier__intro {
	margin: 0;
	font-family: var(--sr-font);
	font-size: clamp(0.98rem, 1.15vw, 1.08rem);
	font-weight: 400;
	line-height: 1.6;
	color: var(--sr-muted);
}

/* ——— Steps : toujours lisibles ——— */
.wpcursor-projet-chantier__steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1rem, 2.5vw, 1.75rem);
}

.wpcursor-projet-chantier__step {
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
	opacity: 1;
	height: 100%;
}

.wpcursor-projet-chantier[data-enhanced="1"] .wpcursor-projet-chantier__step {
	opacity: 0;
	transform: translateY(0.9rem);
	transition: opacity 0.55s var(--sr-ease), transform 0.55s var(--sr-ease);
}

.wpcursor-projet-chantier[data-enhanced="1"] .wpcursor-projet-chantier__step:nth-child(1) {
	transition-delay: 0.05s;
}

.wpcursor-projet-chantier[data-enhanced="1"] .wpcursor-projet-chantier__step:nth-child(2) {
	transition-delay: 0.12s;
}

.wpcursor-projet-chantier[data-enhanced="1"] .wpcursor-projet-chantier__step:nth-child(3) {
	transition-delay: 0.19s;
}

.wpcursor-projet-chantier[data-enhanced="1"].is-revealed .wpcursor-projet-chantier__step {
	opacity: 1;
	transform: none;
}

.wpcursor-projet-chantier__step-top {
	display: grid;
	grid-template-columns: auto auto minmax(0, 1fr);
	gap: 0.55rem 0.7rem;
	align-items: start;
}

.wpcursor-projet-chantier__num {
	font-family: var(--sr-font);
	font-size: clamp(1.35rem, 2vw, 1.7rem);
	font-weight: 700;
	line-height: 1;
	color: var(--sr-orange);
	letter-spacing: -0.02em;
	padding-top: 0.1rem;
}

.wpcursor-projet-chantier__divider {
	width: 1px;
	align-self: stretch;
	min-height: 2.5rem;
	background: rgba(2, 43, 96, 0.18);
	margin-top: 0.25rem;
}

.wpcursor-projet-chantier__step-title {
	margin: 0 0 0.4rem;
	font-family: var(--sr-font);
	font-size: clamp(0.95rem, 1.1vw, 1.05rem);
	font-weight: 650;
	line-height: 1.3;
	color: var(--sr-navy) !important;
}

.wpcursor-projet-chantier__step-text {
	margin: 0;
	font-family: var(--sr-font);
	font-size: 0.88rem;
	font-weight: 400;
	line-height: 1.55;
	color: var(--sr-muted);
}

.wpcursor-projet-chantier__fig {
	margin: auto 0 0;
	padding: 0;
	background: transparent;
	border-radius: 0;
	overflow: visible;
	width: 100%;
}

.wpcursor-projet-chantier__building {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	object-position: center bottom;
}

.wpcursor-projet-chantier__trail {
	display: block;
	width: 100%;
	height: 3.25rem;
	margin-top: -0.35rem;
	pointer-events: none;
}

/* ——— Mobile ——— */
@media (max-width: 860px) {
	.wpcursor-projet-chantier__steps {
		grid-template-columns: 1fr;
		gap: 1.75rem;
	}

	.wpcursor-projet-chantier__fig {
		max-width: 22rem;
	}

	.wpcursor-projet-chantier__trail {
		display: none;
	}
}

/* Sans JS */
.wpcursor-projet-chantier:not([data-enhanced="1"]) .wpcursor-projet-chantier__header,
.wpcursor-projet-chantier:not([data-enhanced="1"]) .wpcursor-projet-chantier__step {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.wpcursor-projet-chantier__header,
	.wpcursor-projet-chantier__step {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}
