/* ==========================================================
   TF Simulateurs, structure minimale
   ----------------------------------------------------------
   - Préfixe : tf-sim__
   - Aucune couleur, aucun rayon, aucun espacement écrit : tout vient des
     jetons --tf-* du site (composants.md § 2). Pas de valeur de repli.
   - L'habillage fin est posé par site.css (demande DC-05), chargé après
     cette feuille ; ici seulement ce qui fait fonctionner le simulateur :
     onglets, panneaux, curseurs, jauges, écrans d'étapes, barre mobile.
   - Les boutons de sortie portent les classes tf-btn du site (snippet 02) ;
     cette feuille ne les colore pas.
   - Aucune information n'est portée par la couleur seule : chaque zone de
     jauge a son libellé, chaque erreur son texte et son pictogramme.
   ========================================================== */

.tf-sim {
	position: relative;
	color: var(--tf-marine);
}

.tf-sim *,
.tf-sim *::before,
.tf-sim *::after {
	box-sizing: border-box;
}

/* L'attribut hidden l'emporte sur tout style du site. */
.tf-sim [hidden] {
	display: none !important;
}

/* Texte réservé aux lecteurs d'écran. */
.tf-sim__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.tf-sim__noscript,
.tf-sim__indisponible {
	padding: var(--tf-e-4);
	border: 1px solid var(--tf-bordure);
	border-radius: var(--tf-r-sm);
	background: var(--tf-fond);
	font-size: var(--tf-tt-md);
}

/* ----------------------------------------------------------
   Onglets (hub complet)
   1.0.2 (D364) : plus de bande qui défile. Les six onglets sont
   visibles d'un coup : 2 colonnes sous 768 px (3 rangées), 3 colonnes
   au-dessus (2 rangées), une seule rangée quand la place le permet
   (requête de conteneur, 1 140 px). Libellés entiers, sur deux lignes
   au besoin ; onglet actif fond marine, texte blanc. Sélecteurs portés
   par .tf-sim pour l'emporter sur l'habillage de site.css.
   ---------------------------------------------------------- */
.tf-sim .tf-sim__tabs-wrap {
	margin-bottom: var(--tf-e-5);
	container-type: inline-size;
}

.tf-sim .tf-sim__tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--tf-e-2);
	padding: var(--tf-e-2);
	border-radius: var(--tf-r-lg);
	background: var(--tf-fond);
}

