/* Ciclad Stats Widget — styles front-end */

.ciclad-stats {
	--csw-primary: #0D4444;
	--csw-track: #F6F7F7;
	--csw-text: #282C32;

	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 48px;
	width: 100%;
	color: var(--csw-text);
}

.ciclad-stats .csw-block {
	display: flex;
	align-items: center;
}

.ciclad-stats .csw-label,
.ciclad-stats .csw-circle__label,
.ciclad-stats .csw-capital__label,
.ciclad-stats .csw-col__label {
	font-size: 14px;
	line-height: 1.3;
	color: var(--csw-text);
	opacity: 0.85;
}

.ciclad-stats .csw-value,
.ciclad-stats .csw-circle__value,
.ciclad-stats .csw-capital__value,
.ciclad-stats .csw-col__value {
	color: var(--csw-text);
	font-weight: 400;
	font-family: "Ciclad", Sans-serif;
}

/* ---------- Bloc 1 : cercle de progression ---------- */
.ciclad-stats .csw-circle {
	flex-direction: column;
	gap: 12px;
	flex: 0 0 auto;
}

.ciclad-stats .csw-circle__wrap {
	position: relative;
	width: 96px;
	height: 96px;
}

.ciclad-stats .csw-circle__svg {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.ciclad-stats .csw-circle__track {
	fill: none;
	stroke: var(--csw-track);
	stroke-width: 6;
}

.ciclad-stats .csw-circle__progress {
	fill: none;
	stroke: var(--csw-primary);
	stroke-width: 6;
	stroke-linecap: round;
	transition: stroke-dashoffset var(--csw-duration, 1400ms) cubic-bezier(0.65, 0, 0.35, 1);
}

.ciclad-stats .csw-circle__value {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
}

.ciclad-stats .csw-circle__label {
	text-align: center;
	max-width: initial;
	margin-top: 0;
}

/* ---------- Bloc 2 : barres de progression ---------- */
.ciclad-stats .csw-bars {
	flex-direction: column;
	align-items: stretch;
	gap: 5px;
	flex: 1 1 320px;
	min-width: 260px;
}

.ciclad-stats .csw-bar__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 6px;
}

.ciclad-stats .csw-bar .csw-value {
	font-size: 16px;
	white-space: nowrap;
}

.ciclad-stats .csw-bar__track {
	position: relative;
	width: 100%;
	height: 5px;
	border-radius: 999px;
	background: var(--csw-track);
	overflow: hidden;
}

.ciclad-stats .csw-bar__progress {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 0%;
	border-radius: 999px;
	background: var(--csw-primary);
	transition: width var(--csw-duration, 1400ms) cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- Bloc 3 : capital sous gestion ---------- */
.ciclad-stats .csw-capital {
	flex-direction: column !important;
	align-items: flex-start;
	gap: 8px;
	flex: 0 0 auto;
}

/* Le chiffre est positionné en absolu en haut-gauche, la courbe occupe
   tout le bloc en fond : reproduit la maquette où "500M€" flotte au-dessus
   du tracé décoratif plutôt que d'être aligné avec lui. */
.ciclad-stats .csw-capital__graph {
	position: relative;
	width: 170px;
	height: 86px;
	flex: 0 0 auto;
}

.ciclad-stats .csw-capital__value {
	position: absolute;
	top: 0;
	left: 0;
	font-size: 32px;
	line-height: 1;
	white-space: nowrap;
	display: inline-flex;
	align-items: baseline;
	z-index: 1;
}

.ciclad-stats .csw-capital__unit {
	font-size: 0.55em;
	font-variant: small-caps;
	margin-left: 1px;
}

.ciclad-stats .csw-capital__curve {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.ciclad-stats .csw-capital__curve-track {
	stroke: var(--csw-track);
	stroke-width: 5;
	stroke-linecap: round;
}

.ciclad-stats .csw-capital__curve-line {
	fill: none;
	stroke: var(--csw-primary);
	stroke-width: 5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ---------- Bloc 4 : colonnes chiffrées ---------- */
.ciclad-stats .csw-columns {
	flex-direction: row !important;
	align-items: stretch;
	gap: 18px;
	flex: 0 0 auto;
}

/* Trait vertical bicolore : même logique que les barres horizontales
   (piste claire fixe + remplissage foncé qui "monte" comme un graph),
   simplement tourné à 90°. */
.ciclad-stats .csw-columns__divider {
	position: relative;
	align-self: stretch;
	flex: 0 0 auto;
	width: 5px;
	min-height: 90px;
	border-radius: 2.5px;
	background: var(--csw-track);
	overflow: hidden;
}

.ciclad-stats .csw-columns__divider-fill {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 0%;
	border-radius: 2.5px;
	background: var(--csw-primary);
	transition: height var(--csw-duration, 1400ms) cubic-bezier(0.65, 0, 0.35, 1);
}

.ciclad-stats .csw-columns__list {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 14px;
}

/* Chaque paire valeur/libellé est empilée (valeur au-dessus du libellé),
   comme sur la maquette — pas côte à côte. */
.ciclad-stats .csw-col {
	display: flex;
	flex-direction: column !important;
	align-items: flex-start;
	gap: 0;
}

.ciclad-stats .csw-col__value {
	font-size: 26px;
	line-height: 1.2;
}

.ciclad-stats .csw-col__label {
	font-size: 14px;
	line-height: 1.3;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.ciclad-stats {
		gap: 32px;
	}
	.ciclad-stats .csw-columns__divider {
		display: none;
	}
}

@media (max-width: 767px) {
	.ciclad-stats {
		flex-direction: column;
		align-items: flex-start;
	}
	.ciclad-stats .csw-bars {
		min-width: 0;
		width: 100%;
	}
}
