/* ===== SOURCE: styles.css ===== */
/*
 * Budget PWA — styles v84
 *
 * Organisation :
 * 1. Fondations et composants communs
 * 2. Adaptations iOS / macOS
 * 3. Navigation et feuilles modales
 * 4. Dépenses fixes / variables / PEA
 * 5. Overrides ciblés conservés pour compatibilité visuelle
 *
 * Les règles restent dans leur ordre de cascade d'origine afin de préserver
 * exactement le rendu validé des versions précédentes.
 */

:root {
  --bg: #F7F4EE;
  --paper: #FFFDF8;
  --text: #171717;
  --muted: #707070;
  --light: #9A9A9A;
  --line: #E7E1D7;
  --soft: #F4F0E8;
  --edit: #8E8E93;
  --delete: #FF3B30;
  --mail-row: #D8C1A7;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

.page {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding:
    calc(var(--safe-top) + 20px)
    max(18px, calc(var(--safe-right) + 18px))
    calc(var(--safe-bottom) + 34px)
    max(18px, calc(var(--safe-left) + 18px));
  background: var(--paper);
}

header { margin-bottom: 24px; }

.kicker {
  margin-bottom: 5px;
  color: var(--light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.55px;
  text-transform: uppercase;
}

h1 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(31px, 9vw, 38px);
  line-height: 1.02;
  letter-spacing: -1.05px;
  font-weight: 780;
}

.app-version {
  display: inline-block;
  margin-left: 7px;
  vertical-align: baseline;
  color: var(--light);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 9px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.hero {
  padding: 14px 0 15px;
  margin-bottom: 17px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-label {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.hero-metric-label {
  margin: 10px 0 4px;
  color: var(--light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-amount {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(44px, 14vw, 60px);
  line-height: 0.96;
  letter-spacing: -2px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.hero-note {
  min-height: 19px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.summary-box {
  min-width: 0;
  padding: 9px 0 14px;
  background: transparent;
}

.summary-box + .summary-box {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.summary-label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.summary-value {
  font-size: clamp(20px, 6vw, 24px);
  font-weight: 730;
  letter-spacing: -0.45px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.income-block {
  margin: 18px 0 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
}

.income-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.income-block-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.45px;
  text-transform: uppercase;
}


.income-block-heading {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.income-total-info {
  color: var(--ca-bluegrey);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.income-add {
  min-width: 44px;
  min-height: 36px;
  padding: 0 12px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
  touch-action: manipulation;
}

.income-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.income-grid .empty {
  grid-column: 1 / -1;
  padding: 8px 0 2px;
  border: 0;
}

.income-grid .swipe-row {
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.income-grid .swipe-content {
  min-height: 82px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  border-radius: 14px;
}

.income-grid .line-title {
  width: 100%;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.income-grid .amount {
  font-size: 17px;
  font-weight: 740;
}

.income-grid .swipe-actions {
  top: 5px;
  right: 4px;
  bottom: 5px;
}

.expense-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 4px 0 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft);
}

.expense-tab {
  min-width: 0;
  min-height: 54px;
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  padding: 7px 6px;
  cursor: pointer;
  touch-action: manipulation;
}

.expense-tab-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15px;
}

.expense-tab-value {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.expense-tab.active {
  background: var(--paper);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.045);
}

.expense-panel[hidden] { display: none; }

.difference-card {
  padding: 22px 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.difference-value {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(38px, 12vw, 52px);
  line-height: 1;
  font-weight: 790;
  letter-spacing: -1.5px;
  font-variant-numeric: tabular-nums;
}

.difference-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.section-head .section-title { margin-bottom: 0; }

.month-balance {
  margin: 0 0 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--soft);
}

.month-balance-title {
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .45px;
  text-transform: uppercase;
}

.month-balance-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.month-balance-stat {
  min-width: 0;
  padding-right: 14px;
}

.month-balance-stat + .month-balance-stat {
  padding-left: 14px;
  padding-right: 0;
  border-left: 1px solid var(--line);
}

.month-balance-stat-label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.month-balance-amount,
.month-balance-state {
  color: var(--text);
  font-size: clamp(21px, 6vw, 27px);
  line-height: 1.05;
  font-weight: 790;
  letter-spacing: -.55px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.month-balance-state.over {
  color: #B23A31;
}

.month-balance-progress {
  height: 6px;
  margin-top: 15px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23,23,23,.08);
}

.month-balance-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--text);
  transition: width 180ms ease;
}

.month-balance-progress-bar.over {
  background: #B23A31;
}

.month-balance-foot {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.month-balance-foot.over {
  color: #B23A31;
  font-weight: 650;
}

.mini-add {
  min-height: 38px;
  padding: 0 12px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.mini-add:active { background: var(--soft); }

.variable-categories {
  display: grid;
  gap: 12px;
}

.variable-category {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--paper);
}

.category-head {
  padding: 15px 15px 13px;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.category-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.category-name {
  min-width: 0;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 740;
  letter-spacing: -0.25px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.category-action {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.category-action.danger { color: #B23A31; }

.category-toggle {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  touch-action: manipulation;
}

.category-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 180ms cubic-bezier(.2,.8,.2,1);
}

.variable-category.collapsed .category-toggle svg {
  transform: rotate(-90deg);
}

.category-list {
  overflow: hidden;
  max-height: 2000px;
  opacity: 1;
  transition: max-height 220ms cubic-bezier(.2,.8,.2,1), opacity 160ms ease;
}

.variable-category.collapsed .category-list {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.category-head {
  cursor: pointer;
}

.category-action,
.category-toggle {
  cursor: pointer;
}

.category-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.category-metric-label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .35px;
}

.category-metric-value {
  display: block;
  font-size: 14px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-metric-value.over { color: #B23A31; }

.category-progress {
  position: relative;
  height: 5px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(23,23,23,.08);
  overflow: visible;
}

.category-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--text);
  transition: width 180ms ease;
  overflow: hidden;
}

.category-progress-bar.over { background: #B23A31; }

.category-progress-label {
  position: absolute;
  top: 50%;
  left: var(--progress-label-left, 0%);
  transform: translate(-50%, -50%);
  min-width: 28px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1px solid rgba(47,125,104,.18);
  box-shadow: 0 2px 7px rgba(40,66,57,.10);
  color: var(--ca-accent);
  font-size: 9px;
  font-weight: 820;
  line-height: 1;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}

.category-progress-label.over {
  color: #B23A31;
  border-color: rgba(178,58,49,.18);
}

.category-list {
  padding: 0 14px 3px;
}

.category-list .plain-list { border-top: 0; }

.category-empty {
  padding: 14px 0;
  color: var(--muted);
  font-size: 13px;
}

.category-add-expense {
  width: 100%;
  min-height: 42px;
  margin: 3px 0 8px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.category-budget-missing {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.months-wrap {
  width: calc(100% + 36px);
  margin-left: -18px;
  margin-bottom: 25px;
  overflow: hidden;
}

.months {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 7px 18px 9px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}

.months::-webkit-scrollbar { display: none; }

.month-button {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.25px;
  padding: 0 10px;
  border-radius: 12px;
  cursor: pointer;
  scroll-snap-align: center;
  touch-action: manipulation;
}

.month-button.active {
  background: var(--text);
  color: var(--paper);
}

section + section { margin-top: 26px; }

.section-title {
  margin-bottom: 8px;
  color: var(--light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.55px;
  text-transform: uppercase;
}

.plain-list {
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.empty {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.add-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: -2px 0 28px;
}

.add-button {
  min-height: 48px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 680;
  cursor: pointer;
  touch-action: manipulation;
}

.add-button:active { background: var(--soft); }

.swipe-row {
  position: relative;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  background: var(--paper);
  padding: 7px 0;
}

.swipe-actions {
  position: absolute;
  top: 7px;
  right: 4px;
  bottom: 7px;
  display: flex;
  gap: 6px;
  width: 146px;
  padding-left: 6px;
}

.swipe-action {
  flex: 1 1 0;
  width: auto;
  height: 100%;
  min-width: 0;
  border: 0;
  border-radius: 16px;
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  opacity: 0;
  transform: translateX(18px) scale(0.45);
  transition: opacity 180ms ease, transform 180ms ease;
}

.swipe-action svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.swipe-action.edit { background: var(--edit); }
.swipe-action.delete { background: var(--delete); }

.swipe-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 12px 12px 12px 0;
  background: var(--paper);
  border-radius: 0;
  transform: translateX(0px);
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), background-color 180ms ease, border-radius 180ms ease;
}

.swipe-row.open .swipe-content {
  transform: translateX(-146px);
  background: var(--mail-row);
  border-radius: 22px;
}

.swipe-row.open .swipe-action {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.line-title {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 540;
  letter-spacing: -0.2px;
}

.line-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.amount {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 16px;
  font-weight: 660;
  letter-spacing: -0.2px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
}

.data-button {
  min-height: 44px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 680;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.data-button:active {
  background: var(--soft);
}

.data-button.danger {
  color: #B23A31;
}

.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.month-settings-button {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  appearance: none;
  cursor: pointer;
  touch-action: manipulation;
}

.month-settings-button:active { background: var(--soft); }

.month-settings-button svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.settings-sheet-title {
  font-size: 21px;
  font-weight: 760;
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}

.settings-sheet-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 18px;
}

.settings-list {
  border-top: 1px solid var(--line);
}

.settings-row {
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  box-shadow: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.settings-row:active,
.settings-row:focus,
.settings-row:focus-visible {
  background: transparent;
  box-shadow: none;
  outline: none;
}

.settings-row.danger { color: #B23A31; }

.settings-check {
  width: 24px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  opacity: 0;
}

.settings-row.selected .settings-check { opacity: 1; }

.settings-chevron {
  color: var(--light);
  font-size: 22px;
  line-height: 1;
}

.copy-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.copy-back {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 13px;
  background: var(--soft);
  color: var(--text);
  font: inherit;
  font-size: 23px;
  cursor: pointer;
}

.copy-month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.copy-month-button {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
  touch-action: manipulation;
}

.copy-month-button:active { background: var(--soft); }
.copy-month-button[disabled] { opacity: 0.3; cursor: default; }

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 24px);
  z-index: 60;
  max-width: calc(100vw - 36px);
  padding: 11px 16px;
  border-radius: 14px;
  background: var(--text);
  color: var(--paper);
  font-size: 13px;
  font-weight: 680;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.copy-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.copy-confirm {
  padding: 8px 0 2px;
}

.copy-confirm-text {
  margin-bottom: 16px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.copy-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.copy-confirm-button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.copy-confirm-button.primary {
  border-color: var(--text);
  background: var(--text);
  color: var(--paper);
}

.import-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.sheet-backdrop.open { display: flex; }

.sheet {
  width: 100%;
  max-height: 88dvh;
  overflow: auto;
  padding: 12px max(18px, calc(var(--safe-right) + 18px)) calc(var(--safe-bottom) + 20px) max(18px, calc(var(--safe-left) + 18px));
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.08);
}

.sheet-handle {
  width: 38px;
  height: 5px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: var(--line);
}

.sheet-title {
  margin-bottom: 18px;
  font-size: 23px;
  font-weight: 760;
  letter-spacing: -0.5px;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.field input {
  width: 100%;
  min-height: 50px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  padding: 0 14px;
}

.field input:focus { border-color: var(--text); }

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.sheet-button {
  min-height: 50px;
  appearance: none;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.sheet-button.primary {
  border-color: var(--text);
  background: var(--text);
  color: var(--paper);
}

@media (max-width: 430px) {
  .category-topline { gap: 8px; }
  .category-actions { gap: 4px; }
  .category-action {
    min-height: 32px;
    padding: 0 7px;
    font-size: 10px;
  }
  .category-toggle {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
  .category-metrics { gap: 6px; }
  .category-metric-value { font-size: 13px; }
}

@media (max-width: 360px) {
  .page {
    padding-left: max(14px, calc(var(--safe-left) + 14px));
    padding-right: max(14px, calc(var(--safe-right) + 14px));
  }
  .months-wrap {
    width: calc(100% + 28px);
    margin-left: -14px;
  }
  .months { padding-left: 14px; padding-right: 14px; }
  .summary-box + .summary-box { padding-left: 12px; }
  .month-button { min-width: 42px; padding: 0 8px; }
}

@media (min-width: 768px) {
  html, body { background: var(--bg); }
  body { padding: 38px 28px 48px; }
  .page {
    width: min(100%, 720px);
    min-height: 0;
    margin: 0 auto;
    padding: 34px 38px 38px;
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.035);
  }
  header { margin-bottom: 28px; }
  h1 { font-size: 40px; }
  .hero { padding-top: 24px; padding-bottom: 25px; }
  .hero-amount { font-size: 62px; }
  .months-wrap { width: 100%; margin-left: 0; margin-bottom: 29px; }
  .months { gap: 4px; padding: 6px 0 10px; }
  .month-button { min-width: 0; min-height: 38px; padding: 0 11px; border-radius: 10px; }
  .swipe-content { min-height: 62px; }
  .sheet-backdrop { align-items: center; padding: 28px; }
  .sheet {
    width: min(100%, 430px);
    padding: 22px 24px 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .month-button:not(.active):hover { background: var(--soft); color: var(--text); }
}

/* ===== Optimisation iOS 27 d’abord, puis macOS ===== */
:root {
  --control-glass: rgba(255, 253, 248, 0.76);
  --control-glass-strong: rgba(255, 253, 248, 0.90);
  --focus-ring: rgba(23, 23, 23, 0.22);
  --pressed: rgba(23, 23, 23, 0.055);
}

html {
  color-scheme: light;
  scroll-padding-top: calc(var(--safe-top) + 74px);
  scroll-behavior: smooth;
}

body {
  -webkit-touch-callout: none;
  accent-color: var(--text);
}

button, label[for], input {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

button, .data-button, .month-button, .settings-row, .copy-month-button {
  -webkit-user-select: none;
  user-select: none;
}

button:focus-visible,
.data-button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Les deux actions de données occupent réellement toute la largeur. */
.data-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Couche fonctionnelle légèrement vitrée, contenu principal restant opaque. */
.expense-tabs,
.month-settings-button,
.data-button,
.mini-add,
.income-add,
.category-toggle,
.sheet {
  -webkit-backdrop-filter: saturate(155%) blur(18px);
  backdrop-filter: saturate(155%) blur(18px);
}

.expense-tabs {
  position: sticky;
  top: calc(var(--safe-top) + 8px);
  z-index: 8;
  background: rgba(244, 240, 232, 0.84);
  box-shadow: 0 8px 22px rgba(0,0,0,0.025);
}

.expense-tab,
.month-settings-button,
.data-button,
.mini-add,
.income-add,
.add-button,
.category-action,
.category-toggle,
.category-add-expense,
.settings-row,
.copy-back,
.copy-month-button,
.copy-confirm-button,
.sheet-button {
  transition: background-color 130ms ease, border-color 130ms ease, transform 90ms ease, opacity 130ms ease, box-shadow 130ms ease;
}

.expense-tab:active,
.month-settings-button:active,
.data-button:active,
.mini-add:active,
.income-add:active,
.add-button:active,
.category-action:active,
.category-toggle:active,
.category-add-expense:active,
.settings-row:active,
.copy-back:active,
.copy-month-button:active,
.copy-confirm-button:active,
.sheet-button:active {
  transform: scale(0.985);
  background: var(--pressed);
}

/* iPhone : cibles tactiles confortables et contenus plus stables. */
.income-add,
.mini-add,
.month-settings-button,
.data-button,
.month-button,
.add-button,
.category-toggle,
.category-action,
.category-add-expense,
.copy-back,
.copy-month-button,
.copy-confirm-button,
.sheet-button {
  min-height: 44px;
}

.category-action {
  padding-inline: 10px;
}

.category-actions {
  gap: 6px;
}

.category-head {
  padding: 14px 14px 13px;
}

.category-topline {
  align-items: center;
}

.category-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.category-metric-label,
.category-metric-value {
  min-width: 0;
}

.category-list {
  max-height: 10000px;
}

.months {
  scroll-padding-inline: 18px;
}

.month-button {
  min-width: 46px;
}

.month-button.active {
  box-shadow: 0 3px 10px rgba(0,0,0,.10);
}

.swipe-row {
  -webkit-touch-callout: none;
}

.swipe-content {
  min-height: 60px;
}

/* Bottom sheet : meilleure utilisation du viewport dynamique et du clavier iOS. */
.sheet-backdrop {
  background: rgba(20, 18, 15, 0.20);
  -webkit-backdrop-filter: blur(10px) saturate(125%);
  backdrop-filter: blur(10px) saturate(125%);
}

.sheet {
  max-height: calc(100dvh - var(--safe-top) - 8px);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding-bottom: calc(var(--safe-bottom) + 28px);
  background: var(--control-glass-strong);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -18px 55px rgba(0,0,0,.12);
}

.sheet-handle {
  width: 36px;
  height: 5px;
  margin-bottom: 16px;
  background: rgba(112,112,112,.28);
}

.field input {
  min-height: 52px;
  background: rgba(255,255,255,.44);
  border-color: rgba(126,118,105,.24);
  font-size: 17px; /* évite tout zoom de focus Safari et améliore la saisie */
  caret-color: var(--text);
}

.field input:focus,
.field input:focus-visible {
  border-color: rgba(23,23,23,.55);
  box-shadow: 0 0 0 3px rgba(23,23,23,.07);
  outline: none;
}

.sheet-button.primary,
.copy-confirm-button.primary {
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

.copy-toast {
  bottom: calc(var(--safe-bottom) + 18px);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 30px rgba(0,0,0,.16);
}

@media (max-width: 430px) {
  .page {
    padding-top: calc(var(--safe-top) + 18px);
  }

  header { margin-bottom: 20px; }
  .data-actions { gap: 7px; }
  .data-button { font-size: 11.5px; border-radius: 14px; }

  .income-block {
    margin-top: 16px;
    padding: 14px;
    border-radius: 19px;
  }

  .income-grid { gap: 7px; }
  .income-grid .swipe-content { min-height: 78px; }

  .month-balance {
    padding: 15px;
    border-radius: 19px;
  }

  .expense-tabs {
    margin-bottom: 16px;
    border-radius: 17px;
  }

  .expense-tab { min-height: 52px; }

  .category-actions { gap: 5px; }
  .category-action {
    min-height: 40px;
    padding-inline: 8px;
    font-size: 10.5px;
  }
  .category-toggle {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    min-height: 40px;
  }

  .category-metric-label { font-size: 9.5px; }
  .category-metric-value { font-size: 13px; }

  .settings-row { min-height: 56px; }
  .copy-month-button { min-height: 52px; }
}

/* Mac : densité plus fine, largeur utile plus grande, pointer/trackpad et feuilles centrées. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  html, body { min-width: 560px; }

  body {
    padding: 28px clamp(28px, 5vw, 72px) 52px;
  }

  .page {
    width: min(100%, 840px);
    padding: 34px 42px 42px;
    border-radius: 28px;
    box-shadow: 0 18px 60px rgba(0,0,0,.045);
  }

  header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 28px;
  }

  header .kicker,
  header h1 { grid-column: 1; }

  .data-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: end;
    grid-template-columns: repeat(2, auto);
    gap: 8px;
    margin: 0 0 2px;
  }

  .data-button {
    min-width: 128px;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 12px;
  }

  .hero {
    padding: 18px 0 20px;
  }

  .month-settings-button {
    width: 34px;
    height: 34px;
    min-height: 34px;
    border-radius: 10px;
  }

  .income-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .months-wrap { margin-bottom: 24px; }
  .months {
    justify-content: space-between;
    overflow: visible;
    gap: 4px;
    padding: 4px 0 8px;
  }
  .month-button {
    min-width: 0;
    min-height: 30px;
    padding: 0 9px;
    border-radius: 9px;
    font-size: 10.5px;
  }

  .expense-tabs {
    top: 12px;
    width: 100%;
    min-height: 0;
  }

  .expense-tab { min-height: 46px; }

  .mini-add,
  .income-add,
  .category-add-expense {
    min-height: 32px;
  }

  .category-action {
    min-height: 30px;
    padding-inline: 9px;
  }
  .category-toggle {
    width: 30px;
    height: 30px;
    min-height: 30px;
    flex-basis: 30px;
  }

  .copy-month-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .copy-month-button,
  .copy-confirm-button,
  .sheet-button {
    min-height: 36px;
  }

  .sheet-backdrop {
    align-items: center;
    padding: 34px;
  }

  .sheet {
    width: min(100%, 500px);
    max-height: min(82vh, 760px);
    padding: 22px 24px 24px;
    border: 1px solid rgba(126,118,105,.24);
    border-radius: 22px;
    box-shadow: 0 22px 70px rgba(0,0,0,.13);
  }

  .sheet-handle { display: none; }

  .field input {
    min-height: 38px;
    border-radius: 10px;
    font-size: 14px;
  }

  .settings-row {
    min-height: 42px;
    font-size: 14px;
  }

  .copy-back {
    width: 32px;
    height: 32px;
    min-height: 32px;
    border-radius: 9px;
  }

  /* Sur Mac, le survol révèle les actions sans imposer un geste tactile. */
  .swipe-row:not(.open):hover .swipe-content {
    transform: translateX(-108px);
    background: rgba(216,193,167,.62);
    border-radius: 16px;
  }
  .swipe-row:not(.open):hover .swipe-actions {
    width: 108px;
  }
  .swipe-row:not(.open):hover .swipe-action {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  .swipe-row:not(.open):hover .swipe-action span {
    display: none;
  }

  button:hover,
  .data-button:hover,
  .copy-month-button:hover,
  .settings-row:hover {
    border-color: rgba(23,23,23,.18);
  }

  .category-action:hover,
  .category-toggle:hover,
  .mini-add:hover,
  .income-add:hover,
  .category-add-expense:hover,
  .month-settings-button:hover,
  .data-button:hover,
  .copy-month-button:hover,
  .copy-back:hover,
  .sheet-button:hover,
  .copy-confirm-button:hover {
    background: rgba(23,23,23,.045);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #CFC7BB;
    --muted: #545454;
    --light: #666666;
  }
  .data-button,
  .month-settings-button,
  .mini-add,
  .income-add,
  .category-action,
  .category-toggle,
  .copy-month-button,
  .field input {
    border-width: 1.5px;
  }
}

/* ===== Style inspiré de l'app Crédit Agricole ===== */
:root {
  --bg: #F3F5F7;
  --paper: #FFFFFF;
  --text: #18212A;
  --muted: #6F7690;
  --light: #8A90A7;
  --line: #E6EBF0;
  --soft: #EEF4F0;
  --edit: #AAB3C4;
  --delete: #D86D65;
  --mail-row: #EAF2ED;
  --ca-accent: #2F7D68;
  --ca-accent-soft: #E4F0EA;
  --ca-bluegrey: #707998;
}

html, body {
  background: var(--bg);
}

body {
  color: var(--text);
  accent-color: var(--ca-accent);
}

.page {
  background: transparent;
  padding-bottom: calc(var(--safe-bottom) + 76px);
}

header {
  margin-bottom: 18px;
}

.kicker {
  color: var(--ca-bluegrey);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15px;
  text-transform: none;
  margin-bottom: 8px;
}

h1 {
  color: var(--text);
  font-size: clamp(34px, 10vw, 50px);
  line-height: 1.02;
  letter-spacing: -1.2px;
  font-weight: 800;
}

.hero,
.income-block,
.month-balance,
.expense-tabs,
.variable-category,
.sheet,
.plain-list .swipe-row {
  border: 0;
  background: var(--paper);
  box-shadow: 0 6px 28px rgba(66, 83, 104, 0.06);
}

.hero {
  padding: 18px 18px 16px;
  margin-bottom: 16px;
  border-radius: 26px;
}

.hero-label {
  color: var(--ca-bluegrey);
  font-size: 20px;
  font-weight: 700;
}

.month-settings-button {
  border: 0;
  border-radius: 18px;
  background: #EFF2F4;
  color: #1F5965;
  box-shadow: none;
}

.data-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.data-button {
  border: 0;
  border-radius: 16px;
  background: #FFFFFF;
  color: var(--ca-accent);
  box-shadow: 0 4px 20px rgba(66, 83, 104, 0.06);
  font-weight: 700;
}

.income-block {
  margin-top: 0;
  padding: 18px;
  border-radius: 28px;
}

.income-block-title,
.month-balance-title,
.section-title,
.settings-sheet-subtitle,
.month-balance-stat-label,
.category-metric-label {
  color: var(--ca-bluegrey);
}

.income-add,
.mini-add,
.add-button,
.copy-month-button,
.copy-back,
.category-action,
.category-toggle,
.category-add-expense,
.sheet-button,
.copy-confirm-button {
  border: 0;
  background: #F5F7F8;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(47, 125, 104, 0.08);
}

.income-add,
.mini-add,
.category-add-expense,
.sheet-button.primary,
.copy-confirm-button.primary {
  color: var(--ca-accent);
  font-weight: 700;
}

.sheet-button.primary,
.copy-confirm-button.primary {
  background: var(--ca-accent-soft);
  border-color: transparent;
  box-shadow: none;
}

.income-grid {
  gap: 10px;
}

.income-grid .swipe-row {
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px rgba(230, 235, 240, 0.95);
}

.income-grid .swipe-content {
  min-height: 90px;
  padding: 16px;
  border-radius: 20px;
  background: #FBFCFD;
}

.income-grid .line-title {
  font-size: 16px;
  font-weight: 700;
}

.income-grid .amount {
  color: var(--ca-accent);
  font-size: 18px;
  font-weight: 800;
}

.months-wrap {
  width: 100%;
  margin-left: 0;
  margin-bottom: 18px;
}

.months {
  gap: 8px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.month-button {
  min-width: 58px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 16px;
  background: #FFFFFF;
  color: var(--text);
  box-shadow: 0 4px 20px rgba(66, 83, 104, 0.05);
  font-size: 11px;
  font-weight: 700;
}

.month-button.active {
  background: var(--ca-accent-soft);
  color: var(--ca-accent);
  box-shadow: none;
}

.month-balance {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 28px;
}

.month-balance-title {
  margin-bottom: 15px;
  color: var(--ca-bluegrey);
  font-size: 12px;
  font-weight: 800;
}

.month-balance-amount,
.month-balance-state {
  color: var(--text);
  font-size: clamp(20px, 6vw, 26px);
  font-weight: 800;
}

.month-balance-state.over,
.category-metric-value.over,
.month-balance-foot.over {
  color: #C0544A;
}

.month-balance-progress {
  height: 8px;
  background: #E7F0EB;
  border-radius: 999px;
  margin-top: 16px;
}

.month-balance-progress-bar {
  background: linear-gradient(90deg, var(--ca-accent), #64A28C);
}

.month-balance-progress-bar.over {
  background: linear-gradient(90deg, #C0544A, #E49385);
}

.month-balance-foot {
  margin-top: 10px;
  color: var(--ca-bluegrey);
  font-size: 12px;
}

.expense-tabs {
  position: sticky;
  top: calc(var(--safe-top) + 12px);
  z-index: 9;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px;
  border-radius: 28px;
  background: #FFFFFF;
  transition: grid-template-columns 180ms ease;
}

.expense-tabs.mode-single {
  grid-template-columns: 1fr;
}

.expense-tabs.mode-fixed .expense-tab[data-expense-tab="variable"],
.expense-tabs.mode-variable .expense-tab[data-expense-tab="fixed"] {
  display: none;
}

.expense-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 92px;
  padding: 12px 10px;
  border-radius: 24px;
  background: #F8FAFB;
  color: var(--ca-bluegrey);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.expense-tab.active {
  background: var(--ca-accent-soft);
  color: var(--ca-accent);
  box-shadow: none;
}

.expense-tab-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1px;
}

.expense-tab-value {
  font-size: clamp(14px, 4.9vw, 17px);
  line-height: 1.15;
  font-weight: 800;
  text-align: center;
}

.expense-tab-value.over,
.expense-tab-label.over {
  color: #C0544A;
}

.plain-list {
  border-top: 0;
}

.swipe-row {
  padding: 0;
  margin-bottom: 10px;
  border: 0;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 6px 24px rgba(66, 83, 104, 0.05);
}

.swipe-actions {
  top: 6px;
  right: 6px;
  bottom: 6px;
}

.swipe-action.edit {
  background: #BFC8D6;
}

.swipe-action.delete {
  background: #E4857B;
}

.swipe-content {
  min-height: 70px;
  padding: 16px;
  border-radius: 22px;
  background: #FFFFFF;
}

.swipe-row.open .swipe-content {
  background: #EEF5F1;
  border-radius: 22px;
}

.line-title {
  font-size: 15px;
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -0.15px;
}

.amount {
  font-size: 16px;
  font-weight: 800;
}

.variable-categories {
  gap: 14px;
}

.variable-category {
  border-radius: 28px;
  overflow: hidden;
}

.category-head {
  padding: 18px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F7FAF8 100%);
  border-bottom: 0;
}

.category-name {
  font-size: clamp(16px, 5.3vw, 18px);
  line-height: 1.2;
  font-weight: 800;
  color: var(--text);
}

.category-actions {
  gap: 8px;
}

.category-action,
.category-toggle {
  border-radius: 14px;
  min-height: 36px;
  padding: 0 12px;
  background: #FFFFFF;
  color: var(--text);
  font-size: 14px;
}

.category-action.danger {
  color: #B23A31;
}

.category-metrics {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: #F7FAF8;
  gap: 10px;
  align-items: end;
}

.category-metric-label {
  font-size: 10px;
  font-weight: 800;
}

.category-metric-value {
  font-size: 15px;
  font-weight: 800;
}

.category-progress {
  grid-column: 1 / -1;
  position: relative;
  height: 8px;
  margin-top: 8px;
  background: #E7F0EB;
  border-radius: 999px;
  overflow: visible;
}

.category-progress-bar {
  background: linear-gradient(90deg, var(--ca-accent), #64A28C);
}

.category-progress-bar.over {
  background: linear-gradient(90deg, #C0544A, #E49385);
}

.category-progress-label {
  height: 20px;
  min-width: 30px;
  padding: 0 6px;
  font-size: 9.5px;
}

.category-budget-missing {
  grid-column: 1 / -1;
  margin-top: 2px;
  font-size: 12px;
}

.category-list {
  padding: 0 18px 12px;
}

.category-empty,
.category-budget-missing,
.empty {
  color: var(--ca-bluegrey);
}

.category-add-expense {
  width: 100%;
  margin: 8px 0 10px;
  border: 0;
  border-radius: 16px;
  background: #F5F7F8;
  color: var(--ca-accent);
  box-shadow: inset 0 0 0 1px rgba(47, 125, 104, 0.08);
}

.settings-list {
  border-top-color: var(--line);
}

.settings-row {
  border-bottom-color: var(--line);
  color: var(--text);
}

.copy-month-button[disabled] {
  opacity: .4;
  box-shadow: none;
}

.ca-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 18;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  padding: 6px max(10px, calc(var(--safe-right) + 10px)) calc(var(--safe-bottom) + 5px) max(10px, calc(var(--safe-left) + 10px));
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(230, 235, 240, 0.95);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
}

.ca-bottom-link,
.ca-bottom-button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 1px 0 0;
  text-decoration: none;
  color: var(--ca-bluegrey);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
}

.ca-bottom-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 140ms ease, color 140ms ease;
}

.ca-bottom-link.active,
.ca-bottom-button:active {
  color: var(--ca-accent);
  font-weight: 750;
}

.ca-bottom-link.active .ca-bottom-icon {
  transform: translateY(-1px);
  stroke-width: 2.25;
}

/* Navigation basse : une seule destination visuellement active à la fois. */
.ca-bottom-nav .ca-bottom-link {
  color: var(--ca-bluegrey) !important;
  font-weight: 600 !important;
}

body[data-active-nav="income"] .ca-bottom-link[data-ca-target="income"],
body[data-active-nav="fixed"] .ca-bottom-link[data-ca-target="fixed"],
body[data-active-nav="variable"] .ca-bottom-link[data-ca-target="variable"],
body[data-active-nav="menu"] .ca-bottom-link[data-ca-target="menu"],
body[data-active-nav="profile"] .ca-bottom-link[data-ca-target="profile"] {
  color: var(--ca-accent) !important;
  font-weight: 750 !important;
}

.ca-bottom-nav .ca-bottom-link .ca-bottom-icon,
.ca-bottom-nav .ca-bottom-link .ca-bottom-icon path,
.ca-bottom-nav .ca-bottom-link .ca-bottom-icon rect,
.ca-bottom-nav .ca-bottom-link .ca-bottom-icon circle,
.ca-bottom-nav .ca-bottom-link .ca-bottom-icon line,
.ca-bottom-nav .ca-bottom-link .ca-bottom-icon polyline {
  stroke: currentColor !important;
}

body[data-active-nav="income"] .ca-bottom-link[data-ca-target="income"] .ca-bottom-icon,
body[data-active-nav="fixed"] .ca-bottom-link[data-ca-target="fixed"] .ca-bottom-icon,
body[data-active-nav="variable"] .ca-bottom-link[data-ca-target="variable"] .ca-bottom-icon,
body[data-active-nav="menu"] .ca-bottom-link[data-ca-target="menu"] .ca-bottom-icon,
body[data-active-nav="profile"] .ca-bottom-link[data-ca-target="profile"] .ca-bottom-icon {
  transform: translateY(-1px);
  stroke-width: 2.25 !important;
}

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  body {
    background: linear-gradient(180deg, #F3F5F7 0%, #EEF2F5 100%);
  }

  .page {
    width: min(100%, 930px);
    padding: 34px 40px 42px;
    border: 0;
    border-radius: 34px;
    background: transparent;
    box-shadow: none;
  }

  header {
    align-items: center;
  }

  .kicker {
    margin-bottom: 10px;
  }

  .data-actions {
    margin-top: 0;
  }

  .data-button {
    min-width: 138px;
    min-height: 42px;
  }

  .hero,
  .income-block,
  .month-balance,
  .expense-tabs,
  .variable-category,
  .plain-list .swipe-row {
    box-shadow: 0 10px 36px rgba(66, 83, 104, 0.07);
  }

  .months {
    justify-content: flex-start;
    gap: 10px;
  }

  .month-button {
    min-height: 42px;
  }

  .income-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ca-bottom-nav {
    position: sticky;
    width: min(100%, 930px);
    margin: 18px auto 0;
    border: 0;
    border-radius: 28px;
    box-shadow: 0 12px 40px rgba(66, 83, 104, 0.08);
  }
}

/* macOS : utiliser toute la fenêtre tout en conservant une marge extérieure confortable.
   Cette règle ne touche pas l’iPhone/iPad tactile. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  body {
    padding: clamp(22px, 2.4vw, 34px) clamp(24px, 3.2vw, 52px) 38px;
  }

  .page {
    width: 100%;
    max-width: none;
    min-height: calc(100dvh - 72px);
    margin: 0 auto;
    padding: 34px clamp(36px, 3.6vw, 58px) 42px;
  }

  .ca-bottom-nav {
    width: 100%;
    max-width: none;
  }
}

/* Override : border-radius réduit sur les cellules principales */
.hero,
.income-block,
.month-balance,
.expense-tabs,
.variable-category,
.sheet,
.plain-list .swipe-row,
.income-summary-card,
.income-summary-cards {
  border-radius: 16px !important;
}

.expense-tab,
.income-grid .swipe-row,
.income-grid .swipe-content,
.swipe-row,
.swipe-content,
.swipe-row.open .swipe-content,
.month-settings-button,
.category-metrics,
.category-head,
.month-balance-stat,
.summary-tile,
.summary-block {
  border-radius: 12px !important;
}

.month-button,
.data-button,
.income-add,
.mini-add,
.add-button,
.copy-month-button,
.copy-back,
.category-action,
.category-toggle,
.category-add-expense,
.sheet-button,
.copy-confirm-button,
.swipe-action {
  border-radius: 0 !important;
}

.ca-bottom-nav {
  border-radius: 16px 16px 0 0 !important;
}


/* PWA iPhone : barre fine, mais physiquement collée au bas de l’écran.
   La safe area fait partie du fond de la barre afin qu’aucun contenu ne passe dessous. */
@media (display-mode: standalone) and (max-width: 700px) and (hover: none) and (pointer: coarse) {
  .page {
    padding-bottom: calc(var(--safe-bottom) + 64px) !important;
  }

  .ca-bottom-nav {
    left: 0;
    right: 0;
    bottom: 0;
    gap: 0;
    padding: 2px max(8px, calc(var(--safe-right) + 8px)) max(22px, calc(var(--safe-bottom) - 2px)) max(8px, calc(var(--safe-left) + 8px));
    border-radius: 14px 14px 0 0 !important;
    box-shadow: 0 -3px 14px rgba(39, 55, 72, 0.045);
  }

  .ca-bottom-link,
  .ca-bottom-button {
    min-height: 36px;
    padding: 0;
    gap: 1px;
    font-size: 10.75px;
    line-height: 1;
    letter-spacing: -0.01em;
  }

  .ca-bottom-icon {
    width: 24px;
    height: 24px;
  }

  .ca-bottom-link.active .ca-bottom-icon,
  body[data-active-nav="income"] .ca-bottom-link[data-ca-target="income"] .ca-bottom-icon,
  body[data-active-nav="fixed"] .ca-bottom-link[data-ca-target="fixed"] .ca-bottom-icon,
  body[data-active-nav="variable"] .ca-bottom-link[data-ca-target="variable"] .ca-bottom-icon,
  body[data-active-nav="menu"] .ca-bottom-link[data-ca-target="menu"] .ca-bottom-icon,
  body[data-active-nav="profile"] .ca-bottom-link[data-ca-target="profile"] .ca-bottom-icon {
    transform: none;
  }
}

/* iOS v36 : cible directe via la détection JS, afin que la barre soit réellement plus fine. */
html.is-ios .page {
  padding-bottom: calc(var(--safe-bottom) + 60px) !important;
}

html.is-ios .ca-bottom-nav {
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  gap: 0 !important;
  padding-top: 8px !important;
  padding-right: max(8px, calc(var(--safe-right) + 8px)) !important;
  padding-bottom: max(18px, calc(var(--safe-bottom) - 4px)) !important;
  padding-left: max(8px, calc(var(--safe-left) + 8px)) !important;
  border-radius: 12px 12px 0 0 !important;
}

html.is-ios .ca-bottom-link,
html.is-ios .ca-bottom-button {
  min-height: 35px !important;
  padding: 0 !important;
  gap: 1px !important;
  font-size: 10.75px !important;
  line-height: 1 !important;
}

html.is-ios .ca-bottom-icon {
  width: 24px !important;
  height: 24px !important;
}

/* Override : résumé fixe/variable plus fin en mode cellule unique */
.expense-tabs.mode-single {
  padding: 10px !important;
}

.expense-tabs.mode-single .expense-tab {
  min-height: 68px !important;
  padding: 14px 18px !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

.expense-tabs.mode-single .expense-tab-label,
.expense-tabs.mode-single .expense-tab-value {
  display: block !important;
  margin: 0 !important;
  line-height: 1.1 !important;
}

.expense-tabs.mode-single .expense-tab-label {
  font-size: 14px !important;
  text-align: left !important;
  flex: 0 0 auto;
}

.expense-tabs.mode-single .expense-tab-value {
  font-size: clamp(16px, 5vw, 20px) !important;
  text-align: right !important;
  flex: 1 1 auto;
  white-space: nowrap;
}

/* Override : entêtes de catégories plus compactes */
.category-topline {
  align-items: center !important;
  gap: 8px !important;
}

.category-name {
  font-size: 15px !important;
  line-height: 1.15 !important;
  font-weight: 760 !important;
  letter-spacing: -0.2px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.category-actions {
  gap: 5px !important;
  flex: 0 0 auto !important;
}

.category-action {
  min-height: 32px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 760 !important;
  border-radius: 0 !important;
}

.category-toggle {
  width: 32px !important;
  height: 32px !important;
  flex: 0 0 32px !important;
  border-radius: 10px !important;
}

.category-head {
  padding: 14px !important;
}

.settings-row[for="import-file"] {
  cursor: pointer;
}

/* Sans roue dentée : le mois occupe naturellement toute la ligne */
.hero-row {
  display: block !important;
}

.hero-label {
  width: 100%;
}

/* Override : pas de blanc derrière les actions swipe */
.swipe-row {
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.plain-list .swipe-row {
  background: transparent !important;
  box-shadow: none !important;
}

.swipe-actions {
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  padding-left: 8px !important;
  width: 154px !important;
  z-index: 0 !important;
}

.swipe-content {
  box-shadow: 0 6px 24px rgba(66, 83, 104, 0.05) !important;
  position: relative !important;
  z-index: 1 !important;
}

.expense-tabs.mode-single .expense-tab-label.over,
.expense-tabs.mode-single .expense-tab-value.over {
  color: #C0544A !important;
}

.expense-tabs.mode-income {
  grid-template-columns: 1fr;
}

.expense-tabs.mode-income .expense-tab[data-expense-tab="variable"] {
  display: none;
}

.expense-tabs.mode-income .expense-tab-label.over,
.expense-tabs.mode-income .expense-tab-value.over {
  color: #C0544A;
}

.copy-confirm-button.danger-confirm {
  background: #C0544A !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
}

/* Override : le résumé ne doit plus être sticky */
.expense-tabs {
  position: static !important;
  top: auto !important;
}

.auto-fixed-row {
  background: transparent !important;
}

.auto-fixed-row:not(.pea-edit-swipe) .swipe-content {
  transform: none !important;
  background: #F4F8F5 !important;
  border: 1px solid rgba(47, 125, 104, 0.12);
}

.auto-fixed-row .line-sub {
  color: var(--ca-accent);
  font-size: 11px;
  font-weight: 650;
}

.auto-fixed-row .amount {
  color: var(--ca-accent);
}

/* Résumé revenus : 3 lignes */
.expense-tabs.mode-income {
  grid-template-columns: 1fr !important;
}

.expense-tabs.mode-income .expense-tab {
  display: flex !important;
}

.expense-tabs.mode-fixed .expense-tab:not([data-expense-tab="fixed"]),
.expense-tabs.mode-variable .expense-tab:not([data-expense-tab="variable"]) {
  display: none !important;
}

.expense-tab-note {
  display: none;
}

.expense-tabs.mode-income .expense-tab {
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  row-gap: 8px !important;
}

.expense-tabs.mode-income .expense-tab-note {
  display: block !important;
  width: 100%;
  font-size: 11px;
  line-height: 1.3;
  color: var(--ca-bluegrey);
  opacity: .95;
}

.expense-tabs.mode-income .expense-tab-note.over {
  color: #C0544A;
}

.expense-tabs.mode-income .expense-tab-label {
  flex: 0 0 auto;
}

.expense-tabs.mode-income .expense-tab-value {
  flex: 0 0 auto;
}

.income-summary {
  margin: 12px 0 18px;
  padding: 18px 20px;
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 0 6px 24px rgba(66, 83, 104, 0.05);
}

.income-summary-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ca-bluegrey);
  margin-bottom: 12px;
}

.income-summary-list {
  display: grid;
  gap: 12px;
}

.income-summary-item {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

.income-summary-item strong {
  color: var(--ca-green);
  font-weight: 800;
}

.income-summary-item.over strong {
  color: #C0544A;
}

.income-summary {
  padding: 20px 22px;
  border-radius: 22px;
  background: #FFFFFF;
  border: 1px solid rgba(123, 132, 171, 0.08);
  box-shadow: 0 6px 24px rgba(66, 83, 104, 0.05);
}

.income-summary-title {
  margin-bottom: 10px;
}

.income-summary-list {
  gap: 10px;
}

.income-summary-item {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

.income-summary-item strong {
  white-space: nowrap;
}


.income-summary {
  margin: 12px 0 18px;
  padding: 18px;
  border-radius: 24px;
  background: #FFFFFF;
  box-shadow: 0 6px 24px rgba(66, 83, 104, 0.05);
  border: 1px solid rgba(123, 132, 171, 0.08);
}

.income-summary-title {
  margin: 2px 4px 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ca-bluegrey);
}

.income-summary-cards {
  display: grid;
  gap: 12px;
}

.income-summary-card {
  padding: 16px 18px;
  border-radius: 20px;
  background: #F7F8FC;
  border: 1px solid rgba(123, 132, 171, 0.08);
}

.income-summary-card.primary {
  background: rgba(201, 224, 215, 0.48);
  border-color: rgba(61, 139, 117, 0.10);
}

.income-summary-card.over {
  background: rgba(240, 215, 211, 0.35);
  border-color: rgba(192, 84, 74, 0.10);
}

.income-summary-step {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--ca-bluegrey);
}

.income-summary-card.primary .income-summary-step,
.income-summary-card.primary .income-summary-amount {
  color: var(--ca-green);
}

.income-summary-card.over .income-summary-step,
.income-summary-card.over .income-summary-amount {
  color: #C0544A;
}

.income-summary-amount {
  font-size: clamp(20px, 4.8vw, 24px);
  line-height: 1.05;
  font-weight: 800;
  color: var(--text);
  word-break: break-word;
}

.income-summary-note {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ca-bluegrey);
}

.income-summary-note-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  list-style: disc;
}

.income-summary-note-list li {
  margin: 0;
}


/* IMPORTANT: les anciennes cellules de résumé ne doivent jamais apparaître dans Revenus */
.expense-tabs[hidden] {
  display: none !important;
}


/* PEA automatique : activation mensuelle */
.auto-fixed-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.pea-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 28px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pea-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.pea-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #D8DDE3;
  transition: background-color 160ms ease;
}

.pea-toggle-track::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  transition: transform 160ms cubic-bezier(.2,.8,.2,1);
}

.pea-toggle input:checked + .pea-toggle-track {
  background: var(--ca-accent);
}

.pea-toggle input:checked + .pea-toggle-track::after {
  transform: translateX(18px);
}

.pea-toggle input:focus-visible + .pea-toggle-track {
  outline: 2px solid var(--ca-accent);
  outline-offset: 2px;
}

@media (max-width: 430px) {
  .auto-fixed-right { gap: 8px; }
  .pea-toggle { width: 42px; height: 26px; }
  .pea-toggle-track::after { width: 22px; height: 22px; }
  .pea-toggle input:checked + .pea-toggle-track::after { transform: translateX(16px); }
}


/* PEA auto : titre/montant/switch sur la 1re ligne, explication en dessous */
.auto-fixed-row .swipe-content {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-rows: auto auto !important;
  column-gap: 12px !important;
  row-gap: 5px !important;
  align-items: center !important;
}

.auto-fixed-row .auto-fixed-title {
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
}

.auto-fixed-row .auto-fixed-right {
  grid-column: 2;
  grid-row: 1;
}

.auto-fixed-row .line-sub {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: clip;
  font-size: 10.5px !important;
  line-height: 1.2 !important;
}

@media (max-width: 390px) {
  .auto-fixed-row .line-sub {
    font-size: 10px !important;
    letter-spacing: -0.08px;
  }
}


/* Alignement visuel catégorie : un seul effet cellule autour des métriques + barre */
.variable-category .category-head {
  background: transparent !important;
}

.variable-category .category-metrics {
  width: 100% !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  background: #F7FAF8 !important;
  border: 1px solid rgba(47, 125, 104, 0.06) !important;
  overflow: hidden !important;
}

.variable-category .category-progress {
  width: 100% !important;
  box-sizing: border-box !important;
}


/* Paramètres du mois : bottom sheet interactif façon iOS */
#month-settings-sheet .sheet {
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

#month-settings-sheet .sheet-handle,
#month-settings-sheet #month-settings-title,
#month-settings-sheet #month-settings-subtitle {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#month-settings-sheet.dragging {
  -webkit-backdrop-filter: blur(10px) saturate(125%);
  backdrop-filter: blur(10px) saturate(125%);
}

#month-settings-sheet.dragging .sheet {
  transition: none !important;
}

.ca-bottom-icon-options {
  width: 22px !important;
  height: 22px !important;
  stroke-width: 1.75 !important;
}


/* Même roue qu'avant, mais centrée optiquement dans le même cadre que les autres icônes */
.ca-bottom-icon-frame {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  margin-inline: auto;
  line-height: 0;
}

.ca-bottom-icon-frame .ca-bottom-icon-options {
  width: 25px !important;
  height: 25px !important;
  display: block;
  margin: 0 auto !important;
  transform: none !important;
  transform-origin: 50% 50%;
  stroke-width: 1.9 !important;
}

.ca-bottom-link.active .ca-bottom-icon-frame .ca-bottom-icon-options {
  transform: translateY(-1px) !important;
}


/* Zoom désactivé : échelle native fixe. */
html, body {
  touch-action: pan-x pan-y;
  -ms-touch-action: pan-x pan-y;
}



/* Correction iOS : aucune cellule grise/décalée au toucher prolongé dans les options. */
.settings-list,
.settings-row,
.settings-row * {
  -webkit-tap-highlight-color: transparent;
}

.settings-row,
label.settings-row {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  transform: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  background-clip: padding-box;
}

.settings-row:active,
.settings-row:hover,
.settings-row:focus,
.settings-row:focus-visible,
label.settings-row:active,
label.settings-row:hover,
label.settings-row:focus,
label.settings-row:focus-visible {
  background: transparent !important;
  transform: none !important;
  box-shadow: none !important;
  outline: none !important;
  border-color: var(--line) !important;
}

.settings-row::before,
.settings-row::after {
  content: none !important;
  display: none !important;
}

.income-summary-card.single-summary { width: 100%; }

.single-summary .income-summary-note-list {
  gap: 9px;
  padding-left: 18px;
}
.single-summary .income-summary-note-list li:last-child {
  margin-top: 5px;
  font-weight: 800;
  color: var(--ca-green);
}

/* Onglet Fixes : style liste avec traits type Mail */
#fixed-section {
  padding-top: 22px;
  padding-bottom: 22px;
}

#fixed-section .plain-list {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
}

#fixed-section .swipe-row {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#fixed-section .swipe-row + .swipe-row {
  border-top: 1px solid var(--line);
}

#fixed-section .swipe-actions {
  top: 5px;
  right: 6px;
  bottom: 5px;
}

#fixed-section .swipe-content {
  min-height: 68px;
  padding: 14px 16px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#fixed-section .swipe-row.open .swipe-content {
  margin: 4px 0;
  border-radius: 18px;
  background: #EEF5F1;
}

#fixed-section .swipe-row.open + .swipe-row {
  border-top-color: transparent;
}

#fixed-section .empty {
  padding: 16px;
  border-bottom: 0;
}


/* Refonte complète onglet Fixes — inspiration Mail iOS */
#fixed-section {
  background: var(--paper);
  border-radius: 30px;
  padding: 22px 0 12px;
  overflow: hidden;
}

#fixed-section .section-head {
  padding: 0 28px 8px;
  margin-bottom: 2px;
}

#fixed-section .plain-list {
  margin-top: 4px;
  background: transparent;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

#fixed-section .empty {
  margin: 0;
  padding: 22px 28px;
  background: transparent;
  border-radius: 0;
  color: var(--muted);
  text-align: left;
}

#fixed-section .swipe-row {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
}

#fixed-section .swipe-actions {
  position: absolute;
  top: 50%;
  right: 16px;
  bottom: auto;
  left: auto;
  width: auto;
  transform: translateY(-50%);
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0;
  z-index: 1;
}

#fixed-section .swipe-action {
  width: 84px;
  height: 56px;
  border-radius: 28px;
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: none;
  opacity: 0;
  transform: translateX(14px) scale(0.88);
  transition: transform .22s ease, opacity .22s ease;
}

#fixed-section .swipe-action svg {
  width: 20px;
  height: 20px;
}

#fixed-section .swipe-action span {
  font-size: 12px;
  line-height: 1;
  font-weight: 560;
  letter-spacing: -0.12px;
}

#fixed-section .swipe-action.edit {
  background: #D7D7DE;
  color: #70758A;
}

#fixed-section .swipe-action.delete {
  background: #F04D43;
  color: #FFFFFF;
}

#fixed-section .swipe-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 16px 0 16px 28px;
  background: var(--paper);
  border-radius: 0;
  box-shadow: none;
  transition: transform .28s cubic-bezier(.22,.9,.24,1), border-radius .28s cubic-bezier(.22,.9,.24,1), background-color .28s ease, padding .28s cubic-bezier(.22,.9,.24,1);
}

#fixed-section .swipe-content::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line);
  transition: opacity .2s ease;
}

#fixed-section .swipe-row:last-child > .swipe-content::after,
#fixed-section .swipe-row:last-child > .swipe-content::after {
  display: none;
}

#fixed-section .line-title {
  min-width: 0;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 590;
  color: var(--ink);
}

#fixed-section .amount {
  padding-right: 28px;
  font-size: 17px;
  line-height: 1.1;
  font-weight: 690;
  color: var(--ink);
  white-space: nowrap;
}

#fixed-section .swipe-row.open .swipe-content {
  background: #D7D7DE;
  border-radius: 28px;
  padding-left: 28px;
  padding-right: 24px;
}

#fixed-section .swipe-row.open > .swipe-content::after {
  opacity: 0;
}

#fixed-section .swipe-row.open + .swipe-row > .swipe-content::before {
  opacity: 0;
}

#fixed-section .auto-fixed-row:not(.pea-edit-swipe) .swipe-content {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-rows: auto auto !important;
  column-gap: 12px !important;
  row-gap: 5px !important;
  align-items: center !important;
  transform: none !important;
  border-radius: 0 !important;
  background: var(--paper) !important;
  border: 0 !important;
  padding: 16px 0 16px 28px !important;
}

#fixed-section .auto-fixed-row .swipe-content::after {
  left: 28px;
  right: 0;
}

#fixed-section .auto-fixed-row .auto-fixed-title {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

#fixed-section .auto-fixed-row .auto-fixed-right {
  grid-column: 2;
  grid-row: 1;
  padding-right: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}

#fixed-section .auto-fixed-row .line-sub {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  padding-right: 28px;
  font-size: 13px !important;
  line-height: 1.2 !important;
  color: var(--muted) !important;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

#fixed-section .auto-fixed-row .amount {
  padding-right: 0;
  color: var(--ca-accent);
}

@media (max-width: 430px) {
  #fixed-section .swipe-action {
    width: 78px;
    height: 54px;
  }
}



/* === FIXES / MAIL iOS : version propre === */
#fixed-section {
  margin-left: -18px;
  margin-right: -18px;
  padding: 18px 18px 0;
  border-radius: 0 !important;
  background: #FFFFFF !important;
  overflow: visible !important;
  box-shadow: none !important;
}

#fixed-section .section-head {
  padding: 0 10px 12px !important;
  margin: 0 !important;
}

#fixed-section .plain-list {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #FFFFFF !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

#fixed-section .swipe-row {
  position: relative;
  width: 100%;
  min-height: 74px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #FFFFFF !important;
  box-shadow: none !important;
  overflow: hidden !important;
  isolation: isolate;
}

#fixed-section .swipe-row::before,
#fixed-section .swipe-row::after {
  content: none !important;
  display: none !important;
}

#fixed-section .swipe-content {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 74px;
  margin: 0 !important;
  padding: 16px 22px 16px 28px !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 0 !important;
  border-radius: 0 !important;
  background: #FFFFFF !important;
  box-shadow: none !important;
  transform: translate3d(0,0,0);
  transition:
    transform .48s cubic-bezier(.2,.82,.22,1),
    background-color .24s ease,
    border-radius .36s cubic-bezier(.2,.82,.22,1);
}

#fixed-section .swipe-content::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  left: 28px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #E3E4E7;
  opacity: 1;
  pointer-events: none;
}

#fixed-section .swipe-row:last-child .swipe-content::after {
  display: none !important;
}

#fixed-section .line-title {
  min-width: 0;
  font-size: 14px !important;
  line-height: 1.18 !important;
  font-weight: 620 !important;
  letter-spacing: -0.18px;
  color: #131820 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#fixed-section .amount {
  padding: 0 !important;
  font-size: 15px !important;
  line-height: 1.1 !important;
  font-weight: 690 !important;
  color: #131820 !important;
  white-space: nowrap;
}

#fixed-section .swipe-actions {
  position: absolute !important;
  z-index: 1;
  top: 8px !important;
  right: 10px !important;
  bottom: 8px !important;
  left: auto !important;
  width: 148px !important;
  height: auto !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  transform: none !important;
}

/* Quand une ligne est ouverte, on masque aussi le séparateur de la ligne précédente
   pour éviter les deux traits visibles au-dessus et en dessous. */
#fixed-section .swipe-row:has(+ .swipe-row.open) > .swipe-content::after {
  opacity: 0 !important;
}

#fixed-section .swipe-action {
  flex: 0 0 70px !important;
  width: 70px !important;
  min-width: 70px !important;
  height: 100% !important;
  padding: 0 4px !important;
  border: 0 !important;
  border-radius: 999px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  box-shadow: none !important;
  opacity: 0;
  transform: translate3d(14px,0,0) scale(.88);
  transition: opacity .16s ease, transform .20s cubic-bezier(.2,.82,.22,1);
}

#fixed-section .swipe-action.edit {
  background: #D0D0D6 !important;
  color: #6F7280 !important;
}

#fixed-section .swipe-action.edit { order: 1; }
#fixed-section .swipe-action.delete { order: 2; }

#fixed-section .swipe-action.delete {
  background: #F14E45 !important;
  color: #FFFFFF !important;
}

#fixed-section .swipe-action svg {
  width: 19px !important;
  height: 19px !important;
}

#fixed-section .swipe-action span {
  font-size: 10.5px !important;
  line-height: 1 !important;
  font-weight: 560 !important;
  letter-spacing: -0.08px;
}

#fixed-section .swipe-row.open .swipe-content {
  transform: translate3d(-172px,0,0) !important;
  background: #D9D9DF !important;
  border-radius: 0 28px 28px 0 !important;
}

#fixed-section .swipe-row.open .swipe-content::after {
  opacity: 0;
}

#fixed-section .swipe-row.open .swipe-action {
  opacity: 1;
  transform: translate3d(0,0,0) scale(1);
}

/* Automatiques : restent dans la même liste Mail, sans carte spéciale. */
#fixed-section .auto-fixed-row {
  background: #FFFFFF !important;
}

#fixed-section .auto-fixed-row .swipe-content {
  min-height: 82px !important;
  padding: 14px 22px 14px 28px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #FFFFFF !important;
  box-shadow: none !important;
}

#fixed-section .auto-fixed-row .swipe-content::after {
  left: 28px !important;
  right: 0 !important;
}

#fixed-section .auto-fixed-row .auto-fixed-right {
  padding-right: 0 !important;
}

#fixed-section .auto-fixed-row .line-sub {
  padding-right: 0 !important;
  color: #7B8091 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
}

#fixed-section .auto-fixed-row .amount {
  color: var(--ca-accent) !important;
}


/* Fixes : mouvement de fin de geste volontairement plus posé */
#fixed-section .swipe-row.open .swipe-content,
#fixed-section .swipe-row:not(.open) .swipe-content {
  transition-duration: .48s, .24s, .36s !important;
}



/* Résumé FIXE — une seule carte, inspirée du CSS Ma Banque CA */
.expense-tabs.mode-fixed {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  min-height: 78px !important;
  margin: 0 0 18px !important;
  padding: 16px 20px !important;
  border: 0 !important;
  border-radius: 22px !important;
  background: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(73, 88, 108, 0.025) !important;
}

.expense-tabs.mode-fixed .expense-tab:not([data-expense-tab="fixed"]) {
  display: none !important;
}

.expense-tabs.mode-fixed .expense-tab[data-expense-tab="fixed"] {
  display: contents !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
}

.expense-tabs.mode-fixed .expense-tab[data-expense-tab="fixed"] .expense-tab-label {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  color: #172231 !important;
  font-size: clamp(18px, 4.4vw, 22px) !important;
  line-height: 1.05 !important;
  font-weight: 620 !important;
  letter-spacing: -0.035em !important;
  text-align: left !important;
  white-space: nowrap !important;
}

.expense-tabs.mode-fixed .expense-tab[data-expense-tab="fixed"] .expense-tab-value {
  flex: 0 0 auto !important;
  margin: 0 !important;
  color: #087F68 !important;
  font-size: clamp(22px, 5vw, 27px) !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  letter-spacing: -0.045em !important;
  text-align: right !important;
  white-space: nowrap !important;
}

.expense-tabs.mode-fixed .expense-tab[data-expense-tab="fixed"] .expense-tab-note {
  display: none !important;
}

.expense-tabs.mode-fixed .expense-tab[data-expense-tab="fixed"].active {
  background: transparent !important;
  box-shadow: none !important;
}



/* Résumé VARIABLE — même échelle / CSS Ma Banque que Fixe */
.expense-tabs.mode-variable {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  min-height: 78px !important;
  margin: 0 0 18px !important;
  padding: 16px 20px !important;
  border: 0 !important;
  border-radius: 22px !important;
  background: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(73, 88, 108, 0.025) !important;
}

.expense-tabs.mode-variable .expense-tab:not([data-expense-tab="variable"]) {
  display: none !important;
}

.expense-tabs.mode-variable .expense-tab[data-expense-tab="variable"] {
  display: contents !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
}

.expense-tabs.mode-variable .expense-tab[data-expense-tab="variable"] .expense-tab-label {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  color: #172231 !important;
  font-size: clamp(18px, 4.4vw, 22px) !important;
  line-height: 1.05 !important;
  font-weight: 620 !important;
  letter-spacing: -0.035em !important;
  text-align: left !important;
  white-space: nowrap !important;
}

.expense-tabs.mode-variable .expense-tab[data-expense-tab="variable"] .expense-tab-value {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  color: #087F68 !important;
  font-size: clamp(19px, 4.5vw, 24px) !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  letter-spacing: -0.04em !important;
  text-align: right !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.expense-tabs.mode-variable .expense-tab[data-expense-tab="variable"] .expense-tab-note {
  display: none !important;
}

.expense-tabs.mode-variable .expense-tab[data-expense-tab="variable"].active {
  background: transparent !important;
  box-shadow: none !important;
}



/* PEA / réserve : transition fluide activé ↔ désactivé */
.pea-toggle-track {
  transition: background-color 280ms cubic-bezier(.22,.8,.2,1), box-shadow 280ms ease !important;
}

.pea-toggle-track::after {
  transition: transform 320ms cubic-bezier(.22,1.15,.3,1), box-shadow 280ms ease !important;
  will-change: transform;
}

.pea-toggle:active .pea-toggle-track::after {
  transform: scale(.94);
}

.pea-toggle input:checked + .pea-toggle-track::after {
  transform: translateX(18px);
}

@media (max-width: 430px) {
  .pea-toggle input:checked + .pea-toggle-track::after {
    transform: translateX(16px);
  }
}

.auto-fixed-row .amount,
.auto-fixed-row .line-sub {
  transition: opacity 160ms ease, transform 220ms cubic-bezier(.22,.8,.2,1), color 220ms ease !important;
}

.auto-fixed-row.auto-toggle-changing .amount,
.auto-fixed-row.auto-toggle-changing .line-sub {
  opacity: .35;
  transform: translateY(2px);
}

.auto-fixed-row.auto-toggle-settled .amount,
.auto-fixed-row.auto-toggle-settled .line-sub {
  opacity: 1;
  transform: translateY(0);
}


/* === Sélecteur de mois natif iOS + moyenne variable 12 mois === */
.hero-month-row {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.hero-period-label {
  color: var(--ca-bluegrey);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.native-month-picker,
.native-period-picker {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  outline: 0;
  background-color: #F5F7F8;
  color: #172231;
  font: inherit;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 720;
  letter-spacing: -0.025em;
  -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(47, 125, 104, 0.06);
}

.native-month-picker {
  -webkit-appearance: auto;
  appearance: auto;
  color-scheme: light;
}

.native-month-picker:focus,
.native-month-picker:focus-visible,
.native-period-picker:focus,
.native-period-picker:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(47, 125, 104, 0.18);
}

.period-fallback {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(92px, .65fr);
  gap: 8px;
}

.period-fallback.visible {
  display: grid;
}

.native-month-picker.unsupported {
  display: none;
}

/* Dans Variables, la note devient l’indicateur de moyenne annuelle. */
.expense-tabs.mode-variable {
  flex-wrap: wrap !important;
}

.expense-tabs.mode-variable .expense-tab[data-expense-tab="variable"] .expense-tab-note {
  display: block !important;
  flex: 0 0 100% !important;
  width: 100% !important;
  margin: -2px 0 0 !important;
  color: var(--ca-bluegrey) !important;
  font-size: 11.5px !important;
  line-height: 1.3 !important;
  font-weight: 600 !important;
  text-align: left !important;
}



/* v46 : safe zone iOS augmentée pour éloigner la navigation du bord inférieur. */
.mac-period-summary-row { display: contents; }
.mac-context-summary { display: none !important; }

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  html.is-macos header {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(330px, 500px);
    grid-template-rows: auto auto;
    column-gap: 28px;
    align-items: end;
    margin-bottom: 24px;
  }

  html.is-macos header .kicker {
    grid-column: 1;
    grid-row: 1;
  }

  html.is-macos header h1 {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
  }

  html.is-macos header #month-header.mac-header-period {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    margin: 0 !important;
    padding: 12px 16px !important;
    min-width: 0;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    border: 0 !important;
    border-radius: 24px !important;
    background: #FFFFFF !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  html.is-macos header #month-header.mac-header-period .period-control {
    width: 100%;
    min-height: 0;
    height: auto;
    padding: 0;
    display: flex;
    align-items: center;
  }

  html.is-macos header #month-header.mac-header-period .period-control-copy,
  html.is-macos header #month-header.mac-header-period .period-control-chevron,
  html.is-macos header #month-header.mac-header-period .period-native-overlay {
    display: none !important;
  }

  html.is-macos header #month-header.mac-header-period .period-fallback.visible {
    position: static;
    inset: auto;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(110px, .65fr);
    gap: 8px;
    align-items: center;
    background: transparent;
  }

  html.is-macos header #month-header.mac-header-period .period-fallback.visible .native-period-picker {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 12px !important;
    font-size: 16px !important;
    border-radius: 10px !important;
    background: #F4F6F7 !important;
    box-shadow: none !important;
  }

  html.is-macos .mac-period-summary-row {
    display: none !important;
  }

  /* Plus de grosse cellule dédiée aux revenus en haut. */
  html.is-macos .expense-tabs {
    display: none !important;
  }
}




/* === Sélecteur de période intégré : le contrôle iOS reste natif mais invisible === */
#month-header.period-hero {
  position: relative;
  padding: 0 !important;
  min-height: 0;
  overflow: hidden;
}

.period-control {
  position: relative;
  width: 100%;
  min-height: 76px;
  padding: 15px 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.period-control-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.period-control-kicker {
  margin-bottom: 5px;
  color: var(--ca-bluegrey);
  font-size: 11px;
  line-height: 1;
  font-weight: 760;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.period-control-value {
  min-width: 0;
  color: #172231;
  font-size: clamp(19px, 5.2vw, 22px);
  line-height: 1.05;
  font-weight: 790;
  letter-spacing: -.035em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.period-control-chevron {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #F2F5F6;
  color: var(--ca-accent);
  transition: transform 120ms ease, background-color 120ms ease;
}

.period-control-chevron svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.period-control:active .period-control-chevron {
  transform: scale(.94);
  background: #E9F1ED;
}

/* L'input couvre la ligne entière : iOS ouvre son sélecteur système au toucher,
   sans imposer son champ gris au design de l'application. */
.native-month-picker.period-native-overlay {
  position: absolute !important;
  inset: 0 !important;
  z-index: 5 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 0 !important;
  cursor: pointer;
  -webkit-appearance: auto !important;
  appearance: auto !important;
  color-scheme: light;
}

.native-month-picker.period-native-overlay::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.native-month-picker.period-native-overlay:focus,
.native-month-picker.period-native-overlay:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.native-month-picker.period-native-overlay.unsupported {
  display: none !important;
}

/* Repli navigateur : reste compact et dans la même carte. */
.period-control .period-fallback.visible {
  position: absolute;
  inset: 10px 12px;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(86px, .65fr);
  gap: 8px;
  align-items: center;
  background: #FFFFFF;
}

.period-control .period-fallback.visible .native-period-picker {
  min-height: 48px;
  border: 0;
  border-radius: 11px;
  background: #F4F6F7;
  color: #172231;
  font-size: 16px;
  font-weight: 730;
  box-shadow: none;
}

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .period-control {
    min-height: 72px;
    padding: 14px 18px 15px;
  }
  .period-control-value { font-size: 21px; }
}





























































/* Fixes v19 : catégories intégrées à la liste d’origine, sans carte supplémentaire. */
#fixed-section #fixed-list {
  margin-top: 4px;
}

#fixed-section .fixed-category-label {
  padding: 0 28px;
  margin: 24px 0 7px;
  color: #8A93AB;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 780;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#fixed-section .fixed-category-label-main {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

#fixed-section .fixed-category-name {
  min-width: 0;
}

#fixed-section .fixed-category-add {
  margin-left: auto;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #7E879E;
  padding: 0 1px;
  min-width: 22px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#fixed-section .fixed-category-add:hover,
#fixed-section .fixed-category-add:focus-visible {
  color: var(--ca-accent);
  outline: none;
}

#fixed-section .fixed-category-add:active {
  transform: scale(.92);
}

#fixed-section .fixed-category-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
}

#fixed-section .fixed-category-menu > summary {
  list-style: none;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #8A93AB;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  user-select: none;
  -webkit-user-select: none;
}

#fixed-section .fixed-category-menu > summary::-webkit-details-marker { display: none; }
#fixed-section .fixed-category-menu > summary::marker { content: ""; }

#fixed-section .fixed-category-menu > summary:hover,
#fixed-section .fixed-category-menu[open] > summary {
  background: rgba(123, 132, 171, 0.10);
  color: #5E6884;
}

#fixed-section .fixed-category-menu-popover {
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  transform: translateY(-50%);
  min-width: 112px;
  padding: 5px;
  border: 1px solid rgba(23, 23, 23, 0.10);
  border-radius: 10px;
  background: rgba(255,255,255,.99);
  box-shadow: 0 12px 30px rgba(38,52,68,.16);
  z-index: 40;
  text-transform: none;
  letter-spacing: normal;
  transform-origin: left center;
}

#fixed-section .fixed-category-menu-delete {
  width: 100%;
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #B43E35;
  font: inherit;
  font-size: 12px;
  font-weight: 740;
  text-align: left;
  cursor: pointer;
}

#fixed-section .fixed-category-menu-delete:hover {
  background: #FFF3F1;
}

#fixed-section .fixed-category-label.empty-group {
  margin-bottom: 2px;
}

#fixed-section .fixed-category-label.first {
  margin-top: 14px;
}

#fixed-section .fixed-category-label + .swipe-row {
  border-top: 0 !important;
}

#fixed-section .swipe-row.fixed-category-last > .swipe-content::after {
  opacity: 0;
}

#fixed-section .fixed-category-empty {
  padding: 0 28px 8px;
  color: #A0A7B8;
  font-size: 14px;
  line-height: 1.35;
}

#fixed-section .fixed-category-spacer {
  height: 8px;
}

#fixed-section .fixed-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 740px) {
  #fixed-section .fixed-category-label {
    padding-left: 4px;
    padding-right: 20px;
    margin-top: 22px;
    margin-bottom: 6px;
    font-size: 11px;
  }

  #fixed-section .fixed-category-label.first {
    margin-top: 12px;
  }

  #fixed-section .fixed-category-empty {
    padding-left: 20px;
    padding-right: 20px;
  }
}

#entry-fixed-category-field[hidden],
#entry-variable-category-field[hidden],
#entry-amount-field[hidden] {
  display: none !important;
}

#entry-fixed-category,
#entry-variable-category {
  width: 100%;
  border: 1px solid #D7DDD9;
  border-radius: 14px;
  background: #FFFFFF;
  color: #17212D;
  font: inherit;
  min-height: 52px;
  padding: 0 16px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #718096 50%), linear-gradient(135deg, #718096 50%, transparent 50%);
  background-position: calc(100% - 24px) calc(50% - 3px), calc(100% - 18px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

#entry-fixed-category:focus,
#entry-variable-category:focus {
  border-color: #3E8A73;
  box-shadow: 0 0 0 4px rgba(62, 138, 115, 0.12);
}

@media (max-width: 740px) {
  .fixed-category-card {
    padding: 16px;
    border-radius: 22px;
  }

  .fixed-category-title {
    font-size: 24px;
  }
}

















































@media (max-width: 430px) {





}



@media (max-width: 430px) {







}














































/* En portrait, on présente réellement le contenu en paysage en le tournant. */
@media (orientation: portrait) {

}

@media (orientation: landscape) {

}


/* macOS v6 : largeur réellement fluide. Détection JS pour ne pas dépendre
   des media features hover/pointer de Safari. */
html.is-macos,
html.is-macos body {
  width: 100%;
  min-width: 100%;
  background: linear-gradient(180deg, #F3F5F7 0%, #EEF2F5 100%);
}

html.is-macos body {
  padding: 0 !important;
}

html.is-macos .page {
  width: calc(100vw - clamp(40px, 4vw, 72px)) !important;
  max-width: none !important;
  min-height: 100dvh;
  margin: 0 auto !important;
  padding: clamp(28px, 2.5vw, 42px) clamp(28px, 3vw, 56px) 46px !important;
}

html.is-macos .ca-bottom-nav {
  width: calc(100vw - clamp(40px, 4vw, 72px)) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (min-width: 1400px) {
  html.is-macos .page,
  html.is-macos .ca-bottom-nav {
    width: calc(100vw - 64px) !important;
  }
}






/* macOS : menu contextuel explicite pour les revenus. Les dépenses utilisent le swipe Mail. */
html.is-macos .desktop-action-row {
  position: relative !important;
  display: block !important;
  overflow: visible !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

html.is-macos .desktop-action-row .swipe-content,
html.is-macos .desktop-action-row:not(.open):hover .swipe-content {
  transform: none !important;
  min-height: 78px !important;
  padding-right: 58px !important;
  background: #FBFCFD !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 24px rgba(66, 83, 104, 0.05) !important;
}

/* Les actions de swipe restent présentes pour iOS mais ne sont jamais visibles sur Mac. */
html.is-macos .desktop-action-row .swipe-actions,
html.is-macos .desktop-action-row:not(.open):hover .swipe-actions {
  display: none !important;
}

.desktop-action-menu { display: none; }

html.is-macos .desktop-action-menu {
  display: block;
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  z-index: 8;
}

html.is-macos .desktop-action-menu[open] {
  z-index: 24;
}

html.is-macos .desktop-action-menu > summary {
  list-style: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 1px;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 3px 12px rgba(66,83,104,.05);
}

html.is-macos .desktop-action-menu > summary::-webkit-details-marker { display: none; }
html.is-macos .desktop-action-menu > summary::marker { content: ""; }

html.is-macos .desktop-action-menu > summary:hover,
html.is-macos .desktop-action-menu[open] > summary {
  background: #F3F6F6;
  border-color: rgba(47,125,104,.22);
  color: var(--ca-accent);
}

html.is-macos .desktop-action-menu-popover {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  transform: translateY(-50%);
  min-width: 148px;
  padding: 6px;
  border: 1px solid rgba(23,23,23,.10);
  border-radius: 12px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 14px 38px rgba(38,52,68,.16);
  z-index: 20;
}

html.is-macos .desktop-action-menu-action {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  text-align: left;
}

html.is-macos .desktop-action-menu-action svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

html.is-macos .desktop-action-menu-action:hover { background: #F4F6F7; }
html.is-macos .desktop-action-menu-action.delete { color: #B43E35; }
html.is-macos .desktop-action-menu-action.delete:hover { background: #FFF3F1; }

/* macOS v9 : catégories variables en deux colonnes pour mieux utiliser l’espace. */
@media (min-width: 1050px) {
  html.is-macos .variable-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
  }

  html.is-macos .variable-category {
    min-width: 0;
    width: 100%;
  }
}


















/* Fixes v23 : les catégories vides sont rangées en fin de liste et les actions passent par ⋯. */
#fixed-section .fixed-category-add {
  display: none !important;
}

#fixed-section .fixed-add-category-wide {
  width: 100%;
  margin: 0 0 14px;
}

#fixed-section .fixed-category-menu-popover {
  min-width: 154px;
}

#fixed-section .fixed-category-menu-action {
  width: 100%;
  min-height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #445066;
  font: inherit;
  font-size: 12px;
  font-weight: 740;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

#fixed-section .fixed-category-menu-action:hover {
  background: #F4F6F7;
}

#fixed-section .fixed-category-menu-action.delete {
  color: #B43E35;
}

#fixed-section .fixed-category-menu-action.delete:hover {
  background: #FFF3F1;
}

#fixed-section .fixed-empty-categories-start {
  height: 15px;
}


/* v48 : sur iOS, le résumé "Dépenses variables" reste sur une seule ligne. */
@media (max-width: 820px) {
  .expense-tabs.mode-variable {
    flex-wrap: nowrap !important;
    align-items: center !important;
    align-content: center !important;
    gap: 10px !important;
  }

  .expense-tabs.mode-variable .expense-tab[data-expense-tab="variable"] .expense-tab-label {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    font-size: clamp(14px, 4.2vw, 17px) !important;
    line-height: 1.08 !important;
    white-space: nowrap !important;
  }

  .expense-tabs.mode-variable .expense-tab[data-expense-tab="variable"] .expense-tab-value {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    font-size: clamp(15px, 4.8vw, 18px) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .expense-tabs.mode-variable .expense-tab[data-expense-tab="variable"] .expense-tab-note {
    display: none !important;
  }
}


/* v50 — iOS : libellé des catégories fixes nettement plus à gauche */
html.is-ios #fixed-section .fixed-category-label {
  padding-left: 0 !important;
  padding-right: 20px !important;
}

html.is-ios #fixed-section .fixed-category-label-main {
  margin-left: 0 !important;
}

html.is-ios #fixed-section .fixed-category-empty {
  padding-left: 0 !important;
  padding-right: 20px !important;
}


/* v51 — catégories fixes plus à gauche sur toutes les plateformes */
#fixed-section .fixed-category-label {
  padding-left: 0 !important;
  padding-right: 20px !important;
}

#fixed-section .fixed-category-empty {
  padding-left: 0 !important;
  padding-right: 20px !important;
}



/* v52 — iOS : liste des dépenses fixes plus compacte, y compris pendant le swipe. */
html.is-ios #fixed-section {
  padding-top: 16px !important;
  padding-bottom: 14px !important;
}

html.is-ios #fixed-section .fixed-add-category-wide {
  margin-bottom: 10px !important;
  min-height: 42px !important;
}

html.is-ios #fixed-section .fixed-category-label {
  margin-top: 15px !important;
  margin-bottom: 3px !important;
  line-height: 1.1 !important;
}

html.is-ios #fixed-section .fixed-category-label.first {
  margin-top: 9px !important;
}

html.is-ios #fixed-section .fixed-empty-categories-start {
  height: 8px !important;
}

html.is-ios #fixed-section .swipe-content {
  min-height: 58px !important;
  padding: 10px 20px 10px 20px !important;
  gap: 10px !important;
}

html.is-ios #fixed-section .swipe-content::after {
  left: 20px !important;
}

html.is-ios #fixed-section .line-title {
  font-size: 13.5px !important;
  line-height: 1.12 !important;
}

html.is-ios #fixed-section .amount {
  font-size: 14px !important;
  line-height: 1 !important;
}

html.is-ios #fixed-section .swipe-actions {
  top: 5px !important;
  bottom: 5px !important;
  right: 8px !important;
  width: 126px !important;
  gap: 6px !important;
}

html.is-ios #fixed-section .swipe-action {
  flex-basis: 60px !important;
  width: 60px !important;
  min-width: 60px !important;
  border-radius: 999px !important;
  gap: 2px !important;
}

html.is-ios #fixed-section .swipe-action svg {
  width: 16px !important;
  height: 16px !important;
}

html.is-ios #fixed-section .swipe-action span {
  font-size: 9.5px !important;
}

html.is-ios #fixed-section .swipe-row.open .swipe-content {
  transform: translate3d(-146px,0,0) !important;
  border-radius: 0 22px 22px 0 !important;
}

html.is-ios #fixed-section .auto-fixed-row .swipe-content {
  min-height: 64px !important;
  padding: 10px 20px !important;
}

html.is-ios #fixed-section .auto-fixed-row .swipe-content::after {
  left: 20px !important;
}



/* v53 — iOS : rangées Fixes réellement compactes et mieux alignées en swipe. */
html.is-ios #fixed-section {
  padding-top: 12px !important;
  padding-bottom: 10px !important;
}

html.is-ios #fixed-section .fixed-add-category-wide {
  min-height: 38px !important;
  margin-bottom: 8px !important;
}

html.is-ios #fixed-section .fixed-category-label {
  margin-top: 12px !important;
  margin-bottom: 2px !important;
  font-size: 10.5px !important;
  line-height: 1.05 !important;
}

html.is-ios #fixed-section .fixed-category-label.first {
  margin-top: 7px !important;
}

html.is-ios #fixed-section .fixed-empty-categories-start {
  height: 6px !important;
}

html.is-ios #fixed-section .swipe-row {
  min-height: 50px !important;
}

html.is-ios #fixed-section .swipe-content {
  min-height: 50px !important;
  padding: 7px 18px 7px 20px !important;
  gap: 10px !important;
  align-items: center !important;
}

html.is-ios #fixed-section .swipe-content::after {
  left: 20px !important;
}

html.is-ios #fixed-section .line-title {
  font-size: 13px !important;
  line-height: 1.10 !important;
}

html.is-ios #fixed-section .amount {
  font-size: 13.5px !important;
  line-height: 1 !important;
}

html.is-ios #fixed-section .swipe-actions {
  top: 50% !important;
  bottom: auto !important;
  right: 8px !important;
  width: 120px !important;
  height: 44px !important;
  gap: 6px !important;
  align-items: center !important;
  transform: translateY(-50%) !important;
}

html.is-ios #fixed-section .swipe-action {
  flex: 0 0 57px !important;
  width: 57px !important;
  min-width: 57px !important;
  height: 44px !important;
  padding: 0 3px !important;
  gap: 1px !important;
  border-radius: 22px !important;
}

html.is-ios #fixed-section .swipe-action svg {
  width: 15px !important;
  height: 15px !important;
}

html.is-ios #fixed-section .swipe-action span {
  font-size: 9px !important;
  line-height: 1 !important;
}

html.is-ios #fixed-section .swipe-row.open .swipe-content {
  transform: translate3d(-134px,0,0) !important;
  border-radius: 0 22px 22px 0 !important;
}

html.is-ios #fixed-section .auto-fixed-row .swipe-content {
  min-height: 54px !important;
  padding: 8px 18px 8px 20px !important;
}

html.is-ios #fixed-section .auto-fixed-row .line-sub {
  font-size: 10.5px !important;
  line-height: 1.1 !important;
}
























.income-add {
  border-radius: 12px !important;
}

.mini-add {
  border-radius: 12px !important;
}

.add-button {
  border-radius: 14px !important;
}

.category-add-expense,
#fixed-section .fixed-add-category-wide {
  border-radius: 16px !important;
}



/* v60 — retrait complet du résumé du mois */
#income-summary {
  display: none !important;
}







@media (max-width: 820px) {



}



















/* v69 — PEA classable comme une dépense fixe, sans texte explicatif. */
#fixed-section .auto-fixed-row .swipe-content {
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-rows: auto !important;
  row-gap: 0 !important;
}

#fixed-section .auto-fixed-row .line-sub {
  display: none !important;
}

.auto-fixed-title-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

html.is-ios #fixed-section .auto-fixed-row .swipe-content {
  min-height: 50px !important;
  padding: 7px 18px 7px 20px !important;
}


/* v76 — PEA : vraie ligne swipe comme les autres, avec switch conservé. */
#fixed-section .auto-fixed-row.pea-edit-swipe .swipe-content {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-rows: auto !important;
  column-gap: 12px !important;
  row-gap: 0 !important;
  align-items: center !important;
  background: #FFFFFF !important;
  border: 0 !important;
  box-shadow: none !important;
}

#fixed-section .auto-fixed-row.pea-edit-swipe .swipe-actions {
  width: 60px !important;
  min-width: 60px !important;
  gap: 0 !important;
  justify-content: flex-end !important;
}

#fixed-section .auto-fixed-row.pea-edit-swipe .swipe-action.edit {
  flex: 0 0 57px !important;
  width: 57px !important;
  min-width: 57px !important;
}

#fixed-section .auto-fixed-row.pea-edit-swipe.open .swipe-content {
  transform: translate3d(-68px,0,0) !important;
  background: #D9D9DF !important;
  border-radius: 0 22px 22px 0 !important;
}

html.is-ios #fixed-section .auto-fixed-row.pea-edit-swipe .swipe-actions {
  width: 60px !important;
  min-width: 60px !important;
  height: 44px !important;
  gap: 0 !important;
}

html.is-ios #fixed-section .auto-fixed-row.pea-edit-swipe.open .swipe-content {
  transform: translate3d(-68px,0,0) !important;
}


/* v80 — macOS : restaurer les totaux Fixes / Variables retirés par une ancienne règle. */
html.is-macos .expense-tabs.mode-fixed:not([hidden]),
html.is-macos .expense-tabs.mode-variable:not([hidden]) {
  display: flex !important;
}

/* === v83 : dépenses variables — même interaction Mail que les dépenses fixes === */
.fixed-style-swipe-row {
  position: relative;
  width: 100%;
  min-height: 74px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #FFFFFF !important;
  box-shadow: none !important;
  overflow: hidden !important;
  isolation: isolate;
}

.fixed-style-swipe-row .swipe-content {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 74px;
  margin: 0 !important;
  padding: 16px 22px 16px 28px !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 0 !important;
  border-radius: 0 !important;
  background: #FFFFFF !important;
  box-shadow: none !important;
  transform: translate3d(0, 0, 0);
  transition:
    transform .48s cubic-bezier(.2, .82, .22, 1),
    background-color .24s ease,
    border-radius .36s cubic-bezier(.2, .82, .22, 1);
}

.fixed-style-swipe-row .swipe-content::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  left: 28px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #E3E4E7;
  opacity: 1;
  pointer-events: none;
}

.fixed-style-swipe-row:last-child .swipe-content::after {
  display: none !important;
}

.fixed-style-swipe-row .line-title {
  min-width: 0;
  font-size: 14px !important;
  line-height: 1.18 !important;
  font-weight: 620 !important;
  letter-spacing: -0.18px;
  color: #131820 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixed-style-swipe-row .amount {
  padding: 0 !important;
  font-size: 15px !important;
  line-height: 1.1 !important;
  font-weight: 690 !important;
  color: #131820 !important;
  white-space: nowrap;
}

.fixed-style-swipe-row .swipe-actions {
  position: absolute !important;
  z-index: 1;
  top: 8px !important;
  right: 10px !important;
  bottom: 8px !important;
  left: auto !important;
  width: 148px !important;
  height: auto !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  transform: none !important;
}

.fixed-style-swipe-row .swipe-action {
  flex: 0 0 70px !important;
  width: 70px !important;
  min-width: 70px !important;
  height: 100% !important;
  padding: 0 4px !important;
  border: 0 !important;
  border-radius: 999px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  box-shadow: none !important;
  opacity: 0;
  transform: translate3d(14px, 0, 0) scale(.88);
  transition: opacity .16s ease, transform .20s cubic-bezier(.2, .82, .22, 1);
}

.fixed-style-swipe-row .swipe-action.edit {
  order: 1;
  background: #D0D0D6 !important;
  color: #6F7280 !important;
}

.fixed-style-swipe-row .swipe-action.delete {
  order: 2;
  background: #F14E45 !important;
  color: #FFFFFF !important;
}

.fixed-style-swipe-row .swipe-action svg {
  width: 19px !important;
  height: 19px !important;
}

.fixed-style-swipe-row .swipe-action span {
  font-size: 10.5px !important;
  line-height: 1 !important;
  font-weight: 560 !important;
  letter-spacing: -0.08px;
}

.fixed-style-swipe-row.open .swipe-content {
  transform: translate3d(-172px, 0, 0) !important;
  background: #D9D9DF !important;
  border-radius: 0 28px 28px 0 !important;
}

.fixed-style-swipe-row.open .swipe-content::after {
  opacity: 0;
}

.fixed-style-swipe-row.open .swipe-action {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}


/* Sur macOS, ces lignes ne reprennent pas l’ancien reveal au simple survol :
   comme dans Fixes, les actions apparaissent par glisser horizontal. */
html.is-macos .fixed-style-swipe-row:not(.open):hover .swipe-content {
  transform: translate3d(0, 0, 0);
  background: #FFFFFF !important;
  border-radius: 0 !important;
}

html.is-macos .fixed-style-swipe-row:not(.open):hover .swipe-actions {
  width: 148px !important;
}

html.is-macos .fixed-style-swipe-row:not(.open):hover .swipe-action {
  opacity: 0;
  transform: translate3d(14px, 0, 0) scale(.88);
}

html.is-macos .fixed-style-swipe-row:not(.open):hover .swipe-action span {
  display: inline;
}

@media (max-width: 700px) {
  html.is-ios .fixed-style-swipe-row {
    min-height: 50px !important;
  }

  html.is-ios .fixed-style-swipe-row .swipe-content {
    min-height: 50px !important;
    padding: 7px 18px 7px 20px !important;
    gap: 10px !important;
    align-items: center !important;
  }

  html.is-ios .fixed-style-swipe-row .swipe-content::after {
    left: 20px !important;
  }

  html.is-ios .fixed-style-swipe-row .line-title {
    font-size: 13px !important;
    line-height: 1.10 !important;
  }

  html.is-ios .fixed-style-swipe-row .amount {
    font-size: 13.5px !important;
    line-height: 1 !important;
  }

  html.is-ios .fixed-style-swipe-row .swipe-actions {
    top: 50% !important;
    bottom: auto !important;
    right: 8px !important;
    width: 120px !important;
    height: 44px !important;
    gap: 6px !important;
    align-items: center !important;
    transform: translateY(-50%) !important;
  }

  html.is-ios .fixed-style-swipe-row .swipe-action {
    flex: 0 0 57px !important;
    width: 57px !important;
    min-width: 57px !important;
    height: 44px !important;
    padding: 0 3px !important;
    gap: 1px !important;
    border-radius: 22px !important;
  }

  html.is-ios .fixed-style-swipe-row .swipe-action svg {
    width: 15px !important;
    height: 15px !important;
  }

  html.is-ios .fixed-style-swipe-row .swipe-action span {
    font-size: 9px !important;
    line-height: 1 !important;
  }

  html.is-ios .fixed-style-swipe-row.open .swipe-content {
    transform: translate3d(-134px, 0, 0) !important;
    border-radius: 0 22px 22px 0 !important;
  }
}



/* v87 — iOS : le résumé Fixes/Variables reste lisible avec de gros montants. */
html.is-ios .expense-tabs.mode-fixed,
html.is-ios .expense-tabs.mode-variable {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  column-gap: 12px !important;
}

html.is-ios .expense-tabs.mode-fixed .expense-tab[data-expense-tab="fixed"] .expense-tab-label,
html.is-ios .expense-tabs.mode-variable .expense-tab[data-expense-tab="variable"] .expense-tab-label {
  min-width: 0 !important;
  max-width: none !important;
  font-size: clamp(14px, 4vw, 17px) !important;
  line-height: 1.05 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html.is-ios .expense-tabs.mode-fixed .expense-tab[data-expense-tab="fixed"] .expense-tab-value,
html.is-ios .expense-tabs.mode-variable .expense-tab[data-expense-tab="variable"] .expense-tab-value {
  min-width: 0 !important;
  max-width: none !important;
  font-size: clamp(15px, 4.2vw, 18px) !important;
  line-height: 1 !important;
  letter-spacing: -0.035em !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

html.is-ios .expense-tabs.mode-variable.ios-summary-compact {
  column-gap: 8px !important;
  padding-inline: 16px !important;
}

html.is-ios .expense-tabs.mode-variable.ios-summary-compact .expense-tab-label {
  font-size: clamp(13px, 3.55vw, 15px) !important;
}

html.is-ios .expense-tabs.mode-variable.ios-summary-compact .expense-tab-value {
  font-size: clamp(13px, 3.6vw, 15px) !important;
  letter-spacing: -0.025em !important;
}

html.is-ios .expense-tabs.mode-variable.ios-summary-ultra-compact {
  column-gap: 6px !important;
  padding-inline: 14px !important;
}

html.is-ios .expense-tabs.mode-variable.ios-summary-ultra-compact .expense-tab-label {
  font-size: clamp(12px, 3.25vw, 14px) !important;
}

html.is-ios .expense-tabs.mode-variable.ios-summary-ultra-compact .expense-tab-value {
  font-size: clamp(12px, 3.25vw, 14px) !important;
  letter-spacing: -0.015em !important;
}


/* v88 — Auth Supabase : écran léger, mobile-first, sans modifier les écrans budget. */
body.auth-locked {
  overflow: hidden !important;
}

/* v129.14 — pendant la restauration de session, ne jamais peindre brièvement le formulaire de connexion. */
body.auth-booting .auth-gate {
  display: none !important;
}

body.auth-locked > .page,
body.auth-locked > .ca-bottom-nav,
body.auth-locked > .sheet-backdrop,
body.auth-locked > .copy-toast {
  visibility: hidden !important;
  pointer-events: none !important;
}

.auth-gate[hidden] { display: none !important; }

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  background: #F3F5F7;
  overflow: auto;
}

.auth-card {
  width: min(100%, 460px);
  padding: 28px;
  border-radius: 28px;
  background: #FFFFFF;
  box-shadow: 0 18px 50px rgba(33, 45, 61, .08);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.auth-brand-mark {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #087F68;
  color: #FFFFFF;
  font-size: 26px;
  font-weight: 800;
}

.auth-title {
  margin: 0;
  color: #172231;
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.auth-subtitle {
  margin: 6px 0 0;
  color: #687384;
  font-size: 14px;
  line-height: 1.4;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: #F1F3F5;
}

.auth-tab {
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #657080;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.auth-tab.active {
  background: #FFFFFF;
  color: #172231;
  box-shadow: 0 2px 7px rgba(33, 45, 61, .08);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-field {
  display: grid;
  gap: 7px;
  color: #445061;
  font-size: 13px;
  font-weight: 700;
}

.auth-field[hidden] { display: none !important; }

.auth-field input {
  width: 100%;
  min-height: 50px;
  box-sizing: border-box;
  border: 1px solid #D8DDE3;
  border-radius: 14px;
  padding: 0 15px;
  background: #FFFFFF;
  color: #172231;
  outline: none;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.auth-field input:focus {
  border-color: #0A8A72;
  box-shadow: 0 0 0 4px rgba(8, 127, 104, .09);
}

.auth-submit {
  min-height: 52px;
  margin-top: 4px;
  border: 0;
  border-radius: 15px;
  background: #087F68;
  color: #FFFFFF;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.auth-submit:disabled,
.auth-tab:disabled { opacity: .6; cursor: default; }

.auth-message {
  min-height: 20px;
  color: #687384;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.auth-message.error { color: #B42318; }
.auth-message.success { color: #087F68; }

.settings-account {
  padding: 14px 16px;
  border-top: 1px solid rgba(23, 34, 49, .08);
}

.settings-account-name {
  color: #172231;
  font-size: 15px;
  font-weight: 700;
}

.settings-account-email {
  margin-top: 3px;
  color: #7B8592;
  font-size: 12px;
  overflow-wrap: anywhere;
}


.settings-account-sync {
  margin-top: 5px;
  color: #6D7886;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
}

.settings-account-sync.is-synced { color: #087F68; }
.settings-account-sync.is-error { color: #B33A2B; }

@media (max-width: 520px) {
  .auth-gate { padding-inline: 14px; }
  .auth-card { padding: 22px 18px; border-radius: 24px; }
  .auth-brand-mark { width: 44px; height: 44px; flex-basis: 44px; border-radius: 14px; }
  .auth-title { font-size: 21px; }
}


/* v90 — iOS : paramètres façon commentaires TikTok
   - feuille limitée à ~la moitié de l'écran
   - contenu scrollable
   - fermeture par impulsion vers le bas depuis n'importe où dans la feuille */
html.is-ios #month-settings-sheet {
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 0 !important;
}

html.is-ios #month-settings-sheet .sheet {
  width: 100% !important;
  height: auto !important;
  max-height: calc(100dvh - var(--safe-top) - 8px) !important;
  padding: 10px max(18px, calc(var(--safe-right) + 18px)) calc(var(--safe-bottom) + 18px) max(18px, calc(var(--safe-left) + 18px)) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  border: 0 !important;
  border-radius: 26px 26px 0 0 !important;
  box-shadow: 0 -18px 55px rgba(0,0,0,.14) !important;
  scroll-padding-top: 16px;
  scroll-padding-bottom: calc(var(--safe-bottom) + 28px);
}

html.is-ios #month-settings-sheet .sheet-handle {
  position: sticky;
  top: 0;
  z-index: 6;
  width: 38px !important;
  height: 5px !important;
  margin: 0 auto 12px !important;
  background: rgba(112,112,112,.34) !important;
}

html.is-ios #month-settings-sheet.open:not(.dragging) .sheet {
  animation: month-settings-sheet-in 260ms cubic-bezier(.22,.8,.25,1);
}

html.is-ios #month-settings-sheet.dragging .sheet {
  animation: none !important;
}

@keyframes month-settings-sheet-in {
  from { transform: translate3d(0, 105%, 0); }
  to   { transform: translate3d(0, 0, 0); }
}


/* v91 — Profil séparé des options. */
.profile-account-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 16px;
  padding: 16px;
  border: 1px solid rgba(23, 34, 49, .07);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
}

.profile-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(8,127,104,.10);
  color: #087F68;
  font-size: 19px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-account-copy {
  min-width: 0;
  flex: 1 1 auto;
}

#profile-sheet .settings-account-name,
#profile-sheet .settings-account-email,
#profile-sheet .settings-account-sync {
  padding: 0;
}

#profile-sheet .settings-account-email {
  white-space: normal;
}

.profile-settings-list {
  overflow: hidden;
  border: 1px solid rgba(23,34,49,.07);
  border-radius: 14px;
  background: rgba(255,255,255,.68);
  padding: 2px 0;
}

.profile-settings-list .settings-row {
  min-height: 62px;
  padding-left: 28px !important;
  padding-right: 28px !important;
}

.profile-settings-list .settings-chevron {
  margin-left: 16px;
}

.profile-settings-list .settings-row:last-child {
  border-bottom: 0 !important;
}

/* Même bottom sheet tactile que les Options sur iOS. */
html.is-ios #profile-sheet {
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 0 !important;
}

html.is-ios #profile-sheet .sheet {
  width: 100% !important;
  height: auto !important;
  max-height: calc(100dvh - var(--safe-top) - 8px) !important;
  padding: 10px max(18px, calc(var(--safe-right) + 18px)) calc(var(--safe-bottom) + 18px) max(18px, calc(var(--safe-left) + 18px)) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  border: 0 !important;
  border-radius: 26px 26px 0 0 !important;
  box-shadow: 0 -18px 55px rgba(0,0,0,.14) !important;
}

html.is-ios #profile-sheet.dragging .sheet {
  transition: none !important;
}

html.is-ios #profile-sheet .profile-sheet-drag-zone {
  position: sticky !important;
  top: -10px !important;
  z-index: 8 !important;
  margin: -10px 0 8px !important;
  padding: 10px 0 8px !important;
  background: var(--paper) !important;
  touch-action: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

html.is-ios #profile-sheet .profile-sheet-drag-zone .sheet-handle {
  margin-bottom: 12px !important;
}

html.is-ios #profile-sheet .profile-sheet-drag-zone #profile-sheet-title {
  margin-bottom: 0 !important;
}

html.is-ios #profile-sheet .sheet-handle,
html.is-ios #profile-sheet-title {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

@media (max-width: 390px) {
  html.is-ios .ca-bottom-link,
  html.is-ios .ca-bottom-button {
    font-size: 9.8px !important;
  }
}


/* v92 — iOS : les cinq onglets restent strictement sur une seule ligne. */
html.is-ios .ca-bottom-nav {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  grid-template-rows: 1fr !important;
  align-items: stretch !important;
  flex-wrap: nowrap !important;
}

html.is-ios .ca-bottom-nav > .ca-bottom-link,
html.is-ios .ca-bottom-nav > .ca-bottom-button {
  grid-row: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  overflow: hidden !important;
}

html.is-ios .ca-bottom-nav > :nth-child(1) { grid-column: 1 !important; }
html.is-ios .ca-bottom-nav > :nth-child(2) { grid-column: 2 !important; }
html.is-ios .ca-bottom-nav > :nth-child(3) { grid-column: 3 !important; }
html.is-ios .ca-bottom-nav > :nth-child(4) { grid-column: 4 !important; }
html.is-ios .ca-bottom-nav > :nth-child(5) { grid-column: 5 !important; }

html.is-ios .ca-bottom-nav > .ca-bottom-link > span:last-child,
html.is-ios .ca-bottom-nav > .ca-bottom-button > span:last-child {
  display: block !important;
  width: 100% !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  text-align: center !important;
}


/* v95-v96 — Foyer partagé dans l'onglet Profil + correctif scroll iOS. */
.profile-section-label {
  margin: 16px 4px 7px;
  color: #7B8594;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.household-settings-list .settings-row + .settings-row {
  border-top: 0;
}

.household-invite-result,
.household-join-panel {
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(23,34,49,.07);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
}

.household-invite-kicker,
.household-join-panel label {
  display: block;
  margin-bottom: 8px;
  color: #7B8594;
  font-size: 12px;
  font-weight: 650;
}

.household-invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.household-invite-code {
  color: #172231;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .09em;
  font-variant-numeric: tabular-nums;
}

.household-copy-button,
.household-join-actions button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #EEF2F3;
  color: #172231;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.household-join-panel input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(23,34,49,.10);
  border-radius: 11px;
  background: #FFFFFF;
  color: #172231;
  font: inherit;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
  outline: none;
  box-sizing: border-box;
}

.household-join-panel input:focus {
  border-color: rgba(8,127,104,.45);
  box-shadow: 0 0 0 3px rgba(8,127,104,.08);
}

.household-join-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

#household-join-submit {
  background: #087F68;
  color: #FFFFFF;
}

.household-message {
  min-height: 18px;
  margin: 8px 4px 0;
  color: #7B8594;
  font-size: 12px;
  line-height: 1.35;
}

.household-message.success { color: #087F68; }
.household-message.error { color: #B33A2B; }

@media (max-width: 820px) {
  .profile-section-label {
    margin-top: 14px;
  }

  .household-invite-code {
    font-size: 22px;
  }
}


/* v98 — iOS/macOS : scroll et geste de fermeture physiquement séparés.
   Le contenu peut scroller librement ; seule la barre supérieure déplace la feuille. */
#month-settings-sheet .sheet-drag-zone,
#profile-sheet .sheet-drag-zone {
  position: sticky;
  top: -10px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: calc(100% + 0px);
  min-height: 38px;
  margin: -10px 0 4px;
  padding: 10px 0 8px;
  background: var(--paper);
  touch-action: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  cursor: grab;
}

#month-settings-sheet .sheet-drag-zone:active,
#profile-sheet .sheet-drag-zone:active {
  cursor: grabbing;
}

#month-settings-sheet .sheet-drag-zone .sheet-handle,
#profile-sheet .sheet-drag-zone .sheet-handle {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  width: 46px !important;
  height: 5px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  background: rgba(82, 88, 98, .42) !important;
  pointer-events: none !important;
}

/* Les titres et tout le contenu redeviennent des zones de scroll normales. */
#month-settings-sheet #month-settings-title,
#month-settings-sheet #month-settings-subtitle,
#profile-sheet #profile-sheet-title,
#month-settings-sheet #settings-main-panel,
#profile-sheet .profile-account-card,
#profile-sheet .profile-settings-list,
#profile-sheet .household-invite-result,
#profile-sheet .household-join-panel {
  touch-action: pan-y !important;
}

html.is-ios #month-settings-sheet .sheet,
html.is-ios #profile-sheet .sheet {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: contain !important;
  touch-action: pan-y !important;
}

/* Neutralise les anciennes zones de drag étendues des versions v90-v97. */
html.is-ios #profile-sheet .profile-sheet-drag-zone {
  position: static !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  touch-action: pan-y !important;
}


/* v99 — séparation physique du scroll et du swipe sur iOS.
   La barre reste visible ; seul le contenu sous la barre défile. */
html.is-ios #month-settings-sheet .sheet,
html.is-ios #profile-sheet .sheet {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  touch-action: none !important;
}

html.is-ios #month-settings-sheet .sheet-drag-zone,
html.is-ios #profile-sheet .sheet-drag-zone {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  flex: 0 0 48px !important;
  width: 100% !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 14px 0 12px !important;
  display: grid !important;
  place-items: center !important;
  background: var(--paper) !important;
  touch-action: none !important;
  overscroll-behavior: none !important;
}

html.is-ios #month-settings-sheet .sheet-drag-zone .sheet-handle,
html.is-ios #profile-sheet .sheet-drag-zone .sheet-handle {
  width: 44px !important;
  height: 5px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  background: rgba(84, 89, 98, .46) !important;
  pointer-events: none !important;
}

html.is-ios #month-settings-sheet .sheet-scroll-content,
html.is-ios #profile-sheet .sheet-scroll-content {
  min-height: 0 !important;
  flex: 1 1 auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: contain !important;
  touch-action: pan-y !important;
  padding-bottom: max(8px, var(--safe-bottom)) !important;
}

/* Aucun descendant du contenu scrollable ne doit devenir une zone de drag. */
html.is-ios #month-settings-sheet .sheet-scroll-content,
html.is-ios #month-settings-sheet .sheet-scroll-content *,
html.is-ios #profile-sheet .sheet-scroll-content,
html.is-ios #profile-sheet .sheet-scroll-content * {
  touch-action: pan-y !important;
}

/* Inputs/boutons gardent leur interaction normale. */
html.is-ios #month-settings-sheet .sheet-scroll-content input,
html.is-ios #month-settings-sheet .sheet-scroll-content select,
html.is-ios #month-settings-sheet .sheet-scroll-content button,
html.is-ios #profile-sheet .sheet-scroll-content input,
html.is-ios #profile-sheet .sheet-scroll-content select,
html.is-ios #profile-sheet .sheet-scroll-content button {
  touch-action: manipulation !important;
}


/* v102 — Options / Profil collés aux onglets, sans mur blanc visible sur iOS.
   La barre d'onglets reste visible mais passe au-dessus de la feuille. */
body.utility-sheet-open .ca-bottom-nav {
  z-index: 60 !important;
  border-radius: 0 !important;
}

body.utility-sheet-open #month-settings-sheet,
body.utility-sheet-open #profile-sheet {
  bottom: 0 !important;
}

html.is-ios body.utility-sheet-open #month-settings-sheet .sheet,
html.is-ios body.utility-sheet-open #profile-sheet .sheet {
  height: auto !important;
  min-height: 0 !important;
  max-height: calc(100dvh - var(--safe-top)) !important;
  padding-bottom: 0 !important;
  box-shadow: 0 -18px 55px rgba(0,0,0,.14), 0 10px 24px rgba(0,0,0,.06) !important;
}

html.is-ios body.utility-sheet-open #month-settings-sheet .sheet-scroll-content,
html.is-ios body.utility-sheet-open #profile-sheet .sheet-scroll-content {
  padding-bottom: calc(var(--safe-bottom) + 72px) !important;
}

@media (hover: hover) and (pointer: fine) {
  body.utility-sheet-open #month-settings-sheet,
  body.utility-sheet-open #profile-sheet {
    bottom: 0 !important;
  }
}

/* ========================================================================== */
/* v103 — Profil familial : membres, activité, compte et sauvegardes cloud.   */
/* ========================================================================== */

.auth-forgot {
  align-self: center;
  margin: -2px 0 2px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: #657084;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.household-summary,
.household-members-list,
.household-activity-list,
.cloud-backup-list,
.profile-inline-panel {
  border: 1px solid rgba(23,34,49,.07);
  border-radius: 14px;
  background: rgba(255,255,255,.68);
}

.household-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.household-name {
  color: #172231;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 760;
}

.household-role {
  margin-top: 3px;
  color: #7B8594;
  font-size: 11.5px;
  font-weight: 650;
}

.profile-mini-button,
.profile-text-button {
  border: 0;
  background: transparent;
  color: #087F68;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.profile-mini-button { padding: 7px 8px; font-size: 12px; }
.profile-text-button { padding: 4px 2px; font-size: 11.5px; }
.profile-mini-button[hidden], .profile-text-button[hidden] { display: none !important; }

.household-members-list {
  overflow: hidden;
  margin-bottom: 10px;
}

.household-member-row,
.cloud-backup-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(23,34,49,.06);
}

.household-member-row:last-child,
.cloud-backup-row:last-child { border-bottom: 0; }

.household-member-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(8,127,104,.09);
  color: #087F68;
  font-size: 14px;
  font-weight: 800;
}

.household-member-copy,
.cloud-backup-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.household-member-name,
.cloud-backup-title {
  color: #172231;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.household-member-meta,
.cloud-backup-meta,
.household-activity-meta {
  margin-top: 2px;
  color: #8A93A2;
  font-size: 10.5px;
  line-height: 1.3;
}

.household-member-actions,
.cloud-backup-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
}

.household-member-actions button,
.cloud-backup-actions button {
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(23,34,49,.08);
  border-radius: 8px !important;
  background: #fff;
  color: #435064;
  font: inherit;
  font-size: 9.8px;
  font-weight: 700;
}

.household-member-actions .danger-action,
.cloud-backup-actions .danger-action,
.danger-action { color: #B23A31 !important; }

.danger-soft { color: #8D5149 !important; }

.profile-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.profile-section-head .profile-section-label { margin-bottom: 7px; }

.household-activity-list,
.cloud-backup-list { overflow: hidden; }

.household-activity-row {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(23,34,49,.06);
}
.household-activity-row:last-child { border-bottom: 0; }
.household-activity-main {
  color: #354052;
  font-size: 12px;
  line-height: 1.35;
}
.household-activity-main strong { color: #172231; font-weight: 760; }

.profile-loading,
.profile-empty {
  padding: 13px 14px;
  color: #8993A2;
  font-size: 11.5px;
  line-height: 1.35;
}

.profile-inline-panel,
.household-join-panel,
.household-invite-result {
  margin-top: 10px;
  padding: 14px 16px;
}

.profile-inline-panel[hidden],
.account-panel[hidden],
.household-join-panel[hidden],
.household-invite-result[hidden] { display: none !important; }

.profile-inline-panel label,
.profile-inline-title {
  display: block;
  margin-bottom: 7px;
  color: #354052;
  font-size: 12px;
  font-weight: 720;
}

.profile-inline-copy {
  margin-bottom: 12px;
  color: #7B8594;
  font-size: 11.5px;
  line-height: 1.45;
}

.profile-inline-panel input,
.household-join-panel input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(23,34,49,.10);
  border-radius: 10px;
  background: #fff;
  color: #172231;
  font: inherit;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.profile-inline-panel input:focus,
.household-join-panel input:focus {
  border-color: rgba(8,127,104,.38);
  box-shadow: 0 0 0 3px rgba(8,127,104,.08);
}

.profile-inline-actions,
.household-join-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.profile-inline-actions button,
.household-join-actions button {
  min-height: 38px;
  border: 0;
  border-radius: 10px !important;
  background: #EEF2F4;
  color: #354052;
  font: inherit;
  font-size: 12px;
  font-weight: 720;
}

.profile-inline-actions button:last-child,
.household-join-actions button:last-child {
  background: #087F68;
  color: #fff;
}

.profile-inline-actions button.danger-action:last-child {
  background: #FFF0EE;
  color: #B23A31 !important;
}

.account-message,
.cloud-backup-message {
  min-height: 0;
  padding: 7px 3px 0;
  color: #748093;
  font-size: 11.5px;
  line-height: 1.4;
}
.account-message:empty,
.cloud-backup-message:empty { display: none; }
.account-message.success,
.cloud-backup-message.success { color: #087F68; }
.account-message.error,
.cloud-backup-message.error { color: #B23A31; }

.settings-account-sync.is-syncing { color: #8A6A24 !important; }
.settings-account-sync.is-offline { color: #7B647C !important; }

/* Les nouvelles sections doivent respirer sans recréer le "mur blanc" supprimé en v102. */
html.is-ios body.utility-sheet-open #profile-sheet .sheet-scroll-content {
  padding-bottom: calc(var(--safe-bottom) + 72px) !important;
}

@media (max-width: 430px) {
  .household-member-row,
  .cloud-backup-row { align-items: flex-start; }
  .household-member-actions,
  .cloud-backup-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .household-member-actions button,
  .cloud-backup-actions button {
    min-height: 27px;
    padding: 0 7px;
    font-size: 9.3px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .household-member-actions button:hover,
  .cloud-backup-actions button:hover,
  .profile-mini-button:hover,
  .profile-text-button:hover { opacity: .72; }
}

/* v103 : hidden doit gagner sur les display:flex des cellules. */
.settings-row[hidden],
.auth-forgot[hidden] { display: none !important; }

/* ========================================================================== */
/* v104 — finition Profil/Options iOS : scroll propre et séparateurs nets.   */
/* ========================================================================== */

/* Sur iOS, l'indicateur WebKit se dessinait par-dessus les cartes. Le geste
   tactile suffit à indiquer que la feuille défile : on masque uniquement la
   barre visuelle, sans toucher au scroll natif/inertiel. */
html.is-ios #month-settings-sheet .sheet-scroll-content,
html.is-ios #profile-sheet .sheet-scroll-content {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding-right: 6px !important;
}

html.is-ios #month-settings-sheet .sheet-scroll-content::-webkit-scrollbar,
html.is-ios #profile-sheet .sheet-scroll-content::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

/* Le dernier bouton visible du bloc Foyer ne doit pas garder son séparateur
   lorsque "Quitter le foyer" est masqué (cas du propriétaire). */
.household-settings-list:has(#household-leave[hidden]) #household-open-join {
  border-bottom: 0 !important;
}

.household-settings-list .settings-row:last-child:not([hidden]) {
  border-bottom: 0 !important;
}

/* Un seul contour en bas de la carte + un peu d'air avant le message/section. */
.household-settings-list {
  margin-bottom: 12px !important;
  padding-bottom: 0 !important;
}

.household-settings-list + .profile-inline-panel,
.household-settings-list + .household-invite-result,
.household-settings-list + .household-join-panel,
.household-settings-list ~ .household-message {
  margin-top: 10px;
}

/* Les cartes ne vont plus jusqu'à la zone où apparaissait l'indicateur. */
html.is-ios #profile-sheet .sheet-scroll-content > *,
html.is-ios #month-settings-sheet .sheet-scroll-content > * {
  max-width: 100%;
  box-sizing: border-box;
}


/* v105 — photo de profil personnelle (distincte des avatars du foyer). */
.profile-avatar {
  position: relative;
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: pointer;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  -webkit-tap-highlight-color: transparent;
}

.profile-avatar::after {
  content: '';
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #087F68;
  box-sizing: border-box;
  opacity: .92;
}

.profile-avatar.has-photo {
  color: transparent;
  background-color: #EAF4F1;
}

.profile-avatar.is-uploading {
  opacity: .55;
  pointer-events: none;
}

.profile-avatar-input {
  position: fixed !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

@media (hover: hover) and (pointer: fine) {
  .profile-avatar:hover { box-shadow: 0 0 0 4px rgba(8,127,104,.08); }
}


/* v106 — vraies images pour l'avatar personnel et les membres du foyer. */
.profile-avatar-photo,
.household-member-avatar-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.profile-avatar.has-photo,
.household-member-avatar.has-photo {
  overflow: hidden;
  background-color: #EAF4F1;
  color: transparent;
}

.household-member-avatar.has-photo {
  padding: 0;
}

/* ========================================================================== */
/* v109 — Face ID / Touch ID temporairement désactivé.      */
/* ========================================================================== */

.biometric-settings-list {
  overflow: hidden;
}

.biometric-setting-row {
  min-height: 64px !important;
  cursor: default !important;
}

.biometric-setting-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.biometric-setting-title {
  color: #172231;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 650;
}

.biometric-setting-subtitle {
  color: #8A93A2;
  font-size: 10.8px;
  line-height: 1.25;
  font-weight: 500;
}

.biometric-setting-row.is-unavailable {
  opacity: .52;
}

.ios-switch {
  position: relative;
  flex: 0 0 54px;
  width: 54px;
  height: 30px;
  display: inline-block;
}

.ios-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

/* v108 — piste ET curseur en pilule. */
.ios-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #E5E5EA;
  transition: background-color 180ms ease;
  box-shadow: inset 0 0 0 .5px rgba(0,0,0,.04);
}

.ios-switch-track::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 5px;
  width: 24px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1.5px 4px rgba(0,0,0,.18), 0 .5px 1px rgba(0,0,0,.08);
  transition: transform 180ms cubic-bezier(.2,.8,.2,1);
}

.ios-switch input:checked + .ios-switch-track {
  background: #34C759;
}

.ios-switch input:checked + .ios-switch-track::after {
  transform: translateX(20px);
}

.ios-switch input:focus-visible + .ios-switch-track {
  outline: 2px solid rgba(0,122,255,.55);
  outline-offset: 2px;
}

.ios-switch input:disabled + .ios-switch-track {
  opacity: .6;
}

.biometric-setting-message {
  min-height: 0;
  padding: 7px 4px 0;
  color: #748093;
  font-size: 11px;
  line-height: 1.35;
}
.biometric-setting-message:empty { display: none; }
.biometric-setting-message.success { color: #087F68; }
.biometric-setting-message.error { color: #B23A31; }

.biometric-lock[hidden] { display: none !important; }
.biometric-lock {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, var(--safe-top)) max(22px, var(--safe-right)) max(24px, var(--safe-bottom)) max(22px, var(--safe-left));
  box-sizing: border-box;
  background: #F3F5F7;
}

body.biometric-locked {
  overflow: hidden !important;
}

.biometric-lock-card {
  width: min(100%, 360px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.biometric-lock-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  color: #087F68;
}
.biometric-lock-icon svg {
  width: 64px;
  height: 64px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.biometric-lock-card h1 {
  margin: 0;
  color: #172231;
  font-size: 25px;
  line-height: 1.15;
  font-weight: 760;
  letter-spacing: -.35px;
}

.biometric-lock-card p {
  margin: 8px 0 22px;
  color: #7B8594;
  font-size: 13px;
  line-height: 1.4;
}

.biometric-unlock-button,
.biometric-password-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px !important;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}

.biometric-unlock-button {
  background: #087F68;
  color: #fff;
}
.biometric-unlock-button:disabled { opacity: .58; }

.biometric-password-button {
  margin-top: 8px;
  background: transparent;
  color: #5E6978;
}

.biometric-lock-message {
  min-height: 18px;
  margin-top: 10px;
  color: #7B8594;
  font-size: 11.5px;
  line-height: 1.35;
}
.biometric-lock-message.error { color: #B23A31; }

@media (hover: hover) and (pointer: fine) {
  .biometric-unlock-button:hover { opacity: .9; }
  .biometric-password-button:hover { background: rgba(23,34,49,.04); }
}

/* Empêche le flash du budget avant que le verrou biométrique reprenne la main. */
html.biometric-prelock .page,
html.biometric-prelock .ca-bottom-nav,
html.biometric-prelock .sheet-backdrop,
html.biometric-prelock .copy-toast {
  visibility: hidden !important;
}


/* v109 — biométrie en attente : réglage visible mais volontairement inactif. */
.biometric-setting-row.is-unavailable {
  opacity: 1 !important;
  cursor: default !important;
  pointer-events: none !important;
}
.biometric-setting-row.is-unavailable .biometric-setting-title {
  color: #8E8E93 !important;
}
.biometric-setting-row.is-unavailable .biometric-setting-subtitle {
  color: #AEAEB2 !important;
}
.biometric-setting-row.is-unavailable .ios-switch {
  opacity: .52 !important;
  filter: grayscale(1) !important;
}
.biometric-setting-row.is-unavailable .ios-switch-track {
  background: #D1D1D6 !important;
}
.biometric-setting-row.is-unavailable .ios-switch-track::after {
  background: #F2F2F7 !important;
  box-shadow: none !important;
  transform: none !important;
}

/* ========================================================================== */
/* v130 — Accueil, recherche, récurrences, objectifs, clôture, reçus */
/* ========================================================================== */

.v110-header-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.v110-header-row h1 { margin: 0; }
.v110-header-actions { display:flex; align-items:center; gap:8px; }
.v110-icon-button {
  width: 38px; height: 38px; border: 0; border-radius: 12px;
  background: rgba(255,255,255,.74); color: var(--ca-bluegrey);
  display:grid; place-items:center; font: inherit; font-size:22px; line-height:1;
  box-shadow: inset 0 0 0 1px rgba(28,42,57,.06);
}
.v110-icon-button.primary { background: var(--ca-accent); color:#fff; }

.v110-home {
  margin: 14px 0 18px;
  display: grid;
  gap: 10px;
}
.v110-home-main {
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(8,127,104,.11), rgba(255,255,255,.88));
  border: 1px solid rgba(8,127,104,.09);
  box-shadow: 0 10px 32px rgba(66,83,104,.055);
}
.v110-home-kicker { color: var(--ca-bluegrey); font-size: 12px; font-weight: 700; }
.v110-home-amount { margin-top:5px; font-size: clamp(30px,8vw,42px); line-height:1; font-weight:850; letter-spacing:-1.35px; color:var(--ink); }
.v110-home-sub { margin-top:8px; color:var(--muted); font-size:12px; }
.v110-home-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.v110-home-tile {
  border:1px solid rgba(28,42,57,.06); border-radius:14px; background:rgba(255,255,255,.78);
  min-height:70px; padding:12px 13px; text-align:left; display:flex; flex-direction:column; justify-content:space-between;
  color:var(--ink); font:inherit;
}
.v110-home-tile span { color:var(--muted); font-size:11px; font-weight:650; }
.v110-home-tile strong { font-size:16px; letter-spacing:-.3px; }
.v110-alerts { display:grid; gap:6px; }
.v110-alert {
  display:flex; align-items:flex-start; gap:9px; padding:10px 12px; border-radius:12px;
  background:rgba(255,186,0,.09); border:1px solid rgba(255,170,0,.12); color:var(--ink); font-size:12px;
}
.v110-alert strong { display:block; font-size:12px; margin-bottom:2px; }
.v110-closed-banner { padding:10px 12px; border-radius:12px; text-align:center; font-size:12px; font-weight:750; color:#087f68; background:rgba(8,127,104,.08); }

.v110-settings-section { margin-top:22px; }
.v110-section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.v110-section-head .profile-section-label { margin:0 0 3px; }
.v110-section-note { color:var(--muted); font-size:11px; line-height:1.35; }
.v110-feature-list { margin-top:8px; display:grid; gap:7px; }
.v110-feature-empty { padding:12px 2px; color:var(--muted); font-size:12px; }
.v110-feature-row {
  min-height:54px; padding:10px 12px; border-radius:13px; border:1px solid rgba(28,42,57,.065);
  background:rgba(255,255,255,.70); display:flex; align-items:center; gap:10px;
}
.v110-feature-row-main { min-width:0; flex:1 1 auto; }
.v110-feature-row-title { font-size:13px; font-weight:730; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.v110-feature-row-sub { margin-top:2px; font-size:10.5px; color:var(--muted); }
.v110-feature-row-actions { display:flex; align-items:center; gap:6px; }
.v110-feature-action { appearance:none; border:0; border-radius:9px; padding:7px 8px; background:rgba(28,42,57,.055); color:var(--ca-bluegrey); font:inherit; font-size:11px; }
.v110-feature-action.danger { color:#b0443b; background:rgba(176,68,59,.07); }
.v110-feature-progress { height:5px; margin-top:7px; background:rgba(28,42,57,.07); border-radius:999px; overflow:hidden; }
.v110-feature-progress > span { display:block; height:100%; background:var(--ca-accent); border-radius:inherit; }
.v110-form { margin-top:10px !important; }
.v110-form label { display:grid; gap:6px; font-size:11px; color:var(--muted); }
.v110-form input,.v110-form select,.v110-year-select {
  min-height:40px; width:100%; border:1px solid rgba(28,42,57,.09); border-radius:11px; background:rgba(255,255,255,.9);
  color:var(--ink); font:inherit; padding:0 11px; box-sizing:border-box;
}
.v110-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.v110-year-select { width:auto; min-width:88px; min-height:34px; }

.v110-annual { margin-top:9px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.v110-annual-card { padding:11px 12px; border-radius:12px; background:rgba(255,255,255,.72); border:1px solid rgba(28,42,57,.06); }
.v110-annual-card span { display:block; color:var(--muted); font-size:10.5px; }
.v110-annual-card strong { display:block; margin-top:3px; font-size:15px; color:var(--ink); }
.v110-annual-ranking { grid-column:1/-1; padding:11px 12px; border-radius:12px; background:rgba(255,255,255,.72); border:1px solid rgba(28,42,57,.06); }
.v110-annual-ranking-title { font-size:11px; font-weight:750; margin-bottom:6px; }
.v110-annual-ranking-row { display:flex; justify-content:space-between; gap:10px; padding:5px 0; font-size:11px; border-top:1px solid rgba(28,42,57,.04); }
.v110-annual-ranking-row:first-of-type { border-top:0; }

.v110-notification-note { margin:5px 2px 14px; }

.v110-fab {
  position:fixed; right:max(16px,calc(var(--safe-right) + 16px)); bottom:calc(var(--safe-bottom) + 72px);
  z-index:17; width:48px; height:48px; border:0; border-radius:16px; background:var(--ca-accent); color:#fff;
  font:inherit; font-size:27px; box-shadow:0 10px 28px rgba(8,127,104,.24); display:grid; place-items:center;
}
body.utility-sheet-open .v110-fab { opacity:0; pointer-events:none; }

.v110-overlay { z-index:80 !important; bottom:0 !important; }
.v110-overlay .sheet { background:var(--paper) !important; }
.v110-overlay-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.v110-close { border:0; background:transparent; color:var(--ca-accent); font:inherit; font-size:12px; padding:7px 0; }
.v110-search-sheet,.v110-quick-sheet { max-height:min(82dvh,720px) !important; overflow:auto; }
.v110-search-input {
  width:100%; min-height:46px; margin-top:10px; box-sizing:border-box; border:1px solid rgba(28,42,57,.08); border-radius:14px;
  background:rgba(28,42,57,.045); padding:0 14px; color:var(--ink); font:inherit; font-size:16px;
}
.v110-search-summary { min-height:22px; padding:7px 2px 2px; color:var(--muted); font-size:11px; }
.v110-search-results { display:grid; gap:6px; padding-bottom:8px; }
.v110-search-row { display:flex; align-items:center; gap:10px; padding:11px 12px; border-radius:12px; background:rgba(255,255,255,.78); border:1px solid rgba(28,42,57,.06); }
.v110-search-row-main { min-width:0; flex:1; }
.v110-search-row-title { font-size:13px; font-weight:720; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.v110-search-row-sub { margin-top:2px; color:var(--muted); font-size:10.5px; }
.v110-search-row-amount { white-space:nowrap; font-size:13px; font-weight:760; }
.v110-receipt-button { border:0; width:32px; height:32px; border-radius:10px; background:rgba(28,42,57,.055); font-size:15px; }

.v110-quick-sheet .field { margin-top:12px; }
.v110-quick-sheet .field > span { display:block; margin-bottom:6px; color:var(--muted); font-size:11px; font-weight:650; }
.v110-quick-sheet input[type="text"],.v110-quick-sheet select {
  width:100%; min-height:46px; box-sizing:border-box; border:1px solid rgba(28,42,57,.09); border-radius:12px; background:#fff; padding:0 12px; color:var(--ink); font:inherit;
}
.v110-receipt-picker { margin-top:12px; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 12px; border:1px dashed rgba(28,42,57,.15); border-radius:12px; cursor:pointer; }
.v110-receipt-picker input { position:absolute; opacity:0; pointer-events:none; }
.v110-receipt-picker span { font-size:12px; font-weight:650; }
.v110-receipt-picker small { color:var(--muted); max-width:42%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.v110-inline-message { min-height:20px; padding-top:5px; color:var(--muted); font-size:11px; text-align:center; }
.v110-inline-message.error { color:#b0443b; }

html.is-ios .v110-overlay { padding:0 !important; align-items:flex-end !important; }
html.is-ios .v110-overlay .sheet { width:100% !important; border-radius:24px 24px 0 0 !important; padding-bottom:max(18px,var(--safe-bottom)) !important; }
html.is-ios .v110-fab { bottom:calc(var(--safe-bottom) + 70px); }

body.month-is-closed .income-add,
body.month-is-closed #add-fixed-category,
body.month-is-closed #add-variable-category { opacity:.42; }

@media (min-width:900px) and (hover:hover) and (pointer:fine) {
  .v110-home { grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr); align-items:stretch; }
  .v110-home-main { grid-row:1 / span 2; }
  .v110-home-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .v110-alerts,.v110-closed-banner { grid-column:1/-1; }
  .v110-fab { display:none; }
  .v110-overlay { align-items:center !important; padding:28px !important; }
  .v110-overlay .sheet { max-width:620px !important; border-radius:20px !important; }
}

@media (max-width:390px) {
  .v110-home-amount { font-size:32px; }
  .v110-home-tile { padding:11px; min-height:66px; }
  .v110-form-grid { grid-template-columns:1fr; }
}
/* L'accueil enrichi appartient à l'onglet Revenus afin de ne pas encombrer Fixes/Variables. */
body[data-active-nav="fixed"] .v110-home,
body[data-active-nav="variable"] .v110-home,
body[data-active-nav="menu"] .v110-home,
body[data-active-nav="profile"] .v110-home { display:none; }

/* v112 — fonctions avancées ------------------------------------------------ */
.v112-entry-meta select,
#entry-reimbursed-amount,
#v112-bank-payer,
.v112-transaction-sheet select,
.v112-transaction-sheet input,
.v112-split-line input,
.v112-split-line select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(28,42,57,.10);
  border-radius: 12px;
  background: rgba(255,255,255,.86);
  color: var(--ink);
  font: inherit;
  padding: 9px 11px;
  box-sizing: border-box;
}

.v112-check-row {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 9px !important;
  padding: 4px 1px;
  color: var(--ca-bluegrey) !important;
}
.v112-check-row input { width: 17px !important; height: 17px !important; min-height: 0 !important; flex: 0 0 17px; margin-top: 1px; }
.v112-check-row span { line-height: 1.35; }

.v112-bank-toolbar { display:flex; align-items:center; gap:8px; margin-top:9px; }
.v112-file-button,
.v112-bank-toolbar select {
  min-height: 38px;
  border: 1px solid rgba(28,42,57,.08);
  border-radius: 11px;
  background: rgba(255,255,255,.76);
  color: var(--ink);
  font: inherit;
  font-size: 11.5px;
  padding: 8px 10px;
  box-sizing: border-box;
}
.v112-file-button { display:inline-flex; align-items:center; justify-content:center; font-weight:720; color:var(--ca-accent); cursor:pointer; white-space:nowrap; }
.v112-bank-toolbar select { min-width:0; flex:1 1 auto; }
.v112-bank-status { margin-top:7px; }
.v112-bank-preview { margin-top:8px; display:grid; gap:5px; max-height:360px; overflow:auto; -webkit-overflow-scrolling:touch; }
.v112-bank-row { display:flex; align-items:center; gap:9px; padding:9px 10px; border:1px solid rgba(28,42,57,.055); border-radius:11px; background:rgba(255,255,255,.7); }
.v112-bank-row.duplicate { opacity:.48; }
.v112-bank-row > input { width:17px; height:17px; flex:0 0 17px; }
.v112-bank-row-main { min-width:0; flex:1; display:grid; gap:2px; }
.v112-bank-row-main strong { font-size:11.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.v112-bank-row-main small { color:var(--muted); font-size:9.8px; line-height:1.25; }
.v112-bank-row-amount { white-space:nowrap; font-size:11.5px; font-weight:750; }
.v112-bank-actions { margin-top:8px !important; }

.v112-payer-total { font-size:12.5px; white-space:nowrap; }


.v112-manage-button {
  border:0;
  width:32px;
  height:32px;
  flex:0 0 32px;
  border-radius:10px;
  background:rgba(28,42,57,.055);
  color:var(--ca-bluegrey);
  font:700 14px/1 system-ui,-apple-system,BlinkMacSystemFont,"SF Pro Text",sans-serif;
  letter-spacing:1px;
}
.v112-manage-button[hidden] { display:none !important; }

.v112-transaction-sheet { max-height:min(86dvh,760px) !important; overflow:auto; }
.v112-transaction-fields { margin-top:14px; display:grid; gap:10px; }
.v112-transaction-fields .field,
.v112-transaction-sheet .field { margin:0 !important; }
.v112-transaction-sheet .field > span { display:block; margin-bottom:6px; color:var(--muted); font-size:11px; font-weight:650; }
.v112-primary-row-button,
.v112-secondary-row-button {
  width:100%; min-height:42px; border:0; border-radius:12px; font:inherit; font-size:12px; font-weight:740;
}
.v112-primary-row-button { background:var(--ca-accent); color:white; }
.v112-secondary-row-button { margin-top:7px; background:rgba(28,42,57,.055); color:var(--ca-bluegrey); }
.v112-split-block { margin-top:18px; padding-top:14px; border-top:1px solid rgba(28,42,57,.07); }
.v112-split-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.v112-split-head > div { min-width:0; display:grid; gap:2px; }
.v112-split-head strong { font-size:12.5px; }
.v112-split-head small { color:var(--muted); font-size:10.5px; }
.v112-split-head > button { border:0; border-radius:10px; padding:8px 10px; background:rgba(8,127,104,.08); color:var(--ca-accent); font:inherit; font-size:11px; font-weight:740; }
.v112-split-lines { margin-top:10px; display:grid; gap:7px; }
.v112-split-line { display:grid; grid-template-columns:minmax(0,1.4fr) 90px minmax(105px,1fr) 30px; gap:6px; align-items:center; }
.v112-split-line input,.v112-split-line select { min-height:38px; padding:7px 8px; font-size:11px; }
.v112-split-remove { width:30px;height:30px;border:0;border-radius:9px;background:rgba(176,68,59,.07);color:#b0443b;font-size:18px; }
.v112-split-total { margin-top:8px; padding:7px 9px; border-radius:9px; background:rgba(8,127,104,.06); color:#087f68; font-size:10.5px; text-align:center; }
.v112-split-total.is-error { color:#b0443b; background:rgba(176,68,59,.06); }

.v112-undo-toast {
  position:fixed;
  left:50%;
  bottom:calc(var(--safe-bottom) + 72px);
  transform:translateX(-50%);
  z-index:140;
  width:min(calc(100vw - 28px),420px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:11px 12px 11px 14px;
  border-radius:14px;
  background:rgba(29,33,38,.94);
  color:white;
  box-shadow:0 12px 34px rgba(0,0,0,.18);
  -webkit-backdrop-filter:blur(18px);
  backdrop-filter:blur(18px);
  font-size:11.5px;
}
.v112-undo-toast[hidden] { display:none !important; }
.v112-undo-toast button { border:0; border-radius:9px; padding:7px 9px; background:rgba(255,255,255,.13); color:white; font:inherit; font-size:11px; font-weight:760; }

@media (max-width:560px) {
  .v112-split-line { grid-template-columns:minmax(0,1fr) 78px 30px; }
  .v112-split-line .v112-split-category { grid-column:1 / 3; grid-row:2; }
  .v112-split-line .v112-split-remove { grid-column:3; grid-row:1 / 3; }
}

html.is-ios #entry-sheet .sheet {
  /* Les nouveaux champs peuvent allonger la feuille ; le scroll reste natif. */
  max-height: calc(100dvh - var(--safe-top) - 8px) !important;
}
html.is-ios .v112-bank-preview { scrollbar-width:none; }
html.is-ios .v112-bank-preview::-webkit-scrollbar { width:0; height:0; display:none; }
html.is-ios .v112-transaction-sheet { width:100% !important; border-radius:24px 24px 0 0 !important; padding-bottom:max(18px,var(--safe-bottom)) !important; }

#entry-payer-field[hidden],
#entry-reimbursement-field[hidden],
#entry-reimbursed-amount-field[hidden],
#v112-quick-payer-wrap[hidden],
#v112-transaction-reimbursed-wrap[hidden],
#v112-split-block[hidden],
#v112-split-editor[hidden],
#v112-bank-preview[hidden],
#v112-bank-actions[hidden],
#v112-rule-form[hidden] {
  display: none !important;
}

/* ========================================================================== */

/* v115 : le système visuel unifié a été déplacé dans design-system.css. */

/* ===== SOURCE: design-system.css ===== */
/* v115 — système visuel unifié                                               */
/* Base v113.2 stable : CSS uniquement, aucune logique métier modifiée.       */
/* ========================================================================== */

:root {
  --ink: #172231;
  --ui-surface: rgba(255, 255, 255, .82);
  --ui-surface-solid: #FFFFFF;
  --ui-surface-soft: rgba(244, 247, 246, .92);
  --ui-border: rgba(28, 42, 57, .075);
  --ui-border-strong: rgba(28, 42, 57, .115);
  --ui-muted: #748093;
  --ui-radius-card: 14px;
  --ui-radius-control: 11px;
  --ui-radius-sheet: 22px;
  --ui-row-height: 54px;
  --ui-control-height: 44px;
  --ui-shadow-card: 0 7px 24px rgba(39, 55, 72, .035);
}

/* Typographie et rythme de section. */
.profile-section-label,
.income-block-title,
.month-balance-title {
  color: var(--ui-muted) !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  font-weight: 750 !important;
  letter-spacing: .045em !important;
  text-transform: uppercase !important;
}

.profile-section-label {
  margin: 20px 3px 8px !important;
}

.settings-sheet-title,
.sheet-title {
  color: var(--ink) !important;
  font-size: 21px !important;
  line-height: 1.12 !important;
  font-weight: 780 !important;
  letter-spacing: -.035em !important;
}

.settings-sheet-subtitle,
.v110-section-note,
.household-member-meta,
.cloud-backup-meta,
.household-activity-meta,
.v110-feature-row-sub,
.v110-search-row-sub {
  color: var(--ui-muted) !important;
}

/* Une seule famille de surfaces pour les cartes et cellules. */
.income-block,
.month-balance,
.variable-category,
.income-grid .swipe-row,
.income-summary-card,
.v110-home-main,
.v110-home-tile,
.v110-feature-row,
.v110-annual-card,
.v110-annual-ranking,
.v110-search-row,
.v112-bank-row,
.profile-account-card,
.household-summary,
.household-members-list,
.household-activity-list,
.cloud-backup-list,
.profile-inline-panel,
.household-invite-result,
.household-join-panel {
  border: 1px solid var(--ui-border) !important;
  border-radius: var(--ui-radius-card) !important;
  background: var(--ui-surface) !important;
  box-shadow: none !important;
}

/* La carte d'accueil reste légèrement mise en avant, mais avec la même géométrie. */
.v110-home-main {
  background: linear-gradient(145deg, rgba(8,127,104,.095), rgba(255,255,255,.92)) !important;
}

.income-block,
.month-balance {
  padding: 15px !important;
  background: var(--ui-surface-soft) !important;
}

.income-block { margin: 16px 0 18px !important; }
.month-balance { margin-bottom: 18px !important; }
.variable-categories { gap: 10px !important; }

/* Catégories variables : un seul contour externe, contenu interne plus calme. */
.variable-category {
  overflow: hidden !important;
}
.variable-category .category-head {
  padding: 14px !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
}
.variable-category .category-metrics {
  margin-top: 12px !important;
  padding: 10px 11px !important;
  gap: 7px !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 11px !important;
  background: rgba(244,247,246,.82) !important;
}
.variable-category .category-list {
  padding-left: 14px !important;
  padding-right: 14px !important;
}
.category-name { color: var(--ink) !important; font-size: 16px !important; }
.category-progress,
.month-balance-progress,
.v110-feature-progress {
  background: rgba(28,42,57,.075) !important;
}
.category-progress-bar:not(.over),
.month-balance-progress-bar:not(.over),
.v110-feature-progress > span {
  background: var(--ca-accent) !important;
}

/* Listes type Réglages : mêmes bords, même hauteur, un seul séparateur. */
.settings-list,
.profile-settings-list {
  overflow: hidden !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: var(--ui-radius-card) !important;
  background: var(--ui-surface) !important;
  padding: 0 !important;
}

.settings-row,
.profile-settings-list .settings-row {
  min-height: var(--ui-row-height) !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--ink);
  font-size: 14px !important;
}

.settings-list > .settings-row:last-child,
.settings-list > label.settings-row:last-child,
.profile-settings-list > .settings-row:last-child,
.profile-settings-list > label.settings-row:last-child,
.household-settings-list > .settings-row:last-child {
  border-bottom: 0 !important;
}

.settings-chevron {
  margin-left: 12px !important;
  color: #A5ACB7 !important;
  font-size: 20px !important;
  font-weight: 450 !important;
}

.settings-row.danger,
.settings-row.danger-soft { color: #B0443B !important; }

/* Foyer / activité / sauvegardes : alignement identique à Réglages. */
.household-summary {
  min-height: var(--ui-row-height) !important;
  padding: 12px 14px !important;
}
.household-member-row,
.cloud-backup-row,
.household-activity-row {
  min-height: var(--ui-row-height) !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid var(--ui-border) !important;
}
.household-member-row:last-child,
.cloud-backup-row:last-child,
.household-activity-row:last-child { border-bottom: 0 !important; }

.profile-section-head {
  min-height: 30px !important;
  margin-top: 20px !important;
  align-items: center !important;
}
.profile-section-head .profile-section-label {
  margin: 0 !important;
}

/* Boutons texte / mini actions : même langage visuel. */
.profile-mini-button,
.profile-text-button,
.v110-feature-action,
.v112-manage-button,
.v110-close,
.v112-split-head > button,
.household-copy-button,
.household-member-actions button,
.cloud-backup-actions button {
  border: 0 !important;
  border-radius: var(--ui-radius-control) !important;
  background: rgba(28,42,57,.055) !important;
  color: var(--ca-accent) !important;
  font-weight: 720 !important;
}
.profile-text-button,
.v110-close {
  background: transparent !important;
  border-radius: 8px !important;
}
.v110-feature-action.danger,
.household-member-actions .danger-action,
.cloud-backup-actions .danger-action {
  color: #B0443B !important;
  background: rgba(176,68,59,.065) !important;
}

/* Contrôles et formulaires : 46px / rayon 11px partout. */
.field input,
.field select,
.profile-inline-panel input,
.profile-inline-panel select,
.household-join-panel input,
.v110-form input,
.v110-form select,
.v110-year-select,
.v110-search-input,
.v110-quick-sheet input[type="text"],
.v110-quick-sheet select,
.v112-entry-meta select,
#entry-reimbursed-amount,
#v112-bank-payer,
.v112-transaction-sheet select,
.v112-transaction-sheet input,
.v112-split-line input,
.v112-split-line select,
.auth-field input {
  min-height: 46px !important;
  border: 1px solid var(--ui-border-strong) !important;
  border-radius: var(--ui-radius-control) !important;
  background: var(--ui-surface-solid) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}

.field input:focus,
.field select:focus,
.profile-inline-panel input:focus,
.profile-inline-panel select:focus,
.household-join-panel input:focus,
.v110-form input:focus,
.v110-form select:focus,
.v110-search-input:focus,
.v110-quick-sheet input:focus,
.v110-quick-sheet select:focus,
.v112-transaction-sheet input:focus,
.v112-transaction-sheet select:focus,
.auth-field input:focus {
  border-color: rgba(8,127,104,.38) !important;
  box-shadow: 0 0 0 3px rgba(8,127,104,.075) !important;
  outline: none !important;
}

/* Boutons principaux/secondaires : géométrie commune. */
.income-add,
.mini-add,
.add-button,
.category-action,
.category-toggle,
.category-add-expense,
.data-button,
.copy-back,
.copy-month-button,
.copy-confirm-button,
.sheet-button,
.profile-inline-actions button,
.household-join-actions button,
.v112-primary-row-button,
.v112-secondary-row-button,
.v112-file-button,
.v112-bank-toolbar select {
  border-radius: var(--ui-radius-control) !important;
}

.income-add,
.mini-add,
.data-button,
.sheet-button,
.copy-confirm-button,
.profile-inline-actions button,
.household-join-actions button,
.v112-primary-row-button,
.v112-secondary-row-button {
  min-height: var(--ui-control-height) !important;
}

.income-add,
.mini-add,
.add-button,
.data-button,
.sheet-button:not(.primary),
.copy-confirm-button:not(.primary),
.v112-secondary-row-button,
.profile-inline-actions button:first-child,
.household-join-actions button:first-child {
  border: 1px solid var(--ui-border) !important;
  background: var(--ui-surface) !important;
  color: var(--ink) !important;
}

.sheet-button.primary,
.copy-confirm-button.primary,
.auth-submit,
.v112-primary-row-button,
.profile-inline-actions button:last-child:not(.danger-action),
.household-join-actions button:last-child {
  border: 0 !important;
  background: var(--ca-accent) !important;
  color: #FFFFFF !important;
  border-radius: var(--ui-radius-control) !important;
}

.danger-confirm,
.profile-inline-actions button.danger-action:last-child {
  background: #B0443B !important;
  color: #FFFFFF !important;
  border-color: transparent !important;
}

.category-action,
.category-toggle,
.v110-receipt-button,
.v112-manage-button {
  background: rgba(28,42,57,.05) !important;
  border: 1px solid var(--ui-border) !important;
}
.category-action.danger { color: #B0443B !important; }
.category-add-expense {
  border: 1px dashed rgba(28,42,57,.14) !important;
  background: transparent !important;
}

/* Revenus / dépenses : même rayon et même densité de lignes. */
.income-grid { gap: 7px !important; }
.income-grid .swipe-row {
  border-radius: var(--ui-radius-card) !important;
}
.income-grid .swipe-content {
  min-height: 70px !important;
  padding: 12px 13px !important;
  border-radius: calc(var(--ui-radius-card) - 1px) !important;
}
.plain-list .swipe-row {
  border-color: var(--ui-border) !important;
}
.swipe-content { min-height: 58px !important; }
.line-title { color: var(--ink) !important; }

/* Accueil et fonctionnalités v110/v112 : même densité et mêmes cartes. */
.v110-home { gap: 8px !important; margin: 12px 0 18px !important; }
.v110-home-main { padding: 16px !important; }
.v110-home-grid { gap: 7px !important; }
.v110-home-tile { min-height: 68px !important; padding: 11px 12px !important; }
.v110-settings-section { margin-top: 20px !important; }
.v110-feature-list { gap: 6px !important; }
.v110-feature-row { min-height: var(--ui-row-height) !important; padding: 10px 12px !important; }
.v110-annual { gap: 6px !important; }
.v110-annual-card,
.v110-annual-ranking { padding: 11px 12px !important; }
.v110-search-results { gap: 6px !important; }
.v110-search-row { min-height: 54px !important; padding: 10px 12px !important; }
.v112-bank-preview { gap: 6px !important; }
.v112-bank-row { min-height: 52px !important; padding: 9px 11px !important; }
.v110-closed-banner,
.v110-alert {
  border-radius: var(--ui-radius-control) !important;
}

/* En-tête et boutons rapides : dimensions identiques. */
.v110-header-actions { gap: 7px !important; }
.v110-icon-button {
  width: 38px !important;
  height: 38px !important;
  border-radius: 11px !important;
  box-shadow: inset 0 0 0 1px var(--ui-border) !important;
  background: var(--ui-surface) !important;
}
.v110-icon-button.primary {
  background: var(--ca-accent) !important;
  box-shadow: none !important;
}
.v110-fab {
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(8,127,104,.20) !important;
}

/* Sheets : même surface et même géométrie sans toucher au scroll / drag. */
.sheet {
  background: rgba(255,253,248,.98) !important;
  border-color: var(--ui-border) !important;
  box-shadow: 0 -16px 42px rgba(27,39,52,.11) !important;
}

#month-settings-sheet .sheet-drag-zone,
#profile-sheet .sheet-drag-zone {
  background: rgba(255,253,248,.98) !important;
}

html.is-ios .sheet,
html.is-ios .v110-overlay .sheet,
html.is-ios .v112-transaction-sheet {
  border-radius: 24px 24px 0 0 !important;
}

@media (hover:hover) and (pointer:fine) {
  .sheet,
  .v110-overlay .sheet,
  .v112-transaction-sheet {
    border-radius: var(--ui-radius-sheet) !important;
  }
}

/* Profil : carte compte et avatars alignés avec le reste. */
.profile-account-card {
  margin: 8px 0 4px !important;
  padding: 14px !important;
}
.profile-avatar {
  width: 48px !important;
  height: 48px !important;
  flex-basis: 48px !important;
}
.settings-account-name { color: var(--ink) !important; font-weight: 760 !important; }
.settings-account-email,
.settings-account-sync { color: var(--ui-muted) !important; }

/* Auth : reprend exactement les mêmes tokens que l'application. */
.auth-gate { background: #F3F5F6 !important; }
.auth-card {
  border: 1px solid var(--ui-border) !important;
  border-radius: 22px !important;
  background: var(--ui-surface-solid) !important;
  box-shadow: 0 14px 44px rgba(33,45,61,.07) !important;
}
.auth-brand-mark { border-radius: 13px !important; }
.auth-tabs {
  border-radius: 12px !important;
  background: rgba(28,42,57,.055) !important;
}
.auth-tab { border-radius: 9px !important; }
.auth-submit { min-height: 48px !important; }

/* Barre basse : même finition, tout en conservant le comportement v102. */
.ca-bottom-nav {
  border-top-color: var(--ui-border) !important;
  background: rgba(255,255,255,.94) !important;
}
body.utility-sheet-open .ca-bottom-nav {
  border-radius: 0 !important;
}

/* iOS : aucune scrollbar ne doit recouvrir les cellules des feuilles utilitaires. */
html.is-ios #month-settings-sheet .sheet-scroll-content,
html.is-ios #profile-sheet .sheet-scroll-content,
html.is-ios .v110-search-results,
html.is-ios .v112-bank-preview {
  scrollbar-width: none !important;
}
html.is-ios #month-settings-sheet .sheet-scroll-content::-webkit-scrollbar,
html.is-ios #profile-sheet .sheet-scroll-content::-webkit-scrollbar,
html.is-ios .v110-search-results::-webkit-scrollbar,
html.is-ios .v112-bank-preview::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

/* Petits écrans : conserver la densité sans tasser les textes. */
@media (max-width: 390px) {
  .settings-row,
  .profile-settings-list .settings-row { padding-left: 14px !important; padding-right: 14px !important; }
  .income-block,
  .month-balance { padding: 14px !important; }
  .v110-home-main { padding: 15px !important; }
}

/* ===== SOURCE: themes.css ===== */
/* v115 — thèmes, personnalisation et nouveaux panneaux. */
:root {
  --accent-user: #087F68;
  --accent-user-rgb: 8,127,104;
}
html[data-accent="green"] { --accent-user:#087F68; --accent-user-rgb:8,127,104; }
html[data-accent="blue"] { --accent-user:#3478F6; --accent-user-rgb:52,120,246; }
html[data-accent="purple"] { --accent-user:#8E5AF7; --accent-user-rgb:142,90,247; }
html[data-accent="rose"] { --accent-user:#D94C78; --accent-user-rgb:217,76,120; }
html[data-accent="orange"] { --accent-user:#E87924; --accent-user-rgb:232,121,36; }

html[data-accent] {
  --ca-accent: var(--accent-user) !important;
}

/* Préférences */
.preference-settings-list .preference-row { gap: 14px; }
.preference-row > span:first-child { min-width:0; display:grid; gap:2px; }
.preference-row strong { font-size:14px; font-weight:700; color:var(--ink, var(--text)); }
.preference-row small { font-size:11px; line-height:1.25; color:var(--ui-muted, var(--muted)); }
.preference-row select {
  flex:0 0 auto; max-width:145px; min-height:34px; padding:0 28px 0 10px;
  border:1px solid var(--ui-border, var(--line)); border-radius:10px;
  background:var(--ui-surface-solid, var(--paper)); color:var(--ink, var(--text)); font:inherit; font-size:13px;
}

/* Cloche et centre interne */
.notification-open { position:relative; }
.notification-open svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.notification-badge { position:absolute; top:-3px; right:-4px; min-width:16px; height:16px; padding:0 4px; border-radius:999px; display:grid; place-items:center; background:#E44C43; color:#fff; font-size:9px; font-weight:800; border:2px solid var(--paper); }
.notification-panel { max-height:min(72dvh,620px); padding:18px !important; }
.notification-head { display:grid; grid-template-columns:auto 1fr auto; align-items:start; gap:12px; margin-bottom:14px; }
.notification-head > div { text-align:center; }
.notification-list { display:grid; gap:7px; overflow:auto; max-height:calc(72dvh - 100px); }
.notification-row { width:100%; display:grid; grid-template-columns:8px minmax(0,1fr); gap:10px; align-items:start; text-align:left; padding:12px; border:1px solid var(--ui-border, var(--line)); border-radius:13px; background:var(--ui-surface-solid, var(--paper)); color:inherit; }
.notification-row.unread { background:rgba(var(--accent-user-rgb),.065); border-color:rgba(var(--accent-user-rgb),.16); }
.notification-dot { width:7px; height:7px; margin-top:6px; border-radius:50%; background:transparent; }
.notification-row.unread .notification-dot { background:var(--accent-user); }
.notification-copy { min-width:0; display:grid; gap:2px; }
.notification-copy strong { font-size:14px; }
.notification-copy span { font-size:12px; line-height:1.35; color:var(--ui-muted,var(--muted)); }
.notification-copy small { margin-top:2px; font-size:10.5px; color:var(--light); }
.notification-empty { padding:28px 12px; text-align:center; color:var(--ui-muted,var(--muted)); font-size:13px; }

/* Conflits */
.conflict-panel { max-width:520px; padding:20px !important; }
.conflict-name { margin:16px 0 8px; font-size:17px; font-weight:760; }
.conflict-choice { width:100%; min-height:64px; display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:7px; padding:11px 13px; border:1px solid var(--ui-border,var(--line)); border-radius:13px; background:var(--ui-surface-solid,var(--paper)); color:inherit; text-align:left; }
.conflict-choice > span:first-child { display:grid; gap:3px; min-width:0; }
.conflict-choice strong { font-size:14px; }
.conflict-choice small { font-size:11px; color:var(--ui-muted,var(--muted)); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Onboarding */
.onboarding { position:fixed; inset:0; z-index:120; display:grid; place-items:center; padding:max(24px,var(--safe-top)) 20px max(24px,var(--safe-bottom)); background:rgba(245,247,248,.88); -webkit-backdrop-filter:blur(24px) saturate(150%); backdrop-filter:blur(24px) saturate(150%); }
.onboarding[hidden] { display:none !important; }
.onboarding-card { width:min(100%,430px); padding:26px; border-radius:26px; border:1px solid rgba(35,48,62,.08); background:rgba(255,255,255,.96); box-shadow:0 24px 70px rgba(35,48,62,.14); text-align:center; }
.onboarding-mark { width:58px; height:58px; display:grid; place-items:center; margin:0 auto 18px; border-radius:18px; background:var(--accent-user); color:white; font-size:26px; font-weight:800; }
.onboarding h2 { font-size:28px; letter-spacing:-.7px; }
.onboarding p { margin:8px auto 22px; color:#6E7781; line-height:1.45; font-size:14px; max-width:320px; }
.onboarding-primary,.onboarding-secondary { width:100%; min-height:48px; border-radius:13px; font:inherit; font-weight:720; }
.onboarding-primary { border:0; background:var(--accent-user); color:white; }
.onboarding-secondary { margin-top:8px; border:1px solid rgba(35,48,62,.10); background:#F4F6F7; color:#1C2630; }
.onboarding-back { display:block; margin:0 0 14px; border:0; background:none; color:var(--accent-user); font:inherit; font-weight:700; }
.onboarding form { display:grid; gap:10px; }
.onboarding input { width:100%; min-height:50px; padding:0 14px; text-align:center; letter-spacing:.18em; font-size:20px; font-weight:760; border:1px solid rgba(35,48,62,.12); border-radius:13px; outline:none; }
.onboarding-message { min-height:18px; margin-top:10px; font-size:12px; color:#5F6872; }
.onboarding-message.error { color:#B0443B; }

/* Vrai dark mode, pas une simple inversion. */
html[data-theme="dark"] {
  --bg:#111315;
  --paper:#15181B;
  --text:#F3F4F5;
  --ink:#F3F4F5;
  --muted:#A6ADB4;
  --light:#7F8790;
  --line:#2A2F34;
  --soft:#1C2024;
  --ui-surface:#1A1E22;
  --ui-surface-solid:#1A1E22;
  --ui-border:rgba(255,255,255,.075);
  --ui-border-strong:rgba(255,255,255,.13);
  --ui-muted:#A6ADB4;
  --control-glass-strong:rgba(24,28,32,.98);
  color-scheme:dark;
}
html[data-theme="dark"], html[data-theme="dark"] body, html[data-theme="dark"] .page { background:#15181B !important; color:#F3F4F5 !important; }
html[data-theme="dark"] body { background:linear-gradient(180deg,#121416,#171A1D) !important; }
html[data-theme="dark"] .hero,
html[data-theme="dark"] .income-block,
html[data-theme="dark"] .month-balance,
html[data-theme="dark"] .variable-category,
html[data-theme="dark"] .v110-home-main,
html[data-theme="dark"] .v110-home-tile,
html[data-theme="dark"] .v110-feature-row,
html[data-theme="dark"] .v110-annual-card,
html[data-theme="dark"] .v110-annual-ranking,
html[data-theme="dark"] .v110-search-row,
html[data-theme="dark"] .v112-bank-row,
html[data-theme="dark"] .profile-account-card,
html[data-theme="dark"] .profile-settings-list,
html[data-theme="dark"] .household-summary,
html[data-theme="dark"] .household-member-row,
html[data-theme="dark"] .household-activity-row,
html[data-theme="dark"] .cloud-backup-row,
html[data-theme="dark"] .sheet,
html[data-theme="dark"] .notification-row,
html[data-theme="dark"] .conflict-choice { background:#1A1E22 !important; border-color:rgba(255,255,255,.075) !important; color:#F3F4F5 !important; box-shadow:none !important; }
html[data-theme="dark"] .sheet-drag-zone { background:#1A1E22 !important; }
html[data-theme="dark"] .ca-bottom-nav { background:rgba(24,28,32,.94) !important; border-top-color:rgba(255,255,255,.08) !important; }
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea { background:#20252A !important; color:#F5F6F7 !important; border-color:rgba(255,255,255,.12) !important; }
html[data-theme="dark"] .category-metrics,html[data-theme="dark"] .summary-tile { background:#1D2226 !important; }
html[data-theme="dark"] .auth-gate { background:#121416 !important; }
html[data-theme="dark"] .auth-card { background:#1A1E22 !important; border-color:rgba(255,255,255,.08) !important; }
html[data-theme="dark"] .onboarding { background:rgba(12,14,16,.84); }
html[data-theme="dark"] .onboarding-card { background:#1A1E22; border-color:rgba(255,255,255,.08); color:#F3F4F5; }
html[data-theme="dark"] .onboarding p, html[data-theme="dark"] .notification-copy span { color:#A6ADB4; }
html[data-theme="dark"] .onboarding-secondary { background:#22272C; color:#F3F4F5; border-color:rgba(255,255,255,.08); }
html[data-theme="dark"] .notification-badge { border-color:#1A1E22; }

@media (max-width:700px) {
  .notification-panel,.conflict-panel { width:100% !important; border-radius:24px 24px 0 0 !important; }
  .preference-row select { max-width:126px; }
}

/* Les composants qui étaient historiquement verts suivent maintenant l'accent utilisateur. */
html[data-accent] .sheet-button.primary,
html[data-accent] .copy-confirm-button.primary,
html[data-accent] .auth-submit,
html[data-accent] .v112-primary-row-button,
html[data-accent] .v110-icon-button.primary,
html[data-accent] .v110-fab,
html[data-accent] .onboarding-primary,
html[data-accent] .profile-inline-actions button:last-child:not(.danger-action),
html[data-accent] .household-join-actions button:last-child {
  background: var(--accent-user) !important;
}
html[data-accent] input:focus,
html[data-accent] select:focus,
html[data-accent] textarea:focus {
  border-color: rgba(var(--accent-user-rgb), .42) !important;
  box-shadow: 0 0 0 3px rgba(var(--accent-user-rgb), .09) !important;
}
html[data-accent] .profile-avatar,
html[data-accent] .household-member-avatar { color: var(--accent-user) !important; }

.notification-sheet { z-index: 72 !important; }
.conflict-sheet { z-index: 96 !important; }


/* ========================================================================== */
/* v116 — ajustements UI demandés, sans toucher au moteur métier              */
/* ========================================================================== */

/* Aucun badge quand il n'y a aucune notification. */
.notification-badge[hidden],
.notification-badge:empty {
  display: none !important;
}

/* Les montants réellement négatifs prennent seulement une teinte rouge douce. */
.is-negative {
  color: #B84E49 !important;
}
html[data-theme="dark"] .is-negative {
  color: #E87973 !important;
}

/* Sélection de période/mois : supprimer l'effet de cellule blanche. */
#month-header.period-hero {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.period-control {
  min-height: 62px !important;
  padding: 9px 2px 10px !important;
  background: transparent !important;
}
.period-control-chevron {
  background: transparent !important;
  box-shadow: none !important;
}
.period-control:active .period-control-chevron {
  background: rgba(var(--accent-user-rgb), .07) !important;
}
.period-control .period-fallback.visible {
  inset: 4px 0 !important;
  background: transparent !important;
}
.period-control .period-fallback.visible .native-period-picker {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.months {
  gap: 4px !important;
  background: transparent !important;
}
.month-button {
  min-width: 46px !important;
  min-height: 36px !important;
  padding: 0 8px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}
.month-button.active {
  background: rgba(var(--accent-user-rgb), .10) !important;
  color: var(--accent-user) !important;
  box-shadow: none !important;
}

/* iOS : Bonjour + prénom + version restent sur une seule ligne. */
html.is-ios .v110-header-row {
  gap: 8px !important;
}
html.is-ios .v110-header-row h1 {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: clamp(23px, 6.8vw, 29px) !important;
  line-height: 1 !important;
  letter-spacing: -.75px !important;
}
html.is-ios .v110-header-row .app-version {
  margin-left: 4px !important;
  font-size: 8px !important;
}
html.is-ios .v110-header-actions {
  flex: 0 0 auto !important;
  gap: 6px !important;
}

/* Switch : piste et curseur restent des pilules, mais l'espace vertical est réduit. */
.ios-switch {
  flex-basis: 50px !important;
  width: 50px !important;
  height: 28px !important;
}
.ios-switch-track::after {
  top: 3px !important;
  left: 4px !important;
  width: 24px !important;
  height: 22px !important;
  border-radius: 999px !important;
}
.ios-switch input:checked + .ios-switch-track::after {
  transform: translateX(18px) !important;
}

/* Personnalisation : les valeurs restent simples, sans cellule/bordure propre. */
.preference-row select {
  min-height: 30px !important;
  max-width: 145px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent-user) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  text-align: right !important;
  text-align-last: right !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.preference-row select:focus,
.preference-row select:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

@media (max-width: 390px) {
  html.is-ios .v110-header-row h1 {
    font-size: 22px !important;
  }
  html.is-ios .v110-icon-button {
    width: 35px !important;
    height: 35px !important;
  }
}


/* ========================================================================== */
/* v117 — listes plus légères + thèmes visuels                                */
/* ========================================================================== */

/* Les sections demandées reprennent le langage très léger de Personnalisation :
   contenu directement dans la feuille, séparateurs fins, aucune grosse cellule. */
#profile-sheet .household-summary,
#profile-sheet .household-members-list,
#profile-sheet .household-settings-list,
#profile-sheet .cloud-backup-list,
#month-settings-sheet #v112-rule-list,
#month-settings-sheet #v112-history-list {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

#profile-sheet .household-summary {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 10px 2px 11px !important;
  border-bottom: 1px solid var(--ui-border, var(--line)) !important;
}

#profile-sheet .household-members-list {
  margin: 0 0 4px !important;
  overflow: visible !important;
}

#profile-sheet .household-member-row,
#profile-sheet .cloud-backup-row,
#month-settings-sheet #v112-rule-list .v110-feature-row,
#month-settings-sheet #v112-history-list .v110-feature-row {
  min-height: var(--ui-row-height, 54px) !important;
  margin: 0 !important;
  padding: 10px 2px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, var(--line)) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#profile-sheet .household-member-row:last-child,
#profile-sheet .cloud-backup-row:last-child,
#month-settings-sheet #v112-rule-list .v110-feature-row:last-child,
#month-settings-sheet #v112-history-list .v110-feature-row:last-child {
  border-bottom: 0 !important;
}

#profile-sheet .household-settings-list {
  margin: 3px 0 14px !important;
  overflow: visible !important;
}

#profile-sheet .household-settings-list .settings-row {
  min-height: var(--ui-row-height, 54px) !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, var(--line)) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#profile-sheet .household-settings-list .settings-row:last-child:not([hidden]),
#profile-sheet .household-settings-list:has(#household-leave[hidden]) #household-open-join {
  border-bottom: 0 !important;
}

/* Les actions de ces listes deviennent de simples actions texte. */
#profile-sheet .household-summary .profile-mini-button,
#profile-sheet .household-member-actions button,
#profile-sheet .cloud-backup-actions button,
#month-settings-sheet #v112-rule-list .v110-feature-action,
#month-settings-sheet #v112-history-list .v110-feature-action {
  min-height: 28px !important;
  padding: 2px 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent-user) !important;
}
#profile-sheet .household-member-actions .danger-action,
#profile-sheet .cloud-backup-actions .danger-action,
#month-settings-sheet #v112-rule-list .v110-feature-action.danger {
  color: #B0443B !important;
}

/* Import bancaire : choix du payeur et choix de fichier sans capsule/cellule. */
#month-settings-sheet .v112-bank-toolbar {
  gap: 12px !important;
  padding: 2px 0 !important;
}
#month-settings-sheet .v112-file-button,
#month-settings-sheet #v112-bank-payer {
  min-height: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent-user) !important;
  font-weight: 680 !important;
}
#month-settings-sheet #v112-bank-payer {
  text-align: right !important;
  text-align-last: right !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
#month-settings-sheet #v112-bank-payer:focus,
#month-settings-sheet #v112-bank-payer:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* -------------------------------------------------------------------------- */
/* Thème Windows 98                                                           */
/* -------------------------------------------------------------------------- */
html[data-ui-theme="win98"] {
  --accent-user: #000080 !important;
  --accent-user-rgb: 0,0,128 !important;
  --ca-accent: #000080 !important;
  --bg: #008080 !important;
  --paper: #C0C0C0 !important;
  --text: #000000 !important;
  --ink: #000000 !important;
  --muted: #404040 !important;
  --light: #666666 !important;
  --line: #808080 !important;
  --soft: #C0C0C0 !important;
  --ui-surface: #C0C0C0 !important;
  --ui-surface-solid: #C0C0C0 !important;
  --ui-border: #808080 !important;
  --ui-border-strong: #404040 !important;
  --ui-muted: #404040 !important;
  --control-glass-strong: #C0C0C0 !important;
  color-scheme: light !important;
  font-family: "MS Sans Serif", Tahoma, Arial, sans-serif !important;
}

html[data-ui-theme="win98"],
html[data-ui-theme="win98"] body {
  background: #008080 !important;
  color: #000 !important;
}
html[data-ui-theme="win98"] body,
html[data-ui-theme="win98"] button,
html[data-ui-theme="win98"] input,
html[data-ui-theme="win98"] select,
html[data-ui-theme="win98"] textarea {
  font-family: "MS Sans Serif", Tahoma, Arial, sans-serif !important;
}
html[data-ui-theme="win98"] .page {
  background: #C0C0C0 !important;
  color: #000 !important;
}

/* Surfaces classiques avec bord 3D Windows. */
html[data-ui-theme="win98"] .hero,
html[data-ui-theme="win98"] .income-block,
html[data-ui-theme="win98"] .month-balance,
html[data-ui-theme="win98"] .variable-category,
html[data-ui-theme="win98"] .profile-account-card,
html[data-ui-theme="win98"] .v110-home-main,
html[data-ui-theme="win98"] .v110-home-tile,
html[data-ui-theme="win98"] .v110-annual-card,
html[data-ui-theme="win98"] .v110-annual-ranking,
html[data-ui-theme="win98"] .notification-row,
html[data-ui-theme="win98"] .conflict-choice,
html[data-ui-theme="win98"] .auth-card,
html[data-ui-theme="win98"] .onboarding-card {
  border-top: 2px solid #FFFFFF !important;
  border-left: 2px solid #FFFFFF !important;
  border-right: 2px solid #404040 !important;
  border-bottom: 2px solid #404040 !important;
  border-radius: 0 !important;
  background: #C0C0C0 !important;
  box-shadow: inset -1px -1px #808080, inset 1px 1px #DFDFDF !important;
  color: #000 !important;
}

html[data-ui-theme="win98"] .sheet,
html[data-ui-theme="win98"] .sheet-drag-zone {
  border-radius: 0 !important;
  background: #C0C0C0 !important;
  color: #000 !important;
}
html[data-ui-theme="win98"] .sheet {
  border-top: 2px solid #FFF !important;
  border-left: 2px solid #FFF !important;
  border-right: 2px solid #404040 !important;
  border-bottom: 2px solid #404040 !important;
  box-shadow: inset -1px -1px #808080, inset 1px 1px #DFDFDF !important;
}
html[data-ui-theme="win98"] .sheet-handle { background:#808080 !important; border-radius:0 !important; }

html[data-ui-theme="win98"] .profile-section-label,
html[data-ui-theme="win98"] .settings-sheet-title,
html[data-ui-theme="win98"] .v110-section-head .profile-section-label {
  color: #000080 !important;
  text-shadow: 1px 1px #FFF !important;
}

html[data-ui-theme="win98"] .ca-bottom-nav {
  background: #C0C0C0 !important;
  border-top: 2px solid #FFFFFF !important;
  border-radius: 0 !important;
  box-shadow: inset 0 1px #DFDFDF !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html[data-ui-theme="win98"] .ca-bottom-link,
html[data-ui-theme="win98"] .ca-bottom-button { color:#000 !important; }
html[data-ui-theme="win98"] body[data-active-nav="income"] .ca-bottom-link[data-ca-target="income"],
html[data-ui-theme="win98"] body[data-active-nav="fixed"] .ca-bottom-link[data-ca-target="fixed"],
html[data-ui-theme="win98"] body[data-active-nav="variable"] .ca-bottom-link[data-ca-target="variable"],
html[data-ui-theme="win98"] body[data-active-nav="menu"] .ca-bottom-link[data-ca-target="menu"],
html[data-ui-theme="win98"] body[data-active-nav="profile"] .ca-bottom-link[data-ca-target="profile"] {
  background:#000080 !important;
  color:#FFF !important;
}

html[data-ui-theme="win98"] button:not(.ca-bottom-link):not(.profile-avatar):not(.notification-open),
html[data-ui-theme="win98"] .data-button,
html[data-ui-theme="win98"] .sheet-button,
html[data-ui-theme="win98"] .copy-confirm-button,
html[data-ui-theme="win98"] .v112-file-button {
  border-top: 2px solid #FFF !important;
  border-left: 2px solid #FFF !important;
  border-right: 2px solid #404040 !important;
  border-bottom: 2px solid #404040 !important;
  border-radius: 0 !important;
  background:#C0C0C0 !important;
  color:#000 !important;
  box-shadow: inset -1px -1px #808080, inset 1px 1px #DFDFDF !important;
}
html[data-ui-theme="win98"] button:not(.ca-bottom-link):active,
html[data-ui-theme="win98"] .data-button:active,
html[data-ui-theme="win98"] .sheet-button:active {
  border-top-color:#404040 !important;
  border-left-color:#404040 !important;
  border-right-color:#FFF !important;
  border-bottom-color:#FFF !important;
  box-shadow: inset 1px 1px #808080 !important;
}

html[data-ui-theme="win98"] input,
html[data-ui-theme="win98"] select,
html[data-ui-theme="win98"] textarea {
  border-top: 2px solid #404040 !important;
  border-left: 2px solid #404040 !important;
  border-right: 2px solid #FFF !important;
  border-bottom: 2px solid #FFF !important;
  border-radius: 0 !important;
  background:#FFF !important;
  color:#000 !important;
  box-shadow: inset 1px 1px #808080 !important;
}

/* Les sélecteurs volontairement plats restent plats, même dans le thème 98. */
html[data-ui-theme="win98"] .preference-row select,
html[data-ui-theme="win98"] #v112-bank-payer {
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  color:#000080 !important;
}

html[data-ui-theme="win98"] .month-button {
  border-radius:0 !important;
  color:#000 !important;
}
html[data-ui-theme="win98"] .month-button.active {
  background:#000080 !important;
  color:#FFF !important;
}
html[data-ui-theme="win98"] .category-progress,
html[data-ui-theme="win98"] .v110-progress-track {
  border:1px solid #808080 !important;
  border-radius:0 !important;
  background:#FFF !important;
}
html[data-ui-theme="win98"] .category-progress-bar,
html[data-ui-theme="win98"] .v110-progress-bar { background:#000080 !important; border-radius:0 !important; }

html[data-ui-theme="win98"] .ios-switch-track {
  background:#808080 !important;
  border:1px solid #404040 !important;
  border-radius:0 !important;
}
html[data-ui-theme="win98"] .ios-switch-track::after {
  background:#C0C0C0 !important;
  border-top:2px solid #FFF !important;
  border-left:2px solid #FFF !important;
  border-right:2px solid #404040 !important;
  border-bottom:2px solid #404040 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}
html[data-ui-theme="win98"] .ios-switch input:checked + .ios-switch-track { background:#000080 !important; }

html[data-ui-theme="win98"] .notification-badge {
  border-radius:0 !important;
  border:1px solid #FFF !important;
  background:#800000 !important;
}

/* Les listes allégées demandées restent sans grosses cartes sous tous les thèmes. */
html[data-ui-theme="win98"] #profile-sheet .household-summary,
html[data-ui-theme="win98"] #profile-sheet .household-members-list,
html[data-ui-theme="win98"] #profile-sheet .household-settings-list,
html[data-ui-theme="win98"] #profile-sheet .cloud-backup-list,
html[data-ui-theme="win98"] #month-settings-sheet #v112-rule-list,
html[data-ui-theme="win98"] #month-settings-sheet #v112-history-list,
html[data-ui-theme="win98"] #profile-sheet .household-member-row,
html[data-ui-theme="win98"] #profile-sheet .cloud-backup-row,
html[data-ui-theme="win98"] #month-settings-sheet #v112-rule-list .v110-feature-row,
html[data-ui-theme="win98"] #month-settings-sheet #v112-history-list .v110-feature-row {
  background:transparent !important;
  border-radius:0 !important;
  box-shadow:none !important;
}

/* ========================================================================== */
/* v118 — Options : hiérarchie plus légère et mieux espacée                  */
/* ========================================================================== */

/* Un séparateur discret entre chaque grande fonction, avec retrait latéral. */
#month-settings-sheet #settings-main-panel > .v110-settings-section {
  position: relative !important;
  margin-top: 0 !important;
  padding-top: 28px !important;
}

#month-settings-sheet #settings-main-panel > .v110-settings-section::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--ui-border, var(--line));
  opacity: .82;
  pointer-events: none;
}

/* Les actions de tête s'alignent sur le bas du bloc texte : plus naturel
   pour Actualiser, Clôturer, Ajouter et le sélecteur du Dashboard. */
#month-settings-sheet .v110-section-head {
  align-items: flex-end !important;
  gap: 16px !important;
}

#month-settings-sheet .v110-section-head > div:first-child {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

#month-settings-sheet #v110-close-toggle,
#month-settings-sheet #v110-recurring-add,
#month-settings-sheet #v110-goal-add,
#month-settings-sheet #v112-rule-add {
  align-self: flex-end !important;
  margin-bottom: 1px !important;
  flex: 0 0 auto !important;
}


/* Dashboard : sélecteur plus bas et sans effet de cellule. */
#month-settings-sheet #v110-year-select {
  align-self: flex-end !important;
  width: auto !important;
  min-width: 62px !important;
  min-height: 28px !important;
  margin: 0 0 -1px !important;
  padding: 0 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent-user, var(--ca-accent)) !important;
  font-weight: 720 !important;
  text-align: right !important;
  text-align-last: right !important;
}

#month-settings-sheet #v110-year-select:focus,
#month-settings-sheet #v110-year-select:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Dépenses récurrentes, objectifs et règles : listes plates sans cartes,
   avec davantage de respiration et des actions texte bien alignées. */
#month-settings-sheet #v110-recurring-list,
#month-settings-sheet #v110-goal-list,
#month-settings-sheet #v112-rule-list {
  margin-top: 10px !important;
  gap: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

#month-settings-sheet #v110-recurring-list .v110-feature-row,
#month-settings-sheet #v110-goal-list .v110-feature-row,
#month-settings-sheet #v112-rule-list .v110-feature-row {
  min-height: 62px !important;
  margin: 0 !important;
  padding: 12px 2px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, var(--line)) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  gap: 12px !important;
}

#month-settings-sheet #v110-recurring-list .v110-feature-row:last-child,
#month-settings-sheet #v110-goal-list .v110-feature-row:last-child,
#month-settings-sheet #v112-rule-list .v110-feature-row:last-child {
  border-bottom: 0 !important;
}

#month-settings-sheet #v110-recurring-list .v110-feature-row-main,
#month-settings-sheet #v110-goal-list .v110-feature-row-main,
#month-settings-sheet #v112-rule-list .v110-feature-row-main {
  min-width: 0 !important;
  padding-right: 4px !important;
}

#month-settings-sheet #v110-recurring-list .v110-feature-row-title,
#month-settings-sheet #v110-goal-list .v110-feature-row-title,
#month-settings-sheet #v112-rule-list .v110-feature-row-title {
  font-size: 13.5px !important;
  line-height: 1.28 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

#month-settings-sheet #v110-recurring-list .v110-feature-row-sub,
#month-settings-sheet #v110-goal-list .v110-feature-row-sub,
#month-settings-sheet #v112-rule-list .v110-feature-row-sub {
  margin-top: 4px !important;
  font-size: 10.75px !important;
  line-height: 1.3 !important;
}

#month-settings-sheet #v110-recurring-list .v110-feature-row-actions,
#month-settings-sheet #v110-goal-list .v110-feature-row-actions,
#month-settings-sheet #v112-rule-list .v110-feature-row-actions {
  align-self: center !important;
  flex: 0 0 auto !important;
  gap: 8px !important;
}

#month-settings-sheet #v110-recurring-list .v110-feature-action,
#month-settings-sheet #v110-goal-list .v110-feature-action,
#month-settings-sheet #v112-rule-list .v110-feature-action {
  min-height: 28px !important;
  padding: 2px 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent-user, var(--ca-accent)) !important;
}

#month-settings-sheet #v110-recurring-list .v110-feature-action.danger,
#month-settings-sheet #v110-goal-list .v110-feature-action.danger,
#month-settings-sheet #v112-rule-list .v110-feature-action.danger {
  color: #B0443B !important;
}

/* Objectifs : progression plus fine et intégrée à la ligne. */
#month-settings-sheet #v110-goal-list .v110-feature-progress {
  height: 4px !important;
  margin-top: 9px !important;
  background: rgba(28,42,57,.075) !important;
}

/* Clôture : donne un peu plus de hauteur au bloc sans recréer de cellule. */
#month-settings-sheet #v110-close-note {
  margin-top: 4px !important;
}

#month-settings-sheet #v110-close-toggle {
  min-height: 30px !important;
}

/* Les formulaires restent compacts mais se détachent clairement de la liste. */
#month-settings-sheet #v110-recurring-form,
#month-settings-sheet #v110-goal-form,
#month-settings-sheet #v112-rule-form {
  margin-top: 12px !important;
  padding-top: 12px !important;
  border-top: 1px solid var(--ui-border, var(--line)) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Windows 98 : garder les séparateurs nets sans réintroduire les grosses cartes. */
html[data-ui-theme="win98"] #month-settings-sheet #settings-main-panel > .v110-settings-section::before,
html[data-ui-theme="win98"] #month-settings-sheet #v110-recurring-list .v110-feature-row,
html[data-ui-theme="win98"] #month-settings-sheet #v110-goal-list .v110-feature-row,
html[data-ui-theme="win98"] #month-settings-sheet #v112-rule-list .v110-feature-row {
  border-color: #808080 !important;
}

@media (max-width: 390px) {
  #month-settings-sheet .v110-section-head {
    gap: 11px !important;
  }
  #month-settings-sheet #v110-recurring-list .v110-feature-row,
  #month-settings-sheet #v110-goal-list .v110-feature-row,
  #month-settings-sheet #v112-rule-list .v110-feature-row {
    padding-top: 11px !important;
    padding-bottom: 11px !important;
  }
  #month-settings-sheet #v110-recurring-list .v110-feature-row-actions,
  #month-settings-sheet #v110-goal-list .v110-feature-row-actions,
  #month-settings-sheet #v112-rule-list .v110-feature-row-actions {
    gap: 5px !important;
  }
}

/* ========================================================================== */
/* v119 — Foyer partagé / Sauvegardes cloud sur surfaces blanches arrondies  */
/* ========================================================================== */

/* Foyer partagé : un seul bloc visuel blanc, sans réintroduire les anciennes
   grosses cellules. Les trois sous-blocs se touchent pour former une carte. */
#profile-sheet .household-summary {
  margin: 0 !important;
  padding: 12px 14px 11px !important;
  background: #FFFFFF !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, var(--line)) !important;
  border-radius: 16px 16px 0 0 !important;
  box-shadow: none !important;
}

#profile-sheet .household-members-list {
  margin: 0 !important;
  padding: 0 14px !important;
  background: #FFFFFF !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

#profile-sheet .household-member-row {
  padding-left: 0 !important;
  padding-right: 0 !important;
  background: transparent !important;
}

#profile-sheet .household-settings-list {
  margin: 0 0 16px !important;
  padding: 0 14px !important;
  background: #FFFFFF !important;
  border: 0 !important;
  border-radius: 0 0 16px 16px !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

#profile-sheet .household-settings-list .settings-row {
  padding-left: 0 !important;
  padding-right: 0 !important;
  background: transparent !important;
}

/* Sauvegardes cloud : même langage, mais dans une carte indépendante. */
#profile-sheet .cloud-backup-list {
  margin: 0 0 6px !important;
  padding: 0 14px !important;
  background: #FFFFFF !important;
  border: 0 !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

#profile-sheet .cloud-backup-row {
  padding-left: 0 !important;
  padding-right: 0 !important;
  background: transparent !important;
}

#profile-sheet .cloud-backup-list > .profile-empty {
  padding: 16px 2px !important;
}

/* En sombre, on conserve exactement les mêmes volumes mais avec la surface
   sombre native au lieu d'un blanc forcé. */
html[data-theme="dark"] #profile-sheet .household-summary,
html[data-theme="dark"] #profile-sheet .household-members-list,
html[data-theme="dark"] #profile-sheet .household-settings-list,
html[data-theme="dark"] #profile-sheet .cloud-backup-list {
  background: var(--ui-surface-solid, #1A1E22) !important;
}

/* Windows 98 garde volontairement son matériau gris et ses angles carrés. */
html[data-ui-theme="win98"] #profile-sheet .household-summary,
html[data-ui-theme="win98"] #profile-sheet .household-members-list,
html[data-ui-theme="win98"] #profile-sheet .household-settings-list,
html[data-ui-theme="win98"] #profile-sheet .cloud-backup-list {
  background: #C0C0C0 !important;
  border-radius: 0 !important;
}

/* ========================================================================== */
/* v120 — contour complet des cartes Foyer partagé / Sauvegardes cloud       */
/* ========================================================================== */

/* Le foyer est composé de trois blocs DOM : on dessine un seul contour
   continu autour de l'ensemble, sans doubler les séparateurs internes. */
#profile-sheet .household-summary {
  border-top: 1px solid var(--ui-border, var(--line)) !important;
  border-left: 1px solid var(--ui-border, var(--line)) !important;
  border-right: 1px solid var(--ui-border, var(--line)) !important;
  border-bottom: 1px solid var(--ui-border, var(--line)) !important;
}

#profile-sheet .household-members-list {
  border-left: 1px solid var(--ui-border, var(--line)) !important;
  border-right: 1px solid var(--ui-border, var(--line)) !important;
}

#profile-sheet .household-settings-list {
  border-left: 1px solid var(--ui-border, var(--line)) !important;
  border-right: 1px solid var(--ui-border, var(--line)) !important;
  border-bottom: 1px solid var(--ui-border, var(--line)) !important;
}

/* Sauvegardes cloud : vraie carte blanche avec trait fin sur les quatre côtés. */
#profile-sheet .cloud-backup-list {
  border: 1px solid var(--ui-border, var(--line)) !important;
}

/* Dark mode : le contour reste discret mais visible. */
html[data-theme="dark"] #profile-sheet .household-summary,
html[data-theme="dark"] #profile-sheet .household-members-list,
html[data-theme="dark"] #profile-sheet .household-settings-list,
html[data-theme="dark"] #profile-sheet .cloud-backup-list {
  border-color: rgba(255,255,255,.10) !important;
}

/* Windows 98 : trait plus franc, cohérent avec le thème rétro. */
html[data-ui-theme="win98"] #profile-sheet .household-summary,
html[data-ui-theme="win98"] #profile-sheet .household-members-list,
html[data-ui-theme="win98"] #profile-sheet .household-settings-list,
html[data-ui-theme="win98"] #profile-sheet .cloud-backup-list {
  border-color: #808080 !important;
}

/* ===== SOURCE: v129-features.css ===== */
/* v121-v129 — finition, Transactions, rapports, diagnostic, sécurité et thèmes. */

/* --- Navigation : Accueil | Transactions | Options | Profil ---------------- */
.ca-bottom-nav { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
html.is-ios .ca-bottom-nav { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
html.is-ios .ca-bottom-nav > :nth-child(1){grid-column:1!important}
html.is-ios .ca-bottom-nav > :nth-child(2){grid-column:2!important}
html.is-ios .ca-bottom-nav > :nth-child(3){grid-column:3!important}
html.is-ios .ca-bottom-nav > :nth-child(4){grid-column:4!important}
body[data-active-nav="transactions"] .ca-bottom-link[data-ca-target="transactions"] { color:var(--ca-accent)!important;font-weight:750!important; }
body[data-active-nav="transactions"] .ca-bottom-link[data-ca-target="transactions"] .ca-bottom-icon { transform:translateY(-1px);stroke-width:2.25!important; }
html[data-ui-theme="win98"] body[data-active-nav="transactions"] .ca-bottom-link[data-ca-target="transactions"] { color:#000080!important; }

/* --- Transactions ---------------------------------------------------------- */
.transactions-hub { display:grid;gap:14px;margin:8px 0 14px; }
.transactions-hub[hidden]{display:none!important}
.transactions-hero { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px; }
.transactions-hero > div { min-width:0;padding:13px 12px;border:1px solid var(--ui-border,var(--line));border-radius:14px;background:var(--ui-surface,var(--paper)); }
.transactions-hero span { display:block;color:var(--ui-muted,var(--muted));font-size:10.5px;line-height:1.2;margin-bottom:5px; }
.transactions-hero strong { display:block;min-width:0;font-size:16px;line-height:1.1;letter-spacing:-.025em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.transactions-segmented { display:grid;grid-template-columns:repeat(3,1fr);padding:3px;border-radius:12px;background:rgba(110,120,130,.10); }
.transactions-segmented button { min-height:38px;border:0;border-radius:9px;background:transparent;color:var(--ui-muted,var(--muted));font:inherit;font-size:12px;font-weight:700; }
.transactions-segmented button.active { background:var(--ui-surface-solid,var(--paper));color:var(--ink,var(--text));box-shadow:0 1px 4px rgba(28,42,57,.08); }
.transactions-section-title,.transaction-panel-head { display:flex;align-items:flex-end;justify-content:space-between;gap:14px;padding:0 3px; }
.transactions-section-title > div,.transaction-panel-head > div { min-width:0;display:grid;gap:3px; }
.transactions-section-title strong,.transaction-panel-head .section-title { font-size:15px!important;line-height:1.2;font-weight:770!important;color:var(--ink,var(--text));text-transform:none!important;letter-spacing:-.01em!important; }
.transactions-section-title small,.transaction-panel-head .section-subtitle,.section-head .section-subtitle { color:var(--ui-muted,var(--muted));font-size:11px;line-height:1.32; }
.transactions-section-title button { border:0;background:none;color:var(--ca-accent);font:inherit;font-size:12px;font-weight:720;padding:6px 0; }
.transactions-recurring-overview,.transactions-detected { display:grid;gap:7px;padding-top:3px; }
.transactions-flat-list { border-top:1px solid var(--ui-border,var(--line)); }
.transactions-flat-row,.transactions-detected-row { display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:9px 3px;border-bottom:1px solid var(--ui-border,var(--line)); }
.transactions-flat-row > span,.transactions-detected-row > span:first-child { min-width:0;display:grid;gap:2px; }
.transactions-flat-row strong,.transactions-detected-row strong { font-size:13px;font-weight:720; }
.transactions-flat-row small,.transactions-detected-row small { font-size:10.5px;color:var(--ui-muted,var(--muted));line-height:1.3; }
.transactions-flat-row b { white-space:nowrap;font-size:13px; }
.transactions-empty { padding:15px 3px;color:var(--ui-muted,var(--muted));font-size:12px; }
.transactions-detected-actions { display:flex!important;gap:6px;flex:0 0 auto; }
.transactions-detected-actions button { min-height:34px;padding:0 9px;border:0;border-radius:9px;background:rgba(var(--accent-user-rgb),.08);color:var(--ca-accent);font:inherit;font-size:10.5px;font-weight:720; }
.transactions-detected-actions .dismiss { background:transparent;color:var(--ui-muted,var(--muted)); }
#fixed-section,#variable-section { margin-top:12px; }
#fixed-section .transaction-panel-head { margin:0 0 8px; }
#fixed-section .fixed-add-category-wide { margin-top:8px; }
body.transactions-mode .expense-tabs { margin-top:4px; }
body.transactions-mode .expense-tabs.mode-overview { display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px; }
body.transactions-mode .expense-tabs.mode-overview .expense-tab { display:grid!important;min-width:0; }

/* --- Rapports -------------------------------------------------------------- */
.v129-action-list { display:grid;border-top:1px solid var(--ui-border,var(--line)); }
.v129-action-list button { width:100%;min-height:58px;padding:10px 2px;border:0;border-bottom:1px solid var(--ui-border,var(--line));background:none;color:inherit;text-align:left;display:grid;gap:2px;font:inherit; }
.v129-action-list button span { font-size:13px;font-weight:720; }
.v129-action-list button small { color:var(--ui-muted,var(--muted));font-size:10.5px;line-height:1.3; }

/* --- Intelligence commerçants -------------------------------------------- */
.merchant-suggestion { grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:-3px;padding:8px 10px;border-radius:10px;background:rgba(var(--accent-user-rgb),.075);color:var(--ink,var(--text));font-size:11px; }
.merchant-suggestion[hidden]{display:none!important}
.merchant-suggestion button { border:0;background:none;color:var(--ca-accent);font:inherit;font-size:11px;font-weight:750;padding:3px; }

/* --- Diagnostic / sécurité ------------------------------------------------ */
.v129-diagnostic-card,.v129-security-card { padding:2px 14px!important; }
.v129-diagnostic-grid { display:grid; }
.v129-diagnostic-row { min-height:42px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--ui-border,var(--line));font-size:12px; }
.v129-diagnostic-row:last-child{border-bottom:0}
.v129-diagnostic-row span { color:var(--ui-muted,var(--muted)); }
.v129-diagnostic-row strong { text-align:right;font-size:11px;font-weight:720; }
.v129-diagnostic-card .profile-inline-actions { margin:10px 0 12px; }
.v129-security-message { min-height:14px;margin:6px 3px 0;font-size:11px;color:var(--ui-muted,var(--muted)); }
.v129-security-message[data-state="success"]{color:var(--ca-accent)}
.v129-security-message[data-state="error"]{color:#B04A43}
.v129-device-block { margin:8px 0 0;padding:0 3px; }
.v129-device-title { margin:0 0 4px;color:var(--ui-muted,var(--muted));font-size:10px;font-weight:750;text-transform:uppercase;letter-spacing:.05em; }
.v129-device-list { border-top:1px solid var(--ui-border,var(--line)); }
.v129-device-row { min-height:46px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--ui-border,var(--line)); }
.v129-device-row span { display:grid;gap:1px; }
.v129-device-row strong { font-size:12px; }
.v129-device-row small,.v129-device-empty { color:var(--ui-muted,var(--muted));font-size:10.5px; }
.v129-device-row b { color:var(--ca-accent);font-size:10px; }
.v129-device-empty { padding:11px 0; }
body.privacy-hidden::after { content:"Budget masqué";position:fixed;inset:0;z-index:999999;display:grid;place-items:center;background:var(--paper,#fff);color:var(--ui-muted,#777);font:700 14px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }

/* --- Personnalisation ++ -------------------------------------------------- */
.preference-home-order-block { margin-top:12px; }
.preference-order-list { border-top:1px solid var(--ui-border,var(--line)); }
.preference-order-row { min-height:42px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--ui-border,var(--line));font-size:12px; }
.preference-order-actions { display:flex;gap:3px; }
.preference-order-actions button { width:32px;height:32px;border:0;background:none;color:var(--ca-accent);font:inherit;font-weight:800; }
.preference-order-actions button:disabled { opacity:.25; }
html[data-density="compact"] { --ui-row-height:46px;--ui-control-height:38px; }
html[data-density="compact"] .settings-row { min-height:46px!important; }
html[data-density="compact"] .variable-category,html[data-density="compact"] .income-block,html[data-density="compact"] .v110-home-tile { padding-top:9px!important;padding-bottom:9px!important; }
html[data-radius="round"] { --ui-radius-card:20px;--ui-radius-control:14px;--ui-radius-sheet:28px; }
html[data-radius="square"] { --ui-radius-card:4px;--ui-radius-control:4px;--ui-radius-sheet:8px; }
html[data-radius="round"] .income-block,html[data-radius="round"] .variable-category,html[data-radius="round"] .v110-home-main,html[data-radius="round"] .v110-home-tile,html[data-radius="round"] .profile-settings-list { border-radius:20px!important; }
html[data-radius="square"] .income-block,html[data-radius="square"] .variable-category,html[data-radius="square"] .v110-home-main,html[data-radius="square"] .v110-home-tile,html[data-radius="square"] .profile-settings-list { border-radius:4px!important; }
html[data-amount-size="large"] .v110-home-amount,html[data-amount-size="large"] .month-balance-amount,html[data-amount-size="large"] .month-balance-state { font-size:1.18em!important; }

/* --- Thèmes prédéfinis, sans thème personnalisé --------------------------- */
html[data-ui-theme="ios-classic"] { --accent-user:#007AFF;--accent-user-rgb:0,122,255;--ca-accent:#007AFF!important;--bg:#EFEFF4;--paper:#FFF;--soft:#F2F2F7;--line:#C6C6C8; }
html[data-ui-theme="ios-classic"],html[data-ui-theme="ios-classic"] body { background:#EFEFF4!important; }
html[data-ui-theme="ios-classic"] .income-block,html[data-ui-theme="ios-classic"] .variable-category,html[data-ui-theme="ios-classic"] .v110-home-main,html[data-ui-theme="ios-classic"] .v110-home-tile,html[data-ui-theme="ios-classic"] .profile-settings-list { background:#FFF!important;border-color:rgba(60,60,67,.16)!important;box-shadow:none!important; }
html[data-ui-theme="ios-classic"] .ca-bottom-nav { background:rgba(248,248,248,.96)!important;border-top-color:#C6C6C8!important; }

html[data-ui-theme="aqua"] { --accent-user:#1676D2;--accent-user-rgb:22,118,210;--ca-accent:#1676D2!important;--bg:#EAF4FB;--paper:#F8FCFF;--soft:#E3F0F8;--line:#AFC8D8; }
html[data-ui-theme="aqua"] body { background:linear-gradient(180deg,#D8ECF8 0,#F4FAFD 44%,#DDEAF3 100%) fixed!important; }
html[data-ui-theme="aqua"] .income-block,html[data-ui-theme="aqua"] .variable-category,html[data-ui-theme="aqua"] .v110-home-main,html[data-ui-theme="aqua"] .v110-home-tile,html[data-ui-theme="aqua"] .profile-settings-list { background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(231,244,252,.9))!important;border-color:rgba(70,126,160,.23)!important;box-shadow:0 1px 0 rgba(255,255,255,.85) inset!important; }
html[data-ui-theme="aqua"] .ca-bottom-nav { background:rgba(235,246,252,.94)!important;border-top-color:rgba(70,126,160,.22)!important; }

html[data-ui-theme="mono"] { --accent-user:#2B2B2B;--accent-user-rgb:43,43,43;--ca-accent:#2B2B2B!important;filter:grayscale(1); }
html[data-ui-theme="mono"][data-theme="dark"] { --accent-user:#F2F2F2;--accent-user-rgb:242,242,242;--ca-accent:#F2F2F2!important; }

html[data-ui-theme="paper"] { --accent-user:#65513D;--accent-user-rgb:101,81,61;--ca-accent:#65513D!important;--bg:#EAE2D3;--paper:#F7F0E4;--soft:#EFE5D5;--line:#D2C2AC;--text:#352F29;--ink:#352F29;--muted:#796E62; }
html[data-ui-theme="paper"],html[data-ui-theme="paper"] body,html[data-ui-theme="paper"] .page { background:#EAE2D3!important;color:#352F29!important; }
html[data-ui-theme="paper"] .income-block,html[data-ui-theme="paper"] .variable-category,html[data-ui-theme="paper"] .v110-home-main,html[data-ui-theme="paper"] .v110-home-tile,html[data-ui-theme="paper"] .profile-settings-list,html[data-ui-theme="paper"] .sheet { background:#F7F0E4!important;border-color:#D2C2AC!important;color:#352F29!important; }
html[data-ui-theme="paper"] .ca-bottom-nav { background:rgba(247,240,228,.95)!important;border-top-color:#D2C2AC!important; }

html[data-ui-theme="oled"] { --accent-user:#55D9B5;--accent-user-rgb:85,217,181;--ca-accent:#55D9B5!important;--bg:#000;--paper:#000;--soft:#080808;--line:#1A1A1A;--text:#F5F5F5;--ink:#F5F5F5;--muted:#9A9A9A;--ui-surface:#050505;--ui-surface-solid:#050505;--ui-border:#1A1A1A;color-scheme:dark; }
html[data-ui-theme="oled"],html[data-ui-theme="oled"] body,html[data-ui-theme="oled"] .page { background:#000!important;color:#F5F5F5!important; }
html[data-ui-theme="oled"] .income-block,html[data-ui-theme="oled"] .variable-category,html[data-ui-theme="oled"] .v110-home-main,html[data-ui-theme="oled"] .v110-home-tile,html[data-ui-theme="oled"] .profile-settings-list,html[data-ui-theme="oled"] .sheet,html[data-ui-theme="oled"] input,html[data-ui-theme="oled"] select { background:#050505!important;border-color:#1A1A1A!important;color:#F5F5F5!important;box-shadow:none!important; }
html[data-ui-theme="oled"] .ca-bottom-nav { background:rgba(0,0,0,.96)!important;border-top-color:#1A1A1A!important; }

/* Windows 98 reste compatible avec la navigation à 4 onglets. */
html[data-ui-theme="win98"] .transactions-segmented { border:2px solid;border-color:#808080 #fff #fff #808080;border-radius:0;background:#c0c0c0; }
html[data-ui-theme="win98"] .transactions-segmented button { border-radius:0;color:#000; }
html[data-ui-theme="win98"] .transactions-segmented button.active { background:#c0c0c0;border:2px solid;border-color:#fff #000 #000 #fff;box-shadow:none; }

/* --- v121 accessibilité ---------------------------------------------------- */
@media (hover:none) and (pointer:coarse){
  .a11y-target:not(input):not(select):not(textarea){min-height:44px;}
  .transactions-detected-actions button{min-height:38px;}
}
@supports (font:-apple-system-body){ body{font:-apple-system-body;} h1,.v110-home-amount,.income-summary-amount{font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",sans-serif;} }
:focus-visible { outline:3px solid rgba(var(--accent-user-rgb),.28)!important;outline-offset:2px!important; }
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important;}}

/* --- v126 performance visuelle des longues listes ------------------------- */
.variable-category,.v110-search-row,.cloud-backup-row,.household-activity-row,.transactions-flat-row,.transactions-detected-row { content-visibility:auto;contain-intrinsic-size:1px 58px; }

/* Dark mode des nouveaux composants. */
html[data-theme="dark"] .transactions-hero>div,html[data-theme="dark"] .transactions-segmented button.active,html[data-theme="dark"] .v129-diagnostic-card,html[data-theme="dark"] .v129-security-card { background:#1A1E22!important;border-color:rgba(255,255,255,.075)!important;color:#F3F4F5!important; }
html[data-theme="dark"] .transactions-segmented { background:rgba(255,255,255,.075); }
html[data-theme="dark"] .merchant-suggestion { background:rgba(var(--accent-user-rgb),.12); }

@media (max-width:390px){
  .transactions-hero strong{font-size:14px}.transactions-hero>div{padding:11px 9px}.transactions-hero span{font-size:9.5px}
  .transactions-section-title{align-items:flex-start}.transactions-detected-row{align-items:flex-start;flex-direction:column}.transactions-detected-actions{align-self:flex-end}
}


/* v129.1 — Transactions épuré : aucun doublon avec Accueil. */
body.transactions-mode #v110-home,
body.transactions-mode .expense-tabs,
body.transactions-mode .transactions-hero {
  display: none !important;
}

/* Les catégories ponctuelles sont repliées par défaut à chaque lancement.
   L'état ouvert reste volontairement en mémoire uniquement pendant la session. */
body.transactions-mode .variable-category.collapsed {
  padding-bottom: 10px;
}

/* Plus de pastille de pourcentage sur la barre de budget. */
.category-progress-label { display:none !important; }

/* ===== SOURCE: v1292-ui.css ===== */
/* v129.2 — Réglages / Profil compacts et dépliables. */

/* Accordéons natifs : aucune boucle JS, aucun observer. */
.settings-accordion,
.profile-accordion {
  display: block;
  width: auto;
  margin: 0 18px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(31, 42, 55, .10);
  background: transparent;
}

.settings-accordion:last-of-type,
.profile-accordion:last-of-type {
  border-bottom-color: transparent;
}

.accordion-summary {
  min-height: 64px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 2px;
  list-style: none;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.accordion-summary::-webkit-details-marker { display: none; }
.accordion-summary::marker { content: ''; }

.accordion-summary-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.accordion-summary-copy strong {
  color: var(--ink, #18202A);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 720;
}

.accordion-summary-copy small {
  color: var(--muted, #73808B);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 500;
}

.accordion-chevron {
  flex: 0 0 auto;
  color: var(--muted, #87919A);
  font-size: 25px;
  line-height: 1;
  font-weight: 400;
  transform: rotate(0deg);
  transition: transform 160ms ease;
}

.settings-accordion[open] > .accordion-summary .accordion-chevron,
.profile-accordion[open] > .accordion-summary .accordion-chevron {
  transform: rotate(90deg);
}

.accordion-body {
  padding: 0 0 18px;
}

/* Les anciennes sections conservent leur logique mais perdent leurs marges/traits de niveau supérieur. */
.settings-accordion .v110-settings-section,
.settings-accordion .v112-settings-section {
  margin: 0 !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}

.settings-accordion .v110-settings-section::before,
.settings-accordion .v112-settings-section::before {
  display: none !important;
}

.settings-accordion .v110-section-head {
  justify-content: flex-end !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
}

.settings-accordion .v110-section-head:empty { display: none !important; }

#settings-main-panel > .settings-sheet-title,
#settings-main-panel > .settings-sheet-subtitle {
  margin-left: 18px;
  margin-right: 18px;
}

#settings-main-panel > .settings-sheet-subtitle {
  margin-bottom: 4px !important;
}

/* Diagnostic vit désormais dans Réglages. */
#settings-diagnostic-details .v129-diagnostic-card {
  margin: 0 !important;
}

/* Profil : la carte du compte reste toujours en haut. */
#settings-account {
  position: relative;
  margin-bottom: 4px !important;
}

#profile-account-open.is-clickable {
  cursor: pointer;
  border-radius: 12px;
  outline: none;
}

#profile-account-open.is-clickable:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ca-accent, #087F68) 20%, transparent);
}

.profile-account-chevron {
  flex: 0 0 auto;
  margin-left: 8px;
  font-size: 24px;
  color: var(--muted, #8B949C);
}

.account-hidden-summary { display: none !important; }

#profile-account-details {
  margin-top: 0;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(31, 42, 55, .10);
}

#profile-account-details > .accordion-body {
  padding-top: 8px;
}

/* Les blocs demandés gardent leurs cartes blanches bordées à l'intérieur de l'accordéon. */
#profile-household-details .household-settings-list,
#profile-backup-details .cloud-backup-list {
  background: var(--paper, #fff) !important;
}

/* Activité récente dans la cloche, pas dans Profil. */
.notification-activity-block {
  margin: 4px 18px 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(31, 42, 55, .10);
}

.notification-subsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  margin-bottom: 4px;
}

.notification-subsection-title,
.notification-section-label {
  color: var(--ink, #18202A);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 740;
}

.notification-section-label {
  margin: 0 18px 8px;
}

.notification-activity-block .household-activity-list {
  margin: 0 !important;
}

.notification-activity-block .household-activity-row {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Profil : aucune longue succession de titres nus. */
#profile-sheet .sheet-scroll-content > .profile-section-label,
#profile-sheet .sheet-scroll-content > .profile-section-head {
  display: none !important;
}

/* Réglages/Profil fermés restent très compacts sur iPhone. */
html.is-ios .settings-accordion,
html.is-ios .profile-accordion {
  margin-left: 16px;
  margin-right: 16px;
}

html.is-ios .accordion-summary {
  min-height: 60px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Dark / OLED : séparateurs et textes restent discrets. */
html[data-theme="dark"] .settings-accordion,
html[data-theme="dark"] .profile-accordion,
html[data-ui-theme="oled"] .settings-accordion,
html[data-ui-theme="oled"] .profile-accordion,
html[data-theme="dark"] .notification-activity-block,
html[data-ui-theme="oled"] .notification-activity-block {
  border-color: rgba(255,255,255,.10);
}

/* Windows 98 : conserver l'esprit du thème sans casser le mécanisme d'accordéon. */
html[data-ui-theme="win98"] .accordion-summary {
  min-height: 52px;
}
html[data-ui-theme="win98"] .accordion-chevron {
  font-family: Arial, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  .accordion-chevron { transition: none !important; }
}

/* ===== SOURCE: v1293-pages.css ===== */
/* v129.3 — Réglages et Profil : navigation par vraies pages, sans accordéons. */

.section-menu-view,
.section-page {
  width: 100%;
  box-sizing: border-box;
}

.section-menu-kicker {
  margin: 14px 18px 6px;
  color: var(--muted, #77838D);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: .01em;
}

.section-menu-list {
  margin: 0 18px 22px;
}

.section-menu-row {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 2px;
  border: 0;
  border-bottom: 1px solid rgba(31, 42, 55, .10);
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.section-menu-row:last-child { border-bottom-color: transparent; }

.section-menu-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.section-menu-copy strong {
  color: var(--ink, #18202A);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 720;
}

.section-menu-copy small {
  color: var(--muted, #73808B);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 500;
}

.section-menu-chevron {
  flex: 0 0 auto;
  color: var(--muted, #8A949C);
  font-size: 25px;
  line-height: 1;
  font-weight: 400;
}

.section-page[hidden],
.section-menu-view[hidden] { display: none !important; }

.section-page-head {
  position: sticky;
  top: 0;
  z-index: 35;
  margin: 0;
  padding: 8px 18px 14px;
  background: color-mix(in srgb, var(--paper, #fff) 94%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid rgba(31, 42, 55, .07);
}

.section-page-back {
  appearance: none;
  -webkit-appearance: none;
  min-height: 34px;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--ca-accent, #087F68);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  font-weight: 650;
  cursor: pointer;
}

.section-page-title {
  color: var(--ink, #18202A);
  font-size: 22px;
  line-height: 1.12;
  font-weight: 780;
  letter-spacing: -.025em;
}

.section-page-subtitle {
  max-width: 560px;
  margin-top: 5px;
  color: var(--muted, #73808B);
  font-size: 11.5px;
  line-height: 1.4;
  font-weight: 500;
}

.section-page-content {
  padding: 16px 18px max(28px, calc(var(--safe-bottom) + 18px));
}

/* Les anciens contenus conservent leur logique mais deviennent des contenus de page. */
.section-page-content > .v110-settings-section,
.section-page-content > .v112-settings-section {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.section-page-content > .v110-settings-section::before,
.section-page-content > .v112-settings-section::before {
  display: none !important;
}

.section-page-content .v110-section-head {
  margin: 0 0 14px !important;
  padding: 0 !important;
}

.section-page-content > .settings-list,
.section-page-content > .profile-settings-list,
.section-page-content > .household-summary,
.section-page-content > .profile-section-head {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Profil : carte personnelle toujours visible sur le menu, elle mène à la page Compte. */
#profile-menu-view #settings-account {
  margin: 8px 18px 14px !important;
}

#profile-account-open.is-clickable {
  min-height: 48px;
}

#profile-menu-view .profile-account-chevron {
  display: inline-block !important;
}

/* Les anciens labels nus ne doivent pas recréer une longue page. */
.section-page-content > .profile-section-label {
  margin: 16px 0 7px !important;
}

/* Diagnostic et listes gardent une largeur naturelle dans leur propre page. */
#settings-diagnostic-details .v129-diagnostic-card,
#profile-household-details .household-settings-list,
#profile-backup-details .cloud-backup-list {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Feedback tactile visuel discret, sans animation JS. */
@media (hover: none) and (pointer: coarse) {
  .section-menu-row:active { opacity: .62; }
  .section-page-back:active { opacity: .56; }
}

html.is-ios .section-menu-list,
html.is-ios .section-menu-kicker {
  margin-left: 16px;
  margin-right: 16px;
}

html.is-ios .section-menu-row {
  min-height: 60px;
  padding-top: 11px;
  padding-bottom: 11px;
}

html.is-ios .section-page-head {
  padding-left: 16px;
  padding-right: 16px;
}

html.is-ios .section-page-content {
  padding-left: 16px;
  padding-right: 16px;
}

/* Dark / OLED */
html[data-theme="dark"] .section-menu-row,
html[data-ui-theme="oled"] .section-menu-row,
html[data-theme="dark"] .section-page-head,
html[data-ui-theme="oled"] .section-page-head {
  border-color: rgba(255,255,255,.09);
}

html[data-theme="dark"] .section-page-head {
  background: color-mix(in srgb, var(--paper, #171A1D) 94%, transparent);
}

html[data-ui-theme="oled"] .section-page-head {
  background: rgba(0,0,0,.94);
}

/* Windows 98 reste volontairement plus anguleux, mais garde la navigation par pages. */
html[data-ui-theme="win98"] .section-page-head {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 2px solid #808080;
}
html[data-ui-theme="win98"] .section-menu-row {
  min-height: 52px;
}

@media (prefers-reduced-motion: reduce) {
  .section-menu-row,
  .section-page-back { transition: none !important; }
}

/* ===== SOURCE: v1294-auth-permissions.css ===== */
/* v129.4 — Apple/Google + rôles du foyer */
.social-auth { margin: 18px 0 14px; }
.social-auth-button {
  width: 100%; min-height: 48px; margin: 0 0 10px; padding: 0 16px;
  display: grid; grid-template-columns: 28px 1fr 28px; align-items: center;
  border: 1px solid rgba(38,48,60,.12); border-radius: 14px;
  background: rgba(255,255,255,.9); color: #15191e;
  font: inherit; font-weight: 700; cursor: pointer;
}
.social-auth-button > span:nth-child(2) { grid-column: 2; text-align: center; }
.social-auth-mark { grid-column: 1; font-size: 20px; line-height: 1; font-weight: 800; }
.social-auth-button.apple { background:#111; border-color:#111; color:#fff; }
.social-auth-button.google { background:#fff; }
.google-mark { font-family: Arial, Helvetica, sans-serif; font-size: 18px; }
.social-auth-divider { display:flex; align-items:center; gap:12px; color:var(--muted,#7c8794); font-size:12px; margin: 4px 0 12px; }
.social-auth-divider::before,.social-auth-divider::after { content:""; height:1px; flex:1; background:rgba(38,48,60,.1); }

.household-access-select {
  min-height: 36px; max-width: 180px; padding: 0 30px 0 10px;
  border: 1px solid rgba(38,48,60,.12); border-radius: 10px;
  background: rgba(255,255,255,.9); color: inherit; font: inherit; font-size: 12px;
}
.household-member-actions { align-items:center; flex-wrap:wrap; }
.household-readonly .readonly-write-control { opacity:.42; }
.household-readonly #quick-add-open,
.household-readonly .income-add,
.household-readonly #transaction-add-recurring,
.household-readonly #add-fixed-category,
.household-readonly #add-variable-category,
.household-readonly #cloud-backup-create { opacity:.38; }
.household-readonly .profile-account-card::after { content:none; }

@media (prefers-color-scheme: dark) {
  html[data-theme="dark"] .social-auth-button.google,
  html[data-theme="dark"] .household-access-select { background:#24282d; color:#f5f7f8; border-color:rgba(255,255,255,.12); }
  html[data-theme="dark"] .social-auth-divider::before,
  html[data-theme="dark"] .social-auth-divider::after { background:rgba(255,255,255,.12); }
}

/* ===== SOURCE: v1295-minimal.css ===== */
/* v129.5 — surfaces blanches + réglages/profil aérés et minimalistes. */

/* En mode clair, aucune teinte beige dans l’interface standard. */
html:not([data-theme="dark"]):not([data-ui-theme="oled"]):not([data-ui-theme="win98"]) {
  --bg: #FFFFFF !important;
  --paper: #FFFFFF !important;
  --soft: #F7F8FA !important;
  --line: #E7EAEE !important;
  --ui-surface: #FFFFFF !important;
  --ui-surface-solid: #FFFFFF !important;
  --ui-border: #E7EAEE !important;
}

html:not([data-theme="dark"]):not([data-ui-theme="oled"]):not([data-ui-theme="win98"]) body,
html:not([data-theme="dark"]):not([data-ui-theme="oled"]):not([data-ui-theme="win98"]) .page,
html:not([data-theme="dark"]):not([data-ui-theme="oled"]):not([data-ui-theme="win98"]) .sheet,
html:not([data-theme="dark"]):not([data-ui-theme="oled"]):not([data-ui-theme="win98"]) .section-page,
html:not([data-theme="dark"]):not([data-ui-theme="oled"]):not([data-ui-theme="win98"]) .section-page-content {
  background: #FFFFFF !important;
}

/* Toutes les pages de fonction utilisent le langage visuel d’Historique & Annuler :
   aucune carte superflue, lignes espacées et séparateurs fins. */
.settings-function-page .v110-feature-list,
.settings-function-page .v129-action-list,
.settings-function-page .v129-diagnostic-grid,
.profile-function-page .v110-feature-list {
  gap: 0 !important;
  background: transparent !important;
}

.settings-function-page .v110-feature-row,
.profile-function-page .v110-feature-row {
  min-height: 62px !important;
  margin: 0 !important;
  padding: 13px 2px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  gap: 12px !important;
}

.settings-function-page .v110-feature-row:last-child,
.profile-function-page .v110-feature-row:last-child {
  border-bottom: 0 !important;
}

.settings-function-page .v110-feature-row-title,
.profile-function-page .v110-feature-row-title {
  font-size: 13.5px !important;
  line-height: 1.25 !important;
  font-weight: 720 !important;
}

.settings-function-page .v110-feature-row-sub,
.profile-function-page .v110-feature-row-sub {
  margin-top: 4px !important;
  font-size: 10.75px !important;
  line-height: 1.3 !important;
}

.settings-function-page .v110-feature-action,
.profile-function-page .v110-feature-action {
  min-height: 30px !important;
  padding: 2px 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent-user, var(--ca-accent)) !important;
}

/* Les panneaux/formulaires de Réglages restent des contenus de page, pas des cartes. */
.settings-function-page .profile-inline-panel,
.settings-function-page .v110-form,
.settings-function-page .v112-bank-preview,
.settings-function-page .v129-diagnostic-card {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.settings-function-page .v129-diagnostic-card {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Personnalisation : aucune cellule extérieure, tout directement sur fond blanc. */
#profile-personalization-details .preference-settings-list,
#profile-personalization-details .settings-list,
#profile-personalization-details .profile-settings-list {
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#profile-personalization-details .settings-row,
#profile-personalization-details .preference-row {
  min-height: 62px !important;
  padding: 12px 2px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#profile-personalization-details .preference-settings-list .settings-row:last-child,
#profile-personalization-details .preference-settings-list .preference-row:last-child {
  border-bottom: 0 !important;
}

#profile-personalization-details .profile-section-label {
  margin: 24px 2px 7px !important;
}

#profile-personalization-details .preference-home-order-block {
  margin-top: 20px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

/* Sécurité & confidentialité : supprimer les cartes compactes. */
#profile-security-details .biometric-settings-list,
#profile-security-details .v129-security-card {
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#profile-security-details .biometric-settings-list {
  margin-bottom: 8px !important;
}

#profile-security-details .settings-row,
#profile-security-details .biometric-setting-row {
  min-height: 66px !important;
  padding: 13px 2px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  gap: 12px !important;
}

#profile-security-details .v129-security-card .settings-row:last-child {
  border-bottom: 0 !important;
}

#profile-security-details .settings-row > span:first-child,
#profile-security-details .biometric-setting-copy {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

/* Chaque phrase reste sur une ligne. La sous-ligne est volontairement plus fine
   pour tenir sur iPhone sans rendre la page compacte. */
#profile-security-details .settings-row strong,
#profile-security-details .settings-row small,
#profile-security-details .biometric-setting-title,
#profile-security-details .biometric-setting-subtitle {
  display: block !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

#profile-security-details .settings-row strong,
#profile-security-details .biometric-setting-title {
  font-size: 13px !important;
  line-height: 1.22 !important;
}

#profile-security-details .settings-row small,
#profile-security-details .biometric-setting-subtitle {
  margin-top: 4px !important;
  font-size: 10px !important;
  line-height: 1.18 !important;
}

/* Notifications et autres réglages simples : même traitement plat. */
#profile-notification-details .v110-notification-settings {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#profile-notification-details .settings-row {
  min-height: 64px !important;
  padding: 12px 2px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  background: transparent !important;
}

/* Les pages restent aérées, même si elles gagnent de nouvelles fonctions. */
.section-page-content {
  padding-top: 20px !important;
}

.settings-function-page .v110-settings-section,
.profile-function-page .v110-settings-section {
  margin-top: 0 !important;
}

.settings-function-page .v110-section-head,
.profile-function-page .v110-section-head {
  margin-bottom: 16px !important;
}

/* Conserver les deux cartes explicitement voulues : Foyer et Sauvegardes cloud. */
#profile-household-details .household-summary,
#profile-household-details .household-members-list,
#profile-household-details .household-settings-list,
#profile-backup-details .cloud-backup-list {
  background: #FFFFFF !important;
}

html[data-theme="dark"] #profile-household-details .household-summary,
html[data-theme="dark"] #profile-household-details .household-members-list,
html[data-theme="dark"] #profile-household-details .household-settings-list,
html[data-theme="dark"] #profile-backup-details .cloud-backup-list,
html[data-ui-theme="oled"] #profile-household-details .household-summary,
html[data-ui-theme="oled"] #profile-household-details .household-members-list,
html[data-ui-theme="oled"] #profile-household-details .household-settings-list,
html[data-ui-theme="oled"] #profile-backup-details .cloud-backup-list {
  background: var(--ui-surface-solid, var(--paper)) !important;
}

@media (max-width: 430px) {
  #profile-security-details .settings-row strong,
  #profile-security-details .biometric-setting-title { font-size: 12.5px !important; }
  #profile-security-details .settings-row small,
  #profile-security-details .biometric-setting-subtitle { font-size: 9.6px !important; }
}

/* ===== SOURCE: v1296-ui.css ===== */
/* v129.6 — Compte aéré, navigation iOS et Transactions simplifiées. */

/* -------------------------------------------------------------------------- */
/* En-tête iOS : descendre légèrement sous le glass / safe area système.      */
/* -------------------------------------------------------------------------- */
html.is-ios .page {
  padding-top: calc(var(--safe-top) + 28px) !important;
}

/* -------------------------------------------------------------------------- */
/* Profil > Compte : même langage visuel plat qu'Historique & Annuler.        */
/* -------------------------------------------------------------------------- */
#profile-account-details .account-settings-list {
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#profile-account-details .account-settings-list .settings-row {
  width: 100% !important;
  min-height: 64px !important;
  margin: 0 !important;
  padding: 15px 2px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left !important;
}

#profile-account-details .account-settings-list .settings-row:last-child {
  border-bottom: 0 !important;
}

#profile-account-details .account-settings-list .settings-row > span:first-child {
  font-size: 13.5px !important;
  line-height: 1.25 !important;
  font-weight: 650 !important;
}

#profile-account-details .account-settings-list .settings-chevron {
  opacity: .55 !important;
}

#profile-account-details .account-panel {
  margin: 22px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#profile-account-details .account-panel label {
  margin: 0 0 8px !important;
  font-size: 11px !important;
  color: var(--ui-muted, var(--muted)) !important;
}

#profile-account-details .account-message {
  margin-top: 12px !important;
}

/* -------------------------------------------------------------------------- */
/* Swipe retour : la page suit uniquement un geste horizontal depuis le bord. */
/* -------------------------------------------------------------------------- */
html.is-ios .section-page.edge-back-tracking {
  will-change: transform, opacity;
  transition: none !important;
}

/* -------------------------------------------------------------------------- */
/* Transactions : deux espaces clairs, aucune vue "Toutes" ni cartes résumé. */
/* -------------------------------------------------------------------------- */
body.transactions-mode .expense-tabs,
body.transactions-mode .transactions-hero {
  display: none !important;
}

.transactions-hub {
  gap: 18px !important;
  margin-top: 6px !important;
  margin-bottom: 4px !important;
}

.transactions-segmented {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 20px !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, var(--line)) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.transactions-segmented button {
  position: relative !important;
  min-height: 44px !important;
  padding: 0 4px 11px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ui-muted, var(--muted)) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

.transactions-segmented button::after {
  content: '';
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
}

.transactions-segmented button.active {
  color: var(--ink, var(--text)) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-weight: 760 !important;
}

.transactions-segmented button.active::after {
  background: var(--accent-user, var(--ca-accent)) !important;
}

/* Les sous-parties ont leur propre rythme, au lieu d'être empilées sans repère. */
.transactions-recurring-overview,
.transactions-detected {
  gap: 8px !important;
  padding: 2px 0 0 !important;
}

.transactions-section-title,
.transaction-panel-head,
#variable-section .section-head {
  align-items: center !important;
  padding-left: 1px !important;
  padding-right: 1px !important;
}

.transactions-section-title strong,
.transaction-panel-head .section-title,
#variable-section .section-title {
  font-size: 15px !important;
  line-height: 1.22 !important;
  font-weight: 760 !important;
}

.transactions-section-title small,
.transaction-panel-head .section-subtitle,
#variable-section .section-subtitle {
  margin-top: 2px !important;
  font-size: 10.5px !important;
  line-height: 1.35 !important;
}

.transactions-flat-list {
  border-top: 0 !important;
}

.transactions-flat-row,
.transactions-detected-row {
  min-height: 54px !important;
  padding: 11px 2px !important;
}

/* Séparation nette entre le sélecteur/automatisations et les vraies dépenses. */
body.transactions-mode #fixed-section,
body.transactions-mode #variable-section {
  margin-top: 18px !important;
  padding-top: 20px !important;
  border-top: 1px solid var(--ui-border, var(--line)) !important;
}

body.transactions-mode #variable-section .section-head {
  margin-bottom: 10px !important;
}

body.transactions-mode #fixed-section .transaction-panel-head {
  margin-bottom: 10px !important;
}

/* Les actions de section restent des actions texte, pas de grosses cellules. */
body.transactions-mode .transaction-panel-head .mini-add,
body.transactions-mode #variable-section .mini-add,
body.transactions-mode .transactions-section-title button {
  min-height: 34px !important;
  padding: 0 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent-user, var(--ca-accent)) !important;
  font-size: 11.5px !important;
  font-weight: 720 !important;
}

/* Le gros bouton "ajouter catégorie" ne coupe plus visuellement la liste. */
body.transactions-mode #fixed-section .fixed-add-category-wide {
  width: auto !important;
  min-height: 34px !important;
  margin: 2px 0 8px !important;
  padding: 0 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent-user, var(--ca-accent)) !important;
  text-align: left !important;
  font-size: 11.5px !important;
  font-weight: 720 !important;
}

/* Thèmes : conserver la structure minimaliste, même en Windows 98. */
html[data-ui-theme="win98"] .transactions-segmented {
  padding: 0 !important;
  border-width: 0 0 2px !important;
  border-color: #808080 !important;
  background: transparent !important;
}
html[data-ui-theme="win98"] .transactions-segmented button.active {
  border: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 390px) {
  html.is-ios .page { padding-top: calc(var(--safe-top) + 25px) !important; }
  .transactions-segmented { gap: 12px !important; }
}

/* ===== SOURCE: v1297-ui.css ===== */
/* v129.7 — profil/transactions encore plus plats et minimalistes. */

/* -------------------------------------------------------------------------- */
/* En-tête : cloche et recherche = icônes seules, sans cellule.               */
/* -------------------------------------------------------------------------- */
#notification-open,
#global-search-open {
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ca-bluegrey) !important;
}

#notification-open:active,
#global-search-open:active {
  opacity: .5 !important;
  background: transparent !important;
}

/* -------------------------------------------------------------------------- */
/* Profil > Foyer partagé : contenu direct sur la page, plus aucune carte.     */
/* -------------------------------------------------------------------------- */
#profile-household-details .household-summary,
#profile-household-details .household-members-list,
#profile-household-details .household-settings-list,
#profile-household-details .profile-inline-panel,
#profile-household-details .household-invite-result,
#profile-household-details .household-join-panel {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

#profile-household-details .household-summary {
  min-height: 62px !important;
  margin-bottom: 0 !important;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
}

#profile-household-details .household-members-list {
  margin-bottom: 4px !important;
}

#profile-household-details .household-member-row {
  min-height: 62px !important;
  padding: 13px 2px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  background: transparent !important;
}

#profile-household-details .household-settings-list .settings-row {
  min-height: 60px !important;
  padding: 13px 2px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#profile-household-details .household-settings-list .settings-row:last-child:not([hidden]) {
  border-bottom: 0 !important;
}

#profile-household-details .household-member-actions button {
  min-height: 30px !important;
  padding: 0 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent-user, var(--ca-accent)) !important;
}

#profile-household-details .household-access-select {
  min-height: 32px !important;
  padding: 0 18px 0 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* -------------------------------------------------------------------------- */
/* Profil > Sauvegardes cloud : même langage que Historique & Annuler.        */
/* -------------------------------------------------------------------------- */
#profile-backup-details .cloud-backup-list {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

#profile-backup-details .cloud-backup-row {
  min-height: 62px !important;
  padding: 13px 2px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  background: transparent !important;
}

#profile-backup-details .cloud-backup-row:last-child {
  border-bottom: 0 !important;
}

#profile-backup-details .cloud-backup-actions button {
  min-height: 30px !important;
  padding: 0 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent-user, var(--ca-accent)) !important;
}

#profile-backup-details #cloud-backup-create {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* -------------------------------------------------------------------------- */
/* Transactions : aucun ancien résumé à trois grosses cellules.               */
/* -------------------------------------------------------------------------- */
.expense-tabs,
.transactions-hero {
  display: none !important;
}

/* Le sélecteur reste léger et moins haut. */
.transactions-segmented {
  gap: 12px !important;
  margin-bottom: 8px !important;
}

.transactions-segmented button {
  min-height: 36px !important;
  padding-bottom: 8px !important;
  font-size: 12px !important;
}

/* Titres : pas de retour à la ligne disgracieux. */
.transactions-section-title strong,
.transactions-section-title small,
.transaction-panel-head .section-title,
.transaction-panel-head .section-subtitle,
#variable-section .section-title,
#variable-section .section-subtitle {
  white-space: nowrap !important;
}

/* Ponctuelles : titre + explication sur une ligne, action dessous si nécessaire. */
body.transactions-mode #variable-section .section-head {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  grid-template-areas:
    "title subtitle"
    "action action" !important;
  column-gap: 10px !important;
  row-gap: 5px !important;
  align-items: baseline !important;
  padding: 0 2px 8px !important;
}

body.transactions-mode #variable-section .section-title {
  grid-area: title !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
}

body.transactions-mode #variable-section .section-subtitle {
  grid-area: subtitle !important;
  min-width: 0 !important;
  margin: 0 !important;
  font-size: 9.6px !important;
  line-height: 1.2 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.transactions-mode #variable-section #add-variable-category {
  grid-area: action !important;
  justify-self: start !important;
  min-height: 28px !important;
  padding: 0 !important;
}

/* Catégories ponctuelles : plus de carte épaisse autour de chaque catégorie. */
body.transactions-mode .variable-categories {
  gap: 0 !important;
}

body.transactions-mode .variable-category {
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.transactions-mode .variable-category:last-child {
  border-bottom: 0 !important;
}

body.transactions-mode .variable-category .category-head {
  padding: 14px 2px 11px !important;
}

body.transactions-mode .variable-category .category-name {
  font-size: 14.5px !important;
}

body.transactions-mode .variable-category .category-action,
body.transactions-mode .variable-category .category-toggle {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.transactions-mode .variable-category .category-toggle {
  width: 30px !important;
  height: 30px !important;
  flex-basis: 30px !important;
}

body.transactions-mode .variable-category .category-action {
  min-height: 30px !important;
  padding: 0 4px !important;
  font-size: 10px !important;
}

/* Budget / Dépensé / Reste-Dépassé : informations compactes, plus de sous-carte. */
body.transactions-mode .variable-category .category-metrics {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, auto)) !important;
  justify-content: start !important;
  column-gap: 18px !important;
  row-gap: 7px !important;
  width: 100% !important;
  margin: 9px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.transactions-mode .category-metric-label {
  margin-bottom: 2px !important;
  font-size: 8.5px !important;
  letter-spacing: .18px !important;
  text-transform: none !important;
}

body.transactions-mode .category-metric-value {
  font-size: 12.5px !important;
  font-weight: 720 !important;
}

body.transactions-mode .category-progress,
body.transactions-mode .category-budget-missing {
  grid-column: 1 / -1 !important;
}

body.transactions-mode .category-progress {
  height: 3px !important;
  margin-top: 2px !important;
}

/* Les vraies transactions restent des lignes, pas des cartes empilées. */
body.transactions-mode #fixed-section .plain-list .swipe-row,
body.transactions-mode .variable-category .category-list .swipe-row {
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.transactions-mode #fixed-section .plain-list .swipe-row:last-child,
body.transactions-mode .variable-category .category-list .swipe-row:last-child {
  border-bottom: 0 !important;
}

body.transactions-mode #fixed-section .swipe-content,
body.transactions-mode .variable-category .category-list .swipe-content {
  min-height: 54px !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
  border-radius: 0 !important;
  background: var(--paper, #fff) !important;
}

@media (max-width: 390px) {
  body.transactions-mode #variable-section .section-head {
    column-gap: 7px !important;
  }
  body.transactions-mode #variable-section .section-title {
    font-size: 13.2px !important;
  }
  body.transactions-mode #variable-section .section-subtitle {
    font-size: 8.9px !important;
    letter-spacing: -.08px !important;
  }
  body.transactions-mode .variable-category .category-metrics {
    column-gap: 13px !important;
  }
}

/* ===== SOURCE: v1298-ui.css ===== */
/* v129.8 — accueil/revenus minimalistes, notifications plates, transactions sans débordement iOS. */

/* -------------------------------------------------------------------------- */
/* Notifications : activité récente sans cellules.                             */
/* -------------------------------------------------------------------------- */
.notification-activity-block {
  margin: 4px 18px 14px !important;
  padding-bottom: 12px !important;
}

.notification-activity-block .household-activity-list {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.notification-activity-block .household-activity-row {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 11px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.notification-activity-block .household-activity-row:last-child {
  border-bottom: 0 !important;
}

.notification-activity-block .household-activity-main {
  font-size: 12px !important;
  line-height: 1.38 !important;
}

.notification-activity-block .household-activity-meta {
  margin-top: 3px !important;
  font-size: 10.5px !important;
}

/* Alertes : lignes sobres plutôt que cartes empilées. */
.notification-list {
  gap: 0 !important;
}

.notification-row {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 11px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.notification-row:last-child {
  border-bottom: 0 !important;
}

.notification-row.unread {
  background: transparent !important;
  border-color: var(--ui-border, #E7EAEE) !important;
}

/* -------------------------------------------------------------------------- */
/* Accueil > Revenus : bloc plat, dense et lisible.                            */
/* -------------------------------------------------------------------------- */
#income-section {
  margin: 15px 0 18px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#income-section .income-block-head {
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 2px 9px !important;
  border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  align-items: center !important;
  gap: 12px !important;
}

#income-section .income-block-heading {
  min-width: 0 !important;
  display: flex !important;
  align-items: baseline !important;
  flex-wrap: wrap !important;
  column-gap: 9px !important;
  row-gap: 1px !important;
}

#income-section .income-block-title {
  margin: 0 !important;
  color: var(--ink, var(--text)) !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  font-weight: 760 !important;
}

#income-section .income-total-info {
  margin: 0 !important;
  color: var(--ui-muted, var(--muted)) !important;
  font-size: 10.5px !important;
  line-height: 1.25 !important;
  font-weight: 560 !important;
}

#income-section .income-add {
  flex: 0 0 auto !important;
  min-height: 32px !important;
  padding: 0 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent-user, var(--ca-accent)) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
}

#income-section .income-grid {
  gap: 0 !important;
}

#income-section .income-grid .swipe-row {
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#income-section .income-grid .swipe-row:last-child {
  border-bottom: 0 !important;
}

#income-section .income-grid .swipe-content {
  min-height: 54px !important;
  padding: 10px 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--paper, #fff) !important;
  box-shadow: none !important;
}

#income-section .income-grid .line-title {
  font-size: 13.5px !important;
  line-height: 1.25 !important;
  font-weight: 680 !important;
}

#income-section .income-grid .line-sub {
  margin-top: 2px !important;
  font-size: 10.5px !important;
  line-height: 1.25 !important;
}

#income-section .income-grid .amount {
  font-size: 14px !important;
  line-height: 1.15 !important;
  font-weight: 730 !important;
}

#income-section .empty {
  padding: 14px 2px !important;
  color: var(--ui-muted, var(--muted)) !important;
  font-size: 11.5px !important;
}

/* Budget du mois sous les revenus : même langage plat et léger. */
.month-balance {
  margin: 0 0 18px !important;
  padding: 14px 2px 15px !important;
  border: 0 !important;
  border-top: 1px solid var(--ui-border, #E7EAEE) !important;
  border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.month-balance-title {
  margin-bottom: 9px !important;
  font-size: 10.5px !important;
  font-weight: 680 !important;
}

.month-balance-stats {
  gap: 18px !important;
}

.month-balance-stat + .month-balance-stat {
  border-left: 0 !important;
  padding-left: 0 !important;
}

.month-balance-stat-label {
  font-size: 9.5px !important;
}

.month-balance-amount,
.month-balance-state {
  font-size: 18px !important;
  line-height: 1.15 !important;
  font-weight: 740 !important;
}

.month-balance-progress {
  height: 3px !important;
  margin-top: 11px !important;
}

.month-balance-foot {
  margin-top: 6px !important;
  font-size: 9.8px !important;
}

/* -------------------------------------------------------------------------- */
/* Transactions : aucune largeur forcée au-delà du viewport.                  */
/* -------------------------------------------------------------------------- */
body.transactions-mode,
body.transactions-mode .page,
body.transactions-mode #transactions-hub,
body.transactions-mode #fixed-section,
body.transactions-mode #variable-section {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body.transactions-mode #transactions-hub *,
body.transactions-mode #fixed-section *,
body.transactions-mode #variable-section * {
  min-width: 0;
}

/* Annule le nowrap global de v129.7 qui pouvait élargir la page. */
body.transactions-mode .transactions-section-title strong,
body.transactions-mode .transactions-section-title small,
body.transactions-mode .transaction-panel-head .section-subtitle,
body.transactions-mode #variable-section .section-subtitle {
  white-space: normal !important;
}

/* Ponctuelles : titre et action sur la première ligne, description en dessous. */
body.transactions-mode #variable-section .section-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "title action"
    "subtitle subtitle" !important;
  column-gap: 12px !important;
  row-gap: 3px !important;
  width: 100% !important;
  max-width: 100% !important;
  align-items: center !important;
  padding: 0 2px 10px !important;
}

body.transactions-mode #variable-section .section-title {
  grid-area: title !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 14px !important;
}

body.transactions-mode #variable-section .section-subtitle {
  grid-area: subtitle !important;
  width: 100% !important;
  margin: 0 !important;
  font-size: 10.5px !important;
  line-height: 1.3 !important;
  overflow-wrap: anywhere !important;
}

body.transactions-mode #variable-section #add-variable-category {
  grid-area: action !important;
  justify-self: end !important;
  align-self: center !important;
  width: auto !important;
  max-width: 100% !important;
  min-height: 30px !important;
  padding: 0 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

/* Même garde-fou pour les entêtes récurrents. */
body.transactions-mode .transaction-panel-head,
body.transactions-mode .transactions-section-title {
  width: 100% !important;
  max-width: 100% !important;
}

body.transactions-mode .transaction-panel-head > div,
body.transactions-mode .transactions-section-title > div {
  min-width: 0 !important;
}

body.transactions-mode .transaction-panel-head .section-subtitle,
body.transactions-mode .transactions-section-title small {
  overflow-wrap: anywhere !important;
}

@media (max-width: 390px) {
  #income-section .income-block-heading {
    display: grid !important;
    gap: 2px !important;
  }

  body.transactions-mode #variable-section .section-head {
    column-gap: 8px !important;
  }

  body.transactions-mode #variable-section .section-title {
    font-size: 13.5px !important;
  }

  body.transactions-mode #variable-section .section-subtitle {
    font-size: 10px !important;
  }
}

/* ===== SOURCE: v12910-ui.css ===== */
/* v129.10 — macOS desktop: plus d'espace entre les actions de gauche et la catégorie de droite. */

@media (min-width: 1050px) {
  html.is-macos body.transactions-mode .variable-categories {
    column-gap: 42px !important;
    row-gap: 18px !important;
  }

  html.is-macos body.transactions-mode .variable-category .category-head {
    padding-left: 4px !important;
    padding-right: 18px !important;
  }

  html.is-macos body.transactions-mode .variable-category .category-topline {
    gap: 16px !important;
  }

  html.is-macos body.transactions-mode .variable-category .category-actions {
    gap: 8px !important;
    padding-left: 14px !important;
    flex-shrink: 0 !important;
  }
}

/* ===== SOURCE: v12911-ui.css ===== */
/* v129.11 — passe de finition macOS desktop uniquement. */

@media (min-width: 1050px) {
  /* Ponctuelles : deux vraies colonnes avec un gutter confortable. */
  html.is-macos body.transactions-mode .variable-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 58px !important;
    row-gap: 0 !important;
    align-items: stretch !important;
  }

  html.is-macos body.transactions-mode .variable-category {
    min-width: 0 !important;
    width: 100% !important;
  }

  /* Chaque moitié garde sa propre zone d'actions ; rien ne colle à la colonne voisine. */
  html.is-macos body.transactions-mode .variable-category .category-head {
    padding-top: 16px !important;
    padding-bottom: 14px !important;
    box-sizing: border-box !important;
  }

  html.is-macos body.transactions-mode .variable-category:nth-child(odd) .category-head {
    padding-left: 2px !important;
    padding-right: 24px !important;
  }

  html.is-macos body.transactions-mode .variable-category:nth-child(even) .category-head {
    padding-left: 20px !important;
    padding-right: 6px !important;
  }

  html.is-macos body.transactions-mode .variable-category .category-topline {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 18px !important;
    width: 100% !important;
  }

  html.is-macos body.transactions-mode .variable-category .category-name {
    min-width: 0 !important;
    font-size: 14.5px !important;
    line-height: 1.25 !important;
  }

  html.is-macos body.transactions-mode .variable-category .category-actions {
    min-width: 116px !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    padding-left: 8px !important;
    flex: 0 0 auto !important;
  }

  html.is-macos body.transactions-mode .variable-category .category-toggle {
    width: 28px !important;
    height: 28px !important;
    flex-basis: 28px !important;
  }

  html.is-macos body.transactions-mode .variable-category .category-action {
    min-height: 28px !important;
    padding: 0 5px !important;
    font-size: 10.5px !important;
    line-height: 1 !important;
  }

  /* Chiffres : rythme plus régulier et barres alignées. */
  html.is-macos body.transactions-mode .variable-category .category-metrics {
    margin-top: 10px !important;
    column-gap: 22px !important;
    row-gap: 6px !important;
    max-width: 310px !important;
  }

  html.is-macos body.transactions-mode .variable-category .category-progress,
  html.is-macos body.transactions-mode .variable-category .category-budget-missing {
    width: 100% !important;
    max-width: 250px !important;
  }

  html.is-macos body.transactions-mode .variable-category.collapsed .category-head {
    min-height: 116px !important;
  }

  /* En-tête Ponctuelles : même axe gauche/droite que la grille. */
  html.is-macos body.transactions-mode #variable-section .section-head {
    padding-left: 2px !important;
    padding-right: 6px !important;
    padding-bottom: 12px !important;
    column-gap: 18px !important;
  }

  html.is-macos body.transactions-mode #variable-section #add-variable-category {
    padding-left: 8px !important;
    padding-right: 0 !important;
  }

  /* Récurrentes : titres, menus et lignes alignés avec les ponctuelles. */
  html.is-macos body.transactions-mode #fixed-section .section-head {
    padding-left: 2px !important;
    padding-right: 6px !important;
  }

  html.is-macos body.transactions-mode #fixed-section .fixed-category-label {
    margin-top: 20px !important;
    margin-bottom: 7px !important;
    padding-left: 2px !important;
    padding-right: 8px !important;
  }

  html.is-macos body.transactions-mode #fixed-section .fixed-category-label.first {
    margin-top: 14px !important;
  }

  html.is-macos body.transactions-mode #fixed-section .fixed-category-menu {
    margin-left: 3px !important;
  }

  html.is-macos body.transactions-mode #fixed-section .fixed-category-empty {
    padding-left: 2px !important;
    padding-right: 8px !important;
  }

  html.is-macos body.transactions-mode #fixed-section .plain-list .swipe-content {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }

  /* Accueil > Revenus : mêmes bords optiques sur desktop. */
  html.is-macos #income-section .income-block-head,
  html.is-macos #income-section .income-grid .swipe-content {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }

  html.is-macos #income-section .income-block-head {
    gap: 16px !important;
  }

  html.is-macos #income-section .income-add {
    padding-left: 8px !important;
    padding-right: 0 !important;
  }
}

/* ===== SOURCE: v12913-ui.css ===== */
/* v129.13 — garde-fou de visibilité : les sections Transactions ne peuvent jamais fuiter sur Accueil. */

body:not(.transactions-mode) #transactions-hub,
body:not(.transactions-mode) #fixed-section,
body:not(.transactions-mode) #variable-section {
  display: none !important;
}

/* ===== SOURCE: v12915-ui.css ===== */
/* v129.15 — ajustements iOS et simplification des réglages. */

/* Bonjour + prénom : plus présent sur iPhone, sans toucher au rendu macOS. */
html.is-ios .v110-header-row h1 {
  font-size: clamp(27px, 7.7vw, 33px) !important;
  letter-spacing: -.9px !important;
}

@media (max-width: 390px) {
  html.is-ios .v110-header-row h1 {
    font-size: 26px !important;
  }
}

/* ===== SOURCE: v12916-ui.css ===== */
/* v129.16 — Réglages / Profil : moins de blanc latéral, largeur cohérente avec Accueil et Transactions. */

/* iOS : les feuilles restent plein écran, mais on retire le double empilement
   de marges (padding de la feuille + marges des menus/pages). */
html.is-ios #month-settings-sheet .sheet,
html.is-ios #profile-sheet .sheet {
  padding-left: max(12px, calc(var(--safe-left) + 12px)) !important;
  padding-right: max(12px, calc(var(--safe-right) + 12px)) !important;
}

html.is-ios #month-settings-sheet .section-menu-kicker,
html.is-ios #month-settings-sheet .section-menu-list,
html.is-ios #profile-sheet .section-menu-kicker,
html.is-ios #profile-sheet .section-menu-list {
  margin-left: 4px !important;
  margin-right: 4px !important;
}

html.is-ios #profile-menu-view #settings-account {
  margin-left: 4px !important;
  margin-right: 4px !important;
}

html.is-ios #month-settings-sheet .section-page-head,
html.is-ios #profile-sheet .section-page-head {
  padding-left: 4px !important;
  padding-right: 4px !important;
}

html.is-ios #month-settings-sheet .section-page-content,
html.is-ios #profile-sheet .section-page-content {
  padding-left: 4px !important;
  padding-right: 4px !important;
}

/* Les listes internes ne rajoutent pas une seconde marge horizontale. */
html.is-ios #month-settings-sheet .settings-list,
html.is-ios #month-settings-sheet .profile-settings-list,
html.is-ios #profile-sheet .settings-list,
html.is-ios #profile-sheet .profile-settings-list {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* macOS : Réglages et Profil utilisent la même largeur fluide que la page principale
   au lieu de rester enfermés dans une petite modale de ~500 px. */
@media (min-width: 768px) {
  html.is-macos #month-settings-sheet,
  html.is-macos #profile-sheet {
    padding: 28px !important;
  }

  html.is-macos #month-settings-sheet .sheet,
  html.is-macos #profile-sheet .sheet {
    width: calc(100vw - clamp(40px, 4vw, 72px)) !important;
    max-width: none !important;
    max-height: calc(100dvh - 56px) !important;
    padding: 18px 22px 24px !important;
    box-sizing: border-box !important;
  }

  html.is-macos #month-settings-sheet .section-menu-kicker,
  html.is-macos #month-settings-sheet .section-menu-list,
  html.is-macos #profile-sheet .section-menu-kicker,
  html.is-macos #profile-sheet .section-menu-list {
    margin-left: 4px !important;
    margin-right: 4px !important;
  }

  html.is-macos #profile-menu-view #settings-account {
    margin-left: 4px !important;
    margin-right: 4px !important;
  }

  html.is-macos #month-settings-sheet .section-page-head,
  html.is-macos #profile-sheet .section-page-head {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  html.is-macos #month-settings-sheet .section-page-content,
  html.is-macos #profile-sheet .section-page-content {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
}

@media (min-width: 1400px) {
  html.is-macos #month-settings-sheet .sheet,
  html.is-macos #profile-sheet .sheet {
    width: calc(100vw - 64px) !important;
  }
}

/* ===== SOURCE: v130-ui.css ===== */
/* v130 — météo, comparaison, recherche avancée, notes. */
.v130-weather-line{margin:2px 0 12px;font-size:13px;line-height:1.35;color:var(--muted);font-weight:560;letter-spacing:-.05px;min-height:18px}
html.is-ios .v130-weather-line{font-size:13px;margin-top:-2px;margin-bottom:10px}
.v130-search-tools{display:flex;gap:8px;margin:8px 0 4px}.v130-search-tools button{appearance:none;border:0;background:transparent;color:var(--muted);font:inherit;font-size:12px;font-weight:700;padding:6px 0;cursor:pointer}.v130-search-tools button+button{margin-left:auto}.v130-search-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px;padding:10px 0 12px;border-bottom:1px solid var(--line)}.v130-search-filters[hidden]{display:none!important}.v130-search-filters label{display:grid;gap:4px;font-size:10px;color:var(--muted);font-weight:700}.v130-search-filters input,.v130-search-filters select{width:100%;min-width:0;height:36px;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--text);font:inherit;font-size:12px;padding:0 9px}
.v130-note-field textarea{width:100%;resize:vertical;min-height:76px;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--text);font:inherit;font-size:14px;padding:10px 11px}.v130-transaction-attachment{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0}.v130-transaction-attachment>div:first-child{display:grid;gap:2px}.v130-transaction-attachment strong{font-size:13px}.v130-transaction-attachment small{font-size:11px;color:var(--muted);max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.v130-transaction-attachment-actions{display:flex;align-items:center;gap:8px}.v130-transaction-attachment-actions button,.v130-attachment-button{appearance:none;border:0;background:transparent;color:var(--text);font:inherit;font-size:11px;font-weight:720;cursor:pointer;padding:6px 0}
.v130-compare-controls{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}.v130-compare-controls label{display:grid;gap:5px;font-size:10px;color:var(--muted);font-weight:700}.v130-compare-controls select{height:40px;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--text);padding:0 10px;font:inherit;font-size:13px}.v130-compare-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.v130-compare-card{display:grid;gap:3px;padding:13px 8px}.v130-compare-card:nth-child(odd){border-right:1px solid var(--line)}.v130-compare-card span{font-size:10px;color:var(--muted);font-weight:700}.v130-compare-card strong{font-size:13px}.v130-compare-card small{font-size:10px;color:var(--muted)}.v130-compare-card small.is-worse{color:#B23A31}.v130-compare-categories{margin-top:16px}.v130-compare-list-title{font-size:11px;font-weight:800;margin-bottom:4px}.v130-compare-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line);font-size:12px}.v130-compare-row>span:nth-child(2){color:var(--muted);font-size:11px}.v130-compare-row strong{font-size:11px}
@media(max-width:390px){.v130-search-filters{grid-template-columns:1fr}.v130-compare-controls{grid-template-columns:1fr}.v130-compare-summary{grid-template-columns:1fr}.v130-compare-card:nth-child(odd){border-right:0}.v130-compare-card+.v130-compare-card{border-top:1px solid var(--line)}.v130-compare-row{grid-template-columns:minmax(0,1fr) auto}.v130-compare-row>span:nth-child(2){grid-column:1/-1}.v130-transaction-attachment{align-items:flex-start;flex-direction:column}.v130-transaction-attachment-actions{width:100%;justify-content:space-between}}

/* ===== SOURCE: v1301-ui.css ===== */
/* v130.1 — Mois & données plat + retour visuel des règles. */

/* Mois & données : aucune cellule/carte, uniquement des lignes aérées. */
#settings-month-data .settings-list {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

#settings-month-data .settings-row,
#settings-month-data label.settings-row {
  min-height: 56px !important;
  margin: 0 !important;
  padding: 11px 2px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, var(--line, #E7EAEE)) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#settings-month-data .settings-row:last-child {
  border-bottom: 0 !important;
}

#v112-rule-status {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}
#v112-rule-status[data-state="success"] { color: var(--accent-user, #2F7D68); }
#v112-rule-status[data-state="error"] { color: #B23A31; }

/* ===== SOURCE: v1302-ui.css ===== */
/* v130.2 — météo locale opt-in sans popup au démarrage. */
.v130-weather-line.needs-location{display:inline-flex!important;align-items:center;min-height:28px;cursor:pointer;color:var(--accent,#087F5B)!important;font-weight:700!important;}
.v130-weather-line.has-weather{cursor:pointer;}
@media (hover:hover){.v130-weather-line.needs-location:hover{text-decoration:underline;text-underline-offset:3px;}}

/* ===== SOURCE: v1303-ui.css ===== */
/* v130.3 — Transactions : le segment Récurrentes/Ponctuelles suffit comme intitulé. */
body.transactions-mode .transaction-panel-head.transaction-panel-head-actions-only,
body.transactions-mode #variable-section .section-head.section-head-actions-only {
  display:flex !important;
  justify-content:flex-end !important;
  align-items:center !important;
  width:100% !important;
  max-width:100% !important;
  min-height:34px !important;
  padding:0 2px 8px !important;
  margin:0 !important;
}
body.transactions-mode .transaction-panel-head.transaction-panel-head-actions-only #transaction-add-recurring,
body.transactions-mode #variable-section .section-head.section-head-actions-only #add-variable-category {
  margin-left:auto !important;
}

/* ===== SOURCE: v1304-ui.css ===== */
/* v130.4 — actions globales Transactions à gauche. */

/* Les actions appartiennent au contenu de l'onglet : elles commencent sur l'axe gauche. */
body.transactions-mode .transaction-panel-head.transaction-panel-head-actions-only,
body.transactions-mode #variable-section .section-head.section-head-actions-only {
  justify-content: flex-start !important;
  gap: 12px !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
}

body.transactions-mode .transaction-panel-head.transaction-panel-head-actions-only #transaction-add-recurring,
body.transactions-mode #variable-section .section-head.section-head-actions-only #transaction-add-variable,
body.transactions-mode #variable-section .section-head.section-head-actions-only #add-variable-category {
  margin-left: 0 !important;
  margin-right: 0 !important;
  justify-self: start !important;
}

/* Ponctuelles : une seule zone d'actions globale, plus de bouton répété sous chaque catégorie. */
body.transactions-mode #variable-section .transaction-global-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

/* ===== SOURCE: v1305-ui.css ===== */
/* v130.6 — onglets Transactions sticky et morphing selon le scroll. */

body.transactions-mode #transactions-hub {
  position: sticky !important;
  top: 4px !important;
  z-index: 78 !important;
  width: 100% !important;
  margin-top: 2px !important;
  margin-bottom: 8px !important;
  padding: 2px 0 0 !important;
  background: var(--paper) !important;
  transition:
    padding 260ms cubic-bezier(.22,.8,.24,1),
    background-color 260ms ease,
    box-shadow 260ms ease,
    -webkit-backdrop-filter 260ms ease,
    backdrop-filter 260ms ease !important;
}

html.is-ios body.transactions-mode #transactions-hub {
  top: calc(var(--safe-top) + 4px) !important;
}

body.transactions-mode #transactions-hub.is-sticking {
  padding-top: 5px !important;
  background: color-mix(in srgb, var(--paper) 88%, transparent) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  box-shadow: 0 10px 22px rgba(20,28,35,.055) !important;
}

body.transactions-mode .transactions-segmented {
  display: grid !important;
  grid-template-columns:
    minmax(0, var(--tx-recurring-fr, 1fr))
    minmax(0, var(--tx-oneoff-fr, 1fr)) !important;
  gap: var(--tx-gap, 20px) !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  transition:
    grid-template-columns 70ms linear,
    gap 70ms linear,
    border-color 220ms ease !important;
}

body.transactions-mode .transactions-segmented button {
  width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  transition:
    opacity 90ms linear,
    color 220ms ease,
    font-size 90ms linear,
    transform 220ms cubic-bezier(.22,.8,.24,1) !important;
}

body.transactions-mode .transactions-segmented button.active {
  font-size: var(--tx-active-size, 13px) !important;
}

body.transactions-mode .transactions-segmented button:not(.active) {
  opacity: var(--tx-inactive-opacity, 1) !important;
}

body.transactions-mode .transactions-segmented button::after {
  left: var(--tx-underline-inset, 16%) !important;
  right: var(--tx-underline-inset, 16%) !important;
  transition:
    left 90ms linear,
    right 90ms linear,
    background-color 180ms ease !important;
}

body.transactions-mode #transactions-hub.is-maximized .transactions-segmented button:not(.active) {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.transactions-mode #transactions-hub.is-maximized .transactions-segmented button.active {
  font-weight: 790 !important;
}

/* Le sticky reste lisible en sombre et sous Windows 98. */
html[data-theme="dark"] body.transactions-mode #transactions-hub,
html[data-ui-theme="oled"] body.transactions-mode #transactions-hub {
  background: var(--paper) !important;
}

html[data-theme="dark"] body.transactions-mode #transactions-hub.is-sticking,
html[data-ui-theme="oled"] body.transactions-mode #transactions-hub.is-sticking {
  background: color-mix(in srgb, var(--paper) 88%, transparent) !important;
  box-shadow: 0 10px 22px rgba(0,0,0,.22) !important;
}

@media (prefers-reduced-motion: reduce) {
  body.transactions-mode #transactions-hub,
  body.transactions-mode .transactions-segmented,
  body.transactions-mode .transactions-segmented button,
  body.transactions-mode .transactions-segmented button::after {
    transition: none !important;
  }
}

/* ===== SOURCE: v1307-ui.css ===== */
/* v130.7 — Transactions : sticky aligné à la safe area haute sur iOS et macOS. */

html.is-ios body.transactions-mode #transactions-hub,
html.is-macos body.transactions-mode #transactions-hub {
  top: calc(var(--safe-top) + 4px) !important;
}

/* ===== SOURCE: v1308-ui.css ===== */
/* v130.8 — Transactions : sticky réellement attaché au viewport / safe area. */

/*
 * IMPORTANT : overflow-x:hidden sur un ancêtre peut créer un scroll container
 * et empêcher position:sticky de se référer au viewport, particulièrement sur
 * Safari iOS. clip coupe le débordement horizontal sans créer ce conteneur.
 */
body.transactions-mode,
body.transactions-mode .page {
  overflow-x: clip !important;
  overflow-y: visible !important;
}

html.is-ios body.transactions-mode #transactions-hub,
html.is-macos body.transactions-mode #transactions-hub,
body.transactions-mode #transactions-hub {
  position: sticky !important;
  top: var(--safe-top) !important;
  z-index: 90 !important;
}

/* Une fois collée, la barre couvre proprement la zone de contenu sous le système. */
body.transactions-mode #transactions-hub.is-sticking {
  margin-top: 0 !important;
}

/* ===== SOURCE: v1309-ui.css ===== */
/* v130.9 — Sticky Transactions strictement confiné à l'onglet Transactions. */

/* Les feuilles Profil/Réglages doivent toujours passer devant et ne jamais être
   traversées/interceptées par le hub sticky des Transactions. */
body.utility-sheet-open #transactions-hub,
body.utility-sheet-open #fixed-section,
body.utility-sheet-open #variable-section,
body:not([data-active-nav="transactions"]) #transactions-hub {
  display: none !important;
  pointer-events: none !important;
}

/* Une fois revenu dans Transactions, l'affichage normal piloté par app.js/transaction-hub.js reprend. */
body[data-active-nav="transactions"].transactions-mode:not(.utility-sheet-open) #transactions-hub {
  pointer-events: auto !important;
}

/* ===== SOURCE: v131-ui.css ===== */
/* v131 — multi-budgets : sélecteur plat, personnel + partagés. */

#profile-household-details .budget-space-list {
  width: 100%;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ui-border, var(--line, #e7eaee));
}

#profile-household-details .budget-space-row {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid var(--ui-border, var(--line, #e7eaee));
  border-radius: 0;
  background: transparent;
  color: var(--text, #111827);
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: none;
}

#profile-household-details .budget-space-row:disabled {
  opacity: 1;
  cursor: default;
}

#profile-household-details .budget-space-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

#profile-household-details .budget-space-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 740;
  letter-spacing: -.12px;
}

#profile-household-details .budget-space-copy small {
  color: var(--muted, #737b89);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 560;
}

#profile-household-details .budget-space-row.active .budget-space-copy strong,
#profile-household-details .budget-space-row.active .budget-space-end {
  color: var(--accent, #087f69);
}

#profile-household-details .budget-space-end {
  flex: 0 0 auto;
  color: var(--muted, #9aa1ad);
  font-size: 18px;
  font-weight: 700;
}

#profile-household-details .budget-create-shared {
  margin: 10px 0 4px;
  padding-left: 2px !important;
}

#profile-household-details .budget-active-label {
  margin-top: 24px;
}

#profile-household-details .household-summary {
  margin-top: 0 !important;
}

html[data-theme="dark"] #profile-household-details .budget-space-row {
  color: var(--text, #f4f5f7);
}

@media (hover:hover) and (pointer:fine) {
  #profile-household-details .budget-space-row:not(:disabled):hover {
    background: color-mix(in srgb, var(--soft, #f5f7f6) 72%, transparent);
  }
}

/* ===== SOURCE: v132-ui.css ===== */
/* v132 — code de partage permanent + demandes d'accès. */

#profile-household-details .household-share-code-panel,
#profile-household-details .household-request-section {
  margin: 18px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#profile-household-details .household-share-code-panel[hidden],
#profile-household-details .household-request-section[hidden] {
  display: none !important;
}

#profile-household-details .household-share-code-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

#profile-household-details .household-share-code-head > div {
  min-width: 0;
}

#profile-household-details .household-share-label {
  margin: 0 0 4px !important;
}

#profile-household-details .household-share-code-head small,
#profile-household-details .household-join-panel > small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

#profile-household-details .household-share-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
}

#profile-household-details .household-share-code {
  min-width: 0;
  color: var(--text);
  font-size: clamp(20px, 5vw, 27px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
  transition: filter .2s ease, opacity .2s ease;
}

#profile-household-details .household-share-code.is-masked {
  filter: blur(6px);
  opacity: .72;
  user-select: none;
  -webkit-user-select: none;
}

#profile-household-details .household-request-list {
  border-top: 1px solid var(--line);
}

#profile-household-details .household-request-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

#profile-household-details .household-request-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

#profile-household-details .household-request-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profile-household-details .household-request-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profile-household-details .household-request-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

#profile-household-details .household-request-access,
#profile-household-details .household-request-reject,
#profile-household-details .household-request-accept {
  min-height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font: inherit;
  font-size: 10.5px;
  font-weight: 720;
}

#profile-household-details .household-request-access {
  max-width: 142px;
  padding: 0 5px;
  color: var(--text);
}

#profile-household-details .household-request-reject {
  padding: 0 6px;
  color: #B5443C;
}

#profile-household-details .household-request-accept {
  padding: 0 6px;
  color: var(--accent-user, #087F68);
}

#profile-household-details .household-join-panel {
  margin-top: 14px !important;
}

#profile-household-details .household-join-panel > small {
  margin: -2px 0 10px;
}

@media (max-width: 520px) {
  #profile-household-details .household-share-code-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 5px;
  }

  #profile-household-details .household-share-code {
    font-size: 20px;
    letter-spacing: .08em;
  }

  #profile-household-details .household-request-row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 11px 0;
  }

  #profile-household-details .household-request-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  #profile-household-details .household-request-access {
    flex: 1 1 150px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #profile-household-details .household-share-code { transition: none; }
}

/* ===== SOURCE: v1321-ui.css ===== */
/* v132.1 — les onglets Transactions ne doivent jamais traverser une sheet/modale. */

body.transactions-overlay-open #transactions-hub,
body:has(.sheet-backdrop.open) #transactions-hub,
body:has(.sheet-backdrop[aria-hidden="false"]) #transactions-hub {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Sécurité de pile : toutes les sheets actives restent au-dessus du contenu principal. */
.sheet-backdrop.open,
.sheet-backdrop[aria-hidden="false"] {
  isolation: isolate;
}

/* ===== SOURCE: v1322-ui.css ===== */
/* v132.2 — Accueil : résumé secondaire plus lisible et beaucoup plus épuré. */

#v110-home .v110-home-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  margin-top: 14px !important;
  border-top: 1px solid var(--ui-border, #E7EAEE) !important;
}

#v110-home .v110-home-tile {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  width: 100% !important;
  min-height: 58px !important;
  padding: 14px 2px !important;
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left !important;
}

#v110-home .v110-home-tile:last-child {
  border-bottom: 0 !important;
}

#v110-home .v110-home-tile span {
  display: block !important;
  min-width: 0 !important;
  color: var(--muted) !important;
  font-size: 12.5px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
  letter-spacing: -0.08px !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

#v110-home .v110-home-tile strong {
  min-width: 0 !important;
  color: var(--ink) !important;
  font-size: clamp(19px, 5.2vw, 24px) !important;
  line-height: 1.1 !important;
  font-weight: 800 !important;
  letter-spacing: -0.4px !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums !important;
}

#v110-home .v110-home-tile strong.is-negative {
  color: #B0443B !important;
}

@media (min-width: 900px) {
  #v110-home .v110-home-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-top: 0 !important;
    border-top: 0 !important;
  }

  #v110-home .v110-home-tile {
    grid-template-columns: 1fr !important;
    align-content: start !important;
    gap: 8px !important;
    min-height: 96px !important;
    padding: 16px 14px !important;
    border: 1px solid var(--ui-border, #E7EAEE) !important;
    border-radius: 18px !important;
    background: var(--paper, #fff) !important;
  }

  #v110-home .v110-home-tile span {
    font-size: 12px !important;
  }

  #v110-home .v110-home-tile strong {
    font-size: clamp(22px, 2vw, 30px) !important;
  }
}

/* ===== SOURCE: v133-ui.css ===== */
/* v133 — toast compact + dettes/créances + investissements/projections. */

/* La notification d'annulation devient une petite bannière claire et discrète. */
.v112-undo-toast {
  bottom: calc(var(--safe-bottom) + 82px) !important;
  width: min(calc(100vw - 34px), 390px) !important;
  min-height: 46px !important;
  padding: 8px 9px 8px 13px !important;
  gap: 10px !important;
  border: 1px solid rgba(8,127,104,.48) !important;
  border-radius: 13px !important;
  background: rgba(255,255,255,.98) !important;
  color: var(--ink, #18202B) !important;
  box-shadow: 0 8px 24px rgba(23,34,42,.10) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  backdrop-filter: blur(14px) !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
}
.v112-undo-toast button {
  min-height: 32px !important;
  padding: 5px 9px !important;
  border: 1px solid rgba(8,127,104,.22) !important;
  border-radius: 9px !important;
  background: rgba(8,127,104,.055) !important;
  color: var(--ca-accent, #087F68) !important;
  font-size: 11px !important;
  font-weight: 760 !important;
}

.v133-summary-strip {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin: 2px 0 18px;
  border-top:1px solid var(--ui-border,var(--line));
  border-bottom:1px solid var(--ui-border,var(--line));
}
.v133-summary-metric { min-width:0; padding:12px 10px; }
.v133-summary-metric + .v133-summary-metric { border-left:1px solid var(--ui-border,var(--line)); }
.v133-summary-metric span { display:block; color:var(--muted); font-size:10px; font-weight:700; line-height:1.25; }
.v133-summary-metric strong { display:block; margin-top:4px; font-size:17px; line-height:1.1; letter-spacing:-.35px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.v133-flat-section { margin: 0 0 22px; }
.v133-section-title { margin:0 0 5px; font-size:14px; font-weight:800; color:var(--ink); }
.v133-section-copy { margin:0 0 12px; color:var(--muted); font-size:11px; line-height:1.45; }
.v133-disclaimer { margin:10px 0 0; color:var(--muted); font-size:9.8px; line-height:1.45; }

.v133-flat-form { display:grid; gap:0; border-top:1px solid var(--ui-border,var(--line)); }
.v133-flat-form .field,
.v133-inline-grid .field {
  display:grid;
  gap:5px;
  min-width:0;
  padding:11px 2px;
  border-bottom:1px solid var(--ui-border,var(--line));
}
.v133-flat-form .field > span,
.v133-inline-grid .field > span { color:var(--muted); font-size:10px; font-weight:700; }
.v133-flat-form input,.v133-flat-form select,.v133-flat-form textarea,
.v133-inline-grid input,.v133-inline-grid select {
  width:100%; min-width:0; padding:4px 0 6px !important; border:0 !important; border-radius:0 !important;
  background:transparent !important; box-shadow:none !important; font:inherit; font-size:14px !important; color:var(--ink) !important;
}
.v133-flat-form textarea { resize:vertical; min-height:56px; }
.v133-inline-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 14px; }
.v133-form-action { justify-self:start; margin-top:12px; min-height:36px; padding:0 12px; border:1px solid rgba(8,127,104,.24); border-radius:10px; background:rgba(8,127,104,.06); color:var(--ca-accent); font:inherit; font-size:12px; font-weight:780; }

.v133-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 8px; }
.v133-toolbar select { min-height:34px; padding:0 28px 0 8px; border:1px solid var(--ui-border,var(--line)); border-radius:9px; background:transparent; color:var(--ink); font:inherit; font-size:11px; }

.v133-list { border-top:1px solid var(--ui-border,var(--line)); }
.v133-empty { padding:18px 2px; color:var(--muted); font-size:11px; }
.v133-debt-row,.v133-movement-row { padding:14px 2px; border-bottom:1px solid var(--ui-border,var(--line)); }
.v133-debt-head,.v133-movement-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.v133-debt-title,.v133-movement-title { min-width:0; font-size:13.5px; font-weight:790; line-height:1.3; }
.v133-debt-amount,.v133-movement-amount { flex:0 0 auto; font-size:14px; font-weight:820; white-space:nowrap; }
.v133-debt-meta,.v133-movement-meta { margin-top:4px; color:var(--muted); font-size:10.5px; line-height:1.4; }
.v133-debt-reason { margin-top:7px; font-size:11.5px; line-height:1.4; }
.v133-debt-note { margin-top:3px; color:var(--muted); font-size:10.5px; line-height:1.4; }
.v133-debt-status { display:inline-block; margin-top:7px; padding:3px 6px; border-radius:999px; background:rgba(8,127,104,.07); color:var(--ca-accent); font-size:9px; font-weight:760; }
.v133-debt-status.is-overdue { background:rgba(176,68,59,.07); color:#B0443B; }
.v133-row-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.v133-row-actions button { min-height:30px; padding:0 8px; border:0; border-radius:8px; background:rgba(8,127,104,.055); color:var(--ca-accent); font:inherit; font-size:10px; font-weight:740; }
.v133-row-actions button.danger { background:rgba(176,68,59,.055); color:#B0443B; }
.v133-repayment-history { margin-top:9px; padding-top:8px; border-top:1px dashed var(--ui-border,var(--line)); display:grid; gap:5px; }
.v133-repayment-line { display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:10px; }
.v133-repay-form { margin-top:9px; padding-top:8px; border-top:1px solid var(--ui-border,var(--line)); display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.v133-repay-form[hidden] { display:none !important; }
.v133-repay-form input { min-width:0; padding:7px 8px; border:1px solid var(--ui-border,var(--line)); border-radius:8px; background:transparent; color:var(--ink); font:inherit; font-size:11px; }
.v133-repay-form button { grid-column:1/-1; justify-self:start; min-height:30px; padding:0 9px; border:0; border-radius:8px; background:rgba(8,127,104,.07); color:var(--ca-accent); font:inherit; font-size:10px; font-weight:760; }

.v133-projection-hero { padding:15px 2px; border-top:1px solid var(--ui-border,var(--line)); border-bottom:1px solid var(--ui-border,var(--line)); }
.v133-projection-hero small { display:block; color:var(--muted); font-size:10px; }
.v133-projection-hero strong { display:block; margin-top:4px; font-size:26px; line-height:1; letter-spacing:-.7px; }
.v133-projection-copy { margin-top:7px; color:var(--muted); font-size:10.5px; line-height:1.45; }
.v133-allocation-line { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:12px; }
.v133-allocation-item { padding:10px 0; border-top:1px solid var(--ui-border,var(--line)); }
.v133-allocation-item span { display:block; color:var(--muted); font-size:9.5px; }
.v133-allocation-item strong { display:block; margin-top:4px; font-size:15px; }

.v133-projection-list { border-top:1px solid var(--ui-border,var(--line)); }
.v133-projection-row { display:grid; grid-template-columns:minmax(70px,.8fr) 1fr 1fr; gap:8px; align-items:center; padding:8px 2px; border-bottom:1px solid var(--ui-border,var(--line)); font-size:10.5px; }
.v133-projection-row strong { font-size:11px; }
.v133-projection-row span { text-align:right; white-space:nowrap; }

.v133-account-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:12px; }
.v133-account { padding:12px 2px; border-top:1px solid var(--ui-border,var(--line)); border-bottom:1px solid var(--ui-border,var(--line)); }
.v133-account span { display:block; color:var(--muted); font-size:10px; }
.v133-account strong { display:block; margin-top:5px; font-size:19px; }

.v133-sim-result { margin-top:12px; padding:12px 2px; border-top:1px solid var(--ui-border,var(--line)); border-bottom:1px solid var(--ui-border,var(--line)); display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.v133-sim-result span { display:block; color:var(--muted); font-size:9px; }
.v133-sim-result strong { display:block; margin-top:4px; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.v133-finance-message { margin-top:10px; color:var(--muted); font-size:10.5px; line-height:1.4; }
.v133-finance-message.error { color:#B0443B; }
.v133-finance-message.success { color:var(--ca-accent); }

@media (max-width:390px) {
  .v133-summary-metric { padding-left:6px; padding-right:6px; }
  .v133-summary-metric strong { font-size:15px; }
  .v133-inline-grid { grid-template-columns:1fr; gap:0; }
  .v133-projection-row { grid-template-columns:minmax(70px,.8fr) 1fr 1fr; font-size:9.8px; }
  .v133-sim-result strong { font-size:11.5px; }
}

@media (min-width:900px) {
  .v133-flat-section { max-width:none; }
  .v133-inline-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .v133-debt-row,.v133-movement-row { padding-top:12px; padding-bottom:12px; }
  .v133-projection-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:26px; border-top:0; }
  .v133-projection-row { border-top:1px solid var(--ui-border,var(--line)); }
}

/* ===== SOURCE: v1331-ui.css ===== */
/* v133.1 — corrections UI : toast, résumés, alertes et ligne inutile. */

/* 1) Toast undo plus compact et clair */
.v112-undo-toast {
  left: 16px !important;
  right: 16px !important;
  bottom: calc(78px + var(--safe-bottom, 0px)) !important;
  min-height: 54px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(15, 136, 110, .28) !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.98) !important;
  color: var(--ink, #172231) !important;
  box-shadow: 0 10px 22px rgba(24,36,44,.08) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}
.v112-undo-toast #v112-undo-text { font-size: 14px !important; line-height: 1.3 !important; }
.v112-undo-toast #v112-undo-button {
  min-width: 88px !important;
  min-height: 40px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(15, 136, 110, .28) !important;
  border-radius: 14px !important;
  background: #fff !important;
  color: #0f886e !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

/* 2) En-tête : icône alertes dédiée */
.alert-open { position: relative; }
.alert-open svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.alert-panel .notification-dot { background: #0f886e !important; }
.alert-row strong { color: var(--ink, #172231); }
.alert-row small { color: var(--muted); }

/* 3) Résumé Transactions : plus lisible */
body.transactions-mode .expense-tabs.mode-overview {
  gap: 10px !important;
}
body.transactions-mode .expense-tabs.mode-overview .expense-tab-note {
  display: none !important;
}
@media (max-width: 720px) {
  body.transactions-mode .expense-tabs.mode-overview {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 0 !important;
    border-top: 1px solid var(--line) !important;
    border-bottom: 1px solid var(--line) !important;
    background: transparent !important;
  }
  body.transactions-mode .expense-tabs.mode-overview .expense-tab {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 14px !important;
    min-height: 58px !important;
    padding: 14px 4px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body.transactions-mode .expense-tabs.mode-overview .expense-tab + .expense-tab {
    border-top: 1px solid var(--line) !important;
  }
  body.transactions-mode .expense-tabs.mode-overview .expense-tab-label {
    white-space: normal !important;
    text-align: left !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--muted) !important;
    line-height: 1.3 !important;
  }
  body.transactions-mode .expense-tabs.mode-overview .expense-tab-value {
    white-space: nowrap !important;
    text-align: right !important;
    font-size: clamp(20px, 5.6vw, 26px) !important;
    font-weight: 800 !important;
    letter-spacing: -.45px !important;
    color: var(--ink) !important;
  }
}

/* 4) Transactions : supprime la ligne grise en trop entre onglets et actions */
body.transactions-mode #variable-section,
body.transactions-mode #fixed-section {
  padding-top: 8px !important;
}
body.transactions-mode #variable-section .section-head.section-head-actions-only,
body.transactions-mode .transaction-panel-head.transaction-panel-head-actions-only {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: 0 !important;
  box-shadow: none !important;
}
body.transactions-mode #variable-section .transaction-global-actions::before,
body.transactions-mode #variable-section .transaction-global-actions::after,
body.transactions-mode #fixed-section .transaction-panel-head::before,
body.transactions-mode #fixed-section .transaction-panel-head::after {
  content: none !important;
  display: none !important;
}

/* 5) Badge alignement */
#alert-badge { right: -3px; top: -3px; }

/* ===== SOURCE: v134-ui.css ===== */
/* v134 — Investissements inspiré d'une navigation de portefeuille : synthèse, mouvements, projection, simulateur. */

#settings-section-13 .section-page-content.v134-invest-content {
  display: block;
  padding-top: 4px;
}

.v134-invest-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.v134-invest-tabs::-webkit-scrollbar { display:none; }
.v134-invest-tabs button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 15px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}
.v134-invest-tabs button.active {
  background: rgba(15,136,110,.10);
  color: #0f886e;
  font-weight: 780;
}

.v134-invest-view[hidden], .v134-sim-panel[hidden] { display:none !important; }
.v134-invest-view { animation: v134Fade .18s ease; }
@keyframes v134Fade { from { opacity:.55; transform:translateY(2px); } to { opacity:1; transform:none; } }

.v134-total-hero {
  padding: 24px 2px 18px;
}
.v134-total-hero strong {
  display:block;
  font-size: clamp(34px, 10vw, 48px);
  line-height:1;
  letter-spacing:-1.4px;
  font-weight:830;
  color:var(--ink);
}
.v134-total-hero span {
  display:block;
  margin-top:8px;
  font-size:14px;
  font-weight:720;
  color:var(--ink);
}

.v134-account-track {
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(84%, 1fr);
  gap:12px;
  overflow-x:auto;
  padding:2px 2px 12px;
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.v134-account-track::-webkit-scrollbar { display:none; }
.v134-account-card {
  scroll-snap-align:start;
  min-height:270px;
  padding:24px 20px 20px;
  border:1px solid var(--ui-border,var(--line));
  border-radius:28px;
  background:var(--paper);
  box-shadow:0 10px 30px rgba(33,47,58,.04);
}
.v134-account-card.pea { border-color:rgba(15,136,110,.75); }
.v134-account-kicker {
  text-align:center;
  font-size:13px;
  line-height:1.2;
  letter-spacing:.02em;
  font-weight:760;
  color:#0f886e;
}
.v134-account-total {
  display:block;
  margin:24px 0 26px;
  text-align:center;
  font-size:clamp(28px,8vw,38px);
  line-height:1;
  letter-spacing:-.9px;
  color:#0f886e;
}
.v134-account-stats {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px 16px;
  padding-top:20px;
  border-top:1px solid var(--ui-border,var(--line));
}
.v134-account-stats > div:last-child:nth-child(odd) { grid-column:1/-1; }
.v134-account-stats span {
  display:block;
  font-size:11px;
  color:var(--muted);
  line-height:1.25;
}
.v134-account-stats strong {
  display:block;
  margin-top:5px;
  font-size:15px;
  color:var(--ink);
  white-space:nowrap;
}

.v134-allocation-summary {
  display:grid;
  grid-template-columns:1fr;
  margin-top:16px;
  border-top:1px solid var(--ui-border,var(--line));
}
.v134-allocation-summary > div {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:13px 2px;
  border-bottom:1px solid var(--ui-border,var(--line));
}
.v134-allocation-summary span { font-size:12px; color:var(--muted); }
.v134-allocation-summary strong { font-size:14px; white-space:nowrap; }
.v134-source-note { padding:12px 2px 4px; color:var(--muted); font-size:11px; line-height:1.45; }

.v134-config-details { margin-top:12px; border-top:1px solid var(--ui-border,var(--line)); }
.v134-config-details summary {
  padding:15px 2px;
  cursor:pointer;
  list-style:none;
  font-size:13px;
  font-weight:740;
  color:#0f886e;
}
.v134-config-details summary::-webkit-details-marker { display:none; }
.v134-config-details summary::after { content:'›'; float:right; color:var(--muted); transition:transform .18s ease; }
.v134-config-details[open] summary::after { transform:rotate(90deg); }
.v134-config-form { padding:0 0 14px; }
.v134-form-grid { display:grid; grid-template-columns:1fr; gap:0; border-top:1px solid var(--ui-border,var(--line)); }
.v134-form-grid label, .v134-full-field, .v134-sim-form label {
  display:grid;
  gap:5px;
  padding:12px 2px;
  border-bottom:1px solid var(--ui-border,var(--line));
  font-size:11px;
  color:var(--muted);
  font-weight:700;
}
.v134-form-grid input, .v134-form-grid select, .v134-full-field input, .v134-sim-form input {
  width:100%;
  min-height:38px;
  padding:0;
  border:0;
  border-radius:0;
  outline:0;
  background:transparent;
  color:var(--ink);
  font:inherit;
  font-size:15px;
  font-weight:650;
}

.v134-view-title { margin:20px 0 4px; font-size:24px; font-weight:820; letter-spacing:-.5px; }
.v134-view-subtitle { color:var(--muted); font-size:12px; line-height:1.5; }
.v134-movement-actions {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin:20px 0 10px;
}
.v134-movement-actions button {
  min-height:54px;
  padding:0 12px;
  border:0;
  border-radius:18px;
  background:var(--soft);
  color:var(--ink);
  font:inherit;
  font-size:13px;
  font-weight:760;
}
.v134-movement-form { margin:8px 0 18px; border-top:1px solid var(--ui-border,var(--line)); }
.v134-form-actions { display:flex; justify-content:flex-end; gap:8px; padding-top:10px; }
.v134-form-actions button, .v134-config-form .v133-form-action {
  min-height:40px;
  padding:0 14px;
  border:1px solid rgba(15,136,110,.28);
  border-radius:13px;
  background:#fff;
  color:#0f886e;
  font:inherit;
  font-size:13px;
  font-weight:760;
}
.v134-form-actions button[type="submit"], .v134-config-form .v133-form-action { background:#0f886e; color:#fff; border-color:#0f886e; }
.v134-history-head { display:flex; justify-content:space-between; align-items:center; margin:24px 0 4px; }
.v134-history-head strong { font-size:18px; }
.v134-history-head select { min-height:34px; border:0; background:transparent; color:#0f886e; font:inherit; font-size:12px; font-weight:720; }
.v134-movement-list { border-top:1px solid var(--ui-border,var(--line)); }
.v134-history-row { padding:14px 2px !important; border-bottom:1px solid var(--ui-border,var(--line)) !important; background:transparent !important; border-radius:0 !important; box-shadow:none !important; }

.v134-projection-hero { padding:24px 2px 18px; border-bottom:1px solid var(--ui-border,var(--line)); }
.v134-projection-hero span { display:block; color:var(--muted); font-size:12px; font-weight:700; }
.v134-projection-hero strong { display:block; margin-top:7px; font-size:clamp(32px,9vw,44px); line-height:1; letter-spacing:-1.1px; }
.v134-projection-metrics, .v134-projection-allocation {
  display:grid;
  grid-template-columns:1fr;
}
.v134-projection-metrics > div, .v134-projection-allocation > div {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:12px 2px;
  border-bottom:1px solid var(--ui-border,var(--line));
}
.v134-projection-metrics span, .v134-projection-allocation span { color:var(--muted); font-size:11px; }
.v134-projection-metrics strong, .v134-projection-allocation strong { font-size:14px; }
.v134-projection-allocation { margin-top:14px; }
.v134-projection-table-head { display:flex; justify-content:space-between; margin-top:22px; padding:0 2px 8px; color:var(--muted); font-size:10px; font-weight:740; }
.v134-projection-list { border-top:1px solid var(--ui-border,var(--line)) !important; }
.v134-projection-row {
  display:grid !important;
  grid-template-columns:minmax(75px,.8fr) 1.6fr !important;
  gap:14px !important;
  align-items:center !important;
  padding:11px 2px !important;
  border-bottom:1px solid var(--ui-border,var(--line)) !important;
}
.v134-projection-row > div { text-align:right; }
.v134-projection-row > div > span { display:block; font-size:13px; font-weight:760; color:var(--ink); }
.v134-projection-row > div > small { display:block; margin-top:3px; font-size:9.5px; color:var(--muted); white-space:normal; }

.v134-simulator-switch {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  padding:3px;
  margin:8px 0 12px;
  border-radius:16px;
  background:var(--soft);
}
.v134-simulator-switch button {
  min-height:42px;
  border:0;
  border-radius:13px;
  background:transparent;
  color:var(--muted);
  font:inherit;
  font-size:13px;
  font-weight:720;
}
.v134-simulator-switch button.active { background:var(--paper); color:#0f886e; box-shadow:0 1px 5px rgba(25,40,50,.06); }
.v134-sim-form { margin-top:16px; border-top:1px solid var(--ui-border,var(--line)); }
.v134-sim-result {
  display:grid;
  grid-template-columns:1fr;
  margin-top:16px;
  border-top:1px solid var(--ui-border,var(--line));
}
.v134-sim-result > div {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:13px 2px;
  border-bottom:1px solid var(--ui-border,var(--line));
}
.v134-sim-result span { color:var(--muted); font-size:11px; }
.v134-sim-result strong { font-size:17px; white-space:nowrap; }

@media (min-width: 800px) {
  .v134-invest-tabs { justify-content:center; }
  .v134-account-track { grid-auto-flow:initial; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; }
  .v134-account-card { min-height:250px; }
  .v134-allocation-summary { grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:24px; }
  .v134-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:28px; }
  .v134-projection-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; border-bottom:1px solid var(--ui-border,var(--line)); }
  .v134-projection-metrics > div { display:block; border-bottom:0; border-right:1px solid var(--ui-border,var(--line)); padding:14px 16px; }
  .v134-projection-metrics > div:first-child { padding-left:2px; }
  .v134-projection-metrics > div:last-child { border-right:0; }
  .v134-projection-metrics strong { display:block; margin-top:5px; font-size:17px; }
  .v134-projection-allocation { grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:24px; }
  .v134-sim-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:28px; }
  .v134-sim-result { grid-template-columns:repeat(3,minmax(0,1fr)); border-bottom:1px solid var(--ui-border,var(--line)); }
  .v134-sim-result > div { display:block; border-bottom:0; border-right:1px solid var(--ui-border,var(--line)); padding:14px 16px; }
  .v134-sim-result > div:first-child { padding-left:2px; }
  .v134-sim-result > div:last-child { border-right:0; }
  .v134-sim-result strong { display:block; margin-top:5px; font-size:18px; }
}
.v134-invest-hint { margin-top:10px; padding:12px 14px; border-radius:16px; background:rgba(15,136,110,.07); color:var(--ink); font-size:11px; line-height:1.45; }
html[data-theme="dark"] .v134-form-actions button, html[data-theme="dark"] .v134-config-form .v133-form-action { background:var(--paper) !important; }
html[data-theme="dark"] .v134-form-actions button[type="submit"], html[data-theme="dark"] .v134-config-form .v133-form-action { background:#0f886e !important; }

/* ===== SOURCE: v1341-ui.css ===== */
/* v134.1 — iOS : autoriser le swipe horizontal dans Investissements sans casser le scroll vertical. */

html.is-ios #month-settings-sheet .sheet-scroll-content #settings-section-13 .v134-invest-tabs,
html.is-ios #month-settings-sheet .sheet-scroll-content #settings-section-13 .v134-invest-tabs *,
html.is-ios #month-settings-sheet .sheet-scroll-content #settings-section-13 .v134-account-track,
html.is-ios #month-settings-sheet .sheet-scroll-content #settings-section-13 .v134-account-track * {
  touch-action: pan-x pan-y !important;
}

html.is-ios #settings-section-13 .v134-invest-tabs,
html.is-ios #settings-section-13 .v134-account-track {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-x: contain !important;
}

html.is-ios #settings-section-13 .v134-account-track {
  scroll-snap-type: x mandatory !important;
  scroll-padding-inline: 2px !important;
}

html.is-ios #settings-section-13 .v134-account-card {
  scroll-snap-align: start !important;
  scroll-snap-stop: always !important;
}

/* Laisse volontairement dépasser un bout de la carte suivante : indice visuel qu'on peut swiper. */
@media (max-width: 767px) {
  #settings-section-13 .v134-account-track {
    grid-auto-columns: minmax(86%, 86%) !important;
  }
}

/* ===== SOURCE: v1344-ui.css ===== */
/* v134.4 — résumé Transactions entièrement plat : aucune cellule/carte. */
body.transactions-mode .expense-tabs.mode-overview {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  width: 100% !important;
  margin: 8px 0 18px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.transactions-mode .expense-tabs.mode-overview .expense-tab {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  width: 100% !important;
  min-height: 56px !important;
  margin: 0 !important;
  padding: 13px 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.transactions-mode .expense-tabs.mode-overview .expense-tab + .expense-tab {
  border-top: 1px solid var(--ui-border, var(--line, #E7EAEE)) !important;
}

body.transactions-mode .expense-tabs.mode-overview .expense-tab.active {
  background: transparent !important;
  box-shadow: none !important;
}

body.transactions-mode .expense-tabs.mode-overview .expense-tab-label {
  min-width: 0 !important;
  color: var(--muted) !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  text-align: left !important;
  white-space: normal !important;
}

body.transactions-mode .expense-tabs.mode-overview .expense-tab-value {
  color: var(--ink) !important;
  font-size: clamp(21px, 5.5vw, 28px) !important;
  line-height: 1.05 !important;
  font-weight: 820 !important;
  letter-spacing: -.55px !important;
  text-align: right !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums !important;
}

body.transactions-mode .expense-tabs.mode-overview .expense-tab-note {
  display: none !important;
}

@media (min-width: 900px) {
  body.transactions-mode .expense-tabs.mode-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    column-gap: 28px !important;
    margin-top: 10px !important;
    margin-bottom: 22px !important;
  }
  body.transactions-mode .expense-tabs.mode-overview .expense-tab {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    padding: 10px 0 12px !important;
  }
  body.transactions-mode .expense-tabs.mode-overview .expense-tab + .expense-tab {
    border-top: 0 !important;
  }
  body.transactions-mode .expense-tabs.mode-overview .expense-tab-label,
  body.transactions-mode .expense-tabs.mode-overview .expense-tab-value {
    text-align: left !important;
  }
  body.transactions-mode .expense-tabs.mode-overview .expense-tab-value {
    font-size: clamp(24px, 2.2vw, 34px) !important;
  }
}

/* ===== SOURCE: v135-rental.css ===== */
/* v135 — Gestion locative : interface plate, dense et lisible. */
#settings-section-14 .section-page-content { padding-top: 2px; }
.v135-tabs { display:flex; gap:4px; overflow-x:auto; padding:2px 0 14px; scrollbar-width:none; -webkit-overflow-scrolling:touch; touch-action:pan-x pan-y !important; }
.v135-tabs::-webkit-scrollbar{display:none}.v135-tabs button{flex:0 0 auto;min-height:40px;padding:0 13px;border:0;border-radius:12px;background:transparent;color:var(--ink);font:inherit;font-size:13px;font-weight:650}.v135-tabs button.active{background:rgba(15,136,110,.10);color:#0f886e;font-weight:780}
.v135-view[hidden],.v135-inline-form[hidden]{display:none!important}.v135-view{animation:v135fade .16s ease}@keyframes v135fade{from{opacity:.6;transform:translateY(2px)}to{opacity:1;transform:none}}
.v135-hero{padding:20px 2px 16px;border-bottom:1px solid var(--ui-border,var(--line))}.v135-hero strong{display:block;font-size:clamp(34px,10vw,48px);line-height:1;font-weight:830;letter-spacing:-1.2px}.v135-hero span{display:block;margin-top:7px;color:var(--muted);font-size:12px;font-weight:700}
.v135-metrics{display:grid;grid-template-columns:1fr;margin:0;border-bottom:1px solid var(--ui-border,var(--line))}.v135-metric{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 2px;border-top:1px solid var(--ui-border,var(--line))}.v135-metric span{color:var(--muted);font-size:12px}.v135-metric strong{font-size:14px;white-space:nowrap}.v135-metric strong.bad{color:#b0443b}.v135-metric strong.good{color:#0f886e}
.v135-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:22px 0 4px}.v135-section-head strong{font-size:18px}.v135-section-head button,.v135-link-button{min-height:34px;padding:0;border:0;background:transparent;color:#0f886e;font:inherit;font-size:12px;font-weight:760}
.v135-list{border-top:1px solid var(--ui-border,var(--line))}.v135-row{padding:13px 2px;border-bottom:1px solid var(--ui-border,var(--line));background:transparent}.v135-row-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:start}.v135-row-title{font-size:14px;font-weight:780;color:var(--ink);min-width:0}.v135-row-value{font-size:14px;font-weight:780;white-space:nowrap}.v135-row-sub{margin-top:4px;color:var(--muted);font-size:11px;line-height:1.45}.v135-row-meta{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:9px;color:var(--muted);font-size:10.5px}.v135-row-meta strong{color:var(--ink);font-size:11px}.v135-row-actions{display:flex;gap:12px;margin-top:10px}.v135-row-actions button{border:0;background:transparent;padding:0;color:#0f886e;font:inherit;font-size:11px;font-weight:750}.v135-row-actions button.danger{color:#b0443b}
.v135-status{display:inline-flex;align-items:center;min-height:24px;padding:0 8px;border-radius:999px;background:rgba(15,136,110,.08);color:#0f886e;font-size:10px;font-weight:760}.v135-status.bad{background:rgba(176,68,59,.08);color:#b0443b}.v135-status.warn{background:rgba(174,119,17,.09);color:#9b6810}
.v135-form{margin:10px 0 18px;border-top:1px solid var(--ui-border,var(--line))}.v135-form label{display:grid;gap:5px;padding:11px 2px;border-bottom:1px solid var(--ui-border,var(--line));color:var(--muted);font-size:10.5px;font-weight:700}.v135-form input,.v135-form select,.v135-form textarea{width:100%;min-height:38px;padding:0;border:0;border-radius:0;background:transparent;color:var(--ink);outline:0;font:inherit;font-size:14px;font-weight:630}.v135-form textarea{min-height:68px;padding-top:7px;resize:vertical}.v135-form-grid{display:grid;grid-template-columns:1fr}.v135-form-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:10px}.v135-form-actions button{min-height:40px;padding:0 14px;border:1px solid rgba(15,136,110,.28);border-radius:13px;background:#fff;color:#0f886e;font:inherit;font-size:12px;font-weight:760}.v135-form-actions button[type=submit]{background:#0f886e;color:#fff;border-color:#0f886e}
.v135-month-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0}.v135-month-tools input,.v135-month-tools select{min-height:38px;border:0;border-bottom:1px solid var(--ui-border,var(--line));background:transparent;color:var(--ink);font:inherit;font-size:13px}.v135-empty{padding:18px 2px;color:var(--muted);font-size:12px}.v135-message{min-height:18px;margin-top:8px;color:var(--muted);font-size:11px}.v135-message.error{color:#b0443b}.v135-message.success{color:#0f886e}
.v135-summary-property{padding:13px 2px;border-bottom:1px solid var(--ui-border,var(--line))}.v135-summary-property-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}.v135-summary-property-head strong{font-size:13px}.v135-summary-property-head span{font-size:13px;font-weight:780}.v135-summary-property small{display:block;margin-top:4px;color:var(--muted);font-size:10.5px}
@media(min-width:760px){.v135-form-grid{grid-template-columns:1fr 1fr}.v135-form-grid label:nth-child(odd){padding-right:14px}.v135-form-grid label:nth-child(even){padding-left:14px}.v135-metrics{grid-template-columns:1fr 1fr}.v135-metric:nth-child(odd){padding-right:18px}.v135-metric:nth-child(even){padding-left:18px;border-left:1px solid var(--ui-border,var(--line))}}

/* ===== SOURCE: v1354-ui.css ===== */
/* v135.4 — terminologie longue sans débordement. */
body.transactions-mode .transactions-segmented button {
  font-size: clamp(11.5px, 3.25vw, 13.5px) !important;
  letter-spacing: -0.18px !important;
  line-height: 1.18 !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
  text-overflow: clip !important;
}
body.transactions-mode .transactions-segmented button.active {
  font-size: clamp(12px, 3.4vw, 14px) !important;
}
body.transactions-mode .expense-tabs.mode-overview .expense-tab-label {
  font-size: clamp(11.5px, 3.1vw, 13px) !important;
}
@media (max-width: 370px) {
  body.transactions-mode .transactions-segmented button {
    font-size: 10.8px !important;
    letter-spacing: -0.28px !important;
  }
  body.transactions-mode .transactions-segmented button.active {
    font-size: 11.4px !important;
  }
}
@media (min-width: 760px) {
  body.transactions-mode .transactions-segmented button,
  body.transactions-mode .transactions-segmented button.active {
    font-size: 13px !important;
  }
}

/* ===== SOURCE: v136-selection.css ===== */
/* v136 — sélection multiple iOS/macOS */
.bulk-select-indicator{
  display:none;
  width:18px;height:18px;border-radius:50%;
  border:1.5px solid #B8BEC7;background:#fff;
  align-items:center;justify-content:center;
  flex:0 0 18px;
  position:absolute;left:12px;top:50%;transform:translateY(-50%);
  z-index:5;box-sizing:border-box;
  transition:background .16s ease,border-color .16s ease,transform .16s ease;
}
.bulk-select-indicator svg{width:11px;height:11px;fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;opacity:0;transform:scale(.7);transition:opacity .14s ease,transform .14s ease;}
body.bulk-selection-mode .bulk-selectable-row .bulk-select-indicator{display:flex;}
body.bulk-selection-mode .bulk-selectable-row .swipe-content{
  padding-left:50px !important;
  cursor:default !important;
  user-select:none !important;-webkit-user-select:none !important;
  transition:background-color .16s ease,padding .18s ease !important;
}
body.bulk-selection-mode .bulk-selectable-row.bulk-selected .swipe-content{
  background:#F0F1F3 !important;
}
body.bulk-selection-mode .bulk-selectable-row.bulk-selected .bulk-select-indicator{
  background:#0A84FF;border-color:#0A84FF;transform:translateY(-50%) scale(1.03);
}
body.bulk-selection-mode .bulk-selectable-row.bulk-selected .bulk-select-indicator svg{opacity:1;transform:scale(1);}
body.bulk-selection-mode .bulk-selectable-row .swipe-actions,
body.bulk-selection-mode .bulk-selectable-row .desktop-action-menu{opacity:0 !important;pointer-events:none !important;}
body.bulk-selection-mode .bulk-selectable-row.open .swipe-content{transform:none !important;border-radius:0 !important;}
body.bulk-selection-mode .bulk-selectable-row .swipe-content::after{left:50px !important;}

.bulk-selection-toolbar{
  position:fixed;
  left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));
  bottom:calc(76px + env(safe-area-inset-bottom));
  z-index:420;
  min-height:60px;
  padding:8px 10px;
  display:grid;grid-template-columns:auto minmax(0,1fr) 48px;align-items:center;gap:10px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(20,32,44,.10);
  border-radius:20px;
  box-shadow:0 14px 38px rgba(20,32,44,.15);
  -webkit-backdrop-filter:blur(22px) saturate(160%);backdrop-filter:blur(22px) saturate(160%);
  opacity:0;transform:translateY(18px) scale(.98);pointer-events:none;
  transition:opacity .18s ease,transform .22s cubic-bezier(.2,.8,.2,1);
}
.bulk-selection-toolbar.visible{opacity:1;transform:none;pointer-events:auto;}
.bulk-selection-cancel{border:0;background:transparent;color:#0F886E;font:inherit;font-size:13px;font-weight:720;padding:10px 8px;}
.bulk-selection-summary{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.15;}
.bulk-selection-summary strong{font-size:13px;color:var(--ink,#172231);white-space:nowrap;}
.bulk-selection-summary span{font-size:11px;color:var(--muted,#778099);margin-top:4px;font-variant-numeric:tabular-nums;}
.bulk-selection-delete{width:44px;height:44px;border:0;border-radius:14px;background:#FCECEA;color:#C33E35;display:flex;align-items:center;justify-content:center;}
.bulk-selection-delete:disabled{opacity:.35;}
.bulk-selection-delete svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}

.bulk-delete-panel{max-width:560px !important;padding:18px 20px calc(20px + env(safe-area-inset-bottom)) !important;}
.bulk-delete-title{font-size:24px;font-weight:800;letter-spacing:-.55px;color:var(--ink,#172231);margin:12px 0 8px;}
.bulk-delete-copy{font-size:14px;line-height:1.45;color:var(--muted,#778099);margin-bottom:18px;}
.bulk-delete-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.bulk-delete-actions button{min-height:50px;border-radius:16px;border:1px solid var(--line,#E4E7EB);background:#fff;color:var(--ink,#172231);font:inherit;font-weight:750;}
.bulk-delete-actions button.danger{background:#C43E35;border-color:#C43E35;color:#fff;}

@media (min-width:850px){
  .bulk-selection-toolbar{left:50%;right:auto;width:min(520px,calc(100vw - 48px));transform:translate(-50%,18px) scale(.98);bottom:22px;}
  .bulk-selection-toolbar.visible{transform:translate(-50%,0);}
}
@media (prefers-reduced-motion:reduce){.bulk-select-indicator,.bulk-select-indicator svg,.bulk-selection-toolbar,body.bulk-selection-mode .bulk-selectable-row .swipe-content{transition:none !important;}}

/* ===== SOURCE: v1361-selection.css ===== */
/* v136.1 — sélection multiple : indicateur compact dans une vraie colonne à gauche. */

/* Pastille nettement plus petite et collée à la marge gauche de la ligne. */
body.bulk-selection-mode .bulk-selectable-row .bulk-select-indicator {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  left: 3px !important;
  border-width: 1.4px !important;
}

body.bulk-selection-mode .bulk-selectable-row .bulk-select-indicator svg {
  width: 12px !important;
  height: 12px !important;
  stroke-width: 2.25 !important;
}

/* Les styles historiques de Transactions forçaient padding-left:2px.
   On réserve donc explicitement une colonne entière à la pastille. */
body.transactions-mode.bulk-selection-mode #fixed-section .bulk-selectable-row .swipe-content,
body.transactions-mode.bulk-selection-mode #variable-section .bulk-selectable-row .swipe-content,
body.transactions-mode.bulk-selection-mode .variable-category .category-list .bulk-selectable-row .swipe-content {
  padding-left: 34px !important;
}

/* Le séparateur commence après la colonne de sélection. */
body.transactions-mode.bulk-selection-mode #fixed-section .bulk-selectable-row .swipe-content::after,
body.transactions-mode.bulk-selection-mode #variable-section .bulk-selectable-row .swipe-content::after,
body.transactions-mode.bulk-selection-mode .variable-category .category-list .bulk-selectable-row .swipe-content::after {
  left: 34px !important;
}

/* État sélectionné : pas de grossissement de la pastille. */
body.bulk-selection-mode .bulk-selectable-row.bulk-selected .bulk-select-indicator {
  transform: translateY(-50%) scale(1) !important;
}

/* Un peu plus compact sur les petits iPhone. */
@media (max-width: 390px) {
  body.bulk-selection-mode .bulk-selectable-row .bulk-select-indicator {
    width: 17px !important;
    height: 17px !important;
    left: 2px !important;
  }

  body.bulk-selection-mode .bulk-selectable-row .bulk-select-indicator svg {
    width: 11px !important;
    height: 11px !important;
  }

  body.transactions-mode.bulk-selection-mode #fixed-section .bulk-selectable-row .swipe-content,
  body.transactions-mode.bulk-selection-mode #variable-section .bulk-selectable-row .swipe-content,
  body.transactions-mode.bulk-selection-mode .variable-category .category-list .bulk-selectable-row .swipe-content {
    padding-left: 31px !important;
  }

  body.transactions-mode.bulk-selection-mode #fixed-section .bulk-selectable-row .swipe-content::after,
  body.transactions-mode.bulk-selection-mode #variable-section .bulk-selectable-row .swipe-content::after,
  body.transactions-mode.bulk-selection-mode .variable-category .category-list .bulk-selectable-row .swipe-content::after {
    left: 31px !important;
  }
}

/* ===== SOURCE: v1363-undo.css ===== */
/* v136.3 — Undo toujours entièrement dans le viewport. */
.v112-undo-toast {
  left: max(12px, env(safe-area-inset-left)) !important;
  right: max(12px, env(safe-area-inset-right)) !important;
  width: auto !important;
  max-width: 420px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  transform: none !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.v112-undo-toast #v112-undo-text {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.v112-undo-toast #v112-undo-button {
  flex: 0 0 auto !important;
  margin-left: 8px !important;
}

@media (max-width: 390px) {
  .v112-undo-toast {
    left: max(10px, env(safe-area-inset-left)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    min-height: 48px !important;
    padding: 7px 8px 7px 11px !important;
    border-radius: 15px !important;
  }
  .v112-undo-toast #v112-undo-text {
    font-size: 12.5px !important;
  }
  .v112-undo-toast #v112-undo-button {
    min-width: 76px !important;
    min-height: 36px !important;
    padding: 0 11px !important;
    border-radius: 12px !important;
    font-size: 12.5px !important;
  }
}

/* ===== SOURCE: v1368-summary.css ===== */
/* v136.8 — résumé budget : distinction nette entre prévu et réel, sans cartes. */

body.transactions-mode .expense-tabs.mode-overview {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  width: 100% !important;
  margin: 8px 0 18px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.transactions-mode .expense-summary-group {
  display: grid !important;
  gap: 2px !important;
  padding: 12px 2px !important;
  border-bottom: 1px solid var(--ui-border, var(--line, #e7eaee)) !important;
}

body.transactions-mode .expense-summary-group:first-child {
  border-top: 1px solid var(--ui-border, var(--line, #e7eaee)) !important;
}

body.transactions-mode .expense-summary-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: baseline !important;
  column-gap: 12px !important;
  min-height: 28px !important;
}

body.transactions-mode .expense-summary-row .expense-tab-label {
  min-width: 0 !important;
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: clamp(11.2px, 3vw, 13px) !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  letter-spacing: -0.12px !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body.transactions-mode .expense-summary-row .expense-tab-value {
  margin: 0 !important;
  color: var(--ink) !important;
  font-size: clamp(17px, 4.8vw, 23px) !important;
  line-height: 1.08 !important;
  font-weight: 800 !important;
  letter-spacing: -0.4px !important;
  white-space: nowrap !important;
  text-align: right !important;
  font-variant-numeric: tabular-nums !important;
}

/* Le réel est volontairement plus présent visuellement que le prévu. */
body.transactions-mode .expense-summary-planned .expense-tab-label,
body.transactions-mode .expense-summary-planned .expense-tab-value {
  color: var(--muted) !important;
}

body.transactions-mode .expense-summary-planned .expense-tab-value {
  font-size: clamp(15px, 4.25vw, 20px) !important;
  font-weight: 740 !important;
}

body.transactions-mode .expense-summary-real .expense-tab-label {
  color: var(--ink) !important;
}

body.transactions-mode .expense-summary-real .expense-tab-value {
  color: var(--ink) !important;
}

body.transactions-mode .expense-summary-row .over {
  color: #b0443b !important;
}

/* Charges : une seule valeur, donc même importance que les valeurs réelles. */
body.transactions-mode .expense-summary-recurring .expense-tab-label {
  color: var(--ink) !important;
}
body.transactions-mode .expense-summary-recurring .expense-tab-value {
  font-size: clamp(17px, 4.8vw, 23px) !important;
}

@media (max-width: 370px) {
  body.transactions-mode .expense-summary-row {
    column-gap: 8px !important;
  }
  body.transactions-mode .expense-summary-row .expense-tab-label {
    font-size: 10.4px !important;
    letter-spacing: -0.2px !important;
  }
  body.transactions-mode .expense-summary-row .expense-tab-value {
    font-size: 17px !important;
  }
  body.transactions-mode .expense-summary-planned .expense-tab-value {
    font-size: 14.5px !important;
  }
}

@media (min-width: 900px) {
  body.transactions-mode .expense-tabs.mode-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    column-gap: 30px !important;
  }
  body.transactions-mode .expense-summary-group {
    border-top: 1px solid var(--ui-border, var(--line, #e7eaee)) !important;
    padding: 12px 0 !important;
  }
  body.transactions-mode .expense-summary-row .expense-tab-label {
    font-size: 12px !important;
  }
  body.transactions-mode .expense-summary-row .expense-tab-value {
    font-size: 22px !important;
  }
  body.transactions-mode .expense-summary-planned .expense-tab-value {
    font-size: 18px !important;
  }
}

/* ===== SOURCE: v1369-progress.css ===== */
/* v136.9 — objectif dépenses variables */
body.transactions-mode .expense-goal-progress {
  margin-top: 8px !important;
  display: grid !important;
  gap: 6px !important;
}
body.transactions-mode .expense-goal-bar {
  width: 100% !important;
  height: 8px !important;
  border-radius: 999px !important;
  background: #e8ecef !important;
  overflow: hidden !important;
}
body.transactions-mode .expense-goal-fill {
  display: block !important;
  height: 100% !important;
  width: 0% !important;
  border-radius: inherit !important;
  background: #1a8b6a !important;
  transition: width .25s ease !important;
}
body.transactions-mode .expense-goal-progress.is-danger .expense-goal-fill { background: #c55249 !important; }
body.transactions-mode .expense-goal-progress.is-warning .expense-goal-fill { background: #c58a2b !important; }
body.transactions-mode .expense-goal-progress.is-neutral .expense-goal-fill { background: #8fa0b8 !important; }
body.transactions-mode .expense-goal-meta {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto !important;
  column-gap: 12px !important;
  align-items: baseline !important;
}
body.transactions-mode .expense-goal-status {
  min-width: 0 !important;
  color: var(--ink) !important;
  font-size: clamp(12px, 3.2vw, 14px) !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
}
body.transactions-mode .expense-goal-progress.is-danger .expense-goal-status { color: #b0443b !important; }
body.transactions-mode .expense-goal-progress.is-warning .expense-goal-status { color: #9c6b20 !important; }
body.transactions-mode .expense-goal-progress.is-neutral .expense-goal-status { color: var(--muted) !important; }
body.transactions-mode .expense-goal-figure {
  color: var(--muted) !important;
  font-size: clamp(11px, 3vw, 13px) !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  text-align: right !important;
  font-variant-numeric: tabular-nums !important;
}
body.transactions-mode .expense-goal-detail {
  color: var(--muted) !important;
  font-size: clamp(11px, 2.9vw, 12.5px) !important;
  line-height: 1.35 !important;
}
@media (max-width: 370px) {
  body.transactions-mode .expense-goal-meta { column-gap: 8px !important; }
  body.transactions-mode .expense-goal-status { font-size: 11.4px !important; }
  body.transactions-mode .expense-goal-figure { font-size: 10.6px !important; }
  body.transactions-mode .expense-goal-detail { font-size: 10.6px !important; }
}

/* ===== SOURCE: v13610-alert.css ===== */

/* v136.10 — triangle Alertes sans effet cellule */
#alert-open,
.v110-header-actions #alert-open,
button#alert-open.v110-icon-button {
  width: auto !important;
  min-width: 32px !important;
  height: 40px !important;
  padding: 4px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#alert-open::before,
#alert-open::after {
  content: none !important;
  display: none !important;
}

#alert-open:active,
#alert-open:hover,
#alert-open:focus,
#alert-open:focus-visible {
  background: transparent !important;
  box-shadow: none !important;
}

#alert-open svg {
  display: block !important;
  width: 23px !important;
  height: 23px !important;
}

/* ===== SOURCE: v13611-alerts.css ===== */
/* v136.11 — alertes interactives et état lu. */

#alert-list .alert-row {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 100% !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line, #e7eaee) !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 13px 2px !important;
  text-align: left !important;
  cursor: pointer !important;
  color: inherit !important;
  font: inherit !important;
}

#alert-list .alert-row:active {
  background: rgba(15, 136, 110, .055) !important;
}

#alert-list .alert-row .notification-copy {
  min-width: 0 !important;
}

#alert-list .alert-row .notification-copy small {
  display: block !important;
  margin-top: 4px !important;
  color: var(--muted) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

#alert-list .alert-row .alert-read-state {
  flex: 0 0 auto !important;
  margin-left: 10px !important;
  color: #0f886e !important;
  font-size: 20px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
}

#alert-list .alert-row.is-read {
  opacity: .62 !important;
}

#alert-list .alert-row.is-read .notification-dot {
  background: transparent !important;
  border: 1.5px solid rgba(15, 136, 110, .5) !important;
}

#alert-list .alert-row.is-read .alert-read-state {
  font-size: 15px !important;
}

#alert-list .alert-row.unread .notification-copy strong {
  font-weight: 800 !important;
}

/* ===== SOURCE: v13612-tabs.css ===== */

/* v136.12 — montants collés aux onglets transactions + retrait du gros total récurrent en haut. */

body.transactions-mode .expense-tabs.mode-overview .expense-summary-recurring {
  display: none !important;
}

body.transactions-mode .transactions-segmented button {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  min-height: 48px !important;
  padding-top: 2px !important;
  padding-bottom: 8px !important;
  white-space: normal !important;
  overflow: visible !important;
}

body.transactions-mode .transactions-segmented .tx-tab-stack {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 2px !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

body.transactions-mode .transactions-segmented .tx-tab-title {
  display: block !important;
  min-width: 0 !important;
  line-height: 1.08 !important;
}

body.transactions-mode .transactions-segmented .tx-tab-amount {
  display: block !important;
  min-width: 0 !important;
  margin: 0 !important;
  font-size: clamp(10px, 2.7vw, 11.5px) !important;
  line-height: 1.04 !important;
  font-weight: 650 !important;
  letter-spacing: -0.12px !important;
  color: var(--muted) !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  overflow: hidden !important;
  opacity: .98 !important;
}

body.transactions-mode .transactions-segmented button.active .tx-tab-amount {
  color: color-mix(in srgb, var(--ink) 72%, var(--muted) 28%) !important;
}

@media (max-width: 370px) {
  body.transactions-mode .transactions-segmented button {
    min-height: 46px !important;
    padding-bottom: 7px !important;
  }
  body.transactions-mode .transactions-segmented .tx-tab-amount {
    font-size: 9.6px !important;
  }
}

/* ===== SOURCE: v13613-tabs.css ===== */
/* v136.13 — onglets transactions mieux centrés + section recollée sous l’onglet. */

body.transactions-mode .transactions-segmented button {
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

body.transactions-mode .transactions-segmented .tx-tab-stack {
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
}

body.transactions-mode .transactions-segmented .tx-tab-title,
body.transactions-mode .transactions-segmented .tx-tab-amount {
  text-align: center !important;
}

body.transactions-mode #transactions-hub {
  margin-bottom: 4px !important;
}

body.transactions-mode #fixed-section,
body.transactions-mode #variable-section {
  padding-top: 2px !important;
}

/* ===== SOURCE: v13623-bottom-nav-activebar.css ===== */
/* v136.23 — retire l'espace blanc au-dessus de la barre active et compacte la nav basse. */
.ca-bottom-nav,
html.is-ios .ca-bottom-nav,
html.is-macos .ca-bottom-nav {
  padding-top: 0 !important;
  padding-bottom: calc(var(--safe-bottom) + 2px) !important;
  min-height: calc(56px + var(--safe-bottom)) !important;
  align-items: stretch !important;
}

.ca-bottom-link,
.ca-bottom-button,
html.is-ios .ca-bottom-link,
html.is-ios .ca-bottom-button,
html.is-macos .ca-bottom-link,
html.is-macos .ca-bottom-button {
  position: relative;
  min-height: 46px !important;
  padding-top: 8px !important;
  padding-bottom: 1px !important;
  justify-content: flex-start !important;
}

.ca-bottom-link::before,
.ca-bottom-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  max-width: calc(100% - 14px);
  height: 3px;
  border-radius: 999px;
  background: transparent;
  opacity: 0;
  transition: opacity 140ms ease, background-color 140ms ease, width 140ms ease;
}

.ca-bottom-link.active::before,
body[data-active-nav="income"] .ca-bottom-link[data-ca-target="income"]::before,
body[data-active-nav="fixed"] .ca-bottom-link[data-ca-target="fixed"]::before,
body[data-active-nav="variable"] .ca-bottom-link[data-ca-target="variable"]::before,
body[data-active-nav="menu"] .ca-bottom-link[data-ca-target="menu"]::before,
body[data-active-nav="profile"] .ca-bottom-link[data-ca-target="profile"]::before,
body[data-active-nav="transactions"] .ca-bottom-link[data-ca-target="transactions"]::before {
  opacity: 1;
  background: var(--ca-accent);
}

/* ===== SOURCE: v13631-nav-notifications.css ===== */
/* v136.31 — nav 5 onglets parfaitement égaux + Notifications overlay. */

/* La cloche du header est supprimée du HTML ; ceci protège aussi les vieux caches. */
#notification-open { display:none !important; }

.ca-bottom-nav,
html.is-ios .ca-bottom-nav,
html.is-macos .ca-bottom-nav {
  display:flex !important;
  flex-direction:row !important;
  align-items:stretch !important;
  justify-content:stretch !important;
  gap:0 !important;
  padding-left:max(4px, calc(var(--safe-left) + 4px)) !important;
  padding-right:max(4px, calc(var(--safe-right) + 4px)) !important;
  transform:translateY(5px) !important;
}

.ca-bottom-nav > .ca-bottom-link,
.ca-bottom-nav > .ca-bottom-button,
html.is-ios .ca-bottom-nav > .ca-bottom-link,
html.is-ios .ca-bottom-nav > .ca-bottom-button,
html.is-macos .ca-bottom-nav > .ca-bottom-link,
html.is-macos .ca-bottom-nav > .ca-bottom-button {
  flex:1 1 0 !important;
  width:20% !important;
  min-width:0 !important;
  max-width:20% !important;
  margin:0 !important;
  box-sizing:border-box !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:flex-start !important;
  text-align:center !important;
}

/* Neutralise les anciens placements grid explicites iOS. */
html.is-ios .ca-bottom-nav > :nth-child(1),
html.is-ios .ca-bottom-nav > :nth-child(2),
html.is-ios .ca-bottom-nav > :nth-child(3),
html.is-ios .ca-bottom-nav > :nth-child(4),
html.is-ios .ca-bottom-nav > :nth-child(5) {
  grid-column:auto !important;
  grid-row:auto !important;
}

.ca-bottom-nav .ca-bottom-icon-frame,
.ca-bottom-nav .ca-bottom-icon {
  flex:0 0 auto !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

.ca-bottom-nav > .ca-bottom-link > span:last-child,
.ca-bottom-nav > .ca-bottom-button > span:last-child {
  width:100% !important;
  min-width:0 !important;
  text-align:center !important;
  overflow:hidden !important;
  text-overflow:clip !important;
  white-space:nowrap !important;
}

#ca-bottom-notifications > span:last-child {
  font-size:8.5px !important;
}

body[data-active-nav="notifications"] .ca-bottom-link[data-ca-target="notifications"] {
  color:var(--ca-accent) !important;
  font-weight:750 !important;
}
body[data-active-nav="notifications"] .ca-bottom-link[data-ca-target="notifications"] .ca-bottom-icon {
  transform:translateY(-1px) !important;
  stroke-width:2.25 !important;
}

/* Notifications est un panneau au-dessus de la page, mais la nav reste visible. */
body.notification-sheet-open .ca-bottom-nav {
  z-index:90 !important;
  display:flex !important;
}
body.notification-sheet-open #notification-sheet {
  z-index:72 !important;
}
body.notification-sheet-open #notification-sheet .notification-panel {
  padding-bottom:calc(var(--safe-bottom) + 78px) !important;
}

/* ===== SOURCE: v13633-variable-categories.css ===== */
/* v136.33 — catégories dépenses variables plus denses + menu contextuel appui long. */

body.transactions-mode .variable-category .category-head {
  padding: 8px 2px 7px !important;
  touch-action: pan-y !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

body.transactions-mode .variable-category .category-topline {
  min-height: 24px !important;
  align-items: center !important;
  gap: 8px !important;
}

body.transactions-mode .variable-category .category-name {
  font-size: 13.5px !important;
  line-height: 1.12 !important;
  letter-spacing: -0.15px !important;
}

body.transactions-mode .variable-category .category-actions {
  gap: 0 !important;
}

body.transactions-mode .variable-category .category-toggle {
  width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  flex: 0 0 24px !important;
  padding: 0 !important;
}

body.transactions-mode .variable-category .category-toggle svg {
  width: 13px !important;
  height: 13px !important;
}

body.transactions-mode .variable-category .category-metrics {
  grid-template-columns: repeat(3, minmax(0, auto)) !important;
  justify-content: start !important;
  column-gap: 12px !important;
  row-gap: 2px !important;
  margin: 4px 0 0 !important;
}

body.transactions-mode .variable-category .category-metric-label {
  margin-bottom: 0 !important;
  font-size: 7.8px !important;
  line-height: 1.05 !important;
  letter-spacing: .12px !important;
}

body.transactions-mode .variable-category .category-metric-value {
  font-size: 11.5px !important;
  line-height: 1.08 !important;
  font-weight: 720 !important;
}

body.transactions-mode .variable-category .category-progress {
  height: 3px !important;
  margin-top: 1px !important;
}

body.transactions-mode .variable-category .category-budget-missing {
  margin-top: 1px !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
}

.variable-category-context-menu {
  position: fixed;
  z-index: 260;
  min-width: 188px;
  max-width: min(250px, calc(100vw - 16px));
  padding: 5px;
  opacity: 0;
  transform: scale(.98);
  transform-origin: top left;
  border: 1px solid rgba(28, 39, 53, .10);
  border-radius: 13px;
  background: rgba(255,255,255,.97);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  box-shadow: 0 12px 34px rgba(15, 28, 42, .16);
  transition: opacity 100ms ease, transform 100ms ease;
}

.variable-category-context-menu.visible {
  opacity: 1;
  transform: scale(1);
}

.variable-category-context-action {
  display: block;
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink, #172231);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
}

.variable-category-context-action:active,
.variable-category-context-action:hover {
  background: rgba(15,136,110,.07);
}

.variable-category-context-action.danger {
  color: #B54136;
}

html[data-theme="dark"] .variable-category-context-menu {
  background: rgba(28,31,35,.97);
  border-color: rgba(255,255,255,.10);
}

html[data-theme="dark"] .variable-category-context-action {
  color: #F5F7F8;
}

html[data-theme="dark"] .variable-category-context-action.danger {
  color: #FF8D82;
}

/* ===== SOURCE: v13638-transactions-rebuild.css ===== */
/* v136.38 — Transactions reconstruits proprement.
   Une seule couche finale remplace les anciens correctifs contradictoires. */

/* --------------------------------------------------------------------------
   1. Structure du module Transactions
   -------------------------------------------------------------------------- */
body.transactions-mode #transactions-hub,
html.is-ios body.transactions-mode #transactions-hub,
html.is-macos body.transactions-mode #transactions-hub {
  box-sizing: border-box !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  border: 0 !important;
  background: var(--paper, #fff) !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

body.transactions-mode #transactions-hub.is-sticking,
html.is-ios body.transactions-mode #transactions-hub.is-sticking,
html.is-macos body.transactions-mode #transactions-hub.is-sticking {
  background: var(--paper, #fff) !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

body.transactions-mode .transactions-segmented {
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, var(--line, #e7eaee)) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Un seul séparateur sous les onglets : jamais un second trait venant du panel. */
body.transactions-mode #fixed-section,
body.transactions-mode #variable-section,
html.is-ios body.transactions-mode #fixed-section,
html.is-ios body.transactions-mode #variable-section,
html.is-macos body.transactions-mode #fixed-section,
html.is-macos body.transactions-mode #variable-section {
  box-sizing: border-box !important;
  margin-top: 0 !important;
  padding-top: 8px !important;
  border-top: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

body.transactions-mode #fixed-section::before,
body.transactions-mode #fixed-section::after,
body.transactions-mode #variable-section::before,
body.transactions-mode #variable-section::after,
body.transactions-mode .transaction-panel-head::before,
body.transactions-mode .transaction-panel-head::after,
body.transactions-mode #variable-section .section-head::before,
body.transactions-mode #variable-section .section-head::after {
  content: none !important;
  display: none !important;
}

body.transactions-mode .transaction-panel-head,
body.transactions-mode #variable-section .section-head {
  border: 0 !important;
  box-shadow: none !important;
}

/* Ancien résumé Transactions : toujours retiré. */
body.transactions-mode .expense-summary-recurring,
body.transactions-mode .expense-summary-planned,
body.transactions-mode .expense-summary-real {
  display: none !important;
}
body.transactions-mode .expense-tabs.mode-fixed .expense-goal-progress { display: none !important; }
body.transactions-mode .expense-tabs.mode-variable .expense-goal-progress { display: grid !important; }

/* --------------------------------------------------------------------------
   2. Charges récurrentes : vraie liste plate, une seule ligne entre éléments
   -------------------------------------------------------------------------- */
body.transactions-mode #fixed-section {
  background: var(--paper, #fff) !important;
  border-radius: 0 !important;
  overflow: visible !important;
}

body.transactions-mode #fixed-section .plain-list,
html.is-ios body.transactions-mode #fixed-section .plain-list,
html.is-macos body.transactions-mode #fixed-section .plain-list {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.transactions-mode #fixed-section .plain-list > .swipe-row,
html.is-ios body.transactions-mode #fixed-section .plain-list > .swipe-row,
html.is-macos body.transactions-mode #fixed-section .plain-list > .swipe-row {
  position: relative !important;
  width: 100% !important;
  min-height: 54px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
  isolation: isolate !important;
}

body.transactions-mode #fixed-section .plain-list > .swipe-row::before,
body.transactions-mode #fixed-section .plain-list > .swipe-row::after {
  content: none !important;
  display: none !important;
}

body.transactions-mode #fixed-section .plain-list > .swipe-row > .swipe-content,
html.is-ios body.transactions-mode #fixed-section .plain-list > .swipe-row > .swipe-content,
html.is-macos body.transactions-mode #fixed-section .plain-list > .swipe-row > .swipe-content {
  position: relative !important;
  z-index: 2 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 54px !important;
  margin: 0 !important;
  padding: 9px 20px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  align-items: center !important;
  gap: 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--paper, #fff) !important;
  box-shadow: none !important;
  overflow: visible !important;
}

/* Le SEUL trait entre deux transactions récurrentes. */
body.transactions-mode #fixed-section .plain-list > .swipe-row > .swipe-content::after,
html.is-ios body.transactions-mode #fixed-section .plain-list > .swipe-row > .swipe-content::after,
html.is-macos body.transactions-mode #fixed-section .plain-list > .swipe-row > .swipe-content::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  left: 20px !important;
  right: 20px !important;
  bottom: 0 !important;
  width: auto !important;
  height: 1px !important;
  background: var(--ui-border, var(--line, #e7eaee)) !important;
  opacity: 1 !important;
  pointer-events: none !important;
  box-shadow: none !important;
  transition: opacity 100ms ease !important;
}

body.transactions-mode #fixed-section .plain-list > .swipe-row.fixed-category-last > .swipe-content::after,
body.transactions-mode #fixed-section .plain-list > .swipe-row:last-child > .swipe-content::after {
  opacity: 0 !important;
}

/* Pendant le choix Modifier/Supprimer : aucun trait au-dessus ni en-dessous. */
body.transactions-mode #fixed-section .plain-list > .swipe-row.open > .swipe-content::after,
body.transactions-mode #fixed-section .plain-list > .swipe-row.swipe-active > .swipe-content::after,
body.transactions-mode #fixed-section .plain-list > .swipe-row:has(+ .swipe-row.open) > .swipe-content::after,
body.transactions-mode #fixed-section .plain-list > .swipe-row:has(+ .swipe-row.swipe-active) > .swipe-content::after {
  opacity: 0 !important;
}

body.transactions-mode #fixed-section .line-title,
html.is-ios body.transactions-mode #fixed-section .line-title,
html.is-macos body.transactions-mode #fixed-section .line-title {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: var(--ink, #131820) !important;
  text-shadow: none !important;
  filter: none !important;
  box-shadow: none !important;
}

body.transactions-mode #fixed-section .amount,
html.is-ios body.transactions-mode #fixed-section .amount,
html.is-macos body.transactions-mode #fixed-section .amount {
  position: static !important;
  min-width: max-content !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  justify-self: end !important;
  text-align: right !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  color: var(--ink, #131820) !important;
  text-shadow: none !important;
  filter: none !important;
  box-shadow: none !important;
}

/* Lignes automatiques : mêmes marges sûres, aucun positionnement absolu. */
body.transactions-mode #fixed-section .auto-fixed-row .auto-fixed-right,
html.is-ios body.transactions-mode #fixed-section .auto-fixed-row .auto-fixed-right,
html.is-macos body.transactions-mode #fixed-section .auto-fixed-row .auto-fixed-right {
  position: static !important;
  grid-column: 2 !important;
  justify-self: end !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  white-space: nowrap !important;
}

/* Swipe récurrent : ligne plate, jamais une carte grise/arrondie/ombrée. */
body.transactions-mode #fixed-section .swipe-row.open > .swipe-content,
body.transactions-mode #fixed-section .swipe-row.swipe-active > .swipe-content,
html.is-ios body.transactions-mode #fixed-section .swipe-row.open > .swipe-content,
html.is-ios body.transactions-mode #fixed-section .swipe-row.swipe-active > .swipe-content,
html.is-macos body.transactions-mode #fixed-section .swipe-row.open > .swipe-content,
html.is-macos body.transactions-mode #fixed-section .swipe-row.swipe-active > .swipe-content {
  border-radius: 0 !important;
  background: var(--paper, #fff) !important;
  box-shadow: none !important;
}

body.transactions-mode #fixed-section .swipe-row.open > .swipe-content,
html.is-ios body.transactions-mode #fixed-section .swipe-row.open > .swipe-content,
html.is-macos body.transactions-mode #fixed-section .swipe-row.open > .swipe-content {
  transform: translate3d(-136px, 0, 0) !important;
}

body.transactions-mode #fixed-section .swipe-actions,
html.is-ios body.transactions-mode #fixed-section .swipe-actions,
html.is-macos body.transactions-mode #fixed-section .swipe-actions {
  top: 5px !important;
  right: 8px !important;
  bottom: 5px !important;
  left: auto !important;
  width: 128px !important;
  height: auto !important;
  transform: none !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 6px !important;
  padding: 0 !important;
  align-items: stretch !important;
}

body.transactions-mode #fixed-section .swipe-action,
html.is-ios body.transactions-mode #fixed-section .swipe-action,
html.is-macos body.transactions-mode #fixed-section .swipe-action {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  width: auto !important;
  height: 100% !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   3. Dépenses variables : catégories compactes + lignes cohérentes
   -------------------------------------------------------------------------- */
body.transactions-mode #variable-section {
  background: var(--paper, #fff) !important;
  box-shadow: none !important;
}

body.transactions-mode .variable-category {
  box-shadow: none !important;
}

body.transactions-mode .variable-category .category-head,
body.transactions-mode .variable-category .category-name,
body.transactions-mode .variable-category .category-metrics,
body.transactions-mode .variable-category .category-progress {
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

body.transactions-mode .variable-category .category-list .plain-list {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.transactions-mode .variable-category .category-list .swipe-row {
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body.transactions-mode .variable-category .category-list .swipe-content {
  position: relative !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 52px !important;
  padding: 8px 18px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  gap: 12px !important;
  align-items: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--paper, #fff) !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.transactions-mode .variable-category .category-list .swipe-content::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  left: 18px !important;
  right: 18px !important;
  bottom: 0 !important;
  height: 1px !important;
  background: var(--ui-border, var(--line, #e7eaee)) !important;
  opacity: 1 !important;
  pointer-events: none !important;
  box-shadow: none !important;
  transition: opacity 100ms ease !important;
}

body.transactions-mode .variable-category .category-list .swipe-row:last-child > .swipe-content::after,
body.transactions-mode .variable-category .category-list .swipe-row.open > .swipe-content::after,
body.transactions-mode .variable-category .category-list .swipe-row.swipe-active > .swipe-content::after,
body.transactions-mode .variable-category .category-list .swipe-row:has(+ .swipe-row.open) > .swipe-content::after,
body.transactions-mode .variable-category .category-list .swipe-row:has(+ .swipe-row.swipe-active) > .swipe-content::after {
  opacity: 0 !important;
}

body.transactions-mode .variable-category .category-list .line-title {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  text-shadow: none !important;
  filter: none !important;
  box-shadow: none !important;
}

body.transactions-mode .variable-category .category-list .amount {
  position: static !important;
  min-width: max-content !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  justify-self: end !important;
  text-align: right !important;
  overflow: visible !important;
  white-space: nowrap !important;
  text-shadow: none !important;
  filter: none !important;
  box-shadow: none !important;
}

body.transactions-mode .variable-category .category-list .swipe-row.open > .swipe-content,
body.transactions-mode .variable-category .category-list .swipe-row.swipe-active > .swipe-content {
  border-radius: 0 !important;
  background: var(--paper, #fff) !important;
  box-shadow: none !important;
}

body.transactions-mode .variable-category .category-list .swipe-row.open > .swipe-content {
  transform: translate3d(-136px, 0, 0) !important;
}

body.transactions-mode .variable-category .category-list .swipe-actions {
  top: 4px !important;
  right: 7px !important;
  bottom: 4px !important;
  left: auto !important;
  width: 128px !important;
  height: auto !important;
  padding: 0 !important;
  gap: 6px !important;
  transform: none !important;
}

body.transactions-mode .variable-category .category-list .swipe-action {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  width: auto !important;
  height: 100% !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   4. Sécurité visuelle mobile : rien ne doit être coupé à droite
   -------------------------------------------------------------------------- */
@media (max-width: 430px) {
  body.transactions-mode #fixed-section .plain-list > .swipe-row > .swipe-content {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  body.transactions-mode #fixed-section .plain-list > .swipe-row > .swipe-content::after {
    left: 20px !important;
    right: 20px !important;
  }

  body.transactions-mode #fixed-section .amount,
  body.transactions-mode .variable-category .category-list .amount {
    font-variant-numeric: tabular-nums !important;
  }
}


/* v143.22 — dépenses variables plus compactes, sans traits, avec pointillés très discrets */
body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row {
  overflow: visible !important;
}

body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row + .swipe-row.variable-compact-row {
  margin-top: 1px !important;
}

body.transactions-mode .variable-category .category-list .swipe-content.variable-entry-content {
  min-height: 42px !important;
  padding: 4px 18px !important;
  grid-template-columns: minmax(0, max-content) minmax(10px, 1fr) max-content !important;
  gap: 8px !important;
  align-items: center !important;
}

body.transactions-mode .variable-category .category-list .swipe-content.variable-entry-content::after {
  display: none !important;
}

body.transactions-mode .variable-category .category-list .swipe-content.variable-entry-content .line-title {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.transactions-mode .variable-category .category-list .swipe-content.variable-entry-content .amount-leader {
  display: block !important;
  height: 1px !important;
  align-self: center !important;
  min-width: 10px !important;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--muted) 58%, transparent) 0.7px, transparent 0.8px) !important;
  background-size: 4px 1px !important;
  background-repeat: repeat-x !important;
  background-position: center center !important;
  opacity: 0.32 !important;
  transform: translateY(3px) !important;
}

body.transactions-mode .variable-category .category-list .swipe-content.variable-entry-content .amount {
  justify-self: end !important;
}


/* v143.23 — leader dots au niveau de la ligne de base + montants variables sans signe moins */
body.transactions-mode .variable-category .category-list .swipe-content.variable-entry-content {
  gap: 4px !important;
}

body.transactions-mode .variable-category .category-list .swipe-content.variable-entry-content .amount-leader {
  align-self: center !important;
  margin-bottom: 0 !important;
  transform: translateY(6px) !important;
  background-position: center center !important;
  opacity: 0.28 !important;
}


/* v143.30 — leader réellement aligné sur la baseline du libellé et du montant */
body.transactions-mode .variable-category .category-list .swipe-content.variable-entry-content {
  align-items: baseline !important;
}

body.transactions-mode .variable-category .category-list .swipe-content.variable-entry-content .line-title,
body.transactions-mode .variable-category .category-list .swipe-content.variable-entry-content .amount {
  align-self: baseline !important;
}

body.transactions-mode .variable-category .category-list .swipe-content.variable-entry-content .amount-leader {
  align-self: baseline !important;
  height: 0 !important;
  margin: 0 !important;
  transform: none !important;
  background: none !important;
  border: 0 !important;
  border-bottom: 1px dotted color-mix(in srgb, var(--muted) 32%, transparent) !important;
  opacity: .72 !important;
}


/* v143.31 — boutons Modifier / Supprimer remontés dans les dépenses variables */
body.transactions-mode .variable-category .category-list .swipe-row.open > .swipe-actions,
body.transactions-mode .variable-category .category-list .swipe-row.swipe-active > .swipe-actions {
  top: -4px !important;
  bottom: 12px !important;
}


/* v143.32 — boutons swipe non tronqués : suppression du clipping de la liste ouverte */
body.transactions-mode .variable-category .category-list {
  overflow: visible !important;
}

body.transactions-mode .variable-category.collapsed .category-list {
  overflow: hidden !important;
}

body.transactions-mode .variable-category .category-list .swipe-row.open,
body.transactions-mode .variable-category .category-list .swipe-row.swipe-active {
  z-index: 4 !important;
}

body.transactions-mode .variable-category .category-list .swipe-row.open > .swipe-actions,
body.transactions-mode .variable-category .category-list .swipe-row.swipe-active > .swipe-actions {
  z-index: 5 !important;
}

/* ===== SOURCE: v14340-variable-category-detail.css ===== */
/* v143.40 — boutons swipe intégralement visibles dans la vue catégorie. */
.variable-category-detail-page {
  position: fixed;
  inset: 0;
  z-index: 22;
  background: var(--paper, #fff);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  box-sizing: border-box;
  padding: max(112px, calc(var(--safe-top, 0px) + 82px)) max(20px, calc(var(--safe-right, 0px) + 20px)) calc(var(--safe-bottom, 0px) + 104px) max(20px, calc(var(--safe-left, 0px) + 20px));
}
.variable-category-detail-page[hidden] { display: none !important; }
.variable-category-detail-inner { width: min(100%, 900px); margin: 0 auto; }
.variable-category-detail-back {
  appearance: none; border: 0; background: transparent; padding: 0; margin: 0 0 48px;
  color: var(--accent, #087f69); font: inherit; font-size: 14px; line-height: 1.2; font-weight: 720;
  text-align: left; cursor: pointer;
}
.variable-category-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.variable-category-detail-title {
  min-width: 0; margin: 0; color: var(--text, #111827); font-size: clamp(30px, 8vw, 46px);
  line-height: .98; font-weight: 820; letter-spacing: -1.3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.variable-category-detail-tools { flex: 0 0 auto; display: flex; align-items: center; gap: 13px; }
.variable-category-detail-percent { color: var(--muted, #747d95); font-size: 16px; font-weight: 740; white-space: nowrap; }
.variable-category-detail-percent.over, .variable-category-detail-remaining.over { color: #b54136; }
.variable-category-detail-more { width: 34px !important; height: 34px !important; min-height: 34px !important; padding: 4px !important; }
.variable-category-detail-figures {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 34px 0 0;
  color: var(--muted, #747d95); font-size: 14.5px; line-height: 1.2; font-weight: 690;
}
.variable-category-detail-figures > span:last-child { text-align: right; }
.variable-category-detail-add {
  width: 100% !important; margin: 64px 0 26px !important; min-height: 48px !important;
}
.variable-category-detail-list-shell {
  margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
  background: transparent !important; overflow: visible !important; box-shadow: none !important;
}
.variable-category-detail-list-shell .category-list { overflow: visible !important; max-height: none !important; opacity: 1 !important; }
.variable-category-detail-list-shell .plain-list { margin: 0 !important; padding: 0 !important; overflow: visible !important; }
.variable-category-detail-empty { padding: 18px 0 !important; }
body.variable-category-detail-open { overflow: hidden !important; }
body.variable-category-detail-open .ca-bottom-nav { z-index: 60 !important; }
body.variable-category-detail-open .page > header,
body.variable-category-detail-open #income-section,
body.variable-category-detail-open #income-summary,
body.variable-category-detail-open #transactions-hub,
body.variable-category-detail-open #fixed-section,
body.variable-category-detail-open #variable-section {
  display: none !important;
}
body.variable-category-detail-open #variable-category-detail-page {
  display: block !important;
}
@media (max-width: 430px) {
  .variable-category-detail-page { padding-left: 21px; padding-right: 21px; }
  .variable-category-detail-back { margin-bottom: 48px; }
  .variable-category-detail-add { margin-top: 58px !important; }
}


.variable-category-detail-head { align-items: flex-start; }
.variable-category-detail-tools { padding-top: 10px; }
.variable-category-detail-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 64px 0 26px !important;
}
.variable-category-detail-add {
  flex: 1 1 auto;
  margin: 0 !important;
}
.variable-category-detail-category-link {
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent, #087f69);
  font: inherit;
  font-size: 16px;
  line-height: 1.1;
  font-weight: 760;
  letter-spacing: -.16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  min-height: 48px;
  cursor: pointer;
  white-space: nowrap;
}
.variable-category-detail-category-link > span:first-child {
  font-size: 18px;
  line-height: 1;
  font-weight: 500;
  transform: translateY(-.4px);
}
.variable-category-detail-category-link:active { opacity: .72; }
@media (max-width: 430px) {
  .variable-category-detail-actions { gap: 12px; margin-top: 58px !important; }
  .variable-category-detail-category-link { font-size: 15px; }
}


/* v143.37 — utiliser davantage la largeur de l’écran dans la vue catégorie */
.variable-category-detail-page {
  padding-left: max(12px, calc(var(--safe-left, 0px) + 12px));
  padding-right: max(12px, calc(var(--safe-right, 0px) + 12px));
}
.variable-category-detail-inner {
  width: 100%;
  max-width: none;
}
.variable-category-detail-list-shell .plain-list {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.variable-category-detail-list-shell .swipe-row {
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.variable-category-detail-list-shell .swipe-content {
  min-height: 46px !important;
  padding: 7px 0 !important;
  cursor: pointer;
}
.variable-category-detail-list-shell .swipe-content::after {
  left: 0 !important;
  right: 0 !important;
  background: color-mix(in srgb, var(--ui-border, var(--line, #e7eaee)) 76%, transparent) !important;
}
.variable-category-detail-list-shell .line-title {
  font-size: 13px !important;
  line-height: 1.2 !important;
  font-weight: 590 !important;
  color: var(--text) !important;
}
.variable-category-detail-list-shell .amount {
  font-size: 12.5px !important;
  line-height: 1 !important;
  font-weight: 710 !important;
  color: var(--text) !important;
}
@media (max-width: 430px) {
  .variable-category-detail-page {
    padding-left: max(12px, calc(var(--safe-left, 0px) + 12px));
    padding-right: max(12px, calc(var(--safe-right, 0px) + 12px));
  }
  .variable-category-detail-actions { gap: 10px; }
}


/* v143.39 — rapprocher uniquement la liste des dépenses et leurs montants des bords */
.variable-category-detail-list-shell .swipe-row.variable-compact-row {
  overflow: visible !important;
}

.variable-category-detail-list-shell .swipe-content.variable-entry-content {
  min-height: 42px !important;
  padding: 4px 6px !important;
  grid-template-columns: minmax(0, max-content) minmax(8px, 1fr) max-content !important;
  gap: 6px !important;
  align-items: baseline !important;
}

.variable-category-detail-list-shell .swipe-content.variable-entry-content::after {
  display: none !important;
}

.variable-category-detail-list-shell .swipe-content.variable-entry-content .line-title,
.variable-category-detail-list-shell .swipe-content.variable-entry-content .amount {
  align-self: baseline !important;
}

.variable-category-detail-list-shell .swipe-content.variable-entry-content .line-title {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.variable-category-detail-list-shell .swipe-content.variable-entry-content .amount-leader {
  display: block !important;
  align-self: baseline !important;
  min-width: 8px !important;
  height: 0 !important;
  margin: 0 !important;
  background: none !important;
  border: 0 !important;
  border-bottom: 1px dotted color-mix(in srgb, var(--muted) 28%, transparent) !important;
  opacity: .6 !important;
}

.variable-category-detail-list-shell .swipe-content.variable-entry-content .amount {
  justify-self: end !important;
}

@media (max-width: 430px) {
  .variable-category-detail-list-shell .swipe-content.variable-entry-content {
    padding-left: 2px !important;
    padding-right: 2px !important;
    gap: 5px !important;
  }

  .variable-category-detail-list-shell .swipe-content.variable-entry-content .amount-leader {
    min-width: 6px !important;
  }
}


/* v143.40 — aucune découpe possible des actions Modifier / Supprimer.
   Leur position reste identique à v143.39 : on ne change que le contexte de peinture. */
.variable-category-detail-list-shell,
.variable-category-detail-list-shell .category-list,
.variable-category-detail-list-shell .plain-list,
.variable-category-detail-list-shell .swipe-row.variable-compact-row,
.variable-category-detail-list-shell .swipe-row.variable-compact-row.open,
.variable-category-detail-list-shell .swipe-row.variable-compact-row.swipe-active {
  overflow: visible !important;
  clip-path: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  contain: none !important;
}

.variable-category-detail-list-shell .swipe-row.variable-compact-row {
  isolation: auto !important;
}

.variable-category-detail-list-shell .swipe-row.variable-compact-row.open,
.variable-category-detail-list-shell .swipe-row.variable-compact-row.swipe-active {
  position: relative !important;
  z-index: 30 !important;
}

.variable-category-detail-list-shell .swipe-row.variable-compact-row.open > .swipe-actions,
.variable-category-detail-list-shell .swipe-row.variable-compact-row.swipe-active > .swipe-actions {
  z-index: 50 !important;
  overflow: visible !important;
  clip-path: none !important;
  contain: none !important;
}

.variable-category-detail-list-shell .swipe-row.variable-compact-row.open > .swipe-actions > .swipe-action,
.variable-category-detail-list-shell .swipe-row.variable-compact-row.swipe-active > .swipe-actions > .swipe-action {
  overflow: visible !important;
  clip-path: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

.variable-category-detail-list-shell .swipe-row.variable-compact-row.open > .swipe-content,
.variable-category-detail-list-shell .swipe-row.variable-compact-row.swipe-active > .swipe-content {
  z-index: 10 !important;
}


/* v143.41 — boutons Modifier / Supprimer entièrement visibles dans la vue catégorie.
   On supprime l'effet de surcouche blanche en retenant les actions à l'intérieur de la ligne,
   centrées verticalement, sans changer la structure de la page. */
.variable-category-detail-list-shell .swipe-row.variable-compact-row.open > .swipe-actions,
.variable-category-detail-list-shell .swipe-row.variable-compact-row.swipe-active > .swipe-actions {
  top: 50% !important;
  bottom: auto !important;
  right: 8px !important;
  width: 138px !important;
  height: 58px !important;
  padding-left: 0 !important;
  align-items: center !important;
  transform: translateY(-50%) !important;
}

.variable-category-detail-list-shell .swipe-row.variable-compact-row.open > .swipe-actions > .swipe-action,
.variable-category-detail-list-shell .swipe-row.variable-compact-row.swipe-active > .swipe-actions > .swipe-action {
  flex: 0 0 65px !important;
  width: 65px !important;
  min-width: 65px !important;
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  align-self: center !important;
}

.variable-category-detail-list-shell .swipe-row.variable-compact-row.open > .swipe-content,
.variable-category-detail-list-shell .swipe-row.variable-compact-row.swipe-active > .swipe-content {
  transform: translate3d(-154px, 0, 0) !important;
}

/* ===== SOURCE: v13639-fixed-alignment.css ===== */
/* v136.39 — correction géométrique réelle des charges récurrentes.
   La liste était ~36 px plus étroite que la zone Transactions : on élargit
   la liste elle-même au lieu de pousser artificiellement le texte. */

body.transactions-mode #fixed-section .plain-list,
html.is-ios body.transactions-mode #fixed-section .plain-list,
html.is-macos body.transactions-mode #fixed-section .plain-list {
  width: calc(100% + 36px) !important;
  max-width: none !important;
  margin-right: -36px !important;
  overflow: visible !important;
}

body.transactions-mode #fixed-section .plain-list > .swipe-row,
html.is-ios body.transactions-mode #fixed-section .plain-list > .swipe-row,
html.is-macos body.transactions-mode #fixed-section .plain-list > .swipe-row {
  width: 100% !important;
  max-width: none !important;
}

body.transactions-mode #fixed-section .plain-list > .swipe-row > .swipe-content,
html.is-ios body.transactions-mode #fixed-section .plain-list > .swipe-row > .swipe-content,
html.is-macos body.transactions-mode #fixed-section .plain-list > .swipe-row > .swipe-content {
  width: 100% !important;
  padding-left: 20px !important;
  padding-right: 4px !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
}

body.transactions-mode #fixed-section .plain-list > .swipe-row > .swipe-content > .amount,
html.is-ios body.transactions-mode #fixed-section .plain-list > .swipe-row > .swipe-content > .amount,
html.is-macos body.transactions-mode #fixed-section .plain-list > .swipe-row > .swipe-content > .amount {
  justify-self: end !important;
  text-align: right !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: max-content !important;
  max-width: none !important;
  overflow: visible !important;
  white-space: nowrap !important;
}

/* Le trait normal suit maintenant la vraie largeur de la liste. */
body.transactions-mode #fixed-section .plain-list > .swipe-row > .swipe-content::after,
html.is-ios body.transactions-mode #fixed-section .plain-list > .swipe-row > .swipe-content::after,
html.is-macos body.transactions-mode #fixed-section .plain-list > .swipe-row > .swipe-content::after {
  left: 20px !important;
  right: 4px !important;
}

/* Pendant le swipe / une ligne ouverte : aucun séparateur sur la frontière
   basse de la ligne sélectionnée. On neutralise toutes les sources possibles. */
body.transactions-mode #fixed-section .plain-list > .swipe-row.open,
body.transactions-mode #fixed-section .plain-list > .swipe-row.swipe-active,
html.is-ios body.transactions-mode #fixed-section .plain-list > .swipe-row.open,
html.is-ios body.transactions-mode #fixed-section .plain-list > .swipe-row.swipe-active,
html.is-macos body.transactions-mode #fixed-section .plain-list > .swipe-row.open,
html.is-macos body.transactions-mode #fixed-section .plain-list > .swipe-row.swipe-active {
  border-bottom: 0 !important;
  box-shadow: none !important;
}

body.transactions-mode #fixed-section .plain-list > .swipe-row.open > .swipe-content::after,
body.transactions-mode #fixed-section .plain-list > .swipe-row.swipe-active > .swipe-content::after,
html.is-ios body.transactions-mode #fixed-section .plain-list > .swipe-row.open > .swipe-content::after,
html.is-ios body.transactions-mode #fixed-section .plain-list > .swipe-row.swipe-active > .swipe-content::after,
html.is-macos body.transactions-mode #fixed-section .plain-list > .swipe-row.open > .swipe-content::after,
html.is-macos body.transactions-mode #fixed-section .plain-list > .swipe-row.swipe-active > .swipe-content::after {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
}

body.transactions-mode #fixed-section .plain-list > .swipe-row.open + .swipe-row,
body.transactions-mode #fixed-section .plain-list > .swipe-row.swipe-active + .swipe-row,
html.is-ios body.transactions-mode #fixed-section .plain-list > .swipe-row.open + .swipe-row,
html.is-ios body.transactions-mode #fixed-section .plain-list > .swipe-row.swipe-active + .swipe-row,
html.is-macos body.transactions-mode #fixed-section .plain-list > .swipe-row.open + .swipe-row,
html.is-macos body.transactions-mode #fixed-section .plain-list > .swipe-row.swipe-active + .swipe-row {
  border-top: 0 !important;
  box-shadow: none !important;
}

body.transactions-mode #fixed-section .plain-list > .swipe-row.open + .swipe-row > .swipe-content::before,
body.transactions-mode #fixed-section .plain-list > .swipe-row.swipe-active + .swipe-row > .swipe-content::before {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
}

/* ===== SOURCE: v13640-selection-geometry.css ===== */
/* v136.40 — pastilles uniquement en mode sélection, avec plus d’air avant le libellé. */

/* Hors sélection, aucune place n’est réservée à la pastille. La géométrie
   normale de Transactions reste donc exactement celle du design courant. */
body:not(.bulk-selection-mode) .bulk-selectable-row .bulk-select-indicator {
  display: none !important;
}

/* En sélection, la pastille apparaît et le contenu se décale à ce moment-là seulement. */
body.bulk-selection-mode .bulk-selectable-row .bulk-select-indicator {
  display: flex !important;
  width: 18px !important;
  height: 18px !important;
  flex-basis: 18px !important;
  left: 12px !important;
}

body.bulk-selection-mode #fixed-section .bulk-selectable-row .swipe-content,
body.bulk-selection-mode #variable-section .bulk-selectable-row .swipe-content {
  padding-left: 50px !important;
  transition: padding-left .18s ease, background-color .16s ease !important;
}

body.bulk-selection-mode #fixed-section .bulk-selectable-row .swipe-content::after,
body.bulk-selection-mode #variable-section .bulk-selectable-row .swipe-content::after {
  left: 50px !important;
}

body.bulk-selection-mode .bulk-selectable-row .bulk-select-indicator svg {
  width: 11px !important;
  height: 11px !important;
}

/* ===== SOURCE: v13641-selection-fix.css ===== */
/* v136.41 — géométrie sélection : aucune réserve hors sélection,
   vraie colonne pastille + espace lisible pendant la sélection. */

body:not(.bulk-selection-mode) #fixed-section .bulk-selectable-row .bulk-select-indicator,
body:not(.bulk-selection-mode) #variable-section .bulk-selectable-row .bulk-select-indicator {
  display:none !important;
}

body.transactions-mode.bulk-selection-mode #fixed-section .plain-list > .swipe-row.bulk-selectable-row > .swipe-content,
html.is-ios body.transactions-mode.bulk-selection-mode #fixed-section .plain-list > .swipe-row.bulk-selectable-row > .swipe-content,
html.is-macos body.transactions-mode.bulk-selection-mode #fixed-section .plain-list > .swipe-row.bulk-selectable-row > .swipe-content {
  padding-left:50px !important;
}

body.transactions-mode.bulk-selection-mode #fixed-section .plain-list > .swipe-row.bulk-selectable-row > .swipe-content::after,
html.is-ios body.transactions-mode.bulk-selection-mode #fixed-section .plain-list > .swipe-row.bulk-selectable-row > .swipe-content::after,
html.is-macos body.transactions-mode.bulk-selection-mode #fixed-section .plain-list > .swipe-row.bulk-selectable-row > .swipe-content::after {
  left:50px !important;
}

body.transactions-mode.bulk-selection-mode #variable-section .bulk-selectable-row > .swipe-content,
body.transactions-mode.bulk-selection-mode .variable-category .category-list > .swipe-row.bulk-selectable-row > .swipe-content {
  padding-left:50px !important;
}

body.transactions-mode.bulk-selection-mode #variable-section .bulk-selectable-row > .swipe-content::after,
body.transactions-mode.bulk-selection-mode .variable-category .category-list > .swipe-row.bulk-selectable-row > .swipe-content::after {
  left:50px !important;
}

body.bulk-selection-mode #fixed-section .bulk-selectable-row .bulk-select-indicator,
body.bulk-selection-mode #variable-section .bulk-selectable-row .bulk-select-indicator {
  display:flex !important;
  left:12px !important;
  width:18px !important;
  height:18px !important;
  flex:0 0 18px !important;
}

body.bulk-selection-mode .bulk-selectable-row .bulk-select-indicator svg {
  width:11px !important;
  height:11px !important;
}

/* ===== SOURCE: v13643-selection-size.css ===== */
/* v136.43 — pastilles de sélection plus discrètes, sans changer le comportement. */
body.bulk-selection-mode #fixed-section .bulk-selectable-row .bulk-select-indicator,
body.bulk-selection-mode #variable-section .bulk-selectable-row .bulk-select-indicator,
html.is-ios body.bulk-selection-mode #fixed-section .bulk-selectable-row .bulk-select-indicator,
html.is-ios body.bulk-selection-mode #variable-section .bulk-selectable-row .bulk-select-indicator,
html.is-macos body.bulk-selection-mode #fixed-section .bulk-selectable-row .bulk-select-indicator,
html.is-macos body.bulk-selection-mode #variable-section .bulk-selectable-row .bulk-select-indicator {
  left: 14px !important;
  width: 15px !important;
  height: 15px !important;
  flex: 0 0 15px !important;
  border-width: 1.25px !important;
}

body.bulk-selection-mode .bulk-selectable-row .bulk-select-indicator svg {
  width: 9px !important;
  height: 9px !important;
  stroke-width: 2.1 !important;
}

body.transactions-mode.bulk-selection-mode #fixed-section .plain-list > .swipe-row.bulk-selectable-row > .swipe-content,
html.is-ios body.transactions-mode.bulk-selection-mode #fixed-section .plain-list > .swipe-row.bulk-selectable-row > .swipe-content,
html.is-macos body.transactions-mode.bulk-selection-mode #fixed-section .plain-list > .swipe-row.bulk-selectable-row > .swipe-content,
body.transactions-mode.bulk-selection-mode #variable-section .bulk-selectable-row > .swipe-content,
body.transactions-mode.bulk-selection-mode .variable-category .category-list > .swipe-row.bulk-selectable-row > .swipe-content {
  padding-left: 44px !important;
}

body.transactions-mode.bulk-selection-mode #fixed-section .plain-list > .swipe-row.bulk-selectable-row > .swipe-content::after,
html.is-ios body.transactions-mode.bulk-selection-mode #fixed-section .plain-list > .swipe-row.bulk-selectable-row > .swipe-content::after,
html.is-macos body.transactions-mode.bulk-selection-mode #fixed-section .plain-list > .swipe-row.bulk-selectable-row > .swipe-content::after,
body.transactions-mode.bulk-selection-mode #variable-section .bulk-selectable-row > .swipe-content::after,
body.transactions-mode.bulk-selection-mode .variable-category .category-list > .swipe-row.bulk-selectable-row > .swipe-content::after {
  left: 44px !important;
}

/* ===== SOURCE: v13647-social-auth.css ===== */
/* v136.47 — provider OAuth non configuré */
.social-auth-button.provider-unavailable {
  opacity: .52;
  filter: saturate(.55);
}
.social-auth-button.provider-unavailable:active {
  transform: none !important;
}

/* ===== SOURCE: v13649-onboarding-boot.css ===== */
/* v136.49 — masque le budget tant que l'état onboarding n'est pas résolu. */
body.onboarding-checking {
  overflow: hidden !important;
  background: #F3F5F7 !important;
}
body.onboarding-checking > .page,
body.onboarding-checking > .ca-bottom-nav,
body.onboarding-checking > .sheet-backdrop,
body.onboarding-checking > .copy-toast,
body.onboarding-checking > .v112-undo-toast {
  visibility: hidden !important;
  pointer-events: none !important;
}
/* L'onboarding reste autorisé à apparaître au-dessus du masque. */
body.onboarding-checking > #onboarding:not([hidden]) {
  visibility: visible !important;
  pointer-events: auto !important;
}

/* ===== SOURCE: v137.css ===== */
/* v137.0 — fiabilité, mois automatique et foyer avancé. */

/* Tant que le budget/foyer actif n'est pas résolu, aucune donnée d'un ancien
   budget ne doit apparaître. L'onboarding et l'auth restent visibles. */
body.budget-scope-checking.auth-ready .page,
body.budget-scope-checking.auth-ready .ca-bottom-nav,
body.budget-scope-checking.auth-ready #month-settings-sheet,
body.budget-scope-checking.auth-ready #profile-sheet,
body.budget-scope-checking.auth-ready #notification-sheet,
body.budget-scope-checking.auth-ready #alert-sheet,
body.budget-scope-checking.auth-ready #v110-search-sheet,
body.budget-scope-checking.auth-ready #v112-transaction-sheet,
body.budget-scope-checking.auth-ready #conflict-sheet,
body.budget-scope-checking.auth-ready .copy-toast,
body.budget-scope-checking.auth-ready .v112-undo-toast {
  visibility: hidden !important;
}

body.budget-scope-checking #onboarding:not([hidden]) {
  visibility: visible !important;
}

.v137-rollover-row small {
  max-width: 36rem;
  line-height: 1.35;
}

.v137-household-activity-head {
  margin-top: 18px;
}

#profile-household-details .v137-household-profile-activity {
  margin-top: 6px;
  border-top: 1px solid rgba(23,34,49,.06);
  border-bottom: 1px solid rgba(23,34,49,.06);
}

#profile-household-details .v137-household-profile-activity .household-activity-row {
  width: 100%;
  display: block;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  cursor: pointer;
}

#profile-household-details .v137-household-profile-activity .household-activity-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #8993A2;
}

.settings-account-sync.is-syncing::before,
.settings-account-sync.is-offline::before,
.settings-account-sync.is-synced::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: 1px;
  background: currentColor;
  opacity: .72;
}

/* ===== SOURCE: v1382-invitations.css ===== */
/* v138.2 — invitation codes: compact 16-character display without horizontal overflow. */
#profile-household-details .household-share-code {
  font-size: clamp(15px, 3.9vw, 22px);
  letter-spacing: .08em;
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  #profile-household-details .household-share-code-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  #profile-household-details .household-share-code {
    font-size: 14px;
    letter-spacing: .045em;
  }
}

/* ===== SOURCE: v1383-recovery.css ===== */
/* v138.3 — Centre de fiabilité et récupération */
.v1383-reliability { margin-top:14px; }
.v1383-reliability-head { padding:14px 0 8px; }
.v1383-reliability-head strong { display:block; font-size:14px; font-weight:760; }
.v1383-reliability-head small { display:block; margin-top:4px; color:var(--ui-muted,var(--muted)); font-size:11px; line-height:1.45; }
.v1383-reliability-actions { display:flex; flex-wrap:wrap; gap:8px; padding:8px 0 12px; }
.v1383-reliability-actions button { min-height:38px; }
.v1383-reliability-results { display:grid; border-top:1px solid var(--ui-border,var(--line)); }
.v1383-check { min-height:46px; display:grid; grid-template-columns:22px minmax(0,1fr); align-items:center; gap:9px; border-bottom:1px solid var(--ui-border,var(--line)); }
.v1383-check:last-child { border-bottom:0; }
.v1383-check-icon { width:20px; height:20px; border-radius:999px; display:grid; place-items:center; font-size:11px; font-weight:800; background:rgba(120,120,120,.12); }
.v1383-check[data-state="pass"] .v1383-check-icon { background:rgba(41,160,92,.13); }
.v1383-check[data-state="warn"] .v1383-check-icon { background:rgba(214,153,34,.14); }
.v1383-check[data-state="fail"] .v1383-check-icon { background:rgba(200,64,64,.13); }
.v1383-check-copy { min-width:0; padding:8px 0; }
.v1383-check-copy strong { display:block; font-size:12px; font-weight:720; }
.v1383-check-copy small { display:block; margin-top:2px; color:var(--ui-muted,var(--muted)); font-size:10.5px; line-height:1.35; overflow-wrap:anywhere; }
.v1383-reliability-summary { margin:8px 0 2px; font-size:11px; color:var(--ui-muted,var(--muted)); }
.v1383-recovery-note { margin:10px 0 12px; padding:10px 12px; border-radius:12px; background:var(--ui-soft,rgba(127,127,127,.08)); color:var(--ui-muted,var(--muted)); font-size:10.5px; line-height:1.45; }
html[data-theme="dark"] .v1383-recovery-note { background:rgba(255,255,255,.05); }

/* ===== SOURCE: v139-motion.css ===== */
/* v139.0 — Motion & Glass UX. Effets purement visuels, aucune logique budget/cloud. */

html {
  --v139-fast: 150ms;
  --v139-medium: 240ms;
  --v139-slow: 320ms;
  --v139-ease: cubic-bezier(.22,.78,.22,1);
  --v139-spring: cubic-bezier(.2,.9,.25,1.08);
  --v139-nav-blur: 24px;
  --v139-sheet-blur: 16px;
  --v139-sheet-shift: 24px;
  --v139-page-shift: 12px;
}

html[data-motion="economy"] {
  --v139-fast: 90ms;
  --v139-medium: 150ms;
  --v139-slow: 190ms;
  --v139-nav-blur: 10px;
  --v139-sheet-blur: 6px;
  --v139-sheet-shift: 12px;
  --v139-page-shift: 7px;
}

html[data-motion="minimal"] {
  --v139-fast: 0ms;
  --v139-medium: 0ms;
  --v139-slow: 0ms;
  --v139-nav-blur: 0px;
  --v139-sheet-blur: 0px;
  --v139-sheet-shift: 0px;
  --v139-page-shift: 0px;
}

/* Navigation basse : verre plus léger + indicateur qui glisse réellement. */
html[data-ui-theme="standard"][data-theme="light"] .ca-bottom-nav {
  background: rgba(255,255,255,.80) !important;
}
html[data-ui-theme="standard"][data-theme="dark"] .ca-bottom-nav {
  background: rgba(21,24,27,.82) !important;
}
html[data-ui-theme="standard"] .ca-bottom-nav {
  -webkit-backdrop-filter: saturate(175%) blur(var(--v139-nav-blur)) !important;
  backdrop-filter: saturate(175%) blur(var(--v139-nav-blur)) !important;
}
html[data-motion="minimal"][data-theme="light"] .ca-bottom-nav { background: #fff !important; }
html[data-motion="minimal"][data-theme="dark"] .ca-bottom-nav { background: #15181B !important; }

html[data-ui-theme="standard"] .ca-bottom-nav .ca-bottom-link::before,
html[data-ui-theme="standard"] .ca-bottom-nav .ca-bottom-button::before {
  opacity: 0 !important;
}

.v139-nav-indicator {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  height: 3px;
  width: 60px;
  border-radius: 0 0 999px 999px;
  background: var(--ca-accent);
  pointer-events: none;
  transform: translate3d(0,0,0);
  transition:
    transform var(--v139-medium) var(--v139-spring),
    width var(--v139-medium) var(--v139-ease),
    opacity var(--v139-fast) ease;
  will-change: transform;
}
.v139-nav-indicator.v139-no-transition { transition: none !important; }

.ca-bottom-nav > .ca-bottom-link,
.ca-bottom-nav > .ca-bottom-button { z-index: 1; }

html:not([data-motion="minimal"]) .ca-bottom-nav .ca-bottom-icon {
  transition:
    transform var(--v139-medium) var(--v139-spring),
    color var(--v139-fast) ease,
    opacity var(--v139-fast) ease !important;
}
html:not([data-motion="minimal"]) .ca-bottom-link.active .ca-bottom-icon,
html:not([data-motion="minimal"]) body[data-active-nav="income"] .ca-bottom-link[data-ca-target="income"] .ca-bottom-icon,
html:not([data-motion="minimal"]) body[data-active-nav="transactions"] .ca-bottom-link[data-ca-target="transactions"] .ca-bottom-icon,
html:not([data-motion="minimal"]) body[data-active-nav="menu"] .ca-bottom-link[data-ca-target="menu"] .ca-bottom-icon,
html:not([data-motion="minimal"]) body[data-active-nav="notifications"] .ca-bottom-link[data-ca-target="notifications"] .ca-bottom-icon,
html:not([data-motion="minimal"]) body[data-active-nav="profile"] .ca-bottom-link[data-ca-target="profile"] .ca-bottom-icon {
  transform: translateY(-2px) scale(1.055) !important;
}

/* Fenêtres / bottom sheets : apparition et disparition continues. */
html[data-ui-theme="standard"] .sheet-backdrop {
  opacity: 0;
  visibility: hidden;
  background: rgba(20,18,15,.13) !important;
  -webkit-backdrop-filter: blur(var(--v139-sheet-blur)) saturate(120%) !important;
  backdrop-filter: blur(var(--v139-sheet-blur)) saturate(120%) !important;
  transition:
    opacity var(--v139-medium) ease,
    visibility var(--v139-medium) allow-discrete,
    display var(--v139-medium) allow-discrete,
    background-color var(--v139-medium) ease,
    -webkit-backdrop-filter var(--v139-medium) ease,
    backdrop-filter var(--v139-medium) ease;
  transition-behavior: allow-discrete;
}

html[data-ui-theme="standard"] .sheet-backdrop.open {
  display: flex;
  opacity: 1;
  visibility: visible;
}

html[data-ui-theme="standard"] .sheet-backdrop > .sheet {
  opacity: 0;
  transform: translate3d(0,var(--v139-sheet-shift),0) scale(.992);
  transform-origin: center bottom;
  transition:
    transform var(--v139-slow) var(--v139-ease),
    opacity var(--v139-medium) ease;
  will-change: transform, opacity;
}

html[data-ui-theme="standard"] .sheet-backdrop.open > .sheet {
  opacity: 1;
  transform: translate3d(0,0,0) scale(1);
}

@starting-style {
  html[data-ui-theme="standard"] .sheet-backdrop.open { opacity: 0; }
  html[data-ui-theme="standard"] .sheet-backdrop.open > .sheet {
    opacity: 0;
    transform: translate3d(0,var(--v139-sheet-shift),0) scale(.992);
  }
}

html[data-ui-theme="standard"][data-theme="light"] .sheet-backdrop > .sheet {
  background: color-mix(in srgb, #fff 91%, transparent) !important;
  -webkit-backdrop-filter: blur(calc(var(--v139-nav-blur) + 4px)) saturate(145%);
  backdrop-filter: blur(calc(var(--v139-nav-blur) + 4px)) saturate(145%);
}
html[data-ui-theme="standard"][data-theme="dark"] .sheet-backdrop > .sheet {
  background: color-mix(in srgb, #15181B 91%, transparent) !important;
  -webkit-backdrop-filter: blur(calc(var(--v139-nav-blur) + 4px)) saturate(135%);
  backdrop-filter: blur(calc(var(--v139-nav-blur) + 4px)) saturate(135%);
}

html[data-motion="economy"] .sheet-backdrop { background: rgba(20,18,15,.17) !important; }
html[data-motion="minimal"] .sheet-backdrop {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: rgba(20,18,15,.22) !important;
}
html[data-motion="minimal"][data-theme="light"] .sheet-backdrop > .sheet {
  background: #fff !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html[data-motion="minimal"][data-theme="dark"] .sheet-backdrop > .sheet {
  background: #15181B !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.sheet-backdrop.dragging,
.sheet-backdrop.dragging > .sheet {
  transition: none !important;
  animation: none !important;
}

/* Changement Accueil <-> Transactions. */
body.v139-main-transition[data-v139-nav-dir="forward"] #income-section:not([hidden]),
body.v139-main-transition[data-v139-nav-dir="forward"] #income-summary:not([hidden]),
body.v139-main-transition[data-v139-nav-dir="forward"] #transactions-hub:not([hidden]),
body.v139-main-transition[data-v139-nav-dir="forward"] #fixed-section:not([hidden]),
body.v139-main-transition[data-v139-nav-dir="forward"] #variable-section:not([hidden]),
body.v139-main-transition[data-v139-nav-dir="forward"] .expense-tabs:not([hidden]) {
  animation: v139-view-in-forward var(--v139-medium) var(--v139-ease) both;
}
body.v139-main-transition[data-v139-nav-dir="back"] #income-section:not([hidden]),
body.v139-main-transition[data-v139-nav-dir="back"] #income-summary:not([hidden]),
body.v139-main-transition[data-v139-nav-dir="back"] #transactions-hub:not([hidden]),
body.v139-main-transition[data-v139-nav-dir="back"] #fixed-section:not([hidden]),
body.v139-main-transition[data-v139-nav-dir="back"] #variable-section:not([hidden]),
body.v139-main-transition[data-v139-nav-dir="back"] .expense-tabs:not([hidden]) {
  animation: v139-view-in-back var(--v139-medium) var(--v139-ease) both;
}

@keyframes v139-view-in-forward {
  from { opacity: .50; transform: translate3d(var(--v139-page-shift),0,0); }
  to { opacity: 1; transform: translate3d(0,0,0); }
}
@keyframes v139-view-in-back {
  from { opacity: .50; transform: translate3d(calc(0px - var(--v139-page-shift)),0,0); }
  to { opacity: 1; transform: translate3d(0,0,0); }
}

/* Sous-pages Réglages / Profil. */
.v139-section-enter[data-v139-section-dir="forward"] {
  animation: v139-section-forward var(--v139-medium) var(--v139-ease) both;
}
.v139-section-enter[data-v139-section-dir="back"] {
  animation: v139-section-back var(--v139-medium) var(--v139-ease) both;
}
@keyframes v139-section-forward {
  from { opacity: .35; transform: translate3d(var(--v139-page-shift),0,0); }
  to { opacity: 1; transform: translate3d(0,0,0); }
}
@keyframes v139-section-back {
  from { opacity: .35; transform: translate3d(calc(0px - var(--v139-page-shift)),0,0); }
  to { opacity: 1; transform: translate3d(0,0,0); }
}

/* Micro-interactions. */
html:not([data-motion="minimal"]) .section-menu-row,
html:not([data-motion="minimal"]) .sheet-button,
html:not([data-motion="minimal"]) .profile-text-button,
html:not([data-motion="minimal"]) .transactions-segmented button,
html:not([data-motion="minimal"]) .expense-tabs button,
html:not([data-motion="minimal"]) .preference-order-actions button {
  transition:
    transform var(--v139-fast) var(--v139-ease),
    opacity var(--v139-fast) ease,
    background-color var(--v139-fast) ease,
    box-shadow var(--v139-fast) ease;
}
html:not([data-motion="minimal"]) .v139-pressed {
  transform: scale(.985) !important;
}

html:not([data-motion="minimal"]) .notification-badge:not([hidden]),
html:not([data-motion="minimal"]) .v112-undo-toast:not([hidden]) {
  animation: v139-pop var(--v139-medium) var(--v139-spring) both;
}
@keyframes v139-pop {
  from { opacity: 0; transform: translate3d(0,7px,0) scale(.96); }
  to { opacity: 1; transform: translate3d(0,0,0) scale(1); }
}

/* Minimal = aucun mouvement, aucun blur coûteux. */
html[data-motion="minimal"] *,
html[data-motion="minimal"] *::before,
html[data-motion="minimal"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  transition-delay: 0ms !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  scroll-behavior: auto !important;
}
html[data-motion="minimal"] .v139-nav-indicator,
html[data-motion="minimal"] .ca-bottom-icon,
html[data-motion="minimal"] .sheet-backdrop,
html[data-motion="minimal"] .sheet-backdrop > .sheet,
html[data-motion="minimal"] .section-menu-row,
html[data-motion="minimal"] .sheet-button,
html[data-motion="minimal"] .profile-text-button {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html[data-motion-preference="auto"] *,
  html[data-motion-preference="auto"] *::before,
  html[data-motion-preference="auto"] *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== SOURCE: v141-transactions-minimal.css ===== */
/* v141.0 — Transactions variables : lecture immédiate, actions rares discrètes. */

body.transactions-mode #variable-section {
  padding-top: 2px !important;
}

body.transactions-mode #variable-section .v141-variable-primary-action {
  margin: 4px 0 18px;
  padding: 0 2px;
}

body.transactions-mode #variable-section .v141-add-expense {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 15px;
  background: var(--ca-accent, #0a8f72);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: -.12px;
  box-shadow: 0 7px 18px rgba(19, 110, 88, .12);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 130ms ease, opacity 130ms ease, box-shadow 160ms ease;
}

body.transactions-mode #variable-section .v141-add-expense > span:first-child {
  font-size: 19px;
  line-height: 1;
  font-weight: 500;
  transform: translateY(-.5px);
}

body.transactions-mode #variable-section .v141-add-expense:active {
  transform: scale(.985);
  opacity: .90;
  box-shadow: 0 3px 10px rgba(19, 110, 88, .10);
}

body.transactions-mode #variable-section .variable-categories {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border-top: 1px solid var(--ui-border, var(--line, #e7eaee));
}

body.transactions-mode #variable-section .v141-variable-category {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border, var(--line, #e7eaee)) !important;
  border-radius: 0 !important;
  background: transparent !important;
  overflow: visible !important;
  box-shadow: none !important;
}

body.transactions-mode #variable-section .v141-category-head {
  padding: 15px 2px 14px !important;
  border: 0 !important;
  background: transparent !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

body.transactions-mode #variable-section .v141-category-head:focus-visible {
  border-radius: 12px !important;
  box-shadow: 0 0 0 3px rgba(24, 125, 100, .15) !important;
}

body.transactions-mode #variable-section .v141-category-topline {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 25px !important;
  gap: 12px !important;
}

body.transactions-mode #variable-section .v141-category-topline .category-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px !important;
  line-height: 1.2 !important;
  font-weight: 760 !important;
  letter-spacing: -.22px !important;
  color: var(--text) !important;
}

body.transactions-mode #variable-section .v141-category-head-right {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

body.transactions-mode #variable-section .v141-category-percent {
  min-width: 42px;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

body.transactions-mode #variable-section .v141-category-percent.over,
body.transactions-mode #variable-section .v141-category-status.over {
  color: #b23a31;
}

body.transactions-mode #variable-section .v141-category-more {
  width: 26px;
  height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1;
  cursor: pointer;
  opacity: .72;
}

body.transactions-mode #variable-section .v141-variable-category.collapsed .v141-category-more {
  display: none;
}

body.transactions-mode #variable-section .v141-category-more:active { opacity: .42; }

body.transactions-mode #variable-section .v141-category-toggle {
  width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  flex: 0 0 22px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: color-mix(in srgb, var(--muted) 78%, transparent) !important;
  box-shadow: none !important;
}

body.transactions-mode #variable-section .v141-category-toggle svg {
  width: 12px !important;
  height: 12px !important;
}

body.transactions-mode #variable-section .v141-category-summary {
  margin-top: 7px;
}

body.transactions-mode #variable-section .v141-category-figures {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

body.transactions-mode #variable-section .v141-category-spent,
body.transactions-mode #variable-section .v141-category-status,
body.transactions-mode #variable-section .v141-category-budget-missing {
  font-size: 11.5px !important;
  line-height: 1.25 !important;
  font-variant-numeric: tabular-nums;
}

body.transactions-mode #variable-section .v141-category-spent {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 620;
}

body.transactions-mode #variable-section .v141-category-status {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 680;
  white-space: nowrap;
}

body.transactions-mode #variable-section .v141-category-budget-missing {
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--ca-accent, #0a8f72) !important;
  font: inherit;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  cursor: pointer;
}

body.transactions-mode #variable-section .v141-category-progress {
  height: 4px !important;
  margin: 8px 0 0 !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--muted) 13%, transparent) !important;
  overflow: hidden !important;
}

body.transactions-mode #variable-section .v141-category-progress .category-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--ca-accent, #0a8f72) !important;
  transition: width 220ms cubic-bezier(.2,.75,.25,1);
}

body.transactions-mode #variable-section .v141-category-progress.over .category-progress-bar {
  background: #b23a31 !important;
}

body.transactions-mode #variable-section .v141-category-list {
  padding: 0 0 8px !important;
  margin: 0 !important;
}

body.transactions-mode #variable-section .v141-category-list .plain-list {
  margin: 0 !important;
}

body.transactions-mode #variable-section .v141-category-list .swipe-content {
  min-height: 46px !important;
  padding: 7px 2px !important;
  cursor: pointer;
}

body.transactions-mode #variable-section .v141-category-list .swipe-content::after {
  left: 0 !important;
  right: 0 !important;
  background: color-mix(in srgb, var(--ui-border, var(--line, #e7eaee)) 76%, transparent) !important;
}

body.transactions-mode #variable-section .v141-category-list .line-title {
  font-size: 13px !important;
  line-height: 1.2 !important;
  font-weight: 590 !important;
  color: var(--text) !important;
}

body.transactions-mode #variable-section .v141-category-list .amount {
  font-size: 12.5px !important;
  line-height: 1 !important;
  font-weight: 710 !important;
  color: var(--text) !important;
}

body.transactions-mode #variable-section .v141-category-empty {
  padding: 9px 2px 3px !important;
  color: var(--muted) !important;
  font-size: 11.5px !important;
}

body.transactions-mode #variable-section .v141-add-category {
  width: auto;
  min-height: 40px;
  margin: 10px 0 4px;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 690;
  cursor: pointer;
  touch-action: manipulation;
}

body.transactions-mode #variable-section .v141-add-category > span:first-child {
  color: var(--ca-accent, #0a8f72);
  font-size: 16px;
  font-weight: 500;
}

body.transactions-mode #variable-section .v141-add-category:active {
  opacity: .58;
}

body.transactions-mode #variable-section .v141-variable-empty {
  padding: 24px 2px 22px;
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--ui-border, var(--line, #e7eaee));
}

body.transactions-mode #variable-section .v141-variable-empty strong {
  font-size: 13px;
  font-weight: 720;
  color: var(--text);
}

body.transactions-mode #variable-section .v141-variable-empty span {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}

/* Création d'une catégorie sans quitter la feuille de dépense. */
#entry-variable-new-category-fields {
  margin-top: 10px;
  padding: 11px 12px 3px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, .66fr);
  gap: 10px;
  border-radius: 13px;
  background: var(--soft);
}

#entry-variable-new-category-fields[hidden] { display: none !important; }

#entry-variable-new-category-fields .v141-inline-category-field {
  display: block;
  min-width: 0;
}

#entry-variable-new-category-fields .v141-inline-category-field > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

#entry-variable-new-category-fields input {
  box-sizing: border-box;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
}

#entry-variable-new-category-fields input:focus {
  border-color: var(--ca-accent, #0a8f72);
}

@media (max-width: 430px) {
  body.transactions-mode #variable-section .v141-add-expense { min-height: 45px; }
  body.transactions-mode #variable-section .v141-category-head { padding-left: 1px !important; padding-right: 1px !important; }
  body.transactions-mode #variable-section .v141-category-list .swipe-content { padding-left: 1px !important; padding-right: 1px !important; }
  #entry-variable-new-category-fields { grid-template-columns: 1fr; gap: 6px; }
}

/* Respect du mode UX v139 : l'ergonomie reste la même sans animation. */
html[data-motion="minimal"] body.transactions-mode #variable-section .v141-add-expense,
html[data-motion="minimal"] body.transactions-mode #variable-section .v141-category-progress .category-progress-bar {
  transition: none !important;
}


/* v142.3 — œil à la place du chevron dans les catégories variables */
body.transactions-mode #variable-section .v141-category-toggle svg {
  width: 14px !important;
  height: 14px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

body.transactions-mode #variable-section .v141-variable-category.collapsed .v141-category-toggle svg {
  transform: none !important;
}


/* v142.4 — œil plus grand, placé juste à droite du nom de catégorie */
body.transactions-mode #variable-section .v141-category-head-left {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

body.transactions-mode #variable-section .v141-category-head-left .category-name {
  flex: 0 1 auto;
}

body.transactions-mode #variable-section .v141-category-toggle {
  width: 26px !important;
  height: 26px !important;
  min-height: 26px !important;
  flex: 0 0 26px !important;
  margin-left: -1px;
  color: color-mix(in srgb, var(--text) 76%, var(--muted) 24%) !important;
  opacity: .88;
}

body.transactions-mode #variable-section .v141-category-toggle svg {
  width: 16px !important;
  height: 16px !important;
}


/* v142.5 — interaction simplifiée : toute la catégorie replie/déplie, aucun œil dédié */
body.transactions-mode #variable-section .v141-category-head-left {
  gap: 0 !important;
}

body.transactions-mode #variable-section .v141-category-head-left .category-name {
  flex: 1 1 auto;
}

body.transactions-mode #variable-section .v141-category-toggle {
  display: none !important;
}


/* v142.6 — roue crantée à la place du menu à trois points */
body.transactions-mode #variable-section .v141-category-more {
  width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  flex: 0 0 30px !important;
  padding: 0 !important;
  color: color-mix(in srgb, var(--text) 68%, var(--muted) 32%) !important;
  opacity: .84 !important;
  letter-spacing: normal !important;
}

body.transactions-mode #variable-section .v141-category-more svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

body.transactions-mode #variable-section .v141-category-more:active {
  opacity: .48 !important;
  transform: scale(.92);
}


/* v142.7 — roue symétrique avec cercle central parfaitement centré */
body.transactions-mode #variable-section .v141-category-more svg circle {
  vector-effect: non-scaling-stroke;
}

/* ===== SOURCE: v1412-undo-swipe.css ===== */
/* v141.2 — Le toast Undo se ferme d'un swipe haut, bas, gauche ou droite. */
.v112-undo-toast {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  will-change: transform, opacity;
}

.v112-undo-toast.v1412-undo-dragging {
  transform: translate3d(var(--v1412-undo-x, 0px), var(--v1412-undo-y, 0px), 0) !important;
  opacity: var(--v1412-undo-opacity, 1) !important;
  transition: none !important;
}

.v112-undo-toast.v1412-undo-returning {
  transform: translate3d(var(--v1412-undo-x, 0px), var(--v1412-undo-y, 0px), 0) !important;
  opacity: var(--v1412-undo-opacity, 1) !important;
  transition: transform 140ms cubic-bezier(.2,.8,.2,1), opacity 140ms ease !important;
}

.v112-undo-toast.v1412-undo-dismissing {
  transform: translate3d(var(--v1412-undo-dismiss-x, 0px), var(--v1412-undo-dismiss-y, 0px), 0) !important;
  opacity: var(--v1412-undo-opacity, 0) !important;
  transition: transform 155ms cubic-bezier(.4,0,1,1), opacity 135ms ease !important;
  pointer-events: none !important;
}

html[data-motion="minimal"] .v112-undo-toast.v1412-undo-returning,
html[data-motion="minimal"] .v112-undo-toast.v1412-undo-dismissing {
  transition-duration: 0.001ms !important;
}

/* ===== SOURCE: v1413-undo-position.css ===== */
/* v141.3 — Undo ancré juste au-dessus de la navigation basse.
   La nav iPhone visible fait ~51px + safe-area après son translateY(5px).
   60px + safe-area laisse environ 9px d'air sans chevauchement. */
@media (max-width: 700px) and (hover: none) and (pointer: coarse) {
  .v112-undo-toast {
    bottom: calc(60px + var(--safe-bottom, 0px)) !important;
  }
}

html.is-ios .v112-undo-toast {
  bottom: calc(60px + var(--safe-bottom, 0px)) !important;
}

/* ===== SOURCE: v1428-global-search.css ===== */
/* v142.8 — loupe plus grande + recherche globale texte et chiffres. */
#global-search-open {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  min-height: 46px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

#global-search-open .v1428-search-icon {
  width: 25px !important;
  height: 25px !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

#global-search-open:active .v1428-search-icon {
  transform: scale(.92);
}

.v1428-global-result {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(28,42,57,.06);
  text-align: left;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.v1428-global-result .v110-search-row-main { min-width: 0; }
.v1428-global-result .v1428-search-kind {
  flex: 0 0 auto;
  max-width: 92px;
  padding: 4px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #187d64) 9%, transparent);
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1;
  font-weight: 760;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v1428-global-result:active { transform: scale(.992); opacity: .72; }

@media (prefers-reduced-motion: reduce) {
  #global-search-open .v1428-search-icon,
  .v1428-global-result { transition: none !important; transform: none !important; }
}

/* ===== SOURCE: v13624-notifications.css ===== */
/* v136.24 — notifications : vrai statut lu/non lu, actions Tout lire / Supprimer. */
.notification-head {
  grid-template-columns: auto 1fr auto !important;
}

.notification-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.notification-head-actions .profile-text-button {
  white-space: nowrap;
}

.notification-row.is-read .notification-copy strong,
.household-activity-row.is-read .household-activity-main {
  font-weight: 580 !important;
}

.notification-row.unread .notification-copy strong,
.household-activity-row.unread .household-activity-main,
.household-activity-row.unread .household-activity-main span,
.household-activity-row.unread .household-activity-main strong {
  font-weight: 780 !important;
  color: #172231 !important;
}

.notification-row.is-read .notification-copy span,
.household-activity-row.is-read .household-activity-main,
.household-activity-row.is-read .household-activity-main span {
  color: #566173 !important;
}

.notification-activity-block .household-activity-list {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.notification-activity-block .household-activity-row {
  width: 100%;
  display: block;
  text-align: left;
  padding: 14px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(23,34,49,.08) !important;
  background: transparent !important;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}

.notification-activity-block .household-activity-row:last-child {
  border-bottom: 0 !important;
}

.notification-activity-block .household-activity-row:active,
.notification-row:active {
  background: rgba(8,127,104,.05) !important;
}

.notification-activity-block .household-activity-meta {
  margin-top: 4px !important;
}

.notification-row {
  cursor: pointer;
}

.notification-row.unread,
.notification-row.is-read {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.notification-row.is-read .notification-dot {
  background: transparent !important;
  border: 1.5px solid rgba(8,127,104,.38);
}

.notification-row.unread .notification-dot {
  background: var(--accent-user) !important;
}

/* ===== SOURCE: v13627-sheets.css ===== */

/* v136.27 — correction agencement entêtes Notifications / Alertes */

#notification-sheet .notification-head,
#alert-sheet .notification-head {
  display:grid !important;
  grid-template-columns:minmax(80px,auto) 1fr auto !important;
  grid-template-areas:
    'close title actions'
    '. subtitle .' !important;
  align-items:start !important;
  column-gap:12px !important;
  row-gap:4px !important;
  padding-bottom:8px !important;
}

#notification-sheet #notification-close,
#alert-sheet #alert-close {
  grid-area:close !important;
  justify-self:start !important;
  align-self:start !important;
  margin:0 !important;
}

#notification-sheet .notification-head > div:first-of-type,
#alert-sheet .notification-head > div:first-of-type {
  grid-area:title / title / subtitle / subtitle !important;
  display:grid !important;
  grid-template-areas:'title' 'subtitle' !important;
  justify-items:center !important;
  align-content:start !important;
  gap:6px !important;
  min-width:0 !important;
  text-align:center !important;
}

#notification-sheet .notification-head > div:first-of-type .settings-sheet-title,
#alert-sheet .notification-head > div:first-of-type .settings-sheet-title {
  grid-area:title !important;
  margin:0 !important;
  line-height:1.05 !important;
  font-size:clamp(26px, 5vw, 40px) !important;
}

#notification-sheet .notification-head > div:first-of-type .settings-sheet-subtitle,
#alert-sheet .notification-head > div:first-of-type .settings-sheet-subtitle {
  grid-area:subtitle !important;
  margin:0 !important;
  max-width:320px !important;
  line-height:1.35 !important;
  font-size:clamp(15px, 3.1vw, 19px) !important;
  color:var(--muted, #6f7891) !important;
  text-align:center !important;
}

#notification-sheet .notification-head-actions,
#alert-sheet .notification-head-actions {
  grid-area:actions !important;
  justify-self:end !important;
  align-self:start !important;
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  gap:14px !important;
  margin:0 !important;
}

#notification-sheet .notification-head-actions .profile-text-button,
#alert-sheet .notification-head-actions .profile-text-button {
  white-space:nowrap !important;
  padding:0 !important;
  min-height:auto !important;
}

@media (max-width:640px) {
  #notification-sheet .notification-head,
  #alert-sheet .notification-head {
    grid-template-columns:minmax(70px,auto) 1fr auto !important;
    column-gap:10px !important;
  }

  #notification-sheet .notification-head > div:first-of-type .settings-sheet-title,
  #alert-sheet .notification-head > div:first-of-type .settings-sheet-title {
    font-size:clamp(22px, 4.8vw, 32px) !important;
  }

  #notification-sheet .notification-head > div:first-of-type .settings-sheet-subtitle,
  #alert-sheet .notification-head > div:first-of-type .settings-sheet-subtitle {
    max-width:250px !important;
    font-size:clamp(13px, 3.5vw, 17px) !important;
  }

  #notification-sheet .notification-head-actions,
  #alert-sheet .notification-head-actions {
    gap:10px !important;
  }
}

/* ===== SOURCE: v13629-bottom-nav-notifications.css ===== */
/* v136.29 — onglet Notifications dans la navigation basse */
.ca-bottom-link,
.ca-bottom-button {
  position: relative;
}

#ca-bottom-notifications {
  min-width: 0;
}

#ca-bottom-notifications > span:last-child {
  font-size: 9.2px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

#ca-bottom-notification-badge {
  top: 0px;
  left: calc(50% + 2px);
  right: auto;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  font-size: 8px;
  border-width: 2px;
}

/* ===== SOURCE: v13630-nav-fixes.css ===== */
/* v136.30 — retirer la cloche du header et recentrer la navigation basse */
#notification-open {
  display: none !important;
}

.v110-header-actions {
  gap: 12px;
}

.ca-bottom-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  justify-items: stretch !important;
  align-items: stretch !important;
  gap: 0 !important;
  padding: 0 max(4px, calc(var(--safe-right) + 4px)) calc(var(--safe-bottom) + 2px) max(4px, calc(var(--safe-left) + 4px)) !important;
}

.ca-bottom-nav > .ca-bottom-link,
.ca-bottom-nav > .ca-bottom-button {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 2px !important;
  text-align: center !important;
}

.ca-bottom-nav > .ca-bottom-link > span:last-child,
.ca-bottom-nav > .ca-bottom-button > span:last-child {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  white-space: nowrap !important;
  line-height: 1.05 !important;
  font-size: 9.2px !important;
}

.ca-bottom-nav .ca-bottom-icon,
.ca-bottom-nav .ca-bottom-icon-frame {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#ca-bottom-notifications > span:last-child {
  font-size: 8.5px !important;
  letter-spacing: -0.01em;
}

body[data-active-nav="notifications"] .ca-bottom-link[data-ca-target="notifications"] {
  color: var(--ca-accent) !important;
  font-weight: 750 !important;
}

body[data-active-nav="notifications"] .ca-bottom-link[data-ca-target="notifications"] .ca-bottom-icon,
body[data-active-nav="notifications"] .ca-bottom-link[data-ca-target="notifications"] .ca-bottom-icon path,
body[data-active-nav="notifications"] .ca-bottom-link[data-ca-target="notifications"] .ca-bottom-icon rect,
body[data-active-nav="notifications"] .ca-bottom-link[data-ca-target="notifications"] .ca-bottom-icon circle,
body[data-active-nav="notifications"] .ca-bottom-link[data-ca-target="notifications"] .ca-bottom-icon line,
body[data-active-nav="notifications"] .ca-bottom-link[data-ca-target="notifications"] .ca-bottom-icon polyline {
  stroke: currentColor !important;
}

body[data-active-nav="notifications"] .ca-bottom-link[data-ca-target="notifications"] .ca-bottom-icon {
  transform: translateY(-1px);
  stroke-width: 2.25 !important;
}

/* ===== SOURCE: v143-main-pages.css ===== */
/* v143.0 — Réglages, Notifications et Profil deviennent des pages principales. */

body.app-main-page-open > main.page {
  visibility: hidden !important;
  pointer-events: none !important;
}

#month-settings-sheet.app-main-page,
#profile-sheet.app-main-page,
#notification-sheet.app-main-page {
  position: fixed !important;
  inset: 0 !important;
  z-index: 17 !important; /* sous la navigation basse */
  display: none !important;
  align-items: stretch !important;
  justify-content: center !important;
  padding: 0 !important;
  background: var(--paper, #fff) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  overflow: hidden !important;
}

#month-settings-sheet.app-main-page.open,
#profile-sheet.app-main-page.open,
#notification-sheet.app-main-page.open {
  display: flex !important;
  animation: v143PageIn 220ms cubic-bezier(.2,.8,.2,1) both;
}

@keyframes v143PageIn {
  from { opacity: .01; transform: translate3d(10px,0,0); }
  to   { opacity: 1; transform: translate3d(0,0,0); }
}

html[data-motion="minimal"] #month-settings-sheet.app-main-page.open,
html[data-motion="minimal"] #profile-sheet.app-main-page.open,
html[data-motion="minimal"] #notification-sheet.app-main-page.open {
  animation: none !important;
}

#month-settings-sheet.app-main-page > .app-main-page-surface,
#profile-sheet.app-main-page > .app-main-page-surface,
#notification-sheet.app-main-page > .app-main-page-surface {
  position: relative !important;
  width: min(100%, 930px) !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: none !important;
  margin: 0 auto !important;
  padding: max(22px, calc(var(--safe-top, 0px) + 18px)) max(18px, calc(var(--safe-right, 0px) + 18px)) calc(var(--safe-bottom, 0px) + 78px) max(18px, calc(var(--safe-left, 0px) + 18px)) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: var(--paper, #fff) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#month-settings-sheet .sheet-drag-zone,
#profile-sheet .sheet-drag-zone,
#month-settings-sheet .sheet-handle,
#profile-sheet .sheet-handle,
#notification-sheet #notification-close,
#notification-sheet .v142-head-balance {
  display: none !important;
}

#month-settings-sheet .sheet-scroll-content,
#profile-sheet .sheet-scroll-content {
  height: 100% !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: contain !important;
  padding: 0 0 26px !important;
  scrollbar-width: none;
}
#month-settings-sheet .sheet-scroll-content::-webkit-scrollbar,
#profile-sheet .sheet-scroll-content::-webkit-scrollbar { display:none; }

/* Un vrai en-tête de page, sans langage de modale. */
#month-settings-sheet .settings-sheet-title,
#profile-sheet #profile-sheet-title {
  font-size: clamp(28px, 6vw, 36px) !important;
  line-height: 1.05 !important;
  letter-spacing: -.65px !important;
  margin-top: 0 !important;
}

/* Notifications conserve son système de 2 volets et son morph au scroll. */
#notification-sheet .v142-notification-panel {
  display: flex !important;
  flex-direction: column !important;
}
#notification-sheet .v142-notification-head.notification-head {
  display: block !important;
  padding: 0 0 12px !important;
}
#notification-sheet .v142-notification-heading {
  text-align: left !important;
}
#notification-sheet .v142-notification-heading .settings-sheet-title {
  font-size: clamp(28px, 6vw, 36px) !important;
  text-align: left !important;
}
#notification-sheet .v142-notification-stage {
  min-height: 0 !important;
  flex: 1 1 auto !important;
}
#notification-sheet .v142-notification-scroll {
  height: 100% !important;
  max-height: none !important;
  padding-bottom: 22px !important;
}

/* La navigation basse reste exactement au-dessus des pages. */
body.app-main-page-open .ca-bottom-nav {
  z-index: 60 !important;
}

@media (min-width: 900px) and (hover:hover) and (pointer:fine) {
  #month-settings-sheet.app-main-page,
  #profile-sheet.app-main-page,
  #notification-sheet.app-main-page {
    background: linear-gradient(180deg, #F3F5F7 0%, #EEF2F5 100%) !important;
  }
  #month-settings-sheet.app-main-page > .app-main-page-surface,
  #profile-sheet.app-main-page > .app-main-page-surface,
  #notification-sheet.app-main-page > .app-main-page-surface {
    width: 100% !important;
    max-width: none !important;
    padding: 34px clamp(36px, 3.6vw, 58px) 96px !important;
    background: transparent !important;
  }
}

/* ===== SOURCE: v13625-alerts.css ===== */
/* v136.25 — Alertes : même système que Notifications, sans corbeille. */

#alert-sheet .notification-head-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
}

#alert-sheet .notification-head-actions .profile-text-button {
  white-space: nowrap !important;
}

#alert-list .alert-row {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 100% !important;
  grid-template-columns: 8px minmax(0,1fr) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line, #e7eaee) !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 13px 0 !important;
  text-align: left !important;
  cursor: pointer !important;
  color: inherit !important;
  font: inherit !important;
  box-shadow: none !important;
}

#alert-list .alert-row:last-child {
  border-bottom: 0 !important;
}

#alert-list .alert-row:active {
  background: rgba(15, 136, 110, .05) !important;
}

#alert-list .alert-row .notification-copy {
  min-width: 0 !important;
}

#alert-list .alert-row.unread .notification-copy strong,
#alert-list .alert-row.unread .notification-copy > span {
  font-weight: 800 !important;
  color: var(--ink, #172231) !important;
}

#alert-list .alert-row.is-read .notification-copy strong {
  font-weight: 600 !important;
  color: var(--ink, #172231) !important;
}

#alert-list .alert-row.is-read .notification-copy > span {
  font-weight: 500 !important;
  color: var(--muted, #657084) !important;
}

#alert-list .alert-row.unread .notification-dot {
  background: var(--accent-user, #0f886e) !important;
  border: 0 !important;
}

#alert-list .alert-row.is-read .notification-dot {
  background: transparent !important;
  border: 1.5px solid rgba(15, 136, 110, .38) !important;
}

#alert-list .alert-row.is-read {
  opacity: .78 !important;
}

/* ===== SOURCE: v142-notification-center.css ===== */
/* v142.0 — Notifications Center : deux volets, morph au scroll, listes longues fluides. */

/* L'ancienne alerte séparée n'existe plus. Protection pour anciens caches. */
#alert-open,
#alert-sheet,
#alert-badge { display:none !important; }

.v142-notification-panel {
  box-sizing:border-box !important;
  width:min(720px, 100%) !important;
  height:min(84dvh, 760px) !important;
  max-height:min(84dvh, 760px) !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
  padding:16px 18px calc(var(--safe-bottom, 0px) + 82px) !important;
}

.v142-notification-head.notification-head {
  flex:0 0 auto !important;
  display:grid !important;
  grid-template-columns:minmax(72px,1fr) minmax(0,2fr) minmax(72px,1fr) !important;
  align-items:start !important;
  gap:8px !important;
  margin:0 !important;
  padding:1px 0 10px !important;
}
.v142-notification-head #notification-close {
  grid-column:1 !important;
  justify-self:start !important;
  align-self:start !important;
  margin:0 !important;
}
.v142-notification-heading {
  grid-column:2 !important;
  min-width:0 !important;
  text-align:center !important;
}
.v142-notification-heading .settings-sheet-title {
  margin:0 !important;
  font-size:clamp(25px, 5vw, 34px) !important;
  line-height:1.05 !important;
}
.v142-notification-heading .settings-sheet-subtitle {
  margin:5px auto 0 !important;
  max-width:320px !important;
  color:var(--muted, #6f7891) !important;
  font-size:13px !important;
  line-height:1.28 !important;
}
.v142-head-balance { grid-column:3 !important; }

/* Même langage visuel que Charges récurrentes / Dépenses variables. */
.v142-notification-tabs {
  --nt-notifications-fr:1fr;
  --nt-alerts-fr:1fr;
  --nt-gap:20px;
  --nt-underline-inset:16%;
  --nt-inactive-opacity:1;
  --nt-active-size:13px;
  position:relative !important;
  flex:0 0 auto !important;
  display:grid !important;
  grid-template-columns:minmax(0,var(--nt-notifications-fr)) minmax(0,var(--nt-alerts-fr)) !important;
  gap:var(--nt-gap) !important;
  width:100% !important;
  border:0 !important;
  border-bottom:1px solid var(--ui-border, var(--line, #e7eaee)) !important;
  background:color-mix(in srgb, var(--paper, #fff) 94%, transparent) !important;
  transition:grid-template-columns 70ms linear, gap 70ms linear, box-shadow 180ms ease, background-color 180ms ease !important;
  z-index:3 !important;
}
.v142-notification-tabs.is-scrolled {
  background:color-mix(in srgb, var(--paper, #fff) 86%, transparent) !important;
  -webkit-backdrop-filter:blur(18px) saturate(150%) !important;
  backdrop-filter:blur(18px) saturate(150%) !important;
  box-shadow:0 10px 20px rgba(20,28,35,.055) !important;
}
.v142-notification-tabs button {
  position:relative !important;
  box-sizing:border-box !important;
  width:100% !important;
  min-width:0 !important;
  min-height:54px !important;
  padding:3px 4px 10px !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  color:var(--ui-muted, var(--muted)) !important;
  font:inherit !important;
  overflow:hidden !important;
  opacity:var(--nt-inactive-opacity) !important;
  transition:opacity 90ms linear, color 180ms ease, transform 180ms cubic-bezier(.22,.8,.24,1) !important;
}
.v142-notification-tabs button.active {
  color:var(--ink, var(--text)) !important;
  opacity:1 !important;
}
.v142-notification-tabs button::after {
  content:'' !important;
  position:absolute !important;
  left:var(--nt-underline-inset) !important;
  right:var(--nt-underline-inset) !important;
  bottom:-1px !important;
  height:2px !important;
  border-radius:999px !important;
  background:transparent !important;
  transition:left 90ms linear, right 90ms linear, background-color 160ms ease !important;
}
.v142-notification-tabs button.active::after { background:var(--accent-user, var(--ca-accent)) !important; }
.v142-notification-tabs.is-maximized button:not(.active) { opacity:0 !important; pointer-events:none !important; }
.v142-notification-tabs button.active .v142-tab-title { font-size:var(--nt-active-size) !important; }
.v142-tab-stack {
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:2px !important;
  width:100% !important;
  min-width:0 !important;
}
.v142-tab-title {
  display:block !important;
  width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  text-align:center !important;
  font-size:13px !important;
  font-weight:700 !important;
  line-height:1.08 !important;
  transition:font-size 90ms linear !important;
}
.v142-tab-count {
  display:block !important;
  width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  text-align:center !important;
  color:var(--muted, #6f7891) !important;
  font-size:10.5px !important;
  font-weight:650 !important;
  line-height:1.05 !important;
}
.v142-notification-tabs button.active .v142-tab-count { color:color-mix(in srgb, var(--ink) 70%, var(--muted) 30%) !important; }

.v142-notification-toolbar {
  flex:0 0 auto !important;
  min-height:38px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:16px !important;
  padding:6px 2px 5px !important;
  border-bottom:1px solid rgba(23,34,49,.055) !important;
}
.v142-notification-toolbar .profile-text-button {
  min-height:28px !important;
  padding:0 !important;
  white-space:nowrap !important;
}

.v142-notification-stage {
  position:relative !important;
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow:hidden !important;
}
.v142-notification-scroll {
  box-sizing:border-box !important;
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:contain !important;
  -webkit-overflow-scrolling:touch !important;
  scrollbar-width:none !important;
  padding:2px 0 20px !important;
  outline:none !important;
}
.v142-notification-scroll::-webkit-scrollbar { display:none !important; }
.v142-notification-scroll[hidden] { display:none !important; }

/* Les sous-listes ne scrollent plus chacune de leur côté : un seul scroll naturel par volet. */
.v142-notification-scroll .notification-list,
.v142-notification-scroll .household-activity-list {
  max-height:none !important;
  overflow:visible !important;
}
.v142-notification-scroll .notification-list { display:block !important; }
.v142-notification-scroll .notification-row,
.v142-notification-scroll #alert-list .alert-row {
  min-height:58px !important;
  padding:13px 0 !important;
}
.v142-notification-scroll .notification-empty,
.v142-notification-scroll .profile-empty {
  padding:28px 2px !important;
  text-align:center !important;
}
.notification-activity-block {
  margin:0 !important;
  padding:0 0 8px !important;
  border-bottom:1px solid var(--ui-border, var(--line, #e7eaee)) !important;
}
.notification-subsection-head {
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  padding:12px 0 5px !important;
}
.notification-subsection-title {
  font-size:12px !important;
  font-weight:760 !important;
  letter-spacing:.01em !important;
  color:var(--muted, #6f7891) !important;
}

/* Transition latérale courte au changement de volet. */
.v142-panel-enter[data-v142-dir="forward"] { animation:v142-panel-forward 260ms cubic-bezier(.22,.8,.24,1) both; }
.v142-panel-enter[data-v142-dir="back"] { animation:v142-panel-back 260ms cubic-bezier(.22,.8,.24,1) both; }
@keyframes v142-panel-forward { from { opacity:.3; transform:translate3d(16px,0,0); } to { opacity:1; transform:translate3d(0,0,0); } }
@keyframes v142-panel-back { from { opacity:.3; transform:translate3d(-16px,0,0); } to { opacity:1; transform:translate3d(0,0,0); } }

html[data-motion="economy"] .v142-notification-tabs.is-scrolled {
  -webkit-backdrop-filter:blur(6px) !important;
  backdrop-filter:blur(6px) !important;
  box-shadow:none !important;
}
html[data-motion="minimal"] .v142-notification-tabs,
html[data-motion="minimal"] .v142-notification-tabs button,
html[data-motion="minimal"] .v142-notification-tabs button::after {
  transition:none !important;
}
html[data-motion="minimal"] .v142-notification-tabs.is-scrolled {
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
  box-shadow:none !important;
  background:var(--paper, #fff) !important;
}

html[data-theme="dark"] .v142-notification-tabs.is-scrolled,
html[data-ui-theme="oled"] .v142-notification-tabs.is-scrolled {
  background:color-mix(in srgb, var(--paper) 88%, transparent) !important;
  box-shadow:0 10px 22px rgba(0,0,0,.22) !important;
}

@media (max-width:640px) {
  .v142-notification-panel {
    width:100% !important;
    height:min(86dvh, 760px) !important;
    max-height:min(86dvh, 760px) !important;
    padding-left:16px !important;
    padding-right:16px !important;
  }
  .v142-notification-head.notification-head {
    grid-template-columns:72px minmax(0,1fr) 72px !important;
  }
  .v142-notification-heading .settings-sheet-title { font-size:26px !important; }
  .v142-notification-heading .settings-sheet-subtitle { font-size:12.5px !important; }
}

@media (max-width:360px) {
  .v142-notification-panel { padding-left:13px !important; padding-right:13px !important; }
  .v142-notification-head.notification-head { grid-template-columns:64px minmax(0,1fr) 64px !important; }
  .v142-tab-count { font-size:9.7px !important; }
}

/* Neutralisation explicite des anciens layouts v136 à forte spécificité. */
#notification-sheet .v142-notification-head.notification-head {
  grid-template-columns:minmax(72px,1fr) minmax(0,2fr) minmax(72px,1fr) !important;
  grid-template-areas:none !important;
  column-gap:8px !important;
  row-gap:0 !important;
  padding:1px 0 10px !important;
}
#notification-sheet .v142-notification-head #notification-close {
  grid-area:auto !important;
  grid-column:1 !important;
  grid-row:1 !important;
}
#notification-sheet .v142-notification-head > .v142-notification-heading:first-of-type {
  grid-area:auto !important;
  grid-column:2 !important;
  grid-row:1 !important;
  display:block !important;
  justify-items:normal !important;
  align-content:normal !important;
  gap:0 !important;
  text-align:center !important;
}
#notification-sheet .v142-notification-heading .settings-sheet-title {
  grid-area:auto !important;
  font-size:clamp(25px, 5vw, 34px) !important;
}
#notification-sheet .v142-notification-heading .settings-sheet-subtitle {
  grid-area:auto !important;
  max-width:320px !important;
  font-size:13px !important;
}
#notification-sheet .v142-head-balance {
  grid-column:3 !important;
  grid-row:1 !important;
}

@media (max-width:640px) {
  #notification-sheet .v142-notification-head.notification-head {
    grid-template-columns:72px minmax(0,1fr) 72px !important;
    column-gap:8px !important;
  }
  #notification-sheet .v142-notification-heading .settings-sheet-title { font-size:26px !important; }
  #notification-sheet .v142-notification-heading .settings-sheet-subtitle { max-width:260px !important; font-size:12.5px !important; }
}
@media (max-width:360px) {
  #notification-sheet .v142-notification-head.notification-head {
    grid-template-columns:64px minmax(0,1fr) 64px !important;
  }
}

/* ===== SOURCE: v1431-flat-main-pages.css ===== */
/* v143.1 — Réglages et Profil sont de vraies pages : aucun arrondi de sheet. */
html #month-settings-sheet.app-main-page,
html #profile-sheet.app-main-page {
  border: 0 !important;
  border-radius: 0 !important;
  clip-path: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  background: var(--paper, #fff) !important;
}

html #month-settings-sheet.app-main-page > .app-main-page-surface,
html #profile-sheet.app-main-page > .app-main-page-surface,
html.is-ios #month-settings-sheet.app-main-page > .sheet.app-main-page-surface,
html.is-ios #profile-sheet.app-main-page > .sheet.app-main-page-surface,
html[data-ui-theme="standard"] #month-settings-sheet.app-main-page > .sheet.app-main-page-surface,
html[data-ui-theme="standard"] #profile-sheet.app-main-page > .sheet.app-main-page-surface {
  inset: auto !important;
  width: 100% !important;
  max-width: none !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  border: 0 !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  clip-path: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  background: var(--paper, #fff) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Neutralise aussi les pseudo-éléments hérités d'anciens skins/sheets. */
html #month-settings-sheet.app-main-page > .app-main-page-surface::before,
html #month-settings-sheet.app-main-page > .app-main-page-surface::after,
html #profile-sheet.app-main-page > .app-main-page-surface::before,
html #profile-sheet.app-main-page > .app-main-page-surface::after {
  border-radius: 0 !important;
  clip-path: none !important;
}

/* ===== SOURCE: v1432-tab-swipe.css ===== */
/* v143.2 — transition latérale entre les 5 pages de la navigation basse. */
html {
  --v1432-tab-duration: 320ms;
  --v1432-tab-ease: cubic-bezier(.22,.78,.22,1);
}
html[data-motion="economy"] { --v1432-tab-duration: 210ms; }
html[data-motion="minimal"] { --v1432-tab-duration: 0ms; }

body.v1432-tab-transition {
  overflow-x: hidden !important;
}

/* Snapshot visuel de la page quittée. La nav basse reste au-dessus. */
.v1432-swipe-ghost {
  position: fixed;
  inset: 0;
  z-index: 49;
  overflow: hidden;
  pointer-events: none;
  contain: paint;
  background: var(--paper, #fff);
  will-change: transform;
}
html[data-theme="dark"] .v1432-swipe-ghost { background: var(--paper, #15181b); }

.v1432-swipe-ghost.v1432-out-left {
  animation: v1432-out-left var(--v1432-tab-duration) var(--v1432-tab-ease) both;
}
.v1432-swipe-ghost.v1432-out-right {
  animation: v1432-out-right var(--v1432-tab-duration) var(--v1432-tab-ease) both;
}

/* La vraie page entrante se déplace sous la navigation fixe. */
body.v1432-tab-transition > main.page.v1432-in-right,
body.v1432-tab-transition > #month-settings-sheet.v1432-in-right,
body.v1432-tab-transition > #notification-sheet.v1432-in-right,
body.v1432-tab-transition > #profile-sheet.v1432-in-right {
  animation: v1432-in-right var(--v1432-tab-duration) var(--v1432-tab-ease) both !important;
  will-change: transform;
}
body.v1432-tab-transition > main.page.v1432-in-left,
body.v1432-tab-transition > #month-settings-sheet.v1432-in-left,
body.v1432-tab-transition > #notification-sheet.v1432-in-left,
body.v1432-tab-transition > #profile-sheet.v1432-in-left {
  animation: v1432-in-left var(--v1432-tab-duration) var(--v1432-tab-ease) both !important;
  will-change: transform;
}

@keyframes v1432-in-right {
  from { transform: translate3d(100%,0,0); }
  to   { transform: translate3d(0,0,0); }
}
@keyframes v1432-in-left {
  from { transform: translate3d(-100%,0,0); }
  to   { transform: translate3d(0,0,0); }
}
@keyframes v1432-out-left {
  from { transform: translate3d(0,0,0); }
  to   { transform: translate3d(-100%,0,0); }
}
@keyframes v1432-out-right {
  from { transform: translate3d(0,0,0); }
  to   { transform: translate3d(100%,0,0); }
}

/* Les anciennes animations d'entrée ne doivent pas se superposer au swipe. */
body.v1432-tab-transition.v139-main-transition #income-section:not([hidden]),
body.v1432-tab-transition.v139-main-transition #income-summary:not([hidden]),
body.v1432-tab-transition.v139-main-transition #transactions-hub:not([hidden]),
body.v1432-tab-transition.v139-main-transition #fixed-section:not([hidden]),
body.v1432-tab-transition.v139-main-transition #variable-section:not([hidden]),
body.v1432-tab-transition.v139-main-transition .expense-tabs:not([hidden]) {
  animation: none !important;
}
body.v1432-tab-transition #month-settings-sheet.app-main-page.open,
body.v1432-tab-transition #notification-sheet.app-main-page.open,
body.v1432-tab-transition #profile-sheet.app-main-page.open {
  /* v143PageIn est remplacée par v1432-in-* sur le root. */
  animation-name: none;
}
body.v1432-tab-transition #month-settings-sheet.app-main-page.open.v1432-in-right,
body.v1432-tab-transition #notification-sheet.app-main-page.open.v1432-in-right,
body.v1432-tab-transition #profile-sheet.app-main-page.open.v1432-in-right {
  animation: v1432-in-right var(--v1432-tab-duration) var(--v1432-tab-ease) both !important;
}
body.v1432-tab-transition #month-settings-sheet.app-main-page.open.v1432-in-left,
body.v1432-tab-transition #notification-sheet.app-main-page.open.v1432-in-left,
body.v1432-tab-transition #profile-sheet.app-main-page.open.v1432-in-left {
  animation: v1432-in-left var(--v1432-tab-duration) var(--v1432-tab-ease) both !important;
}

/* Ombre très légère sur le bord de la page entrante : effet de pile native. */
html:not([data-motion="minimal"]) body.v1432-tab-transition > .v1432-in-right::before,
html:not([data-motion="minimal"]) body.v1432-tab-transition > .v1432-in-left::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  box-shadow: 0 0 24px rgba(0,0,0,.055);
}

html[data-motion="minimal"] .v1432-swipe-ghost,
html[data-motion="minimal"] .v1432-in-right,
html[data-motion="minimal"] .v1432-in-left {
  animation: none !important;
}

/* ===== SOURCE: v1433-horizontal-tabs.css ===== */
/* v143.3 — transitions d'onglets strictement horizontales.
   Les anciennes animations de sheet ne doivent plus ajouter de mouvement vertical/diagonal. */

/* Réglages / Notifications / Profil sont désormais des pages : leur surface interne reste fixe.
   Seul le root app-main-page est animé par v1432-tab-swipe.css. */
html #month-settings-sheet.app-main-page > .app-main-page-surface,
html #notification-sheet.app-main-page > .app-main-page-surface,
html #profile-sheet.app-main-page > .app-main-page-surface,
html[data-ui-theme="standard"] #month-settings-sheet.app-main-page > .sheet,
html[data-ui-theme="standard"] #notification-sheet.app-main-page > .sheet,
html[data-ui-theme="standard"] #profile-sheet.app-main-page > .sheet {
  opacity: 1 !important;
  transform: translate3d(0,0,0) !important;
  transform-origin: 50% 50% !important;
  transition: none !important;
  animation: none !important;
  will-change: auto !important;
}

/* Même règle pour le snapshot de la page quittée : aucune animation interne ne doit
   s'ajouter au translateX du ghost. */
body.v1432-tab-transition .v1432-swipe-ghost .app-main-page-surface,
body.v1432-tab-transition .v1432-swipe-ghost .sheet {
  opacity: 1 !important;
  transform: translate3d(0,0,0) !important;
  transform-origin: 50% 50% !important;
  transition: none !important;
  animation: none !important;
  will-change: auto !important;
}

/* Les roots entrant/sortant sont contraints à un repère horizontal pur. */
body.v1432-tab-transition > #month-settings-sheet.app-main-page,
body.v1432-tab-transition > #notification-sheet.app-main-page,
body.v1432-tab-transition > #profile-sheet.app-main-page,
body.v1432-tab-transition > main.page {
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  margin: 0 !important;
  transform-origin: 50% 50% !important;
}

/* Évite qu'une transition héritée continue après la fin du swipe. */
#month-settings-sheet.app-main-page.open,
#notification-sheet.app-main-page.open,
#profile-sheet.app-main-page.open {
  transition: none !important;
}

/* ===== SOURCE: v1434-stable-tabs.css ===== */
/* v143.4 — stabilisation finale des transitions de navigation.
   Le swipe v1432 est l'unique animation autorisée entre les 5 onglets. */

/* Les anciennes entrées de pages utilitaires ne doivent jamais redémarrer
   lorsque la classe v1432-in-* est retirée à la fin du swipe. */
#month-settings-sheet.app-main-page.open,
#notification-sheet.app-main-page.open,
#profile-sheet.app-main-page.open {
  animation: none !important;
}

/* Accueil <-> Transactions utilisait encore le moteur v139 en parallèle.
   v1432 le remplace désormais entièrement pour la navigation basse. */
body.v139-main-transition #income-section:not([hidden]),
body.v139-main-transition #income-summary:not([hidden]),
body.v139-main-transition #transactions-hub:not([hidden]),
body.v139-main-transition #fixed-section:not([hidden]),
body.v139-main-transition #variable-section:not([hidden]),
body.v139-main-transition .expense-tabs:not([hidden]) {
  animation: none !important;
  transform: none !important;
  opacity: 1 !important;
}

/* Quand Réglages ou Profil est ouvert depuis la barre basse, showMenu() émet
   encore l'événement d'animation de sous-page. Pendant le swipe principal,
   cette micro-animation doit être neutralisée pour éviter le rebond du texte. */
body.v1432-tab-transition .v139-section-enter,
body.v1432-tab-transition #settings-menu-view,
body.v1432-tab-transition #profile-menu-view {
  animation: none !important;
  transition: none !important;
  transform: none !important;
  opacity: 1 !important;
}

/* La surface d'une page utilitaire reste parfaitement stable au frame final. */
#month-settings-sheet.app-main-page > .app-main-page-surface,
#notification-sheet.app-main-page > .app-main-page-surface,
#profile-sheet.app-main-page > .app-main-page-surface {
  transform: translate3d(0,0,0) !important;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Le contenu du snapshot ne doit jamais lancer une animation lors du clonage. */
.v1432-swipe-ghost *,
body.v1432-tab-transition > .v1432-in-right .v139-section-enter,
body.v1432-tab-transition > .v1432-in-left .v139-section-enter {
  animation: none !important;
}

/* ===== SOURCE: v1436-profile-sections.css ===== */
/* v143.6 — Profil : Budgets/Foyer et Sécurité/Confidentialité séparés. */
/* v131 — multi-budgets : sélecteur plat, personnel + partagés. */

#profile-budgets-details .budget-space-list {
  width: 100%;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ui-border, var(--line, #e7eaee));
}

#profile-budgets-details .budget-space-row {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid var(--ui-border, var(--line, #e7eaee));
  border-radius: 0;
  background: transparent;
  color: var(--text, #111827);
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: none;
}

#profile-budgets-details .budget-space-row:disabled {
  opacity: 1;
  cursor: default;
}

#profile-budgets-details .budget-space-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

#profile-budgets-details .budget-space-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 740;
  letter-spacing: -.12px;
}

#profile-budgets-details .budget-space-copy small {
  color: var(--muted, #737b89);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 560;
}

#profile-budgets-details .budget-space-row.active .budget-space-copy strong,
#profile-budgets-details .budget-space-row.active .budget-space-end {
  color: var(--accent, #087f69);
}

#profile-budgets-details .budget-space-end {
  flex: 0 0 auto;
  color: var(--muted, #9aa1ad);
  font-size: 18px;
  font-weight: 700;
}

#profile-budgets-details .budget-create-shared {
  margin: 10px 0 4px;
  padding-left: 2px !important;
}

#profile-budgets-details .budget-active-label {
  margin-top: 24px;
}

#profile-budgets-details .household-summary {
  margin-top: 0 !important;
}

html[data-theme="dark"] #profile-budgets-details .budget-space-row {
  color: var(--text, #f4f5f7);
}

@media (hover:hover) and (pointer:fine) {
  #profile-budgets-details .budget-space-row:not(:disabled):hover {
    background: color-mix(in srgb, var(--soft, #f5f7f6) 72%, transparent);
  }
}


#profile-privacy-details .privacy-settings-list {
  margin-top: 0;
}
#profile-privacy-details .settings-row {
  min-height: 58px;
}
#profile-budgets-details .household-message {
  margin-top: 12px;
}


/* v143.7 — confidentialité : titre et description réellement empilés */
#profile-privacy-details .privacy-settings-list .settings-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  min-height: 72px !important;
}

#profile-privacy-details .privacy-settings-list .settings-row > span:first-child {
  display: flex !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 5px !important;
}

#profile-privacy-details .privacy-settings-list .settings-row strong,
#profile-privacy-details .privacy-settings-list .settings-row small {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#profile-privacy-details .privacy-settings-list .settings-row strong {
  font-size: 15px !important;
  line-height: 1.22 !important;
  font-weight: 720 !important;
  color: var(--text) !important;
}

#profile-privacy-details .privacy-settings-list .settings-row small {
  font-size: 11.5px !important;
  line-height: 1.35 !important;
  font-weight: 500 !important;
  color: var(--muted) !important;
  white-space: normal !important;
}

#profile-privacy-details .privacy-settings-list .ios-switch {
  flex: 0 0 auto !important;
  align-self: center !important;
}


/* v143.10 — Budgets : action "Rejoindre un budget" simplifiée et épurée */
#profile-budgets-details .budget-actions-stack {
  margin: 10px 0 2px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

#profile-budgets-details .budget-join-link,
#profile-budgets-details .budget-create-shared {
  margin: 0 !important;
  padding: 8px 2px !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  font-weight: 690 !important;
}

#profile-budgets-details .budget-join-link {
  color: var(--accent, #087f69) !important;
  opacity: 1 !important;
}

#profile-budgets-details .household-join-panel {
  margin: 6px 0 12px !important;
}

/* ===== SOURCE: v1438-profile-activity.css ===== */
/* v143.8 — Profil : activité séparée du foyer. */
#profile-household-details .household-members-list { margin-bottom: 0 !important; }
#profile-household-details .household-join-settings-list {
  margin: 0 0 10px !important; padding: 0 !important; border: 0 !important;
  border-radius: 0 !important; background: transparent !important; box-shadow: none !important;
}
#profile-household-details .household-join-settings-list .settings-row {
  min-height: 54px !important; margin: 0 !important; padding: 10px 2px !important;
  border: 0 !important; border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  border-radius: 0 !important; background: transparent !important; box-shadow: none !important;
}
#profile-household-details .household-join-panel { margin: 2px 0 12px !important; }
#profile-activity-details .section-page-content { padding-top: 0 !important; }
#profile-activity-details .v1438-activity-head { justify-content: flex-end !important; margin: 0 0 5px !important; }
#profile-activity-details .v137-household-profile-activity {
  margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
  background: transparent !important; box-shadow: none !important; overflow: visible !important;
}
#profile-activity-details .household-activity-row {
  width: 100% !important; min-height: 58px !important; padding: 11px 2px !important;
  border: 0 !important; border-bottom: 1px solid var(--ui-border, #E7EAEE) !important;
  border-radius: 0 !important; background: transparent !important; text-align: left !important; box-shadow: none !important;
}
#profile-activity-details .household-activity-row:last-child { border-bottom: 0 !important; }
#profile-activity-details .profile-empty { padding-left: 2px !important; padding-right: 2px !important; }

/* ===== SOURCE: v14318-edge-back.css ===== */
/* v143.18 — swipe-back : arrivée strictement fixe, sans rebond de bord. */
html.is-ios .sheet-scroll-content.v14315-edge-back-active {
  position: relative !important;
  overflow-x: hidden !important;
  overflow-anchor: none !important;
}

html.is-ios .sheet-scroll-content.v14315-edge-back-active > * {
}

html.is-ios .section-page.edge-back-tracking,
html.is-ios .section-page.v14315-edge-back-finishing {
  position: relative !important;
  z-index: 3 !important;
  min-height: 100% !important;
  background: var(--paper, #fff) !important;
  will-change: transform !important;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
}

html.is-ios .section-page.edge-back-tracking {
  transition: none !important;
}

html.is-ios .v14315-edge-back-real-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  will-change: transform, opacity !important;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
}

/* Le contenu derrière est déjà la vraie page : aucune animation interne. */
html.is-ios .v14315-edge-back-real-menu,
html.is-ios .v14315-edge-back-real-menu * {
  animation: none !important;
}

/* v143.18 : aucune ombre latérale mobile. Sur iOS sa disparition au dernier
   frame ressemblait à un petit rebond du côté utilisé pour le geste. */
html.is-ios .section-page.edge-back-tracking::after,
html.is-ios .section-page.v14315-edge-back-finishing::after {
  content: none !important;
  display: none !important;
}

/* Pendant le commit final aucune ancienne animation ne peut reprendre la main. */
body.v14315-edge-back-commit #profile-menu-view,
body.v14315-edge-back-commit #settings-menu-view,
body.v14315-edge-back-commit #profile-menu-view *,
body.v14315-edge-back-commit #settings-menu-view * {
  animation: none !important;
  transition: none !important;
}
body.v14315-edge-back-commit #profile-menu-view,
body.v14315-edge-back-commit #settings-menu-view {
  transform: translate3d(0,0,0) !important;
  opacity: 1 !important;
}

html[data-motion="minimal"].is-ios .v14315-edge-back-real-menu,
html[data-motion="minimal"].is-ios .section-page.v14315-edge-back-finishing {
  transition-duration: 0ms !important;
}


/* v143.16 — aucune correction de layout/scroll pendant le geste. */
html.is-ios .sheet-scroll-content.v14315-edge-back-active .section-page,
html.is-ios .sheet-scroll-content.v14315-edge-back-active .section-menu-view {
  overflow-anchor: none !important;
  scroll-margin: 0 !important;
  scroll-padding: 0 !important;
}


/* v143.17 — le menu parent garde la même géométrie et le même calque de rendu
   lorsqu'il passe de sous-couche interactive à page active. */
html.is-ios #profile-menu-view,
html.is-ios #settings-menu-view {
  display: flow-root;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate3d(0,0,0);
  will-change: transform;
}

/* Le geste est neutralisé par preventDefault() dès touchstart : inutile de
   changer overflow-y/-webkit-overflow-scrolling et de recréer le scroller iOS. */
html.is-ios .sheet-scroll-content.v14315-edge-back-active {
  overflow-anchor: none !important;
}


/* v143.19 — les flèches ↑/↓ peuvent se trouver dans la zone du bord droit.
   Elles restent totalement neutres pendant un swipe-back : aucun scale,
   transition ou calque enfant indépendant qui pourrait se remettre en place
   après l'arrivée de la page. */
html.is-ios .sheet-scroll-content.v14315-edge-back-active .preference-order-actions,
html.is-ios .sheet-scroll-content.v14315-edge-back-active .preference-order-actions button,
body.v14315-edge-back-commit .preference-order-actions,
body.v14315-edge-back-commit .preference-order-actions button {
  animation: none !important;
  transition: none !important;
  transform: none !important;
  will-change: auto !important;
}
html.is-ios .sheet-scroll-content.v14315-edge-back-active .preference-order-actions button.v139-pressed,
body.v14315-edge-back-commit .preference-order-actions button.v139-pressed {
  transform: none !important;
}


/* ========================================================================== */
/* v144 — Refonte complète de l'intérieur d'une catégorie de dépenses variables */
/* ========================================================================== */

/* Écran catégorie : même langage que Transactions, sans héritage visuel des
   anciennes cartes de catégorie. */
.variable-category-detail-page {
  position: fixed !important;
  inset: 0 !important;
  z-index: 22 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding:
    max(88px, calc(var(--safe-top, 0px) + 42px))
    max(14px, calc(var(--safe-right, 0px) + 14px))
    calc(var(--safe-bottom, 0px) + 96px)
    max(14px, calc(var(--safe-left, 0px) + 14px)) !important;
  background: var(--paper, #fff) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: contain !important;
  scrollbar-width: none !important;
}
.variable-category-detail-page::-webkit-scrollbar { display: none !important; }
.variable-category-detail-page[hidden] { display: none !important; }

.variable-category-detail-inner {
  width: 100% !important;
  max-width: 760px !important;
  margin: 0 auto !important;
}

.variable-category-detail-back {
  appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  min-height: 30px !important;
  margin: 0 0 24px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--accent, #087f69) !important;
  font: inherit !important;
  font-size: 13.5px !important;
  line-height: 1.2 !important;
  font-weight: 720 !important;
  letter-spacing: -.12px !important;
  text-align: left !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
}

.variable-category-detail-head {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 16px !important;
  min-width: 0 !important;
}
.variable-category-detail-title {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  color: var(--text, #111827) !important;
  font-size: clamp(30px, 7.6vw, 38px) !important;
  line-height: 1.02 !important;
  font-weight: 820 !important;
  letter-spacing: -1.1px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.variable-category-detail-tools {
  flex: 0 0 auto !important;
  padding: 0 !important;
}
.variable-category-detail-percent {
  display: inline-block !important;
  min-width: 42px !important;
  color: var(--muted, #747d95) !important;
  font-size: 15px !important;
  line-height: 1 !important;
  font-weight: 740 !important;
  text-align: right !important;
  white-space: nowrap !important;
}
.variable-category-detail-percent.over,
.variable-category-detail-remaining.over { color: #B84A42 !important; }

.variable-category-detail-figures {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 18px !important;
  margin: 15px 0 0 !important;
  color: var(--muted, #747d95) !important;
  font-size: 13.5px !important;
  line-height: 1.2 !important;
  font-weight: 650 !important;
}
.variable-category-detail-figures > span:last-child {
  min-width: 0 !important;
  text-align: right !important;
}

.variable-category-detail-progress {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 5px !important;
  margin: 11px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  background: color-mix(in srgb, var(--accent, #087f69) 10%, var(--paper, #fff)) !important;
}
.variable-category-detail-progress[hidden] { display: none !important; }
.variable-category-detail-progress-bar {
  display: block !important;
  width: 0;
  height: 100% !important;
  border-radius: inherit !important;
  background: var(--accent, #087f69) !important;
  transition: width 220ms cubic-bezier(.22,.78,.22,1) !important;
}
.variable-category-detail-progress.over .variable-category-detail-progress-bar {
  background: #B84A42 !important;
}

/* Actions : primaire + secondaire, même hauteur, aucun bouton flottant. */
.variable-category-detail-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: stretch !important;
  gap: 9px !important;
  margin: 34px 0 18px !important;
  padding: 0 !important;
}
.variable-category-detail-add,
.variable-category-detail-category-link {
  appearance: none !important;
  min-height: 46px !important;
  margin: 0 !important;
  border-radius: 14px !important;
  font: inherit !important;
  font-size: 13.5px !important;
  line-height: 1 !important;
  font-weight: 760 !important;
  letter-spacing: -.12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  transition: transform 120ms ease, opacity 120ms ease, background-color 140ms ease !important;
}
.variable-category-detail-add {
  min-width: 0 !important;
  padding: 0 16px !important;
  border: 0 !important;
  background: var(--accent, #087f69) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(19,110,88,.10) !important;
}
.variable-category-detail-category-link {
  min-width: 108px !important;
  padding: 0 13px !important;
  border: 1px solid color-mix(in srgb, var(--accent, #087f69) 22%, var(--line, #e7eaee)) !important;
  background: color-mix(in srgb, var(--accent, #087f69) 4%, var(--paper, #fff)) !important;
  color: var(--accent, #087f69) !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}
.variable-category-detail-add > span:first-child,
.variable-category-detail-category-link > span:first-child {
  font-size: 18px !important;
  line-height: 1 !important;
  font-weight: 500 !important;
  transform: translateY(-.5px) !important;
}
.variable-category-detail-add:active,
.variable-category-detail-category-link:active {
  transform: scale(.985) !important;
  opacity: .86 !important;
}

/* Liste dédiée : plus de classe .variable-category => plus de surcouche historique. */
.variable-category-detail-list-shell {
  position: relative !important;
  width: auto !important;
  margin: 0 -8px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}
.variable-category-detail-list {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}
.variable-category-detail-empty {
  margin: 0 !important;
  padding: 16px 8px !important;
  color: var(--muted, #747d95) !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  text-align: left !important;
}

/* Chaque dépense est une ligne compacte. Les actions restent entièrement
   à l'intérieur de la hauteur de ligne : aucune troncature possible. */
.variable-category-detail-list > .swipe-row.variable-compact-row,
.variable-category-detail-list > .fixed-style-swipe-row.variable-compact-row {
  position: relative !important;
  isolation: isolate !important;
  width: 100% !important;
  min-height: 46px !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
  touch-action: pan-y !important;
}
.variable-category-detail-list > .swipe-row.variable-compact-row + .swipe-row.variable-compact-row {
  margin-top: 1px !important;
}

.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions {
  position: absolute !important;
  z-index: 1 !important;
  top: 3px !important;
  right: 4px !important;
  bottom: 3px !important;
  left: auto !important;
  width: 132px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  transform: none !important;
  overflow: visible !important;
  pointer-events: auto !important;
}
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions > .swipe-action {
  flex: 0 0 63px !important;
  width: 63px !important;
  min-width: 63px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  margin: 0 !important;
  padding: 0 3px !important;
  border: 0 !important;
  border-radius: 13px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  box-shadow: none !important;
  opacity: 0;
  transform: translate3d(10px,0,0) scale(.92);
  overflow: hidden !important;
}
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions > .swipe-action.edit {
  order: 1 !important;
  background: #ECEEF1 !important;
  color: #5F6470 !important;
}
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions > .swipe-action.delete {
  order: 2 !important;
  background: #F05249 !important;
  color: #fff !important;
}
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions > .swipe-action svg {
  width: 17px !important;
  height: 17px !important;
  display: block !important;
}
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions > .swipe-action span {
  font-size: 9.5px !important;
  line-height: 1 !important;
  font-weight: 620 !important;
  letter-spacing: -.05px !important;
}
.variable-category-detail-list > .swipe-row.variable-compact-row.open > .swipe-actions > .swipe-action,
.variable-category-detail-list > .swipe-row.variable-compact-row.swipe-active > .swipe-actions > .swipe-action {
  opacity: 1;
  transform: translate3d(0,0,0) scale(1);
}

.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-content.variable-entry-content {
  position: relative !important;
  z-index: 2 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 46px !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 0 6px !important;
  display: grid !important;
  grid-template-columns: minmax(0,max-content) minmax(8px,1fr) max-content !important;
  align-items: baseline !important;
  gap: 5px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--paper, #fff) !important;
  box-shadow: none !important;
  overflow: hidden !important;
  transform: translate3d(0,0,0);
  transition: transform 240ms cubic-bezier(.22,.78,.22,1), border-radius 180ms ease !important;
  cursor: pointer !important;
}
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-content.variable-entry-content::before,
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-content.variable-entry-content::after {
  content: none !important;
  display: none !important;
}
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-content.variable-entry-content .line-title,
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-content.variable-entry-content .amount {
  align-self: baseline !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--text, #111827) !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-content.variable-entry-content .line-title {
  min-width: 0 !important;
  font-size: 13.5px !important;
  font-weight: 590 !important;
  letter-spacing: -.12px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-content.variable-entry-content .amount {
  justify-self: end !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
}
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-content.variable-entry-content .amount-leader {
  display: block !important;
  align-self: baseline !important;
  min-width: 8px !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px dotted color-mix(in srgb, var(--muted, #747d95) 25%, transparent) !important;
  background: none !important;
  opacity: .62 !important;
  transform: none !important;
}
.variable-category-detail-list > .swipe-row.variable-compact-row.open > .swipe-content.variable-entry-content {
  transform: translate3d(-136px,0,0) !important;
  border-radius: 0 14px 14px 0 !important;
}
.variable-category-detail-list > .swipe-row.variable-compact-row.swipe-active > .swipe-content.variable-entry-content {
  border-radius: 0 14px 14px 0 !important;
}

/* Lors d'un swipe interactif, gestures.js pose le transform inline. Les styles
   de hauteur et d'actions restent stables : pas de saut, pas de calque blanc. */
.variable-category-detail-list > .swipe-row.variable-compact-row.swipe-active,
.variable-category-detail-list > .swipe-row.variable-compact-row.open {
  z-index: 3 !important;
}

/* La page parent est complètement absente visuellement tant que la catégorie
   est ouverte. */
body.variable-category-detail-open {
  overflow: hidden !important;
}
body.variable-category-detail-open .page > header,
body.variable-category-detail-open #income-section,
body.variable-category-detail-open #income-summary,
body.variable-category-detail-open #transactions-hub,
body.variable-category-detail-open #fixed-section,
body.variable-category-detail-open #variable-section {
  display: none !important;
}
body.variable-category-detail-open #variable-category-detail-page {
  display: block !important;
}
body.variable-category-detail-open .ca-bottom-nav {
  z-index: 60 !important;
}

@media (max-width: 430px) {
  .variable-category-detail-page {
    padding-left: max(14px, calc(var(--safe-left, 0px) + 14px)) !important;
    padding-right: max(14px, calc(var(--safe-right, 0px) + 14px)) !important;
  }
  .variable-category-detail-list-shell {
    margin-left: -8px !important;
    margin-right: -8px !important;
  }
  .variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-content.variable-entry-content {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
  .variable-category-detail-actions {
    grid-template-columns: minmax(0,1fr) 108px !important;
  }
}

@media (min-width: 700px) {
  .variable-category-detail-page {
    padding-left: 28px !important;
    padding-right: 28px !important;
  }
  .variable-category-detail-list-shell { margin-left: 0 !important; margin-right: 0 !important; }
}

html[data-motion="minimal"] .variable-category-detail-progress-bar,
html[data-motion="minimal"] .variable-category-detail-add,
html[data-motion="minimal"] .variable-category-detail-category-link,
html[data-motion="minimal"] .variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-content.variable-entry-content,
html[data-motion="minimal"] .variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions > .swipe-action {
  transition: none !important;
}


/* ========================================================================== */
/* v144.1 — Swipe des dépenses variables = Charges récurrentes                */
/* ========================================================================== */
/* Même plateau d'actions, même ouverture de 136 px, mêmes capsules, mêmes
   couleurs, mêmes icônes et même animation. Cela s'applique dans la liste
   Transactions et dans l'écran détaillé d'une catégorie. */

body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row,
.variable-category-detail-list > .swipe-row.variable-compact-row {
  position: relative !important;
  min-height: 54px !important;
  height: 54px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
  isolation: isolate !important;
}

body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-actions,
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions {
  position: absolute !important;
  z-index: 1 !important;
  top: 5px !important;
  right: 8px !important;
  bottom: 5px !important;
  left: auto !important;
  width: 128px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  transform: none !important;
  overflow: hidden !important;
}

body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-actions > .swipe-action,
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions > .swipe-action {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 4px !important;
  border: 0 !important;
  border-radius: 999px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  box-shadow: none !important;
  opacity: 0;
  transform: translate3d(14px,0,0) scale(.88);
  transition: opacity .16s ease, transform .20s cubic-bezier(.2,.82,.22,1) !important;
}

body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-actions > .swipe-action.edit,
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions > .swipe-action.edit {
  order: 1 !important;
  background: #D0D0D6 !important;
  color: #6F7280 !important;
}

body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-actions > .swipe-action.delete,
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions > .swipe-action.delete {
  order: 2 !important;
  background: #F14E45 !important;
  color: #FFFFFF !important;
}

body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-actions > .swipe-action svg,
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions > .swipe-action svg {
  width: 19px !important;
  height: 19px !important;
}

body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-actions > .swipe-action span,
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions > .swipe-action span {
  font-size: 10.5px !important;
  line-height: 1 !important;
  font-weight: 560 !important;
  letter-spacing: -.08px !important;
}

/* On garde la mise en page texte/pointillés de v144, mais la hauteur et le
   déplacement sont maintenant ceux de Charges récurrentes. */
body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-content.variable-entry-content,
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-content.variable-entry-content {
  min-height: 54px !important;
  height: 54px !important;
  border-radius: 0 !important;
  background: var(--paper, #fff) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row.open > .swipe-content.variable-entry-content,
body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row.swipe-active > .swipe-content.variable-entry-content,
.variable-category-detail-list > .swipe-row.variable-compact-row.open > .swipe-content.variable-entry-content,
.variable-category-detail-list > .swipe-row.variable-compact-row.swipe-active > .swipe-content.variable-entry-content {
  border-radius: 0 !important;
  background: var(--paper, #fff) !important;
  box-shadow: none !important;
}

body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row.open > .swipe-content.variable-entry-content,
.variable-category-detail-list > .swipe-row.variable-compact-row.open > .swipe-content.variable-entry-content {
  transform: translate3d(-136px,0,0) !important;
}

body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row.open > .swipe-actions > .swipe-action,
body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row.swipe-active > .swipe-actions > .swipe-action,
.variable-category-detail-list > .swipe-row.variable-compact-row.open > .swipe-actions > .swipe-action,
.variable-category-detail-list > .swipe-row.variable-compact-row.swipe-active > .swipe-actions > .swipe-action {
  opacity: 1;
  transform: translate3d(0,0,0) scale(1);
}

html[data-motion="minimal"] body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-content.variable-entry-content,
html[data-motion="minimal"] body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-actions > .swipe-action,
html[data-motion="minimal"] .variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-content.variable-entry-content,
html[data-motion="minimal"] .variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions > .swipe-action {
  transition: none !important;
}


/* ========================================================================== */
/* v144.4 — alignement vertical des actions swipe variables                   */
/* ========================================================================== */
/* Les boutons conservent exactement leur taille et le comportement v144.1,
   mais remontent de 5 px à l'intérieur de la ligne afin d'être alignés
   visuellement avec le nom de la dépense, sans aucun débordement/troncage. */
body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-actions,
.variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions {
  top: 0 !important;
  bottom: 10px !important;
}


/* ========================================================================== */
/* v144.5 — alignement structurel du swipe variable sur Charges récurrentes   */
/* ========================================================================== */
/* Sur iPhone, le nom/montant et le plateau Modifier/Supprimer partagent
   désormais exactement le même axe vertical. On ne décale plus arbitrairement
   les boutons : on centre toute la rangée comme dans Charges récurrentes. */
html.is-ios body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row,
html.is-ios .variable-category-detail-list > .swipe-row.variable-compact-row {
  min-height: 50px !important;
  height: 50px !important;
  overflow: hidden !important;
}

html.is-ios body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-content.variable-entry-content,
html.is-ios .variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-content.variable-entry-content {
  min-height: 50px !important;
  height: 50px !important;
  align-items: center !important;
  align-content: center !important;
}

html.is-ios body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-content.variable-entry-content .line-title,
html.is-ios body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-content.variable-entry-content .amount,
html.is-ios .variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-content.variable-entry-content .line-title,
html.is-ios .variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-content.variable-entry-content .amount {
  align-self: center !important;
}

html.is-ios body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-content.variable-entry-content .amount-leader,
html.is-ios .variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-content.variable-entry-content .amount-leader {
  align-self: center !important;
  transform: translateY(5px) !important;
}

html.is-ios body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-actions,
html.is-ios .variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions {
  top: 50% !important;
  bottom: auto !important;
  right: 8px !important;
  width: 120px !important;
  height: 44px !important;
  gap: 6px !important;
  align-items: center !important;
  overflow: hidden !important;
  transform: translateY(-50%) !important;
}

html.is-ios body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-actions > .swipe-action,
html.is-ios .variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions > .swipe-action {
  flex: 0 0 57px !important;
  width: 57px !important;
  min-width: 57px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 3px !important;
  gap: 1px !important;
  border-radius: 22px !important;
}

html.is-ios body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-actions > .swipe-action svg,
html.is-ios .variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions > .swipe-action svg {
  width: 15px !important;
  height: 15px !important;
}

html.is-ios body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row > .swipe-actions > .swipe-action span,
html.is-ios .variable-category-detail-list > .swipe-row.variable-compact-row > .swipe-actions > .swipe-action span {
  font-size: 9px !important;
  line-height: 1 !important;
}

html.is-ios body.transactions-mode .variable-category .category-list .swipe-row.variable-compact-row.open > .swipe-content.variable-entry-content,
html.is-ios .variable-category-detail-list > .swipe-row.variable-compact-row.open > .swipe-content.variable-entry-content {
  transform: translate3d(-134px,0,0) !important;
  border-radius: 0 22px 22px 0 !important;
}


/* ========================================================================== */
/* v144.12 — TRANSACTIONS SHELL REBUILD                                      */
/* Canonical layout for everything ABOVE the category contents.               */
/* Category cards/rows/swipes/detail-page styles are intentionally untouched. */
/* ========================================================================== */

/* 1) Transactions is a direct flow: Period -> tabs -> active panel. */
body[data-active-nav="transactions"].transactions-mode #v110-home,
body[data-active-nav="transactions"].transactions-mode #income-section,
body[data-active-nav="transactions"].transactions-mode .month-balance,
body[data-active-nav="transactions"].transactions-mode .expense-tabs,
body[data-active-nav="transactions"].transactions-mode #income-summary {
  display: none !important;
}

body[data-active-nav="transactions"].transactions-mode .mac-period-summary-row {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Period keeps exactly the same visual component as Home. Only legacy hero
   separators/margins are neutralised in Transactions. */
body[data-active-nav="transactions"].transactions-mode #month-header.period-hero {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body[data-active-nav="transactions"].transactions-mode #month-header.period-hero::before,
body[data-active-nav="transactions"].transactions-mode #month-header.period-hero::after {
  content: none !important;
  display: none !important;
}

/* Same vertical start as the Reste à vivre card on Home: Home uses 12px. */
body[data-active-nav="transactions"].transactions-mode #transactions-top-stack {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 12px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body[data-active-nav="transactions"].transactions-mode #transactions-top-stack::before,
body[data-active-nav="transactions"].transactions-mode #transactions-top-stack::after {
  content: none !important;
  display: none !important;
}

/* 2) Tabs: clean two-column bar, no grey separator above or below. */
body[data-active-nav="transactions"].transactions-mode #transactions-hub,
html.is-ios body[data-active-nav="transactions"].transactions-mode #transactions-hub,
html.is-macos body[data-active-nav="transactions"].transactions-mode #transactions-hub,
body[data-active-nav="transactions"].transactions-mode #transactions-hub.is-sticking,
body[data-active-nav="transactions"].transactions-mode #transactions-hub.is-maximized {
  box-sizing: border-box !important;
  position: sticky !important;
  top: var(--safe-top) !important;
  z-index: 90 !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: var(--paper) !important;
  background-image: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

body[data-active-nav="transactions"].transactions-mode #transactions-hub::before,
body[data-active-nav="transactions"].transactions-mode #transactions-hub::after {
  content: none !important;
  display: none !important;
}

body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented,
html.is-ios body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented,
html.is-macos body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented::before,
body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented::after {
  content: none !important;
  display: none !important;
}

body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented button,
body[data-active-nav="transactions"].transactions-mode #transactions-hub.is-maximized .transactions-segmented button,
body[data-active-nav="transactions"].transactions-mode #transactions-hub.is-maximized .transactions-segmented button:not(.active) {
  position: relative !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 3px 4px 8px !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--muted) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  font: inherit !important;
  font-size: 12.5px !important;
  font-weight: 660 !important;
  text-align: center !important;
  white-space: normal !important;
  overflow: visible !important;
  transform: none !important;
}

body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented button.active,
body[data-active-nav="transactions"].transactions-mode #transactions-hub.is-maximized .transactions-segmented button.active {
  color: var(--ink) !important;
  font-size: 12.5px !important;
  font-weight: 780 !important;
  opacity: 1 !important;
}

body[data-active-nav="transactions"].transactions-mode #transactions-hub .tx-tab-stack {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
}

body[data-active-nav="transactions"].transactions-mode #transactions-hub .tx-tab-title {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 12.5px !important;
  line-height: 1.12 !important;
  font-weight: inherit !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-active-nav="transactions"].transactions-mode #transactions-hub .tx-tab-amount {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--muted) !important;
  font-size: 10.5px !important;
  line-height: 1.05 !important;
  font-weight: 650 !important;
  letter-spacing: -.1px !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  opacity: 1 !important;
}

/* Only the active accent indicator remains. There is NO grey full-width rule. */
body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented button::after {
  content: '' !important;
  position: absolute !important;
  left: 28% !important;
  right: 28% !important;
  bottom: 0 !important;
  display: block !important;
  height: 2px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented button.active::after {
  background: var(--accent-user, var(--ca-accent)) !important;
}

/* 3) Active panel: no legacy spacer or separator between tabs and actions. */
body[data-active-nav="transactions"].transactions-mode #transactions-top-stack > #fixed-section,
body[data-active-nav="transactions"].transactions-mode #transactions-top-stack > #variable-section,
html.is-ios body[data-active-nav="transactions"].transactions-mode #transactions-top-stack > #fixed-section,
html.is-ios body[data-active-nav="transactions"].transactions-mode #transactions-top-stack > #variable-section,
html.is-macos body[data-active-nav="transactions"].transactions-mode #transactions-top-stack > #fixed-section,
html.is-macos body[data-active-nav="transactions"].transactions-mode #transactions-top-stack > #variable-section {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 6px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-top: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body[data-active-nav="transactions"].transactions-mode #transactions-top-stack > #fixed-section::before,
body[data-active-nav="transactions"].transactions-mode #transactions-top-stack > #fixed-section::after,
body[data-active-nav="transactions"].transactions-mode #transactions-top-stack > #variable-section::before,
body[data-active-nav="transactions"].transactions-mode #transactions-top-stack > #variable-section::after {
  content: none !important;
  display: none !important;
}

/* Variable tab: primary action above categories. */
body[data-active-nav="transactions"].transactions-mode #variable-section .v141-variable-primary-action {
  width: 100% !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: 0 !important;
}

body[data-active-nav="transactions"].transactions-mode #variable-section .v141-add-expense {
  width: 100% !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 15px !important;
  background: var(--ca-accent, #0a8f72) !important;
  color: #fff !important;
  box-shadow: 0 7px 18px rgba(19,110,88,.12) !important;
  font-size: 14px !important;
  font-weight: 760 !important;
}

/* This is the category LIST CONTAINER only. Category interiors are untouched. */
body[data-active-nav="transactions"].transactions-mode #variable-section > .variable-categories {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-top: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Recurring tab: same compact rhythm before its list; rows themselves untouched. */
body[data-active-nav="transactions"].transactions-mode #fixed-section > .transaction-panel-head.transaction-panel-head-actions-only {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-active-nav="transactions"].transactions-mode #fixed-section #transaction-add-recurring {
  min-height: 38px !important;
  margin: 0 !important;
  padding: 0 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent-user, var(--ca-accent)) !important;
  font-size: 12px !important;
  font-weight: 740 !important;
}

body[data-active-nav="transactions"].transactions-mode #fixed-section > #add-fixed-category {
  margin-top: 0 !important;
  margin-bottom: 8px !important;
}

/* Never reintroduce a top separator immediately before the category/list area. */
body[data-active-nav="transactions"].transactions-mode #fixed-section > .plain-list {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}

@media (max-width: 390px) {
  body[data-active-nav="transactions"].transactions-mode #transactions-top-stack {
    margin-top: 12px !important;
  }
  body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented {
    gap: 6px !important;
  }
  body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented button,
  body[data-active-nav="transactions"].transactions-mode #transactions-hub.is-maximized .transactions-segmented button {
    min-height: 46px !important;
    padding-bottom: 7px !important;
  }
  body[data-active-nav="transactions"].transactions-mode #transactions-hub .tx-tab-title {
    font-size: 12px !important;
  }
  body[data-active-nav="transactions"].transactions-mode #transactions-hub .tx-tab-amount {
    font-size: 10px !important;
  }
}


/* ========================================================================== */
/* v144.13 — Transactions tabs: restore the bidirectional scroll morph.       */
/* Variable active: right -> centre/left. Recurring active: left -> centre.    */
/* The JS transaction-hub already drives the --tx-* variables while scrolling. */
/* ========================================================================== */
body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented,
html.is-ios body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented,
html.is-macos body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented {
  grid-template-columns:
    minmax(0, var(--tx-recurring-fr, 1fr))
    minmax(0, var(--tx-oneoff-fr, 1fr)) !important;
  gap: var(--tx-gap, 20px) !important;
  overflow: hidden !important;
  transition:
    grid-template-columns 70ms linear,
    gap 70ms linear !important;
}

body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented button,
body[data-active-nav="transactions"].transactions-mode #transactions-hub.is-maximized .transactions-segmented button {
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  transition:
    opacity 90ms linear,
    color 160ms ease,
    font-size 90ms linear !important;
}

body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented button.active,
body[data-active-nav="transactions"].transactions-mode #transactions-hub.is-maximized .transactions-segmented button.active {
  font-size: var(--tx-active-size, 13px) !important;
}

body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented button:not(.active) {
  opacity: var(--tx-inactive-opacity, 1) !important;
}

body[data-active-nav="transactions"].transactions-mode #transactions-hub.is-maximized .transactions-segmented button:not(.active) {
  opacity: 0 !important;
  pointer-events: none !important;
}

body[data-active-nav="transactions"].transactions-mode #transactions-hub .tx-tab-stack,
body[data-active-nav="transactions"].transactions-mode #transactions-hub .tx-tab-title,
body[data-active-nav="transactions"].transactions-mode #transactions-hub .tx-tab-amount {
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

body[data-active-nav="transactions"].transactions-mode #transactions-hub .transactions-segmented button::after {
  left: var(--tx-underline-inset, 28%) !important;
  right: var(--tx-underline-inset, 28%) !important;
  transition:
    left 90ms linear,
    right 90ms linear,
    background-color 160ms ease !important;
}
