/* =====================================================================
 * ASTRA Agency — animations.css
 * Animations sobres : fade-in au scroll, transitions légères.
 * IMPORTANT : tout est désactivé si l'utilisateur a demandé à réduire les
 * animations (prefers-reduced-motion).
 * ===================================================================== */

/* État initial des éléments animés au scroll (classe ajoutée côté JS) */
.reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
	            transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
	will-change: opacity, transform;
}
/* Classe ajoutée par l'IntersectionObserver quand l'élément entre dans le viewport */
.reveal.is-visible {
	opacity: 1;
	transform: none;
}

/* Décalage progressif pour les éléments d'une même grille (effet d'apparition en cascade) */
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }

/* Léger pulse du cercle "projecteur" dans le hero (très subtil) */
@keyframes astra-pulse {
	0%, 100% { opacity: 0.04; }
	50%      { opacity: 0.07; }
}
.hero__bg { animation: astra-pulse 8s ease-in-out infinite; }

/* =====================================================================
 * Respect de prefers-reduced-motion : on neutralise toute animation.
 * ===================================================================== */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
	.reveal { opacity: 1; transform: none; }
	.hero__bg { animation: none; }
}