@media (min-width: 768px) {
	.tf-sim .tf-sim__tabs {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@container (min-width: 1140px) {
	.tf-sim .tf-sim__tabs {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}

.tf-sim .tf-sim__tab {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--tf-e-2);
	min-width: 0;
	min-height: 48px;
	padding: var(--tf-e-2) var(--tf-e-3);
	border: 1px solid var(--tf-marine-08);
	border-radius: var(--tf-r-md);
	background: var(--tf-blanc);
	color: var(--tf-marine);
	font: inherit;
	font-size: var(--tf-tt-md);
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	white-space: normal;
	overflow-wrap: break-word;
	hyphens: manual;
	cursor: pointer;
	transition: background-color var(--tf-t) var(--tf-ease), color var(--tf-t) var(--tf-ease), border-color var(--tf-t) var(--tf-ease);
}

@media (hover: hover) and (pointer: fine) {
	.tf-sim .tf-sim__tab:hover {
		border-color: var(--tf-marine);
	}
}

.tf-sim .tf-sim__tab[aria-selected="true"] {
	border-color: var(--tf-marine);
	background: var(--tf-marine);
	color: var(--tf-blanc);
	font-weight: 700;
	box-shadow: var(--tf-ombre-2);
}

.tf-sim .tf-sim__tab[aria-selected="true"]::after {
	content: none;
}

.tf-sim .tf-sim__tab:focus-visible {
	outline: 2px solid var(--tf-marine);
	outline-offset: 2px;
}

.tf-sim .tf-sim__tab-icone {
	width: 28px;
	height: 28px;
	flex: none;
	object-fit: contain;
}

/* ----------------------------------------------------------
   Panneaux et coques
   ---------------------------------------------------------- */
.tf-sim__module-title {
	margin: 0 0 var(--tf-e-4);
}

.tf-sim__module-title:focus {
	outline: none;
}

.tf-sim__module-sous-titre {
	margin: 0 0 var(--tf-e-5);
	color: var(--tf-texte-doux);
	font-size: var(--tf-tt-lg);
}

.tf-sim__panneau {
	padding: var(--tf-e-5);
	border: 1px solid var(--tf-bordure);
	border-radius: var(--tf-r-md);
	background: var(--tf-blanc);
}

/* Coque instantanée : saisie et résultat côte à côte dès 900 px. */
.tf-sim__instant {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--tf-e-5);
	align-items: start;
}

/* 1.0.2 (D363) : aucun enfant de grille ou de flex ne prend la largeur de
   son contenu. Sans min-width: 0, une rangée de durées ou un bouton long
   élargissait la colonne et la carte sortait de 7 à 40 px à 390 px. */
.tf-sim .tf-sim__instant > *,
.tf-sim .tf-sim__panel,
.tf-sim .tf-sim__panneau,
.tf-sim .tf-sim__champ,
.tf-sim .tf-sim__saisie,
.tf-sim .tf-sim__ctas > *,
.tf-sim .tf-sim__cote-a-cote > * {
	min-width: 0;
}

.tf-sim :is(p, li, label, legend, .tf-sim__label, .tf-sim__mention, .tf-sim__aide, .tf-sim__carte-label, .tf-sim__carte-valeur, .tf-sim__chiffre) {
	overflow-wrap: break-word;
}

.tf-sim .tf-sim__ctas {
	flex-wrap: wrap;
}

.tf-sim a.tf-sim__cta,
.tf-sim button.tf-sim__cta {
	max-width: 100%;
	white-space: normal;
	text-align: center;
}

@media (min-width: 900px) {
	.tf-sim__instant {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	}

	.tf-sim__resultat--colle {
		position: sticky;
		top: var(--tf-e-6);
	}
}

.tf-sim__resultat {
	background: var(--tf-fond);
}

.tf-sim__resultat-h {
	margin: 0 0 var(--tf-e-4);
	font-size: var(--tf-tt-xl);
}

.tf-sim__resultat-h:focus {
	outline: none;
}

.tf-sim__resultat-titre {
	margin: 0 0 var(--tf-e-1);
	font-size: var(--tf-tt-xs);
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--tf-texte-doux);
}

/* Écrans à étapes : un seul visible (attribut hidden posé par le script). */
.tf-sim__ecran {
	margin-bottom: var(--tf-e-5);
}

.tf-sim__etape fieldset {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.tf-sim__etape legend {
	margin-bottom: var(--tf-e-4);
	padding: 0;
	font-size: var(--tf-tt-xl);
	font-weight: 600;
}

.tf-sim__etape legend:focus {
	outline: none;
}

.tf-sim__nav-etapes,
.tf-sim__ctas {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tf-e-3);
	margin-top: var(--tf-e-5);
}

.tf-sim__ctas .tf-sim__cta {
	flex: 1 1 220px;
}

/* Progression des étapes */
.tf-sim__progression {
	display: flex;
	flex-direction: column;
	gap: var(--tf-e-2);
	margin-bottom: var(--tf-e-5);
}

.tf-sim__progression-texte {
	font-size: var(--tf-tt-micro);
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--tf-texte-doux);
}

.tf-sim__progression-piste {
	display: block;
	height: 6px;
	border-radius: var(--tf-r-rond);
	background: var(--tf-marine-08);
	overflow: hidden;
}

.tf-sim__progression-barre {
	display: block;
	height: 100%;
	width: 0;
	border-radius: inherit;
	background: var(--tf-marine);
	transition: width var(--tf-t-l) var(--tf-ease);
}

/* ----------------------------------------------------------
   Champs
   ---------------------------------------------------------- */
.tf-sim__champ {
	margin-bottom: var(--tf-e-5);
}

.tf-sim__champ:last-child {
	margin-bottom: 0;
}

.tf-sim__champ > label,
.tf-sim__label {
	display: block;
	margin-bottom: var(--tf-e-2);
	font-size: var(--tf-tt-md);
	font-weight: 600;
}

.tf-sim__saisie {
	position: relative;
	display: flex;
	align-items: center;
}

