/* Moolie — charte « Électrique » : bleu #2C4BFF, citron #E4FF3F, encre #0E1030 */
:root {
  --bg: #F6F7FB; --card: #FFFFFF; --card2: #ECEEF6; --line: #E2E4EE;
  --ink: #0E1030; --muted: #555872;
  --blue: #2C4BFF; --lime: #E4FF3F; --navy: #0E1030;
  --chip: #E3E8FF; --chip-ink: #1F36C7;
  --pos: #0F7B5F; --pos-bg: #DDF5EC; --warn: #8A5300; --warn-bg: #FFF1D6; --neg: #C2410C; --neg-bg: #FDEBE2;
  --input: #FFFFFF; --nav: #FFFFFF; --shadow: 0 1px 2px rgba(14,16,48,.06);
  --chart: #2C4BFF; --area: rgba(44,75,255,.10); --ring: #2C4BFF;
  --money-in: #4D6600; --money-in-bg: #F3FFB8; --money-out: #E0006B; --money-out-bg: #FFE0EC;
  --radius: 24px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0B0C1F; --card: #15173A; --card2: #1E2150; --line: #2B2E60;
  --ink: #F2F3FF; --muted: #A3A6C8;
  --chip: rgba(91,116,255,.22); --chip-ink: #C3CCFF;
  --pos: #5FE0B5; --pos-bg: rgba(95,224,181,.14); --warn: #FFCF7A; --warn-bg: rgba(255,190,90,.14); --neg: #FFA37A; --neg-bg: rgba(255,120,70,.14);
  --input: #101230; --nav: #111333; --shadow: none;
  --chart: #E4FF3F; --area: rgba(228,255,63,.10); --ring: #E4FF3F;
  --money-in: #E4FF3F; --money-in-bg: rgba(228,255,63,.16); --money-out: #FF5FA2; --money-out-bg: rgba(255,61,139,.2);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; max-width: 100%; overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: "DM Sans", system-ui, -apple-system, sans-serif; font-size: 16px; line-height: 1.45; -webkit-tap-highlight-color: transparent; overscroll-behavior-x: none; }
h1, h2, h3, .u { font-family: "Unbounded", "DM Sans", sans-serif; letter-spacing: -0.02em; }
h1 { font-weight: 800; margin: 0; }
h2 { font-weight: 700; margin: 0; font-size: 19px; }
h3 { font-weight: 700; margin: 0; font-size: 16px; }
a { color: var(--chip-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid rgba(44,75,255,.55); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row-flex { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.desk-only, .desk-only-flex { display: none !important; }
@media (min-width: 900px) {
  .mob-only, .mob-only-flex { display: none !important; }
  .desk-only { display: block !important; }
  .desk-only-flex { display: inline-flex !important; }
}
.cat-head .t { display: block; }

/* ---------- boutons & champs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; font-weight: 800; font-size: 15px; text-decoration: none; background: var(--card2); color: var(--ink); white-space: nowrap; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-lime { background: var(--lime); color: var(--navy); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--ink); }
.btn-danger { background: var(--neg-bg); color: var(--neg); }
.btn-out { background: #FF3D8B; color: #fff; }
.btn-in { background: var(--lime); color: var(--navy); }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn { width: 44px; height: 44px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: var(--card2); color: var(--ink); padding: 0; }
.icon-btn.plain { background: transparent; color: var(--muted); width: 38px; height: 38px; }
.icon-btn.plain:hover { background: var(--card2); color: var(--ink); }
.chip-btn { min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 800; border: 2px solid var(--line); background: var(--card); color: var(--ink); }
.chip-btn.on { border-color: var(--blue); background: var(--blue); color: #fff; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 700; min-width: 0; }
.input, .select { width: 100%; min-width: 0; height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--input); color: var(--ink); font-size: 16px; font-weight: 500; }
.input:focus, .select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(44,75,255,.3); }
.input.big { height: 64px; font-size: 28px; font-weight: 800; }
.input.bare { border-color: transparent; background: transparent; font-weight: 600; padding: 0 10px; height: 44px; }
.input.bare:hover { background: var(--card2); }
.input.amount { width: 112px; flex: 0 0 auto; text-align: right; font-weight: 800; height: 44px; padding: 0 10px; }
.input.pct { width: 70px; flex: 0 0 auto; text-align: right; font-weight: 800; height: 40px; border-radius: 999px; padding: 0 10px; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.error { color: var(--neg); font-size: 14px; font-weight: 700; }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--card2); border-radius: 999px; }
.seg button { flex: 1 1 0; min-height: 38px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 800; font-size: 14px; padding: 0 12px; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.seg.blue button.on { background: var(--blue); color: #fff; }
.switch { position: relative; width: 50px; height: 30px; flex: 0 0 auto; border: 0; border-radius: 999px; background: var(--line); padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .18s; }
.switch[aria-checked="true"] { background: var(--blue); }
.switch[aria-checked="true"]::after { left: 23px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; background: var(--card2); }
.pill.pos { background: var(--pos-bg); color: var(--pos); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.chip { background: var(--chip); color: var(--chip-ink); }
.pill.blue { background: var(--blue); color: #fff; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }
.avatar { width: 40px; height: 40px; border-radius: 999px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; background: var(--lime); color: var(--navy); }

/* ---------- logo ---------- */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark { width: 36px; height: 36px; border-radius: 12px; background: var(--blue); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.logo-word { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 21px; letter-spacing: -0.02em; }

/* ---------- structure ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }
.sidebar { display: none; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: calc(10px + var(--safe-t)) 16px 10px; background: var(--bg); }
.topbar .logo { margin-right: auto; }
.lang-btn { width: auto; padding: 0 12px; gap: 6px; font-size: 13px; font-weight: 800; }
.main { padding: 8px 16px calc(110px + var(--safe-b)); max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 8px 12px calc(10px + var(--safe-b)); background: var(--nav); border-top: 1px solid var(--line); }
.bottomnav.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; border-radius: 16px; color: var(--muted); font-size: 11px; font-weight: 700; text-decoration: none; }
.bottomnav a.on { background: var(--blue); color: #fff; font-weight: 800; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); }
  .topbar, .bottomnav { display: none; }
  .update { top: 12px; }
  .sidebar { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; padding: 28px 16px; border-right: 1px solid var(--line); overflow-y: auto; }
  .sidebar .logo { padding: 0 12px 28px; }
  .sidebar nav a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 999px; color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; }
  .sidebar nav a:hover { background: var(--card2); }
  .sidebar nav a.on { background: var(--blue); color: #fff; font-weight: 700; }
  .sidebar .side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
  .main { padding: 36px 48px 60px; gap: 24px; }
  .page-head h1 { font-size: 40px; }
}

/* ---------- hero ---------- */
.hero { background: var(--blue); color: #fff; border-radius: 28px; padding: 22px 20px; display: flex; flex-direction: column; gap: 16px; }
.hero .label { font-size: 14px; font-weight: 700; }
.hero .big { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 36px; line-height: 1.05; letter-spacing: -0.035em; color: var(--lime); overflow-wrap: anywhere; }
.hero .soft { background: rgba(255,255,255,.15); border-radius: 16px; padding: 12px 14px; }
.hero .soft b { display: block; font-size: 17px; }
.hero .tag { align-self: flex-start; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: 13px; font-weight: 700; }
.hero .btn-soft { background: rgba(255,255,255,.16); color: #fff; }
.bar { display: flex; gap: 3px; height: 12px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.16); }
.bar span { display: block; height: 100%; border-radius: 999px; min-width: 0; }
@media (min-width: 900px) {
  .hero { padding: 32px 36px; }
  .hero .big { font-size: 64px; }
}

/* ---------- budget ---------- */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.month-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--card2); color: var(--ink); }
.month-btn h1 { font-size: 19px; }
.round-outline { width: 44px; height: 44px; border-radius: 999px; border: 2px solid var(--ink); background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick button { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; padding: 0; font-size: 12px; font-weight: 700; color: var(--ink); }
.quick span.c { width: 52px; height: 52px; border-radius: 999px; background: var(--card2); display: inline-flex; align-items: center; justify-content: center; }
.quick span.c.lime { background: var(--lime); color: var(--navy); }
.cats { display: flex; flex-direction: column; gap: 14px; }
.cat { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.cat-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 0; background: transparent; text-align: left; color: var(--ink); }
.cat-head .t { font-weight: 800; font-size: 16px; }
.cat-head .s { font-size: 12px; color: var(--muted); font-weight: 600; }
.dot { width: 14px; height: 14px; border-radius: 999px; flex: 0 0 auto; }
.cat-total { padding: 5px 10px; border-radius: 999px; font-size: 14px; font-weight: 800; white-space: nowrap; color: var(--navy); }
.chev { flex: 0 0 auto; transition: transform .2s; }
.cat.open .chev { transform: rotate(180deg); }
.cat-body { display: none; padding: 0 16px 16px; flex-direction: column; gap: 10px; }
.cat.open .cat-body { display: flex; }
.swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.swatches button { aspect-ratio: 1; border-radius: 999px; border: 3px solid transparent; padding: 0; }
.swatches button.on { border-color: var(--ink); }
.share-box { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--card2); }
.note-box { padding: 10px 14px; border-radius: 14px; background: var(--chip); color: var(--chip-ink); font-size: 13px; font-weight: 600; }
.item { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.add-line { min-height: 44px; border: 2px dashed var(--line); border-radius: 14px; background: transparent; color: var(--ink); font-weight: 700; font-size: 15px; }
.legend-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
@media (min-width: 900px) {
  .month-btn h1 { font-size: 34px; }
  .month-btn { background: transparent; }
  .quick { display: flex; gap: 10px; }
  .quick button { flex-direction: row; background: var(--card2); border-radius: 999px; min-height: 44px; padding: 0 16px 0 6px; font-size: 14px; }
  .quick span.c { width: 34px; height: 34px; background: transparent; }
  .quick button.lime-btn { background: var(--lime); color: var(--navy); }
  .quick button.lime-btn span.c { background: transparent; }
  .cats { display: block; columns: 2; column-gap: 24px; }
  .cats > * { break-inside: avoid; margin-bottom: 24px; }
  .cat .chev { display: none; }
  .cat .cat-body { display: flex; }
  .cat-head { cursor: default; padding: 18px 20px 10px; }
  .cat-body { padding: 0 20px 18px; }
}

/* ---------- épargne ---------- */
.accounts { display: grid; grid-template-columns: 1fr; gap: 8px; }
.account { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 20px; background: var(--card); border: 2px solid var(--line); color: var(--ink); }
.account.on { border-color: var(--blue); }
.account .bal { font-weight: 800; white-space: nowrap; }
.mov { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--line); }
.mov-ic { width: 40px; height: 40px; border-radius: 999px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.mov-ic.in { background: var(--money-in-bg); color: var(--money-in); }
.mov-ic.out { background: var(--money-out-bg); color: var(--money-out); }
.two-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.fab { position: fixed; right: 16px; bottom: calc(92px + var(--safe-b)); z-index: 21; box-shadow: 0 10px 24px rgba(14,16,48,.25); }
.chart { width: 100%; height: auto; display: block; }
@media (min-width: 900px) {
  .accounts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account { flex-direction: column; align-items: flex-start; padding: 18px 20px; }
  .account .bal { font-size: 26px; font-family: "Unbounded", sans-serif; }
  .fab { position: static; box-shadow: none; }
  .two-col { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
}

/* ---------- objectifs ---------- */
.goals { display: grid; grid-template-columns: 1fr; gap: 12px; }
.goal { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.ring { position: relative; width: 72px; height: 72px; flex: 0 0 auto; }
.ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; }
.acc-picks { display: flex; flex-direction: column; gap: 8px; }
.acc-pick { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); font-size: 15px; cursor: pointer; }
.acc-pick input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: #2C4BFF; margin: 0; }
.acc-pick:has(input:checked) { border-color: var(--blue); background: var(--chip); }
.goal .advice { padding: 10px 12px; border-radius: 14px; background: var(--card2); font-size: 13px; font-weight: 600; }
@media (min-width: 900px) { .goals { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- réglages & admin ---------- */
.settings-grid { display: flex; flex-direction: column; gap: 16px; }
.member { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--card2); border-radius: 16px; }
.cat-share { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); }
.stat b { font-family: "Unbounded", sans-serif; font-size: 28px; }
.stat.blue { background: var(--blue); color: #fff; border: 0; }
.stat.lime { background: var(--lime); color: var(--navy); border: 0; }
.user-row { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) {
  .settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .user-row { flex-direction: row; align-items: center; }
}

/* ---------- connexion ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.auth-side { padding: calc(20px + var(--safe-t)) 20px 8px; display: flex; flex-direction: column; gap: 20px; }
.auth-side .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.slogan { font-size: 26px; line-height: 1.35; margin: 20px 0 8px; font-weight: 800; }
.slogan mark { background: var(--lime); color: var(--navy); padding: 1px 6px; border-radius: 6px; }
.auth-form { padding: 8px 20px calc(32px + var(--safe-b)); display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 900px) {
  .auth { flex-direction: row; }
  .auth-side { width: 52%; padding: 48px 64px; justify-content: flex-start; }
  .slogan { font-size: 42px; line-height: 1.3; margin-top: 72px; max-width: 560px; }
  .auth-form { flex: 1; align-items: center; background: var(--card2); padding: 40px; }
  .auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 36px; }
}

/* ---------- calques ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(14,16,48,.5); display: flex; flex-direction: column; justify-content: flex-end; }
.sheet { background: var(--card); color: var(--ink); border-radius: 28px 28px 0 0; padding: 12px 16px calc(24px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; max-height: 92vh; overflow-y: auto; overflow-x: hidden; }
.sheet .grab { align-self: center; width: 44px; height: 5px; border-radius: 999px; background: var(--line); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.months button { min-height: 52px; border-radius: 16px; font-weight: 800; border: 2px solid var(--line); background: var(--card); color: var(--ink); }
.months button.now { border-color: var(--blue); }
.months button.on { border-color: var(--blue); background: var(--blue); color: #fff; }
@media (min-width: 900px) {
  .overlay { justify-content: center; align-items: center; padding: 24px; }
  .sheet { width: 100%; max-width: 480px; border-radius: 28px; padding: 24px; }
  .sheet .grab { display: none; }
}
#toast { position: fixed; left: 16px; right: 16px; bottom: calc(96px + var(--safe-b)); z-index: 60; display: flex; justify-content: center; pointer-events: none; }
#toast .t { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px; background: #0E1030; color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 12px 30px rgba(14,16,48,.35); max-width: 520px; }
#toast .t button { border: 0; border-radius: 999px; background: var(--lime); color: var(--navy); font-weight: 800; font-size: 13px; padding: 8px 12px; }
@media (min-width: 900px) { #toast { bottom: 32px; left: 264px; } }
.update { position: sticky; top: calc(64px + var(--safe-t)); z-index: 40; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; background: var(--blue); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 10px 30px rgba(44,75,255,.4); animation: updGlow 2s ease-in-out infinite; }
.update .upd-dot { width: 12px; height: 12px; border-radius: 999px; background: var(--lime); flex: 0 0 auto; box-shadow: 0 0 0 0 rgba(228,255,63,.8); animation: updPing 1.4s ease-out infinite; }
.update .btn { min-height: 40px; }
@keyframes updGlow { 0%,100% { box-shadow: 0 10px 30px rgba(44,75,255,.3); } 50% { box-shadow: 0 10px 36px rgba(44,75,255,.55); } }
@keyframes updPing { 0% { box-shadow: 0 0 0 0 rgba(228,255,63,.8); } 100% { box-shadow: 0 0 0 12px rgba(228,255,63,0); } }
/* Grande fenêtre de mise à jour */
.upd-overlay { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(14,16,48,.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: updFade .25s ease-out; }
.upd-card { position: relative; width: 100%; max-width: 420px; border-radius: 32px; padding: 34px 24px 22px; overflow: hidden; color: #fff; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; background: var(--blue); box-shadow: 0 30px 80px rgba(0,0,0,.45); animation: updPop .45s cubic-bezier(.2,1.4,.4,1); }
.upd-card .logo-mark { width: 84px; height: 84px; border-radius: 26px; background: var(--navy); animation: updBounce 1.8s ease-in-out infinite; }
.upd-card .logo-mark svg { width: 48px; height: 48px; }
.upd-badge { background: var(--lime); color: var(--navy); font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.upd-card h2 { margin: 0; font-size: 28px; line-height: 1.1; color: #fff; }
.upd-card p { margin: 0; font-size: 16px; color: rgba(255,255,255,.92); }
.upd-card .btn-upd { width: 100%; min-height: 60px; font-size: 18px; font-weight: 800; border-radius: 999px; background: var(--lime); color: var(--navy); animation: updPulse 1.6s ease-in-out infinite; }
.upd-card .upd-later { background: none; border: 0; color: rgba(255,255,255,.8); font: inherit; font-size: 14px; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 6px; }
@keyframes updFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes updPop { from { transform: scale(.7) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes updBounce { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(-6deg); } }
@keyframes updPulse { 0%,100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(228,255,63,.7); } 50% { transform: scale(1.03); box-shadow: 0 0 0 14px rgba(228,255,63,0); } }
/* Équilibre (projets) : pastilles rose (doit) et citron (on lui doit) */
.bal-card .bal-row { padding: 8px 0; }
.bal-card .pill { font-size: 13px; padding: 6px 12px; }
.bal-card .pill.pos { background: var(--lime); color: var(--navy); }
.bal-card .pill.warn { background: #FF3D8B; color: #fff; }
.bal-card .settle { padding: 10px 12px; border-radius: 14px; background: var(--card2); }
.bal-card .settle .amt { color: var(--money-out); }
@media (prefers-reduced-motion: reduce) { .update, .update .upd-dot, .upd-overlay, .upd-card, .upd-card .logo-mark, .upd-card .btn-upd { animation: none; } }
.saving-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.saving-state i { width: 8px; height: 8px; border-radius: 999px; background: var(--pos); display: inline-block; }
.saving-state.busy i { background: var(--warn); }
.empty { padding: 20px; text-align: center; color: var(--muted); }
.spinner { padding: 60px 0; text-align: center; color: var(--muted); }

@media print {
  .sidebar, .topbar, .bottomnav, .quick, .fab, #toast, .no-print, .icon-btn, .add-line, .swatches { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .cat .cat-body { display: flex !important; }
  body { background: #fff; color: #000; }
}

/* ---------- projets ---------- */
.line-row { width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); text-align: left; font: inherit; }
.line-row:hover { background: var(--card2); }
.goal:hover { border-color: var(--blue); }

/* Guide & FAQ */
.topbar .guide-btn.on { background: var(--blue); color: #fff; }
.help-hero .input { background: #fff; color: var(--navy); border-color: transparent; }
.help-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.help-chip { border: 0; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 800; background: rgba(255,255,255,.16); color: #fff; cursor: pointer; }
.help-chip:hover { background: var(--lime); color: var(--navy); }
.help-sec { display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 80px; }
.help-sec h2 { margin: 0 0 4px; gap: 10px; }
.help-ic { width: 34px; height: 34px; border-radius: 12px; background: var(--lime); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.faq { border-radius: 16px; background: var(--card2); overflow: hidden; }
.faq summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-weight: 800; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: 0 0 auto; transition: transform .2s; }
.faq[open] summary svg { transform: rotate(180deg); }
.faq[open] summary { color: var(--blue); }
[data-theme="dark"] .faq[open] summary { color: var(--lime); }
.faq-a { padding: 0 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.faq-a p { margin: 0; }
