/**
 * Vousfinancer Simulateurs — feuille BEM unique.
 *
 * Tout est ciblé par classes sous .vf-sim / .vf-chart : aucun effet de bord
 * sur le reste du site. Les titres et paragraphes libres héritent des styles
 * des pages ; seuls la carte, les composants de formulaire, la synthèse, les
 * tableaux et les graphiques sont stylés ici.
 *
 * Mise en page (maquette « Refonte 2026 ») : une carte, formulaire à gauche,
 * panneau de résultats à droite — collant au défilement — organisé en
 * accordéon exclusif (<details name>) : Synthèse ouverte par défaut, puis
 * une section par tableau ou graphique. En pile sous 1100 px de large
 * (requête de conteneur : c'est la largeur du simulateur qui compte, pas
 * celle de l'écran). Seuil : à 1100 px, chaque colonne garde ~530 px, le
 * minimum pour un tableau de résultats à 5 colonnes sans défilement ; la
 * pleine largeur desktop (1312 px) est en deux colonnes, la tablette
 * paysage (≈ 976 px de contenu) repasse en vertical.
 */

.vf-sim {
	--vf-accent: #b91211;
	--vf-accent-dark: #961010;
	--vf-text: #181716;
	--vf-text-soft: #666;
	--vf-border: rgba(24, 23, 22, 0.2);
	--vf-card-border: rgba(24, 23, 22, 0.15);
	--vf-bg-soft: #f4f4f4;
	--vf-panel-bg: #f4f4f4;
	--vf-band-bg: #ececec;
	--vf-track: #e9eaeb;
	--vf-error: #c0392b;
	--vf-radius: 10px;
	--vf-sticky-top: 24px;
	--vf-chart-c0: #008ed6;
	--vf-chart-c1: #9b9b9b;
	--vf-chart-c2: #00a247;
	--vf-chart-c3: var(--vf-accent);

	--vf-panel-pad-x: 48px;
	--vf-panel-pad-y: 40px;

	container: vf-sim / inline-size;
}

.vf-sim [hidden] {
	display: none !important;
}

/* -------------------------------------------------------------------------
 * Carte et panneaux
 * ---------------------------------------------------------------------- */

.vf-sim__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
	padding: 12px;
	background: #fff;
	border: 1px solid var(--vf-card-border);
	border-radius: 24px;
	color: var(--vf-text);
}

.vf-sim__panel--form {
	padding: 20px 12px 8px;
	min-width: 0;
}

.vf-sim__panel--results {
	--vf-panel-pad-x: 20px;
	--vf-panel-pad-y: 28px;
	background: var(--vf-panel-bg);
	border-radius: 16px;
	min-width: 0;
	container: vf-results / inline-size;
}

.vf-sim__results-scroll {
	padding: var(--vf-panel-pad-y) var(--vf-panel-pad-x);
}

@container vf-sim (min-width: 1100px) {
	.vf-sim__layout {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	}

	.vf-sim__panel--form {
		padding: 28px 36px;
	}

	.vf-sim__panel--results {
		--vf-panel-pad-x: 48px;
		--vf-panel-pad-y: 40px;
	}

	/* La colonne grise s'étire sur toute la hauteur de la carte ; son contenu
	   reste visible pendant le défilement d'un long formulaire, et défile
	   dans le panneau s'il dépasse la hauteur de l'écran. */
	.vf-sim__results-scroll {
		position: sticky;
		top: var(--vf-sticky-top);
		max-height: calc(100dvh - 2 * var(--vf-sticky-top));
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
	}
}

.vf-sim__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 32px;
}

.vf-sim__eyebrow {
	margin: 0;
	font-size: 12px;
	line-height: 18px;
	font-weight: 700;
	letter-spacing: 0.3px;
	text-transform: uppercase;
}

.vf-sim__live {
	margin: 0;
	font-size: 12px;
	line-height: 19px;
	color: var(--vf-text-soft);
	white-space: nowrap;
}

/* -------------------------------------------------------------------------
 * Chargement
 * ---------------------------------------------------------------------- */

.vf-sim__loader {
	text-align: center;
	padding: 24px;
	background: var(--vf-bg-soft);
	border-radius: var(--vf-radius);
	color: var(--vf-text-soft);
}

.vf-sim__loader p {
	margin: 4px 0 0;
}

/* -------------------------------------------------------------------------
 * Formulaire
 * ---------------------------------------------------------------------- */

.vf-sim__form {
	margin: 0;
}

