/* Accueil */

/* ---------- préchargement (seul l'accueil en avait un) : logo animé 4 s, puis ouverture vers les côtés ---------- */
.loader { position: fixed; inset: 0; z-index: 100000; pointer-events: none; }
.loader__half {
	position: absolute;
	top: 0;
	width: calc(50% + .5px);
	height: 100%;
	overflow: hidden;
	background: var(--white);
	transition: transform .7s .3s cubic-bezier(.645, .045, .355, 1);
}
.loader__half--left { left: 0; }
.loader__half--right { right: 0; }
.loader__half::before {
	content: "";
	position: absolute;
	top: 0;
	width: 200%;
	height: 100%;
	background: url("../../img/LOGO-OPENER.gif") center / contain no-repeat;
}
.loader__half--left::before { left: 0; }
.loader__half--right::before { right: 0; }
.loader.is-done .loader__half--left { transform: translateX(-100%); }
.loader.is-done .loader__half--right { transform: translateX(100%); }
.loader.is-gone, html.no-js .loader { display: none; }

/* en-tête tablette : sur l'ancien accueil, le logo était dessiné sur son propre calque (au-dessus de la
   bannière animée), ce qui change très légèrement son redimensionnement */
@media (min-width: 768px) { .hdr--mobile .hdr__logo { will-change: transform; } }

/* ---------- bannière : trois diapositives plein écran, photo qui zoome lentement (20 s) ---------- */
.hero { margin: -200px 0 75px; }
.hero .swiper { border-radius: 0 0 50px 50px; }
.hero .swiper-slide { height: 115vh; }
.hero__bg {
	min-height: 100%;
	background: var(--white) center / cover no-repeat;
	transition: transform 10s linear;
}
.hero__bg--dtc { background-image: url("../../img/IMAGE-1-scaled-1920w.webp"); }
.hero__bg--dtl { background-image: url("../../img/IMAGE-2-scaled-1920w.webp"); }
.hero__bg--bamo { background-image: url("../../img/IMAGE-3-scaled-1920w.webp"); }
.hero .swiper-slide-active .hero__bg { transform: scale(1.3); transition-duration: 20s; }
/* toute la diapositive mène au service */
.hero__link {
	position: absolute;
	inset: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 50px;
	color: var(--white);
	text-align: center;
}
.hero__content { max-width: 100%; }
/* le texte de la diapositive active remonte une fois le glissement terminé (comme le carrousel des réalisations) */
.hero .swiper-slide:not(.swiper-slide-active) .hero__content { visibility: hidden; }
.hero .swiper-slide-active .hero__content { animation: fadeInUp 1.25s .5s backwards; }
.hero__title { margin: 8px 0 30px; font-size: 150px; line-height: 1; }
.hero__btn { font-size: 18px; }
.hero__btn:hover { background: var(--black); }
@media (prefers-reduced-motion: reduce) {
	.hero .swiper-slide-active .hero__bg { transform: none; }
	.hero .swiper-slide-active .hero__content { animation: none; }
}

/* ---------- Direction de travaux complète ---------- */
.acc-dtc { margin-bottom: 75px; background-image: url("../../img/dtc.webp"); }
.acc-dtc .sec-title { font-size: 90px; }
.acc-dtc > .sec-text { margin-top: -10px; }
.acc-dtc > .sec-text p { margin-bottom: 0; }
.acc-dtc .igrid { margin-top: -40px; }
.acc-dtc .ibox { --ibox-gap: -20px; }

/* ---------- Réalisations : différences avec le slider de la page Réalisations ----------
   cotes de l'ancien slider de l'accueil (hauteurs 900 / 600 / 600, titre plus petit au-dessus du bouton,
   libellé « Réalisations » en plus) ; une valeur non redéfinie pour une grille y est reprise de la grille
   précédente : taille de texte à l'échelle de la grille de 1240 px (--u1), position recalculée grille par
   grille (1240 → 1024 → 778) puis tronquée au pixel */
.rslider--accueil .rslider__stage {
	--title-size: round(calc(30 * var(--u1)), 1px);
	--title-lh: round(calc(60 * var(--u1)), 1px);
	--title-y: calc(-28 * var(--u));
	--btn-top: calc(457 * var(--u));
	--kicker-size: round(calc(90 * var(--u1)), 1px);
	--kicker-lh: round(calc(100 * var(--u1)), 1px);
	--kicker-x: calc(2 * var(--u));
	--kicker-y: calc(-90 * var(--u));
	--arrow-x: 400px;
}
@container (width < 1024px) {
	.rslider--accueil .rslider__stage {
		--h: calc(600 * var(--u));
		--title-y: calc(-23 * var(--u));
		--btn-top: calc(349 * var(--u));
		--kicker-x: calc(1 * var(--u));
		--kicker-y: calc(-74 * var(--u));
	}
}
@container (width < 778px) {
	.rslider--accueil .rslider__stage {
		--title-size: round(calc(32 * var(--u)), 1px);
		--title-lh: round(calc(50 * var(--u)), 1px);
		--title-y: calc(10 * var(--u));
		--btn-top: calc(350 * var(--u));
		--kicker-size: round(calc(65 * var(--u)), 1px);
		--kicker-lh: round(calc(70 * var(--u)), 1px);
		--kicker-x: 0px;
		--kicker-y: calc(-56 * var(--u));
	}
}
/* libellé « Réalisations » au-dessus du titre : apparaît en 0,3 s dès l'entrée de la diapositive
   (--w posée par accueil.js, comme pour le titre et le bouton) */
