/* =========================================================
   MLT VIDÉO — même structure que mlt_huiles : média à gauche (desktop),
   en-tête de section + bouton à droite. Dépend de mlt-tokens.
   ========================================================= */

.mlt-video {
	background: var(--mlt-color-blanc);
}

.mlt-video__inner {
	display: grid;
	gap: var(--mlt-space-48);
}

/* -------------------- Média -------------------- */
/* Mobile : le média vient après le texte (le titre de section reste en tête), comme mlt_huiles */
.mlt-video__visuel {
	order: 2;
}

.mlt-video__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	border-radius: var(--mlt-radius-panel);
	background: var(--mlt-color-texte);
}

.mlt-video .mlt-video__poster,
.mlt-video__media video,
.mlt-video__media iframe {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	border: 0;
	object-fit: cover;
}

/* Bouton lecture : pastille blanche, triangle olive */
.mlt-video .mlt-video__play {
	position: absolute;
	z-index: 1;
	top: 50%;
	left: 50%;
	width: 72px;
	height: 72px;
	min-height: 0;
	padding: 0 0 0 5px; /* centre optique du triangle */
	border-radius: 50%;
	background: var(--mlt-color-blanc);
	color: var(--mlt-color-olive);
	transform: translate(-50%, -50%);
	transition: background-color var(--mlt-duration) var(--mlt-ease),
		color var(--mlt-duration) var(--mlt-ease),
		transform var(--mlt-duration) var(--mlt-ease);
}

.mlt-video__play svg {
	fill: currentColor;
}

.mlt-video .mlt-video__play:hover {
	background: var(--mlt-color-blanc);
	color: var(--mlt-color-botanique);
	transform: translate(-50%, -50%) scale(1.06);
}

.mlt-video .mlt-video__play:active {
	color: var(--mlt-color-texte);
	transform: translate(-50%, -50%) scale(0.98);
}

.mlt-video .mlt-video__play:focus-visible {
	box-shadow: var(--mlt-focus-ring-inverse);
}

/* -------------------- Texte -------------------- */
.mlt-video__cta {
	margin-top: var(--mlt-space-32);
}

/* Étapes du process : liste numérotée à filets (style des listes home2) */
.mlt-video__etapes {
	margin: var(--mlt-space-32) 0 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--mlt-color-ligne);
}

.mlt-video__etape {
	display: flex;
	gap: var(--mlt-space-16);
	padding: var(--mlt-space-16) 0;
	border-bottom: 1px solid var(--mlt-color-ligne);
}

.mlt-video__num {
	flex: 0 0 2.25rem;
	color: var(--mlt-color-ocre);
	font-size: 1.125rem; /* ocre : gras >= 14px */
	font-weight: 700;
	line-height: 1.4;
}

.mlt-video__etape-corps {
	display: grid;
	gap: 2px;
}

.mlt-video__etape-titre {
	color: var(--mlt-color-olive);
	font-size: var(--mlt-fs-lead);
	font-weight: 500;
}

.mlt-video__etape-texte {
	color: var(--mlt-color-texte-doux);
	font-size: var(--mlt-fs-small);
}

@media (min-width: 768px) {
	.mlt-video__visuel {
		width: min(100%, 520px);
		justify-self: center;
	}

	.mlt-video .mlt-video__play {
		width: 88px;
		height: 88px;
		padding-left: 6px;
	}
}

@media (min-width: 1024px) {
	.mlt-video__inner {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		gap: var(--mlt-space-96);
		align-items: center;
	}

	.mlt-video__visuel {
		order: 0;
		width: auto;
		justify-self: stretch;
	}
}

/* =========================================================
   Variante « bande » : fond olive texturé, vidéo large, étapes illustrées
   ========================================================= */
/* Fond olive : passe devant le fond blanc de .mlt-video (texture via .mlt-olive-grain) */
.mlt-video.mlt-video--bande {
	background-color: var(--mlt-color-olive);
}

.mlt-video--bande .mlt-section__inner {
	position: relative;
	z-index: 1;
}

.mlt-video__entete {
	display: grid;
	gap: var(--mlt-space-24);
	margin-bottom: var(--mlt-space-48);
}

.mlt-video--bande .mlt-lead {
	margin-top: 0;
}

.mlt-video--bande .mlt-video__cta {
	margin-top: var(--mlt-space-24);
}

.mlt-video--bande .mlt-video__cta,
.mlt-video--bande .mlt-video__cta:visited,
.mlt-video--bande .mlt-video__cta:focus {
	color: var(--mlt-color-olive);
}

.mlt-video--bande .mlt-video__cta:hover {
	color: var(--mlt-color-botanique);
}

.mlt-video--bande .mlt-video__cta:focus-visible {
	box-shadow: var(--mlt-focus-ring-inverse);
}

.mlt-video__media--large {
	aspect-ratio: 16 / 9;
}

/* Étapes — sous 1024 px : slider étape par étape (une étape par vue sur mobile, deux sur tablette).
   Barre de défilement native masquée : la position est donnée par la barre ocre et le compteur (JS). */
.mlt-video__colonnes {
	--mlt-etapes-gap: var(--mlt-space-24);
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 100%;
	gap: var(--mlt-etapes-gap);
	margin: var(--mlt-space-48) 0 0;
	padding: 0;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	list-style: none;
}

.mlt-video__colonnes::-webkit-scrollbar {
	display: none;
}

.mlt-video__colonnes:focus-visible {
	outline: none;
	box-shadow: inset var(--mlt-focus-ring-inverse);
}

/* Souris : la liste se glisse (JS mlt-video) ; aimantation coupée pendant le geste */
@media (hover: hover) and (pointer: fine) {
	.mlt-video__colonnes[tabindex] {
		cursor: grab;
	}
}

