/* =============================================================
   CDF Carousel Manager v1.2 — Divi 5 compatible
   ============================================================= */

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

.cdf-carousel-wrapper .cdf-swiper {
	width: 100%;
	overflow: hidden;
}

/* ── Swiper wrapper ── */
.cdf-carousel-wrapper .swiper-wrapper {
	align-items: stretch;
}

/* Hauteur uniforme */
.cdf-equal-height .swiper-wrapper {
	align-items: stretch;
}
.cdf-equal-height .cdf-slide {
	height: auto;
}
.cdf-equal-height .cdf-slide-inner {
	height: 100%;
}

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

.cdf-slide-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 8px 14px;
	box-sizing: border-box;
	width: 100%;
	/* justify-content défini en inline style depuis PHP (slide_align) */
}

/* ── Image ── */
.cdf-img-wrap {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.cdf-img-wrap img {
	max-width: 100%;
	max-height: var(--cdf-img-maxh, 150px);
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

/* ── Sous-titre ── */
.cdf-slide-subtitle {
	font-size:   var(--cdf-sub-sz, 13px);
	font-weight: var(--cdf-sub-w, 700);
	color:       var(--cdf-sub-c, #333);
	text-align:  var(--cdf-sub-al, center);
	line-height: 1.25;
	width: 100%;
	margin: 6px 0 4px;
}

/* ── Titre ── */
.cdf-slide-title {
	font-size:   var(--cdf-title-sz, 14px);
	font-weight: var(--cdf-title-w, 700);
	color:       var(--cdf-title-c, #333);
	text-align:  var(--cdf-title-al, center);
	line-height: 1.35;
	width: 100%;
	margin: 4px 0;
}

/* ── Bouton wrapper ── */
.cdf-slide-btn-wrap {
	padding-top: 10px;
	width: 100%;
	text-align: var(--cdf-btn-al, center);
}

/* ── Bouton base ── */
.cdf-slide-btn {
	display: inline-block;
	font-size:     var(--cdf-btn-sz, 13px);
	font-weight:   700;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: var(--cdf-btn-r, 4px);
	padding: 8px 20px;
	transition: background .2s, color .2s, border-color .2s;
	cursor: pointer;
}

/* Plein */
.cdf-btn-style-filled .cdf-slide-btn {
	background:  var(--cdf-btn-bg, #1a2e4a);
	color:       var(--cdf-btn-c, #fff);
	border: 2px solid var(--cdf-btn-bg, #1a2e4a);
}
.cdf-btn-style-filled .cdf-slide-btn:hover {
	background:  var(--cdf-btn-hbg, #fff);
	color:       var(--cdf-btn-hc, #1a2e4a);
	border-color: var(--cdf-btn-hbg, #fff);
	text-decoration: none;
}

/* Contour */
.cdf-btn-style-outline .cdf-slide-btn {
	background: transparent;
	color:      var(--cdf-btn-bg, #1a2e4a);
	border: 2px solid var(--cdf-btn-bg, #1a2e4a);
}
.cdf-btn-style-outline .cdf-slide-btn:hover {
	background: var(--cdf-btn-bg, #1a2e4a);
	color:      var(--cdf-btn-c, #fff);
	text-decoration: none;
}

/* Texte */
.cdf-btn-style-text .cdf-slide-btn {
	background: transparent;
	color:      var(--cdf-btn-bg, #1a2e4a);
	border: 2px solid transparent;
	padding-left: 4px;
	padding-right: 4px;
	text-transform: none;
}
.cdf-btn-style-text .cdf-slide-btn:hover {
	text-decoration: underline;
	color: var(--cdf-btn-hc, #1a2e4a);
}

/* ── Flèches ── */
.cdf-carousel-wrapper .swiper-button-prev,
.cdf-carousel-wrapper .swiper-button-next {
	color: var(--cdf-arrow, #333);
	--swiper-navigation-size: 20px;
	top: 38%;
}
.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 ── */
.cdf-carousel-wrapper .swiper-pagination {
	position: relative;
	margin-top: 16px;
	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, #333);
}

/* ── Coverflow maison ── */
.cdf-coverflow .swiper-slide {
	transition: transform .3s ease, opacity .3s ease;
	opacity: .75;
	transform: scale(.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: .88;
	transform: scale(.93);
}

/* ── Mode statique ── */
.cdf-static { padding: 0 !important; }
.cdf-static .swiper-wrapper {
	flex-wrap: nowrap;
	transform: none !important;
	transition: none !important;
}

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

/* ── Alignement via CSS vars ── */
.cdf-slide-inner {
	justify-content: var(--cdf-valign, center);
	align-items:     var(--cdf-halign, center);
}
