/* ============ Police Inter (hébergée en local, marche hors-ligne) ============ */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter.woff2') format('woff2');
}

/* ============ Base ============ */
:root {
    --primary: #10b981;      /* émeraude */
    --primary-2: #34d399;
    --primary-dark: #059669;
    --accent: #f43f5e;       /* corail / rose (accent) */
    --grad: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --bg: #f0f2f5;           /* gris clair froid */
    --card: #ffffff;
    --input-bg: #f4f5f7;
    --chip: #f1f3f5;
    --ink: #18181b;          /* quasi-noir (zinc-900) */
    --grey: #71717a;         /* zinc-500 */
    --line: #e4e4e7;         /* zinc-200 */
    --pos: #10b981;
    --neg: #ef4444;
    --radius: 20px;
    --shadow: 0 4px 20px rgba(24, 24, 27, .06);
}

/* ============ Thème sombre ============ */
:root[data-theme="dark"] {
    --primary: #10b981;
    --primary-2: #34d399;
    --primary-dark: #34d399;
    --accent: #fb7185;
    --grad: linear-gradient(135deg, #059669 0%, #047857 100%);
    --bg: #09090b;           /* zinc-950 */
    --card: #18181b;         /* zinc-900 */
    --input-bg: #27272a;     /* zinc-800 */
    --chip: #27272a;
    --ink: #fafafa;
    --grey: #a1a1aa;         /* zinc-400 */
    --line: #27272a;         /* zinc-800 */
    --pos: #34d399;
    --neg: #f87171;
    --shadow: 0 4px 20px rgba(0, 0, 0, .45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background-color .2s ease, color .2s ease;
}

/* La colonne de contenu : étroite (mobile) par défaut, élargie en desktop */
.content {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}
.content--auth { max-width: 480px; }

/* Barre du haut globale (thème + cloche), masquée en desktop dans le flux mobile */
.topbar-global {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 0;
}
.topbar-global .tg-actions { display: flex; gap: 10px; margin-left: auto; }
.bell {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--card); box-shadow: var(--shadow);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; text-decoration: none;
}
.menu-btn {
    width: 44px; height: 44px; border-radius: 14px;
    background: var(--card); box-shadow: var(--shadow);
    border: none; font-size: 20px; color: var(--ink);
}

.accent { color: var(--accent) !important; }

/* ============ Sidebar ============ */
/* Mobile : hors-écran, glisse depuis la gauche quand on ouvre le menu */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: min(82vw, 300px);
    box-sizing: border-box;
    padding: 22px 16px;
    background: var(--card);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 50;
}
body.nav-open .sidebar { transform: translateX(0); }
.side-brand {
    display: flex; align-items: center; gap: 10px;
    font-size: 20px; font-weight: 800; color: var(--ink);
    padding: 6px 12px 22px;
}
.side-logo { width: 34px; height: 34px; border-radius: 9px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 14px; border-radius: 14px;
    font-weight: 600; font-size: 15px; color: var(--grey);
}
.nav-item .ni-ic { font-size: 18px; width: 22px; text-align: center; }
.nav-item:hover { background: var(--input-bg); color: var(--ink); }
.nav-item.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow); font-weight: 700; }
.side-logout {
    margin-top: auto;
    display: flex; align-items: center; gap: 10px;
    padding: 13px 14px; border-radius: 14px;
    color: var(--neg); font-weight: 700; font-size: 15px;
}
.side-logout:hover { background: color-mix(in srgb, var(--neg) 10%, transparent); }

.scrim {
    position: fixed; inset: 0; background: rgba(0,0,0,.45);
    z-index: 40; border: none;
}

/* ============ Bascule vers le layout desktop ============ */
@media (min-width: 900px) {
    .menu-btn { display: none; }

    .app-shell { display: flex; align-items: flex-start; }

    .sidebar {
        display: flex; flex-direction: column;
        position: sticky; top: 0;
        width: 260px; flex: 0 0 260px;
        height: 100vh;
        padding: 22px 16px;
        background: var(--bg);
        border-right: 1px solid var(--line);
        box-sizing: border-box;
        transform: none !important;
    }
    .scrim { display: none !important; }

    .content {
        max-width: 940px;
        margin: 0 auto;
        padding: 0 28px 48px;
        flex: 1;
        min-width: 0;
    }
    .content--auth { max-width: 480px; margin: 0 auto; }

    .topbar-global { padding: 20px 0 4px; }

    /* Sur desktop, la navigation passe par la sidebar : on masque les
       flèches "retour" et on aère les titres de page */
    .page-header .back { display: none; }
    .page-header { padding-top: 8px; }

    /* Les cartes de premier niveau ne collent plus aux marges mobiles */
    .balance-card, .wallet-panel, .reminders, .stat-summary, .actions,
    .tx-section, .banner, .form-card, .chart-card, .spark-card,
    .search-bar, .chips-row, .recap, .month-nav, .page-header, .topbar {
        margin-left: 0; margin-right: 0;
    }

    /* Grilles plus larges sur grand écran */
    .wallet-panel { grid-template-columns: repeat(3, 1fr); }
    .actions { grid-template-columns: repeat(4, 1fr); }
    .form-card { max-width: 640px; }
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ============ Barre du haut ============ */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 20px 16px;
}

