/* Polices hébergées chez nous (aucune requête vers un domaine tiers). Fichiers variables, sous-ensemble
   « latin » (français compris, avec € et œ). Inter 400 à 600, Manrope 400 à 700. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #171a24;
  --ink-soft: #3d4152;
  --muted: #6c7285;
  --faint: #9a9ea9;
  --line: #dcd9cf;
  --line-soft: #f1f0ea;
  --bg: #f7f6f2;
  --card: #ffffff;
  --card-alt: #fbfaf6;
  --green: #1a9c5c;
  --green-soft: #e4f5ec;
  --green-line: #bfe8cf;
  --amber: #c2760a;
  --amber-soft: #fdf3e2;
  --amber-line: #f0d9a3;
  --red: #d1392b;
  --red-soft: #fdecea;
  --red-line: #f3c1bb;
  --accent: #0e7c86;
  --accent-dark: #0b5f67;
  --accent-soft: #e6f4f4;
  --accent-line: #bfe0e0;
  --accent2: #4f46e5;
  --accent2-dark: #3730a3;
  --accent2-soft: #ececfb;
  /* Charte version 2 : une dépense s'écrit en corail avec « − », un revenu en vert avec « + ». */
  --coral: #e36b5e;
  --coral-soft: #fdebe8;
  /* Pour le TEXTE des montants, une teinte un peu plus foncée de la même couleur :
     le corail et le vert de la charte sont trop pâles pour du texte de 13 à 15 px
     (contraste 3,2 et 3,5, il faut 4,5). Les jauges, icônes et pastilles gardent la teinte de la charte. */
  --coral-text: #c44c3f;
  --green-text: #15804b;
  --amber-text: #9a5c06;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(23, 26, 36, .04);
  --shadow-md: 0 10px 30px rgba(23, 26, 36, .07);
  --shadow-soft: 0 10px 28px rgba(23, 26, 36, .06);
  --shadow-accent: 0 10px 22px rgba(11, 95, 103, .25);
  --shadow-accent-hover: 0 12px 26px rgba(11, 95, 103, .32);
  --ease: cubic-bezier(.22, .7, .32, 1);

  /* Charte visuelle (CHARTE_VISUELLE.md) : traits à peine visibles, cartes, cases, boutons. */
  --line: rgba(23, 26, 36, .10);
  --line-soft: rgba(23, 26, 36, .06);
  --chip-line: #9fd2d2;
  --card-glass: #ffffff;
  --r-card: 20px;
  --r-field: 12px;
  --r-button: 14px;
  --r-choice: 14px;
  --h-field: 46px;
  --h-button: 52px;
  --h-chip: 32px;
  --fs-title: 22px;
  --fs-text: 14.5px;
  --fs-label: 12.5px;
  --fs-hint: 11.5px;
  --fs-amount: 38px;
  --w-text: 400;
  --w-label: 500;
  --w-title: 600;
  --grad-button: linear-gradient(135deg, #12909b, #0b5f67);
  --grad-hero: linear-gradient(165deg, #0f8a95 0%, #0b5f67 48%, #232b6b 100%);
  --grad-page:
    radial-gradient(420px 300px at 100% 0%, rgba(14, 124, 134, .14) 0%, rgba(14, 124, 134, 0) 70%),
    radial-gradient(380px 320px at 0% 55%, rgba(79, 70, 229, .08) 0%, rgba(79, 70, 229, 0) 70%),
    linear-gradient(180deg, #eaf5f5 0%, #f2f2fa 55%, #f7f6f2 100%);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f2f2fa;
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--fs-text);
  font-weight: var(--w-text);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
/* Fond dégradé de la charte, fixé derrière le contenu : il ne bouge pas quand on fait défiler.
   Les deux halos qui respirent sont ajoutés par js/animations.js (MCB_ANIM.halosFond). */
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: var(--grad-page);
  content: "";
  pointer-events: none;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.app-shell {
  /* Au-dessus des halos de fond (position fixe, z-index 0) : ils restent derrière les cartes. */
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 20px 128px;
}

.topbar, .brand, .section-heading, .card-top, .inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar { justify-content: flex-start; gap: 10px; margin-bottom: 22px; }
.brand {
  justify-content: flex-start;
  gap: 9px;
  color: var(--ink);
  font-family: Manrope, Inter, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.back-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(23, 26, 36, .08);
  border-radius: 50%;
  background: rgba(255, 255, 255, .8);
  color: var(--ink);
  line-height: 1;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
.back-button:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); transform: translateX(-1px); }
.topbar { min-height: 44px; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, .big-number, .money {
  font-family: Manrope, Inter, sans-serif;
}
h1, h2, h3 { font-weight: var(--w-title); letter-spacing: -.01em; }
h1 { margin-bottom: 4px; font-size: var(--fs-title); line-height: 1.3; }
h2 { margin-bottom: 0; font-size: 16px; }
h3 { margin-bottom: 8px; font-size: 15px; }
strong, b { font-weight: 600; }
.muted, .subtitle, .hint { color: var(--muted); }
.subtitle { margin: 0; font-size: 13.5px; line-height: 1.5; }
.page-intro { margin-bottom: 18px; }
.page-intro p { margin-bottom: 0; }

.card {
  margin-bottom: 16px;
  padding: 18px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  background: var(--card-glass);
  box-shadow: var(--shadow-soft);
}
.summary-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(14, 124, 134, .10), rgba(14, 124, 134, 0) 70%),
    var(--card);
  box-shadow: var(--shadow-md);
}
.card-top { gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.big-number { font-size: clamp(38px, 11vw, 46px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.number-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.number-line .muted { font-size: 14px; }
.daily-summary { gap: 10px; }
.daily-summary .big-number { color: var(--ink); }
.summary-balance { margin: -4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.daily-guidance {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}
.daily-guidance strong { display: block; color: var(--ink); font-family: Manrope, Inter, sans-serif; font-size: 26px; line-height: 1.3; }
.calculation-details { border-top: 1px solid var(--line-soft); padding-top: 10px; }
.calculation-details summary { min-height: 44px; display: flex; align-items: center; color: var(--accent-dark); cursor: pointer; font-size: 13px; font-weight: 600; }
.calculation-details p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.status {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.status.vert { border-color: var(--green-line); background: var(--green-soft); color: var(--green); }
.status.orange { border-color: var(--amber-line); background: var(--amber-soft); color: var(--amber); }
.status.rouge { border-color: var(--red-line); background: var(--red-soft); color: var(--red); }
.status.neutre { border-color: var(--line); background: var(--card-alt); color: var(--muted); }
.meter { height: 10px; overflow: hidden; border-radius: 999px; background: var(--line-soft); }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.meter > span.rouge { background: var(--red); }
.meter > span.orange { background: var(--amber); }
.meter-labels { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--card-alt);
}
.stat-label { margin-bottom: 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.stat-value { font-family: Manrope, Inter, sans-serif; font-size: 18px; font-weight: 600; }
.note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.section-heading { margin: 20px 2px 10px; gap: 8px; }
.section-heading h2 { margin-bottom: 3px; }
.section-hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.text-button {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}
.pocket-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pocket-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
.pocket-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pocket-name { overflow: hidden; margin: 0; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pocket-money { margin-bottom: 7px; font-family: Manrope, Inter, sans-serif; font-size: 17px; font-weight: 600; }
.pocket-money small { font-family: Inter, sans-serif; color: var(--muted); font-size: 11px; font-weight: 500; }
.pocket-card .meter { height: 6px; }
.pocket-card .meter > span { background: var(--accent); }
.pocket-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.pocket-daily {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.pocket-daily.over-budget { color: var(--red); }

/* Boutons. Principal : 52 px, dégradé bleu-vert. Les autres : fins, discrets, 44 px au toucher. */
.primary-button, .secondary-button, .danger-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--r-field);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .1s var(--ease);
}
.primary-button {
  min-height: var(--h-button);
  padding: 0 20px;
  border: 0;
  border-radius: var(--r-button);
  background: var(--grad-button);
  box-shadow: var(--shadow-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.primary-button:hover { box-shadow: var(--shadow-accent-hover); }
.primary-button:active { transform: translateY(1px); box-shadow: 0 4px 10px rgba(11, 95, 103, .25); }
.secondary-button { border-color: var(--line); background: rgba(255, 255, 255, .7); color: var(--ink-soft); }
.secondary-button:hover { border-color: var(--accent-line); background: #ffffff; }
.secondary-button:active, .danger-button:active { transform: translateY(1px); }
.danger-button { border-color: var(--red-line); background: var(--red-soft); color: var(--red); }
.full-width { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Formulaires : 20 px entre deux blocs, 7 px entre un libellé et sa case. */
.form-card { display: grid; gap: 20px; }
.field { display: grid; gap: 7px; }
.field label, .field-label { color: var(--muted); font-size: var(--fs-label); font-weight: var(--w-label); }
/* Cases : 46 px, coins de 12 px, trait fin. Le texte reste à 16 px, sinon l'iPhone zoome sur la case. */
.field :where(input:not([type="radio"]):not([type="checkbox"]), select) {
  width: 100%;
  height: var(--h-field);
  min-height: var(--h-field);
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  background: #ffffff;
  color: var(--ink);
  font-size: 16px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field input[type="color"] { padding: 4px; }
.field input:focus, .field select:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(14, 124, 134, .18);
  outline-offset: 2px;
  border-color: var(--accent);
}
.field-hint { margin: 0; color: var(--muted); font-size: var(--fs-hint); line-height: 1.45; }

/* Pastilles de choix : 32 px à l'œil, 44 px au toucher (zone invisible autour). */
.choice-row { display: flex; flex-wrap: wrap; gap: 12px 7px; }
.choice, .preset-chip {
  position: relative;
  display: inline-flex;
  min-height: var(--h-chip);
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.choice::before, .preset-chip::before { position: absolute; inset: -6px 0; content: ""; }
.choice:hover, .preset-chip:hover { border-color: var(--chip-line); }
.choice:has(input:checked) { border-color: var(--chip-line); background: var(--accent-soft); color: var(--accent-dark); font-weight: 500; }
.choice:has(input:focus-visible) { outline: 3px solid rgba(14, 124, 134, .25); outline-offset: 2px; }
.choice input { accent-color: var(--accent); }
.field .choice input, .choice input { width: 16px; height: 16px; min-height: 0; flex: 0 0 16px; margin: 0; padding: 0; }
/* La puce ronde disparaît : la pastille colorée suffit. Sur un vieux navigateur, la puce reste visible. */
@supports selector(:has(*)) {
  .choice input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
}

/* Cartes de choix (2 options côte à côte) : coche ronde en haut à droite quand c'est choisi. */
.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice-card {
  position: relative;
  display: block;
  min-height: 44px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-choice);
  background: #ffffff;
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.choice-card input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.choice-card-title { display: block; padding-right: 22px; color: var(--ink); font-size: 14px; font-weight: 500; }
.choice-card-text { display: block; margin-top: 3px; color: var(--muted); font-size: var(--fs-hint); line-height: 1.4; }
.choice-card:has(input:checked) { border: 1.5px solid var(--accent); background: #f3fafa; padding: 11.5px; }
.choice-card:has(input:checked) .choice-card-title { color: var(--accent-dark); font-weight: 600; }
.choice-card:has(input:checked)::after {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat;
  content: "";
}
.choice-card:has(input:focus-visible) { outline: 3px solid rgba(14, 124, 134, .25); outline-offset: 2px; }

/* Montant principal : grand chiffre, simple trait bleu-vert dessous, pas de case. */
.amount-line { display: flex; align-items: baseline; gap: 6px; padding-bottom: 8px; border-bottom: 1.5px solid var(--accent); }
.amount-line input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: Manrope, Inter, sans-serif;
  font-size: var(--fs-amount);
  font-weight: 500;
  letter-spacing: -.02em;
}
.amount-line input:focus { outline: none; }
/* Pas de petites flèches dans le grand montant (elles apparaissent sur ordinateur). */
.amount-line input::-webkit-inner-spin-button, .amount-line input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.amount-line input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.amount-line input::placeholder { color: var(--muted); opacity: .55; }
.amount-line:focus-within { border-bottom-width: 2px; padding-bottom: 7.5px; }
.amount-line-unit { color: var(--muted); font-family: Manrope, Inter, sans-serif; font-size: 22px; font-weight: 400; }

/* Carte d'info discrète : explique une règle qui n'est pas évidente. */
.info-card { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 11px 12px; border-radius: var(--r-field); background: var(--accent2-soft); color: var(--ink-soft); font-size: var(--fs-label); line-height: 1.45; }
.info-card svg { flex: none; margin-top: 1px; color: var(--accent2); }
.info-card p { margin: 0; }
.settings-form { gap: 0; padding: 8px 16px; }
.settings-section { display: grid; gap: 14px; padding: 14px 0; }
.settings-section + .settings-section { border-top: 1px solid var(--line-soft); }
.settings-section-heading { display: flex; align-items: center; gap: 10px; }
.settings-section-heading h2 { margin: 0 0 3px; font-size: 15px; }
.settings-section-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.settings-link-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid var(--accent-line);
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 17px;
}
.settings-links { margin: 18px 0; }
.settings-links .section-heading { margin-top: 0; }
.settings-link {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-align: left;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
.settings-link:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.settings-link > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.settings-link strong { font-size: 12px; }
.settings-link small { color: var(--muted); font-size: 11px; }
.settings-link-arrow { margin-left: auto; color: var(--accent-dark); font-size: 21px; }
a.settings-link { text-decoration: none; }
.settings-feedback .note { margin-top: 2px; }
.home-feedback { margin: 18px 0 8px; text-align: center; }
.home-feedback a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.home-feedback a:hover { color: var(--accent-dark); }
.settings-privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 18px;
  padding: 12px 13px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.settings-privacy > span { padding-top: 1px; color: var(--accent); }
.settings-privacy p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.settings-privacy strong { color: var(--accent-dark); }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.list { display: grid; gap: 8px; }
.list-item {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.list-item-title { margin: 0 0 2px; font-size: 14px; font-weight: 600; }
.list-item-detail { margin: 0; color: var(--muted); font-size: 12px; }
.list-item-amount { white-space: nowrap; font-family: Manrope, Inter, sans-serif; font-size: 15px; font-weight: 600; }
.fixed-count {
  display: grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 600;
}
.fixed-presets { display: flex; flex-wrap: wrap; gap: 7px; }
.pocket-presets { display: flex; flex-wrap: wrap; gap: 7px; }
.preset-chip:hover, .preset-chip:focus-visible { border-color: var(--chip-line); background: var(--accent-soft); color: var(--accent-dark); }
.transport-card { border-color: var(--line); }
.transport-card > div:first-child h2 { margin-bottom: 5px; }
.management-details { display: block; }
.management-details > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  list-style: none;
}
.management-details > summary::-webkit-details-marker { display: none; }
.management-details > summary::after { content: "+"; color: var(--accent-dark); font-size: 20px; }
.management-details[open] > summary::after { content: "−"; }
.management-details[open] > summary { margin-bottom: 12px; }
.management-details > .field-hint { margin-bottom: 12px; }
.management-details > form { margin-top: 8px; }
.pocket-customization-list { display: grid; }
.pocket-customization {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 54px 48px auto;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
}
.pocket-customization strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pocket-customization input:not([type="color"]) { min-height: 40px; width: 54px; padding: 5px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.pocket-customization input[type="color"] { width: 44px; height: 40px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); }
.pocket-customization .secondary-button { min-height: 40px; padding: 0 10px; font-size: 12px; }
.goal-card { padding: 12px; border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--card-alt); }
.goal-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.goal-plan { margin: 8px 0 0; color: var(--ink-soft); font-size: 13px; font-weight: 600; line-height: 1.45; }
.savings-details > .list { margin: 12px 0; }
.pleasure-details .message { margin: 8px 0; }
.tips-list { display: grid; gap: 8px; margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
/* Pochette plaisir (maquette v2) : dégradé violet vers bleu-vert. */
.pleasure-summary {
  display: grid;
  gap: 10px;
  border-color: #dfe3f7;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent2-soft) 0%, var(--accent-soft) 100%);
}
.pleasure-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pleasure-kicker { margin: 0; color: var(--accent2-dark); font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.pleasure-name { margin: 3px 0 0; font-family: Manrope, Inter, sans-serif; font-size: 17px; font-weight: 600; }
.pleasure-amount { margin: 0; color: var(--accent2-dark); font-family: Manrope, Inter, sans-serif; font-size: 20px; font-weight: 600; white-space: nowrap; }
.pleasure-amount span { color: var(--muted); font-size: 14px; font-weight: 600; }
.pleasure-track { height: 10px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .85); }
.pleasure-track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.pleasure-text { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: var(--ink-soft); font-size: 13.5px; line-height: 1.45; }
.pleasure-summary .note { color: var(--ink-soft); }
.pleasure-summary .secondary-button { justify-self: start; }
.current-balance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
}
.current-balance h2 { margin-bottom: 4px; }
.balance-amount { font-family: Manrope, Inter, sans-serif; font-size: 24px; font-weight: 600; white-space: nowrap; }
.balance-explanation { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.current-balance > .text-button { justify-self: start; }
.home-income .card-top h2 { margin: 0; }
.calendar-reminder {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--red-line);
  border-radius: var(--r-md);
  background: var(--red-soft);
  color: #8d241a;
  font-size: 13px;
  line-height: 1.5;
}
.calendar-reminder strong { display: block; margin-bottom: 3px; }
.calendar-reminder p { margin: 0; }
.income-highlight { margin: 6px 0 2px; font-family: Manrope, Inter, sans-serif; font-size: 22px; font-weight: 600; }
.income-warning { margin: 10px 0 0; padding: 9px 10px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; line-height: 1.45; }
.spending-chart { padding: 16px; }
.spending-chart .section-heading { margin: 0 0 12px; }
.chart-legend { display: grid; gap: 7px; margin-bottom: 14px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.chart-legend span { display: flex; align-items: flex-start; gap: 7px; }
.chart-legend i { width: 10px; height: 10px; flex: 0 0 10px; margin-top: 2px; border-radius: 3px; background: var(--accent); }
.chart-legend-fixed i { background: var(--accent2); }
.chart-section + .chart-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.chart-section h3 { margin-bottom: 10px; color: var(--ink-soft); font-size: 13px; }
.chart-row { display: grid; gap: 6px; margin: 10px 0; }
.chart-row-button {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-align: left;
  transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}
.chart-row-button:hover, .chart-row-button:focus-visible { border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--shadow-md); }
.chart-row-action { min-height: 36px; display: flex; align-items: center; color: var(--accent-dark); font-size: 11px; font-weight: 600; }
.chart-row-fixed { padding: 8px; border: 1px solid var(--line-soft); border-radius: var(--r-md); }
.fixed-paid-button { justify-self: start; color: var(--accent-dark); }
.chart-row-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.chart-row-heading strong { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.chart-row-heading span { color: var(--muted); font-size: 11px; text-align: right; }
.chart-track { height: 9px; overflow: hidden; border-radius: 999px; background: var(--line-soft); }
.chart-track > span { display: block; min-width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s var(--ease); }
.chart-track-fixed > span { background: var(--accent2); }
.pocket-page-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pocket-page-intro > div { min-width: 0; }
.pocket-page-intro .text-button { flex: 0 0 auto; }
.pocket-overview, .income-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.pocket-overview > div, .income-overview > div {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.pocket-overview span, .income-overview span { color: var(--muted); font-size: 11px; line-height: 1.35; }
.pocket-overview strong, .income-overview strong { font-family: Manrope, Inter, sans-serif; font-size: 19px; font-weight: 600; }
.income-overview small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.pocket-grid-expanded { grid-template-columns: 1fr; gap: 10px; }
.pocket-grid-expanded .pocket-card { padding: 16px; }
.income-intro-note { margin: 10px 0 0; padding: 11px 12px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-dark); font-size: 13px; font-weight: 600; line-height: 1.45; }
.income-list-card .section-heading { margin-top: 0; }
.income-item { align-items: flex-start; }
.income-item-side { display: grid; flex: 0 0 auto; justify-items: end; gap: 6px; }
.income-item-side .secondary-button { min-height: 44px; padding: 0 11px; font-size: 12px; }
.income-form-card > div:first-child h2 { margin-bottom: 5px; }
.income-presets { display: flex; flex-wrap: wrap; gap: 7px; }
.income-rule { margin: 0 4px 16px; }
.transport-estimates { display: grid; gap: 8px; }
.transport-estimates h3 { margin: 0; }
.transport-estimate { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--card-alt); }
.transport-estimate > div { display: grid; gap: 3px; min-width: 0; }
.transport-estimate strong { overflow-wrap: anywhere; font-size: 13px; }
.transport-estimate span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.transport-estimate .text-button { min-height: 44px; flex: 0 0 auto; }
.balance-forecast { overflow: hidden; }
.balance-forecast .section-heading { align-items: flex-start; margin: 0 0 12px; }
.forecast-values { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.forecast-values span { display: grid; gap: 3px; }
.forecast-values span:last-child { text-align: right; }
.forecast-values strong { color: var(--ink); font-family: Manrope, Inter, sans-serif; font-size: 16px; }
.forecast-chart { display: block; width: 100%; height: auto; margin: 10px 0; overflow: visible; }
.forecast-chart line { stroke: var(--line); stroke-width: 1; }
.forecast-chart polyline { fill: none; stroke: var(--accent); stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }
.forecast-chart circle { fill: var(--accent); }
.calendar-card { padding: 14px; }
.calendar-toolbar { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 8px; }
.calendar-toolbar h2 { text-align: center; text-transform: capitalize; }
.calendar-toolbar .secondary-button { min-height: 44px; padding: 0; font-size: 22px; }
.calendar-today-button { display: block; margin: 0 auto 10px; }
.calendar-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0; }
.calendar-summary > div { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 9px 7px; border: 1px solid var(--line-soft); border-radius: var(--r-sm); }
.calendar-summary span { color: var(--muted); font-size: 10px; line-height: 1.35; }
.calendar-summary strong { overflow-wrap: anywhere; font-family: Manrope, Inter, sans-serif; font-size: 13px; }
.calendar-explanation { margin: 0 0 12px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin-top: 10px; touch-action: pan-y; }
.calendar-weekday { padding: 5px 0; color: var(--muted); font-size: 11px; font-weight: 600; text-align: center; }
.calendar-empty { min-height: 58px; }
.calendar-day {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 58px;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 1px 4px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.calendar-day.in-cycle { background: var(--card-alt); border-color: var(--line-soft); }
.calendar-day.is-past .calendar-day-number { color: var(--muted); }
.calendar-day:hover { border-color: var(--accent-line); box-shadow: var(--shadow-sm); }
.calendar-day:focus-visible { outline: 3px solid rgba(14, 124, 134, .25); outline-offset: 1px; }
.calendar-day.is-today { border-color: var(--accent); background: var(--accent-soft); }
.calendar-day.is-today .calendar-day-number { color: var(--accent-dark); }
.calendar-day.is-selected { border-color: var(--accent); background: var(--accent); box-shadow: var(--shadow-accent-hover); }
.calendar-day.is-selected .calendar-day-number,
.calendar-day.is-selected .calendar-amount,
.calendar-day.is-selected .calendar-payday { color: #fff; }
.calendar-day.is-selected .calendar-payday { background: rgba(255, 255, 255, .2); }
.calendar-day-number { font-family: Manrope, Inter, sans-serif; font-size: 14px; font-weight: 600; line-height: 1.2; }
.calendar-payday { padding: 0 4px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 10px; font-weight: 600; line-height: 1.5; }
.calendar-amount { max-width: 100%; overflow: hidden; color: var(--ink); font-size: 10px; font-weight: 600; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.calendar-amount.is-income { color: var(--accent-dark); }
.calendar-amount.is-planned { color: var(--muted); font-weight: 600; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 2px 4px; color: var(--muted); font-size: 12px; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.calendar-legend b { font-size: 11px; }
.legend-cycle { width: 14px; height: 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--card-alt); }
.calendar-entry-note { margin: 0; }

/* Fiche du jour */
.day-sheet { display: grid; gap: 12px; margin-top: 12px; padding: 14px; border: 1px solid var(--accent-line); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow-md); scroll-margin: 16px; animation: sheet-in .2s var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .day-sheet { animation: none; } }
.day-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.day-sheet-head h3 { margin: 0 0 2px; font-size: 17px; }
.day-sheet-close { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; margin: -6px -6px 0 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 18px; }
.day-sheet-close:hover { background: var(--line-soft); color: var(--ink); }
.day-sheet-limit { margin: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.day-sheet-limit strong { color: var(--accent-dark); font-family: Manrope, Inter, sans-serif; }
.day-items { display: grid; gap: 8px; }
.day-item { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow-sm); }
.day-item.is-planned { border-style: dashed; background: var(--card-alt); box-shadow: none; }
.day-item.is-editing { border-color: var(--accent); }
.day-item-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.day-item-main > div { min-width: 0; }
.day-item-amount { white-space: nowrap; font-family: Manrope, Inter, sans-serif; font-size: 15px; }
.day-item-amount.is-income { color: var(--accent-dark); }
.day-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.day-item-actions .secondary-button { min-height: 44px; padding: 0 12px; font-size: 13px; }
.day-item-actions .text-button { color: var(--accent-dark); }
.day-item-actions .day-item-delete { color: var(--red); }
.day-item-confirm { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--red-line); border-radius: var(--r-sm); background: var(--red-soft); color: #8d241a; font-size: 13px; }
.day-item-confirm p { margin: 0; }
.calendar-add > summary { list-style: none; cursor: pointer; }
.calendar-add > summary::-webkit-details-marker { display: none; }
.calendar-add[open] > summary { display: none; }
.calendar-add .form-card { gap: 12px; }
.empty-state { padding: 22px 14px; border: 1px dashed var(--line); border-radius: var(--r-md); color: var(--muted); text-align: center; font-size: 13px; line-height: 1.5; }
.message { margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow-sm); color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.message.error { border-color: var(--red-line); background: var(--red-soft); color: #8d241a; }
.message.success { border-color: var(--green-line); background: var(--green-soft); color: #126d40; }
/* Accueil */
.home-intro { margin-bottom: 16px; }
.home-date { margin: 0 0 2px; color: var(--muted); font-size: 13px; font-weight: 500; }
.home-intro h1 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }

/* Grande carte de l'accueil (maquette v2) : dégradé bleu-vert, texte blanc. */
/* Le fond (vitre, eau, reflets) vient de css/verre-eau.css (.mcb-verre). Ici : la mise en page du contenu. */
.hero-verre { margin-bottom: 14px; }
.hero-contenu { display: flex; flex-direction: column; box-sizing: border-box; min-height: 204px; padding: 18px 20px 4px; }
.hero-verre .card-top { flex-wrap: wrap; justify-content: space-between; row-gap: 6px; color: #ffffff; font-size: 14px; font-weight: 600; }
.hero-verre .card-top > span:first-child { white-space: nowrap; }
.hero-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
}
.hero-status i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; }
.hero-status.vert i { background: #7ee2a8; }
.hero-status.orange i { background: #ffd08a; }
.hero-status.rouge i { background: #ffb4ab; }
.hero-amount { display: grid; gap: 2px; }
.hero-kicker { margin: 0; color: #ffffff; font-size: 14px; font-weight: 600; }
.hero-verre .big-number { margin: 0; color: #ffffff; font-size: clamp(42px, 13vw, 52px); line-height: 1.05; }
.hero-unit { color: #ffffff; font-family: Inter, sans-serif; font-size: 17px; font-weight: 600; letter-spacing: 0; }
.hero-verre .summary-balance { margin: 0; color: #ffffff; font-size: 13.5px; }
.hero-projection { margin: 4px 0 0; color: #ffffff; font-size: 14px; font-weight: 600; line-height: 1.4; }
.hero-projection strong { font-family: Manrope, Inter, sans-serif; font-weight: 600; }
.hero-pleasure { margin: 2px 0 0; color: #ffffff; font-size: 13px; line-height: 1.4; }
.hero-arrow { display: inline-block; margin: 0 2px; font-weight: 600; }
.hero-verre .daily-guidance { color: #ffffff; font-size: 18px; }
/* Une seule ligne sous le montant : solde (touchable pour le modifier) et jours avant la paie. */
.hero-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hero-fact {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(0, 0, 0, .10);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.hero-fact strong { font-family: Manrope, Inter, sans-serif; font-size: 15px; font-weight: 600; }
button.hero-fact:hover { background: rgba(0, 0, 0, .18); }
button.hero-fact:focus-visible { outline: 3px solid #ffffff; outline-offset: 2px; }
.hero-fact-edit { flex: 0 0 14px; margin-left: 2px; }
.hero-verre .calculation-details { border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 0; }
.hero-verre .calculation-details summary { color: #ffffff; }
.hero-verre .calculation-details summary:focus-visible { outline: 3px solid #ffffff; outline-offset: 2px; }
.hero-verre .calculation-details p { color: #ffffff; font-size: 12.5px; }
.hero-balance { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line-soft); color: var(--ink-soft); font-size: 14px; }
.summary-card .hero-balance + .calculation-details { padding-top: 0; border-top: 0; }
.hero-balance strong { color: var(--ink); font-family: Manrope, Inter, sans-serif; }
.home-tip { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--accent-line); border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-dark); font-size: 13px; line-height: 1.5; }
.home-tip strong { display: block; margin-bottom: 2px; }
.home-tip p { margin: 0; color: var(--ink-soft); }
.home-tip-closable { display: flex; align-items: flex-start; gap: 6px; padding-right: 4px; }
.home-tip-closable > div { flex: 1; min-width: 0; }
.livret-card { display: grid; gap: 14px; margin-top: 14px; }
.livret-card h2 { margin: 0; font-size: 17px; }
.livret-card .settings-section-heading p { margin: 4px 0 0; color: var(--ink-soft); font-size: 13.5px; }
.livret-note p { color: var(--ink-soft); }
/* Alerte avant la ligne rouge : ton calme, sans rouge. */
.rythme-alert p { color: var(--ink-soft); }
.rythme-alert .calculation-details { margin-top: 6px; }
/* Page Rappels : deux interrupteurs. */
.rappel-list { display: grid; gap: 4px; }
.rappel-row { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 12px; }
.rappel-row > span { display: grid; gap: 2px; min-width: 0; }
.rappel-row strong { font-size: 15px; font-weight: 500; }
.rappel-row small { color: var(--muted); font-size: 12.5px; }
.rappel-switch { position: relative; width: 56px; height: 44px; flex: 0 0 56px; padding: 0; border: 0; background: transparent; }
.rappel-switch span { position: absolute; top: 50%; left: 50%; width: 48px; height: 28px; margin: -14px 0 0 -24px; border-radius: 14px; background: #b9c0cc; transition: background .2s var(--ease); }
.rappel-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.rappel-switch[aria-checked="true"] span { background: var(--accent-dark); }
.rappel-switch[aria-checked="true"] span::after { transform: translateX(20px); }
.rappel-switch:disabled { opacity: .5; }
.rappel-switch:focus-visible { outline: 3px solid rgba(14, 124, 134, .3); outline-offset: 2px; border-radius: 14px; }
.rappel-info { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: rgba(14, 124, 134, .08); justify-items: start; }
.rappel-info p, .rappel-warning { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.rappel-warning { padding: 10px 12px; border-radius: 12px; background: rgba(196, 76, 63, .08); }
@media (prefers-reduced-motion: reduce) { .rappel-switch span, .rappel-switch span::after { transition: none; } }
.rythme-big { display: grid; gap: 6px; margin: 8px 0; justify-items: start; }
.rythme-big .secondary-button { min-height: 44px; }
.rythme-ignored p { color: var(--ink-soft); font-size: 13.5px; }
.rythme-ignored-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
.rythme-ignored-row .text-button { min-height: 44px; color: var(--accent-dark); font-size: 13.5px; }
/* Saisie en phrase libre, dans la feuille du « + ». */
.quick-free { display: grid; gap: 6px; margin-bottom: 12px; }
.quick-free label { color: #6c7285; font-size: 12.5px; font-weight: 500; }
.quick-free-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.quick-free-row input { min-width: 0; height: 46px; padding: 0 14px; border: 1px solid rgba(23, 26, 36, .1); border-radius: 12px; background: #ffffff; color: var(--ink); font-size: 16px; }
.quick-free-row .secondary-button { min-height: 46px; padding: 0 16px; }
.quick-free-message { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--amber-soft, #fdf3e2); color: var(--amber-text, #9a5c06); font-size: 13.5px; line-height: 1.45; }
.quick-free-card { display: grid; gap: 10px; margin-bottom: 12px; padding: 14px; border: 1px solid rgba(23, 26, 36, .06); border-radius: 16px; background: #ffffff; box-shadow: 0 10px 28px rgba(23, 26, 36, .06); }
.quick-free-card p { margin: 0; color: var(--ink-soft); font-size: 14.5px; line-height: 1.45; }
.quick-free-card .form-cancel { justify-self: center; }
.quick-free-summary { color: var(--ink) !important; font-family: Manrope, Inter, sans-serif; font-size: 17px !important; font-weight: 600; }
.install-guide-steps { display: grid; gap: 8px; margin: 10px 0 2px; padding: 0; list-style: none; }
.install-guide-steps li { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 13.5px; line-height: 1.4; }
.install-guide-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 12px; background: #ffffff; color: var(--accent-dark); }
.install-guide-more { min-height: 44px; padding: 0 2px; font-size: 13.5px; }
.data-card { display: grid; gap: 12px; }
.data-card h2 { margin: 0; font-size: 17px; }
.data-card > p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.data-list { display: grid; gap: 8px; margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.5; }
.backup-reminder { padding-bottom: 4px; }
.backup-reminder-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; }
.backup-reminder-actions .secondary-button { min-height: 44px; }
.backup-reminder-actions .text-button { min-height: 44px; color: #6c7285; font-size: 13.5px; }
.home-tip-close { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; margin: -8px 0 -8px 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--accent-dark); font-size: 16px; }
.home-tip-close:hover { background: rgba(14, 124, 134, .1); }
.home-tip-close:focus-visible { outline: 3px solid rgba(14, 124, 134, .3); outline-offset: 1px; }
.home-row { display: flex; width: 100%; min-height: 58px; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow-sm); color: var(--ink); text-align: left; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.home-row:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); }
.home-row > span:first-child { display: grid; gap: 2px; min-width: 0; }
.home-row strong { font-size: 14px; }
.home-row small { color: var(--muted); font-size: 12px; }
.quick-note-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.quick-note-head .text-button { color: var(--accent-dark); }

/* Mon mois */
.month-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.month-totals > div { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-md); }
.month-totals span { color: var(--muted); font-size: 13px; font-weight: 600; }
.month-totals strong { font-family: Manrope, Inter, sans-serif; font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.month-totals .is-income strong { color: var(--accent-dark); }
.month-fixed { margin: 0 2px 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.month-chart { display: grid; gap: 12px; }
.month-chart h2 { font-size: 16px; }
.month-highlight { margin: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--ink-soft); font-size: 14px; line-height: 1.45; }
.month-highlight strong { color: var(--ink); }
.month-bars { display: grid; gap: 12px; }
.month-bar { display: grid; gap: 5px; }
.month-bar-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14px; }
.month-bar-head strong { font-family: Manrope, Inter, sans-serif; }
.month-days { display: grid; gap: 8px; margin-top: 6px; }
.month-days h2 { margin: 6px 2px 2px; font-size: 16px; }
.month-day { display: grid; width: 100%; gap: 6px; margin: 0; padding: 12px 14px; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.month-day:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); }
.month-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line-soft); }
.month-day-head strong { font-size: 14px; }
.month-day-head > span { font-family: Manrope, Inter, sans-serif; font-size: 14px; font-weight: 600; }
.month-day-head .is-income { color: var(--accent-dark); }
.month-move { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.month-move-label { flex: 1; min-width: 0; overflow: hidden; color: var(--ink-soft); text-overflow: ellipsis; white-space: nowrap; }
.month-move-amount { font-family: Manrope, Inter, sans-serif; font-weight: 600; white-space: nowrap; }
.month-move-amount.is-income { color: var(--accent-dark); }
.month-note { margin: 14px 2px 0; }
.month-note .text-button { min-height: 0; padding: 0; color: var(--accent-dark); }
.month-cta { margin-top: 12px; }
.month-more { margin-top: 12px; }

.quick-note { display: grid; gap: 12px; }
.quick-note h2 { font-size: 17px; }
.quick-note .form-card { gap: 12px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--line-soft); }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: flex; min-height: 44px; align-items: center; justify-content: center; border-radius: var(--r-sm); color: var(--ink-soft); font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s var(--ease), box-shadow .15s var(--ease); }
.segmented input:checked + span { background: var(--card); box-shadow: var(--shadow-sm); color: var(--accent-dark); }
.segmented input:focus-visible + span { outline: 3px solid rgba(14, 124, 134, .25); }
.quick-note-date { width: 100%; min-height: 46px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); }
.amount-input { position: relative; }
.field .amount-input input { padding-right: 36px; font-family: Manrope, Inter, sans-serif; font-size: 19px; font-weight: 500; }
.amount-input span { position: absolute; top: 50%; right: 14px; color: var(--muted); font-size: 16px; font-weight: 400; transform: translateY(-50%); }
.quick-note-done { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px 6px 12px; border: 1px solid var(--accent-line); border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-dark); font-size: 14px; font-weight: 600; }
.quick-note-done .text-button { color: var(--accent-dark); text-decoration: underline; }
.recent-moves { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.recent-moves-head { display: flex; align-items: center; justify-content: space-between; }
.recent-moves-head h3 { margin: 0; color: var(--ink-soft); font-size: 13px; }
.recent-move { display: flex; width: 100%; min-height: 46px; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink); text-align: left; }
.recent-move:hover { background: var(--card-alt); }
.recent-move-emoji { font-size: 18px; }
.recent-move-main { display: grid; flex: 1; min-width: 0; }
.recent-move-main strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.recent-move-main small { color: var(--muted); font-size: 12px; }
.recent-move-amount { font-family: Manrope, Inter, sans-serif; font-size: 15px; white-space: nowrap; }
.recent-move-amount.is-income { color: var(--accent-dark); }
/* Pochettes de l'accueil : cartes blanches avec un anneau de progression (maquette v2). */
.pocket-mini {
  display: flex;
  width: 100%;
  min-height: 80px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 0;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  color: inherit;
  font: inherit;
  text-align: left;
}
.pocket-mini:hover { border-color: transparent; box-shadow: 0 12px 26px rgba(23, 26, 36, .10); }
.pocket-mini:focus-visible { outline: 3px solid rgba(14, 124, 134, .35); outline-offset: 2px; }
.pocket-ring { position: relative; display: grid; width: 52px; height: 52px; flex: 0 0 52px; place-items: center; }
.pocket-ring svg { position: absolute; inset: 0; }
.pocket-ring-emoji { font-size: 19px; line-height: 1; }
.pocket-mini-text { display: grid; min-width: 0; gap: 1px; }
.pocket-mini .pocket-name { color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.pocket-mini .pocket-money { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.2; }
.pocket-mini .pocket-money.over-budget { color: var(--red); }
.pocket-mini-sub { color: var(--muted); font-size: 12px; line-height: 1.3; }
.pocket-mini-sub.over-budget { color: var(--red); font-weight: 600; }
.nowrap { white-space: nowrap; }
.home-intro ~ .section-heading .text-button { color: var(--accent-dark); }

/* « Mes pochettes » + bouton + pour en ajouter une sans quitter l'accueil. */
.home-pockets-title { display: flex; align-items: center; gap: 10px; }
.home-pockets-title h2 { margin: 0; }
.pocket-add-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #12909b, var(--accent-dark));
  box-shadow: 0 6px 14px rgba(11, 95, 103, .28);
  color: #ffffff;
  font-family: Manrope, Inter, sans-serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
}
.pocket-add-button[aria-expanded="true"] span { display: inline-block; transform: rotate(45deg); }
.pocket-add-button:focus-visible { outline: 3px solid rgba(14, 124, 134, .35); outline-offset: 2px; }
.home-pocket-form { display: grid; gap: 12px; }
.home-pocket-form .button-row { display: flex; gap: 10px; }
.home-pocket-form .button-row > * { flex: 1; }
/* Aide à l'installation : gros caractères, étapes numérotées. */
.install-lead { font-size: 16px; line-height: 1.5; }
.install-help { display: grid; gap: 14px; }
.install-card { display: grid; gap: 12px; margin-bottom: 0; }
.install-card h2 { font-size: 21px; }
.install-steps { display: grid; gap: 14px; margin: 0; padding-left: 26px; color: var(--ink); font-size: 18px; line-height: 1.5; }
.install-steps li::marker { color: var(--accent-dark); font-family: Manrope, Inter, sans-serif; font-weight: 600; }
.install-steps strong { color: var(--accent-dark); }
.install-icon { display: inline-block; margin: 0 2px; color: var(--accent-dark); vertical-align: -6px; }
.install-dots { display: inline-block; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; font-weight: 600; }
.install-hint { display: block; margin: 0; color: var(--muted); font-size: 15px; }
.install-warning { margin: 0; padding: 12px 14px; border: 1px solid var(--amber-line); border-radius: var(--r-md); background: var(--amber-soft); color: var(--ink); font-size: 16px; line-height: 1.5; }
.install-done { margin: 8px 0 0; padding: 14px 16px; border: 1px solid var(--accent-line); border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-dark); font-size: 18px; font-weight: 600; }
.install-now { min-height: 56px; font-size: 18px; }

/* Page Mes revenus : liste des revenus réguliers. */
.regular-incomes { display: grid; gap: 12px; }
.regular-incomes .section-heading { margin: 0; }
.regular-income-list { display: grid; gap: 8px; }
.regular-income { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.regular-income.is-principal { border-color: var(--accent-line); background: var(--accent-soft); }
.regular-income-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.regular-income-name { margin: 0; font-size: 15px; font-weight: 600; }
.regular-income-detail { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.regular-income-amount { font-family: Manrope, Inter, sans-serif; font-size: 16px; white-space: nowrap; }
.regular-income.is-editing { padding: 16px 14px; border-color: var(--chip-line); background: #ffffff; }
.pocket-grid + .pleasure-summary { margin-top: 14px; }

/* Astuce du jour (modèle : maquette-accueil.html) */
.tip-card { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; }
.tip-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; background: var(--amber-soft); font-size: 17px; }
.tip-kicker { color: #9a5c06; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.tip-title { margin: 4px 0 2px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.tip-text { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.tip-card .text-button { color: var(--accent-dark); }
.tips-list strong { color: var(--ink); }

/* Questionnaire */
.questionnaire { gap: 6px; }
.question { margin: 0; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line-soft); }
.question legend { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; padding: 0; color: var(--ink); font-size: 15px; font-weight: 600; }
.question-number { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-family: Manrope, Inter, sans-serif; font-size: 13px; font-weight: 600; }
.question .choice { font-size: 14px; }
.questionnaire > .primary-button { margin-top: 10px; }
.questionnaire-skip { justify-self: center; color: var(--muted); }

/* Incohérences repérées */
.anomalies { margin-bottom: 14px; }
.anomalies-summary { display: flex; min-height: 46px; align-items: center; gap: 10px; padding: 8px 14px 8px 12px; border: 1px solid var(--amber-line); border-radius: var(--r-md); background: var(--amber-soft); color: var(--ink); cursor: pointer; list-style: none; }
.anomalies-summary::-webkit-details-marker { display: none; }
.anomalies-summary:focus-visible { outline: 3px solid rgba(14, 124, 134, .25); outline-offset: 2px; }
.anomalies-title { flex: 1; font-size: 14px; font-weight: 600; }
.anomalies-hint { color: var(--accent-dark); font-size: 13px; font-weight: 600; }
.anomalies-hint::after { content: " ›"; }
.anomalies[open] .anomalies-hint::after { content: " ˄"; }
.anomalies-list { display: grid; gap: 8px; margin-top: 8px; }
.anomaly { display: flex; align-items: flex-start; gap: 10px; padding: 12px 6px 6px 12px; border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow-sm); }
.anomaly .anomaly-icon { display: none; }
.anomaly-icon { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border-radius: 50%; background: var(--amber); color: #fff; font-family: Manrope, Inter, sans-serif; font-size: 14px; font-weight: 600; }
.anomaly-body { display: grid; flex: 1; min-width: 0; gap: 2px; }
.anomaly-message { margin: 0; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.45; }
.anomaly-advice { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.anomaly-body .text-button { justify-self: start; color: var(--accent-dark); }
.anomaly-close { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; margin-top: -6px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-soft); font-size: 16px; }
.anomaly-close:hover { background: var(--line-soft); color: var(--ink); }

/* Graphiques */
.chart-missing { margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--card-alt); font-size: 13px; line-height: 1.5; }
.chart-missing > strong { display: block; margin-bottom: 6px; color: var(--ink-soft); }
.chart-missing p { margin: 0; color: var(--muted); }
.chart-missing ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chart-missing li { display: grid; gap: 2px; color: var(--ink-soft); }
.chart-missing li .text-button { justify-self: start; color: var(--accent-dark); }
.chart-missing.is-complete { border-style: solid; border-color: var(--accent-line); background: var(--accent-soft); }
.chart-missing.is-complete > strong { margin-bottom: 2px; color: var(--accent-dark); }
.forecast-chart .forecast-red-line { stroke: var(--red); stroke-dasharray: 4 4; stroke-width: 1.5; }
.forecast-legend { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.forecast-legend i { width: 16px; height: 0; border-top: 2px dashed var(--red); }
.split-bar { display: flex; gap: 2px; height: 18px; overflow: hidden; margin: 4px 0 14px; border-radius: 6px; }
.split-bar > span { min-width: 4px; height: 100%; }
.split-fixed { background: var(--accent2); }
.split-pockets { background: var(--accent); }
.split-oneoff { background: var(--ink-soft); }
.split-free { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.split-legend { display: grid; gap: 8px; margin: 0 0 4px; padding: 0; list-style: none; }
.split-legend li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-soft); }
.split-legend i { width: 12px; height: 12px; flex: 0 0 12px; border-radius: 3px; }
.split-legend strong { margin-left: auto; color: var(--ink); font-family: Manrope, Inter, sans-serif; }
.compare-row { display: grid; gap: 5px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.compare-row:first-of-type { border-top: 0; }
.compare-row > strong { font-size: 13px; }
.compare-line { display: grid; grid-template-columns: 58px minmax(0, 1fr) 56px; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.compare-line > span:last-child { color: var(--ink); font-family: Manrope, Inter, sans-serif; font-weight: 600; text-align: right; }
.chart-track > span.compare-previous { background: var(--faint); }

.pocket-delete-button { margin-top: 4px; color: var(--red); font-size: 12px; }
.pocket-card-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-top: 4px; }
.pocket-card-actions .pocket-delete-button { margin-top: 0; }
.pocket-card-actions .pocket-delete-confirm { flex: 1 1 100%; }
.pocket-edit-button { color: var(--accent-dark); font-size: 13px; }
.pocket-edit-form { display: grid; gap: 10px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.pocket-edit-look { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 10px; }
.pocket-edit-look input[type="color"] { width: 100%; min-height: 46px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); }
.pocket-edit-form .button-row { display: flex; gap: 10px; }
.pocket-edit-form .button-row > * { flex: 1; }
.pocket-delete-confirm { display: grid; gap: 10px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--red-line); border-radius: var(--r-md); background: var(--red-soft); color: #8d241a; font-size: 13px; line-height: 1.5; }
.pocket-delete-confirm p { margin: 0; }
.pocket-delete-confirm .field-label { color: #8d241a; }
.pocket-delete-confirm .choice { background: var(--card); }

.backup-card { display: grid; gap: 10px; margin-top: 18px; }
.backup-card h2 { font-size: 16px; }
.backup-card .note { margin: 0; }
.backup-last { margin: 0; color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.backup-last.is-never { color: var(--amber); }
.backup-import { position: relative; overflow: hidden; cursor: pointer; }
.backup-import input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.backup-import:focus-within { outline: 3px solid rgba(14, 124, 134, .25); outline-offset: 2px; }
.load-error { display: grid; gap: 12px; margin-top: 20px; }
.load-error h1 { font-size: 20px; }
.load-error .message { margin: 0; }
.load-error .note { margin: 0; }
.load-error .backup-import, .load-error .danger-button { justify-self: start; }

.reset-card { display: grid; gap: 10px; margin-top: 18px; }
.reset-card h2 { font-size: 16px; }
.reset-card > .danger-button { justify-self: start; }
.reset-confirm { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--red-line); border-radius: var(--r-md); background: var(--red-soft); color: #8d241a; font-size: 13px; line-height: 1.5; }
.reset-confirm p { margin: 0; }
.reset-confirm .danger-button { border-color: var(--red); background: var(--red); color: #fff; }
.loading { padding: 28px 4px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

/* Barre du bas flottante (charte version 2, section 7, maquette-accueil-v3.html) :
   4 onglets, le « + » rond au centre qui dépasse, une pastille claire qui glisse sous l'onglet actif. */
.bottom-nav {
  position: fixed;
  z-index: 5;
  right: 0;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 0;
  display: grid;
  width: min(calc(100% - 28px), 492px);
  height: 70px;
  grid-template-columns: repeat(2, minmax(0, 1fr)) 64px repeat(2, minmax(0, 1fr));
  align-items: center;
  margin: 0 auto;
  padding: 0 6px;
  border: 1px solid rgba(23, 26, 36, .06);
  border-radius: 28px;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 18px 40px rgba(23, 26, 36, .12);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.nav-tab {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  height: 58px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.nav-icon { display: grid; width: 44px; height: 30px; place-items: center; }
.nav-tab[aria-current="page"] { color: var(--accent-dark); font-weight: 600; }
.nav-tab:focus-visible, .nav-add:focus-visible { outline: 3px solid rgba(14, 124, 134, .3); outline-offset: 1px; }
/* La pastille : 44 x 30 px, derrière l'icône de l'onglet actif. Elle glisse en 200 ms. */
.nav-indicator {
  position: absolute;
  top: 6px;
  left: 0;
  width: 44px;
  height: 30px;
  border-radius: 12px;
  background: var(--accent-soft);
  opacity: 0;
  transform: translateX(var(--nav-x, 0));
  pointer-events: none;
}
.nav-indicator.is-visible { opacity: 1; }
.nav-indicator.is-ready { transition: transform 200ms var(--ease), opacity 200ms var(--ease); }
.nav-add-slot { position: relative; display: grid; place-items: center; height: 60px; margin-top: -26px; }
.bottom-nav .nav-add {
  position: relative;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  padding: 0;
  border: 3px solid #f4f7f7;
  border-radius: 50%;
  background: var(--grad-button);
  box-shadow: 0 12px 26px rgba(11, 95, 103, .38), inset 0 1px 0 rgba(255, 255, 255, .3);
  color: #ffffff;
}
/* Onde douce autour du « + » (2,6 s). Coupée si le téléphone demande moins d'animations. */
.nav-add-wave { position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); animation: nav-wave 2.6s ease-out infinite; pointer-events: none; }
@keyframes nav-wave { 0% { transform: scale(.9); opacity: .5; } 100% { transform: scale(1.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .nav-add-wave { display: none; } .nav-indicator.is-ready { transition: none; } }

/* Feuille de saisie qui monte du bas, ouverte par le « + ». */
.note-sheet-layer { position: fixed; z-index: 30; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.note-sheet-backdrop { position: absolute; inset: 0; background: rgba(23, 26, 36, .28); animation: sheet-fade .2s ease-out both; }
.note-sheet {
  position: relative;
  width: min(100%, 520px);
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: #ffffff;
  box-shadow: 0 -20px 50px rgba(23, 26, 36, .15);
  animation: sheet-up .26s var(--ease) both;
}
.note-sheet-handle { width: 40px; height: 4px; margin: 0 auto 10px; border-radius: 999px; background: rgba(23, 26, 36, .12); }
.note-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.note-sheet-head h2 { margin: 0; font-size: 18px; }
.note-sheet-close { display: grid; width: 44px; height: 44px; place-items: center; margin-right: -10px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.note-sheet-close:hover { background: var(--line-soft); color: var(--ink); }
.note-sheet .message { margin-bottom: 14px; }
body.sheet-open { overflow: hidden; }
@keyframes sheet-up { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheet-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .note-sheet, .note-sheet-backdrop { animation: none; } }

/* Accueil : les derniers mouvements dans leur propre carte. */
.recent-card { display: grid; gap: 4px; }
.recent-card .recent-moves { padding-top: 0; border-top: 0; }
.recent-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.recent-card-head h2 { margin: 0; font-size: 15px; }
.recent-card-head .text-button { color: var(--accent); font-size: 12.5px; font-weight: 600; }
.recent-card .quick-note-done { margin-bottom: 6px; }
.calendar-month-link { margin-top: 8px; color: var(--accent); }

/* Écran de bienvenue (modèle : maquette-bienvenue-animee.html). Plein écran, par-dessus tout le reste.
   Cartes qui flottent, halos qui respirent, courbe qui se dessine, texte en fondu décalé. */
.welcome {
  position: fixed;
  z-index: 20;
  inset: 0;
  overflow: hidden auto;
  background: var(--grad-hero);
  color: #ffffff;
}
.welcome-halo { position: absolute; border-radius: 50%; pointer-events: none; }
.welcome-halo-a { top: -120px; right: -120px; width: 380px; height: 380px; background: radial-gradient(circle, rgba(126, 226, 220, .35), rgba(126, 226, 220, 0) 68%); animation: welcome-glow 6s ease-in-out infinite; }
.welcome-halo-b { bottom: 120px; left: -140px; width: 360px; height: 360px; background: radial-gradient(circle, rgba(129, 120, 255, .35), rgba(129, 120, 255, 0) 68%); animation: welcome-glow 7s ease-in-out infinite 1s; }
.welcome-inner {
  position: relative;
  display: flex;
  width: min(100%, 430px);
  min-height: 100%;
  flex-direction: column;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 0 max(26px, env(safe-area-inset-bottom));
}
/* La scène garde les mesures de la maquette (390 px de large) et se réduit sur les petits écrans. */
.welcome-stage { display: grid; flex: 1 1 auto; min-height: 250px; place-items: center; }
.welcome-scene { position: relative; width: 390px; height: 310px; flex: none; transform: scale(var(--welcome-scale, 1)); }
@media (max-width: 389px) { .welcome-scene { --welcome-scale: .86; margin: -20px -30px; } }
@media (max-height: 700px) { .welcome-stage { min-height: 200px; } .welcome-scene { --welcome-scale: .76; margin: -34px -47px; } }
@media (max-height: 580px) { .welcome-stage { min-height: 150px; } .welcome-scene { --welcome-scale: .58; margin: -60px -82px; } }
.welcome-card-pockets {
  position: absolute;
  top: 128px;
  left: 42px;
  width: 230px;
  height: 140px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 22px;
  background: linear-gradient(140deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .06));
  box-shadow: 0 20px 40px rgba(0, 0, 0, .18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 11px;
}
.welcome-rings { display: flex; gap: 10px; margin-top: 14px; }
.welcome-card-main {
  position: absolute;
  top: 10px;
  right: 30px;
  width: 250px;
  height: 158px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(140deg, #ffffff 0%, #e9f6f6 100%);
  box-shadow: 0 28px 50px rgba(0, 0, 0, .28);
  color: var(--ink);
}
.welcome-card-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 500; }
.welcome-card-top i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.welcome-card-amount { margin-top: 4px; font-family: Manrope, Inter, sans-serif; font-size: 40px; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; }
.welcome-card-amount small { color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: 0; }
.welcome-card-main svg { display: block; margin-top: 6px; }
.welcome-pill {
  position: absolute;
  top: 262px;
  right: 34px;
  display: inline-flex;
  height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  font-size: 12.5px;
  font-weight: 500;
}
.welcome-pill i { width: 7px; height: 7px; border-radius: 50%; background: #7ee2a8; }
.welcome-text { padding: 0 26px; }
.welcome-text .message { margin-bottom: 16px; }
.welcome-brand { display: flex; align-items: center; gap: 8px; margin: 0; font-family: Manrope, Inter, sans-serif; font-size: 14px; font-weight: 600; }
.welcome-brand i { width: 8px; height: 8px; border-radius: 50%; background: #7ee2dc; }
.welcome-text h1 { margin: 14px 0 0; color: #ffffff; font-size: clamp(27px, 8.6vw, 34px); font-weight: 600; letter-spacing: -.02em; line-height: 1.12; }
.welcome-lead { margin: 12px 0 0; color: rgba(255, 255, 255, .86); font-size: 14.5px; line-height: 1.5; }
.welcome-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 20px 0; }
.welcome-start {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .2);
  color: var(--accent-dark);
  font-size: 15.5px;
  font-weight: 600;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.welcome-start:active { transform: translateY(1px); box-shadow: 0 8px 18px rgba(0, 0, 0, .2); }
.welcome-restore { display: inline-flex; min-height: 44px; align-items: center; padding: 0 12px; border-radius: 12px; color: rgba(255, 255, 255, .88); font-size: 13px; }
.welcome-start:focus-visible, .welcome-restore:focus-within { outline: 3px solid #ffffff; outline-offset: 2px; }
@keyframes welcome-glow { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: .85; transform: scale(1.08); } }
/* Moins d'animations demandé sur le téléphone : tout est affiché tout de suite, rien ne bouge. */
@media (prefers-reduced-motion: reduce) {
  .welcome *, .welcome { animation: none !important; transition: none !important; }
  .welcome-card-main { transform: rotate(-8deg); }
  .welcome-card-pockets, .welcome-pill { transform: rotate(7deg); }
}

/* La zone de contenu reçoit le focus à chaque changement d'écran (lecteurs d'écran) : pas de cadre autour. */
#app:focus { outline: none; }

/* Premier lancement : parcours en écrans courts, avec une barre de progression discrète. */
.start { max-width: 460px; margin: 0 auto; animation: start-in .25s var(--ease) both; }
@keyframes start-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .start { animation: none; } .start-progress span { transition: none; } }
.start-progress { height: 4px; overflow: hidden; margin: 0 2px 20px; border-radius: 999px; background: rgba(23, 26, 36, .08); }
.start-progress span { display: block; height: 100%; border-radius: inherit; background: var(--grad-button); transition: width .25s var(--ease); }
.start-head { display: flex; align-items: center; gap: 12px; }
.start-head h1 { margin: 0; }
.start-count { margin: 0 0 2px; color: var(--muted); font-size: var(--fs-hint); font-weight: 500; }
.start-back, .start-row-remove {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(23, 26, 36, .08);
  border-radius: 50%;
  background: rgba(255, 255, 255, .8);
  color: var(--ink);
}
.start-row-remove { border-color: transparent; background: transparent; color: var(--muted); }
.start-row-remove:hover { background: var(--line-soft); color: var(--ink); }
.start-lead { margin: 12px 2px 18px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.start-form .card { margin-bottom: 0; }
.start-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 22px; }
.start-actions .text-button { color: var(--muted); font-size: 13.5px; font-weight: 500; }
.start-list { display: grid; gap: 8px; }
.start-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px 8px 14px; border: 1px solid var(--line); border-radius: var(--r-choice); background: #ffffff; }
.start-row > div { flex: 1; min-width: 0; }
.start-row-title { margin: 0; color: var(--ink); font-size: 14px; font-weight: 500; }
.start-row-detail { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-hint); line-height: 1.4; }
.start-row-amount { font-family: Manrope, Inter, sans-serif; font-size: 15px; font-weight: 600; white-space: nowrap; }
.start-add {
  display: flex;
  width: 100%;
  min-height: var(--h-field);
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed var(--chip-line);
  border-radius: var(--r-field);
  background: transparent;
  color: var(--accent-dark);
  font-size: 13.5px;
  font-weight: 500;
}
.start-add:hover { background: var(--accent-soft); }
.choice-cards-stack { grid-template-columns: 1fr; }
.start-fixed-row { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line-soft); border-radius: var(--r-choice); background: rgba(255, 255, 255, .7); }
.start-form .inline-fields { align-items: end; }

/* Écrans de saisie (modèle : maquette-ajout-revenu.html) : 20 px entre deux blocs,
   le bouton principal en bas sur toute la largeur, puis « Annuler » en texte seul. */
.entry-form, .pocket-edit-form, .home-pocket-form, .quick-note .form-card, .calendar-add .form-card { display: grid; gap: 20px; }
.form-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 2px; }
.form-cancel, .form-actions .text-button { color: var(--muted); font-size: 13.5px; font-weight: 500; }
.settings-form .form-actions { margin: 6px 0 12px; }
.settings-section { gap: 20px; }
.settings-section-heading h2 { font-size: 16px; }
.settings-section-heading p { font-size: var(--fs-hint); }
/* Petite étiquette discrète (revenu principal). */
.badge { display: inline-flex; align-items: center; height: 20px; margin-left: 6px; padding: 0 8px; border: 1px solid var(--chip-line); border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 11px; font-weight: 500; vertical-align: 1px; }
.regular-income-name { font-weight: 500; }
.income-presets, .fixed-presets, .pocket-presets { margin-bottom: 4px; }
input[type="date"] { font-family: inherit; }

/* Ligne rouge : petit schéma. À gauche du trait rouge, la zone à éviter. Le repère « 0 € » montre
   si la limite est à zéro, en dessous (découvert autorisé) ou au-dessus (réserve). */
.line-gauge { --limit: 40%; --zero: 40%; padding: 4px 2px 0; }
.line-gauge[data-mode="decouvert"] { --limit: 27%; --zero: 58%; }
.line-gauge[data-mode="personnel"] { --limit: 60%; --zero: 26%; }
.line-gauge-track { position: relative; height: 70px; }
.line-gauge-track::before { position: absolute; top: 34px; right: 0; left: 0; height: 8px; border-radius: 999px; background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green-line); content: ""; }
.line-gauge-danger { position: absolute; top: 34px; left: 0; width: var(--limit); height: 8px; border-radius: 999px 0 0 999px; background: var(--red-soft); box-shadow: inset 0 0 0 1px var(--red-line); transition: width .25s var(--ease); }
.line-gauge-limit { position: absolute; top: 0; left: var(--limit); display: grid; justify-items: center; gap: 4px; transform: translateX(-50%); transition: left .25s var(--ease); }
.line-gauge-limit b { color: var(--red); font-size: var(--fs-hint); font-weight: 600; white-space: nowrap; }
.line-gauge-limit i { width: 2px; height: 30px; border-radius: 2px; background: var(--red); }
.line-gauge-zero { position: absolute; top: 44px; left: var(--zero); display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: var(--fs-hint); white-space: nowrap; transform: translateX(-50%); transition: left .25s var(--ease); }
.line-gauge-zero i { width: 1px; height: 8px; background: var(--muted); }
.line-gauge-legend { display: flex; justify-content: space-between; color: var(--muted); font-size: var(--fs-hint); }
.line-summary { margin: 0; padding: 11px 12px; border-radius: var(--r-field); background: var(--accent2-soft); color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
@media (prefers-reduced-motion: reduce) { .line-gauge-danger, .line-gauge-limit, .line-gauge-zero { transition: none; } }

/* Voiture et transports : une question par bloc, les blocs apparaissent au fur et à mesure. */
.transport-block { display: grid; gap: 20px; }
.transport-block-title { margin: 0; padding-top: 16px; border-top: 1px solid var(--line-soft); color: var(--ink); font-size: 15px; }
.transport-estimates { gap: 10px; }
.transport-estimates h3 { color: var(--muted); font-size: var(--fs-label); font-weight: 500; }
.start-row-amount small { color: var(--muted); font-family: Inter, sans-serif; font-size: var(--fs-hint); font-weight: 400; }

/* Objectif atteint (modèle : animations/maquette-objectif-atteint.html). Plein écran. */
.goal-screen {
  position: fixed;
  z-index: 950;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden auto;
  padding: max(40px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  background:
    radial-gradient(460px 360px at 50% 0%, rgba(79, 70, 229, .16) 0%, rgba(79, 70, 229, 0) 70%),
    linear-gradient(180deg, #eef0fd 0%, #eaf5f5 55%, #f7f6f2 100%);
  color: var(--ink);
}
.goal-glow { position: absolute; top: 90px; left: 50%; width: 320px; height: 320px; margin-left: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(14, 124, 134, .18), rgba(14, 124, 134, 0) 68%); animation: mcb-glow 4s ease-in-out infinite; pointer-events: none; }
.goal-content { position: relative; display: flex; flex: 1 0 auto; flex-direction: column; align-items: center; justify-content: center; gap: 24px; width: min(100%, 420px); margin: 0 auto; }
.goal-ring { width: 150px; height: 150px; }
.goal-text { text-align: center; }
.goal-kicker { margin: 0; color: var(--accent2-dark); font-size: var(--fs-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.goal-text h1 { margin: 10px 0 0; font-size: clamp(25px, 8vw, 30px); letter-spacing: -.02em; line-height: 1.15; }
.goal-text p:last-child { margin: 12px 0 0; color: var(--muted); font-size: var(--fs-text); line-height: 1.5; }
.goal-card { width: 100%; padding: 16px; border: 1px solid var(--line-soft); border-radius: var(--r-card); background: rgba(255, 255, 255, .9); box-shadow: var(--shadow-soft); }
.goal-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink-soft); font-size: 13px; font-weight: 500; }
.goal-card-head strong { color: var(--accent2-dark); font-family: Manrope, Inter, sans-serif; font-size: 16px; font-weight: 600; }
.goal-card-track { height: 8px; overflow: hidden; margin-top: 10px; border-radius: 999px; background: rgba(23, 26, 36, .06); }
.goal-card-track span { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.goal-actions { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: min(100%, 420px); margin: 24px auto 0; }

/* Listes déroulantes : même case que les autres, avec un petit chevron au trait fin. */
.field select {
  padding-right: 38px;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c7285' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center / 16px no-repeat;
  -webkit-appearance: none;
  appearance: none;
}

/* Pages Calendrier, Pochettes, Mon mois et Réglages à la charte : cartes, anneaux, espacements. */
.pocket-overview > div, .income-overview > div, .month-totals > div {
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--card-glass);
  box-shadow: var(--shadow-soft);
}
.pocket-overview strong, .income-overview strong { font-size: 22px; letter-spacing: -.02em; }
.pocket-overview span, .income-overview span, .month-totals span { font-size: var(--fs-label); font-weight: 500; }
.month-totals strong { font-size: 26px; }
.pocket-overview + .info-card { margin-bottom: 14px; }
.pocket-card { border-color: var(--line-soft); border-radius: var(--r-card); background: var(--card-glass); box-shadow: var(--shadow-soft); }
.pocket-card-full { display: grid; gap: 8px; padding: 16px; }
.pocket-card-head { display: flex; align-items: center; gap: 12px; }
.pocket-card-main { min-width: 0; }
.pocket-card-full .pocket-name { color: var(--ink-soft); font-size: 13px; font-weight: 500; }
.pocket-card-full .pocket-money { margin: 1px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.pocket-card-full .pocket-money small { font-size: 12.5px; font-weight: 400; letter-spacing: 0; }
.pocket-card-full .pocket-money.over-budget { color: var(--red); font-size: 18px; }
.pocket-card-detail { margin: 0; color: var(--muted); font-size: var(--fs-label); line-height: 1.45; }
.pocket-card-full .pocket-daily { margin: 0; font-size: var(--fs-label); font-weight: 400; }
.pocket-card-actions { margin-top: 0; padding-top: 4px; border-top: 1px solid var(--line-soft); }
.pocket-edit-button, .pocket-delete-button { font-size: 13px; font-weight: 500; }
.management-details > summary { font-size: 14.5px; font-weight: 500; color: var(--ink); }
.management-details > summary::after { font-weight: 400; }
.list-item, .goal-card, .transport-estimate, .regular-income, .day-item { border-color: var(--line); border-radius: var(--r-choice); background: #ffffff; box-shadow: none; }
.tips-list { font-size: 13.5px; }

/* Calendrier : grille plus fine, jours du cycle en blanc léger, flèches rondes. */
.calendar-card { padding: 16px 12px; }
.calendar-toolbar { grid-template-columns: 44px minmax(0, 1fr) 44px; }
.calendar-toolbar .secondary-button { display: grid; width: 44px; height: 44px; place-items: center; border-color: rgba(23, 26, 36, .08); border-radius: 50%; background: rgba(255, 255, 255, .8); color: var(--ink); }
.calendar-weekday { font-size: var(--fs-hint); font-weight: 500; }
.calendar-grid { gap: 4px; }
.calendar-day { border-radius: 12px; }
.calendar-day.in-cycle { border-color: transparent; background: rgba(14, 124, 134, .05); }
.calendar-day.is-today { border-color: var(--chip-line); background: var(--accent-soft); }
.calendar-day.is-selected { border-color: transparent; background: var(--grad-button); box-shadow: 0 6px 14px rgba(11, 95, 103, .25); }
.calendar-day-number { font-size: 13.5px; font-weight: 500; }
.calendar-amount { font-weight: 500; }
.legend-cycle { border-color: transparent; background: rgba(14, 124, 134, .12); }
.day-sheet { border-color: var(--line); border-radius: 16px; box-shadow: none; }
.day-sheet-limit, .month-highlight, .income-warning, .income-intro-note { border-radius: var(--r-field); font-weight: 400; }
.day-sheet-close, .anomaly-close, .home-tip-close { color: var(--muted); }

/* Mon mois : barres fines, lignes du jour aérées. */
.meter, .chart-track { height: 6px; }
.month-bar-head { font-size: 13.5px; }
.month-day { border-radius: 16px; }
.month-day-head strong { font-weight: 500; }
.month-move-amount, .month-day-head > span { font-weight: 500; }

/* Réglages : liens en lignes fines avec une icône au trait, rappel de confidentialité discret. */
.settings-link { min-height: 60px; gap: 12px; margin-bottom: 8px; padding: 8px 12px; border-color: var(--line-soft); border-radius: 16px; background: var(--card-glass); box-shadow: none; }
.settings-link strong { font-size: 14px; font-weight: 500; }
.settings-link small { font-size: var(--fs-hint); line-height: 1.4; }
.settings-link-icon { width: 36px; height: 36px; flex: 0 0 36px; border: 0; border-radius: 12px; }
.settings-link-arrow { display: grid; place-items: center; color: var(--muted); }
.settings-privacy { align-items: center; border: 0; border-radius: var(--r-field); background: var(--accent2-soft); }
.settings-privacy > span { display: grid; padding: 0; color: var(--accent2); }
.settings-privacy p { font-size: var(--fs-label); }
.settings-privacy strong { color: var(--ink); }
.backup-card h2, .reset-card h2 { font-size: 16px; }
.tip-icon { color: var(--amber); }
.quick-note-done-text { display: inline-flex; align-items: center; gap: 7px; }
.recent-move-emoji { display: grid; width: 22px; place-items: center; color: var(--accent-dark); }
.install-done { display: flex; align-items: center; gap: 8px; }

/* En arrivant sur une page, les barres se remplissent. Le reste (cascade des cartes, anneaux,
   entrée de la page) est piloté par js/animations.js. Tout est coupé si le téléphone le demande. */
#app.is-entering .meter > span, #app.is-entering .chart-track > span, #app.is-entering .pleasure-track > span { transform-origin: left center; animation: bar-in .5s var(--ease) both; }
@keyframes bar-in { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) {
  #app.is-entering .meter > span, #app.is-entering .chart-track > span, #app.is-entering .pleasure-track > span { animation: none; }
}
/* Charte : toutes les cases écrites ailleurs (premier lancement, revenus, note rapide, pochettes)
   prennent la même hauteur de 46 px et les mêmes coins de 12 px que les cases des formulaires. */
.quick-note-date, .pocket-edit-look input[type="color"] {
  height: var(--h-field);
  min-height: var(--h-field);
  border-radius: var(--r-field);
  background: #ffffff;
}
/* Recaler mon solde (accueil « Solde » et Réglages). */
.recal-card { display: grid; gap: 14px; }
.recal-card form { display: grid; gap: 14px; }
.recal-app { margin: 0; color: var(--ink-soft); }
.recal-app strong { color: var(--ink); font-family: Manrope, Inter, sans-serif; }
.recal-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.recal-compare div { padding: 10px 12px; border: 1px solid rgba(23, 26, 36, .06); border-radius: var(--r-field); background: rgba(255, 255, 255, .6); }
.recal-compare dt { color: #6c7285; font-size: 12px; }
.recal-compare dd { margin: 2px 0 0; color: var(--ink); font-family: Manrope, Inter, sans-serif; font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
/* Bouton secondaire de la charte : texte seul, 13,5 px, gris discret. */
.text-button.recal-change { justify-self: start; min-height: 44px; padding: 0 4px; color: #6c7285; font-size: 13.5px; font-weight: 400; text-decoration: underline; text-underline-offset: 3px; }
.recal-verdict { display: grid; gap: 4px; margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.recal-verdict p { margin: 0; }
/* Écart : toujours avec son signe, la couleur seule ne suffit pas. */
.recal-gap { font-family: Manrope, Inter, sans-serif; font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.recal-verdict.is-less .recal-gap { color: var(--coral-text); }
.recal-verdict.is-more .recal-gap { color: var(--green-text); }
.recal-verdict.is-same { display: flex; align-items: center; gap: 10px; }
.recal-check { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green-text); }
.settings-balance { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.settings-balance strong { color: var(--ink); font-family: Manrope, Inter, sans-serif; font-size: 22px; font-weight: 600; }

/* ============================================================
   Charte version 2 (16 novembre 2026) : fondations.
   ============================================================ */
/* Montants : Manrope 700, chiffres alignés. */
.big-number, .money, .pocket-money, .list-item-amount, .start-row-amount, .recent-move-amount,
.day-item-amount, .regular-income-amount, .month-move-amount, .month-day-head > span,
.month-totals strong, .pocket-overview strong, .income-overview strong, .balance-amount,
.income-highlight, .pleasure-amount, .stat-value, .hero-fact strong, .forecast-values strong,
.goal-card-head strong {
  font-family: Manrope, Inter, sans-serif;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* Chiffre du jour sur l'accueil : 44 px, pas plus. */
.hero-verre .big-number { font-size: 44px; letter-spacing: -.03em; }
/* Montants signés : une dépense en corail avec « − », un revenu en vert avec « + ».
   Le signe est toujours écrit : la couleur seule ne suffit jamais. */
.recent-move-amount, .day-item-amount, .month-move-amount, .month-day-head > span { color: var(--coral-text); }
.recent-move-amount.is-income, .day-item-amount.is-income, .month-move-amount.is-income,
.month-day-head .is-income, .month-totals .is-income strong { color: var(--green-text); }

/* ============================================================
   Accueil v3 (maquette-accueil-v3.html).
   ============================================================ */
.home-intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.home-intro h1 { margin: 0; }
.home-date { font-size: 13px; font-weight: 400; }
.home-initial {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  box-shadow: 0 8px 18px rgba(79, 70, 229, .25);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}
/* Grande carte : le montant par jour, une barre (où on en est du cycle), le solde et les jours. */
.hero-verre .card-top { font-size: 13px; font-weight: 500; }
.hero-verre .card-top > span:first-child { opacity: .92; }
.hero-status { font-size: 12px; font-weight: 600; }
.hero-amount { margin: auto 0; padding: 10px 0; }
.hero-verre .big-number { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; line-height: 1.05; }
.hero-unit { font-size: 14px; font-weight: 500; opacity: .9; }
.hero-facts { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.hero-fact { min-height: 44px; padding: 0; border: 0; background: transparent; color: #ffffff; font-size: 12px; font-weight: 500; opacity: .9; }
button.hero-fact { padding-right: 6px; }
button.hero-fact:hover { background: transparent; opacity: 1; }
.hero-fact-edit { flex: 0 0 13px; }
.hero-verre .calculation-details { margin-top: 2px; }
.hero-verre .calculation-details summary { min-height: 40px; font-size: 12.5px; font-weight: 500; }
.hero-verre .hero-projection { margin: 6px 0 0; font-size: 12.5px; font-weight: 400; }

/* Deux cartes côte à côte : « Dépensé ce cycle » et « Revenu attendu ». */
.home-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.home-mini-card { display: flex; min-width: 0; flex-direction: column; margin: 0; padding: 13px 14px; }
.home-mini-head { display: flex; align-items: center; gap: 8px; }
.home-mini-head h2 { margin: 0; color: var(--muted); font-family: Inter, sans-serif; font-size: 12px; font-weight: 400; letter-spacing: 0; }
.home-mini-icon { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; border-radius: 9px; }
.home-mini-icon.is-spent { background: var(--coral-soft); color: var(--coral); }
.home-mini-icon.is-income { background: var(--green-soft); color: var(--green); }
.home-mini-amount { margin: 8px 0 0; font-family: Manrope, Inter, sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.home-mini-amount.is-income { color: var(--green); }
.home-gauge { height: 5px; overflow: hidden; margin-top: 8px; border-radius: 999px; background: var(--coral-soft); }
.home-gauge > span { display: block; height: 100%; border-radius: inherit; background: var(--coral); }
.home-mini-sub { margin: 6px 0 0; color: var(--muted); font-size: var(--fs-hint); line-height: 1.35; }
.home-mini-missing { margin-top: 8px; color: var(--ink-soft); font-size: 12.5px; }
.home-days { display: flex; gap: 2px; margin-top: 8px; }
.home-days span { height: 5px; flex: 1; border-radius: 3px; background: #d6eee1; }
.home-days span.is-past { background: var(--green); }
.home-mini-link { align-self: flex-start; min-height: 36px; padding: 0; color: var(--accent); font-size: var(--fs-hint); font-weight: 600; text-align: left; }

/* Derniers mouvements : pastille de la couleur de la pochette, libellé, jour, montant signé. */
.recent-card { margin-bottom: 14px; padding: 14px 14px 6px; }
.recent-move { min-height: 52px; gap: 12px; padding: 9px 8px; border-radius: 14px; }
.recent-move + .recent-move { border-top: 1px solid var(--line-soft); border-radius: 0; }
.recent-move-tile { position: relative; display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; overflow: hidden; border-radius: 12px; color: var(--tile); }
.recent-move-tile::before { position: absolute; inset: 0; background: var(--tile); opacity: .14; content: ""; }
.recent-move-tile i { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--tile); }
.recent-move-tile svg { position: relative; }
.recent-move-main strong { font-size: 13.5px; font-weight: 500; }
.recent-move-main small { font-size: 11.5px; }
#app.is-entering .recent-move { animation: recent-in .6s cubic-bezier(.2, .8, .2, 1) both; }
#app.is-entering .recent-move:nth-child(2) { animation-delay: .15s; }
#app.is-entering .recent-move:nth-child(3) { animation-delay: .3s; }
.recent-move.is-new { animation: recent-in .6s cubic-bezier(.2, .8, .2, 1) both, recent-flash 1.4s ease-out .4s both; }
@keyframes recent-in { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@keyframes recent-flash { 0% { background: transparent; } 30% { background: var(--accent-soft); } 100% { background: transparent; } }

/* Deux anneaux de pochettes. */
.home-pockets-heading { margin: 4px 2px 10px; }
.home-pockets-heading h2 { font-size: 15px; }
.home-pockets-heading .text-button { color: var(--accent); font-size: 12.5px; font-weight: 600; }
.pocket-mini { min-height: 64px; gap: 10px; padding: 11px 12px; border-radius: 18px; }
.pocket-mini .pocket-ring { width: 40px; height: 40px; flex: 0 0 40px; }
.pocket-mini .pocket-ring-emoji { font-size: 15px; }
.pocket-mini .pocket-name { color: var(--ink-soft); font-size: 12px; font-weight: 400; }
.pocket-mini .pocket-money { font-size: 16px; }
#app.is-entering .home-gauge > span { transform-origin: left center; animation: bar-in 1s cubic-bezier(.2, .8, .2, 1) .3s both; }
@media (prefers-reduced-motion: reduce) {
  #app.is-entering .recent-move, .recent-move.is-new, #app.is-entering .home-gauge > span { animation: none; }
}

/* ============================================================
   Pochettes v3 (maquette-pochettes-v3.html).
   ============================================================ */
.pocket-page-intro h1 { margin: 0; font-size: 24px; }
/* Carte du total : vitre et eau indigo (css/verre-eau.css, .mcb-verre--indigo). Ici : le contenu. */
.pockets-total { margin-bottom: 12px; border-radius: 22px; }
.pockets-total-content { display: flex; flex-direction: column; justify-content: space-between; box-sizing: border-box; min-height: 152px; padding: 16px 18px; }
.pockets-total p { margin: 0; font-size: 13px; }
.pockets-total-amount { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 !important; }
.pockets-total-amount span { font-family: Manrope, Inter, sans-serif; font-size: 36px; font-weight: 700; letter-spacing: -.03em; }
.pockets-total-amount small { font-size: 13px; opacity: .95; }
.pockets-total-foot { font-size: 12px !important; }
.pocket-grid-expanded { gap: 12px; }
.pocket-row { display: flex; width: 100%; align-items: center; gap: 14px; margin: 0; padding: 14px; color: var(--ink); font: inherit; text-align: left; }
button.pocket-row { cursor: pointer; }
.pocket-row-open { display: grid; gap: 10px; padding: 0 14px 12px; }
.pocket-row-open > .pocket-row { padding: 14px 0 4px; border: 0; box-shadow: none; }
.pocket-ring-percent { position: relative; display: grid; width: 50px; height: 50px; flex: 0 0 50px; place-items: center; }
.pocket-ring-percent svg { position: absolute; inset: 0; }
.pocket-ring-percent > span { position: relative; font-family: Manrope, Inter, sans-serif; font-size: 11px; font-weight: 600; }
.pocket-row-main { display: grid; min-width: 0; flex: 1; gap: 2px; }
.pocket-row-name { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pocket-row-sub { color: var(--muted); font-size: var(--fs-hint); }
.pocket-row-gauge { position: relative; display: block; height: 5px; overflow: hidden; margin-top: 6px; border-radius: 999px; }
.pocket-row-gauge::before { position: absolute; inset: 0; background: var(--gauge); opacity: .14; content: ""; }
.pocket-row-gauge > span { position: relative; display: block; height: 100%; border-radius: inherit; background: var(--gauge); }
.pocket-row-left { display: grid; flex: 0 0 auto; justify-items: end; gap: 2px; text-align: right; }
.pocket-row-amount { font-family: Manrope, Inter, sans-serif; font-size: 19px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.pocket-row-amount.over-budget { color: var(--red); }
.badge-success { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 600; vertical-align: 1px; }
.pleasure-row { margin-top: 12px; }
.pockets-new {
  display: flex;
  width: 100%;
  height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 18px;
  border: 1.5px dashed rgba(14, 124, 134, .35);
  border-radius: 16px;
  background: transparent;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
}
.pockets-new:hover { background: var(--accent-soft); }
.pocket-grid + .home-pocket-form, .pleasure-row + .home-pocket-form { margin-top: 12px; }
#app.is-entering .pocket-row-gauge > span { transform-origin: left center; animation: bar-in 1s cubic-bezier(.2, .8, .2, 1) .3s both; }
@media (prefers-reduced-motion: reduce) {
  #app.is-entering .pocket-row-gauge > span { animation: none; }
}

/* ============================================================
   Saisies (étape 5) : écran « Ajouter un revenu » et pastilles d'exemples qui restent allumées.
   ============================================================ */
.preset-chip.is-selected { border-color: var(--chip-line); background: var(--accent-soft); color: var(--accent-dark); font-weight: 500; }
.income-entry-card { padding: 18px 16px; }
/* Feuille de saisie : cases 46 px, bouton 52 px, pastilles de pochette 32 px (charte, section 4). */
.note-sheet .segmented span { min-height: 44px; }
.note-sheet .choice { min-height: var(--h-chip); }
.note-sheet .primary-button { min-height: var(--h-button); }

/* ============================================================
   Étape 6 : calendrier, réglages, états vides.
   ============================================================ */
/* État vide : une phrase courte et un bouton, jamais un écran blanc. */
.empty-state { display: grid; justify-items: center; gap: 12px; padding: 20px 16px; border: 1px dashed rgba(23, 26, 36, .12); border-radius: 16px; background: rgba(255, 255, 255, .6); color: var(--muted); font-size: 13.5px; }
.empty-state p { margin: 0; max-width: 34ch; }
.empty-state-action { min-height: 44px; border-color: var(--chip-line); background: #ffffff; color: var(--accent-dark); font-weight: 600; }
.empty-state .text-button { color: var(--accent); font-weight: 600; }
.recent-card .empty-state { margin: 6px 0 8px; }
/* Liens dans les phrases d'aide (« Voir mes revenus », « Mes revenus »…) : couleur des actions. */
.field-hint .text-button, .settings-section .text-button { min-height: 44px; color: var(--accent); font-weight: 600; }
/* Calendrier : la fiche du jour reprend les cartes de la charte. */
.calendar-card { border-radius: var(--r-card); }
/* Cases du jour : 44 px de large minimum sur un téléphone de 360 à 390 px. */
.calendar-card { padding-right: 8px; padding-left: 8px; }
.calendar-grid { gap: 2px; }
.day-sheet { background: #ffffff; }
.day-sheet-limit { background: var(--accent-soft); }
.calendar-legend { font-size: var(--fs-hint); }

/* ============================================================
   Étape 7 : contrôle final (contraste et zones tactiles).
   ============================================================ */
.home-mini-amount.is-income, .badge-success { color: var(--green-text); }
.backup-last.is-never { color: var(--amber-text); }
.hero-verre .calculation-details summary, .calculation-details summary { min-height: 44px; }
.pocket-customization input:not([type="color"]), .pocket-customization input[type="color"], .pocket-customization .secondary-button { min-height: 44px; height: 44px; }

/* Sur téléphone, pas de survol : on évite que les cartes restent soulevées après un toucher. */
@media (hover: none) {
  .pocket-card:hover, .settings-link:hover { transform: none; }
}

@media (min-width: 600px) {
  .app-shell { padding-top: 24px; }
}

@media (max-width: 360px) {
  .app-shell { padding-right: 12px; padding-left: 12px; }
  .bottom-nav { width: calc(100% - 16px); grid-template-columns: repeat(2, minmax(0, 1fr)) 60px repeat(2, minmax(0, 1fr)); padding: 0 2px; }
  .nav-tab { font-size: 11px; letter-spacing: -.01em; }
  .pocket-mini { gap: 8px; padding: 10px; }
  .home-duo { gap: 10px; }
  .home-mini-card { padding: 12px; }
  .home-mini-amount { font-size: 19px; }
  .calendar-card { padding: 10px; }
  .calendar-grid { gap: 1px; }
  .calendar-day, .calendar-empty { min-height: 54px; }
  .calendar-day-number { font-size: 13px; }
  .calendar-amount { font-size: 9px; }
  .income-item { flex-direction: column; }
  .income-item-side { width: 100%; grid-template-columns: 1fr auto; align-items: center; justify-items: start; }
  .chart-row-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
  .chart-row-heading span { text-align: left; }
}
