/* FLOWIM - multi-étapes */

.flowim-steps-frame {
	position: relative;
	aspect-ratio: var(--flowim-steps-ar, 1.5);
	overflow: clip;
}

/*
 * Fondu enchaîné sans creux. Faire disparaître l'ancienne image pendant que la
 * nouvelle apparaît fait passer les deux par une opacité partielle : le fond
 * transparaît et donne ce flash clair. Ici l'image sortante reste entièrement
 * opaque en dessous, seule l'entrante monte en opacité par-dessus.
 */
.flowim-steps-layer {
	position: absolute;
	inset: 0;
	opacity: 0;
	z-index: 0;
	transition: opacity var(--flowim-steps-fade, 420ms) ease;
}

.flowim-steps-layer.is-prev {
	opacity: 1;
	z-index: 1;
	transition: none;
}

.flowim-steps-layer.is-active {
	opacity: 1;
	z-index: 2;
}

.flowim-steps-layer .flowim-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--flowim-pos, 50% 50%);
}

.flowim-steps-label {
	position: absolute;
	left: 12px;
	bottom: 12px;
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(0, 0, 0, .5);
	padding: .4em .8em;
	pointer-events: none;
}

.flowim-steps-ctrl {
	margin-top: 1em;
}

/* Curseur cranté */

.flowim-steps-range {
	width: 100%;
	margin: 0 0 .6em;
	accent-color: currentColor;
}

.flowim-steps-ticks,
.flowim-steps-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: .4em 1.2em;
}

.flowim-steps-tick,
.flowim-steps-tab {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: .78em;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--flowim-muted);
	cursor: pointer;
}

.flowim-steps-tick.is-active,
.flowim-steps-tab.is-active {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: .35em;
}

.flowim-steps-tick:focus-visible,
.flowim-steps-tab:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* Timeline */

.flowim-steps-timeline {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 0;
	counter-reset: none;
}

.flowim-steps-dot {
	flex: 1;
	border-top: 1px solid var(--flowim-rule);
	padding-top: .7em;
	position: relative;
}

.flowim-steps-dot::before {
	content: "";
	position: absolute;
	top: -4px;
	left: 0;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--flowim-rule);
	opacity: .35;
}

.flowim-steps-dot.is-active::before {
	opacity: 1;
}

.flowim-steps-dot button {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	text-align: start;
	cursor: pointer;
	color: var(--flowim-muted);
	display: grid;
	gap: .15em;
}

.flowim-steps-dot.is-active button {
	color: inherit;
}

.flowim-steps-num {
	font-size: .7em;
	letter-spacing: .1em;
	font-variant-numeric: tabular-nums;
}

.flowim-steps-name {
	font-size: .8em;
	line-height: 1.25;
}

@media (max-width: 640px) {
	.flowim-steps-timeline {
		flex-direction: column;
		gap: .8em;
	}
	.flowim-steps-dot {
		border-top: 0;
		border-inline-start: 1px solid var(--flowim-rule);
		padding: 0 0 0 1em;
	}
	.flowim-steps-dot::before {
		top: .35em;
		left: -4px;
	}
}