.greet-hi { font-size: 14px; color: var(--grey); font-weight: 600; }
.greet-name { font-size: 21px; font-weight: 800; margin-top: 2px; }

.avatar {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: var(--grad);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 19px;
    box-shadow: var(--shadow);
}

/* ============ Carte de solde ============ */
.balance-card {
    margin: 4px 20px 0;
    padding: 24px 24px 26px;
    border-radius: 26px;
    background: var(--grad);
    color: #fff;
    box-shadow: 0 12px 30px rgba(13, 148, 136, .28);
    position: relative;
    overflow: hidden;
}

.balance-card::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}

.balance-card::before {
    content: '';
    position: absolute;
    right: 30px;
    bottom: -80px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.bc-label {
    font-size: 14px;
    font-weight: 600;
    opacity: .92;
    display: flex;
    align-items: center;
    gap: 8px;
}

.balance {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-top: 8px;
}

.balance .eye,
.bc-label .eye {
    background: rgba(255, 255, 255, .18);
    border: none;
    color: #fff;
    font-size: 15px;
    border-radius: 10px;
    padding: 4px 8px;
}

/* ============ Cartes statistiques ============ */
.stat-summary {
    display: flex;
    gap: 10px;
    padding: 0 20px;
    margin-top: 16px;
    position: relative;
    z-index: 1;
}

.stat-box {
    flex: 1;
    background: var(--card);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 14px 10px;
    text-align: center;
}

.stat-box .val { font-size: 16.5px; font-weight: 800; }
.stat-box .val.pos { color: var(--pos); }
.stat-box .val.neg { color: var(--neg); }
.stat-box .lbl { font-size: 12px; color: var(--grey); font-weight: 600; margin-top: 4px; }

/* Bandeaux d'alerte budget */
.banner {
    margin: 14px 20px 0;
    padding: 13px 16px;
    border-radius: 16px;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.45;
}

.banner.warn { background: #fef3c7; color: #92400e; }
.banner.over { background: #fee2e2; color: #991b1b; }
.banner.success { background: #d1fae5; color: #065f46; }

/* ============ Grille d'actions ============ */
.actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 8px;
    padding: 24px 16px 8px;
}

.action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    text-align: center;
}

.action .ico {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    background: var(--card);
    box-shadow: var(--shadow);
}

/* ============ Liste de transactions ============ */
.tx-section { padding: 8px 20px 40px; }

.section-title {
    padding: 16px 20px 10px;
    font-size: 16px;
    font-weight: 800;
    color: var(--ink);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title a { font-size: 13.5px; color: var(--primary); font-weight: 700; }

.tx-section .section-title { padding-left: 0; padding-right: 0; }

.tx {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--card);
    border-radius: 18px;
    box-shadow: var(--shadow);
    margin-bottom: 10px;
}

.tx-ico {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
}

.tx .info { min-width: 0; flex: 1; }

.tx .label {
    font-weight: 700;
    font-size: 15.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tx .date { color: var(--grey); font-size: 12.5px; margin-top: 3px; }

.tx .amount {
    font-weight: 800;
    font-size: 15.5px;
    white-space: nowrap;
}

.tx .amount.income { color: var(--pos); }

.empty {
    text-align: center;
    color: var(--grey);
    padding: 40px 20px;
    font-size: 15px;
    line-height: 1.6;
}

.tx-divider { display: none; }

/* ============ En-tête de page interne ============ */
.page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 20px 6px;
}

.page-header .back {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 14px;
    background: var(--card);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--ink);
}

.page-header h1 { font-size: 20px; font-weight: 800; color: var(--ink); }

/* ============ Formulaires ============ */
.form-card {
    background: var(--card);
    border-radius: 24px;
    box-shadow: var(--shadow);
    margin: 16px 20px 30px;
    padding: 24px 20px;
}

.field { margin-bottom: 18px; }

.field label {
    display: block;
    font-weight: 700;
    font-size: 13.5px;
    margin-bottom: 7px;
    color: #334155;
}

.field input, .field select {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    font-size: 16px;
    background: var(--input-bg);
    outline: none;
    color: var(--ink);
}

.field input:focus, .field select:focus {
    border-color: var(--primary);
    background: var(--card);
}

.btn {
    display: block;
    width: 100%;
    background: var(--grad);
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 16px;
    font-size: 16.5px;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 8px 20px rgba(13, 148, 136, .3);
}

.btn:active { opacity: .9; }

.btn.danger { background: var(--neg); box-shadow: none; }

.link-row {
    text-align: center;
    margin-top: 18px;
    font-size: 14.5px;
    color: var(--grey);
}

.link-row a { color: var(--primary); font-weight: 700; }

.alert {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14.5px;
    font-weight: 600;
}

.alert.success { background: #d1fae5; color: #065f46; }

/* Sélecteur de catégories en grille */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 6px;
    margin-bottom: 20px;
}

.cat-grid input { display: none; }

.cat-grid .cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    text-align: center;
}

