/* Didatec — bloc « key-figures ».
   Chargé uniquement quand le bloc est présent (enqueue_style ACF). */

/* Key figures ------------------------------------------------------------ */

.key-figures {
	position: relative;
	z-index: 1;
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
	margin-block-start: -24px;
	padding-inline: var(--wp--preset--spacing--80);
}

.key-figures__list {
	display: flex;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.key-figure {
	display: flex;
	align-items: center;
	gap: 16px;
	flex: 1 1 0;
	min-width: 0;
	padding: 16px 24px;
	border-radius: 5px;
	background-color: var(--wp--preset--color--field);
}

.key-figure__icon {
	display: inline-flex;
	flex: none;
	color: var(--wp--preset--color--blue);
}

.key-figure__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.key-figure__value {
	font-size: var(--wp--preset--font-size--h-3);
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.04em;
	color: var(--wp--preset--color--blue);
}

.key-figure__label {
	font-size: var(--wp--preset--font-size--tiny);
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--black-80);
}

/* Mobile: one card at a time, auto-scrolling. */
@media (max-width: 1023px) {
	/* The gutter belongs to the section, so the scrollport is exactly one card
	   wide and clips its neighbours instead of letting them peek. */
	.key-figures {
		margin-block-start: -40px;
		padding-inline: var(--wp--preset--spacing--70);
	}

	.key-figures__list {
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.key-figures__list::-webkit-scrollbar { display: none; }

	.key-figure {
		flex: 0 0 100%;
		scroll-snap-align: start;
		/* Room kept on the right for the dots that sit inside the card. */
		padding-inline-end: 80px;
	}

	/* The dots ride inside the card, right-aligned and vertically centred:
	   one set for the whole slider, whichever card is showing. */
	.key-figures .carousel-dots {
		position: absolute;
		inset-block: 0;
		inset-inline-end: calc(var(--wp--preset--spacing--70) + 24px);
		margin-block-start: 0;
	}

	.key-figures .carousel-dots__dot { width: 10px; }
	.key-figures .carousel-dots__dot.is-active { width: 14px; }
}
