:root {
    --teal: #17847a;
    --teal-dark: #0f5f5a;
    --navy: #163b4a;
    --ink: #1b3a4b;
    --muted: #5a6b74;
    --card-shadow: 0 10px 30px rgba(20, 50, 65, .12);
    --font: "Segoe UI", "Open Sans", "Helvetica Neue", Arial, sans-serif;
}

body {
    margin: 0;
    background: #fff;
}

/* ============================================================
   LOGIN PAGE  (tout est scopé sous .login-page)
   Layout reproduit d'après maquette — placeholders pour
   images et identité de marque.
   ============================================================ */
.login-page {
    font-family: var(--font);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.login-page a { color: inherit; }

/* --- Placeholders --- */
.login-page .ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(45deg, #eef1f4, #eef1f4 10px, #e6eaee 10px, #e6eaee 20px);
    color: #9aa7b0;
    font-size: 13px;
    letter-spacing: .04em;
    border: 1px dashed #c4ced5;
    box-sizing: border-box;
    text-transform: none;
}
.login-page .ph-logo {
    width: 150px;
    height: 34px;
    border-radius: 4px;
    font-weight: 700;
}

/* ===================== NAVBAR ===================== */
.lp-nav {
    display: flex;
    align-items: center;
    height: 72px;
    padding: 0 40px;
    background: #fff;
    border-bottom: 1px solid #eceff2;
    position: relative;
    z-index: 30;
}
.lp-logo { display: inline-flex; }
.lp-nav-links {
    display: flex;
    gap: 40px;
    margin-left: 56px;
}
.lp-nav-links a {
    text-decoration: none;
    color: var(--navy);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .02em;
    padding: 26px 0;
    border-bottom: 3px solid transparent;
}
.lp-nav-links a:hover { color: var(--teal); }
.lp-nav-links a.is-active { border-bottom-color: var(--teal); }

/* Burger (mobile) */
.lp-burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; }
.lp-burger span { width: 26px; height: 3px; background: var(--teal); border-radius: 2px; }

/* Tiroir (mobile) */
.lp-drawer-toggle { position: absolute; }
.lp-drawer, .lp-drawer-backdrop { display: none; }