.rslider__kicker {
	position: absolute;
	top: calc(50% - var(--kicker-lh) / 2 + var(--kicker-y));
	left: calc(50% - var(--w, 0px) / 2 + var(--kicker-x));
	z-index: 3;
	margin: 0;
	color: var(--white);
	font-family: var(--display);
	font-size: var(--kicker-size);
	font-weight: 400;
	line-height: var(--kicker-lh);
	white-space: nowrap;
}
.rslider.is-playing .swiper-slide-active .rslider__kicker { animation: fadeIn .3s var(--ease-layer) both; }
.rslider .is-leaving .rslider__kicker { animation: rslider-out .3s var(--ease-layer) both; }
/* le bouton est là dès l'entrée de la diapositive */
.rslider--accueil.is-playing .swiper-slide-active .rslider__btn { animation: none; }
@media (prefers-reduced-motion: reduce) {
	.rslider .rslider__kicker { animation: none !important; }
}

/* carrousel mobile : libellé « Réalisations », nom du projet, bouton */
.mslider__kicker {
	margin: 0 0 30px;
	font-family: var(--display);
	font-size: 60px;
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
}
.mslider--accueil .mslider__title { font-size: 26px; line-height: 1.4; }
.mslider--accueil .mslider__btn { font-family: var(--sans); }

/* ---------- nos atouts : trois cartes ---------- */
.atouts { padding-block: 75px; background: var(--grey); }
.atouts__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: var(--gap);
	border-radius: 50px;
	background: var(--white);
	color: var(--black);
	text-align: center;
}
.card__img { align-self: center; width: 50%; }
.card__title { margin-top: -35px; padding: 0 25px 10px; font-size: 22px; line-height: 1; }
.card__text { margin: 0; padding: 0 35px; font-size: 17px; line-height: 1.5; }
.card__cta { padding-bottom: 50px; }
.card__cta .btn { font-size: 15px; }
/* carrousel mobile : une carte à la fois, flèches sur les côtés */
.atouts__slider { position: relative; }
/* blocs positionnés comme sur l'ancien site : même lissage du texte dans le carrousel */
.atouts__slider .card, .atouts__slider .card > * { position: relative; }
.atouts__slider .card { width: 100%; }
.atouts__slider .card__text { padding: 0 25px 0 0; font-size: 16px; }
.atouts__arrow {
	position: absolute;
	top: calc(50% - 15px);
	z-index: 2;
	display: inline-flex;
	padding: 0;
	border: 0;
	background: none;
	color: rgba(237, 237, 237, .9);
	font-size: 25px;
	translate: 0 -50%;
	cursor: pointer;
}
.atouts__arrow--prev { left: 0; }
.atouts__arrow--next { right: 0; }
.atouts__arrow svg { width: 1em; height: 1em; fill: currentColor; }

/* ---------- Direction de travaux locale ---------- */
.acc-dtl { background: var(--grey); }
.acc-dtl__inner { display: flex; gap: var(--gap); }
.acc-dtl__inner > * { width: 50%; }
.acc-dtl .panel { background: var(--white); color: var(--black); }
.acc-dtl__intro { justify-content: space-between; }
.acc-dtl__intro .sec-title { padding: 50px 50px 0; }
.acc-dtl__intro .sec-text { padding: 0 50px; }
.acc-dtl__photo { display: block; width: 75%; border-radius: 0 0 0 50px; }
.acc-dtl__list { justify-content: center; padding: 75px 50px; }
.acc-dtl__list > .ibox { --ibox-img: 10%; --ibox-gap: 15px; --ibox-title: 20px; }
.acc-dtl .islider { --dots-hover: var(--blue); }
.acc-dtl .islider .ibox { --ibox-img: 20%; --ibox-gap: 0px; --ibox-title: 20px; }
.acc-dtl__btn { align-self: flex-start; margin-top: 25px; }

/* ---------- BAMO / AMO ---------- */
.acc-bamo { padding-block: 100px; border-radius: 0 0 50px 50px; background: var(--grey); }
.acc-bamo__panel { padding-block: 75px; background-image: url("../../img/bamo-scaled-1920w.webp"); }
.acc-bamo .sec-title { font-size: 90px; }
.acc-bamo .sec-text { width: 75%; }
.acc-bamo .igrid { width: 85%; margin-top: -50px; }
.acc-bamo .ibox { --ibox-gap: -25px; --ibox-title: 20px; }

.faq__photo { background-image: url("../../img/faq-accueil.webp"); }

@media (max-width: 767px) {
	.hero { margin: -75px 0 50px; }
	.hero .swiper-slide { height: 50vh; }
	.hero__link { padding: 30px; }
	.hero__title { font-size: 50px; }
	.hero__btn { font-size: 16px; }
	.acc-dtc { margin-bottom: 25px; }
	.acc-dtc .sec-title, .acc-bamo .sec-title { font-size: 45px; }
	.acc-dtc > .sec-text, .acc-bamo .sec-text { width: 100%; }
	.acc-dtl__inner { flex-wrap: wrap; }
	.acc-dtl__inner > * { width: 100%; }
	.acc-dtl__intro { min-height: 425px; }
	.acc-dtl__intro .sec-title, .acc-dtl__intro .sec-text { text-align: center; }
	.acc-dtl__intro .sec-title { font-size: 40px; }
	.acc-dtl__intro .sec-text { font-size: 16px; }
	.acc-dtl__list { align-items: center; margin-bottom: 50px; padding: 35px; }
	.acc-dtl__btn { align-self: center; }
	.acc-bamo { padding-block: 0; }
	.acc-bamo__panel { padding: 35px; }
	.acc-bamo .sec-text { font-size: 16px; }
	.contact { margin-top: 50px; padding-block: 0; }
	.contact__info { padding: 35px; }
	.contact__info .sec-text { padding-right: 25px; }
	.faq { margin-top: 50px; margin-bottom: 50px; }
	.faq__main { padding: 35px; }
	.faq__main .sec-text { font-size: 16px; }
}
