/* Tontinard, interface web des membres.
   Identité : fond chaud et neutre, un seul accent violet (repris de l'application mobile),
   titres en Bricolage Grotesque, texte en Manrope, montants en chiffres tabulaires.
   Motif signature : le cercle de tontine (anneaux, points en orbite). */

@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.ada540c0e24a.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.938c6e8019b6.woff2") format("woff2"); }

:root {
  --bg: #f7f5f2; --surface: #ffffff; --surface-2: #f3f0f7; --ink: #18122b; --muted: #6b6580; --line: #e8e3ee;
  --brand: #6c2ae8; --brand-ink: #4b1db0; --brand-soft: #efe8fd; --on-brand: #ffffff;
  --sun: #f2b705; --sun-soft: #fff4d1; --in: #0e7a4f; --in-soft: #e3f4ec; --out: #c0392b; --out-soft: #fbe9e7; --warn: #a35a06; --warn-soft: #fdf1df;
  --shadow: 0 1px 2px rgb(24 18 43 / .05), 0 8px 24px -12px rgb(24 18 43 / .14);
  --shadow-lift: 0 2px 4px rgb(24 18 43 / .06), 0 18px 40px -16px rgb(76 29 176 / .28);
  --radius: 20px; --radius-sm: 12px;
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0c17; --surface: #181424; --surface-2: #211b31; --ink: #f2eff8; --muted: #a39db5; --line: #2c2540;
    --brand: #a07bff; --brand-ink: #c4adff; --brand-soft: #2a1f47; --on-brand: #12091f;
    --sun: #f5c53a; --sun-soft: #3a2f10; --in: #4cc790; --in-soft: #143326; --out: #ff8a7a; --out-soft: #3a1a17; --warn: #f2b45a; --warn-soft: #3a2a12;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px -12px rgb(0 0 0 / .6);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / .4), 0 18px 40px -16px rgb(160 123 255 / .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
  font: 500 15px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 0; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; white-space: nowrap; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[x-cloak] { display: none !important; }

/* -- Barre supérieure ----------------------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font: 800 19px var(--font-display); letter-spacing: -.03em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; padding: 4px; border-radius: 11px; background: #fff; object-fit: contain;
  box-shadow: 0 0 0 1px rgb(24 18 43 / .06), 0 4px 10px -6px rgb(76 29 176 / .5); }
.spacer { flex: 1; }
.lang { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.lang button { border: 0; background: none; color: var(--muted); font: 700 12px var(--font-body); padding: 4px 9px;
  border-radius: 999px; cursor: pointer; text-transform: uppercase; letter-spacing: .04em; }
.lang button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.menu { position: relative; }
.avatar { width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  color: var(--on-brand); font: 700 14px var(--font-display);
  background: conic-gradient(from 210deg, var(--brand), #c084fc, var(--brand)); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 8px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lift); }
.menu-panel .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-panel .who strong { display: block; }
.menu-panel .who span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.menu-item { width: 100%; display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; border: 0;
  background: none; color: var(--ink); font: 600 14px var(--font-body); cursor: pointer; text-align: left; }
.menu-item:hover { background: var(--surface-2); text-decoration: none; }

/* -- Mise en page --------------------------------------------------------------------------- */
main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 16px 56px; }
.eyebrow { font: 700 12px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.page-head h1 { font-size: clamp(28px, 5vw, 40px); margin-top: 6px; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
.credit { color: inherit; }
.credit a, .credit-main, .credit-sites { color: inherit; white-space: nowrap; }
/* Petits écrans : la phrase sur une ligne, les sites sur la suivante (sans séparateur en début de ligne). */
@media (max-width: 600px) { .credit-sites { display: block; } .credit-sep { display: none; } }
.credit strong { font-weight: 700; color: var(--ink); }
.credit a:hover, .credit a:hover strong { color: var(--brand-ink); }
.auth-credit { margin: 14px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.auth-credit .credit-sites { display: block; }
.auth-credit .credit-sep { display: none; }
.back, .back-groups { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px 7px 10px; border-radius: 999px;
  font-weight: 700; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgb(24 18 43 / .05); white-space: nowrap; transition: border-color .15s ease, color .15s ease; }
.back:hover, .back-groups:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); color: var(--brand-ink); }
.back svg, .back-groups svg { color: var(--brand); }
.group-nav-sep { width: 1px; height: 22px; background: var(--line); }

/* -- Puces et boutons ----------------------------------------------------------------------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.chip.brand { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.total { background: var(--surface); padding: 8px 14px; font-size: 14px; color: var(--ink); box-shadow: var(--shadow); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px; border-radius: 14px; border: 0;
  font: 700 15px var(--font-body); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 10px 24px -12px var(--brand); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -12px var(--brand); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-block { width: 100%; }

/* -- Synthèse du tableau de bord ------------------------------------------------------------ */
.totals { display: flex; flex-wrap: wrap; gap: 8px; }
.totals .chip.total .num { font-family: var(--font-display); font-weight: 700; }

/* -- Cartes de groupe ------------------------------------------------------------------------ */
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.gcard { --tint: hsl(var(--hue) 45% 55%); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 18px;
  padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; isolation: isolate; }
.gcard::before { content: ""; position: absolute; z-index: -1; width: 220px; height: 220px; right: -90px; top: -110px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--tint) 14%, transparent), transparent 70%); }
.gcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--tint) 45%, var(--line)); text-decoration: none; }
.gcard-top { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.gcard h2 { font-size: 21px; overflow-wrap: anywhere; }
.gcard .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gcard-figures { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 44px 0 0; border-top: 1px dashed var(--line); }
.figure .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.figure .value { font: 700 20px var(--font-display); letter-spacing: -.02em; }
.figure .value.lg { font-size: clamp(30px, 6vw, 44px); }
.gcard .alerts { display: flex; flex-wrap: wrap; gap: 6px; }
.gcard .go { position: absolute; right: 18px; bottom: 18px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink); transition: background .2s ease, transform .2s ease; }
.gcard:hover .go { background: var(--brand); color: var(--on-brand); transform: translateX(2px); }