.cat-grid .cat .ico {
    width: 52px;
    height: 52px;
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    border: 2.5px solid transparent;
}

.cat-grid input:checked + .cat .ico {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .15);
}

.cat-grid input:checked + .cat { color: var(--primary-dark); }

/* ============ Statistiques ============ */
.cat-row {
    padding: 14px 16px;
    background: var(--card);
    border-radius: 18px;
    box-shadow: var(--shadow);
    margin: 0 20px 10px;
}

.cat-row .head {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 14.5px;
    margin-bottom: 8px;
}

.cat-row .head .amt { color: var(--ink); }

.cat-row .bar {
    height: 9px;
    background: var(--bg);
    border-radius: 999px;
    overflow: hidden;
}

.cat-row .bar > span {
    display: block;
    height: 100%;
    background: var(--grad);
    border-radius: 999px;
}

.month-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px 10px;
    font-weight: 800;
    font-size: 17px;
}

.month-nav a {
    color: var(--primary);
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: var(--card);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-nav .spacer { width: 40px; }

/* ============ Authentification ============ */
.auth-hero {
    text-align: center;
    padding: 64px 20px 28px;
}

.auth-logo {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(13, 148, 136, .3);
}

.auth-hero h1 {
    font-size: 27px;
    font-weight: 900;
    margin-top: 16px;
    color: var(--ink);
}

.auth-hero p { color: var(--grey); margin-top: 6px; font-size: 15px; }

.auth-card {
    background: var(--card);
    border-radius: 24px;
    box-shadow: var(--shadow);
    margin: 6px 20px 30px;
    padding: 26px 22px;
}

/* ============ Paramètres ============ */
.toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
    color: #334155;
    cursor: pointer;
}

.toggle-row input {
    width: 22px;
    height: 22px;
    accent-color: var(--primary);
}

.settings-list { padding: 10px 20px; }

.settings-list .item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 4px;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
    font-size: 15.5px;
}

.settings-list .item .ic { font-size: 21px; }
.settings-list .item.danger { color: var(--neg); }

/* ==================================================================
   AJOUTS 2026-08 — portefeuilles, transferts, recherche, graphiques
   Mobile-first : tout est pensé pour le pouce sur un écran étroit.
   ================================================================== */

/* --- Bandeau des portefeuilles (défilement horizontal) --- */
.wallets {
    display: flex;
    gap: 10px;
    padding: 4px 20px 2px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.wallets::-webkit-scrollbar { display: none; }

.wallet {
    flex: 0 0 auto;
    min-width: 116px;
    scroll-snap-align: start;
    background: var(--card);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-left: 4px solid var(--wc, var(--primary));
    text-decoration: none;
    color: inherit;
}
.wallet:active { transform: scale(.98); }
.wallet .w-ico { font-size: 18px; }
.wallet .w-name {
    font-size: 12px;
    color: var(--grey);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wallet .w-bal { font-size: 15px; font-weight: 800; white-space: nowrap; }
.wallet .w-bal.neg { color: var(--neg); }
.wallet-add {
    border-left-color: var(--line);
    justify-content: center;
    align-items: center;
    min-width: 88px;
    color: var(--grey);
}

/* --- Sélecteur de portefeuille (formulaires) --- */
.acc-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.acc-picker input { display: none; }

.acc-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--chip, #f1f5f9);
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    border: 2px solid transparent;
    cursor: pointer;
    /* cible tactile confortable */
    min-height: 44px;
}
.acc-picker input:checked + .acc-chip {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .15);
}

/* --- Raccourcis de date --- */
.quick-dates {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.qd {
    flex: 1;
    padding: 10px 6px;
    min-height: 42px;
    border-radius: 12px;
    border: 1.5px solid var(--line);
    background: var(--input-bg);
    font-size: 13.5px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    font-family: inherit;
}
.qd.on, .qd:active {
    border-color: var(--primary);
    background: #ecfdf5;
    color: var(--primary-dark);
}

/* --- Transfert : bouton d'inversion --- */
.transfer-arrow {
    display: flex;
    justify-content: center;
    margin: -8px 0 6px;
}
.swap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    background: var(--card);
    font-size: 20px;
    color: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow);
}
.swap:active { transform: rotate(180deg); }

