/* Euroweb Digital child theme — fade-in animation for all H1.
 * Cible aussi les H1 injectés par le widget Nova Title.
 * Approche CSS pure :
 *  - animation auto-déclenchée à la première peinture du h1 ;
 *  - utilise des !important légers pour gagner contre d'éventuels styles inline
 *    posés par le widget Nova Title (`opacity` / `transform`) ;
 *  - respect de `prefers-reduced-motion`.
 */

@keyframes hera-h1-fade-in {
	0% {
		opacity: 0;
		transform: translateY(14px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

h1 {
	animation: hera-h1-fade-in 900ms cubic-bezier(0.21, 0.61, 0.36, 1) both;
	will-change: opacity, transform;
}

/* Cas Nova Title : le widget conteneur peut s'auto-animer (opacity inline).
 * On s'assure que le H1 lui-même garde son fade en propre.
 */
.elementor-widget-nova-title .nova-title-text-1 h1,
.nova-title-text-1 > h1 {
	animation: hera-h1-fade-in 900ms cubic-bezier(0.21, 0.61, 0.36, 1) both;
	will-change: opacity, transform;
}

/* Empêche un "flash" si Nova Title applique son propre fade sur le wrapper :
 * on laisse l'animation parent passer, et on déclenche celle du h1 juste après.
 */
.elementor-widget-nova-title.animated .nova-title-text-1 h1,
.elementor-widget-nova-title .nova-title-text-1 h1 {
	animation-delay: 80ms;
}

@media (prefers-reduced-motion: reduce) {
	h1,
	.elementor-widget-nova-title .nova-title-text-1 h1,
	.nova-title-text-1 > h1 {
		animation: none;
		opacity: 1;
		transform: none;
	}
}
