/**
 * Socle commun aux trois carrousels — Vision d'un Jour Mariage.
 *
 * Flèches et points de pagination : la mécanique partagée par les cartes
 * de prestations, les récits visuels et les avis Google. Ce que chaque
 * carrousel a de propre vit dans son propre fichier.
 *
 * Voir 04-css-js-conventions.md du socle web-core
 */

.vdjm-carrousel {
	position: relative;
}

.vdjm-carrousel .swiper {
	width: 100%;
	overflow: hidden;
}

/* --- Flèches --- */

.vdjm-carrousel__nav {
	display: flex;
	gap: var( --vdjm-spacing-md );
	align-items: center;
}

/* Une pastille blanche cerclée de doré, à peine détachée du fond par une
   ombre. Le cercle et le chevron suivent tous deux `currentColor` : le
   contrôle « Couleur des flèches » les règle d'un seul geste.

   Deux classes : le thème parent stylise `button` par sélecteur de type
   et d'attribut (0,1,1) — bordure, fond et rayon — ce qui l'emporterait
   sur une classe seule. */
.vdjm-carrousel .vdjm-carrousel__fleche {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	color: var( --vdjm-color-secondary );
	cursor: pointer;
	background-color: #fff;
	border: 1px solid currentColor;
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba( 0, 0, 0, 0.12 );
	transition: color var( --vdjm-transition-fast ), background-color var( --vdjm-transition-fast ), box-shadow var( --vdjm-transition-fast );
}

.vdjm-carrousel__chevron {
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: square;
}

/* Le reset du thème parent repeint tout bouton survolé ou focalisé :
   `[type=button]:focus, :hover { background-color: #c36; color: #fff }`,
   en 0,2,0 — à égalité avec la règle ci-dessus, donc gagnant selon l'ordre
   de chargement. Sans ce verrou, la flèche vire au rose dès qu'on clique
   dessus (le clic lui donne le focus) ou qu'on survole une flèche inactive. */
.vdjm-carrousel .vdjm-carrousel__fleche:is( :hover, :focus ) {
	color: var( --vdjm-color-secondary );
	background-color: #fff;
}

/* Au survol, la pastille se remplit de doré et le chevron passe en blanc.
   Le sélecteur passe par `__nav` pour dépasser le contrôle « Couleur des
   flèches » d'Elementor (0,4,0) : sinon un chevron recoloré par la cliente
   resterait doré sur fond doré, invisible. */
.vdjm-carrousel .vdjm-carrousel__nav .vdjm-carrousel__fleche:not( .swiper-button-disabled ):hover {
	color: #fff;
	background-color: var( --vdjm-color-secondary );
	border-color: var( --vdjm-color-secondary );
	box-shadow: 0 4px 12px rgba( 0, 0, 0, 0.16 );
}

/* Le focus doit rester visible : c'est le seul repère d'une navigation
   au clavier (RGAA 10.7 / WCAG 2.4.7). Jamais d'outline: none ici. */
.vdjm-carrousel .vdjm-carrousel__fleche:focus-visible {
	outline: 2px solid var( --vdjm-color-secondary );
	outline-offset: 3px;
}

.vdjm-carrousel__fleche.swiper-button-disabled {
	cursor: default;
	opacity: 0.35;
}

/* --- Points --- */

.vdjm-carrousel__points.swiper-pagination {
	position: static;
	display: flex;
	gap: var( --vdjm-spacing-md );
	justify-content: center;
	margin-top: var( --vdjm-spacing-lg );
}

.vdjm-carrousel__points .swiper-pagination-bullet {
	width: 14px;
	height: 14px;
	margin: 0;
	background: transparent;
	border: 1px solid var( --vdjm-color-secondary );
	border-radius: 50%;
	opacity: 1;
	transition: background-color var( --vdjm-transition-fast );
}

.vdjm-carrousel__points .swiper-pagination-bullet-active {
	background: var( --vdjm-color-secondary );
}

.vdjm-carrousel__points .swiper-pagination-bullet:focus-visible {
	outline: 2px solid var( --vdjm-color-secondary );
	outline-offset: 2px;
}

/* --- Message d'éditeur --- */

.vdjm-carrousel__vide {
	padding: var( --vdjm-spacing-lg );
	color: var( --vdjm-color-text );
	text-align: center;
	background: var( --vdjm-color-neutral );
	border-radius: var( --vdjm-radius-md );
}

/* Un défilement automatique reste arrêtable ; on neutralise en plus les
   transitions pour qui a demandé moins d'animations (RGAA 13.8). */
@media ( prefers-reduced-motion: reduce ) {

	.vdjm-carrousel .swiper-wrapper {
		transition-duration: 1ms !important;
	}

	.vdjm-carrousel .vdjm-carrousel__fleche {
		transition: none;
	}
}
