/* ============================================================
   Effets au scroll — apparition des sections + lien actif menu
   CSS pur (scroll-driven animations) avec fallback gracieux.
   ============================================================ */

/* --- Fade-in / slide-up des sections du contenu --- */
@supports (animation-timeline: view()) {

	.et_pb_section:not([class*="tb_header"]):not([class*="tb_footer"]) {
		animation: vo-section-reveal linear both;
		animation-timeline: view();
		animation-range: entry 0% cover 25%;
	}

	@keyframes vo-section-reveal {
		from {
			opacity: 0;
			transform: translateY(40px);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}
}

/* --- Lien actif dans le menu (classe ajoutée par scroll-active.js) --- */
.et_pb_menu .vo-menu-active,
.et_pb_menu .vo-menu-active:hover {
	color: var(--color-secondary) !important;
}

.et_pb_menu .vo-menu-active::after {
	content: "";
	display: block;
	height: 2px;
	background-color: var(--color-secondary);
	margin-top: 4px;
	animation: vo-menu-underline 0.35s ease both;
	transform-origin: left center;
}

@keyframes vo-menu-underline {
	from { transform: scaleX(0); }
	to   { transform: scaleX(1); }
}

/* --- Neutralisation dans le builder Divi --- */
body.et-fb .et_pb_section,
body.et-db .et_pb_section {
	animation: none !important;
	opacity: 1 !important;
	transform: none !important;
}

/* --- Respect des préférences utilisateur --- */
@media (prefers-reduced-motion: reduce) {

	.et_pb_section {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}

	.et_pb_menu .vo-menu-active::after {
		animation: none !important;
	}
}
