/**
 * Page Budget V1 — squelette interne (2026-05-22-04)
 * NAV-BUDGET-01 (2026-05-22-01) : containment overflow-x mobile (menu burger)
 * budget-ui-first-corrections-2026-05-22-10
 * budget-popup-forms-liofo-fields-2026-05-28-01
 * budget-popup-click-bugfix-2026-05-28-02
 * budget-popup-click-bugfix-real-browser-2026-05-28-04
 * budget-actions-wallet-style-fix-2026-05-28-05
 * budget-save-button-compact-fix-2026-05-28-06
 */

.liofo-budget-modals-root {
  position: relative;
  z-index: 0;
}

.liofo-budget-modal.liofo-budget-modal--open {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.liofo-budget-modal:not(.liofo-budget-modal--open)[hidden] {
  display: none !important;
}

body.liofo-budget-modal-open {
  overflow: hidden;
}

.liofo-budget-page {
  --liofo-bd-surface: rgba(12, 16, 24, 0.72);
  --liofo-bd-border: rgba(255, 255, 255, 0.1);
  --liofo-bd-muted: rgba(255, 255, 255, 0.58);
  --liofo-bd-green: #00bf63;
  --liofo-bd-green-soft: rgba(0, 191, 99, 0.14);
  --liofo-bd-radius: 16px;
  margin: 0;
  padding: 1.25rem 0 3rem;
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
  overflow-x: clip;
}

.liofo-budget-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.liofo-budget-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.liofo-budget-header__title-row {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  justify-content: center;
}

.liofo-budget-header .liofo-mw-page-title-wrap {
  justify-content: center;
}

.liofo-budget-title,
.liofo-budget-header h1.titre-page {
  margin: 0;
  padding: 0;
  text-align: center;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.01em;
}

.liofo-budget-subtitle {
  margin: 0 auto;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--liofo-bd-muted);
  max-width: 36rem;
  text-align: center;
}

.liofo-budget-badge {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #d1fae5;
  background: var(--liofo-bd-green-soft);
  border: 1px solid rgba(0, 191, 99, 0.35);
}

.liofo-budget-toolbar {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.liofo-budget-month-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 auto;
}

.liofo-budget-month-label {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  min-width: 7rem;
  text-align: center;
}

.liofo-budget-status {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--liofo-bd-muted);
}

.liofo-budget-status.is-error {
  color: #f87171;
}

.liofo-budget-status.is-ok {
  color: #86efac;
}

.liofo-budget-section-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

/* 2026-07-08 : pastille d'info (légende explicative) accolée à un titre de cadre. */
.liofo-budget-title-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  margin-left: 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  color: rgba(203, 213, 225, 0.9);
  font-size: 0.68rem;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
  user-select: none;
}

.liofo-budget-title-info:hover,
.liofo-budget-title-info:focus-visible {
  border-color: rgba(148, 163, 184, 0.9);
  color: #fff;
  outline: none;
}

.liofo-budget-card {
  background: var(--liofo-bd-surface);
  border: 1px solid var(--liofo-bd-border);
  border-radius: var(--liofo-bd-radius);
  padding: 1.1rem 1.15rem;
  margin-bottom: 2.5rem;
}

.liofo-budget-card--stretch {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.liofo-budget-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.liofo-budget-card-head > .liofo-budget-section-title {
  margin-bottom: 0;
}

.liofo-budget-overview,
.liofo-budget-banks,
.liofo-budget-transactions,
.liofo-budget-targets,
.liofo-budget-actions-panel {
  --liofo-section-title-accent: #3DB2FF;
}

.liofo-budget-overview {
  --liofo-section-title-accent: #f59e0b;
}

.liofo-budget-summary {
  --liofo-section-title-accent: #0CC0DF;
}

/* 2026-07-08 : espacement doublé + résumé/dépenses côte à côte (retours Thomas). */
.liofo-budget-top-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  align-items: stretch;
  margin-bottom: 2.5rem;
}

.liofo-budget-top-panels > .liofo-budget-summary,
.liofo-budget-top-panels > .liofo-budget-overview {
  margin: 0;
  min-width: 0;
}

.liofo-budget-top-panels .liofo-budget-card {
  margin-bottom: 0;
  height: 100%;
}

@media (max-width: 900px) {
  .liofo-budget-top-panels {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }
}

.liofo-budget-actions-panel--forecast {
  --liofo-section-title-accent: #00BF63;
}

.liofo-budget-actions-panel--executed {
  --liofo-section-title-accent: #FF66C4;
}

.liofo-budget-transactions {
  --liofo-section-title-accent: #8b5cf6;
}

.liofo-budget-targets {
  --liofo-section-title-accent: #ffb84d;
}

.liofo-budget-actions-panels,
.liofo-budget-dual-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  align-items: stretch;
  margin-bottom: 2.5rem;
}

.liofo-budget-actions-panels .liofo-budget-card,
.liofo-budget-dual-panels .liofo-budget-card {
  margin-bottom: 0;
}

.liofo-budget-card--accent {
  border-color: rgba(0, 191, 99, 0.25);
}

.liofo-budget-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  min-width: 0;
}

@media (max-width: 560px) {
  .liofo-budget-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.liofo-budget-kpi {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.6rem 0.5rem;
  text-align: center;
  min-width: 0;
}

.liofo-budget-kpi__label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(241, 245, 249, 0.92);
  margin-bottom: 0.3rem;
}

.liofo-budget-kpi__value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  overflow-wrap: anywhere;
}

.liofo-budget-kpi__value--highlight {
  color: var(--liofo-bd-green);
}

.liofo-budget-kpi__value--positive {
  color: #86efac;
}

.liofo-budget-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

/* Annule les règles globales `table` / `th, td` de style-personnalise.css */
.liofo-budget-page table.liofo-budget-table {
  width: 100%;
  max-width: 100%;
  margin-top: 0;
  border-collapse: collapse;
  font-size: 0.85rem;
  border-radius: 0;
}