.vf-sim__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	margin-bottom: 24px;
}

.vf-sim__grid:last-child {
	margin-bottom: 0;
}

/* Deux colonnes au plus (formulaires longs), une seule sous ~400 px. */
.vf-sim__grid--2 {
	grid-template-columns: repeat(auto-fit, minmax(max(180px, calc((100% - 24px) / 2)), 1fr));
}

/* Les aides passent sous le champ : les champs d'une même ligne restent alignés. */
.vf-sim__field > .vf-sim__help {
	order: 3;
}

.vf-sim__form-title {
	margin: 32px 0 16px;
	font-size: 12px;
	line-height: 18px;
	font-weight: 700;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	color: var(--vf-text-soft);
}

.vf-sim__form > .vf-sim__form-title:first-child {
	margin-top: 0;
}

.vf-sim__field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.vf-sim__field--full {
	grid-column: 1 / -1;
}

.vf-sim__label {
	font-size: 14px;
	font-weight: 600;
	line-height: 21px;
	letter-spacing: -0.16px;
}

.vf-sim__help {
	font-size: 12px;
	line-height: 1.5;
	color: var(--vf-text-soft);
	margin: 0;
}

.vf-sim__control {
	position: relative;
	display: flex;
	align-items: stretch;
	min-width: 0;
}

/* Préfixe .vf-sim (0,2,0) : les thèmes stylent `input[type=…]` (0,1,1) —
   GeneratePress y impose couleur, padding, bordure et fond au focus. */
.vf-sim .vf-sim__input,
.vf-sim .vf-sim__select {
	/* GeneratePerf (reset.css) force `border-radius: var(--border-radius)
	   !important` sur input, button, textarea : on pilote donc la variable. */
	--border-radius: var(--vf-radius);
	width: 100%;
	min-width: 0;
	min-height: 48px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--vf-border);
	border-radius: var(--vf-radius);
	background: #fff;
	color: var(--vf-text);
	font: inherit;
	font-size: 15px;
	line-height: 22px;
	box-sizing: border-box;
	font-variant-numeric: tabular-nums;
}

.vf-sim .vf-sim__select {
	padding-right: 36px;
	-webkit-appearance: none;
	appearance: none;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
	cursor: pointer;
}

.vf-sim .vf-sim__input:focus,
.vf-sim .vf-sim__select:focus {
	background-color: #fff;
	color: var(--vf-text);
}

.vf-sim .vf-sim__input:focus-visible,
.vf-sim .vf-sim__select:focus-visible {
	outline: 2px solid var(--vf-accent);
	outline-offset: 1px;
	border-color: var(--vf-accent);
}

.vf-sim .vf-sim__input[disabled],
.vf-sim .vf-sim__input[readonly],
.vf-sim .vf-sim__input[readonly]:focus {
	background: var(--vf-bg-soft);
	color: var(--vf-text-soft);
}

/* Champs calculés : readonly plutôt que disabled — focusables, lus par les
   lecteurs d'écran et copiables — sans aucun signe d'éditabilité. */
.vf-sim__input[readonly] {
	cursor: default;
	-moz-appearance: textfield;
	appearance: textfield;
}

.vf-sim__input[readonly]::-webkit-inner-spin-button,
.vf-sim__input[readonly]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.vf-sim__input[readonly]:focus-visible {
	border-color: var(--vf-border);
	outline-color: var(--vf-text-soft);
}

.vf-sim .vf-sim__input--invalid {
	border-color: var(--vf-error);
}

/* Unité en suffixe (€, %, ans, mois…) : un seul cadre pour le champ et son
   unité, qui s'affiche dans une case grise accolée à droite. */
.vf-sim__control--unit {
	border: 1px solid var(--vf-border);
	border-radius: var(--vf-radius);
	background: #fff;
}

.vf-sim .vf-sim__control--unit > .vf-sim__input,
.vf-sim .vf-sim__control--unit > .vf-sim__select {
	/* Rayon intérieur = rayon du cadre − sa bordure : le coin épouse la courbe. */
	--border-radius: calc(var(--vf-radius) - 1px) 0 0 calc(var(--vf-radius) - 1px);
	flex: 1 1 auto;
	border: 0;
	border-radius: calc(var(--vf-radius) - 1px) 0 0 calc(var(--vf-radius) - 1px);
	min-height: 46px;
}

