/**
 * LendForge — espace bancaire (front).
 *
 * Interface de type application : tableau de bord, détail du prêt,
 * profil et barre de navigation. Reproduit la maquette fournie.
 */

.lf-bankapp {
	/* Palette — suit la personnalisation du module Design ; repli sur les valeurs par défaut. */
	--lfb-bg: var(--lf-color-surface, #ffffff);
	--lfb-bg-soft: var(--lf-color-surface-alt, #f3f3f0);
	--lfb-bg-info: #e9f1fb;
	--lfb-bg-warn: #fcf3e2;
	--lfb-bg-success: #e7f4ec;
	--lfb-ink: var(--lf-color-text, #1a1916);
	--lfb-mut: var(--lf-color-text-muted, #6e6b62);
	--lfb-faint: #a2a096;
	--lfb-info: var(--lf-color-accent, #1f6fb2);
	--lfb-warn: var(--lf-color-warning, #b07a1a);
	--lfb-success: var(--lf-color-success, #1f7a4d);
	--lfb-danger: var(--lf-color-error, #c0392b);
	--lfb-line: var(--lf-color-border, #e7e5de);
	--lfb-line-soft: #efeee9;
	--lfb-line-warn: #e8d4a8;
	--lfb-green: var(--lf-color-primary, #0f6e56);
	--lfb-green-soft: var(--lf-color-on-primary, #9fe1cb);
	--lfb-card: var(--lf-color-secondary, #0c447c);
	--lfb-card-soft: var(--lf-color-on-primary, #b5d4f4);
	--lfb-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	/* Rayons : reliés aux tokens du module Design avec repli sur les valeurs initiales. */
	--lfb-r-sm: var(--lf-radius-sm, 6px);
	--lfb-r-md: var(--lf-radius-md, 8px);
	--lfb-r-lg: var(--lf-radius-lg, 14px);
	--lfb-r-xl: 18px;
	--lfb-r-pill: var(--lf-radius-pill, 999px);

	display: flex;
	justify-content: center;
	font-family: var(--lf-font-body, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
}

.lf-bankphone {
	width: 100%;
	max-width: 400px;
	background: var(--lfb-bg);
	border: 1px solid var(--lfb-line);
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 14px 44px rgba(20, 18, 14, 0.07);
	color: var(--lfb-ink);
	font-family: inherit;
}

/* Version desktop : élargit le conteneur sur grand écran sans toucher au layout interne. */
@media (min-width: 900px) {
	.lf-bankphone {
		max-width: 760px;
		border-radius: 28px;
	}
}

.lf-bankapp * {
	box-sizing: border-box;
}

.lf-view {
	display: none;
	padding: 18px 16px 78px;
}
.lf-view.is-active {
	display: block;
}

.lf-row-between {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.lf-mut {
	color: var(--lfb-mut);
}

/* En-tête */
.lf-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--lfb-bg-info);
	color: var(--lfb-info);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 14px;
	flex-shrink: 0;
}
.lf-avatar--lg {
	width: 66px;
	height: 66px;
	font-size: 21px;
}

.lf-iconbtn {
	background: none;
	border: 1px solid var(--lfb-line);
	border-radius: 50%;
	width: 34px;
	height: 34px;
	cursor: pointer;
	color: var(--lfb-mut);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 17px;
	flex-shrink: 0;
}
.lf-iconbtn:hover {
	background: var(--lfb-bg-soft);
}

/* Carte solde / montant (verte) */
.lf-greencard {
	background: var(--lfb-green);
	border-radius: var(--lfb-r-lg);
	padding: 18px;
	color: #fff;
}
.lf-balance {
	margin: 6px 0 0;
	font-size: 27px;
	font-weight: 600;
}
.lf-greencard__foot {
	margin-top: 12px;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	padding-top: 10px;
}
.lf-greencard__tag {
	font-size: 11px;
	color: #04342c;
	background: var(--lfb-green-soft);
	padding: 3px 9px;
	border-radius: var(--lfb-r-md);
	white-space: nowrap;
}
.lf-eye {
	background: none;
	border: none;
	color: var(--lfb-green-soft);
	cursor: pointer;
	font-size: 16px;
	padding: 0;
}

/* Indicateurs */
.lf-metrics {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}
.lfb-met {
	background: var(--lfb-bg-soft);
	border-radius: var(--lfb-r-md);
	padding: 10px 12px;
}

/* Actions rapides */
.lf-actions {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}
.lfb-act {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	background: var(--lfb-bg-soft);
	border: none;
	padding: 12px 4px;
	cursor: pointer;
	border-radius: var(--lfb-r-md);
}
.lfb-act:hover {
	background: var(--lfb-bg-info);
}
.lfb-act-ic {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--lfb-bg);
	color: var(--lfb-info);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 19px;
}
.lfb-act-ic--tx {
	width: 34px;
	height: 34px;
	font-size: 16px;
	background: var(--lfb-bg-soft);
	color: var(--lfb-mut);
	flex-shrink: 0;
}
.lfb-act-ic--tx.is-credit {
	background: var(--lfb-bg-success);
	color: var(--lfb-success);
}
.lfb-act-lb {
	font-size: 11px;
	color: var(--lfb-ink);
	text-align: center;
	line-height: 1.3;
	font-weight: 500;
}
.lfb-act-go {
	background: var(--lfb-warn);
	color: #fff;
	border: none;
	border-radius: var(--lfb-r-md);
	padding: 8px 12px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	flex-shrink: 0;
}

/* Rappel d'échéance */
.lf-duebox {
	border: 1px solid var(--lfb-line-warn);
	background: var(--lfb-bg-warn);
	border-radius: var(--lfb-r-lg);
	padding: 14px;
	display: flex;
	align-items: center;
	gap: 12px;
}
.lf-duebox--plain {
	border: none;
	justify-content: space-between;
}

/* Carte virtuelle */
.lf-vcard {
	position: relative;
	margin-bottom: 28px;
	cursor: pointer;
	perspective: 1100px;
	-webkit-perspective: 1100px;
}
.lf-vcard__inner {
	position: relative;
	transition: transform 0.55s ease;
	transform-style: preserve-3d;
}
.lf-vcard.is-flipped .lf-vcard__inner { transform: rotateY(180deg); }
.lf-vcard__face {
	border-radius: var(--lfb-r-lg);
	padding: 16px;
	color: #fff;
	background: var(--lfb-card);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}
.lf-vcard__front { position: relative; }
.lf-vcard__back {
	position: absolute;
	inset: 0;
	transform: rotateY(180deg);
	display: flex;
	flex-direction: column;
}
.lf-vcard__stripe {
	height: 38px;
	background: #1c1b18;
	margin: 8px -16px 16px;
}
.lf-vcard__cvvbox {
	display: flex; align-items: center; justify-content: flex-end; gap: 10px;
	background: #fff; color: #1b1a16;
	border-radius: var(--lfb-r-sm); padding: 9px 12px;
}
.lf-vcard__cvvlabel { font-size: 10px; letter-spacing: 0.08em; color: #74706a; }
.lf-vcard__cvv { font-family: var(--lfb-mono); font-size: 16px; letter-spacing: 3px; font-weight: 600; }
.lf-vcard__backnote { margin: auto 0 0; font-size: 11px; color: var(--lfb-card-soft); }
.lf-vcard__flip {
	position: absolute; right: 14px; bottom: 11px;
	font-size: 10px; letter-spacing: 0.05em;
	color: var(--lfb-card-soft); display: flex; align-items: center; gap: 3px;
}
.lf-vcard__pan { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; }
.lf-vcard__pannum { font-family: var(--lfb-mono); font-size: 15px; letter-spacing: 1.5px; }
.lf-vcard__copy {
	border: none; background: rgba(255, 255, 255, 0.16); color: #fff;
	width: 26px; height: 26px; border-radius: var(--lfb-r-sm); cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	flex-shrink: 0; font-size: 14px; line-height: 1;
}
.lf-vcard__copy:hover { background: rgba(255, 255, 255, 0.28); }
.lf-vcard__copy.is-copied { background: #2ea66a; }
.lf-vcard--empty {
	background: var(--lfb-card);
	border-radius: var(--lfb-r-lg);
	padding: 16px;
	color: #fff;
	cursor: default;
}
.lf-vcard__chip {
	width: 34px;
	height: 24px;
	background: #fac775;
	border-radius: var(--lfb-r-sm);
	margin: 14px 0 12px;
}
.lf-vcard__dot {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	display: inline-block;
}
.lf-vcard__frozen {
	display: flex;
	position: absolute;
	inset: 0;
	background: rgba(12, 68, 124, 0.82);
	border-radius: var(--lfb-r-lg);
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 6px;
}

/* Chips carte */
.lf-chips {
	display: flex;
	gap: 8px;
}
.lf-chipform {
	flex: 1;
	display: flex;
	margin: 0;
}
.lfb-chip {
	flex: 1;
	width: 100%;
	background: var(--lfb-bg-soft);
	border: none;
	border-radius: var(--lfb-r-md);
	padding: 9px 4px;
	cursor: pointer;
	font-size: 11px;
	color: var(--lfb-ink);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	text-align: center;
	line-height: 1.3;
}
button.lfb-chip:hover {
	background: var(--lfb-bg-info);
}
.lfb-chip--static {
	cursor: default;
}

/* Lignes (transactions, échéancier) */
.lfb-txrow {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-top: 1px solid var(--lfb-line-soft);
}

/* Détail du prêt */
.lf-progressbox {
	border: 1px solid var(--lfb-line-soft);
	border-radius: var(--lfb-r-lg);
	padding: 14px;
}
.lf-progress {
	height: 8px;
	background: var(--lfb-bg-soft);
	border-radius: var(--lfb-r-pill);
	overflow: hidden;
}
.lf-progress__bar {
	height: 100%;
	background: var(--lfb-green);
}
.lfb-doc {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 0;
	border-top: 1px solid var(--lfb-line-soft);
	cursor: pointer;
	text-decoration: none;
	color: var(--lfb-ink);
}
.lf-emptyloan {
	text-align: center;
	padding: 34px 16px;
}

/* Boutons pleine largeur */
.lfb-cta {
	width: 100%;
	display: block;
	text-align: center;
	background: none;
	border: 1px solid var(--lfb-line);
	border-radius: var(--lfb-r-md);
	padding: 12px;
	cursor: pointer;
	font-size: 13px;
	color: var(--lfb-ink);
	text-decoration: none;
}
.lfb-cta:hover {
	background: var(--lfb-bg-soft);
}
.lfb-cta--logout {
	color: var(--lfb-danger);
	margin-top: 10px;
}

/* Profil */
.lf-verified {
	font-size: 12px;
	color: var(--lfb-success);
	background: var(--lfb-bg-success);
	padding: 3px 10px;
	border-radius: var(--lfb-r-md);
}

/* Bandeau de confiance */
.lf-trust {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 16px;
	font-size: 11px;
	color: var(--lfb-faint);
}

/* Barre de navigation : flotte en bas de la viewport, centrée comme la phone */
.lf-bnav {
	display: flex;
	border-top: 1px solid var(--lfb-line-soft);
	background: var(--lfb-bg);
	padding: 4px 8px 8px;
	position: fixed;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 100%;
	max-width: 400px;
	z-index: 50;
	box-shadow: 0 -4px 16px rgba(20, 18, 14, 0.08);
	box-sizing: border-box;
}
@media (min-width: 900px) {
	.lf-bnav { max-width: 760px; }
}
.lf-bnav__item {
	flex: 1;
	background: none;
	border: none;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	padding: 8px 0;
	font-size: 10px;
	color: var(--lfb-faint);
}
.lf-bnav__item i {
	font-size: 20px;
}
.lf-bnav__item.is-on {
	color: var(--lfb-info);
}

/* Formulaire de virement externe */
.lf-trform { display: flex; flex-direction: column; }
.lf-trlab {
	font-size: 12px; font-weight: 600; color: var(--lfb-mut);
	margin: 12px 0 4px;
}
.lf-trin {
	font-family: inherit; font-size: 14px; width: 100%;
	padding: 10px 12px; border: 1px solid var(--lfb-line);
	border-radius: var(--lfb-r-md); background: var(--lfb-bg); color: var(--lfb-ink);
}
.lf-trbtn {
	margin-top: 16px; width: 100%;
	background: var(--lfb-green); color: #fff; border: none;
	border-radius: var(--lfb-r-md); padding: 13px; cursor: pointer;
	font-size: 14px; font-weight: 600;
}
.lf-trbtn:hover { background: #0c5a46; }

/* Notifications de l'espace client */
.lf-bellform { margin: 0; }
.lf-bell { position: relative; }
.lf-bell__badge {
	position: absolute; top: -3px; right: -3px;
	min-width: 16px; height: 16px; padding: 0 4px;
	background: var(--lfb-danger); color: #fff;
	font-size: 10px; font-weight: 700; line-height: 16px;
	border-radius: var(--lfb-r-md); text-align: center;
}
.lf-nbanner-form { margin: 0 0 10px; }
.lf-nbanner {
	display: flex; align-items: center; gap: 10px; width: 100%;
	text-align: left; cursor: pointer; font-family: inherit;
	background: #fff8e9; border: 1px solid #f3d99a;
	border-radius: var(--lfb-r-lg); padding: 10px 12px;
}
.lf-nbanner__ic {
	flex-shrink: 0; width: 32px; height: 32px; border-radius: var(--lfb-r-md);
	background: #f6c560; color: #5a3d05;
	display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.lf-nbanner__body { flex: 1; min-width: 0; }
.lf-nbanner__title { display: block; font-size: 12.5px; font-weight: 700; color: #6b4e10; }
.lf-nbanner__msg {
	display: block; font-size: 11.5px; color: #8a7333;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lf-nbanner__chev { font-size: 16px; color: #b08a30; flex-shrink: 0; }
.lf-notiflist { display: flex; flex-direction: column; gap: 8px; }
.lf-notif {
	display: flex; gap: 10px;
	background: #fff; border: 1px solid var(--lfb-border, #e7e3da);
	border-radius: var(--lfb-r-lg); padding: 12px 13px;
}
.lf-notif.is-unread { background: #f0f6ff; border-color: #cfe0f7; }
.lf-notif__dot {
	flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%;
	margin-top: 5px; background: transparent;
}
.lf-notif.is-unread .lf-notif__dot { background: var(--lfb-info, #2f6fd0); }
.lf-notif__body { flex: 1; min-width: 0; }
.lf-notif__title { margin: 0; font-size: 13px; font-weight: 600; }
.lf-notif__msg { margin: 3px 0 0; font-size: 12.5px; color: var(--lfb-muted, #6a6760); line-height: 1.45; }
.lf-notif__date { margin: 6px 0 0; font-size: 11px; color: var(--lfb-muted, #6a6760); }
.lf-empty { text-align: center; padding: 40px 16px; }

/* Appel à signature du contrat */
.lf-ctract {
	display: flex; align-items: center; gap: 11px;
	margin-bottom: 16px; padding: 13px 14px;
	background: var(--lfb-bg-info); border: 1px solid #cfe0f7;
	border-radius: var(--lfb-r-lg); text-decoration: none;
}
.lf-ctract__ic {
	flex-shrink: 0; width: 38px; height: 38px; border-radius: var(--lfb-r-md);
	background: var(--lfb-info); color: #fff;
	display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.lf-ctract__body { flex: 1; min-width: 0; }
.lf-ctract__title { display: block; font-size: 13px; font-weight: 700; color: var(--lfb-ink); }
.lf-ctract__msg { display: block; font-size: 11.5px; color: var(--lfb-mut); margin-top: 2px; line-height: 1.4; }
.lf-ctract__go {
	flex-shrink: 0; display: flex; align-items: center; gap: 3px;
	font-size: 12px; font-weight: 700; color: var(--lfb-info); white-space: nowrap;
}
/* Séparateurs discrets entre les sections majeures du dashboard. */
.lf-view[data-view="dash"] #lf-tx-anchor,
.lf-view[data-view="dash"] #lf-card-anchor {
	margin-top: 22px;
	padding-top: 22px;
	border-top: 1px solid var(--lfb-line);
}
/* Liseré doré subtil au bas de la carte de solde (côté premium). */
.lf-greencard {
	box-shadow: 0 14px 44px rgba(20, 18, 14, 0.07), inset 0 -3px 0 var(--lf-color-accent, #B7791F);
}

/* Transitions de survol douces sur les éléments cliquables. */
.lfb-act,
.lf-ctract,
.lf-nbanner,
.lf-bnav__item,
.lf-eye {
	transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease, background 140ms ease;
}
.lfb-act:hover,
.lf-ctract:hover,
.lf-nbanner:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(20, 18, 14, 0.09);
}
.lf-bnav__item:hover,
.lf-eye:hover {
	opacity: 0.78;
}
/* Bouton retirer — appel à l'action principal, couleur du Design module + pulse subtil. */
.lfb-act--cta {
	background: var(--lfb-green);
	border-color: var(--lfb-green);
	color: #fff;
	position: relative;
	animation: lfb-cta-pulse 2.6s ease-out infinite;
}
.lfb-act--cta .lfb-act-ic { color: var(--lfb-green); }
.lfb-act--cta .lfb-act-lb { color: #fff; font-weight: 600; }
.lfb-act--cta:hover {
	animation: none;
	transform: translateY(-2px);
	box-shadow: 0 8px 22px color-mix(in srgb, var(--lfb-green) 35%, transparent);
}
@keyframes lfb-cta-pulse {
	0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lfb-green) 50%, transparent); }
	70%  { box-shadow: 0 0 0 14px color-mix(in srgb, var(--lfb-green) 0%, transparent); }
	100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lfb-green) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
	.lfb-act--cta { animation: none; }
}
/* Bandeau d'information permanent (rappel spam). */
.lf-spam-banner {
	background: #f1f0ec;
	border: 1px solid #e4e1d8;
	border-radius: var(--lfb-r-md);
	padding: 7px 11px;
	margin: 0 0 10px;
	display: flex;
	gap: 8px;
	align-items: flex-start;
}
.lf-spam-banner i {
	font-size: 14px;
	color: #8b857a;
	flex-shrink: 0;
	margin-top: 2px;
}
.lf-spam-banner p {
	margin: 0;
	font-size: 11px;
	line-height: 1.45;
	color: #5a5750;
}

/* Carte virtuelle — finition premium : double radial-gradient pour reflet,
   dégradé diagonal principal, ombre teintée, liseré intérieur lumineux. */
.lf-vcard .lf-vcard__face,
.lf-vcard__face {
	border-radius: var(--lfb-r-xl) !important;
	padding: 22px 20px !important;
	background:
		radial-gradient(ellipse at 70% -10%, rgba(255,255,255,0.22) 0%, transparent 55%),
		radial-gradient(circle at -10% 115%, rgba(255,255,255,0.10) 0%, transparent 50%),
		linear-gradient(135deg,
			color-mix(in srgb, var(--lfb-card) 78%, #ffffff) 0%,
			var(--lfb-card) 42%,
			color-mix(in srgb, var(--lfb-card) 42%, #000000) 100%
		) !important;
	box-shadow:
		0 16px 40px color-mix(in srgb, var(--lfb-card) 38%, transparent),
		inset 0 1px 0 rgba(255,255,255,0.18),
		inset 0 -1px 0 rgba(0,0,0,0.22) !important;
}
.lf-vcard--empty {
	border-radius: var(--lfb-r-xl) !important;
	padding: 22px 20px !important;
	background:
		linear-gradient(135deg,
			color-mix(in srgb, var(--lfb-card) 80%, #ffffff) 0%,
			var(--lfb-card) 45%,
			color-mix(in srgb, var(--lfb-card) 45%, #000000) 100%
		) !important;
	box-shadow: 0 16px 40px color-mix(in srgb, var(--lfb-card) 38%, transparent) !important;
}
.lf-vcard__chip {
	background: linear-gradient(135deg, #f0c160 0%, #c79a3a 60%, #8a6a22 100%) !important;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 0 rgba(0,0,0,0.25) !important;
}
/* Logos de marques pour la carte virtuelle (déterminée par le 1er chiffre du PAN). */
.lf-vcard__logo {
	font-family: 'Helvetica Neue', Arial, sans-serif;
	line-height: 1;
	white-space: nowrap;
}
.lf-vcard__logo--visa {
	font-weight: 900;
	font-style: italic;
	font-size: 19px;
	letter-spacing: -0.5px;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.lf-vcard__logo--amex {
	font-weight: 700;
	font-size: 12px;
	color: #fff;
	background: #006FCF;
	padding: 4px 7px;
	border-radius: 3px;
	letter-spacing: 0.6px;
}
.lf-vcard__logo--discover {
	font-weight: 700;
	font-size: 11px;
	color: #FF6000;
	background: #fff;
	padding: 4px 9px;
	border-radius: var(--lfb-r-pill);
	letter-spacing: 0.4px;
}
