/* =============================================================
   CDF Carousel Manager – Public Styles
   ============================================================= */

.cdf-carousel-wrapper {
	position: relative;
	width: 100%;
	padding: 0 44px;
	box-sizing: border-box;
}

/* ── Swiper core ── */
.cdf-carousel-wrapper .cdf-swiper {
	width: 100%;

	padding-bottom: 4px; /* évite le clip des ombres */
}

/* Alignement vertical : tous les slides s'étirent à la même hauteur */
.cdf-carousel-wrapper .swiper-wrapper {
	align-items: stretch;
}

/* ── Slide ── */
.cdf-slide {
	height: auto;
	box-sizing: border-box;
}

.cdf-slide-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 10px 8px 14px;
	height: 100%;
	box-sizing: border-box;
}

/* ── Image ── */
.cdf-img-wrap {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	/* Pas de height fixe ici : c'est géré par max-height sur l'img */
}

.cdf-img-wrap img {
	max-width: 100%;
	/* max-height correspond à la hauteur configurée (passée en style inline) */
	max-height: var(--cdf-img-maxh, 200px);
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

/* ── Sous-titre (affiché EN PREMIER, au-dessus du titre) ── */
.cdf-slide-subtitle {
	order: -1; /* remonte visuellement avant le titre */
	margin-top: 10px;
	margin-bottom: 2px;
	font-size: 13px;
	font-weight: 700;
	color: var(--cdf-title-color, #333);
	line-height: 1.2;
	text-transform: none;
}

/* ── Titre (corps du texte) ── */
.cdf-slide-title {
	margin-top: 4px;
	font-size: 13px;
	font-weight: 400;
	color: #333;
	line-height: 1.4;
}

/* ── Bouton ── */
.cdf-slide-btn-wrap {
	margin-top: auto;
	padding-top: 12px;
}

.cdf-slide-btn {
	display: inline-block;
	padding: 9px 22px;
	background: #1a2e4a;
	border: 2px solid #1a2e4a;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .04em;
	text-decoration: none;
	border-radius: 4px;
	text-transform: uppercase;
	transition: background .2s, color .2s;
}

.cdf-slide-btn:hover {
	background: transparent;
	color: #1a2e4a;
	text-decoration: none;
}

/* Surcharge couleur via CSS var si définie */
.cdf-carousel-wrapper .cdf-slide-btn {
	background: var(--cdf-btn-color, #1a2e4a);
	border-color: var(--cdf-btn-color, #1a2e4a);
}
.cdf-carousel-wrapper .cdf-slide-btn:hover {
	background: transparent;
	color: var(--cdf-btn-color, #1a2e4a);
}

/* ── Flèches ── */
.cdf-carousel-wrapper .swiper-button-prev,
.cdf-carousel-wrapper .swiper-button-next {
	color: var(--cdf-arrow-color, #333);
	--swiper-navigation-size: 20px;
	top: 40%; /* aligné sur la zone image */
}

.cdf-carousel-wrapper .swiper-button-prev {
	left: 4px;
}

.cdf-carousel-wrapper .swiper-button-next {
	right: 4px;
}

.cdf-carousel-wrapper .swiper-button-prev::after,
.cdf-carousel-wrapper .swiper-button-next::after {
	font-size: 20px;
	font-weight: 900;
}

/* ── Pagination (dots) ── */
.cdf-carousel-wrapper .swiper-pagination {
	position: relative;
	margin-top: 18px;
	line-height: 1;
}

.cdf-carousel-wrapper .swiper-pagination-bullet {
	background: #ccc;
	opacity: 1;
	width: 8px;
	height: 8px;
}

.cdf-carousel-wrapper .swiper-pagination-bullet-active {
	background: var(--cdf-dot-active, #333);
}

/* ── Mode "auto width" : chaque slide prend sa largeur naturelle ── */
.cdf-carousel-wrapper.cdf-mode-auto .swiper-slide {
	width: auto;
}

/* ── Responsive ── */
@media (max-width: 767px) {
	.cdf-carousel-wrapper {
		padding: 0 32px;
	}

	.cdf-slide-subtitle {
		font-size: 12px;
	}

	.cdf-slide-title {
		font-size: 12px;
	}

	.cdf-slide-btn {
		padding: 7px 16px;
		font-size: 11px;
	}
}

/* ── Mode coverflow "maison" : scale sur les slides non-centraux ── */
.cdf-coverflow .swiper-slide {
	transition: transform 0.3s ease, opacity 0.3s ease;
	opacity: 0.75;
	transform: scale(0.88);
}

.cdf-coverflow .swiper-slide-active {
	opacity: 1;
	transform: scale(1);
	z-index: 2;
}

.cdf-coverflow .swiper-slide-prev,
.cdf-coverflow .swiper-slide-next {
	opacity: 0.88;
	transform: scale(0.93);
}

/* ── Mode statique : tous les items visibles, pas de défilement ── */
.cdf-static .swiper-wrapper {
	/* Désactive le transform Swiper pour afficher les slides côte à côte */
	flex-wrap: nowrap;
	transform: none !important;
	transition: none !important;
}

.cdf-static .swiper-slide {
	/* Chaque slide prend 1/N de la largeur (N = slides_per_view desktop) */
	flex-shrink: 0;
}

/* En mode statique, pas de padding latéral pour les flèches */
.cdf-static {
	padding: 0 !important;
}