.vf-sim .vf-sim__control--unit > .vf-sim__select + .vf-sim__select,
.vf-sim .vf-sim__control--unit > .vf-sim__input + .vf-sim__select {
	flex: 0 0 auto;
	width: auto;
	min-height: 46px;
	padding-left: 12px;
	border-left: 1px solid var(--vf-border);
	border-radius: 0 calc(var(--vf-radius) - 1px) calc(var(--vf-radius) - 1px) 0;
	background-color: var(--vf-bg-soft);
	color: var(--vf-text-soft);
	font-size: 14px;
}

.vf-sim__control--unit:focus-within {
	border-color: var(--vf-accent);
	outline: 2px solid var(--vf-accent);
	outline-offset: 1px;
}

.vf-sim__control--unit:focus-within > .vf-sim__input:focus-visible,
.vf-sim__control--unit:focus-within > .vf-sim__select:focus-visible {
	outline: 0;
}

.vf-sim__control--unit:has(.vf-sim__input--invalid) {
	border-color: var(--vf-error);
}

.vf-sim__control--unit:has(.vf-sim__input[readonly]) {
	background: var(--vf-bg-soft);
}

.vf-sim__control--unit:has(.vf-sim__input[readonly]):focus-within {
	border-color: var(--vf-border);
	outline-color: var(--vf-text-soft);
}

.vf-sim__unit {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	padding: 0 14px;
	border-left: 1px solid var(--vf-border);
	border-radius: 0 calc(var(--vf-radius) - 1px) calc(var(--vf-radius) - 1px) 0;
	background: var(--vf-bg-soft);
	color: var(--vf-text-soft);
	font-size: 14px;
	line-height: 21px;
	white-space: nowrap;
	pointer-events: none;
}

.vf-sim__error {
	font-size: 12px;
	line-height: 1.5;
	color: var(--vf-error);
	margin: 0;
}

.vf-sim__radios {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}

.vf-sim__radio {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}

/* Sliders — générés sous le champ par core.js (enhanceRanges). La boîte fait
   la hauteur du curseur (24 px) : sur WebKit mobile le curseur n'est plus
   rogné ; la piste (8 px) et son remplissage sont dessinés par le
   pseudo-élément à partir de --vf-fill, posée par core.js (paintRange). */
.vf-sim__range {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	height: 24px;
	margin: 6px 0 0;
	padding: 0;
	background: transparent;
	cursor: pointer;
	--vf-fill: 0%;
}

.vf-sim__range::-webkit-slider-runnable-track {
	height: 8px;
	border-radius: 999px;
	background: linear-gradient(to right, var(--vf-accent) var(--vf-fill), var(--vf-track) var(--vf-fill));
}

.vf-sim__range::-moz-range-track {
	height: 8px;
	border-radius: 999px;
	background: var(--vf-track);
}

.vf-sim__range::-moz-range-progress {
	height: 8px;
	border-radius: 999px;
	background: var(--vf-accent);
}

.vf-sim__range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	width: 24px;
	height: 24px;
	margin-top: -8px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--vf-accent);
	box-shadow: 0 4px 6px -1px rgba(10, 13, 18, 0.1), 0 2px 4px -2px rgba(10, 13, 18, 0.06);
}

.vf-sim__range::-moz-range-thumb {
	box-sizing: border-box;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--vf-accent);
	box-shadow: 0 4px 6px -1px rgba(10, 13, 18, 0.1), 0 2px 4px -2px rgba(10, 13, 18, 0.06);
}

.vf-sim__range:focus-visible {
	outline: 2px solid var(--vf-accent);
	outline-offset: 3px;
}

.vf-sim__range-scale {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: -2px;
	font-size: 11px;
	line-height: 16.5px;
	color: var(--vf-text-soft);
	font-variant-numeric: tabular-nums;
}