/* Anneau : part du membre dans la caisse du groupe. */
.ring { position: relative; flex: none; width: 74px; height: 74px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--surface-2); }
.ring .value { stroke: var(--tint, var(--brand)); stroke-linecap: round; transition: stroke-dasharray .8s ease; }
.ring .pct { position: absolute; inset: 0; display: grid; place-items: center; font: 700 15px var(--font-display); }
.ring .pct small { display: block; font: 600 9.5px var(--font-body); color: var(--muted); text-align: center; margin-top: -4px; }
.ring.empty { display: grid; place-items: center; border-radius: 50%; border: 2px dashed var(--line); color: var(--muted); }

/* -- Page groupe ---------------------------------------------------------------------------- */
.hero { --tint: hsl(var(--hue) 45% 55%); position: relative; overflow: hidden; border-radius: 28px; padding: clamp(22px, 4vw, 36px);
  margin: 14px 0 22px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(600px 260px at 100% 0%, color-mix(in srgb, var(--tint) 14%, transparent), transparent 70%),
              radial-gradient(400px 200px at 0% 100%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 70%); }
.hero-orbit { position: absolute; z-index: -1; right: -60px; top: 50%; width: 260px; height: 260px; translate: 0 -50%; opacity: .55; }
.hero h1 { font-size: clamp(26px, 5vw, 38px); margin: 8px 0 4px; overflow-wrap: anywhere; }
.hero-figures { display: flex; flex-wrap: wrap; gap: 18px 44px; margin-top: 22px; }
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-bottom: 22px; }
.stat { padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.stat .value { font: 700 22px var(--font-display); margin-top: 2px; }
.stat.warn { background: var(--warn-soft); border-color: transparent; }
.stat.warn .value { color: var(--warn); }
.layout { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .layout { grid-template-columns: minmax(0, 1fr) 320px; } .layout aside { order: 2; } }
.panel { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.panel h2 { font-size: 19px; margin-bottom: 14px; }
.panel-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.panel-head h2 { margin: 0; }
.funds { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.funds .row { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 14px; }
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #c084fc); }
.bar.neg span { background: linear-gradient(90deg, var(--out), #f59e8b); }

/* Contrôle segmenté */
.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.seg a { padding: 7px 14px; border-radius: 10px; font: 700 13.5px var(--font-body); color: var(--muted); }
.seg a:hover { color: var(--ink); text-decoration: none; }
.seg a[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* Opérations */
.ops { list-style: none; margin: 0; padding: 0; }
.ops .day { position: sticky; top: 58px; z-index: 1; padding: 14px 0 6px; font: 700 12px var(--font-body); letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); background: var(--surface); }
.op { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.op-icon { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; }
.op.in .op-icon { background: var(--in-soft); color: var(--in); }
.op.out .op-icon { background: var(--out-soft); color: var(--out); }
.op-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-meta { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-amount { font: 700 16px var(--font-display); }
.op.in .op-amount { color: var(--in); }
.more { display: flex; justify-content: center; padding-top: 16px; }
.more .btn.htmx-request, .seg a.htmx-request { opacity: .6; }
.empty { text-align: center; padding: 34px 12px; color: var(--muted); }
.empty svg { color: var(--brand); opacity: .7; margin-bottom: 8px; }

/* -- Authentification (connexion, mot de passe oublié, inscription) ------------------------- */
.auth { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); overflow-x: clip; }
@media (min-width: 980px) { .auth { grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); } }
.auth-art { --bg: #1d1934; --surface: #262140; --surface-2: #322b52; --line: rgb(255 255 255 / .1); --ink: #f3f0fa; --muted: #b3aacb;
  position: sticky; top: 0; height: 100vh; overflow: hidden; display: none; padding: 40px 48px; color: var(--ink); isolation: isolate;
  background: radial-gradient(700px 420px at 0% 0%, rgb(124 58 237 / .22), transparent 65%), var(--bg); }
@media (min-width: 980px) { .auth-art { display: grid; grid-template-rows: auto 1fr auto auto; gap: 18px; } }
.auth-art .brand { color: #fff; }
.auth-art .brand:hover { opacity: .85; }
.auth-scene { display: grid; place-items: center; min-height: 0; }
.auth-scene .scene { --size: min(380px, 30vw, 46vh); }
.auth-scene .float { font-size: 12px; padding: 8px 11px; }
.auth-scene .f1 { max-width: 190px; }
.auth-pitch h2 { font-size: clamp(26px, 2.6vw, 34px); max-width: 16ch; margin-bottom: 14px; }
.perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--muted); font-weight: 600; font-size: 14.5px; }
.perks li { display: flex; gap: 10px; }
.perks li::before { content: "★"; color: var(--sun); font-size: 12px; line-height: 1.9; }
.auth-lisere { height: 10px; opacity: .7; filter: brightness(3) saturate(0); background: url("../img/ndop.401298d21834.svg") repeat-x left center / auto 10px; }

.auth-form { display: grid; place-items: center; padding: 28px 16px 40px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card.wide { max-width: 560px; }
.auth-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 30px; }
.auth-card h1 { font-size: clamp(28px, 5vw, 34px); }
.auth-card .lead { color: var(--muted); margin: 8px 0 24px; }
.auth-card .small { font-size: 13.5px; }
@media (max-width: 979px) {
  .auth-form { place-items: start center; padding-top: 18px; }
  .auth-card { position: relative; }
  .auth-card::before { content: ""; position: absolute; z-index: -1; right: -60px; top: 84px; width: 170px; height: 170px; border-radius: 50%;
    border: 1.5px dashed color-mix(in srgb, var(--brand) 22%, transparent); animation: spin 60s linear infinite; }
  .auth-card::after { content: ""; position: absolute; z-index: -1; right: 19px; top: 78px; width: 12px; height: 12px; border-radius: 50%;
    background: var(--sun); box-shadow: 0 0 0 5px color-mix(in srgb, var(--sun) 22%, transparent); }
}
@keyframes spin { to { rotate: 360deg; } }
@media (max-height: 520px) { .auth-card::before, .auth-card::after { display: none; } }

.field { display: grid; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field label { font-weight: 700; font-size: 14px; }
.input { position: relative; }
.input input, .input select { width: 100%; min-height: 50px; padding: 13px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink); font: 600 16px var(--font-body); transition: border-color .15s ease, box-shadow .15s ease; }
.input select { appearance: none; padding-right: 42px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.input.has-icon input, .input.has-icon select { padding-left: 46px; }
.input:has(.toggle) input { padding-right: 48px; }
.lead-icon { position: absolute; left: 15px; top: 25px; translate: 0 -50%; color: var(--muted); pointer-events: none; display: grid; }
.input:focus-within .lead-icon { color: var(--brand); }
.input input:focus, .input select:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.input [aria-invalid="true"] { border-color: var(--out); }
.input .toggle { position: absolute; right: 6px; top: 25px; translate: 0 -50%; border: 0; background: none; color: var(--muted);
  padding: 9px; border-radius: 10px; cursor: pointer; }
.input .toggle:hover { background: var(--surface-2); }
.caps { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--warn); }
.field-hint { color: var(--muted); font-size: 12.5px; }
.field-error { color: var(--out); font-size: 13px; font-weight: 600; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; margin-bottom: 18px;
  background: var(--out-soft); color: var(--out); font-weight: 600; font-size: 14px; }
.demo-box { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; margin-bottom: 20px;
  border-radius: 16px; background: var(--sun-soft); border: 1px solid color-mix(in srgb, var(--sun) 40%, transparent); font-size: 14px; }
.demo-box p { margin: 4px 0 8px; color: var(--muted); }
.demo-box form, .demo-box .btn { width: 100%; }
.try-demo { margin-bottom: 4px; }
.demo-box dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; }
.demo-box dt { color: var(--muted); }
.demo-box dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.form-row-end { display: flex; justify-content: flex-end; margin: -6px 0 18px; font-size: 14px; font-weight: 700; }
.btn:disabled { opacity: .7; cursor: progress; transform: none; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 16px; color: var(--muted); font-size: 13px; font-weight: 600; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.state-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 18px; }
.state-icon.ok { background: var(--brand-soft); color: var(--brand); }
.state-icon.bad { background: var(--out-soft); color: var(--out); }
.auth-foot { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }

/* Parcours en étapes (inscription) */
.stepper { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; counter-reset: s; }
.stepper li { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.stepper li::before { content: ""; height: 4px; border-radius: 4px; background: var(--surface-2); transition: background .3s ease; }
.stepper li span { display: none; }
.stepper li.current { color: var(--ink); }
.stepper li.current::before { background: var(--brand); }
.stepper li.done::before { background: color-mix(in srgb, var(--brand) 45%, var(--surface-2)); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.grid-2 { display: grid; gap: 0 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.step-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
/* Choix en cartes (inscription) : boutons radio natifs habillés. */
.choices-field { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.choices-field legend { font-weight: 700; font-size: 14px; padding: 0; margin-bottom: 8px; }
.choices { display: grid; gap: 10px; }
.choices.wide { grid-template-columns: minmax(0, 1fr); }
.choices.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices.pills { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.choice { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 40px 14px 14px; border-radius: 16px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.choice:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.choice:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.choice-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--brand); background: var(--brand-soft); }
.choice-body { display: grid; gap: 3px; min-width: 0; }
.choice-title { font: 700 15.5px var(--font-display); }
.choice-figure { font-weight: 700; font-size: 13.5px; color: var(--brand-ink); }
.choice-text { font-size: 13px; line-height: 1.45; color: var(--muted); }
.choice-check { position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); }
.choice:has(input:checked) .choice-check { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 3px var(--surface); }
.choices.compact .choice { padding: 12px 34px 12px 12px; }
.choices.compact .choice-check { top: 12px; right: 12px; }
.choices.pills .choice { flex-direction: column; align-items: center; gap: 0; padding: 10px 6px; text-align: center; }
.choices.pills .choice-check { display: none; }
.choices.pills .choice-body { justify-items: center; }
.choices.pills .choice-title { font-size: 17px; }
.choices.pills .choice-text { font-size: 11.5px; line-height: 1.25; }
@media (max-width: 380px) { .choices.pills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Petits écrans : formules sur une colonne, nom et capacité sur la même ligne. */
@media (max-width: 480px) {
  .choices.compact { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .choices.compact .choice-body { grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: baseline; }
  .choices.compact .choice-text { grid-column: 1 / -1; }
  .choice { padding: 12px 38px 12px 12px; }
  .choice-icon { width: 38px; height: 38px; }
}
/* Mobile et tablette : la barre d'actions des étapes reste visible en bas de l'écran. */
@media (max-width: 979px) {
  .step-actions { position: sticky; bottom: 0; z-index: 5; margin: 12px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  .step-actions .btn-primary { flex: 1; }
  .step-actions .spacer { display: none; }
}
@media (prefers-reduced-motion: reduce) { .auth-card::before { animation: none; } * { transition: none !important; } }

/* -- Page introuvable ----------------------------------------------------------------------- */
.lost { text-align: center; max-width: 460px; margin: 6vh auto 0; }
.lost .code { font: 800 96px/1 var(--font-display); letter-spacing: -.06em;
  background: linear-gradient(135deg, var(--brand), #c084fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lost p { color: var(--muted); margin: 12px 0 24px; }

/* -- Apparition douce ------------------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
  .cards > :nth-child(2) { animation-delay: .06s; } .cards > :nth-child(3) { animation-delay: .12s; }
  .cards > :nth-child(4) { animation-delay: .18s; } .cards > :nth-child(n+5) { animation-delay: .24s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* -- Gestion d'un groupe (administrateurs) ---------------------------------------------------- */
.manage { max-width: 640px; margin: 14px auto 0; }
.manage.wide { max-width: 860px; }
.manage h1 { font-size: clamp(26px, 5vw, 34px); }
.manage .lead { margin: 6px 0 22px; }
.manage-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.manage-head .lead { margin-bottom: 0; }
.manage-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 860px) { .manage-grid { grid-template-columns: minmax(0, 1fr) 320px; } }
.direction { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dir { display: flex; gap: 10px; align-items: center; padding: 14px; border-radius: 16px; cursor: pointer; background: var(--surface);
  border: 1.5px solid var(--line); transition: border-color .15s ease, background .15s ease; }
.dir input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dir span { display: grid; font-weight: 800; }
.dir small { font-weight: 600; font-size: 12px; color: var(--muted); }
.dir.in svg { color: var(--in); } .dir.out svg { color: var(--out); }
.dir.in:has(input:checked) { border-color: var(--in); background: color-mix(in srgb, var(--in) 7%, var(--surface)); }
.dir.out:has(input:checked) { border-color: var(--out); background: color-mix(in srgb, var(--out) 7%, var(--surface)); }
.dir:has(input:focus-visible), .pill-choice:has(input:focus-visible), .member-chip:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-choice { position: relative; padding: 9px 14px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 14px;
  background: var(--surface); border: 1.5px solid var(--line); }
.pill-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill-choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.input.suffix { display: flex; align-items: center; }
.input.suffix input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input.suffix span { padding: 0 14px; min-height: 50px; display: grid; place-items: center; border: 1.5px solid var(--line); border-left: 0;
  border-radius: 0 14px 14px 0; background: var(--surface-2); font-weight: 700; color: var(--muted); }
.seg-radio label { position: relative; padding: 8px 14px; border-radius: 10px; font: 700 13.5px var(--font-body); color: var(--muted); cursor: pointer; }
.seg-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-radio label[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.member-picker { margin-top: 12px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.picker-tools { display: flex; gap: 8px; margin-bottom: 10px; }
.picker-tools input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg);
  color: var(--ink); font: 600 15px var(--font-body); }
.member-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 280px; overflow-y: auto; }
.member-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px;
  cursor: pointer; font-weight: 600; font-size: 14px; border: 1.5px solid var(--line); background: var(--bg); }
.member-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.member-chip:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.avatar-sm { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font: 800 11.5px var(--font-display);
  color: #fff; background: linear-gradient(135deg, var(--brand), #c084fc); }
.avatar-sm.fund { background: var(--brand-soft); color: var(--brand); }
.op-total { font-weight: 700; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "avatar main tags" "avatar actions actions";
  align-items: center; gap: 4px 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.person .avatar-sm { grid-area: avatar; align-self: start; }
.person-main { grid-area: main; }
.person-tags { grid-area: tags; justify-content: flex-end; }
.person-actions { grid-area: actions; }
.person-actions:empty { display: none; }
@media (min-width: 760px) {
  .person { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "avatar main tags actions"; }
  .person .avatar-sm { align-self: center; }
}
.person.inactive { opacity: .6; }
.person .avatar-sm { width: 40px; height: 40px; font-size: 13px; }
.person-main { display: grid; min-width: 0; }
.person-main span { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-tags, .person-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.op-end { display: grid; justify-items: end; gap: 2px; }
.link-btn { border: 0; background: none; padding: 0; font: 700 12.5px var(--font-body); color: var(--muted); cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; }
.link-btn:hover { color: var(--out); }
.btn-danger { background: var(--out); color: #fff; }
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgb(15 12 23 / .45);
  backdrop-filter: blur(3px); }
.modal-card { width: 100%; max-width: 420px; padding: 22px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lift);
  text-align: left; }
.modal-card h2 { font-size: 20px; margin-bottom: 8px; }
.modal-card p { color: var(--muted); margin: 0 0 18px; font-size: 14.5px; font-weight: 500; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.toasts { position: fixed; z-index: 70; left: 50%; top: 72px; translate: -50% 0; display: grid; gap: 8px; width: min(520px, calc(100% - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lift);
  border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.toast.success svg { color: var(--in); } .toast.error { border-color: color-mix(in srgb, var(--out) 40%, var(--line)); }
.toast.error svg { color: var(--out); }
.toast span { flex: 1; }
.toast-close { border: 0; background: none; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; }

/* -- Navigation d'un groupe (intégrée à la barre du haut) ------------------------------------ */
.brand-compact .brand-word { display: none; }
.has-group-nav .topbar-inner { max-width: 1320px; }
/* La place réelle de la navigation (et non la largeur de la fenêtre ou le zoom) décide de ce qui se replie. */
.group-nav { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; container: groupnav / inline-size; }
.group-nav-name { flex: 0 100 auto; min-width: 6ch; max-width: 26ch; font: 800 15px var(--font-display); color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-nav + .spacer { display: none; }
.group-nav-sep { flex: none; width: 1px; height: 22px; background: var(--line); }
.group-tabs { display: flex; flex: 0 1 auto; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.group-tabs::-webkit-scrollbar { display: none; }
.group-tabs a { padding: 8px 12px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.group-tabs a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.group-tabs a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.group-nav-cta { flex: none; margin-left: auto; white-space: nowrap; }
/* Repli progressif selon la place : bouton d'action réduit à l'icône, puis Fonds et Paramètres, puis Prêts dans « Plus ». */
.group-fold { position: relative; display: block; flex: none; }
.group-fold-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; border-radius: 10px;
  background: none; font: 700 14px var(--font-body); color: var(--muted); cursor: pointer; }
.group-fold-toggle:hover, .group-fold-toggle[aria-expanded="true"] { background: var(--surface-2); color: var(--ink); }
.group-fold-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; display: grid; min-width: 220px; padding: 6px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lift); }
.group-fold-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 700; font-size: 14.5px; color: var(--ink); }
.group-fold-menu a:hover { background: var(--surface-2); text-decoration: none; }
.group-fold-menu a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.group-fold-menu svg { color: var(--brand); }
.group-fold-menu .fold-2 { display: none; }
/* Le bouton d'action garde toujours un libellé : les onglets se replient d'abord, puis le libellé raccourcit. */
.cta-short { display: none; }
.group-fold-toggle[data-active="1"] { background: var(--brand-soft); color: var(--brand-ink); }
@container groupnav (max-width: 900px) {
  .group-tabs .tab-fold-2 { display: none; }
  .group-fold-menu .fold-2 { display: flex; }
  .group-fold-toggle[data-active="2"] { background: var(--brand-soft); color: var(--brand-ink); }
}
@container groupnav (max-width: 780px) { .cta-long { display: none; } .cta-short { display: inline; } }
.bottom-nav { display: none; }
/* Téléphones et tablettes : navigation du groupe dans la barre du bas. */
@media (max-width: 960px) {
  .group-nav .back-groups, .group-nav-sep, .group-tabs, .group-fold, .group-nav-cta { display: none !important; }
  .group-nav-name { font-size: 14px; }
  .has-group-nav main { padding-bottom: 96px; }
  .has-group-nav .step-actions { bottom: 72px; }
  .bottom-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: center;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .bottom-nav a, .bottom-more { display: grid; justify-items: center; gap: 2px; min-width: 56px; padding: 6px 4px; border-radius: 12px; color: var(--muted);
    font-size: 11px; font-weight: 700; }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav a[aria-current="page"], .bottom-more[aria-current="page"] { color: var(--brand-ink); }
  .bottom-nav .bottom-cta { width: 52px; height: 52px; min-width: 0; margin-top: -26px; border-radius: 50%; place-items: center;
    background: var(--brand); color: var(--on-brand); box-shadow: 0 10px 22px -10px var(--brand), 0 0 0 5px var(--bg); }
  .bottom-nav .bottom-cta[aria-current="page"] { color: var(--on-brand); }
}

/* Sélecteur de membres : recherche avec suggestions, membres retenus en dessous. */
.picker-search { position: relative; }
.picker-search input { width: 100%; min-height: 48px; padding: 12px 14px 12px 44px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--bg); color: var(--ink); font: 600 16px var(--font-body); }
.picker-search input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.picker-search .lead-icon { top: 24px; }
.suggestions { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lift); max-height: 300px; overflow-y: auto; }
.suggestions li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.suggestions li.active { background: var(--brand-soft); color: var(--brand-ink); }
.suggest-add { margin-left: auto; color: var(--brand); display: grid; }
.empty-hint { padding: 12px 14px; color: var(--muted); font-size: 14px; }
.picker-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin: 12px 0 8px; font-size: 13.5px; }
.picker-actions { display: flex; gap: 14px; }
/* Membres retenus en pastilles qui s'enchaînent et passent à la ligne selon la largeur disponible. */
.chosen { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; max-height: 240px; overflow-y: auto; }
.chosen-item { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 2px 3px 3px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line); font-weight: 600; font-size: 13.5px; }
.chosen-item .avatar-sm { width: 26px; height: 26px; font-size: 10.5px; }
.chosen-name { min-width: 0; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chosen-remove { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 0; background: none;
  color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
@media (pointer: coarse) { .chosen-remove { width: 34px; height: 34px; } }
.chosen-remove:hover { background: var(--out-soft); color: var(--out); }

.bottom-more { border: 0; background: none; cursor: pointer; font-family: var(--font-body); }
.more-sheet { position: absolute; right: 10px; bottom: calc(100% + 8px); display: grid; min-width: 220px; padding: 6px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lift); }
.more-sheet a { display: flex !important; flex-direction: row; justify-items: start; align-items: center; gap: 10px; padding: 11px 12px !important;
  font-size: 15px !important; color: var(--ink) !important; border-radius: 10px; }
.more-sheet a:hover { background: var(--surface-2); }

/* -- Prêts et sanctions ------------------------------------------------------------------------ */
.debt-section { margin-top: 26px; }
.debt-section h2 { font-size: 21px; }
.debt-section .manage-head p { margin: 4px 0 0; }
.debts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.debt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; padding: 14px 16px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); }
.debt.late { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.debt-main { display: grid; min-width: 0; }
.debt-main .muted { font-size: 13px; }
.debt-figures { display: grid; justify-items: end; }
.debt-remaining { font: 800 18px var(--font-display); }
.debt > .chip { justify-self: start; }
.late-chip { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.debt-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 12px; border-radius: 14px;
  background: var(--surface-2); }
.inline-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; flex: 1 1 160px; }
.inline-form .input input { min-height: 42px; padding: 9px 12px; }
.inline-form .input.suffix span { min-height: 42px; }
.small { font-size: 12.5px; }

/* -- Paramètres --------------------------------------------------------------------------------- */
.settings-list { display: grid; gap: 12px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border-radius: 16px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); }
.switch-row > span { display: grid; gap: 2px; }
.switch-row .muted { font-size: 13.5px; }
.switch { appearance: none; flex: none; width: 46px; height: 26px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer;
  transition: background .2s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: translate .2s ease; }
.switch:checked { background: var(--brand); }
.switch:checked::after { translate: 20px 0; }
.switch:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }

/* -- Associations : état des cotisations ------------------------------------------------------- */
.side-stack { display: grid; gap: 18px; align-content: start; }
.fee-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  font: 700 14px var(--font-body); white-space: nowrap; }
.fee-status.ok { background: var(--in-soft); color: var(--in); }
.fee-status.due { background: var(--surface-2); color: var(--ink); }
.fee-status.late { background: var(--warn-soft); color: var(--warn); }
.fee-hero .fee-status { font-size: 16px; padding: 8px 14px; margin-top: 6px; }
.dues { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.due { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 8px 10px 8px 12px;
  border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; }
.due-period { font-weight: 700; }
.due-state { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.due.paid .due-state { background: var(--in-soft); color: var(--in); }
.due.overdue .due-state { background: var(--warn-soft); color: var(--warn); }
.due.partial .due-state { background: var(--brand-soft); color: var(--brand-ink); }
.due.waived { opacity: .7; }
.hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

/* -- Mandats : frise et relevés ------------------------------------------------------------------ */
.mandates { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.mandate { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; }
.mandate::before { content: ""; position: absolute; left: 8px; top: 22px; bottom: -14px; width: 2px; background: var(--line); }
.mandate:last-child::before { display: none; }
.mandate-dot { width: 18px; height: 18px; margin-top: 16px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); z-index: 1; }
.mandate.current .mandate-dot { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.mandate-card { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mandate.current .mandate-card { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.mandate-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.mandate-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); gap: 10px; margin: 0 0 8px; }
.mandate-figures div { padding: 8px 10px; border-radius: 12px; background: var(--bg); }
.mandate-figures dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.mandate-figures dd { margin: 2px 0 0; font: 700 15px var(--font-display); }
.mandate-figures .in dd { color: var(--in); }
.mandate-figures .out dd { color: var(--out); }
.mandate-figures .total { background: var(--brand-soft); }
.mandate-figures .total dd { color: var(--brand-ink); }
.row-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.statement { border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.statement-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; font-size: 14.5px; }
.statement-line.strong { font-weight: 700; }
.statement-line.sub { padding-top: 4px; padding-bottom: 4px; padding-left: 30px; color: var(--muted); font-size: 13.5px; }
.statement-block { padding: 6px 0 10px; border-top: 1px solid var(--line); }
.statement-block.in .strong .num { color: var(--in); }
.statement-block.out .strong .num { color: var(--out); }
.statement-line.total { border-top: 1px solid var(--line); background: var(--brand-soft); color: var(--brand-ink); font: 700 16px var(--font-display); padding: 14px 16px; }
.gap-note { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.gap-note.ok { background: var(--in-soft); color: var(--in); font-weight: 700; }
.gap-note.warn { background: var(--warn-soft); color: var(--warn); }
.carry { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; padding: 16px 18px; margin-bottom: 18px;
  border-radius: var(--radius); background: var(--brand-soft); }
.carry strong { font: 800 24px var(--font-display); color: var(--brand-ink); }
.hero-mandate { position: relative; display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.hero-mandate:hover { color: var(--brand-ink); }
.hero-mandate.warn { color: var(--warn); }
.gap-note.stack { flex-direction: column; align-items: flex-start; gap: 4px; }

/* Aperçu des dettes sur la page du groupe : une ligne par dette, aérée. */
.debt-preview { list-style: none; margin: 0 0 14px; padding: 0; display: grid; }
.debt-preview li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px dashed var(--line); font-size: 14px; }
.debt-preview li:last-child { border-bottom: 0; }
.debt-kind { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); }
.debt-kind.sanction { background: var(--warn-soft); color: var(--warn); }
.debt-main { display: grid; gap: 2px; min-width: 0; }
.debt-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.debt-meta { font-size: 12.5px; color: var(--muted); }
.debt-meta.late { color: var(--warn); font-weight: 700; }
.panel-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; }
.debt-total { font: 700 15px var(--font-display); color: var(--warn); }

/* Paramètres : types de prêt */
.settings-section { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.settings-section h2 { font-size: 22px; margin-bottom: 6px; }
.settings-section > .muted { margin: 0 0 18px; }
.type-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.type-row { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.type-row.retired { opacity: .65; }
.type-view { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.type-main { display: grid; gap: 2px; }
.type-form { display: grid; gap: 12px; }
.type-form.add { padding: 16px; border-radius: var(--radius-sm); border: 1.5px dashed var(--line); }
.type-fields { display: grid; gap: 12px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 560px) { .type-fields { grid-template-columns: 1fr 1fr; } .type-fields .field:first-child { grid-column: 1 / -1; } }
.type-fields .field { display: grid; gap: 6px; font-weight: 700; font-size: 13.5px; }
.type-form .row-actions { justify-content: flex-end; margin: 0; }

/* -- Documents du groupe ---------------------------------------------------------------------- */
.doc-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 14px; }
.doc-card { padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.doc-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.doc-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--brand-soft); color: var(--brand); }
.doc-main h2 { font-size: 17px; margin: 0 0 6px; overflow-wrap: anywhere; }
.doc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 0 58px; }
.doc-history { list-style: none; margin: 14px 0 0 58px; padding: 12px 14px; border-radius: 12px; background: var(--bg); display: grid; gap: 10px; }
.doc-history li { display: grid; gap: 2px; }
.doc-history a { font-weight: 700; }
.doc-form { display: grid; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.doc-form .field { display: grid; gap: 6px; font-weight: 700; font-size: 13.5px; }
.doc-form .row-actions { justify-content: flex-end; }
.doc-add { border-radius: var(--radius); border: 1.5px dashed var(--line); padding: 16px 20px; }
.doc-add summary { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand-ink); cursor: pointer; list-style: none; }
.doc-add summary::-webkit-details-marker { display: none; }
.doc-add[open] summary { margin-bottom: 4px; }
@media (max-width: 560px) {
  .doc-top { grid-template-columns: auto minmax(0, 1fr); }
  .doc-top .btn { grid-column: 1 / -1; justify-self: start; }
  .doc-actions, .doc-history { margin-left: 0; }
}

/* -- Cotisations ------------------------------------------------------------------------------- */
.field-label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.fee-filter { margin-bottom: 18px; }
.fee-filter .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px;
  border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 12px; }
.fee-rows { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.fee-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 14px 18px;
  border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.fee-row.more { justify-content: center; background: none; border: 0; }
.fee-who { display: grid; gap: 8px; min-width: 0; }
.fee-name { font-weight: 700; color: var(--ink); }
.fee-dues { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fee-pill { padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.fee-pill.paid { background: var(--in-soft); color: var(--in); }
.fee-pill.overdue { background: var(--warn-soft); color: var(--warn); }
.fee-pill.partial { background: var(--brand-soft); color: var(--brand-ink); }
.fee-pill.waived { text-decoration: line-through; }
.fee-state { display: grid; justify-items: end; gap: 4px; }
.fee-plans { padding: 16px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.fee-plans summary { font-weight: 700; cursor: pointer; }
.fee-plan { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.tariffs { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.tariffs li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.tariff-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, .8fr) auto auto; gap: 10px; align-items: end;
  padding: 12px 0; border-bottom: 1px dashed var(--line); }
.tariff-row .field { display: grid; gap: 6px; font-weight: 700; font-size: 13px; }
.tariff-default { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding-bottom: 12px; }
@media (max-width: 640px) { .tariff-row { grid-template-columns: 1fr 1fr; } .tariff-row .field:first-child { grid-column: 1 / -1; } }
.fee-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.fee-section { margin-top: 30px; }
.fee-section h2 { font-size: 20px; margin-bottom: 12px; }
.due { grid-template-columns: 1fr auto auto auto; }
.due-note, .due-waive { grid-column: 1 / -1; }
.due-waive { display: flex; flex-wrap: wrap; gap: 8px; }
.due-waive .input { flex: 1 1 220px; }
.pay-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pay-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.pay-list li > span { display: grid; gap: 2px; }
.sub-card { padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); margin-bottom: 10px; }
.sub-head { display: grid; gap: 4px; }
.sub-head > span { display: grid; gap: 2px; }
#types-operation .type-form { grid-template-columns: 1fr; }
.association-settings-first { margin-top: 0; }
.fee-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin-bottom: 18px; }
.fee-toolbar .fee-filter { margin-bottom: 0; }

/* -- Exercice : bilan et clôture -------------------------------------------------------------- */
.stepper.four { grid-template-columns: repeat(4, 1fr); }
.year-figures { margin-bottom: 14px; }
.year-results { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin: 14px 0 6px; }
.year-results > div { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; }
.year-results strong { font: 700 16px var(--font-display); }
.distribution { display: grid; gap: 16px; margin-top: 18px; }
.share-preview { padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }

/* -- Comptes rendus de séance ----------------------------------------------------------------- */
.report-card { display: grid; gap: 6px; color: var(--ink); transition: border-color .15s ease, transform .15s ease; }
.report-card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); transform: translateY(-1px); }
.report-date { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-ink); }
.report-title { font: 700 18px var(--font-display); }
.report-excerpt { font-size: 14px; line-height: 1.55; }
.report-files { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.report-read h1 { margin: 6px 0 4px; }
.report-read .report-date { margin-top: 18px; }
.report-body { margin-top: 22px; font-size: 16px; line-height: 1.7; max-width: 68ch; }
.report-body p { margin: 0 0 1em; }
.report-attachments { margin-top: 28px; }
.report-attachments h2 { font-size: 18px; margin-bottom: 10px; }
.report-attachments ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.report-attachments a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); font-weight: 700; }
.report-actions { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.textarea { width: 100%; min-height: 220px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink); font: 400 15.5px/1.6 var(--font-body); resize: vertical; }
.textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.report-form { display: grid; gap: 8px; }

/* Choix de fichiers traduit (zone cliquable, noms des fichiers choisis listés dessous) */
.file-drop { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 14px;
  border: 1.5px dashed color-mix(in srgb, var(--brand) 35%, var(--line)); background: var(--surface); cursor: pointer; }
.file-drop:hover, .file-drop:focus-within { border-color: var(--brand); background: var(--brand-soft); }
.file-drop svg { color: var(--brand); flex: none; }
.file-drop > span { display: grid; gap: 2px; }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-names { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.file-names li { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; }

/* -- Tontines --------------------------------------------------------------------------------- */
.tontine-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.tontine-card { display: grid; gap: 8px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); color: var(--ink); }
.tontine-card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.tontine-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tontine-card-top strong { font: 700 17px var(--font-display); }
.progress { display: block; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #c084fc); }
.tontine-progress { display: grid; gap: 6px; margin-bottom: 22px; }
.session-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 24px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line)); box-shadow: var(--shadow); }
.session-hero h2 { font-size: 21px; margin: 6px 0 10px; }
.my-due { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; font-weight: 600; }
.session-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.session-list a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 16px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.session-list a:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.session-list .is-current a { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.session-list .closed a { opacity: .7; }
.session-no { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; }
.session-main { display: grid; gap: 2px; }
.contrib-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.contrib-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; padding: 12px 16px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.contrib-name { font-weight: 700; }
.contrib-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.contrib-actions:empty { display: none; }
.contrib-chip { justify-self: end; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.contrib-chip.confirmed { background: var(--in-soft); color: var(--in); }
.contrib-chip.declared { background: var(--brand-soft); color: var(--brand-ink); }
.contrib-chip.missed { background: var(--warn-soft); color: var(--warn); }
.bid-form { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; margin-top: 12px; }
@media (max-width: 640px) { .bid-form { grid-template-columns: 1fr; } }
.close-panel { margin-top: 30px; padding: 20px 22px; border-radius: var(--radius); background: var(--brand-soft); }
.close-panel h2 { font-size: 19px; margin-bottom: 6px; }
.close-panel .field { display: grid; gap: 6px; font-weight: 700; font-size: 14px; margin: 14px 0; }
.hand-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 12px 0; }
.hand-add .link-btn { grid-column: 1 / -1; justify-self: start; }
.hands { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hand { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.hand-rank { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; font-size: 13px; }
.hand-tools { display: flex; gap: 4px; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 16px; cursor: pointer; }
.icon-btn:disabled { opacity: .35; cursor: default; }

@media (min-width: 641px) {
  .contrib-list li { grid-template-columns: minmax(0, 1fr) auto auto; }
  .contrib-actions { grid-column: auto; order: 3; justify-content: flex-end; }
}
.contrib-actions { align-items: center; }
.contrib-actions form { display: inline-flex; align-items: center; }

/* Tontines publiques : recrutement, charte, demande */
.session-hero.recruit { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.start-form { display: grid; gap: 10px; }
.start-form .field { display: grid; gap: 6px; font-weight: 700; font-size: 13.5px; }
.charter { margin: 26px 0; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.charter h2 { font-size: 18px; margin-bottom: 8px; }
.charter ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.55; }
.join-form { display: grid; gap: 14px; padding: 20px 22px; border-radius: var(--radius); background: var(--brand-soft); }
.join-form h2 { font-size: 19px; margin: 0; }
.join-form .field { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.charter-accept { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.join-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px;
  border-radius: var(--radius); background: var(--brand-soft); }
.discover { margin-top: 28px; text-align: center; }
.join-form .textarea { min-height: 96px; }
.stepper.two { grid-template-columns: repeat(2, 1fr); }
.textarea.compact { min-height: 110px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 22px; background: var(--surface-2); border-radius: var(--radius-sm); }
.segment { position: relative; padding: 10px 12px; border-radius: calc(var(--radius-sm) - 3px); text-align: center; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; transition: background .2s ease, color .2s ease; }
.segment input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.segment:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.segment:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.invite-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; margin: 8px 0 32px; align-items: start; }
.invite-grid form { display: grid; gap: 4px; }
.invite-grid form .btn { justify-self: start; margin-top: 8px; }
.invite-ready { margin: 0 0 28px; border-color: var(--brand-soft); }
.invite-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 6px; }
.copy-field input { font-family: ui-monospace, monospace; font-size: 13px; }
.btn-whatsapp { background: #1f9d55; color: #fff; }
.btn-whatsapp:hover { background: #188046; color: #fff; }
.invite-pending h2, .join-requests h2 { font-size: 19px; margin-bottom: 12px; }
.join-requests { margin: 0 0 24px; }
.invite-page .panel { margin-top: 18px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-setting { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px; }
.inline-setting .input { min-width: min(100%, 260px); flex: 1 1 260px; }
.legal section { margin: 0 0 26px; }
.legal h2 { font-size: 19px; margin: 0 0 10px; }
.legal ul { padding-left: 1.2rem; display: grid; gap: 8px; line-height: 1.6; }
.legal .panel { margin: 0 0 22px; }
.legal-links a { color: inherit; }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-item-quiet { font-size: 14px; color: var(--muted); }

/* -- Mon compte ------------------------------------------------------------------------------------ */
.account-page .settings-section { scroll-margin-top: 90px; }
.danger-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-color: color-mix(in srgb, var(--out) 35%, var(--line)); box-shadow: none; }
.danger-panel > span { display: grid; gap: 4px; max-width: 46ch; }
.danger-panel .muted { font-size: 13.5px; }
.danger-link { color: var(--out); }
.email-current { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; box-shadow: none; margin-bottom: 14px; }
.email-current > span { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.email-current .muted { font-size: 13.5px; }
.help-page { display: grid; gap: 24px; }
.help-foot { margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; color: var(--muted); font-weight: 700; font-size: 14px; }
.form-section { font-size: 16px; margin: 6px 0 12px; }
.form-section:not(:first-of-type) { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.settings-link { display: flex; align-items: center; gap: 14px; margin: 14px 0 6px; padding: 14px 16px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.settings-link:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.settings-link > span { flex: 1; display: grid; gap: 2px; }
.settings-link .muted { font-size: 13.5px; }
/* -- Évolution du solde (parité : courbe de l'ancienne application) ------------------------------------ */
.balance-chart { margin: 0; display: grid; gap: 6px; }
.balance-chart svg { width: 100%; height: 150px; overflow: visible; }
.balance-chart rect { fill: color-mix(in srgb, var(--brand) 45%, transparent); }
.balance-chart rect.now { fill: var(--brand); }
.balance-chart rect.neg { fill: color-mix(in srgb, var(--out) 70%, transparent); }
.balance-chart .zero { stroke: var(--line); stroke-width: 1; }
.balance-chart text { fill: var(--muted); font: 600 9px var(--font-body); }
.chart-switch { display: inline-flex; padding: 3px; gap: 3px; border-radius: 999px; background: var(--surface-2); }
.chart-switch button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; font: 700 12.5px var(--font-body); color: var(--muted); cursor: pointer; }
.chart-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.archive-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.archive-list li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.archive-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); flex: none; }
.archive-main { flex: 1; display: grid; gap: 2px; min-width: 0; }
.empty-state { padding: 28px; text-align: center; }
