/**
 * Déroulement étude Normandie — fond clair, navy #022b60, orange #fbaf3f
 * Sticky scroll desktop natif · flux mobile · dossier technique illustratif
 */

html:has(.wpcursor-deroulement-normandie) {
	overflow-x: clip;
}

body:has(.wpcursor-deroulement-normandie) {
	overflow-x: clip !important;
	overflow-y: visible !important;
}

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

.wpcursor-component.wpcursor-deroulement-normandie {
	--sr-navy: #022b60;
	--sr-muted: #3d4f6a;
	--sr-orange: #fbaf3f;
	--sr-line: rgba(2, 43, 96, 0.14);
	--sr-bg: #f7f8fa;
	--sr-white: #ffffff;
	--sr-font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
	--sr-pad: max(1.25rem, env(safe-area-inset-left), env(safe-area-inset-right));
	--sr-content: 84rem;
	--sr-gutter: max(var(--sr-pad), calc((100vw - min(100vw, var(--sr-content))) / 2 + var(--sr-pad)));
	--sr-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--sr-admin-h: var(--wp-admin--admin-bar--height, 0px);
	--sr-header-h: 4.5rem;
	--sr-progress: 33%;
	background: var(--sr-bg);
	box-sizing: border-box;
	color: var(--sr-navy);
	font-family: var(--sr-font);
	position: relative;
	scroll-margin-top: 5.5rem;
	width: 100%;
}