/* --- Barre de recherche --- */
.search-bar {
    position: relative;
    margin: 12px 20px 4px;
}
.search-bar input {
    width: 100%;
    padding: 13px 40px 13px 42px;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    background: var(--card);
    font-size: 16px; /* >= 16px : évite le zoom auto iOS */
    font-family: inherit;
    box-sizing: border-box;
}
.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
}
.search-ico {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: .6;
}
.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

/* --- Rangées de filtres (chips défilantes) --- */
.chips-row {
    display: flex;
    gap: 8px;
    padding: 10px 20px 2px;
    overflow-x: auto;
    scrollbar-width: none;
}
.chips-row::-webkit-scrollbar { display: none; }

.chip {
    flex: 0 0 auto;
    padding: 9px 16px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13.5px;
    background: var(--card);
    color: #334155;
    box-shadow: var(--shadow);
    text-decoration: none;
    white-space: nowrap;
}
.chip.on { background: var(--primary); color: #fff; }

/* --- Récapitulatif de l'historique filtré --- */
.recap {
    display: flex;
    gap: 10px;
    margin: 12px 20px 0;
    padding: 12px 14px;
    background: var(--card);
    border-radius: 14px;
    box-shadow: var(--shadow);
    font-weight: 800;
    font-size: 14px;
}
.recap .pos { color: var(--pos); }
.recap .neg { color: var(--neg); }
.recap .net { margin-left: auto; color: var(--ink); }

/* --- Séparateur de jour --- */
.day-sep {
    font-size: 12px;
    font-weight: 800;
    color: var(--grey);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 16px 0 6px;
}

/* Une transaction devient cliquable (édition) */
.tx-link { text-decoration: none; color: inherit; }
.tx-link:active { transform: scale(.995); background: #f8fafc; }
.tx .amount.transfer { color: #6366f1; }

/* --- Graphique donut --- */
.chart-card {
    margin: 14px 20px 0;
    padding: 16px;
    background: var(--card);
    border-radius: 18px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 14px;
}
.donut { width: 132px; height: 132px; flex: 0 0 auto; }
.donut circle {
    fill: none;
    stroke-width: 16;
    transform: rotate(-90deg);
    transform-origin: 70px 70px;
}
.donut .donut-track { stroke: #f1f5f9; }
.donut .donut-seg { transition: stroke-dasharray .4s ease; }
.donut text {
    text-anchor: middle;
    transform: none;
    stroke: none;
    fill: var(--ink);
}
.donut .donut-label { font-size: 11px; fill: var(--grey); font-weight: 600; }
.donut .donut-value { font-size: 14px; font-weight: 800; }

.legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend .dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.legend .lg-name {
    flex: 1;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.legend .lg-pct { font-weight: 800; color: var(--grey); }

/* --- Mini-histogramme 6 mois --- */
.spark-card {
    display: flex;
    gap: 6px;
    margin: 8px 20px 0;
    padding: 14px 10px 10px;
    background: var(--card);
    border-radius: 18px;
    box-shadow: var(--shadow);
}
.spark-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    border-radius: 10px;
    padding: 4px 0;
}
.spark-col.on { background: #ecfdf5; }
.spark-col .bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 78px;
}
.spark-col .b { width: 9px; border-radius: 3px 3px 0 0; display: block; }
.spark-col .b.in { background: var(--pos); }
.spark-col .b.out { background: var(--neg); }
.spark-col .m { font-size: 11px; font-weight: 700; color: var(--grey); }

.spark-legend {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: 8px 20px 0;
    font-size: 12px;
    color: var(--grey);
    font-weight: 600;
}
.spark-legend .sw {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 2px;
    margin-right: 5px;
}
.spark-legend .sw.in { background: var(--pos); }
.spark-legend .sw.out { background: var(--neg); }

/* La ligne de catégorie devient cliquable */
a.cat-row { text-decoration: none; color: inherit; display: block; }

/* --- Gestion des portefeuilles --- */
.acc-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.acc-row.archived { opacity: .5; }
.acc-ico {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex: 0 0 auto;
}
.acc-name-form { flex: 1; min-width: 0; }
.acc-name-form input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    color: var(--ink);
    padding: 8px 0;
}
.acc-name-form input:focus {
    outline: none;
    border-bottom: 2px solid var(--primary);
}
.acc-bal { font-weight: 800; font-size: 14px; white-space: nowrap; }
.acc-bal.neg { color: var(--neg); }
.acc-act {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
}

.emoji-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.emoji-picker input { display: none; }
.emoji-opt {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    border: 2px solid transparent;
}
.emoji-picker input:checked + .emoji-opt {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .15);
}

/* --- Bouton d'action dans l'en-tête de page --- */
.page-header .header-act {
    margin-left: auto;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--card);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 17px;
}

.hint {
    margin: 10px 20px 0;
    font-size: 12.5px;
    color: var(--grey);
    line-height: 1.5;
    text-align: center;
}

/* (Ancienne contrainte body 560px retirée : gérée par .content + le shell desktop) */

/* ==================================================================
   AJOUTS 2026-08 (2) — récurrences, rappels, portefeuilles dépliables
   ================================================================== */

/* --- Carte Solde dépliable --- */
.balance-card.expandable { cursor: pointer; }
.balance .bc-chevron {
    font-size: 22px;
    margin-left: 10px;
    opacity: .9;
    transition: transform .25s ease;
    display: inline-block;
}
.balance .bc-chevron.open { transform: rotate(180deg); }
.bc-hint {
    font-size: 12px;
    opacity: .85;
    margin-top: 6px;
    font-weight: 600;
}

/* --- Panneau des portefeuilles en petits blocs (grille 2 colonnes) --- */
.wallet-panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px 20px 4px;
    animation: panelIn .25s ease;
}
@keyframes panelIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.wallet-block {
    background: var(--card);
    border-radius: 16px;
    padding: 14px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--wc, var(--primary));
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 64px;
    justify-content: center;
}
.wallet-block:active { transform: scale(.98); }
.wallet-block .wb-ico { font-size: 20px; }
.wallet-block .wb-name {
    font-size: 12.5px;
    color: var(--grey);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wallet-block .wb-bal { font-size: 16px; font-weight: 800; }
.wallet-block .wb-bal.neg { color: var(--neg); }
.wallet-manage {
    border-left-color: var(--line);
    align-items: center;
    justify-content: center;
    color: var(--grey);
    border: 2px dashed var(--line);
}
.wallet-manage .wb-ico { font-size: 22px; }
.wallet-manage .wb-name { color: var(--grey); }

/* --- Pastille sur un raccourci de l'accueil --- */
.action { position: relative; }
.action-badge {
    position: absolute;
    top: 2px;
    right: 14px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--neg);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

/* --- Carte de rappels (échéances dues) sur l'accueil --- */
.reminders {
    margin: 14px 20px 0;
    background: var(--card);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid #fde68a;
}
.reminders .rem-title {
    background: #fffbeb;
    color: #92400e;
    font-weight: 800;
    font-size: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid #fde68a;
}
.rem-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}
.rem-item:last-child { border-bottom: none; }
.rem-ico {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex: 0 0 auto;
}
.rem-info { flex: 1; min-width: 0; }
.rem-label { font-weight: 700; font-size: 15px; }
.rem-sub { font-size: 12px; color: var(--grey); margin-top: 2px; }
.rem-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.rem-amt { font-weight: 800; font-size: 14px; }
.rem-amt.pos { color: var(--pos); }
.rem-amt.neg { color: var(--neg); }
.rem-btns { display: flex; gap: 6px; }
.rem-ok {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 12.5px;
    padding: 7px 12px;
    border-radius: 10px;
    min-height: 34px;
    display: flex;
    align-items: center;
}
.rem-skip {
    background: #f1f5f9;
    color: #475569;
    border: none;
    font-weight: 700;
    font-size: 12.5px;
    padding: 7px 12px;
    border-radius: 10px;
    min-height: 34px;
    cursor: pointer;
    font-family: inherit;
}