/* ===================== HERO ===================== */
.lp-hero {
    position: relative;
    padding: 56px 0 96px;
    background: #dfe6ec;
}
.lp-hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    font-size: 20px;
}
.lp-container {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

/* --- Cartes promo --- */
.lp-promo {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 30px 34px;
    width: 460px;
    margin-top: 40px;
    flex: 0 0 auto;
}
.lp-promo-item {
    display: flex;
    gap: 22px;
    align-items: center;
    padding: 22px 0;
    border-bottom: 1px solid #eef1f4;
}
.lp-promo-item:first-child { padding-top: 4px; }
.lp-promo-item:last-child { border-bottom: 0; padding-bottom: 4px; }
.lp-promo-icon {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    flex: 0 0 92px;
    font-size: 11px;
}
.lp-promo-body h3 { margin: 0 0 8px; font-size: 20px; color: var(--navy); font-weight: 700; }
.lp-promo-body p { margin: 0 0 12px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.lp-more { color: var(--teal); font-weight: 700; text-decoration: none; font-size: 15px; }
.lp-more:hover { text-decoration: underline; }

/* --- Carte de connexion --- */
.lp-login {
    width: 600px;
    margin-left: -30px;
    margin-top: -16px;
    background: linear-gradient(215deg, #1c8d7c 0%, #14586a 55%, #133b49 100%);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    color: #fff;
    flex: 0 0 auto;
}
.lp-login-form { padding: 40px 48px 44px; }
.lp-login-form h1 { margin: 0 0 28px; font-size: 26px; font-weight: 700; }

.lp-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 700;
    margin: 4px 0 10px;
}
.lp-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #fff;
    color: var(--teal);
    font-weight: 700;
    font-size: 14px;
    cursor: help;
}
.lp-input {
    width: 100%;
    box-sizing: border-box;
    height: 52px;
    border: 0;
    border-radius: 6px;
    background: #fff;
    padding: 0 16px;
    font-size: 16px;
    color: var(--ink);
    margin-bottom: 18px;
}
.lp-input:focus { outline: 2px solid rgba(255,255,255,.6); }

.lp-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    margin: 0 0 22px;
    cursor: pointer;
}
.lp-check input { width: 18px; height: 18px; accent-color: #fff; }

.lp-reset {
    display: inline-block;
    color: #fff;
    font-size: 15px;
    text-decoration: underline;
    margin: 2px 0 26px;
}

.lp-submit {
    display: block;
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: var(--teal);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    margin-bottom: 30px;
}
.lp-submit:hover { background: #f2f7f6; }

.lp-login-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 32px;
}
.lp-login-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.lp-link-icon {
    width: 24px; height: 24px;
    border-radius: 4px;
    flex: 0 0 24px;
    background: rgba(255,255,255,.15);
    border: 1px dashed rgba(255,255,255,.5);
    color: rgba(255,255,255,.8);
}

.lp-alert {
    background: rgba(255,255,255,.15);
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 14px;
}
.lp-alert-error { background: #c0392b; }
.lp-alert a { color: #fff; text-decoration: underline; }

/* ===================== FOOTER ===================== */
.lp-footer {
    background: #eef1f8;
    padding: 48px 40px 28px;
    color: var(--muted);
}
.lp-footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 150px 1fr 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.lp-footer-logo { margin-top: 4px; }
.lp-footer-col h4 {
    margin: 0 0 18px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .05em;
    color: var(--navy);
}
.lp-footer-col p { margin: 0 0 16px; font-size: 14px; line-height: 1.55; }
.lp-footer-col strong { color: var(--navy); }
.lp-footer-link, .lp-inline-link { color: var(--teal); font-weight: 700; text-decoration: none; }
.lp-footer-link:hover, .lp-inline-link:hover { text-decoration: underline; }

.lp-footer-bottom {
    max-width: 1180px;
    margin: 40px auto 0;
    padding-top: 22px;
    border-top: 1px solid #d9deea;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.lp-copyright { margin: 0; font-size: 12.5px; line-height: 1.5; max-width: 640px; }
.lp-copyright a { color: var(--teal); font-weight: 700; text-decoration: none; }
.lp-stores { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.ph-store { width: 30px; height: 30px; border-radius: 6px; font-size: 10px; }

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 900px) {
    .lp-nav {
        justify-content: flex-start;
        gap: 18px;
        padding: 0 18px;
        height: 64px;
    }
    .lp-burger { display: flex; }
    .lp-nav-links { display: none; }
    .lp-logo { margin: 0 auto; transform: translateX(-22px); }

    /* Tiroir */
    .lp-drawer-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.4);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
        z-index: 40;
    }
    .lp-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 300px;
        max-width: 82vw;
        background: #fff;
        transform: translateX(-100%);
        transition: transform .25s ease;
        z-index: 50;
        padding-top: 8px;
        box-shadow: 2px 0 20px rgba(0,0,0,.15);
    }
    .lp-drawer a {
        text-decoration: none;
        color: var(--navy);
        font-size: 16px;
        font-weight: 600;
        padding: 20px 28px;
        border-bottom: 1px solid #eef1f4;
        border-left: 4px solid transparent;
    }
    .lp-drawer a.is-active { color: var(--teal); border-left-color: var(--teal); }

    .lp-drawer-toggle:checked ~ .lp-drawer-backdrop { opacity: 1; pointer-events: auto; }
    .lp-drawer-toggle:checked ~ .lp-drawer { transform: translateX(0); }

    /* Héro : pile carte de login puis promos */
    .lp-hero { padding: 0 0 0; background: #dfe6ec; }
    .lp-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        max-width: none;
    }
    .lp-login {
        order: -1;
        width: auto;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .lp-login-form { padding: 28px 22px 32px; }
    .lp-login-form h1 { font-size: 24px; }
    .lp-login-links { grid-template-columns: 1fr; gap: 20px; }

    .lp-promo {
        width: auto;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 8px 22px 24px;
        background: #fff;
    }
    .lp-promo-item { align-items: flex-start; }

    /* Footer empilé */
    .lp-footer { padding: 40px 22px 28px; }
    .lp-footer-inner { grid-template-columns: 1fr; gap: 30px; }
    .lp-footer-logo { margin: 0 auto; }
    .lp-footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   ESPACE CLIENT — Dashboard (scopé sous .app)
   Reprend le thème teal/navy du login.
   ============================================================ */
:root {
    --bg: #f4f6fa;
    --card: #ffffff;
    --line: #e9edf2;
    --tealsoft: #e7f2f0;
    --pos: #12805f;
    --neg: #1b3a4b;
}

.app {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
}
.app a { text-decoration: none; color: inherit; }
.app .ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.app .ph-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--teal), var(--navy));
    color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .02em;
    border: 0; flex: 0 0 auto;
}

