/* Epifyt Motion — styles de base
 * La classe html.em-js n'est posée que si les animations sont actives
 * (pas de « réduire les animations », pas d'éditeur). Sans elle, rien n'est masqué. */

/* Pré-masquage avant l'animation (évite le clignotement) */
html.em-js [data-em-h]:not(.em-done),
html.em-js :is(.em-fade, .em-fade-up, .em-fade-down, .em-fade-left, .em-fade-right, .em-zoom, .em-blur, .em-reveal, .em-lines, .em-words, .em-chars, .em-counter, .em-image-reveal):not(.em-done) {
	opacity: 0;
}

html.em-js :is([data-em-hc], .em-stagger):not(.em-kids-done) > :not(.e-con-inner, style, script),
html.em-js :is([data-em-hc], .em-stagger):not(.em-kids-done) > .e-con-inner > * {
	opacity: 0;
}

/* Découpage du texte : chaque mot dans un masque */
.em-wm {
	display: inline-block;
	overflow: hidden;
	vertical-align: top;
	/* marge pour accents et jambages (É, g, p) */
	padding: 0.12em 0;
	margin: -0.12em 0;
}

.em-wi,
.em-c {
	display: inline-block;
	will-change: transform;
}

.em-fill .em-wm {
	overflow: visible;
}

.em-fill .em-wi {
	transition: opacity 0.1s linear;
	will-change: opacity;
}

.em-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Compteurs : chiffres à chasse fixe */
.em-num {
	font-variant-numeric: tabular-nums;
}

/* Dévoilement d'image / parallaxe */
.em-clip {
	overflow: hidden;
}

a.em-clip,
span.em-clip {
	display: inline-block;
	vertical-align: top;
}

/* Header intelligent */
.em-sh {
	z-index: 999;
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease, box-shadow 0.3s ease;
}

.em-sh-sticky {
	position: sticky;
	top: 0;
}

.em-sh-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
}

body.admin-bar .em-sh-sticky,
body.admin-bar .em-sh-overlay {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar .em-sh-sticky,
	body.admin-bar .em-sh-overlay {
		top: 46px;
	}
}

.em-sh.em-sh-hidden {
	transform: translateY(-100%);
}

/* Vidéo pilotée par le scroll */
.em-sv {
	height: var(--em-len, 300vh) !important;
	min-height: 0 !important;
	overflow: visible !important;
	display: block !important;
}

.em-sv-stage {
	position: sticky !important;
	top: 0;
	height: 100vh;
	height: 100svh;
	overflow: hidden;
}

.em-sv-stage .elementor-widget:has(video.em-cover) {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	z-index: 0;
}

.em-sv-stage .elementor-widget:has(video.em-cover) > .elementor-widget-container {
	height: 100%;
}

.em-sv-stage > :not(:has(video.em-cover)) {
	position: relative;
	z-index: 1;
}

video.em-cover {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
	.em-sh {
		transition: none;
	}
}

/* Conteneur pleine largeur sans .e-con-inner : la scène reprend la mise en page du conteneur */
.em-sv > .em-sv-stage:not(.e-con-inner) {
	display: var(--display, flex);
	flex-direction: var(--flex-direction, column);
	flex-wrap: var(--flex-wrap, nowrap);
	justify-content: var(--justify-content, center);
	align-items: var(--align-items, center);
	gap: var(--gap, 0);
}