/* --- Lignes de récurrences (page dédiée) --- */
.commit-note {
    background: #f0fdfa;
    color: var(--primary-dark);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 14px;
}
.rec-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.rec-row.off { opacity: .5; }
.rec-ico {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex: 0 0 auto;
}
.rec-info { flex: 1; min-width: 0; }
.rec-label { font-weight: 700; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.rec-amt.pos { color: var(--pos); }
.rec-amt.neg { color: var(--neg); }
.rec-meta { font-size: 12px; color: var(--grey); margin-top: 3px; line-height: 1.5; }
.rec-due { color: #b45309; font-weight: 700; }
.rec-paused { color: var(--grey); font-weight: 700; }
.rec-actions { display: flex; gap: 2px; flex: 0 0 auto; }
.rec-act {
    background: none;
    border: none;
    font-size: 17px;
    cursor: pointer;
    min-width: 40px;
    min-height: 40px;
}

/* --- Sélecteur segmenté (type / fréquence) --- */
.seg { display: flex; gap: 8px; }
.seg input { display: none; }
.seg label {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1.5px solid var(--line);
    background: var(--input-bg);
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
}
.seg input:checked + label {
    border-color: var(--primary);
    background: #ecfdf5;
    color: var(--primary-dark);
}

/* ==================================================================
   AJOUTS 2026-08 (3) — refonte visuelle façon Nafa + mode sombre
   ================================================================== */
.top-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--card);
    box-shadow: var(--shadow);
    font-size: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .15s ease;
}
.theme-toggle:active { transform: scale(.9); }