/* Boutons (secondaires : ajout/retrait de lignes, bascule de mode) */
.vf-sim__button {
	--border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 11px 24px;
	border: 1px solid var(--vf-accent);
	border-radius: 999px;
	background: var(--vf-accent);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.vf-sim__button:hover,
.vf-sim__button:focus-visible {
	background: var(--vf-accent-dark);
	border-color: var(--vf-accent-dark);
	color: #fff;
}

.vf-sim__button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.vf-sim__button--small {
	min-width: 32px;
	padding: 5px 12px;
	font-size: 13px;
}

.vf-sim__button--ghost {
	background: #fff;
	color: var(--vf-text);
	border-color: var(--vf-border);
}

.vf-sim__button--ghost:hover,
.vf-sim__button--ghost:focus-visible {
	background: var(--vf-text);
	border-color: var(--vf-text);
	color: #fff;
}

.vf-sim__actions {
	margin: 24px 0 0;
}

/* Mentions légales et notes sous le formulaire */
.vf-sim__legal {
	margin: 24px 0 0;
	font-size: 12px;
	line-height: 1.65;
	color: var(--vf-text-soft);
}

/* -------------------------------------------------------------------------
 * Panneau de résultats : accordéon
 * ---------------------------------------------------------------------- */

.vf-sim__results {
	margin: 0;
}

.vf-sim__section + .vf-sim__section {
	border-top: 1px solid var(--vf-card-border);
}

.vf-sim__section-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 0;
	list-style: none;
	cursor: pointer;
	font-size: 12px;
	line-height: 18px;
	font-weight: 700;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	color: var(--vf-text-soft);
}

.vf-sim__section:first-child > .vf-sim__section-title {
	padding-top: 0;
}

.vf-sim__section-title::-webkit-details-marker {
	display: none;
}

.vf-sim__section-title::after {
	content: "";
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	margin-right: 4px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.15s ease;
}

.vf-sim__section[open] > .vf-sim__section-title {
	color: var(--vf-text);
}

.vf-sim__section[open] > .vf-sim__section-title::after {
	transform: translateY(2px) rotate(-135deg);
}

.vf-sim__section-title:hover {
	color: var(--vf-text);
}

