﻿body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 90px;
}

/* ── HEADER ── */
.header {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange2) 45%, var(--yellow) 100%);
  padding: 48px 20px 70px;
  position: relative; overflow: hidden;
}
.header::before {
  content:''; position:absolute; top:-60px; right:-60px;
  width:220px; height:220px; background:rgba(255,255,255,0.10); border-radius:50%;
}
.header::after {
  content:''; position:absolute; bottom:-40px; left:-30px;
  width:160px; height:160px; background:rgba(255,255,255,0.07); border-radius:50%;
}
.header-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:28px; position:relative; z-index:1; }
.app-name { font-family:var(--font-display); font-size:22px; font-weight:900; color:white; letter-spacing:-0.5px; }
.month-btn { background:rgba(255,255,255,0.22); border:none; cursor:pointer; color:white; font-family:var(--font-body); font-size:14px; font-weight:500; padding:7px 14px; border-radius:20px; backdrop-filter:blur(8px); display:flex; align-items:center; gap:5px; }
.balance-section { position:relative; z-index:1; }
.balance-label { color:rgba(255,255,255,0.8); font-size:13px; font-weight:500; text-transform:uppercase; letter-spacing:1px; margin-bottom:6px; }
.balance-amount { font-family:var(--font-display); font-size:44px; font-weight:900; color:white; letter-spacing:-1px; line-height:1; margin-bottom:18px; }
.balance-chips { display:flex; gap:10px; }
.chip { background:rgba(255,255,255,0.20); backdrop-filter:blur(8px); border-radius:14px; padding:8px 14px; display:flex; align-items:center; gap:7px; }
.chip-dot { width:8px; height:8px; border-radius:50%; }
.chip-dot.green { background:#4ade80; }
.chip-dot.red { background:#fca5a5; }
.chip-label { color:rgba(255,255,255,0.8); font-size:12px; }
.chip-value { color:white; font-weight:700; font-size:13px; }

/* ── NAV TABS ── */
.nav-tabs-wrap { display:flex; align-items:center; gap:8px; margin:-30px 16px 0; position:relative; z-index:10; }
.nav-tabs { display:flex; flex:1; background:var(--white); border-radius:var(--radius); padding:6px; box-shadow:var(--shadow); gap:4px; }
.nav-tab { flex:1; border:none; cursor:pointer; background:transparent; font-family:var(--font-body); font-size:12px; font-weight:600; color:var(--muted); padding:9px 4px; border-radius:12px; transition:all 0.25s; display:flex; flex-direction:column; align-items:center; gap:3px; }
.nav-tab .tab-icon { font-size:18px; }
.nav-tab.active { background:linear-gradient(135deg,var(--orange),var(--orange2)); color:white; box-shadow:0 4px 12px rgba(255,107,44,0.40); }
/* .fab-btn = alias visuel de .nav-add-btn (le bouton "+" intégré dans la nav) */
.nav-add-btn, .fab-btn { width:40px; height:40px; border-radius:50%; background:linear-gradient(135deg,#FF6B2C,#FFD93D); color:white; font-size:24px; font-weight:300; border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; box-shadow:0 3px 10px rgba(255,107,44,0.40); transition:all 0.2s; line-height:1; }
.nav-add-btn:hover, .fab-btn:hover { transform:scale(1.1); box-shadow:0 5px 16px rgba(255,107,44,0.50); }
.nav-add-btn:active, .fab-btn:active { transform:scale(0.92); }
/* ── SECTIONS ── */
.section { padding:22px 16px 0; }
.section-top { margin-top:20px; }
.section-flush { margin-top:0; padding-top:0; }
.section-recap-body { padding-bottom:130px; }
.section-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.section-title { font-family:var(--font-display); font-size:18px; font-weight:800; color:var(--text); }
.see-all { font-size:13px; font-weight:600; color:var(--orange); cursor:pointer; background:none; border:none; }
.see-all-link { text-decoration:none; }
.notif-planif { padding:0 16px 8px; }
.widget-prochain-wrap { padding:0 16px 8px; }
.card-mt { margin-top:16px; }
.tx-filter-pills { display:flex; gap:8px; margin-bottom:16px; overflow-x:auto; scrollbar-width:none; }
.tx-filter-pills::-webkit-scrollbar { display:none; }

/* ── CARDS ── */
.card { background:var(--white); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow-card); margin-bottom:12px; }
.nav-tab-link { text-decoration:none; }
.nav-item-link { text-decoration:none; color:var(--muted); }
.nav-item-link:hover { color:var(--orange); }
.nav-item-badge-wrap { position:relative; }

/* ── MINI CARDS ── */
.budget-overview { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:12px; }
.mini-card { background:var(--white); border-radius:var(--radius-sm); padding:16px; box-shadow:var(--shadow-card); }
.mini-card-label { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:0.8px; color:var(--muted); margin-bottom:6px; }
.mini-card-value { font-family:var(--font-display); font-size:22px; font-weight:900; }
.mini-card-value.income { color:var(--green); }
.mini-card-value.expense { color:var(--orange); }
.mini-card-sub { font-size:11px; color:var(--muted); margin-top:3px; }

/* ── PROGRESS ── */
.progress-wrap { margin-bottom:6px; }
.progress-info { display:flex; justify-content:space-between; margin-bottom:7px; }
.progress-name { font-size:13px; font-weight:600; }
.progress-name-bold { font-weight:700; }
.progress-pct { font-size:13px; font-weight:700; }
.progress-pct-orange { color:var(--orange); }
.progress-fill-budget { background:linear-gradient(90deg,var(--orange),var(--yellow)); }
.progress-bar { height:10px; background:var(--bg); border-radius:10px; overflow:hidden; margin-bottom:4px; }
.progress-fill { height:100%; border-radius:10px; transition:width 0.6s cubic-bezier(.34,1.56,.64,1); }
.progress-amounts { font-size:11px; color:var(--muted); }

/* ── TRANSACTIONS ── */
.tx-item { display:flex; align-items:center; gap:14px; padding:12px 0; border-bottom:1px solid var(--border); }
.tx-item:last-child { border-bottom:none; }
.tx-icon { width:44px; height:44px; border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; }
.tx-info { flex:1; min-width:0; }
.tx-name { font-size:14px; font-weight:600; margin-bottom:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tx-date { font-size:12px; color:var(--muted); }
.tx-right { display:flex; flex-direction:column; align-items:flex-end; gap:4px; flex-shrink:0; }
.tx-amount { font-family:var(--font-display); font-size:16px; font-weight:800; }
.tx-amount.plus { color:var(--green); }
.tx-amount.minus { color:var(--orange); }
.tx-actions { display:flex; gap:4px; }
.tx-btn-edit, .tx-btn-delete { background:none; border:none; cursor:pointer; font-size:13px; padding:3px 5px; border-radius:6px; transition:background 0.15s; line-height:1; }
.tx-btn-edit:hover  { background:#FFF0E8; }
.tx-btn-delete:hover { background:#FEE2E2; }
/* .badge-pending → désormais dans styles/global.css */

/* ── BOUTON AJOUTER ONGLET ── */
.btn-ajouter-onglet { width:100%; padding:12px; background:white; border:2px dashed #FFD93D; border-radius:12px; color:#FF6B2C; font-family:var(--font-body); font-weight:800; font-size:14px; cursor:pointer; margin-bottom:12px; display:flex; align-items:center; justify-content:center; gap:8px; transition:all 0.2s; }
.btn-ajouter-onglet:hover { background:#FFF8EC; border-color:#FF6B2C; border-style:solid; }

/* ── CHARTS ── */
.chart-wrap { background:var(--white); border-radius:var(--radius); padding:20px; box-shadow:var(--shadow-card); margin-bottom:12px; }
.chart-title { font-family:var(--font-display); font-size:15px; font-weight:800; margin-bottom:16px; }
canvas { width:100% !important; display:block; }
.pie-legend { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.legend-item { display:flex; align-items:center; gap:6px; font-size:12px; font-weight:500; }
.legend-dot { width:10px; height:10px; border-radius:3px; flex-shrink:0; }

/* ── GOALS ── */
.goal-card { background:var(--white); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow-card); margin-bottom:12px; }
.goal-header { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.goal-icon-wrap { width:48px; height:48px; border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:24px; background:var(--surface2); }
.goal-name { font-family:var(--font-display); font-size:16px; font-weight:800; }
.goal-deadline { font-size:12px; color:var(--muted); margin-top:1px; }
.goal-amounts { display:flex; justify-content:space-between; margin-bottom:10px; }
.goal-saved { font-size:20px; font-weight:800; font-family:var(--font-display); }
.goal-target { font-size:13px; color:var(--muted); align-self:flex-end; }
.goal-bar-wrap { height:12px; background:var(--bg); border-radius:10px; overflow:hidden; }
.goal-bar-fill { height:100%; border-radius:10px; transition:width 0.8s cubic-bezier(.34,1.56,.64,1); }
.goal-pct { font-size:12px; font-weight:700; margin-top:6px; }

/* ── BADGE GAMIFICATION ── */
.badges-scroll { display:flex; gap:10px; overflow-x:auto; scrollbar-width:none; margin:0 -16px; padding:0 16px 8px; }
.badges-scroll::-webkit-scrollbar { display:none; }
.badge-card { flex-shrink:0; background:var(--white); border-radius:var(--radius-sm); padding:14px; text-align:center; box-shadow:var(--shadow-card); min-width:90px; }
.badge-emoji { font-size:28px; margin-bottom:6px; }
.badge-name { font-size:11px; font-weight:700; color:var(--text); }
.badge-card.locked { opacity:0.4; filter:grayscale(1); }

/* ── SCORE SANTE ── */
.health-card { background:linear-gradient(135deg,var(--orange),var(--yellow)); border-radius:var(--radius); padding:22px; box-shadow:var(--shadow); margin-bottom:12px; display:flex; align-items:center; gap:16px; }
.health-score { font-family:var(--font-display); font-size:52px; font-weight:900; color:white; line-height:1; }
.health-info-title { font-family:var(--font-display); font-size:16px; font-weight:800; color:white; margin-bottom:4px; }
.health-info-sub { font-size:12px; color:rgba(255,255,255,0.85); line-height:1.4; }

/* ── FAB ── */

/* ── BOTTOM NAV ── */
.bottom-nav { position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:480px; background:var(--white); border-top:1px solid var(--border); display:flex; padding:10px 0 16px; z-index:50; box-shadow:0 -4px 20px rgba(0,0,0,0.06); }
.nav-item { flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; cursor:pointer; border:none; background:none; font-family:var(--font-body); font-size:10px; font-weight:600; color:var(--muted); transition:color 0.2s; padding:0; }
.nav-item .nav-icon { font-size:22px; }
.nav-item.active { color:var(--orange); }

/* ── MODAL ── */
.modal-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.45); z-index:200; align-items:flex-end; justify-content:center; }
.modal-overlay.open { display:flex; }
.modal { background:var(--white); border-radius:28px 28px 0 0; padding:24px 20px 40px; width:100%; max-width:480px; animation:slideUp 0.35s cubic-bezier(.34,1.56,.64,1); }
@keyframes slideUp { from{transform:translateY(100%);opacity:0;} to{transform:translateY(0);opacity:1;} }
.modal-handle { width:40px; height:4px; background:var(--border); border-radius:4px; margin:0 auto 20px; flex-shrink:0; }

/* ── ADD SHEET (bottom sheet scrollable) ── */
/* L'overlay addSheetOverlay est juste un backdrop — le sheet se positionne lui-même */
#addSheetOverlay.open { display: block; }

#addSheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 100%);
  padding: 0;
  max-height: 90vh;
  min-height: 200px;
  overflow: hidden;
  display: none;
  flex-direction: column;
  background: var(--white);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.18);
  z-index: 201;
  -webkit-overflow-scrolling: touch;
}
#addSheet.open { display: flex; animation: slideUp 0.35s cubic-bezier(.34,1.56,.64,1); }
#addSheet .modal-handle { margin: 12px auto 8px; flex-shrink: 0; }
#addSheet .modal-header-row {
  padding: 0 20px 12px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
  border-bottom: 1px solid #FFE4B5;
}
.add-sheet-body {
  padding: 16px 20px 8px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.add-sheet-body * { max-width: 100%; }
.add-sheet-footer {
  flex-shrink: 0;
  padding: 12px 20px 20px;
  border-top: 1px solid #FFE4B5;
  background: var(--white);
}
.add-sheet-footer .submit-btn { margin-top: 0; }
@supports (height: 100dvh) { #addSheet { max-height: 85dvh; } }
.modal-title { font-family:var(--font-display); font-size:20px; font-weight:900; margin-bottom:20px; text-align:center; }
.type-toggle { display:flex; gap:8px; margin-bottom:18px; }
.type-btn { flex:1; padding:10px; border:2px solid var(--border); border-radius:var(--radius-sm); background:none; cursor:pointer; font-family:var(--font-body); font-size:14px; font-weight:700; transition:all 0.2s; }
.type-btn.income.active { border-color:var(--green); background:var(--green-light); color:#16a34a; }
.type-btn.expense.active { border-color:var(--orange); background:#FFF0E8; color:#c2410c; }
.form-group { margin-bottom:14px; }
.form-label { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:0.8px; color:var(--muted); margin-bottom:6px; display:block; }
.form-input { width:100%; padding:12px 16px; border:2px solid var(--border); border-radius:var(--radius-sm); background:var(--surface2); font-family:var(--font-body); font-size:15px; color:var(--text); outline:none; transition:border-color 0.2s; }
.form-input:focus { border-color:var(--orange); }
.cat-select { display:flex; gap:8px; flex-wrap:wrap; }
.cat-pill { padding:6px 12px; border:2px solid var(--border); border-radius:20px; font-size:12px; font-weight:600; cursor:pointer; background:none; transition:all 0.2s; display:flex; align-items:center; gap:4px; }
.cat-pill.selected { border-color:var(--orange); background:#FFF0E8; color:var(--orange); }
.goal-icon-btn { font-size:18px; padding:6px 10px; }
.icon-picker { display:flex; gap:8px; flex-wrap:wrap; }
.submit-btn-link-empty { text-decoration:none; display:inline-block; margin-top:16px; }
.submit-btn { width:100%; padding:16px; background:linear-gradient(135deg,var(--orange),var(--yellow)); color:white; border:none; cursor:pointer; border-radius:var(--radius-sm); font-family:var(--font-display); font-size:16px; font-weight:800; margin-top:8px; box-shadow:0 6px 20px rgba(255,107,44,0.35); transition:transform 0.2s, box-shadow 0.2s; }
.submit-btn:hover  { transform:translateY(-2px); box-shadow:0 10px 28px rgba(255,107,44,0.45); }
.submit-btn:active { transform:scale(0.98); }
.submit-btn:disabled { opacity:0.6; cursor:not-allowed; transform:none; }

/* ── PAGES ── */
.page { display:none; }
.page.active { display:block; }

/* ── ANIMATIONS ── */
@keyframes fadeInUp { from{opacity:0;transform:translateY(16px);} to{opacity:1;transform:translateY(0);} }
.card,.mini-card,.chart-wrap,.goal-card,.health-card,.badge-card { animation:fadeInUp 0.4s ease both; }

a.nav-item {
  text-decoration: none;
  color: var(--muted);
}
a.nav-item:hover {
  color: var(--orange);
}

/* ── HEADER GREETING ── */
.header-greeting {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; position: relative; z-index: 1;
}
.greeting-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.greeting-text { font-family: var(--font-display); font-size: 15px; font-weight: 800; color: #fff; }
.greeting-plan-badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px;
  background: rgba(255,255,255,0.22); color: #fff;
  backdrop-filter: blur(8px); letter-spacing: 0.2px; white-space: nowrap;
}
.greeting-plan-badge.premium { background: var(--yellow); color: #1A1200; }
.logout-btn {
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.35);
  color: #fff; font-family: var(--font-body); font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 20px; cursor: pointer;
  backdrop-filter: blur(8px); transition: background 0.18s, transform 0.15s; white-space: nowrap;
}
.logout-btn:hover { background: rgba(255,255,255,0.30); transform: translateY(-1px); }
.logout-btn:active { transform: scale(0.97); }

/* ── MONTH SELECTOR ── */
.month-selector { position: relative; display: flex; align-items: center; gap: 4px; }
.month-nav-btn {
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.30);
  color: #fff; width: 28px; height: 28px; border-radius: 50%; font-size: 10px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s; flex-shrink: 0; padding: 0;
}
.month-nav-btn:hover:not(:disabled) { background: rgba(255,255,255,0.30); }
.month-nav-btn:disabled { opacity: 0.35; cursor: default; }
.month-label-btn {
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.30);
  color: #fff; font-family: var(--font-display); font-size: 13px; font-weight: 700;
  padding: 5px 13px; border-radius: 20px; cursor: pointer;
  backdrop-filter: blur(8px); transition: background 0.15s; white-space: nowrap;
}
.month-label-btn:hover { background: rgba(255,255,255,0.28); }
/* Mobile-first : pleine largeur sur petits écrans, ancré à droite ≥ 421px */
.month-dropdown {
  position: absolute; top: calc(100% + 10px);
  left: 0; right: 0;
  background: #fff; border-radius: 0 0 16px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18); min-width: unset;
  z-index: 1000; overflow: hidden; display: none;
}
.month-dropdown.open { display: block; animation: monthFadeIn 0.18s ease; }
@keyframes monthFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.month-dd-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; font-family: var(--font-body); font-size: 14px;
  font-weight: 500; color: #1A1200; cursor: pointer; gap: 8px; transition: background 0.12s;
}
.month-dd-item:hover { background: #FFF0E8; }
.month-dd-item.selected { background: #FFF0E8; font-weight: 700; color: #FF6B2C; }
.month-dd-item.empty { color: #b0a090; }
.month-current-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
  background: #FF6B2C; color: #fff; white-space: nowrap; flex-shrink: 0;
}
@media (min-width: 421px) {
  .month-dropdown { left: auto; right: 0; min-width: 210px; border-radius: 16px; }
}

/* ── RÉCAPITULATIF ── */
.recap-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 16px; }
.recap-sum-card {
  background: #fff; border-radius: 14px; padding: 14px 10px;
  text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.07); border: 2px solid #f0e8dc;
}
.recap-sum-income  { border-color: #22c55e; }
.recap-sum-expense { border-color: #FF6B2C; }
.recap-sum-label   { font-family: var(--font-body); font-size: 10px; color: #8A7050; margin-bottom: 6px; }
.recap-sum-value   { font-family: var(--font-display); font-size: 12px; font-weight: 800; color: #1A1200; }
.recap-filters {
  background: #fff; border-radius: 14px; padding: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.recap-type-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.recap-filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.recap-select {
  flex: 1; min-width: 140px; font-family: var(--font-body); font-size: 13px;
  padding: 7px 10px; border: 1.5px solid #f0e8dc; border-radius: 10px;
  background: var(--bg); color: #1A1200; cursor: pointer;
}
.recap-select:focus { outline: none; border-color: #FF6B2C; }
.recap-search {
  flex: 1; min-width: 120px; font-family: var(--font-body); font-size: 13px;
  padding: 7px 12px; border: 1.5px solid #f0e8dc; border-radius: 10px;
  background: var(--bg); color: #1A1200;
}
.recap-search:focus { outline: none; border-color: #FF6B2C; }
.recap-reset-btn {
  align-self: flex-start; font-family: var(--font-body); font-size: 12px;
  font-weight: 600; padding: 6px 14px; border: 1.5px solid #f0e8dc;
  border-radius: 10px; background: var(--bg); color: #8A7050; cursor: pointer;
}
.recap-reset-btn:hover { background: #FFF0E8; border-color: #FF6B2C; color: #FF6B2C; }
.recap-export-btn {
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  padding: 8px 18px; border: none; border-radius: 10px;
  background: linear-gradient(135deg,#FF6B2C,#FFD93D); color: #1A1200;
  cursor: pointer; box-shadow: 0 2px 8px rgba(255,107,44,0.25);
}
.recap-export-btn:hover { opacity: 0.88; }
/* Mobile-first : on cache la table sur petits écrans, on la réaffiche ≥ 601px */
.recap-table-wrap {
  display: none;
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07); margin-bottom: 8px; overflow-x: auto;
}
.recap-table { width: 100%; border-collapse: collapse; font-family: var(--font-body); font-size: 13px; }
.recap-table thead { position: sticky; top: 0; z-index: 10; background: linear-gradient(135deg,#FF6B2C,#FFD93D); }
.recap-table thead th {
  padding: 11px 14px; text-align: left;
  font-family: var(--font-display); font-size: 12px; font-weight: 800;
  color: #fff; white-space: nowrap;
}
.recap-row td, .recap-subtotal td { padding: 10px 14px; border-bottom: 1px solid #f5ece0; }
.recap-row:hover td { background: #FFF0E8 !important; cursor: default; }
.recap-row-alt td { background: #FFFBF5; }
.recap-week-sep td {
  padding: 7px 14px; font-family: var(--font-display); font-size: 11px;
  font-weight: 700; color: #FF6B2C; background: #FFF8F0;
  border-top: 2px solid #FFE0CC; border-bottom: 1px solid #FFE0CC; letter-spacing: 0.1px;
}
.recap-subtotal td  { background: #FFFBF5; font-weight: 700; font-size: 12px; border-top: 1px solid #f0e8dc; }
.recap-subtotal-label { color: #8A7050; text-align: right; }
.recap-td-date   { color: #8A7050; white-space: nowrap; min-width: 60px; }
.recap-td-desc   { font-weight: 600; color: #1A1200; }
.recap-td-cat, .recap-td-type { white-space: nowrap; }
.recap-td-amount { text-align: right; font-weight: 700; white-space: nowrap; }
.recap-td-edit  { text-align: center; width: 36px; padding: 0 4px; }
.recap-edit-btn {
  background: none; border: none; cursor: pointer;
  color: #DDD; font-size: 14px; padding: 2px;
  transition: color 0.2s;
}
.recap-edit-btn:hover { color: #FF6B2C; }
.recap-plus  { color: #22c55e; }
.recap-minus { color: #ef4444; }
.recap-cat-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 600;
}
.recap-badge { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.recap-badge-income  { background: #dcfce7; color: #15803d; }
.recap-badge-expense { background: #fff0e8; color: #FF6B2C; }
.recap-no-result { text-align: center; color: #8A7050; padding: 28px; font-style: italic; }
.recap-mobile-wrap { display: block; }
.recap-week-label {
  font-family: var(--font-display); font-size: 11px; font-weight: 700; color: #FF6B2C;
  padding: 10px 2px 6px; border-bottom: 2px solid #FFE0CC; margin-bottom: 8px; margin-top: 4px;
}
.recap-mobile-card {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-radius: 12px; padding: 12px 14px;
  margin-bottom: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.06); gap: 10px;
}
.recap-mc-left  { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.recap-mc-icon  { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.recap-mc-info  { min-width: 0; }
.recap-mc-desc  { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: #1A1200; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recap-mc-meta  { font-family: var(--font-body); font-size: 11px; color: #8A7050; margin-top: 2px; }
.recap-mc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.recap-mc-amount { font-family: var(--font-display); font-size: 15px; font-weight: 800; white-space: nowrap; }
.recap-footer {
  position: fixed; bottom: 64px; left: 0; right: 0;
  background: #fff; box-shadow: 0 -3px 14px rgba(0,0,0,0.10);
  display: none; align-items: center; padding: 10px 16px; z-index: 45;
}
.recap-footer.visible { display: flex; }
.recap-footer-item  { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.recap-footer-sep   { width: 1px; height: 30px; background: #f0e8dc; }
.recap-footer-label { font-family: var(--font-body); font-size: 10px; color: #8A7050; }
.recap-footer-val   { font-family: var(--font-display); font-size: 14px; font-weight: 800; }
.recap-empty        { text-align: center; padding: 40px 20px; }
.recap-empty-icon   { font-size: 52px; margin-bottom: 12px; }
.recap-empty-title  { font-family: var(--font-display); font-size: 17px; font-weight: 800; color: #1A1200; margin-bottom: 6px; }
.recap-empty-sub    { font-family: var(--font-body); font-size: 14px; color: #8A7050; }
/* Mobile-first : table classique ≥ 601px (à la place des cartes mobiles) */
@media (min-width: 601px) {
  .recap-table-wrap { display: block; }
  .recap-mobile-wrap { display: none; }
  .recap-sum-value { font-size: 14px; }
  .recap-sum-label { font-size: 11px; }
}

/* ── BUDGET INVITE CARD ── */
.budget-invite-card {
  border-radius: 18px;
  background: linear-gradient(135deg,#fff8f0 0%,#fff3e0 50%,#fffde7 100%);
  border: 2px solid #FFE4B5; padding: 18px;
  box-shadow: 0 4px 16px rgba(255,107,44,0.12);
  animation: fadeInBudget 0.35s ease;
}
.budget-invite-card.budget-invite-done {
  background: linear-gradient(135deg,#f0fdf4 0%,#dcfce7 100%);
  border-color: #86efac; box-shadow: 0 4px 16px rgba(34,197,94,0.12);
}
@keyframes fadeInBudget {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bi-badge-done {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 10px; background: #22c55e;
  color: #fff; margin-bottom: 10px;
}
.bi-header     { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.bi-icon       { font-size: 28px; flex-shrink: 0; margin-top: 2px; }
.bi-title      { font-family: var(--font-display); font-size: 16px; font-weight: 800; color: #1A1200; margin-bottom: 2px; }
.bi-sub        { font-family: var(--font-body); font-size: 11px; color: #8A7050; }
.bi-meta       { font-family: var(--font-body); font-size: 12px; color: #15803d; margin-bottom: 12px; font-weight: 600; }
.bi-desc       { font-family: var(--font-body); font-size: 13px; color: #5c4a2a; line-height: 1.5; margin-bottom: 14px; }
.bi-actions    { display: flex; gap: 10px; flex-wrap: wrap; }
.bi-btn {
  flex: 1; min-width: 100px; text-align: center; text-decoration: none;
  font-family: var(--font-display); font-size: 13px; font-weight: 800;
  padding: 10px 14px; border-radius: 12px; transition: opacity 0.15s, transform 0.12s;
}
.bi-btn:active { transform: scale(0.97); }
.bi-btn-primary   { background: linear-gradient(135deg,#FF6B2C,#FFD93D); color: #1A1200; box-shadow: 0 3px 10px rgba(255,107,44,0.30); }
.bi-btn-secondary { background: #fff; color: #FF6B2C; border: 2px solid #FFD093; }
.bi-btn:hover { opacity: 0.88; }

/* ── BUDGET TIP BAND ── */
.budget-tip-band {
  display: flex; align-items: center; gap: 10px;
  background: #FFF8F0; border: 1.5px solid #FFE4B5;
  border-radius: 12px; padding: 11px 14px; margin-top: 12px;
  animation: fadeInBudget 0.3s ease;
}
.btb-icon { font-size: 18px; flex-shrink: 0; }
.btb-text { flex: 1; font-family: var(--font-body); font-size: 12px; color: #5c4a2a; line-height: 1.5; }
.btb-link { font-family: var(--font-display); font-size: 12px; font-weight: 800; color: #FF6B2C; text-decoration: none; white-space: nowrap; }
.btb-link:hover { text-decoration: underline; }

/* ── BUDGET VS STATS ── */
.bvs-pct-head, .bvs-pct-row {
  display: grid;
  grid-template-columns: 1fr 52px 52px 28px;
  align-items: center;
  gap: 4px;
  padding: 7px 0;
}
.bvs-pct-head {
  font-size: 10px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 2px;
}
.bvs-pct-row { border-bottom: 1px solid #f5ece0; font-size: 13px; }
.bvs-pct-row:last-child { border-bottom: none; }
.bvs-pct-cat  { display: flex; align-items: center; gap: 5px; font-weight: 600; color: var(--text); overflow: hidden; }
.bvs-pct-cat span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bvs-pct-reel  { text-align: center; font-weight: 800; font-family: var(--font-display); }
.bvs-pct-ideal { text-align: center; color: var(--muted); font-weight: 600; }
.bvs-pct-indicator { text-align: center; font-size: 16px; }
.bvs-empty     { text-align: center; color: #8A7050; font-family: var(--font-body); font-size: 13px; padding: 12px 0; }
.bvs-config-link { color: #FF6B2C; text-decoration: none; font-weight: 700; }
.bvs-config-link:hover { text-decoration: underline; }

/* ── Succès — carte dashboard & badge nav ─────────────── */
.succes-dashboard-card {
  padding: 14px 16px;
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: transform 0.2s, box-shadow 0.2s;
}
.succes-dashboard-count { font-size:12px; color:var(--muted); }
.succes-dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.07);
}
.succes-dash-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.succes-dash-preview {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  min-height: 32px;
  align-items: center;
}
.succes-dash-emoji {
  font-size: 22px;
  line-height: 1;
}
.succes-dash-action {
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
  white-space: nowrap;
  flex-shrink: 0;
}
/* Badge rouge sur lien nav Succès (nouveaux badges) */
.succes-nav-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #e53935;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* ── Carte facture récurrente (dashboard + récap) ─────── */
.bill-recap-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.bill-recap-item:last-child { border-bottom: none; }

.bri-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.bri-info { flex: 1; min-width: 0; }
.bri-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bri-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.bri-right { text-align: right; flex-shrink: 0; }
.bri-amount { font-size: 14px; font-weight: 700; color: #ef4444; }
.bri-amount-rev { color: #15803d; }

/* ── Statut de paiement ───────────────────────────────── */
.bill-status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 3px;
}
.bill-status-badge.bill-paid    { background: #dcfce7; color: #16a34a; }
.bill-status-badge.bill-pending { background: #fef3c7; color: #d97706; }
.bill-status-badge.bill-late    { background: #fee2e2; color: #dc2626; }

/* Légère teinte de fond selon statut */
.bill-recap-item.bill-paid    { opacity: 0.75; }
.bill-recap-item.bill-late    { background: #fff5f5; border-radius: 8px; padding: 12px 8px; }

/* ── Bouton toggle payé/impayé ────────────────────────── */
.bill-toggle-btn {
  background: var(--border);
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
  color: var(--text);
}
.bill-toggle-btn:hover { background: var(--orange); color: #fff; }

/* ── Section factures dans le récap ──────────────────── */
.recap-bills-title {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  padding: 4px 0 12px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 4px;
  margin-top: 12px;
}
.recap-bills-title:first-child { margin-top: 0; }
.recap-bills-title-rev { color: #15803d; border-color: #86EFAC; }
.recap-plus-green { color: #15803d; }
.recap-bills-total {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
  padding: 10px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.recap-bills-total strong { color: #ef4444; }

/* ── PROJETS EN COURS (dashboard) ── */
.projet-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.projet-card:last-child { margin-bottom: 0; }
.pc-icon {
  width: 44px; height: 44px;
  background: #FEF9C3;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.pc-info { flex: 1; min-width: 0; }
.pc-name {
  font-size: 14px; font-weight: 700;
  color: var(--text); margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pc-deadline { font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.pc-bar-wrap {
  display: flex; align-items: center; gap: 8px;
}
.pc-bar {
  flex: 1; height: 6px;
  background: var(--border);
  border-radius: 3px; overflow: hidden;
}
.pc-bar-fill {
  height: 100%; border-radius: 3px;
  transition: width 0.4s ease;
}
.pc-pct { font-size: 11px; font-weight: 700; white-space: nowrap; }
.pc-amount { text-align: right; flex-shrink: 0; }
.pc-saved {
  font-family: 'Nunito', sans-serif;
  font-size: 16px; font-weight: 900;
}
.pc-target { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Résumé compact projets */
.projet-summary-chip {
  background: var(--yellow-light);
  border: 1px solid #FDE68A;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #854d0e;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.psc-sep { color: #FDE68A; }
.pc-more {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 6px 0 4px;
}
.obj-dashboard-link {
  display: block;
  text-align: center;
  padding: 12px;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  color: white;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  margin-top: 12px;
  box-shadow: 0 4px 14px rgba(255,107,44,0.28);
  transition: box-shadow 0.2s;
}
.obj-dashboard-link:hover { box-shadow: 0 8px 20px rgba(255,107,44,0.40); }

/* ── Avatar + Dropdown user menu ────────────────────────────── */
.avatar-wrap {
  position: relative;
}
.avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  color: white;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255,107,44,0.30);
  transition: box-shadow 0.2s, transform 0.15s;
}
.avatar-btn:hover { box-shadow: 0 4px 14px rgba(255,107,44,0.45); transform: scale(1.05); }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 30px rgba(0,0,0,0.14);
  border: 1px solid var(--border);
  z-index: 9999;
  overflow: hidden;
  animation: fadeIn 0.15s ease;
}
.dropdown-header {
  padding: 14px 16px 12px;
  background: linear-gradient(135deg, #FFF8EC, #FFF3D6);
  border-bottom: 1px solid var(--border);
}
.dd-user-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.dd-user-email {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  word-break: break-all;
}
.dd-user-plan {
  font-size: 12px;
  font-weight: 700;
  color: var(--orange);
  margin-top: 4px;
}
.dropdown-item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text);
  background: none;
  border: none;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.dropdown-item:hover { background: #FFF8EC; }
.dropdown-item-danger { color: #ef4444; }
.dropdown-item-danger:hover { background: #FEE2E2; }

/* ── Boutons export Excel / PDF ─────────────────────────────── */
.export-btns {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.submit-btn-goal { margin-top: 4px; }
.export-btns button {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  border: none;
}
.export-btns button:first-child {
  background: #DCFCE7;
  color: #15803d;
  border: 1px solid #86efac;
}
.export-btns button:first-child:hover { background: #BBF7D0; transform: translateY(-1px); }
.export-btns button:last-child {
  background: #FEE2E2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}
.export-btns button:last-child:hover { background: #FECACA; transform: translateY(-1px); }
.export-note {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  font-style: italic;
  margin-top: 6px;
}

/* ── Bottom sheet (mobile user menu) ────────────────────────── */
.bs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9998;
}
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 20px 20px 0 0;
  z-index: 9999;
  padding: 0 0 32px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -4px 30px rgba(0,0,0,0.15);
}
.bottom-sheet.open { transform: translateY(0); }
.bs-handle {
  width: 40px;
  height: 4px;
  background: #E5E7EB;
  border-radius: 2px;
  margin: 12px auto 8px;
}
.bottom-sheet .dropdown-item {
  padding: 14px 20px;
  font-size: 15px;
}
.bottom-sheet .dropdown-header {
  margin: 0;
  padding: 16px 20px 14px;
}

/* ── CARTE ACCÈS RAPIDE CALENDRIER ──────────────────────────── */
.calendrier-card {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.calendrier-card:hover {
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
}
.cc-icon { font-size: 28px; flex-shrink: 0; }
.cc-info { flex: 1; min-width: 0; }
.cc-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: #1e40af;
  margin-bottom: 2px;
}
.cc-sub { font-size: 12px; color: var(--muted); line-height: 1.4; }
.cc-arrow {
  font-size: 18px;
  color: #3b82f6;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── PLANIFICATION (mois futurs) ─────────────────────────────── */

/* Badge sous le sélecteur de mois (à l'intérieur du header gradient) */
.mois-badge-wrap { text-align: center; padding: 6px 16px 0; }

.badge-futur {
  display: inline-block;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(6px);
  color: white;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.35);
  letter-spacing: 0.3px;
}

.badge-actuel {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.25);
}

/* Dropdown mois : séparateur et items futurs */
.month-dd-separator {
  padding: 8px 14px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #8b5cf6;
  border-top: 1px solid #ede9fe;
  margin-top: 4px;
}
.month-dd-item.future { color: #6d28d9; }
.month-dd-item.future:hover { background: #ede9fe; }
.month-dd-item.future.selected { background: #ede9fe; font-weight: 700; }
.month-dd-item.future.has-plan { font-weight: 700; }
.month-future-badge {
  font-size: 11px;
  color: #8b5cf6;
  flex-shrink: 0;
}

/* Plan cards */
.plan-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid #3b82f6;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  animation: fadeIn 0.25s ease;
}
.plan-card.revenu { border-left-color: #22c55e; }

.plan-card-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.plan-card-info { flex: 1; min-width: 0; }
.plan-card-name {
  font-size: 13px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
.plan-card-meta { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.plan-card-badge {
  background: #dbeafe; color: #1d4ed8;
  padding: 1px 6px; border-radius: 8px;
  font-size: 10px; font-weight: 700;
}
.plan-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.plan-card-amount { font-family: var(--font-display); font-size: 15px; font-weight: 900; }
.plan-card-amount.dep { color: var(--orange); }
.plan-card-amount.rev { color: #15803d; }
.plan-card-actions { display: flex; gap: 4px; }

.btn-valider-plan {
  background: #dcfce7; border: none; cursor: pointer;
  color: #15803d; font-size: 14px; font-weight: 900;
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.btn-valider-plan:hover { background: #bbf7d0; }

.btn-suppr-plan {
  background: #fee2e2; border: none; cursor: pointer;
  color: #991b1b; font-size: 13px;
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.btn-suppr-plan:hover { background: #fecaca; }

/* Prévision card */
.prevision-card {
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
}
.prevision-title {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 800;
  color: #4338ca; margin-bottom: 10px;
}
.prevision-row {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 4px 0;
  border-bottom: 1px solid #e0e7ff;
}
.prevision-row:last-child { border-bottom: none; padding-bottom: 0; }
.prevision-rev { color: #15803d; font-weight: 700; }
.prevision-dep { color: #c2410c; font-weight: 700; }
.prevision-solde { font-weight: 800; border-top: 2px solid #c7d2fe !important; margin-top: 2px; padding-top: 8px !important; }
.prevision-solde.positif span:last-child { color: #15803d; }
.prevision-solde.negatif span:last-child { color: #ef4444; }

/* Planif empty state */
.planif-empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.planif-empty-icon { font-size: 32px; margin-bottom: 8px; }
.planif-empty-text { font-size: 13px; line-height: 1.6; }

/* Widget mois prochain */
.widget-prochain {
  background: linear-gradient(135deg, #f0fdf4, #eff6ff);
  border: 1px solid #86efac;
  border-radius: var(--radius-sm);
  padding: 16px;
}
.widget-prochain-title {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 800;
  color: #166534; margin-bottom: 12px;
}
.widget-prochain-stats {
  display: flex; gap: 8px; margin-bottom: 10px;
}
.wp-stat { flex: 1; text-align: center; }
.wp-stat-label { font-size: 10px; color: var(--muted); margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
.wp-stat-value { font-family: var(--font-display); font-size: 14px; font-weight: 900; }
.wp-stat-value.green { color: #15803d; }
.wp-stat-value.red   { color: #c2410c; }
.wp-count { font-size: 11px; color: var(--muted); text-align: center; margin-bottom: 10px; }

.btn-planifier-mois {
  width: 100%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white; border: none; cursor: pointer;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 800;
  padding: 10px;
  transition: box-shadow 0.2s;
  box-shadow: 0 3px 10px rgba(34,197,94,0.28);
}
.btn-planifier-mois:hover { box-shadow: 0 6px 16px rgba(34,197,94,0.40); }

/* Notification planifications échues */
.notif-planif {
  display: flex; align-items: center; justify-content: space-between;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  padding: 10px 14px;
  gap: 10px;
}
.notif-planif-text { font-size: 12px; color: #92400e; flex: 1; }
.notif-planif-btn {
  background: #f59e0b; color: white; border: none; cursor: pointer;
  border-radius: 8px; padding: 6px 12px;
  font-size: 12px; font-weight: 700;
  white-space: nowrap;
  transition: background 0.2s;
}
.notif-planif-btn:hover { background: #d97706; }

/* ── Transactions page — total header ── */
.tx-page-total {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tx-page-total-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.tx-page-total-value { font-family: var(--font-display); font-size: 22px; font-weight: 900; }
.tx-page-total-value.plus  { color: var(--green); }
.tx-page-total-value.minus { color: var(--orange); }

/* ── Transaction items avec statut ── */
.tx-item-pending { background: #FFFBEB; border-left: 3px solid #FCD34D; padding-left: 9px; margin-left: -2px; }
.tx-right { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.tx-status-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 8px;
  white-space: nowrap;
}
.tx-status-badge.paid    { background: #DCFCE7; color: #15803d; }
.tx-status-badge.pending { background: #FEF9C3; color: #854d0e; }

/* ── Modal — ligne titre + fermeture ── */
.modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.modal-header-row .modal-title { margin-bottom: 0; font-size: 17px; }
.modal-close-btn {
  background: var(--border);
  border: none; cursor: pointer; border-radius: 50%;
  width: 28px; height: 28px; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); flex-shrink: 0; transition: background 0.15s;
}
.modal-close-btn:hover { background: #f0e0c8; color: var(--text); }

/* ── Modal — champ montant ── */
.modal-amount-wrap {
  display: flex; align-items: center;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface2); transition: border-color 0.2s; overflow: hidden;
}
.modal-amount-wrap:focus-within { border-color: var(--orange); }
.modal-amount-symbol {
  padding: 12px 12px; font-size: 15px; font-weight: 700;
  color: var(--muted); flex-shrink: 0;
}
.modal-amount-input {
  flex: 1; border: none !important; background: transparent !important;
  padding: 12px 12px 12px 0 !important; border-radius: 0 !important; box-shadow: none !important;
}
.modal-amount-input:focus { outline: none; }

/* ── Modal — grille catégories ── */
.cat-grid-wrap {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.cat-grid-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px; border: 2px solid var(--border); border-radius: 10px;
  background: var(--surface2); cursor: pointer; transition: all 0.18s;
}
.cat-grid-btn:hover { background: var(--bg); border-color: #f0c080; }
.cat-grid-btn.selected { border-color: var(--orange); background: #FFF0E8; }
.cgb-emoji { font-size: 20px; line-height: 1; }
.cgb-label { font-size: 9px; font-weight: 700; color: var(--muted); text-align: center; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-grid-btn.selected .cgb-label { color: var(--orange); }

/* ── Modal — bouton type Récurrent ── */
.type-btn.recurring.active { border-color: #8b5cf6; background: #ede9fe; color: #6d28d9; }

/* ── Modal — groupe statut (dépense uniquement) ── */
.modal-status-group { display: none; }
.modal-status-group.visible { display: block; }

/* .btn-retour-accueil → désormais dans styles/global.css */

/* ── CHAMPS RÉCURRENTS ── */
.champs-recurrents { border-top:2px dashed #FFE4B5; padding-top:14px; margin-top:4px; animation:fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }

.sens-toggle { display:flex; gap:8px; margin-bottom:4px; }
.sens-btn { flex:1; padding:10px; border-radius:12px; border:2px solid #FFE4B5; background:white; font-family:'Nunito',sans-serif; font-size:13px; font-weight:800; cursor:pointer; transition:all 0.2s; text-align:center; }
.sens-btn.depense.active { border-color:#FF6B2C; background:#FFF0E8; color:#c2410c; }
.sens-btn.revenu.active  { border-color:#22C55E; background:#DCFCE7; color:#15803d; }
.sens-btn:not(.active)   { color:#8A7050; }

.duree-inputs { display:flex; gap:8px; margin-top:6px; }
.form-hint    { font-size:11px; color:#8A7050; font-style:italic; margin-top:4px; }

.recap-recurrent       { margin-top:8px; }
.recap-recurrent-inner { display:flex; align-items:center; gap:8px; background:#FFF8EC; border:1px solid #FFE4B5; border-radius:10px; padding:10px 14px; font-size:13px; font-weight:700; color:#1A1200; }
.recap-icon            { font-size:16px; }

