/* ACGD – Carrousel témoignages vidéo */

.acgd-vt {
	--acgd-vt-card-max: 320px;
	--acgd-vt-side-scale: 0.83;
	--acgd-vt-side-opacity: 1;
	--acgd-vt-visible-side: 2;
	--acgd-vt-radius: 20px;
	--acgd-vt-card-bg: var(--e-global-color-primary, #054666);
	--acgd-vt-overlay: rgba(5, 70, 102, 0.85);
	--acgd-vt-arrow-size: 48px;
	--acgd-vt-arrow-bg: var(--e-global-color-primary, #054666);
	--acgd-vt-arrow-color: #fff;
	--acgd-vt-arrow-bg-hover: var(--e-global-color-secondary, #4a4697);
	--acgd-vt-arrow-color-hover: #fff;
	--acgd-vt-media-btn-bg: rgba(0, 0, 0, 0.45);
	--acgd-vt-media-btn-color: #fff;
	--acgd-vt-focus: var(--e-global-color-accent, #56baa2);
	--acgd-vt-speed: 0.45s;
	position: relative;
	width: 100%;
}

.acgd-vt__swiper.swiper {
	overflow: hidden;
	padding: 8px 0;
}

.acgd-vt .acgd-vt__slide {
	position: relative;
	z-index: var(--acgd-vt-z, 1);
	width: var(--acgd-vt-card-w, var(--acgd-vt-card-max));
	height: auto;
	flex-shrink: 0;
	/* Elementor rogne les diapositives : les cartes rapprochées du centre doivent pouvoir dépasser. */
	overflow: visible !important;
}

/* Carte */
.acgd-vt__card {
	position: relative;
	aspect-ratio: 9 / 16;
	border-radius: var(--acgd-vt-radius);
	overflow: hidden;
	background-color: var(--acgd-vt-card-bg);
	/* Réduction progressive + rapprochement calculés en JS : l'écart visible reste égal au réglage. */
	transform: translateX(var(--acgd-vt-tx, 0px)) scale(var(--acgd-vt-scale, 1));
	opacity: var(--acgd-vt-side-opacity);
	visibility: visible;
	transition: transform var(--acgd-vt-speed) ease, opacity var(--acgd-vt-speed) ease, box-shadow var(--acgd-vt-speed) ease;
	isolation: isolate;
	/* Découpe nette des coins, même réduite (évite un liseré du fond sur les bords). */
	clip-path: inset(0 round var(--acgd-vt-radius));
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}

/* Dès qu'une image ou une vidéo couvre la carte, plus de fond derrière (sinon liseré coloré). */
.acgd-vt__card:has(.acgd-vt__poster),
.acgd-vt__card.has-frame,
.acgd-vt__card.is-started {
	background-color: transparent;
}

.acgd-vt .swiper-slide-active .acgd-vt__card {
	transform: none;
	opacity: 1;
}

.acgd-vt .swiper-slide:not(.swiper-slide-active) {
	cursor: pointer;
}

/* Cartes au-delà du nombre visible : masquées (pas de carte coupée). */
.acgd-vt .acgd-vt__slide.is-far .acgd-vt__card {
	opacity: 0;
	visibility: hidden;
}

/* Média */
.acgd-vt__media,
.acgd-vt__poster,
.acgd-vt__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.acgd-vt .acgd-vt__media .acgd-vt__poster,
.acgd-vt .acgd-vt__media .acgd-vt__video {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
	display: block;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.acgd-vt__video {
	opacity: 0;
	transition: opacity 0.3s ease;
	background: transparent;
}

.acgd-vt__card.is-playing .acgd-vt__video,
.acgd-vt__card.is-started .acgd-vt__video,
.acgd-vt__card.no-cover.has-frame .acgd-vt__video {
	opacity: 1;
}

/* Badge */
.acgd-vt__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 3;
	max-width: calc(100% - 80px);
	padding: 6px 12px;
	border-radius: 999px;
	background-color: var(--e-global-color-accent, #56baa2);
	color: #fff;
	font-family: var(--e-global-typography-primary-font-family, "Mulish"), sans-serif;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Boutons son / lecture */
.acgd-vt__sound,
.acgd-vt__play {
	position: absolute;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: var(--acgd-vt-media-btn-bg);
	color: var(--acgd-vt-media-btn-color);
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.acgd-vt__sound {
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
}

.acgd-vt__play {
	top: 50%;
	left: 50%;
	width: 64px;
	height: 64px;
	transform: translate(-50%, -50%);
}

.acgd-vt__sound:hover,
.acgd-vt__play:hover {
	background-color: rgba(0, 0, 0, 0.65);
}

.acgd-vt__sound svg,
.acgd-vt__play svg {
	display: block;
	pointer-events: none;
}

.acgd-vt__sound .acgd-vt__icon-sound,
.acgd-vt__sound[aria-pressed="true"] .acgd-vt__icon-muted,
.acgd-vt__play .acgd-vt__icon-pause,
.acgd-vt__card.is-playing .acgd-vt__play .acgd-vt__icon-play {
	display: none;
}

.acgd-vt__sound[aria-pressed="true"] .acgd-vt__icon-sound,
.acgd-vt__card.is-playing .acgd-vt__play .acgd-vt__icon-pause {
	display: block;
}

/* Le bouton lecture s'efface pendant la lecture, sauf au survol / focus. */
.acgd-vt__card.is-playing .acgd-vt__play {
	opacity: 0;
}

.acgd-vt__card.is-playing:hover .acgd-vt__play,
.acgd-vt__card.is-playing .acgd-vt__play:focus-visible {
	opacity: 1;
}

/* Contrôles masqués (et retirés du parcours clavier) hors carte centrale. */
.acgd-vt .swiper-slide:not(.swiper-slide-active) .acgd-vt__sound,
.acgd-vt .swiper-slide:not(.swiper-slide-active) .acgd-vt__play {
	visibility: hidden;
	opacity: 0;
}

/* Légende */
.acgd-vt__caption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	padding: 120px 18px 18px;
	background: linear-gradient(to top, var(--acgd-vt-overlay) 0%, var(--acgd-vt-overlay) 25%, transparent 100%);
	color: #fff;
	pointer-events: none;
}

.acgd-vt__person {
	margin: 0 0 6px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.acgd-vt__name {
	color: #fff;
	font-family: var(--e-global-typography-primary-font-family, "Mulish"), sans-serif;
	font-size: 20px;
	font-weight: 900;
	line-height: 1.15;
}

.acgd-vt__subtitle {
	color: rgba(255, 255, 255, 0.85);
	font-family: var(--e-global-typography-text-font-family, "Poppins"), sans-serif;
	font-size: 13px;
	line-height: 1.3;
}

.acgd-vt__quote {
	margin: 0;
	padding: 0;
	border: 0;
	color: #fff;
	font-family: var(--e-global-typography-text-font-family, "Poppins"), sans-serif;
	font-size: 14px;
	font-style: normal;
	line-height: 1.45;
}

.acgd-vt__quote p {
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font: inherit;
	color: inherit;
}

/* Carte CTA */
.acgd-vt__card--cta {
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--e-global-color-primary, #054666);
	text-align: center;
}

.acgd-vt__cta-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	padding: 28px 22px;
}

.acgd-vt__cta-text {
	margin: 0;
	color: #fff;
	font-family: var(--e-global-typography-accent-font-family, "Mulish"), sans-serif;
	font-size: 24px;
	font-weight: 900;
	line-height: 1.2;
}

.acgd-vt__cta-button {
	display: inline-block;
	padding: 14px 26px;
	border-radius: 300px;
	background-color: var(--e-global-color-accent, #56baa2);
	color: #fff;
	font-family: var(--e-global-typography-7203f9f-font-family, "Mulish"), sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.acgd-vt__cta-button:hover,
.acgd-vt__cta-button:focus-visible {
	background-color: var(--e-global-color-secondary, #4a4697);
	color: #fff;
}

/* Flèches */
.acgd-vt__nav {
	display: flex;
	justify-content: center;
	gap: 14px;
	margin-top: 22px;
}

.acgd-vt__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--acgd-vt-arrow-size);
	height: var(--acgd-vt-arrow-size);
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: var(--acgd-vt-arrow-bg);
	color: var(--acgd-vt-arrow-color);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.acgd-vt__arrow:hover,
.acgd-vt__arrow:focus-visible {
	background-color: var(--acgd-vt-arrow-bg-hover);
	color: var(--acgd-vt-arrow-color-hover);
}

.acgd-vt__arrow svg {
	display: block;
	pointer-events: none;
}

.acgd-vt__arrow.swiper-button-disabled {
	opacity: 0.4;
	cursor: default;
}

/* Focus visible */
.acgd-vt__arrow:focus-visible,
.acgd-vt__sound:focus-visible,
.acgd-vt__play:focus-visible,
.acgd-vt__cta-button:focus-visible {
	outline: 3px solid var(--acgd-vt-focus);
	outline-offset: 3px;
}

/* Avant l'initialisation de Swiper : rangée défilable, sans saut de mise en page. */
.acgd-vt:not(.is-ready) .swiper-wrapper {
	display: flex;
	gap: 16px;
	justify-content: center;
}

.acgd-vt:not(.is-ready) .acgd-vt__card {
	transform: none;
	opacity: 1;
}

.acgd-vt-empty {
	padding: 24px;
	border: 1px dashed currentColor;
	border-radius: 12px;
	text-align: center;
	opacity: 0.7;
}

/* Mobile */
@media (max-width: 767px) {
	.acgd-vt {
		--acgd-vt-card-max: 72vw;
	}

	.acgd-vt__name {
		font-size: 18px;
	}

	.acgd-vt__quote {
		font-size: 13px;
	}

	.acgd-vt__quote p {
		-webkit-line-clamp: 3;
	}

	.acgd-vt__caption {
		padding: 90px 14px 14px;
	}
}

/* Moins d'animations */
@media (prefers-reduced-motion: reduce) {
	.acgd-vt {
		--acgd-vt-speed: 0s;
	}

	.acgd-vt__video,
	.acgd-vt__arrow,
	.acgd-vt__sound,
	.acgd-vt__play {
		transition: none;
	}
}
