.wp-block-ccma-stat-pill,
.ccma-stat-pill {
	display: inline-flex;
	align-items: flex-end;
	gap: 0;
	width: fit-content;
	max-width: 100%;
	box-sizing: border-box;
	vertical-align: top;
}

/* Left icon container */
.ccma-stat-pill__icon-box {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	flex: 0 0 60px;
	width: 60px;
	height: 60px;

	margin: 0;
	padding: 0;
	border-radius: 15px;

	background: var(--ccma-stat-pill-icon-bg, #BBCBB2);
	color: var(--ccma-stat-pill-card-bg, #6A855A);

	overflow: hidden;
	box-sizing: border-box;
	line-height: 0;
}

/* Actual icon size inside the box */
.ccma-stat-pill__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	width: 54px;
	height: 54px;
	flex: 0 0 54px;

	overflow: hidden;
	color: currentColor;
	line-height: 0;
	box-sizing: border-box;
}

/* Force pasted SVGs to stay inside their wrapper */
.ccma-stat-pill__icon svg {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;

	overflow: visible;
	flex: 0 0 auto;

	color: currentColor;
	fill: currentColor;
}

/* Force all SVG paths to use the component color */
.ccma-stat-pill__icon svg,
.ccma-stat-pill__icon svg * {
	fill: currentColor;
	stroke: 0;
}

/* Right card */
.ccma-stat-pill__card {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: end;

	gap: 0.25em;

	min-width: 0;
	/*height: 98px;*/

	padding: 1.5rem 2.5rem 1rem 1rem;
	border-radius: 15px;

	background: var(--ccma-stat-pill-card-bg, #6A855A);
	color: var(--ccma-stat-pill-text, #F7F1E1);

	box-sizing: border-box;
	line-height: 1;
}

/* Number */
.ccma-stat-pill__number {
	display: block;

	font-family: var(--wp--preset--font-family--sagace);
	font-size: 45px;
	font-weight: 500;
	line-height: 52px;
	letter-spacing: 0;
	min-width: 0;

	color: inherit;

	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum";
}

/* Subtitle */
.ccma-stat-pill__subtitle {
	display: block;

	font-size: 10px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-wrap: wrap;
 	color: inherit;
 	max-width: 16em;
}

/* Responsive variant */
@media (max-width: 520px) {
	.ccma-stat-pill__icon-box {
		flex-basis: 52px;
		width: 52px;
		height: 52px;
		border-radius: 13px;
	}

	.ccma-stat-pill__icon {
		width: 38px;
		height: 38px;
		flex-basis: 38px;
	}

	.ccma-stat-pill__card {
		min-width: 112px;
		height: 84px;
		border-radius: 13px;
		padding: 0.7rem 0.9rem;
	}

	.ccma-stat-pill__number {
		font-size: 2.6rem;
	}

	.ccma-stat-pill__subtitle {
		font-size: 0.6rem;
	}
}

.ccma-stat-pill__number {
	display: inline-flex;
	align-items: center;
	justify-content: start;

	white-space: nowrap;
	line-height: 1;

	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum";

	overflow: visible;
}

.ccma-counter-reel {
	position: relative;
	display: inline-block;

	width: 0.66em;

	font-size: clamp(22px, 4vw, 45px);
	height: 0.98em;

	overflow: hidden;
	vertical-align: top;

	opacity: 0;
	transform: translateY(0.08em);

	transition:
		opacity 140ms ease,
		transform 180ms ease;
}

.ccma-counter-reel.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.ccma-counter-reel__track {
	display: flex;
	flex-direction: column;

	width: 100%;

	transform: translate3d(0, 0, 0);
	will-change: transform;

	/*
	 * Empêche certains navigateurs de produire un léger flou
	 * pendant les translations rapides.
	 */
	backface-visibility: hidden;
}

.ccma-counter-reel__digit {
	display: flex;
	align-items: center;
	justify-content: center;

	flex: 0 0 1em;
	width: 100%;
	height: 1em;

	line-height: 1;
}

.ccma-counter-static-character {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: clamp(22px, 4vw, 45px);

	height: 0.98em;
	line-height: 1;
}

.ccma-stat-pill__number.is-complete
	.ccma-counter-reel__track {
	will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
	.ccma-counter-reel {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.ccma-counter-reel__track {
		will-change: auto;
	}
}