.vf-sim__section-title:focus-visible {
	outline: 2px solid var(--vf-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

.vf-sim__section-body {
	padding: 0 0 24px;
	font-size: 14px;
	line-height: 1.55;
}

.vf-sim__section-body > :first-child {
	margin-top: 0;
}

.vf-sim__section-body > :last-child {
	margin-bottom: 0;
}

.vf-sim__empty {
	display: none;
	margin: 0;
	color: var(--vf-text-soft);
	font-size: 14px;
}

[data-vf-results][hidden] ~ .vf-sim__empty {
	display: block;
}

/* Un message d'erreur de calcul affiché dans le panneau remplace l'état vide. */
.vf-sim__results-scroll > .vf-sim__alert:not([hidden]) ~ .vf-sim__empty {
	display: none;
}

.vf-sim__results-scroll > .vf-sim__alert {
	margin: 0;
}

.vf-sim__grid > .vf-sim__alert {
	margin: 0;
}

/* -------------------------------------------------------------------------
 * Synthèse : chiffre clé, bandeaux, lignes libellé / valeur
 * ---------------------------------------------------------------------- */

.vf-sim__hero {
	margin: 16px 0 0;
	font-size: clamp(36px, 12cqi, 68px);
	line-height: 1.15;
	font-weight: 300;
	letter-spacing: -0.04em;
	color: var(--vf-accent);
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

.vf-sim__hero--text {
	font-size: clamp(26px, 7cqi, 40px);
	letter-spacing: -0.02em;
}

.vf-sim__hero-caption {
	margin: 8px 0 0;
	font-size: 13px;
	line-height: 19.5px;
	color: var(--vf-text-soft);
}

.vf-sim__breakdown {
	margin: 24px calc(-1 * var(--vf-panel-pad-x)) 0;
	border-top: 1px solid var(--vf-card-border);
	border-bottom: 1px solid var(--vf-card-border);
}

.vf-sim__band {
	margin: 0;
	padding: 10px var(--vf-panel-pad-x);
	background: var(--vf-band-bg);
	font-size: 11px;
	line-height: 16.5px;
	font-weight: 600;
	letter-spacing: 0.44px;
	text-transform: uppercase;
	color: var(--vf-text-soft);
}

.vf-sim__dl {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 16px var(--vf-panel-pad-x);
	font-size: 13px;
	line-height: 19.5px;
}

.vf-sim__dl-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
}

.vf-sim__dl-row > dt {
	margin: 0;
	color: var(--vf-text-soft);
}

.vf-sim__dl-row > dd {
	margin: 0;
	font-weight: 600;
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.vf-sim__dl-row--strong > dt {
	color: var(--vf-text);
	font-weight: 600;
}

.vf-sim__dl-row--strong > dd {
	color: var(--vf-accent);
}

.vf-sim__note {
	margin: 24px 0 0;
	font-size: 12px;
	line-height: 19.8px;
	color: var(--vf-text-soft);
}

/* Anciennes briques de résultat, toujours utilisées dans les sections */
.vf-sim__cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
	margin: 16px 0;
}

.vf-sim__card {
	background: #fff;
	border: 1px solid var(--vf-card-border);
	border-radius: 12px;
	padding: 16px;
	text-align: center;
}

.vf-sim__card-label {
	display: block;
	color: var(--vf-text-soft);
	font-size: 12px;
	margin-bottom: 6px;
}

.vf-sim__card-value {
	display: block;
	font-size: 1.35em;
	font-weight: 600;
	color: var(--vf-accent);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.vf-sim__card--neutral .vf-sim__card-value {
	color: inherit;
}

.vf-sim__value {
	color: var(--vf-accent);
	font-weight: 600;
	white-space: nowrap;
}

.vf-sim__list {
	list-style: none;
	margin: 8px 0 16px;
	padding: 0;
}

.vf-sim__list li {
	margin: 2px 0;
}

.vf-sim__alert {
	padding: 12px 16px;
	border-radius: var(--vf-radius);
	background: #fff;
	border-left: 4px solid var(--vf-text-soft);
	margin: 16px 0;
	font-size: 14px;
}

.vf-sim__alert--error {
	border-left-color: var(--vf-error);
	color: var(--vf-error);
}

.vf-sim__alert--success {
	border-left-color: #00a247;
}

.vf-sim__alert--warning {
	border-left-color: #f5a623;
}

.vf-sim__text-center {
	text-align: center;
}

/* -------------------------------------------------------------------------
 * Tableaux
 * ---------------------------------------------------------------------- */

.vf-sim__table-wrap {
	overflow-x: auto;
	margin: 16px 0;
	border: 1px solid var(--vf-card-border);
	border-radius: 12px;
	background: #fff;
}

/* border: 0 — les thèmes bordent souvent `table` (GeneratePress : 1px 0 0 1px) ;
   en border-collapse, la moitié de cette bordure déborde de la boîte et le
   cadre (.vf-sim__table-wrap) affiche une barre de défilement pour 0,5 px. */
.vf-sim__table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: 13px;
	line-height: 1.45;
	font-variant-numeric: tabular-nums;
}

.vf-sim__table th,
.vf-sim__table td {
	padding: 9px 12px;
	border: 0;
	border-bottom: 1px solid var(--vf-card-border);
	text-align: right;
	white-space: nowrap;
}

.vf-sim__table tr:last-child > td,
.vf-sim__table tr:last-child > th {
	border-bottom: 0;
}

.vf-sim__table thead th {
	border-bottom: 1px solid var(--vf-card-border);
}

.vf-sim__table th {
	background: var(--vf-band-bg);
	font-weight: 600;
	color: var(--vf-text-soft);
	font-size: 12px;
}

.vf-sim__table th:first-child,
.vf-sim__table td:first-child {
	text-align: left;
}

.vf-sim__table .vf-sim__row--total {
	font-weight: 700;
	background: var(--vf-bg-soft);
}

.vf-sim__row--year {
	cursor: pointer;
}

.vf-sim__row--year:hover {
	background: var(--vf-bg-soft);
}

.vf-sim__row--month td {
	background: #fafafa;
	color: var(--vf-text-soft);
}

.vf-sim__caret {
	display: inline-block;
	margin-right: 8px;
	transition: transform 0.15s ease;
}

.vf-sim__row--open .vf-sim__caret {
	transform: rotate(90deg);
}

.vf-sim__row--highlight {
	background: #fbeceb;
}

/* Variantes d'alignement de cellules (dates mensuelles, tableaux centrés…) */
.vf-sim__table--center th,
.vf-sim__table--center td,
.vf-sim__table .vf-sim__cell--center {
	text-align: center;
}

.vf-sim__table .vf-sim__cell--right {
	text-align: right;
}

/* États de colonnes (tableau comparatif valeur de bien : 31 → 35 %) */
.vf-sim__table .vf-sim__cell--success {
	background: #e6f4e2;
}

.vf-sim__table .vf-sim__cell--active {
	background: var(--vf-bg-soft);
}

.vf-sim__table .vf-sim__cell--warning {
	background: #fcf6e1;
}

.vf-sim__table .vf-sim__cell--danger {
	background: #f7e3e3;
}

/* Tableaux de saisie (prêts secondaires, paliers) : champs compacts */
.vf-sim .vf-sim__table .vf-sim__input,
.vf-sim .vf-sim__table .vf-sim__select {
	min-height: 38px;
	min-width: 90px;
	font-size: 14px;
	padding: 0 10px;
}

.vf-sim .vf-sim__table .vf-sim__control--unit > .vf-sim__input {
	min-height: 36px;
}

.vf-sim__table .vf-sim__unit {
	padding: 0 10px;
	font-size: 13px;
}

/* -------------------------------------------------------------------------
 * Graphiques
 * ---------------------------------------------------------------------- */

.vf-sim__chart + .vf-sim__chart {
	margin-top: 8px;
}

.vf-chart {
	margin: 16px 0;
}

.vf-chart__svg {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 600 / 320;
}

.vf-chart__svg--pie {
	aspect-ratio: 1;
	max-width: 280px;
	margin: 0 auto;
}

.vf-chart__grid {
	stroke: var(--vf-card-border, rgba(24, 23, 22, 0.15));
	stroke-width: 1;
}

.vf-chart__tick {
	font-size: 10.5px;
	fill: var(--vf-text-soft, #666);
}

.vf-chart__bar,
.vf-chart__slice,
.vf-chart__area {
	transition: opacity 0.15s ease;
}

.vf-chart__bar:hover,
.vf-chart__slice:hover {
	opacity: 0.8;
}

.vf-chart__legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 20px;
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	font-size: 12px;
	color: var(--vf-text-soft);
}

.vf-chart__legend-item {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
}

.vf-chart__swatch {
	width: 12px;
	height: 12px;
	border-radius: 3px;
	flex-shrink: 0;
}

/* Encadrés dans le panneau formulaire (blanc) : fond doux pour les détacher. */
.vf-sim__panel--form .vf-sim__alert {
	background: var(--vf-bg-soft);
}

/* Bouton de bascule en tête de formulaire (ex. mode comparaison du TAEG). */
.vf-sim__actions--top {
	margin: 0 0 24px;
}

/* Dans le panneau de résultats, les tableaux prennent la largeur du panneau
   (à 24 px de ses bords) : 6 colonnes tiennent sans défilement à 1312 px. */
.vf-sim__results .vf-sim__table-wrap {
	margin-inline: calc(24px - var(--vf-panel-pad-x));
}

.vf-sim__results .vf-sim__table th,
.vf-sim__results .vf-sim__table td {
	padding: 8px 10px;
}

/* Tableaux de saisie dans le formulaire : cellules resserrées. */
.vf-sim__panel--form .vf-sim__table th,
.vf-sim__panel--form .vf-sim__table td {
	padding: 8px 8px;
}

.vf-sim .vf-sim__panel--form .vf-sim__table .vf-sim__input {
	min-width: 76px;
}

/* Dernière colonne (actions) toujours visible quand le tableau défile. */
.vf-sim__table--sticky-end tr > :last-child {
	position: sticky;
	right: 0;
	background: #fff;
	box-shadow: -1px 0 0 var(--vf-card-border);
}

.vf-sim__table--sticky-end thead tr > :last-child {
	background: var(--vf-band-bg);
}

.vf-sim__table--sticky-end .vf-sim__row--total > :last-child {
	background: var(--vf-bg-soft);
}

/* La ligne de la dernière mensualité n'a que 6 cellules (rowspan) : pas
   d'ombre de colonne collante sur sa dernière cellule de données. */
.vf-sim__table--sticky-end [data-vf-last-mensualite] > :last-child,
.vf-sim__table--sticky-end [data-vf-crd-alert] > :last-child {
	position: static;
	box-shadow: none;
	background: transparent;
}

/* Sélecteur segmenté (profil de dossier) — contrôle en pilule de la maquette. */
.vf-sim__segmented {
	display: inline-flex;
	flex-wrap: wrap;
	align-self: flex-start;
	gap: 2px;
	padding: 3px;
	border: 1px solid var(--vf-border);
	border-radius: 999px;
	background: #fff;
}

.vf-sim__segment {
	position: relative;
	margin: 0;
	cursor: pointer;
}

.vf-sim__segment > input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.vf-sim__segment > span {
	display: block;
	padding: 8px 16px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	letter-spacing: -0.01em;
	color: var(--vf-text-soft);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.vf-sim__segment:hover > span {
	color: var(--vf-text);
}

.vf-sim__segment > input:checked + span {
	background: var(--vf-text);
	color: #fff;
}

.vf-sim__segment > input:focus-visible + span {
	outline: 2px solid var(--vf-accent);
	outline-offset: 2px;
}
