/*
 * Correctif visuel limité au bandeau principal de la page d'accueil.
 * La photo est légèrement abaissée, le haut reste lumineux, le bas est
 * renforcé et la zone de lecture située à gauche conserve un voile sombre.
 */

body.ftc-hero-home-v2 .ftc-hero.et_pb_section {
	--ftc-parallax-y: 0px !important;
	--ftce-hero-shift: 0px !important;
	animation: none !important;
	background-attachment: scroll !important;
	background-position: center center !important;
	background-repeat: no-repeat !important;
	background-size: 0 0 !important;
	isolation: isolate;
	transform: none !important;
	will-change: auto !important;
}

/* Reprend l'image Divi existante sans remplacer le média choisi dans Divi. */
body.ftc-hero-home-v2 .ftc-hero.et_pb_section::before {
	animation: none !important;
	background-color: #112a49;
	background-image: var(--ftc-hero-bg-image, none) !important;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	content: "";
	inset: 0;
	opacity: 1 !important;
	pointer-events: none;
	position: absolute;
	transform: scale(1.08) translate3d(0, 4%, 0) !important;
	transform-origin: center center;
	transition: none !important;
	will-change: auto !important;
	z-index: 0;
}

/*
 * Premier dégradé : la gauche reste sombre pour le titre.
 * Second dégradé : haut plus clair, puis fondu profond vers le bas.
 */
body.ftc-hero-home-v2 .ftc-hero.et_pb_section::after {
	animation: none !important;
	background:
		linear-gradient(
			90deg,
			rgba(4, 15, 27, .96) 0%,
			rgba(4, 15, 27, .90) 34%,
			rgba(4, 15, 27, .58) 57%,
			rgba(4, 15, 27, .18) 78%,
			rgba(4, 15, 27, .08) 100%
		),
		linear-gradient(
			180deg,
			rgba(191, 210, 223, .16) 0%,
			rgba(117, 145, 165, .07) 28%,
			rgba(9, 24, 36, .38) 62%,
			rgba(4, 15, 27, .94) 100%
		) !important;
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
	transform: none !important;
	transition: none !important;
	z-index: 1;
}

body.ftc-hero-home-v2 .ftc-hero .ftc-hero-row {
	position: relative;
	z-index: 2;
}

/*
 * Empêche Divi 4 et Divi 5 d'afficher leur propre photo en parallèle du fond
 * fixe. La classe n'est ajoutée qu'après récupération de l'image par le script.
 */
body.ftc-hero-home-v2 .ftc-hero.ftc-hero-background-locked > .et_parallax_bg_wrap,
body.ftc-hero-home-v2 .ftc-hero.ftc-hero-background-locked > .et-pb-parallax-wrapper {
	display: none !important;
}

/*
 * Le décalage exact est calculé par le petit script par rapport au centre du
 * bandeau complet, et non à la colonne de gauche. Le module reste à sa place
 * dans Divi : les textes ne remontent pas et le Visual Builder reste utilisable.
 */
body.ftc-hero-home-v2 .ftc-hero .ftc-hero-logo-centered,
body.ftc-hero-home-v2 .ftc-hero .ftc-hero-row > .et_pb_column:first-child > .et_pb_image:first-child {
	animation: none !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	margin-left: auto !important;
	margin-right: auto !important;
	max-width: 154% !important;
	opacity: 1 !important;
	padding: 0 !important;
	scale: 1 !important;
	translate: none !important;
	transform: translate3d(var(--ftc-logo-center-shift, 0), 0, 0) !important;
	transition: none !important;
	width: 178% !important;
	will-change: auto !important;
}

body.ftc-hero-home-v2 .ftc-hero .ftc-hero-logo-centered .et_pb_image_wrap,
body.ftc-hero-home-v2 .ftc-hero .ftc-hero-row > .et_pb_column:first-child > .et_pb_image:first-child .et_pb_image_wrap,
body.ftc-hero-home-v2 .ftc-hero .ftc-hero-logo-centered img,
body.ftc-hero-home-v2 .ftc-hero .ftc-hero-row > .et_pb_column:first-child > .et_pb_image:first-child img {
	display: block !important;
	height: auto !important;
	max-width: 100% !important;
	object-fit: contain;
	width: 100% !important;
}

@media (max-width: 980px) {
	body.ftc-hero-home-v2 .ftc-hero.et_pb_section {
		background-size: 0 0 !important;
	}

	body.ftc-hero-home-v2 .ftc-hero.et_pb_section::before {
		background-position: 64% center;
		transform: scale(1.04) translate3d(0, 2%, 0) !important;
	}

	body.ftc-hero-home-v2 .ftc-hero.et_pb_section::after {
		background:
			linear-gradient(90deg, rgba(4, 15, 27, .88), rgba(4, 15, 27, .72)),
			linear-gradient(180deg, rgba(117, 145, 165, .08), rgba(4, 15, 27, .94)) !important;
	}

}

/* Le logo reste masqué sur tablette afin de préserver la composition. */
@media (min-width: 768px) and (max-width: 980px) {
	body.ftc-hero-home-v2 .ftc-hero .ftc-hero-logo-centered,
	body.ftc-hero-home-v2 .ftc-hero .ftc-hero-row > .et_pb_column:first-child > .et_pb_image:first-child {
		display: none !important;
	}
}

/*
 * Sur téléphone, le module est volontairement plus large que le dessin :
 * le PNG contient beaucoup de transparence. Le dessin visible mesure ainsi
 * environ 120 à 158 px selon la largeur du téléphone.
 */
@media (max-width: 767px) {
	body.ftc-hero-home-v2 .ftc-hero .ftc-hero-logo-centered,
	body.ftc-hero-home-v2 .ftc-hero .ftc-hero-row > .et_pb_column:first-child > .et_pb_image:first-child {
		display: block !important;
		margin-bottom: -44px !important;
		margin-left: auto !important;
		margin-right: auto !important;
		margin-top: -8px !important;
		max-width: 360px !important;
		width: 92vw !important;
	}

	/*
	 * Les styles de l'extension d'effets forçaient les garanties en ligne et
	 * collaient la pastille suivante au texte précédent. Chaque garantie occupe
	 * désormais sa propre ligne, avec une pastille et un écart constants.
	 */
	body.ftc-hero-home-v2 .ftc-hero .ftc-hero-proof {
		display: grid !important;
		gap: 14px !important;
		grid-template-columns: minmax(0, 1fr) !important;
		margin-top: 4px !important;
	}

	body.ftc-hero-home-v2.ftce-effects-active .ftc-hero .ftc-hero-proof span,
	body.ftc-hero-home-v2 .ftc-hero .ftc-hero-proof span {
		align-items: center !important;
		column-gap: 12px !important;
		display: grid !important;
		grid-template-columns: 8px minmax(0, 1fr) !important;
		margin: 0 !important;
		width: 100% !important;
	}

	body.ftc-hero-home-v2.ftce-effects-active .ftc-hero .ftc-hero-proof span::before,
	body.ftc-hero-home-v2 .ftc-hero .ftc-hero-proof span::before {
		height: 7px !important;
		margin: 0 !important;
		width: 7px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.ftc-hero-home-v2 .ftc-hero .ftc-hero-logo-centered,
	body.ftc-hero-home-v2 .ftc-hero .ftc-hero-row > .et_pb_column:first-child > .et_pb_image:first-child {
		transition: none;
	}
}