/* Transitions douces entre thèmes pour les surfaces principales */
.balance-card, .card, .stat-box, .wallet-block, .tx, .form-card,
.chip, .reminders, .rec-row, .spark-card, .chart-card {
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

/* Ligne de réglage du thème (page Paramètres) */
.theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.theme-seg { display: flex; gap: 6px; }
.theme-seg button {
    padding: 9px 16px;
    min-height: 42px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: var(--input-bg);
    color: var(--grey);
    font-weight: 700;
    font-size: 13.5px;
    font-family: inherit;
    cursor: pointer;
}
.theme-seg button.on {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 14%, transparent);
    color: var(--primary-dark);
}

/* ==================================================================
   AJOUTS 2026-08 (4) — cartes bancaires (page Comptes) + divers
   ================================================================== */
.ph-sub { font-size: 13px; color: var(--grey); font-weight: 600; margin-top: 2px; }

.accounts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 4px 20px 0;
}

.acc-card {
    position: relative;
    border-radius: 20px;
    padding: 18px 18px 14px;
    min-height: 168px;
    display: flex;
    flex-direction: column;
    color: #fff;
    background:
        radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--wc) 42%, transparent), transparent 55%),
        linear-gradient(150deg, #232a36 0%, #12161d 70%);
    box-shadow: 0 10px 26px rgba(0,0,0,.28);
    overflow: hidden;
}
.acc-card.archived { opacity: .55; }

.acc-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}
.acc-chip {
    width: 40px; height: 30px; border-radius: 7px;
    background: linear-gradient(135deg, #f6d365, #d4a017);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
    position: relative;
}
.acc-chip::after {
    content: ""; position: absolute; inset: 8px 6px;
    border: 1px solid rgba(0,0,0,.15); border-radius: 3px;
}
.acc-card-net { font-size: 24px; }

.acc-card-lbl {
    font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px;
    text-transform: uppercase; color: rgba(255,255,255,.6);
}
.acc-card-bal {
    font-size: 30px; font-weight: 800; letter-spacing: -.5px;
    margin: 2px 0 auto;
    font-variant-numeric: tabular-nums;
}
.acc-card-bal.neg { color: #fca5a5; }

.acc-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,.12);
}
.acc-card-foot .acc-name-form { flex: 1; min-width: 0; }
.acc-card-foot input {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 4px 0;
}
.acc-card-foot input:focus {
    outline: none;
    border-bottom: 1px solid rgba(255,255,255,.5);
}
.acc-card-act {
    background: rgba(255,255,255,.14);
    border: none;
    width: 34px; height: 34px;
    border-radius: 9px;
    font-size: 15px;
    flex: 0 0 auto;
}

@media (min-width: 620px) {
    .accounts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
    .accounts-grid { grid-template-columns: repeat(3, 1fr); padding: 4px 0 0; }
}

/* ==================================================================
   OVERRIDES DESKTOP (placés en fin de fichier pour gagner la cascade)
   ================================================================== */
@media (min-width: 900px) {
    /* Les cartes ne collent plus aux marges mobiles de 20px */
    .balance-card, .wallet-panel, .reminders, .stat-summary, .actions,
    .tx-section, .banner, .form-card, .chart-card, .spark-card,
    .search-bar, .chips-row, .recap, .month-nav, .page-header, .topbar,
    .accounts-grid, .fete-banner, .hint, .spark-legend {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .topbar { padding-left: 0; padding-right: 0; }
    .balance-card { padding: 28px 32px 30px; border-radius: 24px; }

    /* Sur grand écran, on montre toujours les portefeuilles */
    .wallet-panel { display: grid !important; padding-left: 0; padding-right: 0; }
    .balance-card.expandable { cursor: default; }
    .bc-chevron, .bc-hint { display: none; }

    /* Grille tableau de bord : cartes réparties, pas une colonne étroite */
    .stat-summary { gap: 16px; }
    .tx-section { padding-left: 0; padding-right: 0; }
    .section-title { padding-left: 0; padding-right: 0; }
}

/* ==================================================================
   AJOUTS 2026-08 (5) — barre de navigation du bas (mobile),
   cartes portefeuilles colorées (dashboard), marque, bouton sombre
   ================================================================== */

/* --- Marque dans la barre du haut (mobile) --- */
.tg-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; color: var(--ink); }
.tg-logo { width: 30px; height: 30px; border-radius: 8px; }