.tf-sim__champ input[type="text"],
.tf-sim__champ input[type="number"],
.tf-sim__champ select {
	width: 100%;
	min-height: 48px;
	padding: var(--tf-e-3) var(--tf-e-4);
	border: 1px solid var(--tf-filet-commande);
	border-radius: var(--tf-r-sm);
	background: var(--tf-blanc);
	color: var(--tf-marine);
	font: inherit;
	font-size: var(--tf-tt-lg);
	line-height: 1.3;
}

.tf-sim__saisie input[type="text"] {
	padding-right: calc(var(--tf-e-4) + 1.5em);
	font-variant-numeric: tabular-nums;
}

.tf-sim__champ input:focus-visible,
.tf-sim__champ select:focus-visible {
	outline: 2px solid var(--tf-marine);
	outline-offset: 2px;
}

.tf-sim__champ input[aria-invalid="true"] {
	border-color: var(--tf-action);
	border-width: 2px;
}

.tf-sim__addon {
	position: absolute;
	right: var(--tf-e-4);
	color: var(--tf-texte-doux);
	font-size: var(--tf-tt-md);
	pointer-events: none;
}

.tf-sim__aide {
	margin: var(--tf-e-2) 0 0;
	color: var(--tf-texte-doux);
	font-size: var(--tf-tt-sm);
}

.tf-sim__erreur {
	display: flex;
	align-items: flex-start;
	gap: var(--tf-e-2);
	margin: var(--tf-e-2) 0 0;
	color: var(--tf-action);
	font-size: var(--tf-tt-sm);
	font-weight: 600;
}

.tf-sim__erreur-picto {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.25em;
	height: 1.25em;
	flex: none;
	border-radius: var(--tf-r-rond);
	background: var(--tf-action);
	color: var(--tf-blanc);
	font-size: var(--tf-tt-micro);
	line-height: 1;
}

/* Curseur couplé : la piste remplie suit --tf-range-pct posé par le script. */
.tf-sim__champ input[type="range"] {
	--tf-range-pct: 0%;
	width: 100%;
	height: 28px;
	margin: var(--tf-e-3) 0 0;
	padding: 0;
	background: transparent;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.tf-sim__champ input[type="range"]:focus-visible {
	outline: 2px solid var(--tf-marine);
	outline-offset: 4px;
	border-radius: var(--tf-r-rond);
}

.tf-sim__champ input[type="range"]::-webkit-slider-runnable-track {
	height: 6px;
	border-radius: var(--tf-r-rond);
	background: linear-gradient(to right, var(--tf-marine) var(--tf-range-pct), var(--tf-marine-08) var(--tf-range-pct));
}

.tf-sim__champ input[type="range"]::-moz-range-track {
	height: 6px;
	border-radius: var(--tf-r-rond);
	background: var(--tf-marine-08);
}

.tf-sim__champ input[type="range"]::-moz-range-progress {
	height: 6px;
	border-radius: var(--tf-r-rond);
	background: var(--tf-marine);
}

.tf-sim__champ input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 24px;
	height: 24px;
	margin-top: -9px;
	border: 2px solid var(--tf-blanc);
	border-radius: var(--tf-r-rond);
	background: var(--tf-marine);
	box-shadow: var(--tf-ombre-1);
}

.tf-sim__champ input[type="range"]::-moz-range-thumb {
	width: 24px;
	height: 24px;
	border: 2px solid var(--tf-blanc);
	border-radius: var(--tf-r-rond);
	background: var(--tf-marine);
	box-shadow: var(--tf-ombre-1);
}

/* Contrôle segmenté (durées) */
.tf-sim__seg {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(72px, 100%), 1fr));
	gap: var(--tf-e-2);
}

/* 1.0.3 (D373) · Jamais un bouton seul sur une rangée. Le champ devient
   conteneur de requête ; la grille choisit ses colonnes selon le nombre
   de boutons et la largeur disponible (72 px par bouton, écart de 8 px).
   2 : deux colonnes. 3 : trois, sinon une. 4 : quatre égales si elles
   tiennent (312 px), sinon 2 × 2. 5 : cinq (392 px), sinon 3 + 2.
   6 : six (472 px), sinon 3 × 2. */