/* ---------------- SIDEBAR (desktop) ---------------- */
.app-side {
    width: 256px;
    flex: 0 0 256px;
    background: var(--card);
    border-right: 1px solid var(--line);
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.side-logo { display: block; margin: 4px 8px 26px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a, .side-foot a {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 14px; border-radius: 12px;
    font-size: 15px; font-weight: 600; color: #51606b;
}
.side-nav a:hover, .side-foot a:hover { background: var(--bg); color: var(--navy); }
.side-nav a.is-active { background: var(--tealsoft); color: var(--teal-dark); }
.side-nav a.is-active .ic { stroke: var(--teal); }
.side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.side-user { display: flex; align-items: center; gap: 12px; padding: 12px 8px 2px; }
.side-user strong { display: block; font-size: 14px; color: var(--navy); }
.side-user small { color: #8a97a0; font-size: 12px; letter-spacing: .03em; }

/* ---------------- MAIN ---------------- */
.app-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    display: flex; align-items: center; gap: 20px;
    padding: 20px 32px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 20;
}
.topbar-hello small { display: block; font-size: 13px; color: #8a97a0; }
.topbar-hello strong { font-size: 18px; color: var(--navy); }
.topbar-search {
    flex: 1 1 auto; max-width: 460px; margin-left: 8px;
    display: flex; align-items: center; gap: 10px;
    background: var(--bg); border: 1px solid var(--line);
    border-radius: 12px; padding: 0 14px; height: 44px;
}
.topbar-search .ic { width: 18px; height: 18px; stroke: #8a97a0; }
.topbar-search input { border: 0; background: transparent; outline: none; width: 100%; font-size: 14px; color: var(--ink); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.icon-btn {
    width: 44px; height: 44px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg); color: var(--navy); position: relative;
}
.icon-btn:hover { background: var(--tealsoft); color: var(--teal-dark); }
.icon-btn.has-dot::after { content: ""; position: absolute; top: 11px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: #e8553d; border: 2px solid var(--card); }

/* ---------------- Grille dashboard ---------------- */
.dash {
    padding: 28px 32px 40px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}
.dash-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.block-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 14px; }
.block-head h2 { margin: 0; font-size: 16px; color: var(--navy); font-weight: 700; }
.see-more { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--teal); }
.see-more .ic { width: 16px; height: 16px; }

/* --- Carte solde --- */
.balance {
    background: linear-gradient(135deg, #1c8d7c 0%, #15626f 55%, #143a49 100%);
    color: #fff; border-radius: 20px; padding: 26px 28px;
    box-shadow: 0 16px 34px rgba(20, 60, 60, .22);
}
.balance-top { display: flex; justify-content: space-between; align-items: flex-start; }
.balance-label { font-size: 13px; opacity: .85; }
.balance-num { display: flex; align-items: center; gap: 12px; margin: 8px 0 6px; }
.balance-amount { font-size: 34px; font-weight: 800; letter-spacing: -.01em; }
.balance-amount.hidden { letter-spacing: 4px; }
.eye { background: rgba(255,255,255,.16); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.eye .ic { width: 18px; height: 18px; }
.balance-iban { font-size: 13px; opacity: .8; letter-spacing: .04em; }
.balance-brand { opacity: .9; }
.balance-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 22px; }
.balance-actions a { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px; border-radius: 14px; background: rgba(255,255,255,.12); font-size: 12.5px; font-weight: 600; }
.balance-actions a:hover { background: rgba(255,255,255,.2); }
.balance-actions .ic { width: 20px; height: 20px; }

/* --- Actions rapides --- */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick-item {
    background: var(--card); border: 1px solid var(--line); border-radius: 16px;
    padding: 18px 10px; display: flex; flex-direction: column; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 600; color: var(--navy); text-align: center;
    transition: transform .12s ease, box-shadow .12s ease;
}
.quick-item:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(20,50,65,.09); }
.qi-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--tealsoft); color: var(--teal-dark); display: inline-flex; align-items: center; justify-content: center; }

/* --- Transactions --- */
.tx { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.tx li { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.tx li:last-child { border-bottom: 0; }
.tx-ic { width: 42px; height: 42px; border-radius: 12px; background: #f0f2f6; color: #55636d; display: inline-flex; align-items: center; justify-content: center; }
.tx-ic .ic { width: 20px; height: 20px; }
.tx-in { background: #e3f3ec; color: var(--pos); }
.tx-body { flex: 1 1 auto; min-width: 0; }
.tx-body strong { display: block; font-size: 14.5px; color: var(--navy); font-weight: 600; }
.tx-body small { color: #8a97a0; font-size: 12.5px; }
.tx-amt { font-weight: 700; font-size: 14.5px; color: var(--neg); white-space: nowrap; }
.tx-amt.pos { color: var(--pos); }

/* --- Carte bancaire (Mastercard) --- */
.bankcard {
    aspect-ratio: 1.6 / 1;
    border-radius: 18px; padding: 22px;
    background: radial-gradient(120% 120% at 100% 0%, #1f9384 0%, #16505f 45%, #101f2b 100%);
    color: #fff; display: flex; flex-direction: column; position: relative; overflow: hidden;
    box-shadow: 0 16px 30px rgba(16, 31, 43, .3);
}
.bankcard::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.06); }
.bankcard-top { display: flex; justify-content: space-between; align-items: center; }
.bankcard-type { font-size: 12.5px; opacity: .85; font-weight: 600; letter-spacing: .02em; }
.bankcard-brand { height: 26px; width: 92px; }
.bankcard-mid { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; }
.chip { width: 42px; height: 32px; border-radius: 7px; background: linear-gradient(135deg, #f6d98e 0%, #d9b45a 50%, #b8912f 100%); position: relative; }
.chip::after { content: ""; position: absolute; inset: 6px 8px; border: 1px solid rgba(120,80,10,.4); border-radius: 3px; }
.wifi { width: 20px; height: 22px; border-right: 2px solid rgba(255,255,255,.7); border-radius: 0 40% 40% 0 / 0 50% 50% 0; box-shadow: -7px 0 0 -2px rgba(255,255,255,.5); }
.bankcard-num { font-size: 19px; letter-spacing: .06em; font-weight: 600; margin-top: auto; }
.bankcard-foot { display: flex; align-items: flex-end; gap: 24px; margin-top: 14px; position: relative; }
.bankcard-foot small { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; opacity: .7; }
.bankcard-foot span { font-size: 13px; font-weight: 600; letter-spacing: .03em; }
.mc-mark { margin-left: auto; display: inline-flex; align-items: center; }
.mc-mark i { width: 26px; height: 26px; border-radius: 50%; display: block; }
.mc-mark i:first-child { background: #eb001b; }
.mc-mark i:last-child { background: #f79e1b; margin-left: -12px; mix-blend-mode: screen; }

.card-actions, .rib-actions { display: flex; gap: 10px; margin-top: 14px; }
.card-actions a { flex: 1; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--navy); }
.card-actions a:hover { background: var(--tealsoft); color: var(--teal-dark); border-color: transparent; }

/* --- RIB card --- */
.rib-card, .savings-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.rib-head, .savings-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.rib-head strong, .savings-head strong { display: block; font-size: 15px; color: var(--navy); }
.rib-head small, .savings-head small { color: #8a97a0; font-size: 12.5px; }
.rib-list { margin: 0; }
.rib-list > div { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rib-list > div:last-child { border-bottom: 0; }
.rib-list dt { color: #8a97a0; font-size: 12.5px; }
.rib-list dd { margin: 0; font-weight: 600; font-size: 13.5px; color: var(--navy); letter-spacing: .03em; }
.btn-teal, .btn-ghost { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 12px; font-size: 13.5px; font-weight: 700; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); }
.btn-teal .ic { stroke: #fff; }
.btn-ghost { background: var(--bg); color: var(--navy); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--tealsoft); color: var(--teal-dark); }

/* --- Épargne --- */
.savings-bar { height: 10px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.savings-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal), #37b39c); }
.savings-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--navy); }

/* ---------------- BOTTOM NAV (mobile) ---------------- */
.tabbar { display: none; }

/* ============================================================
   RESPONSIVE — MOBILE (dashboard)
   ============================================================ */
@media (max-width: 900px) {
    .app-side { display: none; }
    .app { display: block; }

    .topbar { padding: 14px 18px; gap: 12px; }
    .topbar-search { display: none; }
    .topbar-hello strong { font-size: 16px; }

    .dash {
        grid-template-columns: 1fr;
        padding: 18px 16px calc(88px + env(safe-area-inset-bottom));
        gap: 22px;
    }
    .balance { border-radius: 18px; padding: 22px; }
    .balance-amount { font-size: 30px; }
    .quick { grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .quick-item { padding: 14px 6px; font-size: 11.5px; gap: 8px; }
    .qi-ic { width: 42px; height: 42px; }

    .tabbar {
        display: flex;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
        background: var(--card);
        border-top: 1px solid var(--line);
        padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
        justify-content: space-around; align-items: flex-end;
        box-shadow: 0 -6px 20px rgba(20,50,65,.06);
    }
    .tabbar a {
        flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
        font-size: 11px; font-weight: 600; color: #909aa2;
    }
    .tabbar a.is-active { color: var(--teal); }
    .tabbar a.is-active .ic { stroke: var(--teal); }
    .tabbar .ic { width: 24px; height: 24px; }
    .tab-fab {
        background: linear-gradient(135deg, var(--teal), var(--teal-dark));
        color: #fff !important; width: 56px; height: 56px; border-radius: 18px;
        justify-content: center; margin-top: -26px; flex: 0 0 auto;
        box-shadow: 0 10px 20px rgba(23,132,122,.4);
    }
    .tab-fab .ic { width: 26px; height: 26px; stroke: #fff; }
}

@media (max-width: 380px) {
    .quick { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   LANGUAGE SWITCHER (drapeaux) — utilisé sur login et dashboard
   ============================================================ */
.langsw { position: relative; }
.langsw > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-weight: 700;
    font-size: 13px;
    color: var(--navy);
    font-family: var(--font);
}
.langsw > summary::-webkit-details-marker { display: none; }
.langsw > summary::marker { content: ""; }
.langsw .flag {
    width: 22px;
    height: 15px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
    flex: 0 0 auto;
    display: block;
}
.langsw-caret { width: 15px; height: 15px; color: #8a97a0; transition: transform .15s ease; }
.langsw[open] .langsw-caret { transform: rotate(180deg); }
.langsw-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(20, 50, 65, .16);
    padding: 6px;
    min-width: 176px;
    z-index: 60;
}
.langsw-menu a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
}
.langsw-menu a:hover { background: var(--bg, #f4f6fa); }
.langsw-menu a.is-active { background: var(--tealsoft, #e7f2f0); color: var(--teal-dark); }

/* Placement dans la barre du login */
.lp-nav .langsw { margin-left: auto; }
@media (max-width: 900px) {
    .lp-nav .langsw { margin-left: auto; }
    .lp-nav .langsw-code { display: none; }
}

/* ============================================================
   PAGE 2FA — vérification en deux étapes (thème teal/navy)
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #eef2f6;
    font-family: var(--font);
    color: var(--ink);
}
.auth-page a { color: inherit; }

.auth-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    background: #fff;
    border-bottom: 1px solid #e9edf2;
}

.auth-wrap {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 64px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(215deg, #1c8d7c 0%, #14586a 55%, #133b49 100%);
    color: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 44px rgba(20, 60, 60, .24);
    padding: 40px 40px 32px;
    text-align: center;
}
.auth-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-icon svg { width: 32px; height: 32px; }
.auth-card h1 { margin: 0 0 12px; font-size: 24px; font-weight: 700; }
.auth-sub { margin: 0 0 26px; font-size: 14.5px; line-height: 1.5; opacity: .88; }

.auth-form { text-align: left; }
.auth-label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.otp-input {
    width: 100%;
    box-sizing: border-box;
    height: 60px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    letter-spacing: .5em;
    text-indent: .5em;
    margin-bottom: 20px;
}
.otp-input:focus { outline: 3px solid rgba(255, 255, 255, .55); }

.auth-trusted { color: #fff; margin: 0 0 22px; }

.auth-hint { font-size: 12.5px; opacity: .75; margin: 18px 0 4px; }
.auth-cancel {
    display: inline-block;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.auth-cancel:hover { opacity: .85; }

@media (max-width: 560px) {
    .auth-top { padding: 16px 18px; }
    .auth-card { padding: 32px 22px 26px; border-radius: 16px; }
    .auth-card h1 { font-size: 22px; }
    .otp-input { height: 54px; font-size: 24px; }
}

/* ============================================================
   VIREMENT (parcours SWIFT) — scopé .tf-*
   ============================================================ */
.tf-wrap { padding: 28px 32px 40px; display: flex; justify-content: center; }
.tf-card {
    width: 100%;
    max-width: 560px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(20, 50, 65, .06);
    padding: 30px 32px 28px;
}
.tf-head { margin-bottom: 22px; }
.tf-badge {
    display: inline-block;
    background: var(--tealsoft);
    color: var(--teal-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}
.tf-head h1 { margin: 0 0 6px; font-size: 22px; color: var(--navy); font-weight: 700; }
.tf-head p { margin: 0; font-size: 14px; color: var(--muted); }

.tf-alert {
    background: #fdecea;
    color: #a5271b;
    border: 1px solid #f5c6c0;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13.5px;
    margin-bottom: 20px;
}
.tf-alert div + div { margin-top: 4px; }

.tf-label { display: block; font-size: 13px; font-weight: 700; color: var(--navy); margin: 18px 0 10px; text-transform: uppercase; letter-spacing: .04em; }
.tf-form > .tf-label:first-child { margin-top: 0; }

/* Bénéficiaires en cartes-radio */
.tf-benes { display: flex; flex-direction: column; gap: 10px; }
.tf-bene {
    display: flex; align-items: center; gap: 14px;
    border: 1.5px solid var(--line); border-radius: 14px;
    padding: 14px 16px; cursor: pointer; position: relative;
    transition: border-color .12s ease, background .12s ease;
}
.tf-bene:hover { border-color: #cdd8de; }
.tf-bene input { position: absolute; opacity: 0; pointer-events: none; }
.tf-bene-av {
    width: 42px; height: 42px; border-radius: 50%; flex: 0 0 42px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--teal), var(--navy));
    color: #fff; font-weight: 700; font-size: 14px;
}
.tf-bene-info { flex: 1 1 auto; min-width: 0; }
.tf-bene-info strong { display: block; font-size: 15px; color: var(--navy); }
.tf-bene-info small { color: #8a97a0; font-size: 12.5px; letter-spacing: .02em; }
.tf-bene-check { width: 22px; height: 22px; color: var(--teal); opacity: 0; flex: 0 0 auto; }
.tf-bene:has(input:checked) { border-color: var(--teal); background: var(--tealsoft); }
.tf-bene:has(input:checked) .tf-bene-check { opacity: 1; }
.tf-empty { color: var(--muted); font-size: 14px; }

/* Montant + input */
.tf-amount { display: flex; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 16px; height: 60px; }
.tf-amount input { border: 0; outline: none; background: transparent; font-size: 26px; font-weight: 700; color: var(--navy); width: 100%; }
.tf-amount input::-webkit-outer-spin-button, .tf-amount input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tf-amount input[type=number] { -moz-appearance: textfield; }
.tf-cur { font-size: 15px; font-weight: 700; color: #8a97a0; }
.tf-amount:focus-within { border-color: var(--teal); }
.tf-avail { margin: 10px 2px 0; font-size: 13px; color: var(--muted); }
.tf-avail strong { color: var(--navy); }

.tf-input { width: 100%; box-sizing: border-box; height: 50px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 16px; font-size: 15px; color: var(--navy); }
.tf-input:focus { outline: none; border-color: var(--teal); }

/* Actions */
.tf-actions { display: flex; gap: 12px; margin-top: 26px; }
.tf-actions.tf-center { justify-content: center; }
.tf-btn, .tf-btn-ghost {
    flex: 1; display: inline-flex; align-items: center; justify-content: center;
    height: 52px; border-radius: 12px; font-size: 15px; font-weight: 700;
    border: 0; cursor: pointer; text-decoration: none;
}
.tf-btn { background: var(--teal); color: #fff; }
.tf-btn:hover { background: var(--teal-dark); }
.tf-btn-ghost { background: var(--bg); color: var(--navy); border: 1px solid var(--line); }
.tf-btn-ghost:hover { background: var(--tealsoft); color: var(--teal-dark); }
.tf-center .tf-btn, .tf-center .tf-btn-ghost { flex: 0 0 auto; padding: 0 24px; }

/* Revue */
.tf-rev-amount { text-align: center; padding: 20px; background: linear-gradient(135deg, #1c8d7c 0%, #15626f 55%, #143a49 100%); border-radius: 16px; color: #fff; margin-bottom: 22px; }
.tf-rev-amount small { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .8; margin-bottom: 6px; }
.tf-rev-amount strong { font-size: 30px; font-weight: 800; }
.tf-rev-list { margin: 0 0 6px; }
.tf-rev-list > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.tf-rev-list > div:last-child { border-bottom: 0; }
.tf-rev-list dt { color: #8a97a0; font-size: 13px; }
.tf-rev-list dd { margin: 0; font-weight: 600; font-size: 14px; color: var(--navy); text-align: right; letter-spacing: .02em; }
.tf-status { display: inline-block; background: #fff3e0; color: #b06a12; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }

/* Succès */
.tf-success { text-align: center; }
.tf-success .tf-rev-list { text-align: left; }
.tf-success-icon {
    width: 72px; height: 72px; margin: 4px auto 20px; border-radius: 50%;
    background: #e3f3ec; color: var(--pos);
    display: flex; align-items: center; justify-content: center;
}
.tf-success-icon .ic { width: 38px; height: 38px; stroke-width: 2.4; }
.tf-success h1 { margin: 0 0 10px; }
.tf-success > p { max-width: 420px; margin: 0 auto 22px; color: var(--muted); font-size: 14.5px; }
.tf-email { display: inline-flex; align-items: center; gap: 8px; justify-content: center; margin: 20px 0 0; font-size: 13.5px; color: var(--pos); font-weight: 600; }
.tf-email .ic { width: 18px; height: 18px; }

@media (max-width: 900px) {
    .tf-wrap { padding: 18px 16px calc(88px + env(safe-area-inset-bottom)); }
    .tf-card { padding: 24px 20px; border-radius: 16px; }
}

/* ============================================================
   FLASH (confirmations in-app) + KYC (état verrouillé) + carte premium
   ============================================================ */
.app-flash {
    display: flex; align-items: center; gap: 10px;
    margin: 20px 32px 0; padding: 14px 18px;
    border-radius: 12px; font-size: 14.5px; font-weight: 600;
}
.app-flash-success { background: #e3f3ec; color: #12805f; border: 1px solid #bfe6d5; }
.app-flash .ic { width: 20px; height: 20px; flex: 0 0 auto; }

/* Bandeau KYC */
.kyc-banner {
    display: flex; align-items: center; gap: 16px;
    margin: 20px 32px 0; padding: 16px 20px;
    border-radius: 14px; background: #fff8ec; border: 1px solid #f2e0bf;
}
.kyc-banner-icon {
    width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto;
    background: #fbeccb; color: #b06a12;
    display: flex; align-items: center; justify-content: center;
}
.kyc-banner-body { flex: 1 1 auto; min-width: 0; }
.kyc-banner-body strong { display: block; color: var(--navy); font-size: 15px; }
.kyc-banner-body span { color: var(--muted); font-size: 13.5px; }
.kyc-banner-cta {
    background: var(--teal); color: #fff; border: 0; border-radius: 10px;
    padding: 11px 18px; font-weight: 700; font-size: 13.5px; cursor: pointer; flex: 0 0 auto;
}
.kyc-banner-cta:hover { background: var(--teal-dark); }

/* Modale KYC */
.kyc-modal { display: none; position: fixed; inset: 0; z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.kyc-modal.open { display: flex; }
.kyc-modal-backdrop { position: absolute; inset: 0; background: rgba(16, 31, 43, .55); }
.kyc-modal-card {
    position: relative; background: #fff; border-radius: 18px;
    padding: 34px 30px 28px; max-width: 400px; width: 100%; text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .32);
}
.kyc-modal-icon {
    width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 18px;
    background: var(--tealsoft); color: var(--teal-dark);
    display: flex; align-items: center; justify-content: center;
}
.kyc-modal-icon .ic { width: 30px; height: 30px; }
.kyc-modal-card h2 { margin: 0 0 10px; font-size: 20px; color: var(--navy); }
.kyc-modal-card p { margin: 0 0 24px; font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.kyc-modal-cancel { width: 100%; height: 50px; }

@media (max-width: 900px) {
    .app-flash, .kyc-banner { margin: 16px 16px 0; }
    .kyc-banner { flex-wrap: wrap; }
    .kyc-banner-cta { width: 100%; }
}

/* Carte Mastercard — palier premium (noir prestige) */
.bankcard--premium {
    background: linear-gradient(150deg, #34393f 0%, #191b1f 45%, #050506 100%);
    box-shadow: 0 20px 42px rgba(0, 0, 0, .5);
}
.bankcard--premium::after { background: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, .07), transparent 70%); }
.bankcard--premium .bankcard-type { color: #e7c983; letter-spacing: .05em; }
.bankcard-tagline {
    text-align: center; margin: 12px 2px 0;
    font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
    font-weight: 700; color: #8a97a0;
}

/* ============================================================
   Devise (segmented), menu utilisateur, modale app, nouveau bénéficiaire
   ============================================================ */
.balance-top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.balance-cur { display: inline-flex; background: rgba(255, 255, 255, .15); border-radius: 10px; padding: 3px; gap: 2px; }
.balance-cur button {
    border: 0; background: transparent; color: rgba(255, 255, 255, .85);
    font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 8px;
    cursor: pointer; font-family: var(--font);
}
.balance-cur button.is-active { background: #fff; color: var(--teal-dark); }

/* Menu utilisateur (avatar) */
.usermenu { position: relative; }
.usermenu > summary { list-style: none; cursor: pointer; display: inline-flex; }
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu > summary::marker { content: ""; }
.usermenu-panel {
    position: absolute; right: 0; top: calc(100% + 10px);
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 16px 40px rgba(20, 50, 65, .18); padding: 8px; min-width: 232px; z-index: 60;
}
.usermenu-head { display: flex; align-items: center; gap: 12px; padding: 8px 12px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.usermenu-head strong { display: block; font-size: 14px; color: var(--navy); }
.usermenu-head small { color: #8a97a0; font-size: 12px; letter-spacing: .03em; }
.usermenu-panel a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--navy); text-decoration: none; }
.usermenu-panel a:hover { background: var(--bg); }
.usermenu-panel a .ic { width: 19px; height: 19px; color: #6b7a83; }
.usermenu-logout { color: #c0392b !important; }
.usermenu-logout .ic { color: #c0392b !important; }

/* Modale app (confirmation de virement) */
.app-modal { display: none; position: fixed; inset: 0; z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.app-modal.open { display: flex; }
.app-modal-backdrop { position: absolute; inset: 0; background: rgba(16, 31, 43, .55); }
.app-modal-card { position: relative; background: #fff; border-radius: 18px; padding: 34px 30px 28px; max-width: 440px; width: 100%; box-shadow: 0 24px 60px rgba(0, 0, 0, .32); }
.app-modal-card.tf-success h2 { margin: 0 0 10px; font-size: 21px; color: var(--navy); }
.app-modal-back { width: 100%; height: 52px; margin-top: 22px; }

/* Formulaire nouveau bénéficiaire (inline) */
.tf-bene-av-new { background: var(--tealsoft) !important; color: var(--teal-dark); display: inline-flex; align-items: center; justify-content: center; }
.tf-bene-av-new .ic { width: 22px; height: 22px; }
.tf-new-fields { display: none; flex-direction: column; gap: 10px; margin: 10px 0 0; padding: 14px; background: var(--bg); border-radius: 14px; }
.tf-bene-new:has(input:checked) + .tf-new-fields { display: flex; }
.tf-or { text-align: center; color: #8a97a0; font-size: 12.5px; font-weight: 600; margin: 18px 0 12px; }
