/* Haltéro Slider v1.1 : hero banner minimaliste, charte halterophiliefrance.fr.
   Les sélecteurs sont préfixés par .hsl et les propriétés sensibles en !important
   pour ne pas être écrasés par les styles globaux d'Elementor / du thème. */

/* Pleine largeur de la fenêtre, même dans un conteneur Elementor étroit */
body:has(.hsl:not(.hsl--boxed)) {
	overflow-x: clip;
}
.hsl {
	--hsl-red: #e63946;
	--hsl-gutter: max(24px, calc((100vw - 1200px) / 2));
	position: relative;
	display: block;
	width: 100vw;
	max-width: 100vw;
	margin: 0 0 0 calc(50% - 50vw);
	overflow: hidden;
	background: linear-gradient(165deg, #0053c5 0%, #00122b 45%, #00122b 100%);
	color: #fff;
	font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
	text-align: left;
}
/* Variante encadrée : [haltero_slider full="0"] */
.hsl.hsl--boxed {
	--hsl-gutter: 48px;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0, 18, 43, 0.25);
}

.hsl *,
.hsl *::before,
.hsl *::after {
	box-sizing: border-box;
}

/* Piste : défilement natif avec accroche, glissement tactile sans JS */
.hsl .hsl-track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	overscroll-behavior-x: contain;
}
.hsl .hsl-track::-webkit-scrollbar {
	display: none;
}
.hsl .hsl-track:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -4px;
}

.hsl .hsl-slide {
	position: relative;
	flex: 0 0 100%;
	min-height: clamp(520px, 78vh, 780px);
	scroll-snap-align: start;
	display: flex;
	align-items: flex-end;
	margin: 0;
	padding: 0;
}

/* Image de fond + voile lisible sous le texte */
.hsl .hsl-media {
	position: absolute;
	inset: 0;
}
.hsl .hsl-media img {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	display: block;
	border-radius: 0;
	box-shadow: none;
}
.hsl .hsl-media::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(0, 18, 43, 0.92) 0%, rgba(0, 18, 43, 0.62) 42%, rgba(0, 18, 43, 0.08) 80%);
}

.hsl .hsl-content {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: calc(640px + var(--hsl-gutter) * 2);
	padding: 64px var(--hsl-gutter) 120px;
}

.hsl .hsl-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 16px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.78);
}
.hsl .hsl-cat {
	padding: 4px 12px;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 30px;
	font-family: 'Oswald', 'Poppins', sans-serif;
	font-weight: 500;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #fff;
}

.hsl h2.hsl-title {
	margin: 0 0 14px !important;
	padding: 0 !important;
	font-family: 'Poppins', system-ui, sans-serif !important;
	font-weight: 700 !important;
	font-size: clamp(1.9rem, 4.6vw, 3.6rem) !important;
	line-height: 1.1 !important;
	letter-spacing: -0.01em !important;
	text-transform: none !important;
	color: #fff !important;
}
.hsl h2.hsl-title a {
	color: #fff !important;
	font: inherit !important;
	text-transform: none !important;
	text-decoration: none !important;
	background: none !important;
}
.hsl h2.hsl-title a:hover,
.hsl h2.hsl-title a:focus-visible {
	text-decoration: underline !important;
	text-underline-offset: 4px;
}

.hsl p.hsl-excerpt {
	margin: 0 0 24px !important;
	font-family: 'Poppins', system-ui, sans-serif;
	font-size: 17px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.88) !important;
}

.hsl a.hsl-btn {
	display: inline-block;
	padding: 12px 24px !important;
	border: 0 !important;
	border-radius: 30px !important;
	background: var(--hsl-red) !important;
	color: #fff !important;
	font-family: 'Poppins', system-ui, sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	text-transform: none !important;
	text-decoration: none !important;
	box-shadow: none !important;
	transition: transform 0.2s ease, background 0.2s ease;
}
.hsl a.hsl-btn:hover,
.hsl a.hsl-btn:focus-visible {
	background: #cc3466 !important;
	color: #fff !important;
	transform: translateY(-1px);
}

/* Barre du bas : indicateurs à progression + contrôles */
.hsl .hsl-bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 0 var(--hsl-gutter) 40px;
}

.hsl .hsl-dots {
	display: flex;
	gap: 8px;
	flex: 1;
	max-width: 360px;
}
.hsl button.hsl-dot {
	position: relative;
	flex: 1;
	height: 20px !important; /* zone de clic confortable, la barre visible fait 3px */
	min-width: 0;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	cursor: pointer;
}
.hsl button.hsl-dot::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 3px;
	margin-top: -1.5px;
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.3);
}
.hsl .hsl-fill {
	position: absolute;
	left: 0;
	top: 50%;
	height: 3px;
	width: 0;
	margin-top: -1.5px;
	border-radius: 3px;
	background: #fff;
}
.hsl .hsl-dot.is-active .hsl-fill {
	width: 100%;
}
.hsl[data-autoplay='1'] .hsl-dot.is-active .hsl-fill {
	width: 0;
	animation: hsl-fill var(--hsl-delay, 6000ms) linear forwards;
}
.hsl.is-paused .hsl-dot.is-active .hsl-fill {
	animation-play-state: paused;
}
@keyframes hsl-fill {
	to {
		width: 100%;
	}
}
.hsl button.hsl-dot:focus-visible,
.hsl button.hsl-btn-ctrl:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.hsl .hsl-ctrl {
	display: flex;
	gap: 8px;
}
.hsl button.hsl-btn-ctrl {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px !important;
	height: 44px !important;
	min-width: 0;
	padding: 0 !important;
	border: 1px solid rgba(255, 255, 255, 0.45) !important;
	border-radius: 50% !important;
	background: rgba(0, 18, 43, 0.35) !important;
	color: #fff !important;
	box-shadow: none !important;
	cursor: pointer;
	backdrop-filter: blur(4px);
	transition: background 0.2s ease, border-color 0.2s ease;
}
.hsl button.hsl-btn-ctrl:hover {
	background: rgba(255, 255, 255, 0.2) !important;
	border-color: #fff !important;
	color: #fff !important;
}
.hsl button.hsl-btn-ctrl svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.hsl button.hsl-toggle svg path {
	fill: currentColor;
	stroke: none;
}
.hsl .hsl-toggle .hsl-i-play {
	display: none;
}
.hsl .hsl-toggle.is-off .hsl-i-play {
	display: block;
}
.hsl .hsl-toggle.is-off .hsl-i-pause {
	display: none;
}

@media (max-width: 767px) {
	.hsl {
		--hsl-gutter: 20px;
	}
	.hsl .hsl-slide {
		min-height: 580px;
	}
	.hsl .hsl-media::after {
		background: linear-gradient(0deg, rgba(0, 18, 43, 0.96) 0%, rgba(0, 18, 43, 0.7) 55%, rgba(0, 18, 43, 0.2) 100%);
	}
	.hsl .hsl-content {
		padding: 36px var(--hsl-gutter) 96px;
	}
	.hsl p.hsl-excerpt {
		font-size: 15px;
	}
	.hsl .hsl-bar {
		padding: 0 var(--hsl-gutter) 24px;
		gap: 12px;
	}
	.hsl button.hsl-btn-ctrl {
		width: 40px !important;
		height: 40px !important;
	}
	.hsl button.hsl-prev {
		display: none; /* le glissement au doigt suffit sur mobile */
	}
}

@media (prefers-reduced-motion: reduce) {
	.hsl .hsl-track {
		scroll-behavior: auto;
	}
	.hsl a.hsl-btn {
		transition: none;
	}
}