.tf-sim__champ:has(> .tf-sim__seg) { container-type: inline-size; }
.tf-sim__seg:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tf-sim__seg:has(> :nth-child(3):last-child) { grid-template-columns: minmax(0, 1fr); }
.tf-sim__seg:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tf-sim__seg:has(> :nth-child(5):last-child),
.tf-sim__seg:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@container (min-width: 232px) {
	.tf-sim__seg:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (min-width: 312px) {
	.tf-sim__seg:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@container (min-width: 392px) {
	.tf-sim__seg:has(> :nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@container (min-width: 472px) {
	.tf-sim__seg:has(> :nth-child(6):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.tf-sim__seg-txt, .tf-sim__seg-sous { white-space: nowrap; }

.tf-sim__seg-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: var(--tf-e-2) var(--tf-e-3);
	border: 1px solid var(--tf-filet-commande);
	border-radius: var(--tf-r-sm);
	background: var(--tf-blanc);
	color: var(--tf-marine);
	font: inherit;
	font-size: var(--tf-tt-md);
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color var(--tf-t) var(--tf-ease), border-color var(--tf-t) var(--tf-ease), color var(--tf-t) var(--tf-ease);
}

.tf-sim__seg-btn:hover {
	border-color: var(--tf-marine);
}

.tf-sim__seg-btn[aria-pressed="true"] {
	border-color: var(--tf-marine);
	background: var(--tf-marine);
	color: var(--tf-blanc);
}

.tf-sim__seg-btn:focus-visible {
	outline: 2px solid var(--tf-marine);
	outline-offset: 2px;
}

.tf-sim__seg-sous {
	font-size: var(--tf-tt-micro);
	font-weight: 400;
	opacity: .8;
}

/* Cartes-radio */
.tf-sim__cartes-radio {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: var(--tf-e-3);
}

.tf-sim__carte-radio {
	display: flex;
	flex-direction: column;
	gap: var(--tf-e-1);
	min-height: 48px;
	padding: var(--tf-e-3) var(--tf-e-4);
	border: 1px solid var(--tf-filet-commande);
	border-radius: var(--tf-r-sm);
	background: var(--tf-blanc);
	cursor: pointer;
	transition: border-color var(--tf-t) var(--tf-ease), background-color var(--tf-t) var(--tf-ease);
}

.tf-sim__carte-radio:hover {
	border-color: var(--tf-marine);
}

.tf-sim__carte-radio[aria-checked="true"] {
	border-color: var(--tf-marine);
	border-width: 2px;
	background: var(--tf-marine-04);
}

.tf-sim__carte-radio:focus-visible {
	outline: 2px solid var(--tf-marine);
	outline-offset: 2px;
}

.tf-sim__carte-radio-titre {
	font-size: var(--tf-tt-md);
	font-weight: 600;
}

.tf-sim__carte-radio-desc {
	color: var(--tf-texte-doux);
	font-size: var(--tf-tt-sm);
}

/* Case de confirmation : la cible est le libellé entier, 44 px au moins (1.0.1). */
.tf-sim__confirme {
	display: flex;
	align-items: center;
	gap: var(--tf-e-3);
	margin: var(--tf-e-4) 0;
	font-size: var(--tf-tt-md);
}

.tf-sim__confirme input {
	flex: none;
	width: 24px;
	height: 24px;
	margin: 0;
	accent-color: var(--tf-marine);
}

.tf-sim__confirme label {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding-block: var(--tf-e-2);
	cursor: pointer;
}

/* Liste dynamique de crédits */
.tf-sim__credit-ligne {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
	gap: var(--tf-e-3);
	align-items: end;
	padding: var(--tf-e-3) 0;
	border-top: 1px solid var(--tf-bordure);
}

.tf-sim__credit-ligne .tf-sim__champ {
	margin-bottom: 0;
}

.tf-sim__credit-suppr {
	min-height: 44px;
	padding: 0 var(--tf-e-3);
	border: 1px solid var(--tf-filet-commande);
	border-radius: var(--tf-r-sm);
	background: transparent;
	color: var(--tf-marine);
	font: inherit;
	font-size: var(--tf-tt-sm);
	cursor: pointer;
}

.tf-sim__credit-suppr:hover {
	border-color: var(--tf-action);
	color: var(--tf-action);
}

@media (max-width: 599px) {
	.tf-sim__credit-ligne {
		grid-template-columns: 1fr;
	}
}

/* ----------------------------------------------------------
   Résultats
   ---------------------------------------------------------- */
.tf-sim__chiffre-bloc {
	margin-bottom: var(--tf-e-5);
}

.tf-sim__chiffre {
	margin: 0;
	font-size: clamp(28px, 5vw, 40px);
	font-weight: 700;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.tf-sim__chiffre-note {
	margin: var(--tf-e-1) 0 0;
	color: var(--tf-texte-doux);
	font-size: var(--tf-tt-sm);
}

.tf-sim__cartes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: var(--tf-e-3);
	margin: var(--tf-e-4) 0;
}

.tf-sim__carte {
	display: flex;
	flex-direction: column;
	gap: var(--tf-e-1);
	padding: var(--tf-e-3) var(--tf-e-4);
	border: 1px solid var(--tf-bordure);
	border-radius: var(--tf-r-sm);
	background: var(--tf-blanc);
}

.tf-sim__carte-label {
	color: var(--tf-texte-doux);
	font-size: var(--tf-tt-xs);
}

.tf-sim__carte-valeur {
	font-size: var(--tf-tt-xl);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

/* Regroupement : situation actuelle et estimation côte à côte, sans « baisse ». */
.tf-sim__cote-a-cote {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: var(--tf-e-4);
	margin: var(--tf-e-4) 0;
}

.tf-sim__cote-a-cote > * {
	padding: var(--tf-e-4);
	border: 1px solid var(--tf-bordure);
	border-radius: var(--tf-r-sm);
	background: var(--tf-blanc);
}

.tf-sim__badge {
	display: inline-block;
	margin: 0 0 var(--tf-e-4);
	padding: var(--tf-e-1) var(--tf-e-3);
	border-radius: var(--tf-r-rond);
	background: var(--tf-marine-08);
	font-size: var(--tf-tt-micro);
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.tf-sim__synthese {
	margin: var(--tf-e-4) 0;
	font-size: var(--tf-tt-md);
}

.tf-sim__date-bareme,
.tf-sim__mention {
	margin: var(--tf-e-3) 0 0;
	color: var(--tf-texte-doux);
	font-size: var(--tf-tt-xs);
}

.tf-sim__avertissement,
.tf-sim__reprise {
	margin: var(--tf-e-4) 0;
	padding: var(--tf-e-3) var(--tf-e-4);
	border-left: 3px solid var(--tf-marine);
	border-radius: var(--tf-r-xs);
	background: var(--tf-marine-04);
	font-size: var(--tf-tt-sm);
}

.tf-sim__analyse {
	margin-top: var(--tf-e-5);
	padding-top: var(--tf-e-4);
	border-top: 1px solid var(--tf-bordure);
}

.tf-sim__analyse-titre {
	margin: 0 0 var(--tf-e-2);
	font-size: var(--tf-tt-lg);
	font-weight: 600;
}

/* Jauge d'endettement : la zone est écrite en libellé, jamais par la couleur seule. */
.tf-sim__jauge {
	margin: var(--tf-e-3) 0 var(--tf-e-2);
}

.tf-sim__jauge-piste {
	height: 10px;
	border-radius: var(--tf-r-rond);
	background: var(--tf-marine-08);
	overflow: hidden;
}

.tf-sim__jauge-barre {
	height: 100%;
	width: 0;
	border-radius: inherit;
	background: var(--tf-marine);
	transition: width var(--tf-t-l) var(--tf-ease), background-color var(--tf-t) var(--tf-ease);
}

.tf-sim__jauge[data-zone="warn"] .tf-sim__jauge-barre {
	background: var(--tf-marque);
}

.tf-sim__jauge[data-zone="alert"] .tf-sim__jauge-barre {
	background: var(--tf-action);
}

.tf-sim__jauge-libelle {
	margin: 0 0 var(--tf-e-4);
	font-size: var(--tf-tt-sm);
	font-weight: 600;
}

/* Ratio hypothécaire : trois segments légendés. */
.tf-sim__ratio {
	margin: var(--tf-e-4) 0;
}

.tf-sim__ratio-piste {
	position: relative;
	display: flex;
	height: 14px;
	border-radius: var(--tf-r-rond);
	background: var(--tf-marine-08);
	overflow: hidden;
}

.tf-sim__ratio-piste > span {
	display: block;
	height: 100%;
	transition: width var(--tf-t-l) var(--tf-ease);
}

.tf-sim__ratio-crd {
	background: var(--tf-marine);
}

.tf-sim__ratio-dispo {
	background: var(--tf-action);
}

.tf-sim__ratio-reste {
	background: var(--tf-marine-16);
}

.tf-sim__ratio-repere {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--tf-blanc);
}

.tf-sim__ratio-legende {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tf-e-2) var(--tf-e-4);
	margin: var(--tf-e-3) 0 0;
	padding: 0;
	list-style: none;
	font-size: var(--tf-tt-sm);
}

.tf-sim__ratio-puce {
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-right: var(--tf-e-2);
	border-radius: var(--tf-r-xs);
	vertical-align: middle;
}

/* Résultat animé (compte-à-rebours) : rien si mouvement réduit. */
.tf-sim__resultat.est-anime .tf-sim__chiffre {
	transition: opacity var(--tf-t) var(--tf-ease);
}

/* ----------------------------------------------------------
   Barre mobile : miroir du chiffre clé, sous 900 px seulement.
   1.0.2 (D365) : deux zones, 64 px de haut au plus. À gauche, une
   carte bouton (contour clair, chevron vers le bas) : « Mensualité
   estimée » sur une ligne, le montant en gras sur une ligne ; elle
   mène au détail. À droite, « Mon étude » en pastille rouge, vers le
   formulaire du module. La page réserve en bas la hauteur de la barre.
   ---------------------------------------------------------- */
.tf-sim .tf-sim__barre-mobile {
	position: sticky;
	bottom: var(--tf-e-2);
	z-index: 5;
	display: flex;
	align-items: center;
	gap: var(--tf-e-2);
	max-height: 64px;
	margin-top: var(--tf-e-4);
	padding: 6px;
	border-radius: var(--tf-r-lg);
	background: var(--tf-marine);
	color: var(--tf-blanc);
	box-shadow: var(--tf-ombre-5);
}

.tf-sim .tf-sim__barre-detail {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: space-between;
	gap: var(--tf-e-2);
	min-width: 0;
	min-height: 52px;
	padding: 4px var(--tf-e-3);
	border: 1px solid var(--tf-sur-sombre-60);
	border-radius: var(--tf-r-md);
	background: transparent;
	color: var(--tf-blanc);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.tf-sim .tf-sim__barre-texte {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.2;
}

.tf-sim .tf-sim__barre-label {
	overflow: hidden;
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: var(--tf-sur-sombre-80);
}

.tf-sim .tf-sim__barre-valeur {
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.tf-sim .tf-sim__barre-chevron {
	flex: none;
	width: 10px;
	height: 10px;
	margin-top: -5px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	rotate: 45deg;
}

.tf-sim .tf-sim__barre-detail:focus-visible,
.tf-sim a.tf-sim__barre-etude:focus-visible {
	outline: 2px solid var(--tf-blanc);
	outline-offset: 2px;
}

.tf-sim a.tf-sim__barre-etude {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 var(--tf-e-4);
	border-radius: var(--tf-r-rond);
	background: var(--tf-action);
	color: var(--tf-blanc);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	text-decoration: none;
}

@media (max-width: 899px) {
	html:has(.tf-sim__barre-mobile:not([hidden])) {
		scroll-padding-bottom: 80px;
	}

}

@media (min-width: 900px) {
	.tf-sim__barre-mobile {
		display: none !important;
	}
}

/* ----------------------------------------------------------
   Mentions et mouvement réduit
   ---------------------------------------------------------- */
.tf-sim__mentions {
	margin-top: var(--tf-e-5);
}

.tf-sim__mentions--socle {
	padding-top: var(--tf-e-4);
	border-top: 1px solid var(--tf-bordure);
}

@media (prefers-reduced-motion: reduce) {
	.tf-sim *,
	.tf-sim *::before,
	.tf-sim *::after {
		transition-duration: 0s !important;
		animation: none !important;
	}
}
