/**
 * Avant de recommander — À propos : fond clair, photo toiture + annotations HTML, scan décoratif.
 */
html:has(.wpcursor-avant-recommander) {
	overflow-x: clip;
}

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

.wpcursor-component.wpcursor-avant-recommander {
	--sr-navy: #022b60;
	--sr-orange: #fbaf3f;
	--sr-cream: #f3f5f8;
	--sr-muted: rgba(2, 43, 96, 0.72);
	--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);
	background: var(--sr-cream);
	box-sizing: border-box;
	color: var(--sr-navy);
	font-family: var(--sr-font);
	overflow: clip;
	padding: clamp(3.5rem, 8vw, 6.25rem) 0;
	scroll-margin-top: 5.5rem;
	width: 100%;
}

.wpcursor-component.wpcursor-avant-recommander *,
.wpcursor-component.wpcursor-avant-recommander *::before,
.wpcursor-component.wpcursor-avant-recommander *::after {
	box-sizing: border-box;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__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-avant-recommander .wpcursor-avant-recommander__inner {
	margin: 0 auto;
	max-width: 100%;
	padding: 0 var(--sr-gutter);
	width: 100%;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__layout {
	align-items: center;
	display: grid;
	gap: clamp(2rem, 4.5vw, 3.75rem);
	grid-template-columns: 1fr;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__copy {
	max-width: 28rem;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__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-avant-recommander .wpcursor-avant-recommander__title {
	color: var(--sr-navy) !important;
	font-family: var(--sr-font);
	font-size: clamp(1.7rem, 3.3vw, 2.55rem);
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.14;
	margin: 0 0 1.1rem;
	max-width: 14ch;
	text-wrap: balance;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__rule {
	background: var(--sr-orange);
	display: block;
	height: 2px;
	margin: 0 0 1.15rem;
	width: 2.75rem;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__text {
	color: var(--sr-muted) !important;
	font-size: clamp(1rem, 1.25vw, 1.08rem);
	line-height: 1.65;
	margin: 0 0 1.75rem;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__note {
	border-left: 3px solid var(--sr-orange);
	color: var(--sr-navy) !important;
	font-size: clamp(0.95rem, 1.15vw, 1.02rem);
	font-weight: 500;
	line-height: 1.5;
	margin: 0;
	padding: 0.1rem 0 0.1rem 1rem;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__note--mobile {
	display: none;
	margin-top: 1.75rem;
}

/* ---------- Visual ---------- */
.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__visual {
	margin: 0;
	min-width: 0;
	width: 100%;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__frame {
	aspect-ratio: 16 / 9;
	isolation: isolate;
	overflow: visible;
	position: relative;
	width: 100%;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__img {
	border-radius: 0.35rem;
	display: block;
	height: 100%;
	object-fit: cover;
	object-position: 55% 40%;
	width: 100%;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__scan {
	background: linear-gradient(
		100deg,
		transparent 0%,
		transparent 44%,
		rgba(251, 175, 63, 0.06) 48%,
		rgba(251, 175, 63, 0.55) 50%,
		rgba(251, 175, 63, 0.06) 52%,
		transparent 56%,
		transparent 100%
	);
	border-radius: 0.35rem;
	bottom: 0;
	clip-path: inset(0 round 0.35rem);
	left: 0;
	opacity: 0;
	overflow: hidden;
	pointer-events: none;
	position: absolute;
	right: 0;
	top: 0;
	transform: translateX(-50%) skewX(-10deg);
	z-index: 2;
}

.wpcursor-component.wpcursor-avant-recommander.is-scan .wpcursor-avant-recommander__scan {
	animation: sr-avant-scan 1.35s var(--sr-ease) both;
}

@keyframes sr-avant-scan {
	0% {
		opacity: 0;
		transform: translateX(-58%) skewX(-10deg);
	}
	16% {
		opacity: 1;
	}
	84% {
		opacity: 1;
	}
	100% {
		opacity: 0;
		transform: translateX(58%) skewX(-10deg);
	}
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__leaders {
	height: 100%;
	inset: 0;
	pointer-events: none;
	position: absolute;
	width: 100%;
	z-index: 3;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__leader {
	opacity: 0.85;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__markers {
	inset: 0;
	list-style: none;
	margin: 0;
	padding: 0;
	pointer-events: none;
	position: absolute;
	z-index: 4;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__marker {
	left: 0;
	margin: 0;
	opacity: 0;
	position: absolute;
	top: 0;
	transform: translateY(0.35rem);
	transition:
		opacity 0.55s var(--sr-ease),
		transform 0.55s var(--sr-ease);
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__marker.is-on {
	opacity: 1;
	transform: none;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__hotspot {
	background: var(--sr-orange);
	border-radius: 50%;
	box-shadow: 0 0 0 4px rgba(251, 175, 63, 0.28);
	height: 0.55rem;
	left: var(--sr-mx);
	position: absolute;
	top: var(--sr-my);
	transform: translate(-50%, -50%);
	width: 0.55rem;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__pulse {
	animation: sr-avant-pulse 2s ease-out infinite;
	border: 1.5px solid rgba(251, 175, 63, 0.7);
	border-radius: 50%;
	height: 1.35rem;
	left: 50%;
	opacity: 0;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 1.35rem;
}

@keyframes sr-avant-pulse {
	0% {
		opacity: 0.7;
		transform: translate(-50%, -50%) scale(0.55);
	}
	100% {
		opacity: 0;
		transform: translate(-50%, -50%) scale(1.55);
	}
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__annotation {
	background: rgba(255, 255, 255, 0.94);
	border-radius: 0.25rem;
	box-shadow: 0 6px 18px rgba(2, 43, 96, 0.1);
	box-sizing: border-box;
	color: var(--sr-navy) !important;
	font-size: clamp(0.72rem, 1.05vw, 0.82rem);
	left: var(--sr-lx);
	line-height: 1.3;
	margin: 0;
	max-width: min(22rem, calc(100% - 1.25rem));
	overflow: hidden;
	padding: 0.45rem 0.75rem;
	position: absolute;
	top: var(--sr-ly);
	transform: translate(0, -50%);
	white-space: nowrap;
	width: max-content;
}

/* Étiquette basse : ancrée à droite pour contenir tout le texte */
.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__marker[data-sr-avant-index="2"] .wpcursor-avant-recommander__annotation {
	left: auto;
	right: 0.85rem;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__kicker {
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__detail {
	font-weight: 500;
	opacity: 0.85;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__sep {
	opacity: 0.55;
}

/* Liste mobile (sous image) */
.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__list {
	display: none;
	gap: 0.75rem;
	list-style: none;
	margin: 1.15rem 0 0;
	padding: 0;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__list-item {
	align-items: flex-start;
	color: var(--sr-navy);
	display: flex;
	font-size: 0.92rem;
	gap: 0.65rem;
	line-height: 1.4;
}

.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__list-dot {
	background: var(--sr-orange);
	border-radius: 50%;
	box-shadow: 0 0 0 3px rgba(251, 175, 63, 0.22);
	flex: 0 0 auto;
	height: 0.5rem;
	margin-top: 0.35rem;
	width: 0.5rem;
}

/* Desktop */
@media (min-width: 992px) {
	.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__layout {
		align-items: stretch;
		grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.25fr);
	}

	.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__copy {
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding: 0.5rem 0;
	}

	.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__note--desktop {
		margin-top: auto;
		padding-top: 2rem;
	}
}

/* Mobile */
@media (max-width: 991px) {
	.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__title {
		max-width: none;
	}

	.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__note--desktop {
		display: none;
	}

	.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__note--mobile {
		display: block;
	}

	.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__markers,
	.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__leaders {
		display: none;
	}

	.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__list {
		display: grid;
	}

	.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__annotation {
		white-space: normal;
	}
}

/* Révélations */
@media (prefers-reduced-motion: no-preference) {
	.wpcursor-component.wpcursor-avant-recommander:not(.is-inview) [data-sr-avant-reveal] {
		opacity: 0;
		transform: translateY(0.8rem);
	}

	.wpcursor-component.wpcursor-avant-recommander.is-inview [data-sr-avant-reveal] {
		opacity: 1;
		transform: none;
		transition:
			opacity 0.85s var(--sr-ease),
			transform 0.85s var(--sr-ease);
	}

	.wpcursor-component.wpcursor-avant-recommander:not(.is-inview) .wpcursor-avant-recommander__frame {
		opacity: 0.7;
		transform: translateY(0.5rem);
	}

	.wpcursor-component.wpcursor-avant-recommander.is-inview .wpcursor-avant-recommander__frame {
		opacity: 1;
		transform: none;
		transition:
			opacity 0.9s var(--sr-ease) 0.08s,
			transform 0.9s var(--sr-ease) 0.08s;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wpcursor-component.wpcursor-avant-recommander [data-sr-avant-reveal],
	.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__frame,
	.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__marker {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}

	.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__scan,
	.wpcursor-component.wpcursor-avant-recommander .wpcursor-avant-recommander__pulse {
		animation: none !important;
		opacity: 0 !important;
	}

	.wpcursor-component.wpcursor-avant-recommander [data-sr-avant-leader] {
		stroke-dasharray: none !important;
		stroke-dashoffset: 0 !important;
	}
}
