/* Structure générale */
.budget-category {
  margin-bottom: 3rem;
}

.category-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #1f2933;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
}

.budget-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.budget-table thead {
  background: #f4f6f8;
}

.budget-table th {
  padding: 0.75rem;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.budget-table td {
  padding: 0.7rem;
  font-size: 0.9rem;
  border: 1px solid #f1f5f9;
  text-align: left;
}

/* Colonnes */
.col-amount,
.cell-amount {
  text-align: right;
  white-space: nowrap;
}

.col-share,
.cell-share {
  text-align: center;
  color: #475569;
}

.cell-label {
  font-weight: 500;
}

.cell-subcat {
  color: #64748b;
}

/* Lignes */
.budget-line:hover {
  background: #f8fafc;
}

/* Totaux */
.category-total {
  background: #f1f5f9;
  font-weight: 600;
}

.category-total td {
  border-top: 2px solid #e2e8f0;
}

.cell-amount.total {
  color: #0f172a;
}

/* États */
.muted {
  color: #94a3b8;
}

/* Responsive */
.budget-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
}

.budget-mobile { display: none; }
.budget-desktop { display: block; }

@media (max-width: 700px) {
  .budget-desktop { display: none; }
  .budget-mobile  { display: block; }

  .budget-container {
    padding: 1rem 0.5rem;
  }

  .budget-mobile-category {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2933;
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 8px;
    margin: 16px 0 6px;
  }

  .budget-mobile-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }

  .budget-mobile-label {
    font-weight: 600;
    font-size: 0.92rem;
    color: #1b3a4d;
    margin-bottom: 2px;
  }

  .budget-mobile-subcat {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 6px;
  }

  .budget-mobile-amounts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: baseline;
  }

  .budget-mobile-total {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
  }

  .budget-mobile-total small {
    font-weight: 400;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-left: 2px;
  }

  .budget-mobile-person {
    font-size: 0.8rem;
    color: #475569;
  }

  .budget-mobile-total-row {
    display: flex;
    justify-content: space-between;
    background: #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
    gap: 6px;
    flex-wrap: wrap;
  }

  .budget-mobile-global-total {
    background: #0f172a;
    color: #fff;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 12px;
  }

  .budget-mobile-global-label {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .budget-mobile-global-amounts {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.88rem;
  }

  .budget-mobile-global-amounts small {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-left: 2px;
  }
}

@media (min-width: 701px) {
  .col-hide-desktop { display: none; }
}


/* Filters */

.budget-filters {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.25rem;
}

.filter-group select {
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 0.9rem;
  background: #fff;
}

.filter-group select:focus {
  outline: none;
  border-color: #6366f1;
}

.btn-filter {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  background: #6366f1;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-filter:hover {
  background: #4f46e5;
}

.budget-summary {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid #e5e7eb;
}

.summary-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #0f172a;
}

.summary-table {
  width: 100%;
  max-width: 700px;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.summary-table thead {
  background: #f1f5f9;
}

.summary-table th,
.summary-table td {
  padding: 0.8rem;
  font-size: 0.95rem;
  border-bottom: 1px solid #e5e7eb;
}

.summary-label {
  font-weight: 600;
}

.summary-table .cell-amount {
  text-align: right;
  font-weight: 600;
  color: #0f172a;
}




















.budget-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.budget-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.budget-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.budget-table th {
  text-align: left;
  padding: 0.75rem;
  background: #f8fafc;
  border-bottom: 2px solid #cbd5e1;
}

.budget-table td {
  padding: 0.6rem 0.75rem;
}

.row-category td {
  background: #f1f5f9;
  font-weight: 700;
  border-top: 2px solid #cbd5e1;
}

.row-line td {
  border-bottom: 1px solid #e5e7eb;
}

.row-line:hover td {
  background: #f8fafc;
}

.row-category-total td {
  background: #e5e7eb;
  font-weight: 600;
  border-top: 2px solid #94a3b8;
}

.row-global-total td {
  background: #0f172a;
  color: white;
  font-weight: 700;
  border-top: 3px solid #020617;
}

.cell-amount {
  text-align: right;
  white-space: nowrap;
}

.cell-share {
  text-align: center;
  color: #475569;
}
