/* ==========================================================================
   STI29 Carrousel Accueil - Styles Publics
   Charte sti29.fr : Bleu #182466 / Rose #e81c76 / Orange #ff5500
   ========================================================================== */

.sti-carousel-wrapper {
	width: 100%;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.sti-carousel-wrapper.sti-carousel--full {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.sti-carousel-wrapper.sti-carousel--boxed {
	max-width: 1280px;
	margin: 24px auto;
	padding: 0 20px;
}

.sti-carousel-wrapper.sti-carousel--boxed .sti-carousel {
	border-radius: 22px;
	box-shadow: 0 20px 50px rgba(24, 36, 102, 0.16);
}

.sti-carousel {
	position: relative;
	width: 100%;
	height: var(--sti-height-desktop, 500px);
	overflow: hidden;
	background-color: #182466;
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
}

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

.sti-carousel__viewport {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   Piste de défilement (Glissement vs Fondu)
   -------------------------------------------------------------------------- */
.sti-carousel--slide .sti-carousel__track {
	display: flex;
	width: 100%;
	height: 100%;
	will-change: transform;
	touch-action: pan-y;
}

.sti-carousel--slide .sti-carousel__track.is-animating {
	transition: transform var(--sti-speed, 700ms) cubic-bezier(0.22, 1, 0.36, 1);
}

.sti-carousel--slide .sti-carousel__slide {
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
}

.sti-carousel--fade .sti-carousel__track {
	position: relative;
	width: 100%;
	height: 100%;
	touch-action: pan-y;
}

.sti-carousel--fade .sti-carousel__slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	pointer-events: none;
	z-index: 1;
	transition: opacity var(--sti-speed, 700ms) cubic-bezier(0.4, 0, 0.2, 1);
}

.sti-carousel--fade .sti-carousel__slide.is-active {
	opacity: 1;
	pointer-events: auto;
	z-index: 2;
}

/* --------------------------------------------------------------------------
   Diapositive & Image cadrée dynamiquement
   -------------------------------------------------------------------------- */
.sti-carousel__slide {
	position: relative;
	overflow: hidden;
	background-color: var(--sti-slide-bg, #182466);
}

.sti-carousel__media {
	position: absolute;
	inset: 0;
	overflow: hidden;
	z-index: 1;
}

.sti-carousel__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none !important;
	border: 0;
	margin: 0;
	padding: 0;
	object-position: var(--sti-pos-x, 50%) var(--sti-pos-y, 50%);
	transform: scale(var(--sti-zoom, 1));
	transform-origin: var(--sti-pos-x, 50%) var(--sti-pos-y, 50%);
	will-change: transform;
	user-select: none;
	-webkit-user-drag: none;
}

.sti-carousel__img--cover {
	object-fit: cover;
}

.sti-carousel__img--contain {
	object-fit: contain;
}

/* --------------------------------------------------------------------------
   Bloc texte avec fond semi-transparent paramétrable
   -------------------------------------------------------------------------- */
.sti-carousel__content-wrap {
	position: relative;
	z-index: 3;
	height: 100%;
	max-width: 1260px;
	margin: 0 auto;
	padding: 36px 84px;
	display: flex;
	pointer-events: none;
}

.sti-carousel__content-wrap--left {
	align-items: center;
	justify-content: flex-start;
}

.sti-carousel__content-wrap--center {
	align-items: center;
	justify-content: center;
	text-align: center;
}

.sti-carousel__content-wrap--right {
	align-items: center;
	justify-content: flex-end;
}

.sti-carousel__content-wrap--bottom-left {
	align-items: flex-end;
	justify-content: flex-start;
	padding-bottom: 58px;
}

.sti-carousel__content-box {
	pointer-events: auto;
	position: relative;
	max-width: 580px;
	width: 100%;
	padding: 28px 34px;
	border-radius: 18px;
	background-color: var(--sti-overlay-bg, rgba(24, 36, 102, 0.78));
	-webkit-backdrop-filter: blur(var(--sti-overlay-blur, 8px));
	backdrop-filter: blur(var(--sti-overlay-blur, 8px));
	box-shadow: 0 18px 44px rgba(13, 21, 76, 0.24);
	transition: opacity 550ms cubic-bezier(0.22, 1, 0.36, 1), transform 550ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sti-carousel__content-box::before {
	content: "";
	display: block;
	width: 52px;
	height: 4px;
	border-radius: 999px;
	background: linear-gradient(90deg, #e81c76 0%, #ff5500 100%);
	margin-bottom: 14px;
}

.sti-carousel__content-wrap--center .sti-carousel__content-box::before {
	margin-left: auto;
	margin-right: auto;
}

.sti-carousel--multi .sti-carousel__slide:not(.is-active) .sti-carousel__content-box {
	opacity: 0;
	transform: translateY(14px);
}

.sti-carousel__slide.is-active .sti-carousel__content-box {
	opacity: 1;
	transform: translateY(0);
}

.sti-carousel__content-box--light {
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.20);
}

.sti-carousel__content-box--navy {
	color: #182466;
	border: 1px solid rgba(24, 36, 102, 0.14);
}

.sti-carousel-wrapper .sti-carousel h2.sti-carousel__title {
	margin: 0 0 10px 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	font-size: clamp(1.35rem, 2.5vw, 2.1rem) !important;
	font-weight: 700 !important;
	line-height: 1.22 !important;
	letter-spacing: -0.01em !important;
	text-transform: none !important;
	text-shadow: none !important;
}

.sti-carousel-wrapper .sti-carousel h2.sti-carousel__title::before,
.sti-carousel-wrapper .sti-carousel h2.sti-carousel__title::after {
	display: none !important;
	content: none !important;
	background: none !important;
	border: 0 !important;
	width: 0 !important;
	height: 0 !important;
}

.sti-carousel-wrapper .sti-carousel .sti-carousel__content-box--light h2.sti-carousel__title {
	color: #ffffff !important;
}

.sti-carousel-wrapper .sti-carousel .sti-carousel__content-box--navy h2.sti-carousel__title {
	color: #182466 !important;
}

.sti-carousel-wrapper .sti-carousel p.sti-carousel__desc {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	font-size: clamp(0.95rem, 1.2vw, 1.08rem);
	line-height: 1.58;
	opacity: 0.96;
}

.sti-carousel-wrapper .sti-carousel .sti-carousel__content-box--light p.sti-carousel__desc {
	color: rgba(255, 255, 255, 0.95) !important;
}

.sti-carousel-wrapper .sti-carousel .sti-carousel__content-box--navy p.sti-carousel__desc {
	color: #24326b !important;
}

.sti-carousel__actions {
	margin-top: 20px;
}

/* --------------------------------------------------------------------------
   Boutons d'action aux couleurs STI29
   -------------------------------------------------------------------------- */
.sti-carousel__btn {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 12px 22px;
	border-radius: 8px;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
	transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease, background-color 220ms ease;
}

.sti-carousel__btn svg {
	transition: transform 220ms ease;
}

.sti-carousel__btn:hover svg {
	transform: translateX(3px);
}

.sti-carousel__btn--gradient {
	background: linear-gradient(135deg, #e81c76 0%, #ff5500 100%);
	color: #ffffff !important;
	box-shadow: 0 8px 22px rgba(232, 28, 118, 0.34);
}

.sti-carousel__btn--gradient:hover {
	transform: translateY(-2px);
	filter: brightness(1.06);
	box-shadow: 0 12px 28px rgba(255, 85, 0, 0.40);
}

.sti-carousel__btn--navy {
	background-color: #182466;
	color: #ffffff !important;
	box-shadow: 0 8px 20px rgba(24, 36, 102, 0.28);
}

.sti-carousel__btn--navy:hover {
	background-color: #0d154c;
	transform: translateY(-2px);
}

.sti-carousel__btn--white {
	background-color: #ffffff;
	color: #182466 !important;
	box-shadow: 0 8px 20px rgba(13, 21, 76, 0.16);
}

.sti-carousel__btn--white:hover {
	background-color: #f4f7fc;
	transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Poignées de défilement (Flèches, Puces, Barre de progression)
   -------------------------------------------------------------------------- */
.sti-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid rgba(24, 36, 102, 0.10);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.90);
	color: #182466;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(13, 21, 76, 0.18);
	backdrop-filter: blur(6px);
	transition: background 220ms ease, color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.sti-carousel__arrow--prev {
	left: 18px;
}

.sti-carousel__arrow--next {
	right: 18px;
}

.sti-carousel__arrow:hover,
.sti-carousel__arrow:focus-visible {
	background: linear-gradient(135deg, #e81c76 0%, #ff5500 100%);
	color: #ffffff;
	border-color: transparent;
	transform: translateY(-50%) scale(1.08);
	box-shadow: 0 10px 26px rgba(232, 28, 118, 0.36);
	outline: none;
}

.sti-carousel__dots {
	position: absolute;
	left: 50%;
	bottom: 18px;
	transform: translateX(-50%);
	z-index: 5;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	border-radius: 999px;
	background: rgba(24, 36, 102, 0.42);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	border: 1px solid rgba(255, 255, 255, 0.16);
}

.sti-carousel__dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.55);
	cursor: pointer;
	transition: width 280ms cubic-bezier(0.22, 1, 0.36, 1), background 280ms ease;
}

.sti-carousel__dot:hover {
	background: rgba(255, 255, 255, 0.90);
}

.sti-carousel__dot.is-active {
	width: 28px;
	background: linear-gradient(90deg, #e81c76 0%, #ff5500 100%);
}

.sti-carousel__progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: rgba(255, 255, 255, 0.18);
	z-index: 6;
	overflow: hidden;
}

.sti-carousel__progress-bar {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, #e81c76 0%, #ff5500 100%);
	transform-origin: left center;
	transform: scaleX(0);
}

.sti-carousel.is-progress-running .sti-carousel__progress-bar {
	transition: transform var(--sti-interval, 5500ms) linear;
	transform: scaleX(1);
}

.sti-carousel-empty-notice {
	padding: 24px;
	border-radius: 12px;
	border: 2px dashed #182466;
	background: #f4f7fc;
	color: #182466;
	text-align: center;
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   Responsive mobile & tablette
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
	.sti-carousel__content-wrap {
		padding: 28px 68px;
	}
	.sti-carousel__content-box {
		padding: 22px 24px;
	}
}

@media (max-width: 768px) {
	.sti-carousel {
		height: var(--sti-height-mobile, 380px);
	}

	.sti-carousel-wrapper.sti-carousel--boxed {
		margin: 14px auto;
		padding: 0 12px;
	}

	.sti-carousel-wrapper.sti-carousel--boxed .sti-carousel {
		border-radius: 16px;
	}

	.sti-carousel__content-wrap {
		padding: 20px 18px 54px;
		align-items: flex-end;
		justify-content: center;
	}

	.sti-carousel__content-box {
		padding: 18px 20px;
		border-radius: 14px;
		max-width: 100%;
	}

	.sti-carousel__content-box::before {
		width: 40px;
		margin-bottom: 10px;
	}

	.sti-carousel__desc {
		font-size: 0.9rem;
		line-height: 1.45;
	}

	.sti-carousel__actions {
		margin-top: 14px;
	}

	.sti-carousel__btn {
		padding: 10px 16px;
		font-size: 0.88rem;
	}

	.sti-carousel__arrow {
		width: 36px;
		height: 36px;
		top: 16px;
		transform: none;
	}

	.sti-carousel__arrow:hover,
	.sti-carousel__arrow:focus-visible {
		transform: scale(1.06);
	}

	.sti-carousel__arrow--prev {
		left: auto;
		right: 60px;
	}

	.sti-carousel__arrow--next {
		right: 14px;
	}

	.sti-carousel__dots {
		bottom: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sti-carousel--slide .sti-carousel__track.is-animating,
	.sti-carousel--fade .sti-carousel__slide,
	.sti-carousel__content-box,
	.sti-carousel__progress-bar {
		transition-duration: 10ms !important;
	}
}