/* --- Bouton sombre (façon "AJOUT DE COMPTE") --- */
.btn-dark {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--ink); color: var(--bg);
    font-weight: 700; font-size: 14px; letter-spacing: .5px;
    padding: 13px 22px; border-radius: 999px;
    text-transform: uppercase;
}
:root[data-theme="dark"] .btn-dark { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.accounts-topbar { padding: 2px 20px 14px; }

/* --- Cartes portefeuilles colorées (dashboard) --- */
.wallet-cc {
    position: relative;
    border-radius: 20px;
    padding: 16px 18px 18px;
    min-height: 132px;
    display: flex;
    flex-direction: column;
    color: #fff;
    background: var(--g, var(--grad));
    box-shadow: 0 8px 22px rgba(0,0,0,.16);
    overflow: hidden;
}
.wallet-cc::after {
    content: ""; position: absolute; right: -40px; top: -40px;
    width: 130px; height: 130px; border-radius: 50%;
    background: rgba(255,255,255,.14);
}
.wcc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; z-index: 1; }
.wcc-ic {
    width: 34px; height: 34px; border-radius: 10px;
    background: rgba(255,255,255,.22);
    display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.wcc-name {
    font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wcc-lbl {
    font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
    text-transform: uppercase; color: rgba(255,255,255,.75); z-index: 1;
}
.wcc-bal {
    font-size: 21px; font-weight: 800; margin-top: auto; z-index: 1;
    font-variant-numeric: tabular-nums;
}
.wcc-bal.neg { color: #fecaca; }
.wallet-cc-add {
    background: var(--input-bg);
    color: var(--grey);
    border: 2px dashed var(--line);
    align-items: center;
    justify-content: center;
    box-shadow: none;
}
.wallet-cc-add::after { display: none; }
.wallet-cc-add .wcc-plus { font-size: 24px; }

/* Sur mobile : les cartes défilent horizontalement comme chez Nafa */
@media (max-width: 899px) {
    .wallet-panel {
        display: flex !important;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 4px 20px 6px;
        scrollbar-width: none;
    }
    .wallet-panel::-webkit-scrollbar { display: none; }
    .wallet-cc {
        flex: 0 0 78%;
        scroll-snap-align: start;
    }
    .wallet-cc-add { flex-basis: 45%; min-height: 132px; }
}

/* --- Barre de navigation du bas (mobile) --- */
.bottomnav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 68px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: var(--card);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(0,0,0,.06);
}
.bn-item {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    height: 100%;
    font-size: 22px;
    color: var(--grey);
    opacity: .65;
}
.bn-item.active { opacity: 1; color: var(--primary); }
.bn-item.active .bn-ic { filter: none; }
.bn-fab {
    flex: 0 0 auto;
    width: 58px; height: 58px;
    margin-top: -22px;
    border-radius: 20px;
    background: var(--grad);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; font-weight: 300;
    box-shadow: 0 8px 20px rgba(16,185,129,.45);
}
/* Laisser de la place au-dessus de la barre du bas */
body .content { padding-bottom: 88px; }

@media (min-width: 900px) {
    .bottomnav { display: none; }
    .tg-brand { display: none; }   /* la marque est déjà dans la sidebar */
    body .content { padding-bottom: 48px; }
}

/* ==================================================================
   AJOUTS 2026-08 (6) — carte MONTANT TOTAL + sous-cartes Reçu/Dépensé
   (agencement type Nafa ; l'œil de masquage est à côté du solde)
   ================================================================== */
.total-card {
    margin: 4px 20px 0;
    background: var(--card);
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--shadow);
}
.tc-label {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--input-bg);
    color: var(--ink);
    font-size: 12px; font-weight: 800; letter-spacing: 1px;
    padding: 9px 16px; border-radius: 999px;
    box-shadow: var(--shadow);
}
.tc-label .tc-ic { font-size: 15px; }

.tc-bal-row { display: flex; align-items: center; gap: 14px; margin: 16px 0 18px; }
.tc-bal {
    font-size: 40px; font-weight: 800; letter-spacing: -1px;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.tc-eye {
    background: none; border: none; font-size: 22px; opacity: .55;
    line-height: 1;
}

.tc-subs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tc-sub {
    border-radius: 16px;
    padding: 16px;
    background: var(--input-bg);
}
.tc-sub.recu    { background: color-mix(in srgb, var(--pos) 12%, var(--card)); }
.tc-sub.depense { background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.tcs-head {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 800; letter-spacing: 1px;
    margin-bottom: 12px;
}
.tc-sub.recu .tcs-head    { color: var(--pos); }
.tc-sub.depense .tcs-head { color: var(--accent); }
.tcs-ic {
    width: 30px; height: 30px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; background: var(--card);
}
.tcs-val {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 22px; font-weight: 800; color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.tcs-badge {
    font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px;
}
.tcs-badge.pos { color: var(--pos); background: color-mix(in srgb, var(--pos) 16%, transparent); }
.tcs-badge.neg { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }

@media (min-width: 900px) {
    .total-card { margin: 4px 0 0; padding: 26px 30px; }
    .tc-bal { font-size: 46px; }
    .tcs-val { font-size: 24px; }
}

/* ==================================================================
   AJOUTS 2026-08 (7) — Landing page publique (.lp)
   ================================================================== */
body.lp { max-width: none; }
.lp-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 22px; max-width: 1100px; margin: 0 auto;
}
.lp-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); }
.lp-logo { width: 34px; height: 34px; border-radius: 9px; }
.lp-nav-actions { display: flex; align-items: center; gap: 10px; }
.lp-btn-ghost {
    padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px;
    color: var(--ink); border: 1.5px solid var(--line);
}
.lp-btn-primary {
    padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: 14px;
    color: #fff; background: var(--grad); box-shadow: 0 6px 18px rgba(16,185,129,.35);
}
.lp-btn-primary.lg, .lp-btn-ghost.lg { padding: 15px 26px; font-size: 16px; }
.lp-nav-actions .lp-btn-ghost { display: none; }