.liofo-budget-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.liofo-budget-table th,
.liofo-budget-table td {
  padding: 0.55rem 0.65rem;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.liofo-budget-table th {
  color: var(--liofo-bd-muted);
  font-weight: 600;
}

.liofo-budget-table__empty {
  text-align: center;
  color: var(--liofo-bd-muted);
  padding: 1rem;
}

/* 2026-07-08 : tableau overview entièrement visible (pas de scroll horizontal),
   colonnes resserrées, marge interne identique sur toutes les cellules. */
.liofo-budget-overview-table.liofo-budget-institution-accounts-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.liofo-budget-overview-table.liofo-budget-institution-accounts-table th,
.liofo-budget-overview-table.liofo-budget-institution-accounts-table td {
  padding: 0.5rem 0.55rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.liofo-budget-overview-table .liofo-budget-institution-accounts-table__name {
  min-width: 0;
  white-space: normal;
}

.liofo-budget-overview-table .liofo-budget-institution-accounts-table__money,
.liofo-budget-overview-table .liofo-budget-institution-accounts-table__status {
  min-width: 0;
}

.liofo-budget-overview-table__col-progress {
  min-width: 0;
}

.liofo-budget-overview-table .liofo-budget-table__empty {
  text-align: center !important;
  color: var(--liofo-bd-muted) !important;
  background: transparent !important;
}

.liofo-budget-account-list,
.liofo-budget-target-list,
.liofo-budget-sub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.liofo-budget-empty-inline {
  color: var(--liofo-bd-muted);
  font-style: italic;
}

/* budget-lists-accounts-targets-subscriptions-2026-05-28-07 */
/* 2026-07-04-02-USER-BUDGET-PHASE-A-QA2 : cadres transactions rendus plus ludiques
   Thomas 2026-07-04 « rendre l'écriture plus ludique et jolie dans les cadres ».
   Changements : padding généreux, border-radius plus doux (16px), gradient plus
   vif, léger effet hover pour vivacité, montant taille agrandie + typo grasse. */
.liofo-budget-list-card {
  padding: 1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid rgba(94, 202, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(14, 24, 45, 0.76), rgba(8, 13, 30, 0.7)),
    radial-gradient(circle at 12% 20%, rgba(52, 212, 255, 0.1), transparent 55%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 2px 12px -6px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.liofo-budget-list-card:hover {
  transform: translateY(-1px);
  border-color: rgba(94, 202, 255, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 6px 18px -8px rgba(52, 212, 255, 0.28);
}

.liofo-budget-list-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.liofo-budget-list-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.97);
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.liofo-budget-list-card__amount {
  font-size: 1.08rem;
  font-weight: 800;
  color: #9ae8ff;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(154, 232, 255, 0.18);
}

.liofo-budget-list-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: right;
  white-space: normal;
  max-width: 55%;
}

.liofo-budget-list-card__badge--ok {
  color: #b8f5d0;
  background: rgba(46, 160, 98, 0.18);
  border: 1px solid rgba(72, 201, 128, 0.35);
}

.liofo-budget-list-card__badge--warn {
  color: #ffd4a8;
  background: rgba(201, 120, 46, 0.18);
  border: 1px solid rgba(255, 170, 72, 0.35);
}

.liofo-budget-list-card__badge--info {
  color: #b8e4ff;
  background: rgba(46, 120, 201, 0.18);
  border: 1px solid rgba(72, 160, 255, 0.35);
}

.liofo-budget-list-card__badge--neutral {
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* 2026-07-04-02 : meta agrandie + emoji catégorie visible en taille XL */
.liofo-budget-list-card__meta {
  margin: 0 0 0.55rem;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
  font-variant-emoji: emoji; /* Chrome 111+/Safari 17+ : préfère la version couleur */
}

/* 2026-07-04-02 : Emoji catégorie inline dans la meta (Thomas « afficher plus grand »).
   Fonctionne car les emojis Unicode s'agrandissent avec font-size sans upscaling flou
   (rendu vectoriel natif sur les OS modernes : Segoe UI Emoji Win10+, Apple Color Emoji,
   Noto Color Emoji Android/Linux). Vertical-align middle pour rester aligné au texte. */
.liofo-budget-cat-emoji {
  display: inline-block;
  font-size: 1.6em;
  line-height: 1;
  vertical-align: -0.2em;
  margin-right: 0.15em;
  font-variant-emoji: emoji;
}

.liofo-budget-list-card__note {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  color: rgba(154, 232, 255, 0.85);
  font-style: italic;
  line-height: 1.45;
}

/* 2026-07-03-05-USER-BUDGET-PHASE-A-NOTES-CATEGORIES : note utilisateur
   (commentaire libre saisi dans le formulaire), distincte des notes
   système comme "Hausse vs mois précédent". */
.liofo-budget-list-card__note--user {
  color: rgba(255, 255, 255, 0.72);
  font-style: normal;
}

/* ============================================================================
   Phase B (2026-07-04-03) : badges informatifs sur les cartes
   (need_level indispensable/utile/confort/superflu, is_loan "Prêt",
   is_business "Pro"). Rangés sur une ligne compacte sous la meta.
   ============================================================================ */
.liofo-budget-list-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0 0.5rem;
}

.liofo-budget-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
}

/* Couleurs indicatives des niveaux de besoin — codage psychologique doux.
   Rouge = indispensable (survie), bleu = utile (rationnel), orange = confort,
   violet = superflu (récréatif). Pas d'accent négatif : c'est un outil de
   décision personnel, pas un jugement de valeur. */
.liofo-budget-badge--need-level[data-need-level="indispensable"] {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.45);
  color: rgba(254, 202, 202, 0.95);
}
.liofo-budget-badge--need-level[data-need-level="utile"] {
  background: rgba(96, 165, 250, 0.18);
  border-color: rgba(96, 165, 250, 0.45);
  color: rgba(191, 219, 254, 0.95);
}
.liofo-budget-badge--need-level[data-need-level="confort"] {
  background: rgba(251, 146, 60, 0.18);
  border-color: rgba(251, 146, 60, 0.45);
  color: rgba(254, 215, 170, 0.95);
}
.liofo-budget-badge--need-level[data-need-level="superflu"] {
  background: rgba(196, 181, 253, 0.18);
  border-color: rgba(196, 181, 253, 0.45);
  color: rgba(233, 213, 255, 0.95);
}

.liofo-budget-badge--loan {
  background: rgba(52, 211, 153, 0.18);
  border-color: rgba(52, 211, 153, 0.45);
  color: rgba(167, 243, 208, 0.95);
}

.liofo-budget-badge--business {
  background: rgba(250, 204, 21, 0.18);
  border-color: rgba(250, 204, 21, 0.45);
  color: rgba(254, 240, 138, 0.95);
}

/* ============================================================================
   Phase B (2026-07-04-03) : fieldset "Niveau de besoin" (4 radios).
   Layout horizontal en flex, options bien espacées, focus visible.
   ============================================================================ */
.liofo-budget-need-level-field {
  border: 0;
  padding: 0;
  margin: 0 0 0.85rem;
}

.liofo-budget-need-level-field > .ep-field-label {
  display: block;
  margin-bottom: 0.35rem;
}

.liofo-budget-need-level-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

.liofo-budget-need-level-option {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.liofo-budget-need-level-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.liofo-budget-need-level-option input[type="radio"] {
  margin: 0;
  accent-color: #34d4ff;
}

/* ============================================================================
   Phase B (2026-07-04-03) : cases à cocher métier (is_loan, is_business).
   ============================================================================ */
.liofo-budget-flag-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}

.liofo-budget-flag-option {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.liofo-budget-flag-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.liofo-budget-flag-option input[type="checkbox"] {
  margin: 0;
  accent-color: #34d4ff;
  transform: scale(1.05);
}

/* ============================================================================
   Phase B (2026-07-04-03) : champ sous-catégorie (masqué tant qu'aucune mère
   n'est choisie — attribut `hidden` HTML natif suffit, mais on ajoute une
   règle explicite pour l'ordre visuel). Aucune surprise UX : le champ apparaît
   juste sous "Catégorie" quand une catégorie mère avec enfants est choisie.
   ============================================================================ */
.liofo-budget-subcat-field[hidden] {
  display: none !important;
}

/* ============================================================================
   C1 (2026-07-04-05) : fusion transaction/abonnement dans la modale expense.
   La case "C'est un abonnement" (mode toggle) et les blocs conditionnels
   data-budget-mode="expense-only" / "subscription-only" gérés côté JS via
   [hidden]. On force display:none pour éviter tout artefact de layout.
   ============================================================================ */
.liofo-budget-mode-toggle {
  display: flex;
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.75rem;
  background: rgba(52, 212, 255, 0.06);
  border: 1px solid rgba(52, 212, 255, 0.25);
  border-radius: 10px;
}

.liofo-budget-flag-option--strong {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

[data-budget-mode="expense-only"][hidden],
[data-budget-mode="subscription-only"][hidden],
[data-budget-billing-field][hidden],
[data-budget-target-destination-field][hidden] {
  display: none !important;
}

.liofo-budget-subscription-fields {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0 0 0.85rem;
  padding: 0.6rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

/* ============================================================================
   C1 / BK.2 UI (2026-07-05) : cadre unifié "Transactions".
   Les transactions ne sont plus rendues comme un tableau : elles deviennent des
   bulles regroupées par date, avec décalage visuel gauche/droite (gauche =
   entrées, droite = sorties). Même rendu dans la popup compte.
   ============================================================================ */
.liofo-budget-transaction-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.liofo-budget-transactions .liofo-budget-card {
  background: rgba(10, 14, 20, 0.32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* 2026-07-07 : Thomas souhaite resserrer davantage la timeline principale
   "Budget" tout en gardant la popup compte un peu plus aeree. */
.liofo-budget-transactions .liofo-budget-transaction {
  max-width: 66%;
}

.liofo-budget-transactions .liofo-budget-transaction--inflow {
  margin-left: 9%;
  margin-right: auto;
}

.liofo-budget-transactions .liofo-budget-transaction--outflow {
  margin-left: auto;
  margin-right: 9%;
}

.liofo-budget-transaction-list--account {
  padding: 0.85rem 0.9rem;
  /* 2026-07-08 (retour Thomas) : contour du cadre interne des transactions rendu
     invisible dans la popup (le cadre de la modale suffit). */
  border: 0;
  border-radius: 18px;
  background: rgba(10, 14, 20, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.liofo-budget-transaction-day {
  list-style: none;
  margin: 0.8rem 0 0.1rem;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.96);
  letter-spacing: 0.01em;
}

.liofo-budget-transaction {
  position: relative;
  width: min(100%, 33rem);
  max-width: 72%;
}

.liofo-budget-transaction--outflow {
  margin-left: auto;
}

.liofo-budget-transaction--inflow {
  margin-right: auto;
}

.liofo-budget-transaction-list--account .liofo-budget-transaction {
  max-width: 72%;
}

.liofo-budget-transaction.liofo-budget-list-card {
  background: transparent;
  border-width: 2px;
  border-style: solid;
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.45);
}

.liofo-budget-transaction--outflow.liofo-budget-list-card {
  border-color: rgba(255, 105, 201, 0.95);
}

.liofo-budget-transaction--inflow.liofo-budget-list-card {
  border-color: rgba(20, 209, 122, 0.95);
}

.liofo-budget-transaction.liofo-budget-list-card:hover {
  transform: none;
  box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.5);
}

.liofo-budget-transaction .liofo-budget-list-card__title,
.liofo-budget-transaction .liofo-budget-list-card__amount,
.liofo-budget-transaction .liofo-budget-list-card__meta,
.liofo-budget-transaction .liofo-budget-list-card__note,
.liofo-budget-transaction .liofo-budget-list-card__badge,
.liofo-budget-transaction .liofo-budget-list-card__action {
  color: rgba(255, 255, 255, 0.96);
}

.liofo-budget-transaction .liofo-budget-list-card__amount {
  text-shadow: none;
}

.liofo-budget-transaction .liofo-budget-list-card__meta,
.liofo-budget-transaction .liofo-budget-list-card__note {
  color: rgba(255, 255, 255, 0.82);
}

.liofo-budget-transaction .liofo-budget-list-card__note--user::before,
.liofo-budget-transaction .liofo-budget-list-card__note--user::after {
  color: rgba(255, 255, 255, 0.35);
}

.liofo-budget-transaction .liofo-budget-list-card__actions {
  justify-content: flex-end;
}

.liofo-budget-transaction .liofo-budget-list-card__action {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.liofo-budget-transaction .liofo-budget-list-card__action:hover,
.liofo-budget-transaction .liofo-budget-list-card__action:focus {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

.liofo-budget-transaction__flow-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.liofo-budget-transaction__flow-tag--out {
  color: rgba(255, 105, 201, 0.98);
  background: transparent;
  border: 1px solid rgba(255, 105, 201, 0.48);
}

.liofo-budget-transaction__flow-tag--in {
  color: rgba(20, 209, 122, 0.98);
  background: transparent;
  border: 1px solid rgba(20, 209, 122, 0.48);
}

.liofo-budget-list-card__note--user::before {
  content: "\201C";
  margin-right: 2px;
  color: rgba(255, 255, 255, 0.4);
}
.liofo-budget-list-card__note--user::after {
  content: "\201D";
  margin-left: 2px;
  color: rgba(255, 255, 255, 0.4);
}

.liofo-budget-list-card__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.75rem;
  margin: 0;
}

.liofo-budget-list-card__metric {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.liofo-budget-list-card__metric dt {
  margin: 0;
  font-size: 0.72rem;
  color: var(--liofo-bd-muted);
  font-weight: 500;
}

.liofo-budget-list-card__metric dd {
  margin: 0;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.liofo-budget-list-empty {
  padding: 0.75rem 0.25rem;
}

.liofo-budget-list-empty__text {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
}

.liofo-budget-list-empty__hint {
  margin: 0.35rem 0 0;
  color: var(--liofo-bd-muted);
  font-size: 0.8rem;
  font-style: italic;
}

.liofo-budget-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.liofo-budget-pagination[hidden] {
  display: none !important;
}

.liofo-budget-pagination__label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
}

.liofo-budget-pagination__btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.liofo-budget-pagination__btn:hover,
.liofo-budget-pagination__btn:focus-visible {
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(56, 189, 248, 0.12);
  outline: none;
}

.liofo-budget-pagination__btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .liofo-budget-list-card__metrics {
    grid-template-columns: 1fr;
  }

  .liofo-budget-list-card__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .liofo-budget-list-card__badge {
    max-width: 100%;
    text-align: left;
  }
}

/* budget-edit-delete-actions-2026-05-30-01 */
.liofo-budget-expense-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.liofo-budget-list-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.liofo-budget-list-card__action {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.liofo-budget-list-card__action:hover,
.liofo-budget-list-card__action:focus {
  border-color: rgba(94, 202, 255, 0.45);
  background: rgba(52, 212, 255, 0.08);
  color: #e8f8ff;
  outline: none;
}

.liofo-budget-list-card__action--delete:hover,
.liofo-budget-list-card__action--delete:focus {
  border-color: rgba(255, 140, 120, 0.45);
  background: rgba(201, 80, 60, 0.12);
  color: #ffd8d0;
}

.liofo-budget-actions-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  align-items: stretch;
}

.liofo-budget-actions-row--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: none;
  margin: 0;
}

/* budget-actions-wallet-style-fix-2026-05-28-05 — miroir #user-wallets-section .wallet-page-primary-cta (+ !important vs chart-period-btn global) */
.liofo-budget-page .liofo-budget-actions-row .chart-period-btn.wallet-page-primary-cta.liofo-budget-quick-action,
.liofo-budget-page .liofo-budget-actions-row .chart-period-btn.wallet-page-primary-cta.liofo-budget-quick-action:focus,
.liofo-budget-page .liofo-budget-actions-row .chart-period-btn.wallet-page-primary-cta.liofo-budget-quick-action:focus:hover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 11px 18px;
  border-radius: 20px;
  border: 1px solid rgba(94, 202, 255, 0.58) !important;
  background-color: transparent !important;
  background-image:
    linear-gradient(135deg, rgba(14, 24, 45, 0.92), rgba(8, 13, 30, 0.9)),
    radial-gradient(circle at 10% 50%, rgba(52, 212, 255, 0.2), transparent 46%) !important;
  box-shadow: 0 0 14px rgba(42, 190, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  color: #f2fbff !important;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.liofo-budget-page .liofo-budget-actions-row .chart-period-btn.wallet-page-primary-cta.liofo-budget-quick-action::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border-radius: 50%;
  border: 1px solid rgba(140, 227, 255, 0.72);
  background: rgba(58, 171, 255, 0.12);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.liofo-budget-page .liofo-budget-actions-row .chart-period-btn.wallet-page-primary-cta.liofo-budget-quick-action:hover {
  border-color: rgba(130, 220, 255, 0.78) !important;
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(42, 190, 255, 0.25), 0 0 12px rgba(156, 92, 255, 0.12) !important;
  background-color: transparent !important;
  background-image:
    linear-gradient(135deg, rgba(14, 24, 45, 0.92), rgba(8, 13, 30, 0.9)),
    radial-gradient(circle at 10% 50%, rgba(52, 212, 255, 0.2), transparent 46%) !important;
  color: #f2fbff !important;
}

.liofo-budget-page .liofo-budget-actions-row .chart-period-btn.wallet-page-primary-cta.liofo-budget-quick-action:focus-visible {
  outline: 2px solid rgba(255, 102, 196, 0.55);
  outline-offset: 2px;
}

.liofo-budget-page .chart-period-btn.wallet-page-primary-cta.liofo-budget-inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(94, 202, 255, 0.48) !important;
  background: linear-gradient(135deg, rgba(14, 24, 45, 0.92), rgba(8, 13, 30, 0.9)) !important;
  color: #f2fbff !important;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 0 12px rgba(42, 190, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  white-space: nowrap;
}

.liofo-budget-page .chart-period-btn.wallet-page-primary-cta.liofo-budget-inline-action:hover,
.liofo-budget-page .chart-period-btn.wallet-page-primary-cta.liofo-budget-inline-action:focus-visible {
  border-color: rgba(130, 220, 255, 0.78) !important;
  box-shadow: 0 0 18px rgba(42, 190, 255, 0.22), 0 0 10px rgba(156, 92, 255, 0.1) !important;
  outline: none;
}

/* 2026-07-08 : le "+" du bouton "Ajouter un compte" reprend EXACTEMENT la pastille
   ronde `::before` des boutons d'action (Ajouter une sortie / entrée) pour une
   identité visuelle homogène sur la page. Le `<span>` inline est retiré du markup. */
.liofo-budget-page .chart-period-btn.wallet-page-primary-cta.liofo-budget-inline-action::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border-radius: 50%;
  border: 1px solid rgba(140, 227, 255, 0.72);
  background: rgba(58, 171, 255, 0.12);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

/* Ancienne pastille plate conservée sans effet (aucun markup ne l'utilise plus). */
.liofo-budget-btn-plus {
  display: inline-block;
  margin-right: 0.35rem;
  font-weight: 700;
  font-size: 1.05em;
  line-height: 1;
}

.liofo-budget-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
}

.liofo-budget-btn--primary {
  background: var(--liofo-bd-green);
  color: #0a0f14;
}

.liofo-budget-btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--liofo-bd-border);
}

.liofo-budget-btn--ghost {
  background: transparent;
  color: #fff;
  border-color: var(--liofo-bd-border);
  min-width: 2.5rem;
}

/* Popups — pattern liofo-mh-modal (Plan de sortie / Santé du marché) */
.liofo-budget-modal__panel {
  max-width: min(28rem, calc(100vw - 2rem));
}

/* 2026-07-08 : titre de modale calé sur le style « cadre » du reste de la page
   (titre en haut à gauche + fine barre verticale colorée type Liofo).
   Suppression de toute barre/bordure grise sous le titre (séparateur hérité). */
.liofo-budget-modals-root .liofo-mh-modal__title,
.liofo-budget-modal .liofo-mh-modal__title {
  position: relative;
  padding-left: 0.85rem;
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

.liofo-budget-modals-root .liofo-mh-modal__title::before,
.liofo-budget-modal .liofo-mh-modal__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 4px;
  border-radius: 2px;
  background: var(--liofo-modal-title-accent, #0CC0DF);
}

/* Accent dédié par modale (cohérent avec les cadres de la page). */
#liofo-budget-modal-account-transactions .liofo-mh-modal__title {
  --liofo-modal-title-accent: #8B5CF6;
}

/* La popup compte ne doit plus afficher de fine barre grise entre le corps et
   le pied (bouton « Fermer ») : on neutralise tout séparateur hérité. */
.liofo-budget-modals-root .liofo-mh-modal__panel,
.liofo-budget-modal .liofo-mh-modal__panel,
.liofo-budget-modals-root .liofo-mh-modal__body,
.liofo-budget-modal .liofo-mh-modal__body {
  border-top: 0 !important;
  border-bottom: 0 !important;
}

.liofo-budget-modal__body.ep-v2 .liofo-budget-form {
  margin: 0;
}

.liofo-budget-modal__body.ep-v2 .ep-field {
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.liofo-budget-modal__body.ep-v2 .ep-field:last-of-type {
  margin-bottom: 0.35rem;
}

.liofo-budget-modal__body.ep-v2 .ep-field-label {
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.52);
}

/* 2026-07-04-02-USER-BUDGET-PHASE-A-QA2 : alignement style champs sur le modèle
   canonique Liofo Bourse (`.liofo-bourse-form-field__input`) — Thomas 2026-07-04
   « prends exemple sur la liste déroulante bourse champ type cadre PEA eur ».
   Changements : fond `rgba(0,0,0,0.24)` (au lieu de rgba(255,255,255,0.05)), color
   `rgba(255,255,255,0.86)`, border-radius 10px (au lieu de 12px), padding aligné. */
.liofo-budget-modal__body.ep-v2 .ep-input,
.liofo-budget-modal__body.ep-v2 .ep-select,
.liofo-budget-modal__body.ep-v2 .ep-textarea {
  min-height: 2.55rem;
  padding: 0.58rem 0.66rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.24);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

/* 2026-07-04-02 : select catégorie — taille de police agrandie pour rendre l'emoji
   plus visible (Thomas « logos trop basiques et anciens... afficher plus grand »). */
.liofo-budget-modal__body.ep-v2 .ep-select[data-budget-category-select] {
  font-size: 1.02rem;
  line-height: 1.35;
}

/* 2026-07-03-05-USER-BUDGET-PHASE-A-NOTES-CATEGORIES */
.liofo-budget-modal__body.ep-v2 .ep-textarea {
  min-height: 4rem;
  resize: vertical;
  font-family: inherit;
  line-height: 1.4;
}

/* 2026-07-04-02-USER-BUDGET-PHASE-A-QA2 : options des <select> — aligné sur le
   rendu bourse (Thomas « prends exemple bourse PEA type »).
   Fond `#0a0e14` = équivalent visuel de `rgba(0,0,0,0.24)` sur fond noir Liofo
   opacifié pour le dropdown natif du navigateur qui ne supporte pas la transparence.
   Padding + line-height augmentés pour aération. Font-size 1rem pour rendre l'emoji
   plus visible (32 catégories dans le menu doivent rester lisibles). */
.liofo-budget-modal__body.ep-v2 .ep-select option {
  background-color: #0a0e14;
  color: rgba(255, 255, 255, 0.88);
  padding: 0.5rem 0.6rem;
  font-size: 1rem;
  line-height: 1.6;
}
.liofo-budget-modal__body.ep-v2 .ep-select option:checked,
.liofo-budget-modal__body.ep-v2 .ep-select option:hover,
.liofo-budget-modal__body.ep-v2 .ep-select option:focus {
  background-color: rgba(0, 191, 99, 0.18);
  color: #ffffff;
}

.liofo-budget-modal__body.ep-v2 .ep-input:hover,
.liofo-budget-modal__body.ep-v2 .ep-select:hover,
.liofo-budget-modal__body.ep-v2 .ep-textarea:hover {
  border-color: rgba(56, 189, 248, 0.28);
}

.liofo-budget-modal__body.ep-v2 .ep-input:focus,
.liofo-budget-modal__body.ep-v2 .ep-select:focus,
.liofo-budget-modal__body.ep-v2 .ep-textarea:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.liofo-budget-modal__status {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  color: var(--liofo-bd-muted);
  min-height: 1.1rem;
}

.liofo-budget-modal__status.is-error {
  color: #f87171;
}

.liofo-budget-modal__status.is-ok {
  color: #86efac;
}

.liofo-budget-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  align-items: center;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* budget-save-button-compact-fix-2026-05-28-06 — modales hors .liofo-budget-page (#liofo-budget-modals-root) */
.liofo-budget-modals-root .liofo-budget-modal__footer .liofo-budget-modal__cancel.liofo-mh-history-pill.chart-period-btn,
.liofo-budget-modals-root .liofo-budget-modal__footer .liofo-budget-modal__cancel.liofo-mh-history-pill.chart-period-btn:hover,
.liofo-budget-modals-root .liofo-budget-modal__footer .liofo-budget-modal__cancel.liofo-mh-history-pill.chart-period-btn:focus,
.liofo-budget-modals-root .liofo-budget-modal__footer .liofo-budget-modal__cancel.liofo-mh-history-pill.chart-period-btn:focus:hover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.48rem 1.15rem !important;
  font-size: 0.84rem !important;
  font-weight: 500 !important;
  border-radius: 999px !important;
  width: auto;
  max-width: none;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
  background-image: none !important;
  color: rgba(255, 255, 255, 0.88) !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.liofo-budget-modals-root .liofo-budget-modal__footer .liofo-budget-modal__cancel.liofo-mh-history-pill.chart-period-btn:hover {
  border-color: rgba(56, 189, 248, 0.42) !important;
  color: #e0f2fe !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18) !important;
}

.liofo-budget-modals-root .liofo-budget-modal__footer .liofo-budget-submit-btn.liofo-mh-history-pill.chart-period-btn,
.liofo-budget-modals-root .liofo-budget-modal__footer .liofo-budget-submit-btn.liofo-mh-history-pill.chart-period-btn:focus,
.liofo-budget-modals-root .liofo-budget-modal__footer .liofo-budget-submit-btn.liofo-mh-history-pill.chart-period-btn:focus:hover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.48rem 1.25rem !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  border-radius: 999px !important;
  width: auto;
  min-width: 7.5rem;
  max-width: 11rem;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid rgba(56, 189, 248, 0.55) !important;
  background-color: transparent !important;
  background-image:
    linear-gradient(135deg, rgba(14, 24, 45, 0.95), rgba(8, 13, 30, 0.92)),
    radial-gradient(circle at 12% 50%, rgba(52, 212, 255, 0.28), transparent 52%) !important;
  color: #f0f9ff !important;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.liofo-budget-modals-root .liofo-budget-modal__footer .liofo-budget-submit-btn.liofo-mh-history-pill.chart-period-btn:hover {
  border-color: rgba(96, 210, 255, 0.72) !important;
  transform: translateY(-1px);
  background-color: transparent !important;
  background-image:
    linear-gradient(135deg, rgba(14, 24, 45, 0.95), rgba(8, 13, 30, 0.92)),
    radial-gradient(circle at 12% 50%, rgba(52, 212, 255, 0.34), transparent 52%) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 26px rgba(56, 189, 248, 0.28), 0 0 10px rgba(156, 92, 255, 0.1) !important;
}

.liofo-budget-modals-root .liofo-budget-modal__footer .liofo-budget-submit-btn.liofo-mh-history-pill.chart-period-btn:focus-visible,
.liofo-budget-modals-root .liofo-budget-modal__footer .liofo-budget-modal__cancel.liofo-mh-history-pill.chart-period-btn:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
}

/* budget-date-target-progress-2026-06-01-01 */

.liofo-budget-table__progress {
  min-width: 8.5rem;
  max-width: 12rem;
}

.liofo-budget-overview-table td.liofo-budget-table__progress {
  min-width: 0;
}

.liofo-budget-progress {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.liofo-budget-progress__track {
  display: flex;
  gap: 2px;
  width: 100%;
}

.liofo-budget-progress__seg {
  flex: 1 1 0;
  height: 0.55rem;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.25);
}

.liofo-budget-progress--ok .liofo-budget-progress__seg.is-filled {
  background: linear-gradient(180deg, #4ade80, #22c55e);
}

.liofo-budget-progress--exceeded .liofo-budget-progress__seg.is-filled {
  background: linear-gradient(180deg, #f87171, #ef4444);
}

.liofo-budget-progress--neutral .liofo-budget-progress__label {
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.85rem;
}

.liofo-budget-progress__label {
  font-size: 0.8rem;
  line-height: 1.25;
  color: rgba(226, 232, 240, 0.92);
}

.liofo-budget-modal__hint {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: rgba(148, 163, 184, 0.95);
}

.liofo-budget-list-card__action--payment {
  border-color: rgba(56, 189, 248, 0.45);
}

@media (max-width: 768px) {
  .liofo-budget-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .liofo-budget-actions-panels,
  .liofo-budget-dual-panels {
    grid-template-columns: 1fr;
  }

  .liofo-budget-table {
    min-width: 0;
  }

  .liofo-budget-table__progress {
    min-width: 0;
    max-width: none;
  }

  .liofo-budget-table-wrap .liofo-budget-table td.liofo-budget-table__progress {
    display: block;
    width: 100%;
    padding-top: 0.35rem;
  }

  .liofo-budget-month-nav {
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .liofo-budget-actions-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .liofo-budget-card-head {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .liofo-budget-actions-row {
    grid-template-columns: 1fr;
  }

  .liofo-budget-btn,
  .liofo-budget-page .liofo-budget-quick-action {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .liofo-budget-kpi-grid {
    grid-template-columns: 1fr;
  }

  .liofo-budget-modal__footer {
    justify-content: flex-end;
  }

  .liofo-budget-modals-root .liofo-budget-modal__footer .liofo-budget-modal__cancel,
  .liofo-budget-modals-root .liofo-budget-modal__footer .liofo-budget-submit-btn {
    flex: 0 0 auto;
  }

  .liofo-budget-modals-root .liofo-budget-modal__footer .liofo-budget-submit-btn {
    max-width: min(11rem, 100%);
  }

  .liofo-budget-page .chart-period-btn.wallet-page-primary-cta.liofo-budget-inline-action {
    width: 100%;
  }
}

/* budget-target-payment-entries-history-2026-06-01-04 */
.liofo-budget-target-entries {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.liofo-budget-target-entries__title {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.85;
}

.liofo-budget-target-entries__empty,
.liofo-budget-target-entries__count {
  margin: 0;
  font-size: 0.82rem;
  opacity: 0.75;
}

.liofo-budget-target-entries__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.liofo-budget-target-entries__row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.88rem;
}

.liofo-budget-target-entries__main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.liofo-budget-target-entries__date {
  opacity: 0.9;
}

.liofo-budget-target-entries__amount {
  font-weight: 600;
  white-space: nowrap;
}

.liofo-budget-target-entries__note {
  font-size: 0.8rem;
  opacity: 0.8;
  line-height: 1.3;
}

.liofo-budget-target-entries__count {
  margin-top: 0.35rem;
}

/* budget-target-month-year-selection-2026-06-01-03 */
.liofo-budget-target-period-row {
  display: grid;
  grid-template-columns: 1fr minmax(6.5rem, 7.5rem);
  gap: 0.75rem;
  align-items: end;
}

@media (max-width: 480px) {
  .liofo-budget-target-period-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   BK.1 (2026-07-05) + BK.2 UI (2026-07-07) — Accordéon "Mes banques"
   ------------------------------------------------------------
   Les classes restent locales, mais le rendu reprend volontairement la
   grammaire visuelle des `wallet-btn` de Mes Wallets.
   ============================================================ */

.liofo-budget-banks-line {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.25rem 0.25rem;
}

.liofo-budget-banks-line-nav {
  flex: 0 0 auto;
  align-self: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.6);
  color: rgba(226, 232, 240, 0.92);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.liofo-budget-banks-line-nav:hover,
.liofo-budget-banks-line-nav:focus-visible {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(148, 163, 184, 0.7);
  outline: none;
}

.liofo-budget-banks-list {
  flex: 1 1 auto;
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0.25rem 0.25rem 0.75rem;
  margin: 0;
  list-style: none;
  scrollbar-width: thin;
}

.liofo-budget-bank-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  --wallet-accent: #3DB2FF;
  width: clamp(18rem, 32vw, 27.5rem);
}

/* 2026-07-08 (v2) : cartes banques calées sur le rendu wallets de Mes Wallets :
   AUCUN encadré (fond/bordure/ombre transparents), séparation par une fine barre
   verticale entre cartes, pas de sparkline. `!important` + garde-fou ID pour
   battre le style bouton global d'OceanWP (hover/contour bleu). */
.liofo-budget-bank-btn,
.liofo-budget-bank-btn:hover,
.liofo-budget-bank-btn:focus,
.liofo-budget-bank-btn:focus-visible,
.liofo-budget-bank-btn:active,
.liofo-budget-bank-btn.is-active,
#liofo-budget-institutions-list .liofo-budget-bank-btn,
#liofo-budget-institutions-list .liofo-budget-bank-btn:hover,
#liofo-budget-institutions-list .liofo-budget-bank-btn:focus,
#liofo-budget-institutions-list .liofo-budget-bank-btn:focus-visible,
#liofo-budget-institutions-list .liofo-budget-bank-btn:active,
#liofo-budget-institutions-list .liofo-budget-bank-btn.is-active,
#liofo-budget-institutions-list .liofo-budget-bank-btn[aria-expanded="true"],
#liofo-budget-institutions-list .liofo-budget-bank-btn[aria-selected="true"] {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: rgba(226, 232, 240, 0.95) !important;
  outline: none !important;
}

/* CAUSE RÉELLE du fond bleu au survol (diag CDP 2026-07-08) : la règle GLOBALE
   `ul li:hover { background: rgb(51,136,255) }` de style-personnalise.css peint le
   `<li>` de la carte. Le bouton étant transparent, ce bleu du `<li>` traverse et
   remplit toute la carte. On neutralise le survol du `<li>` (et focus-within). */
#liofo-budget-institutions-list li:hover,
#liofo-budget-institutions-list .liofo-budget-bank-item:hover,
#liofo-budget-institutions-list .liofo-budget-bank-item:focus-within {
  background: transparent !important;
  background-color: transparent !important;
}

/* Ceinture + bretelles : sur les cartes banques, les blocs de texte ne doivent
   jamais recevoir de fond/contour/ombre au survol (aucun rectangle bleu interne).
   On préserve la pastille icône (`.wallet-icon`) qui garde son halo d'accent. */
#liofo-budget-institutions-list .liofo-budget-bank-btn:hover .wallet-btn-text,
#liofo-budget-institutions-list .liofo-budget-bank-btn:hover .wallet-btn-title,
#liofo-budget-institutions-list .liofo-budget-bank-btn:hover .wallet-btn-value,
#liofo-budget-institutions-list .liofo-budget-bank-btn:hover .wallet-btn-meta {
  background: transparent !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

.liofo-budget-bank-btn {
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0.35rem 0.9rem;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  isolation: isolate;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.liofo-budget-bank-btn:hover,
.liofo-budget-bank-btn:focus-visible {
  transform: translateY(-1px);
}

.liofo-budget-bank-btn.is-active {
  opacity: 1;
}

/* Fine barre verticale de séparation entre deux cartes (comme la ligne Mes Wallets). */
.liofo-budget-bank-item + .liofo-budget-bank-item {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.liofo-budget-bank-btn::before {
  content: none;
  display: none;
}

.liofo-budget-bank-btn::after {
  content: none;
  display: none;
}

.liofo-budget-bank-btn > :not(.liofo-wallet-particle-layer) {
  position: relative;
  z-index: 5;
}

.liofo-budget-bank-btn .wallet-icon {
  flex: 0 0 auto;
  width: 52px;
  min-width: 52px;
  height: 52px;
  max-height: 52px;
  aspect-ratio: 1;
  align-self: center;
  background: transparent;
  box-shadow: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.liofo-budget-bank-btn .wallet-icon::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 2px solid var(--wallet-accent, #3DB2FF);
  box-shadow:
    0 0 16px color-mix(in srgb, var(--wallet-accent, #3DB2FF) 52%, transparent),
    inset 0 0 20px color-mix(in srgb, var(--wallet-accent, #3DB2FF) 36%, transparent);
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--wallet-accent, #3DB2FF) 22%, transparent) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.liofo-budget-bank-btn .wallet-icon-letter {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: clamp(16px, 2.1vw, 22px);
  line-height: 1;
  color: var(--wallet-accent, #3DB2FF);
  text-shadow: 0 0 12px color-mix(in srgb, var(--wallet-accent, #3DB2FF) 70%, transparent);
}

.liofo-budget-bank-btn .wallet-btn-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.22rem;
  min-width: 0;
  flex: 1 1 auto;
}

.liofo-budget-bank-btn .wallet-btn-title {
  display: block;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--wallet-accent, #3DB2FF);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.liofo-budget-bank-btn .wallet-btn-value {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 600;
  color: #00BF63;
  -webkit-text-fill-color: #00BF63;
  background: none;
  background-image: none;
}

.liofo-budget-bank-btn .wallet-btn-meta {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  line-height: 1.2;
  color: rgba(215, 228, 255, 0.82);
}

/* Détail (tableau des comptes) sous la ligne horizontale */
.liofo-budget-institution-details-host {
  margin-top: 0.75rem;
}

.liofo-budget-institution-details {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding-top: 0.75rem;
}

.liofo-budget-institution-details__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.liofo-budget-institution-details__title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  --wallet-accent: #3DB2FF;
}

.liofo-budget-institution-details__title-row .liofo-budget-institution-details__logo {
  width: 2.1rem;
  min-width: 2.1rem;
  max-height: 2.1rem;
}

.liofo-budget-institution-details__title-row .liofo-budget-institution-details__logo .wallet-icon-letter {
  font-size: 0.95rem;
}

.liofo-budget-institution-details__title {
  font-size: 1.05rem;
  margin: 0;
  color: rgba(241, 245, 249, 0.98);
}

/* BK.1 QA (2026-07-05) : bouton "+ Ajouter un compte" dans le head banque. */
.liofo-budget-institution-details__add-account {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.5);
  background: rgba(37, 99, 235, 0.15);
  color: rgba(226, 232, 240, 0.98);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.liofo-budget-institution-details__add-account:hover,
.liofo-budget-institution-details__add-account:focus-visible {
  background: rgba(37, 99, 235, 0.3);
  border-color: rgba(96, 165, 250, 0.8);
  outline: none;
}

.liofo-budget-institution-details__stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: rgba(203, 213, 225, 0.9);
}

.liofo-budget-institution-details__stat em {
  font-style: normal;
  color: rgba(148, 163, 184, 0.85);
  margin-right: 0.25rem;
}

.liofo-budget-institution-details__hint {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.85);
  font-style: italic;
}

/* BK.1 QA6 (2026-07-05) : les tableaux "Mes banques" réutilisent désormais les
   classes partagées `table-style liofo-cp-table` dans un conteneur
   `wallet-assets-table-container` — exactement comme le tableau "Actifs" de
   /mes-wallets. Tout le rendu visuel (en-tête bleu #3DB2FF, lignes alternées
   #0A1120 / #060503, survol violet #5650c9, cellules centrées, radius 15px) est
   donc HÉRITÉ du thème (`style-personnalise.css`), sans aucun override couleur
   ici. On ne conserve que la mise en page spécifique budget. */
.liofo-budget-institution-accounts-table-wrap {
  margin-top: 0.5rem;
}

.liofo-budget-institution-accounts-table-wrap .tableau-defilable-container,
.liofo-budget-institution-accounts-table-wrap .tableau-defilable {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
}

.liofo-budget-institution-accounts-table {
  width: 100% !important;
  min-width: 1080px;
  max-width: none !important;
  margin: 0 !important;
  table-layout: auto;
}

.liofo-budget-institution-accounts-table thead th {
  background: transparent !important;
  color: var(--liofo-bd-muted) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.liofo-budget-institution-accounts-table td {
  white-space: nowrap;
}

.liofo-budget-institution-accounts-table__row {
  cursor: pointer;
}

.liofo-budget-institution-accounts-table__name {
  min-width: 14rem;
  text-align: left !important;
  font-weight: 600;
}

/* 2026-07-08 : "Type de compte" = libellé principal (remplace l'ancien "Compte"). */
.liofo-budget-institution-accounts-table__col-type,
.liofo-budget-institution-accounts-table__type {
  min-width: 12rem;
  text-align: left !important;
  font-weight: 600;
}

/* 2026-07-08 : "Commentaires" (ancien nom du compte) = colonne discrète en fin. */
.liofo-budget-institution-accounts-table__col-comment,
.liofo-budget-institution-accounts-table__comment {
  min-width: 10rem;
  text-align: left !important;
  color: rgba(203, 213, 225, 0.78);
  font-weight: 400;
}

.liofo-budget-institution-accounts-table__money {
  min-width: 7.5rem;
}

.liofo-budget-institution-accounts-table__status {
  min-width: 11rem;
}

.liofo-budget-institution-accounts-table__status .liofo-budget-list-card__badge {
  max-width: none;
  white-space: nowrap;
}

/* BK.1 QA (2026-07-05) : colonne Actions dans le tableau accordéon (crayon édition). */
.liofo-budget-institution-accounts-table__actions-th,
.liofo-budget-institution-accounts-table__actions {
  text-align: center !important;
  width: 3.5rem;
  padding: 0.35rem 0.5rem !important;
}

.liofo-budget-account-edit-btn {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: rgba(241, 245, 249, 0.98);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.liofo-budget-account-edit-btn:hover,
.liofo-budget-account-edit-btn:focus-visible {
  background: rgba(96, 165, 250, 0.15);
  border-color: rgba(96, 165, 250, 0.6);
  outline: none;
}

/* Popup "Transactions du compte" */
.liofo-budget-modal--wide .liofo-budget-modal__dialog {
  max-width: 900px;
  width: 100%;
}

/* BK.1 QA4 (2026-07-05) — CAUSE RACINE du "tbody flou" enfin identifiée :
   la popup utilise le pattern `.liofo-mh-modal` dont le fond
   `.liofo-mh-modal__backdrop` porte `backdrop-filter: blur(5px)` + `position:
   absolute`. Or mon conteneur `.liofo-mh-modal__dialog` (contrairement au
   `.liofo-mh-modal__panel` stylé par dashboard-widgets.css) n'avait NI
   `position` NI `z-index`. Conséquence CSS : le fond flou (élément positionné)
   se peint AU-DESSUS du corps de tableau (statique), tandis que le `thead`
   `position: sticky` (positionné + z-index) échappe au voile → thead net,
   tbody flou. Double correctif : (1) je hisse tout le dialog au-dessus du
   backdrop via `position: relative; z-index: 2` ; (2) je neutralise le
   `backdrop-filter` sur le fond de CETTE popup (le flou n'apporte rien ici et
   était l'unique source du rendu fantomatique). */
#liofo-budget-modal-account-transactions .liofo-mh-modal__dialog,
#liofo-budget-modal-account-transactions .liofo-budget-modal__dialog {
  position: relative !important;
  z-index: 2 !important;
}

/* 2026-07-08 (retour Thomas) : la popup compte devient un vrai CADRE (comme les
   autres cadres du site) — titre à l'intérieur (barre verticale via règle
   `.liofo-budget-modal .liofo-mh-modal__title::before`). Hauteur VERROUILLÉE +
   défilement vertical du corps quand il y a plus de transactions que la hauteur
   d'écran (sinon les dernières lignes étaient tronquées). */
#liofo-budget-modal-account-transactions .liofo-mh-modal__dialog {
  display: flex !important;
  flex-direction: column;
  max-height: min(85vh, 900px);
  background: rgba(13, 17, 24, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: 1.05rem 1.25rem 1rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

#liofo-budget-modal-account-transactions .liofo-mh-modal__header {
  flex: 0 0 auto;
  border: 0 !important;
}

#liofo-budget-modal-account-transactions .liofo-mh-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.35rem;
}

#liofo-budget-modal-account-transactions .liofo-mh-modal__footer {
  flex: 0 0 auto;
  border: 0 !important;
}

/* 2026-07-08 (retour Thomas) : on RÉTABLIT le flou du fond derrière la popup
   compte. Le "tbody flou" d'avant venait uniquement du dialog non positionné —
   désormais corrigé par le hoist ci-dessus (`position: relative; z-index: 2`),
   donc le flou ne s'applique qu'à la page en arrière-plan, pas au tableau. */
#liofo-budget-modal-account-transactions .liofo-mh-modal__backdrop {
  backdrop-filter: blur(8px) saturate(1.05) !important;
  -webkit-backdrop-filter: blur(8px) saturate(1.05) !important;
}

/* Le thead sticky n'a plus besoin de créer une couche distincte une fois le
   dialog hissé — on le laisse sticky mais dans le même plan que le tbody. */
#liofo-budget-modal-account-transactions .liofo-budget-account-transactions__table thead th {
  z-index: 1 !important;
}

.liofo-budget-account-transactions__meta {
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.9);
  margin-bottom: 0.75rem;
}

.liofo-budget-transaction-list--account {
  margin-top: 0.25rem;
}

.liofo-budget-transaction--readonly .liofo-budget-list-card__actions {
  display: none;
}

.liofo-budget-account-transactions__empty {
  padding: 1rem;
  text-align: center;
  color: rgba(148, 163, 184, 0.9);
  font-style: italic;
}

@media (max-width: 640px) {
  .liofo-budget-bank-btn {
    padding: 0.8rem 0.85rem;
  }
  .liofo-budget-bank-item {
    width: min(88vw, 21rem);
  }
  .liofo-budget-transaction {
    max-width: 88%;
  }
  .liofo-budget-transactions .liofo-budget-transaction--inflow,
  .liofo-budget-transactions .liofo-budget-transaction--outflow {
    margin-left: 0;
    margin-right: 0;
  }
  .liofo-budget-institution-details__head {
    flex-direction: column;
    gap: 0.5rem;
  }
}

