/**
 * Objectifs du mois — tuiles compactes (bo-ui22-20260721).
 * Fichier dédié (même stratégie que liofo-budget-creance.css) pour garantir
 * le chargement des styles ciblés sans conflit / cache partiel sur liofo-budget.css.
 */

/* —— Cadres objectifs : largeur max ~680px —— */
.liofo-budget-page .liofo-budget-targets #liofo-budget-target-list,
.liofo-budget-page #liofo-budget-target-list {
  max-width: 680px !important;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.liofo-budget-page .liofo-budget-targets #liofo-budget-target-list > .liofo-budget-list-card--target,
.liofo-budget-page #liofo-budget-target-list > .liofo-budget-list-card--target,
.liofo-budget-page #liofo-budget-target-list .liofo-budget-list-card--target {
  max-width: 680px !important;
  width: 100% !important;
  box-sizing: border-box;
}

/* —— Barre de progression : gabarit identique à .liofo-budget-table__progress (overview) —— */
.liofo-budget-page #liofo-budget-target-list .liofo-budget-target-card__progress.liofo-budget-table__progress {
  min-width: 8.5rem;
  max-width: 12rem;
  width: 100%;
  margin: 0.35rem 0 0.45rem;
}

.liofo-budget-page #liofo-budget-target-list .liofo-budget-target-card__progress .liofo-budget-progress--target-card,
.liofo-budget-page #liofo-budget-target-list .liofo-budget-target-card__progress .liofo-budget-progress {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.35rem !important;
  margin: 0 !important;
  max-width: none;
  width: 100%;
  min-width: 0;
}

.liofo-budget-page #liofo-budget-target-list .liofo-budget-target-card__progress .liofo-budget-progress__track {
  width: 100% !important;
  flex: 1 1 auto !important;
  max-width: none !important;
  min-width: 0 !important;
}

.liofo-budget-page #liofo-budget-target-list .liofo-budget-target-card__progress .liofo-budget-progress__label {
  flex: none;
  min-width: 0;
}

.liofo-budget-page #liofo-budget-target-list .liofo-budget-list-card--target {
  padding: 0.72rem 0.95rem !important;
}

/* —— Commentaires + actions : sans barre horizontale, tuile plus compacte —— */
.liofo-budget-page .liofo-budget-list-card--target .liofo-budget-list-card__note {
  margin-bottom: 0 !important;
  margin-top: 0.15rem !important;
}

.liofo-budget-page .liofo-budget-list-card--target .liofo-budget-list-card__actions {
  margin-top: 0.3rem !important;
  padding-top: 0 !important;
  border-top: none !important;
  align-items: center;
}

.liofo-budget-page .liofo-budget-list-card--target .liofo-budget-list-card__actions .liofo-budget-list-card__action--payment {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.42rem 0.9rem !important;
  font-size: 0.78rem !important;
  min-height: 2.15rem !important;
  line-height: 1.25 !important;
  box-sizing: border-box !important;
}

/* Ne pas réduire la barre du tableau « Dépenses du mois attendues » */
.liofo-budget-page .liofo-budget-overview-table .liofo-budget-progress__track {
  width: 100% !important;
  flex: 1 1 auto !important;
  max-width: none !important;
  min-width: 0 !important;
}

.liofo-budget-page .liofo-budget-overview-table .liofo-budget-progress {
  flex-direction: column !important;
  align-items: stretch !important;
}

/* —— Destination + métriques sur une ligne —— */
.liofo-budget-page .liofo-budget-target-card__dest-row {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 0.5rem 0.85rem !important;
  flex-wrap: wrap !important;
  margin-top: 0.1rem !important;
  width: 100%;
}

.liofo-budget-page .liofo-budget-target-card__destination {
  font-size: 0.84rem;
  color: rgba(226, 232, 240, 0.88);
  min-width: 0;
  flex: 1 1 9rem;
  line-height: 1.35;
}

.liofo-budget-page .liofo-budget-target-card__metrics-inline.liofo-budget-list-card__metrics {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  justify-content: flex-end !important;
  gap: 0.45rem 1rem !important;
  margin: 0 !important;
  margin-left: auto !important;
  grid-template-columns: none !important;
  flex: 1 1 16rem;
  max-width: 100%;
}

.liofo-budget-page .liofo-budget-target-card__metrics-inline .liofo-budget-list-card__metric {
  flex: 0 1 auto !important;
  min-width: 5.25rem;
  text-align: right;
}

.liofo-budget-page .liofo-budget-target-card__metrics-inline .liofo-budget-list-card__metric dt,
.liofo-budget-page .liofo-budget-target-card__metrics-inline .liofo-budget-list-card__metric dd {
  text-align: right;
}

/* —— Versements déclarés : visible au survol —— */
.liofo-budget-page .liofo-budget-list-card--target .liofo-budget-target-entries {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, max-height 0.28s ease, margin-top 0.22s ease;
}

.liofo-budget-page .liofo-budget-list-card--target:hover .liofo-budget-target-entries,
.liofo-budget-page .liofo-budget-list-card--target:focus-within .liofo-budget-target-entries,
.liofo-budget-page .liofo-budget-list-card--target.liofo-budget-target-entries-open .liofo-budget-target-entries {
  opacity: 1;
  max-height: 28rem;
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: auto;
}

.liofo-budget-page .liofo-budget-target-entries__actions button {
  pointer-events: auto;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .liofo-budget-page .liofo-budget-list-card--target .liofo-budget-target-entries {
    transition: none;
  }
}

/* —— Tableau Versements déclarés : style Liofo lisible —— */
.liofo-budget-page .liofo-budget-target-entries__table-wrap {
  margin-top: 0.35rem;
}

.liofo-budget-page .liofo-budget-target-entries__table-wrap .table-style {
  min-width: 0 !important;
  width: 100% !important;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.liofo-budget-page .liofo-budget-target-entries__table-wrap .table-style thead th {
  background: transparent !important;
  color: rgba(148, 163, 184, 0.95) !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 8px 22px rgba(255, 255, 255, 0.07);
  white-space: nowrap;
}

.liofo-budget-page .liofo-budget-target-entries__table-wrap .table-style tbody td {
  font-size: 0.8rem !important;
  padding: 0.55rem 0.65rem !important;
  color: rgba(255, 255, 255, 0.94) !important;
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-left: none !important;
  border-right: none !important;
}

.liofo-budget-page .liofo-budget-target-entries__table-wrap .table-style tbody tr {
  background: transparent !important;
}

.liofo-budget-page .liofo-budget-target-entries__amount {
  color: rgba(255, 255, 255, 0.96) !important;
}

.liofo-budget-page .liofo-budget-target-entries__actions {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.liofo-budget-page .liofo-budget-target-entries__actions .liofo-budget-account-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}

.liofo-budget-page .liofo-budget-target-entries__actions .liofo-budget-account-edit-btn:hover,
.liofo-budget-page .liofo-budget-target-entries__actions .liofo-budget-account-edit-btn:focus-visible {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
  outline: none;
}

.liofo-budget-page .liofo-budget-target-entries__actions .liofo-tx-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 8px;
}

.liofo-budget-page .liofo-budget-target-entries__title {
  margin: 0 0 0.35rem;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
}
