/* ==========================================================================
   LendForge — Dossier financier (front public)
   ========================================================================== */

.lf-fin {
	--c-primary:     var(--lf-color-primary, #1F6F5C);
	--c-on-primary:  var(--lf-color-on-primary, #FFFFFF);
	--c-accent:      var(--lf-color-accent, #E0653A);
	--c-bg:          var(--lf-color-bg, #F6F5F1);
	--c-surface:     var(--lf-color-surface, #FFFFFF);
	--c-surface-alt: var(--lf-color-surface-alt, #EEEDE7);
	--c-text:        var(--lf-color-text, #1A1A17);
	--c-muted:       var(--lf-color-text-muted, #6E6B62);
	--c-border:      var(--lf-color-border, #E2E0D8);
	--c-success:     var(--lf-color-success, #1F7A4D);
	--c-warning:     var(--lf-color-warning, #B7791F);
	--c-error:       var(--lf-color-error, #C0392B);
	--r-sm:          var(--lf-radius-sm, 8px);
	--r-md:          var(--lf-radius-md, 14px);
	--r-lg:          var(--lf-radius-lg, 22px);
	--r-pill:        var(--lf-radius-pill, 999px);
	--sh-md:         var(--lf-shadow-md, 0 8px 28px -10px rgba(26,26,23,0.16));
	--f-head:        var(--lf-font-heading, "Fraunces", Georgia, serif);
	--f-body:        var(--lf-font-body, "Hanken Grotesk", system-ui, sans-serif);

	font-family: var(--f-body);
	color: var(--c-text);
	max-width: 940px;
	margin: 0 auto;
	padding: 30px 16px;
}
.lf-fin * { box-sizing: border-box; }

.lf-fin__head { margin-bottom: 22px; }
.lf-fin__eyebrow {
	font-size: 12px; font-weight: 600; letter-spacing: 0.16em;
	text-transform: uppercase; color: var(--c-primary); margin: 0 0 7px;
}
.lf-fin__title {
	font-family: var(--f-head); font-weight: 600; font-size: 30px;
	line-height: 1.1; margin: 0;
}
.lf-fin__sub { margin: 8px 0 0; font-size: 14px; color: var(--c-muted); line-height: 1.55; }

.lf-fin__notice {
	border-radius: var(--r-md); padding: 13px 16px; margin-bottom: 18px;
	font-size: 13.5px; font-weight: 500;
}
.lf-fin__notice--ok {
	background: color-mix(in srgb, var(--c-success) 12%, transparent);
	border: 1px solid color-mix(in srgb, var(--c-success) 30%, transparent);
	color: var(--c-success);
}
.lf-fin__notice--error {
	background: color-mix(in srgb, var(--c-error) 10%, transparent);
	border: 1px solid color-mix(in srgb, var(--c-error) 32%, transparent);
	color: var(--c-error);
}

.lf-fin__layout {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 20px;
	align-items: start;
}

/* formulaire */
.lf-fin__form {
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--r-lg);
	box-shadow: var(--sh-md);
	padding: 26px;
}

.lf-fin-sec { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--c-surface-alt); }
.lf-fin-sec:last-of-type { border-bottom: none; }
.lf-fin-sec__title {
	font-family: var(--f-head); font-weight: 600; font-size: 16px;
	margin: 0 0 14px;
}

.lf-fin-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.lf-fin .lf-field { display: flex; flex-direction: column; gap: 6px; }
.lf-fin .lf-field--full { grid-column: 1 / -1; }
.lf-fin .lf-field span {
	font-size: 12.5px; font-weight: 600; color: var(--c-text);
}
.lf-fin .lf-field input,
.lf-fin .lf-field select,
.lf-fin .lf-field textarea {
	font-family: var(--f-body); font-size: 14px; color: var(--c-text);
	background: var(--c-bg); border: 1px solid var(--c-border);
	border-radius: var(--r-sm); padding: 10px 12px; width: 100%;
}
.lf-fin .lf-field input:focus,
.lf-fin .lf-field select:focus,
.lf-fin .lf-field textarea:focus {
	outline: none; border-color: var(--c-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 16%, transparent);
}

.lf-fin__actions {
	display: flex; justify-content: flex-end; gap: 10px;
	margin-top: 8px;
}
.lf-btn-ghost2 {
	font-family: var(--f-body); font-size: 14px; font-weight: 600;
	padding: 12px 18px; border-radius: var(--r-pill);
	background: transparent; border: 1px solid var(--c-border);
	color: var(--c-text); cursor: pointer;
}
.lf-btn-ghost2:hover { border-color: var(--c-primary); color: var(--c-primary); }

/* synthèse vivante */
.lf-fin__summary {
	position: sticky; top: 20px;
	background: var(--c-text);
	color: #fff;
	border-radius: var(--r-lg);
	padding: 22px;
}
.lf-fin__summary-title {
	font-family: var(--f-head); font-weight: 600; font-size: 16px;
	margin: 0 0 16px; color: #fff;
}

.lf-fin__gauge { margin-bottom: 18px; }
.lf-fin__gauge-label {
	font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.7;
}
.lf-fin__gauge-value {
	display: block; margin: 5px 0 8px;
	font-family: var(--f-head); font-weight: 600; font-size: 30px; line-height: 1;
}
.lf-fin__gauge-bar {
	height: 7px; border-radius: 999px;
	background: rgba(255,255,255,0.14); overflow: hidden;
}
.lf-fin__gauge-bar span {
	display: block; height: 100%;
	background: var(--c-accent);
	transition: width 0.25s ease;
}

.lf-fin__rows {
	display: flex; flex-direction: column; gap: 9px;
	padding: 16px 0; margin: 4px 0;
	border-top: 1px solid rgba(255,255,255,0.12);
	border-bottom: 1px solid rgba(255,255,255,0.12);
}
.lf-fin__row {
	display: flex; justify-content: space-between; font-size: 13px;
}
.lf-fin__row span { opacity: 0.72; }
.lf-fin__row--accent strong { color: var(--c-accent); }

.lf-fin__verdict {
	margin-top: 14px;
	text-align: center;
	font-size: 13px; font-weight: 700;
	padding: 9px; border-radius: var(--r-pill);
	background: rgba(255,255,255,0.1);
}
.lf-fin__summary[data-indicator="comfortable"] .lf-fin__verdict { background: rgba(111,215,154,0.2); color: #6FD79A; }
.lf-fin__summary[data-indicator="moderate"] .lf-fin__verdict   { background: rgba(240,193,78,0.2); color: #F0C14E; }
.lf-fin__summary[data-indicator="high"] .lf-fin__verdict       { background: rgba(240,160,160,0.2); color: #F0A0A0; }

.lf-fin__hint {
	margin: 12px 0 0; font-size: 11px; opacity: 0.6; line-height: 1.5; text-align: center;
}

@media (max-width: 760px) {
	.lf-fin__layout { grid-template-columns: 1fr; }
	.lf-fin-grid { grid-template-columns: 1fr; }
	.lf-fin__summary { position: static; }
}