.wpcursor-component.wpcursor-deroulement-normandie *,
.wpcursor-component.wpcursor-deroulement-normandie *::before,
.wpcursor-component.wpcursor-deroulement-normandie *::after {
	box-sizing: border-box;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__sr-only {
	border: 0;
	clip: rect(0 0 0 0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__watermark {
	color: rgba(2, 43, 96, 0.045);
	font-family: var(--sr-font);
	font-size: clamp(6rem, 18vw, 14rem);
	font-weight: 700;
	letter-spacing: -0.04em;
	line-height: 1;
	pointer-events: none;
	position: absolute;
	right: max(0.5rem, calc((100vw - min(100vw, var(--sr-content))) / 2));
	top: 1.5rem;
	user-select: none;
	z-index: 0;
}

/* ---------- Header ---------- */
.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__header {
	margin: 0 0 1.35rem;
	padding: 0;
	position: relative;
	z-index: 1;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__eyebrow {
	color: var(--sr-orange) !important;
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.35;
	margin: 0 0 1rem;
	text-transform: uppercase;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__title {
	color: var(--sr-navy) !important;
	font-family: var(--sr-font);
	font-size: clamp(1.55rem, 2.8vw, 2.15rem);
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.15;
	margin: 0 0 0.7rem;
	max-width: 22ch;
	text-wrap: balance;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__intro {
	color: var(--sr-muted) !important;
	font-size: clamp(0.95rem, 1.15vw, 1.02rem);
	line-height: 1.5;
	margin: 0;
	max-width: 34rem;
}

/* ---------- Pin / scene ---------- */
.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__pin,
.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__scene {
	width: 100%;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__scene {
	padding: clamp(2.25rem, 5vw, 3.5rem) 0 clamp(2.5rem, 5vw, 3.75rem);
	position: relative;
	z-index: 1;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__inner {
	align-items: start;
	display: grid;
	gap: clamp(1.75rem, 4vw, 3.5rem);
	grid-template-columns: 1fr;
	margin: 0 auto;
	max-width: 100%;
	padding: 0 var(--sr-gutter);
	width: 100%;
}

/* ---------- Steps ---------- */
.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__copy {
	display: flex;
	flex-direction: column;
	gap: 1.15rem;
	max-width: 32rem;
	min-width: 0;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__steps {
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__step {
	margin: 0;
	opacity: 0.42;
	transition: opacity 0.35s ease;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__step.is-active {
	opacity: 1;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__step-meta {
	align-items: baseline;
	display: inline-flex;
	gap: 0.35rem;
	margin: 0 0 0.85rem;
	position: relative;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__step-meta::after {
	background: transparent;
	bottom: -0.35rem;
	content: "";
	display: block;
	height: 2px;
	left: 0;
	position: absolute;
	transition: background-color 0.3s ease, width 0.3s ease;
	width: 0;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__step.is-active .wpcursor-deroulement-normandie__step-meta::after {
	background: var(--sr-orange);
	width: 2.1rem;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__step-num {
	color: var(--sr-orange);
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__step-total {
	color: rgba(2, 43, 96, 0.35);
	font-size: clamp(1rem, 1.8vw, 1.2rem);
	font-weight: 600;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__step-title {
	color: var(--sr-navy) !important;
	font-family: var(--sr-font);
	font-size: clamp(1.25rem, 2.2vw, 1.65rem);
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.25;
	margin: 0 0 0.65rem;
	text-wrap: balance;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__step-text {
	color: var(--sr-muted) !important;
	font-size: clamp(0.96rem, 1.2vw, 1.04rem);
	line-height: 1.55;
	margin: 0;
	max-width: 30rem;
}

/* Indicateur actif non-couleur : barre + soulignement numéro */
.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__step.is-active {
	box-shadow: inset 3px 0 0 0 var(--sr-orange);
	padding-left: 0.85rem;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__step:not(.is-active) {
	padding-left: 0.85rem;
}

/* ---------- Nav ---------- */
.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__nav {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem 0.65rem;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__nav-sep {
	color: rgba(2, 43, 96, 0.28);
	font-size: 0.85rem;
	line-height: 1;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__nav-btn {
	appearance: none;
	background: transparent;
	border: 0;
	border-bottom: 2px solid transparent;
	color: rgba(2, 43, 96, 0.45);
	cursor: pointer;
	display: inline-flex;
	font-family: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	gap: 0.35rem;
	line-height: 1.3;
	margin: 0;
	min-height: 44px;
	align-items: center;
	padding: 0.35rem 0.1rem;
	transition: color 0.25s ease, border-color 0.25s ease;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__nav-btn.is-active,
.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__nav-btn[aria-pressed="true"] {
	border-bottom-color: var(--sr-orange);
	color: var(--sr-orange);
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__nav-btn:focus-visible {
	outline: 2px solid var(--sr-orange);
	outline-offset: 3px;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__nav-num {
	font-weight: 700;
	letter-spacing: 0.04em;
}

/* ---------- Dossier ---------- */
.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__visual {
	margin: 0;
	min-width: 0;
	width: 100%;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__dossier {
	background: var(--sr-white);
	border: 1px solid rgba(2, 43, 96, 0.08);
	box-shadow: 0 18px 48px rgba(2, 43, 96, 0.08);
	padding: clamp(1.25rem, 2.5vw, 1.75rem);
	width: 100%;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__dossier-head {
	align-items: flex-start;
	display: flex;
	gap: 0.75rem;
	margin: 0 0 0.85rem;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__dossier-bar {
	background: var(--sr-orange);
	flex: 0 0 auto;
	height: 1.35rem;
	margin-top: 0.15rem;
	width: 3px;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__dossier-title {
	color: var(--sr-navy);
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.3;
	margin: 0 0 0.25rem;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__dossier-sub {
	color: rgba(2, 43, 96, 0.45);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1.35;
	margin: 0;
	text-transform: uppercase;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__dossier-rule {
	background: linear-gradient(
		90deg,
		var(--sr-orange) 0,
		var(--sr-orange) var(--sr-progress),
		rgba(2, 43, 96, 0.12) var(--sr-progress),
		rgba(2, 43, 96, 0.12) 100%
	);
	display: block;
	height: 2px;
	margin: 0 0 1.25rem;
	transition: background 0.4s var(--sr-ease);
	width: 100%;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__dossier-body {
	align-items: center;
	display: grid;
	gap: 1.25rem;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__dossier-illu {
	align-items: center;
	background: #fff;
	display: grid;
	justify-items: center;
	min-height: 12.5rem;
	position: relative;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__svg {
	aspect-ratio: 1;
	display: block;
	grid-area: 1 / 1;
	height: auto;
	max-width: 22rem;
	object-fit: contain;
	opacity: 0;
	transform: translateY(0.5rem) scale(0.98);
	transition: opacity 0.45s var(--sr-ease), transform 0.45s var(--sr-ease);
	width: 100%;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__svg.is-active {
	opacity: 1;
	transform: none;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__fields {
	display: flex;
	flex-direction: column;
	gap: 0;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__field {
	border-bottom: 1px solid var(--sr-line);
	opacity: 0.38;
	padding: 0.85rem 0;
	transition: opacity 0.35s ease;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__field:first-child {
	border-top: 1px solid var(--sr-line);
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__field.is-on {
	opacity: 1;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__field-label {
	color: var(--sr-navy);
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.3;
	margin: 0 0 0.55rem;
	padding-bottom: 0.2rem;
	position: relative;
	text-transform: uppercase;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__field.is-on .wpcursor-deroulement-normandie__field-label::after {
	background: var(--sr-orange);
	bottom: 0;
	content: "";
	display: block;
	height: 2px;
	left: 0;
	position: absolute;
	width: 100%;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__field-line {
	background: rgba(2, 43, 96, 0.12);
	display: block;
	height: 1px;
	position: relative;
	width: 100%;
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__field.is-on .wpcursor-deroulement-normandie__field-line {
	background: rgba(2, 43, 96, 0.18);
}

.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__figcap {
	margin: 0;
}

/* ---------- Desktop layout ---------- */
@media (min-width: 992px) {
	.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__inner {
		align-items: center;
		grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
	}

	/* Sticky : une étape dominante */
	/* Étapes empilées dans une même cellule : hauteur stable entre les étapes */
	.wpcursor-component.wpcursor-deroulement-normandie.is-sticky .wpcursor-deroulement-normandie__steps {
		display: grid;
	}

	.wpcursor-component.wpcursor-deroulement-normandie.is-sticky .wpcursor-deroulement-normandie__step {
		box-shadow: none;
		grid-area: 1 / 1;
		padding-left: 0;
	}

	.wpcursor-component.wpcursor-deroulement-normandie.is-sticky .wpcursor-deroulement-normandie__step:not(.is-active) {
		opacity: 0;
		pointer-events: none;
		visibility: hidden;
	}
}

/*
 * Sticky desktop — scène à hauteur de contenu.
 * Le script fixe la hauteur du pin (contenu + parcours) et le `top` sticky
 * (centrage vertical sous le header) : pas de vide en entrée ni en sortie.
 */
@media (min-width: 992px) and (min-height: 620px) {
	.wpcursor-component.wpcursor-deroulement-normandie.is-sticky .wpcursor-deroulement-normandie__scene {
		padding: 1.5rem 0;
		position: sticky;
		top: calc(var(--sr-admin-h) + var(--sr-header-h));
	}

	.wpcursor-component.wpcursor-deroulement-normandie.is-sticky .wpcursor-deroulement-normandie__inner {
		align-items: start;
	}

	/* Illustration dimensionnée sur la hauteur d’écran disponible */
	.wpcursor-component.wpcursor-deroulement-normandie.is-sticky .wpcursor-deroulement-normandie__svg {
		max-width: clamp(15rem, calc(100vh - 24rem), 24rem);
	}
}

/* ---------- Mobile : flux normal, pas de sticky ---------- */
@media (max-width: 991px) {
	.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__watermark {
		font-size: 5.5rem;
		opacity: 0.8;
		right: var(--sr-pad);
		top: 0.75rem;
	}

	.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__step {
		opacity: 1;
	}

	.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__step:not(.is-active) .wpcursor-deroulement-normandie__step-meta::after {
		display: none;
	}

	.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__dossier-body {
		grid-template-columns: 1fr;
	}

	.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__dossier-illu {
		min-height: 9.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__step,
	.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__svg,
	.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__field,
	.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__nav-btn,
	.wpcursor-component.wpcursor-deroulement-normandie .wpcursor-deroulement-normandie__dossier-rule {
		transition: none !important;
	}

	.wpcursor-component.wpcursor-deroulement-normandie.is-sticky .wpcursor-deroulement-normandie__pin {
		height: auto !important;
	}

	.wpcursor-component.wpcursor-deroulement-normandie.is-sticky .wpcursor-deroulement-normandie__scene {
		height: auto !important;
		position: relative !important;
		top: auto !important;
	}

	.wpcursor-component.wpcursor-deroulement-normandie.is-sticky .wpcursor-deroulement-normandie__steps {
		display: flex;
	}

	.wpcursor-component.wpcursor-deroulement-normandie.is-sticky .wpcursor-deroulement-normandie__step:not(.is-active) {
		opacity: 1;
		visibility: visible;
	}
}