.mlt-video__colonnes.is-glisse {
	cursor: grabbing;
	scroll-snap-type: none;
	user-select: none;
}

/* Barre de position (créée par le JS quand la liste déborde) : piste claire, curseur ocre */
.mlt-video__defile {
	position: relative;
	height: 2px;
	margin-top: var(--mlt-space-16);
	overflow: hidden;
	border-radius: var(--mlt-radius-pill);
	background: var(--mlt-color-ligne-inverse);
}

.mlt-video__defile-curseur {
	display: block;
	width: 25%;
	height: 100%;
	border-radius: inherit;
	background: var(--mlt-color-ocre);
}

/* Flèches + compteur « 01 / 04 » sous la barre */
.mlt-video__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--mlt-space-16);
	margin-top: var(--mlt-space-16);
}

.mlt-video__nav[hidden] {
	display: none;
}

.mlt-video__compteur {
	margin: 0;
	color: var(--mlt-color-blanc-80);
	font-size: var(--mlt-fs-small);
	font-variant-numeric: tabular-nums;
}

.mlt-video__compteur-courant {
	color: var(--mlt-color-blanc);
	font-weight: 700;
}

/* Pastille cerclée blanche (sur fond olive), comme les réseaux du footer. Classe .mlt-btn (exclue du
   correctif de style.css sur button:hover) : on reprend ici sa taille et sa bordure. */
.mlt-video .mlt-video__fleche {
	width: 44px;
	height: 44px;
	min-height: 0;
	padding: 0;
	border: 1px solid var(--mlt-color-ligne-inverse);
	border-radius: 50%;
	background: transparent;
	color: var(--mlt-color-blanc);
}

/* Survol réservé aux souris : sur écran tactile, l'état :hover reste collé après un toucher */
@media (hover: hover) {
	.mlt-video .mlt-video__fleche:hover:not(:disabled) {
		border-color: var(--mlt-color-blanc);
		background: var(--mlt-color-blanc);
		color: var(--mlt-color-olive);
	}
}

.mlt-video .mlt-video__fleche:active:not(:disabled) {
	border-color: var(--mlt-color-fond);
	background: var(--mlt-color-fond);
	color: var(--mlt-color-texte);
}

.mlt-video .mlt-video__fleche:focus-visible {
	outline: none;
	box-shadow: var(--mlt-focus-ring-inverse);
}

.mlt-video .mlt-video__fleche:disabled {
	opacity: 0.35;
	cursor: default;
}

.mlt-video__colonne {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--mlt-space-8);
	scroll-snap-align: start;
	scroll-snap-stop: always; /* un geste = une étape, même rapide */
}

/* Trait ocre continu qui relie les numéros (sillons du logo) ; il traverse l'espace entre les étapes */
.mlt-video__colonne::before {
	content: "";
	position: absolute;
	top: 19px;
	left: 0;
	right: calc(-1 * var(--mlt-etapes-gap));
	height: 2px;
	background: var(--mlt-color-ocre);
	transform-origin: left center;
}

.mlt-video__colonne:last-child::before {
	right: 0;
}

/* Avec les animations : le trait se dessine étape après étape à l'apparition */
.mlt-anim-on .mlt-video__colonne::before {
	transform: scaleX(0);
	transition: transform var(--mlt-duration-reveal) var(--mlt-ease);
	transition-delay: calc(var(--mlt-i, 0) * 180ms + 250ms);
}

.mlt-anim-on .mlt-video__colonne.is-visible::before {
	transform: none;
}

.mlt-video__colonne-media {
	overflow: hidden;
	aspect-ratio: 4 / 3;
	margin-bottom: var(--mlt-space-8);
	border-radius: var(--mlt-radius-card);
	background: var(--mlt-color-texte);
}

.mlt-video--bande .mlt-video__colonne-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 600ms var(--mlt-ease);
}

.mlt-video__colonne:hover .mlt-video__colonne-img {
	transform: scale(1.05);
}

/* Sur olive : numéro en crème dans une pastille cerclée d'ocre posée sur le trait
   (l'ocre n'est pas assez contrasté pour le texte, il reste décoratif) */
.mlt-video--bande .mlt-video__num {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	width: 40px;
	height: 40px;
	margin-bottom: var(--mlt-space-16);
	border: 2px solid var(--mlt-color-ocre);
	border-radius: 50%;
	background: var(--mlt-color-olive);
	color: var(--mlt-color-fond);
	font-size: var(--mlt-fs-small);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.mlt-video--bande .mlt-video__etape-titre {
	color: var(--mlt-color-blanc);
}

.mlt-video--bande .mlt-video__etape-texte {
	color: var(--mlt-color-blanc-80);
}

/* Tablette : deux étapes par vue, toujours étape par étape */
@media (min-width: 768px) {
	.mlt-video__colonnes {
		grid-auto-columns: calc((100% - var(--mlt-etapes-gap)) / 2);
	}
}

@media (min-width: 1024px) {
	.mlt-video__entete {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: var(--mlt-space-64);
		align-items: end;
	}

	.mlt-video--bande .mlt-video__media--large {
		aspect-ratio: 21 / 9;
		min-height: 0;
	}

	/* Desktop : frise de 4 colonnes, sans défilement */
	.mlt-video__colonnes {
		grid-auto-flow: row;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		margin: var(--mlt-space-48) 0 0;
		padding: 0;
		overflow: visible;
		scroll-snap-type: none;
	}

	.mlt-video__defile {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mlt-video--bande .mlt-video__colonne-img,
	.mlt-video__colonne::before {
		transition: none;
	}

	.mlt-video .mlt-video__play,
	.mlt-video .mlt-video__play:hover,
	.mlt-video .mlt-video__play:active {
		transition: none;
		transform: translate(-50%, -50%);
	}
}
