/* Slider d'accueil */

.SliderCont { overflow: hidden; }

/* isolation : les boutons restent sous les blocs qui recouvrent le bas du slider */
.home-slider { position: relative; isolation: isolate; display: grid; overflow: hidden; touch-action: pan-y; -webkit-user-select: none; user-select: none; }

/* Slides superposées : fondu croisé de 3 s */
.home-slider__slide { grid-area: 1 / 1; display: grid; min-width: 0; opacity: 0; transition: opacity 3s linear; }
.home-slider__slide.is-active { z-index: 1; opacity: 1; }

.home-slider__slide img { grid-area: 1 / 1; display: block; width: 100%; max-width: 100%; height: 100%; object-fit: cover; transform: scale(1.2); transition: transform 1s ease-in-out; }
.home-slider__slide.is-active img { transform: scale(1); }

/* Titres : mêmes styles que les anciens h1 */
.home-slider .titre {
	--fluid-type-min: 1rem;
	--fluid-type-max: 4rem;
	--fluid-type-target: 5vw;
	grid-area: 1 / 1;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	margin: 0;
	padding: 1em;
	color: #fff;
	font-family: var(--font1);
	font-feature-settings: "lnum";
	font-weight: 400;
	letter-spacing: normal;
	line-height: 1.138888889;
	text-align: center;
}
.home-slider .titre strong { padding: 0 .2em .12em; font-family: var(--font3); font-weight: 700; }
.home-slider__slide.is-active .titre { animation: homeSliderTitre 1s; }

@keyframes homeSliderTitre {
	from { opacity: .5; transform: translateY(100px); }
	to { opacity: 1; transform: none; }
}

@media screen and (min-width: 1024px) {
	.home-slider .titre { padding: 0 1em 1em; flex-direction: row; }
}

/* Boutons */
.home-slider .home-slider__btn { position: absolute; z-index: 2; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: #fff; line-height: 0; cursor: pointer; }
.home-slider .home-slider__btn[hidden] { display: none; }
.home-slider__btn svg { display: block; width: 100%; height: 100%; fill: currentColor; pointer-events: none; }

.home-slider .home-slider__toggle { z-index: 3; right: 8px; bottom: 8px; width: 28px; height: 28px; padding: 5px; border-radius: 50%; background-color: rgba(0, 0, 0, .6); }
.home-slider__toggle .icon-play,
.home-slider__toggle.is-paused .icon-pause { display: none; }
.home-slider__toggle.is-paused .icon-play { display: block; }

/* Précédent / Suivant : toujours actifs, visibles au survol et au focus clavier */
.home-slider .home-slider__nav { top: 0; bottom: 44px; width: clamp(48px, 8%, 96px); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; }
.home-slider__prev { left: 0; }
.home-slider__next { right: 0; }
.home-slider__nav span { width: 40px; height: 40px; padding: 6px; border-radius: 50%; background-color: rgba(0, 0, 0, .6); }

@media (hover: hover) {
	.home-slider:hover .home-slider__nav { opacity: 1; }
}

.home-slider .home-slider__nav:focus-visible { opacity: 1; }
.home-slider .home-slider__toggle:focus-visible,
.home-slider .home-slider__nav:focus-visible span { outline: 2px solid #fff; outline-offset: 0; box-shadow: 0 0 0 4px #000; }

@media screen and (min-width: 968px) {
	/* les blocs recouvrent les 100 derniers pixels : le bouton tient dans la marge de droite */
	.home-slider .home-slider__toggle { right: 4px; bottom: 4px; }
	.home-slider .home-slider__nav { bottom: 100px; }
}

@media screen and (min-width: 1300px) {
	.home-slider .home-slider__toggle { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.home-slider__slide,
	.home-slider__slide img { transition: none; }
	.home-slider__slide.is-active .titre { animation: none; }
}