.lp-hero {
    max-width: 1100px; margin: 0 auto; padding: 30px 22px 20px;
    display: grid; grid-template-columns: 1fr; gap: 34px; align-items: center;
}
.lp-tag {
    display: inline-block; background: var(--input-bg); color: var(--grey);
    font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 999px;
    margin-bottom: 16px;
}
.lp-hero h1 { font-size: 38px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.lp-sub { color: var(--grey); font-size: 16px; line-height: 1.6; margin: 16px 0 24px; max-width: 520px; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-trust { margin-top: 14px; font-size: 13px; color: var(--grey); }

/* Visuel du hero */
.lp-hero-visual { display: flex; flex-direction: column; gap: 14px; }
.lp-mini-card { background: var(--card); border-radius: 22px; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.12); }
.lp-mc-label {
    display: inline-block; background: var(--input-bg); font-weight: 800; font-size: 11px;
    letter-spacing: 1px; padding: 8px 14px; border-radius: 999px; color: var(--ink);
}
.lp-mc-bal { font-size: 38px; font-weight: 800; margin: 14px 0 16px; color: var(--ink); }
.lp-mc-bal span { font-size: 24px; }
.lp-mc-subs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lp-mc-sub { border-radius: 14px; padding: 12px; font-size: 13px; }
.lp-mc-sub span { font-weight: 800; font-size: 11px; letter-spacing: .5px; }
.lp-mc-sub b { display: block; margin-top: 6px; font-size: 16px; color: var(--ink); }
.lp-mc-sub.recu { background: color-mix(in srgb, var(--pos) 12%, var(--card)); }
.lp-mc-sub.recu span { color: var(--pos); }
.lp-mc-sub.dep { background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.lp-mc-sub.dep span { color: var(--accent); }
.lp-mini-wallets { display: flex; gap: 10px; }
.lp-mw {
    flex: 1; color: #fff; font-weight: 700; font-size: 13px;
    padding: 18px 14px; border-radius: 16px; background: var(--g);
    display: flex; align-items: flex-end; min-height: 70px;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

.lp-features { max-width: 1100px; margin: 20px auto 0; padding: 30px 22px; }
.lp-h2 { font-size: 26px; font-weight: 800; text-align: center; margin-bottom: 26px; }
.lp-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.lp-feat { background: var(--card); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.lp-fic {
    width: 48px; height: 48px; border-radius: 14px; display: flex;
    align-items: center; justify-content: center; font-size: 24px; margin-bottom: 14px;
}
.lp-feat h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.lp-feat p { color: var(--grey); font-size: 14.5px; line-height: 1.55; }

.lp-final {
    max-width: 760px; margin: 20px auto; padding: 44px 22px; text-align: center;
    background: var(--grad); border-radius: 28px; color: #fff;
    box-shadow: 0 20px 50px rgba(16,185,129,.3);
}
.lp-final h2 { font-size: 28px; font-weight: 800; }
.lp-final p { opacity: .92; margin: 10px 0 22px; }
.lp-final .lp-btn-primary { background: #fff; color: var(--primary-dark); box-shadow: none; }

.lp-footer { text-align: center; color: var(--grey); font-size: 13px; padding: 30px 22px 40px; }
.lp-footer a { color: var(--primary); font-weight: 700; }

@media (min-width: 820px) {
    .lp-nav-actions .lp-btn-ghost { display: inline-block; }
    .lp-hero { grid-template-columns: 1.1fr .9fr; padding: 56px 22px 40px; }
    .lp-hero h1 { font-size: 52px; }
    .lp-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Bouton secondaire pleine largeur (ex. « Renvoyer le code ») */
.btn-ghost-full {
    display: block; width: 100%;
    padding: 14px; border-radius: 14px;
    background: var(--input-bg); color: var(--ink);
    border: 1.5px solid var(--line);
    font-weight: 700; font-size: 15px; font-family: inherit;
}
