/* ===== CHARLITO STREAMS — thème issu du logo =====
   Bleu nuit + dégradés bleu/cyan et orange/rouge, lueur blanche du mot « Streams ». */
:root {
    /* Couleurs de la marque (rouge Screamify par défaut) : recalculées depuis le logo du vendeur (mybrand.js) */
    --acc: #e51c2c; --acc-rgb: 229 28 44; --acc2-rgb: 255 70 85; --acc-dark-rgb: 118 9 17;
    --acc-bright: #ff3d4a; --acc-mid: #d81822; --acc-deep: #b3121f; --acc-dark: #760911; --acc-light: #ff8a8a;
    --bg: #0b0b0b;
    --bg-2: #0e0e0e;
    --card: #181818;
    --card-2: #1f1f22;
    --border: #2c2c2c;
    --border-2: #3a3a40;
    --text: #ffffff;
    --muted: #a8a8a8;
    --faint: #6e6e6e;

    --blue: var(--acc);          /* accent principal (rouge) */
    --cyan: var(--acc-bright);          /* accent clair (rouge vif) */
    --orange: #ff9a4a;
    --red: #ff4d5e;
    --green: #3ddc84;
    --amber: #f5b544;

    --grad-brand: linear-gradient(120deg, var(--acc-light) 0%, var(--acc-bright) 38%, var(--acc-mid) 70%, var(--acc-dark) 100%);
    --grad-blue: linear-gradient(180deg, var(--acc-mid) 0%, var(--acc-deep) 52%, var(--acc-dark) 100%);
    --grad-warm: linear-gradient(135deg, #ffb347 0%, #ff7a3d 100%);
    --glow-blue: 0 0 26px rgb(var(--acc-rgb) / .42);
    --btn-shadow: 0 0 26px rgb(var(--acc-rgb) / .42), inset 0 1px 0 rgba(255, 255, 255, .38), inset 0 -2px 0 rgba(0, 0, 0, .25), 0 3px 0 var(--acc-dark);
    --radius: 18px;
    --t: 180ms cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--text);
    background:
        radial-gradient(55% 45% at 0% 0%, rgb(var(--acc-rgb) / .22), transparent 70%),
        radial-gradient(45% 40% at 100% 100%, rgb(var(--acc-rgb) / .16), transparent 70%),
        var(--bg);
    background-attachment: fixed;
    display: flex;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.ph-duotone { line-height: 1; }

/* ===== Texte en dégradé / lueur ===== */
.grad-text { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.muted { color: var(--muted); font-size: 13px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }

/* ===== Barre latérale ===== */
.sidebar {
    position: sticky; top: 0; height: 100vh; width: 260px; flex-shrink: 0;
    display: flex; flex-direction: column; gap: 26px; padding: 22px 16px;
    background: linear-gradient(180deg, rgba(22, 22, 24, .92), rgba(10, 10, 11, .92));
    border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; }
.brand-mark { width: 46px; height: 46px; flex-shrink: 0; border-radius: 13px; background: var(--grad-blue); box-shadow: var(--btn-shadow); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 900; color: #fff; text-transform: uppercase; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text { min-width: 0; }
.brand-top { font-size: 18px; font-weight: 900; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 128px; }
.brand-bottom { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.side-nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item {
    display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 14px; border-radius: 14px;
    border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; text-align: left;
    transition: background var(--t), color var(--t), border-color var(--t);
}
.nav-item .ph-duotone { font-size: 22px; }
.nav-item:hover { background: rgb(var(--acc-rgb) / .08); color: var(--text); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgb(var(--acc-rgb) / .28), rgb(var(--acc2-rgb) / .08)); border-color: rgb(var(--acc-rgb) / .45); box-shadow: inset 3px 0 0 var(--cyan); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.tagline { font-size: 10px; letter-spacing: .32em; text-transform: uppercase; color: var(--cyan); opacity: .85; }
.bell {
    position: absolute; top: 24px; right: 16px; width: 40px; height: 40px; border-radius: 999px;
    border: 1px solid var(--border-2); background: var(--card); color: var(--text); display: inline-flex; align-items: center; justify-content: center; font-size: 20px;
}
.sidebar { position: sticky; }
.sidebar .bell { position: absolute; }
.bell-count {
    position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
    background: var(--grad-warm); color: #fff; font-size: 11px; font-weight: 800; line-height: 19px; text-align: center; box-shadow: 0 0 12px rgba(255, 77, 94, .6);
}
.bell-count[hidden] { display: none; }

/* ===== Boutons ===== */
.btn-grad, .btn-ghost, .btn-danger {
    height: 46px; padding: 0 20px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 14px; font-weight: 800; white-space: nowrap; transition: filter var(--t), transform var(--t), background var(--t);
}
.btn-grad { border: none; color: #fff; background: var(--grad-blue); box-shadow: var(--btn-shadow); }
.btn-grad:hover { filter: brightness(1.1); }
.btn-grad:active { transform: translateY(1px); }
.btn-grad .ph-duotone, .btn-ghost .ph-duotone, .btn-danger .ph-duotone { font-size: 18px; }
.btn-grad.full { width: 100%; }
.btn-ghost { border: 1px solid var(--border-2); background: rgba(30, 30, 33, .6); color: var(--text); }
.btn-ghost:hover { background: var(--card-2); }
.btn-danger { border: 1px solid rgba(255, 77, 94, .5); background: rgba(255, 77, 94, .1); color: #ff8a95; }
.icon-btn { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--card); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.icon-btn:hover { background: var(--card-2); }
.link { border: none; background: none; color: var(--cyan); font-size: 13px; font-weight: 700; }
.file-btn { cursor: pointer; }

/* ===== Mise en page ===== */
.main { flex: 1; min-width: 0; height: 100vh; overflow-y: auto; padding: 32px 36px 60px; }
.view { display: none; flex-direction: column; gap: 20px; max-width: 1320px; margin: 0 auto; animation: fade .25s ease; }
.view.active { display: flex; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
.grid-ca { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; }
.card { background: linear-gradient(180deg, rgba(30, 30, 33, .7), rgba(22, 22, 24, .7)); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-head h2 { font-size: 16px; font-weight: 800; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.page-head h1 { font-size: 32px; font-weight: 900; letter-spacing: -.02em; margin-top: 4px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ===== Accueil ===== */
.hero {
    position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
    padding: 32px 34px; border-radius: 24px; border: 1px solid var(--border-2);
    background: radial-gradient(70% 140% at 100% 0%, rgb(var(--acc-rgb) / .28), transparent 55%), radial-gradient(70% 140% at 0% 100%, rgb(var(--acc2-rgb) / .22), transparent 60%), var(--card);
}
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--grad-brand); }
.hero h1 { font-size: 42px; font-weight: 900; letter-spacing: -.03em; margin: 6px 0 8px; }
.hero p { color: var(--muted); font-size: 15px; max-width: 560px; line-height: 1.5; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { position: relative; overflow: hidden; padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); display: flex; flex-direction: column; gap: 8px; }
.kpi::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--kpi-grad, var(--grad-blue)); }
.kpi-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.kpi-label .ph-duotone { font-size: 20px; color: var(--kpi-color, var(--cyan)); }
.kpi-value { font-size: 30px; font-weight: 900; letter-spacing: -.02em; white-space: nowrap; }
.kpi-value small { font-size: 13px; color: var(--muted); font-weight: 700; margin-left: 4px; }
.kpi-sub { font-size: 12.5px; color: var(--muted); }
.up { color: var(--green); font-weight: 800; }
.down { color: var(--red); font-weight: 800; }
.chart-box { position: relative; height: 280px; }

/* Listes */
.list { display: flex; flex-direction: column; gap: 8px; }
.row {
    display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; border-radius: 14px;
    border: 1px solid var(--border); background: rgba(16, 16, 18, .6); color: var(--text); text-align: left; width: 100%;
}
button.row:hover { border-color: var(--border-2); background: var(--card-2); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main strong { font-size: 14px; }
.row-main span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { flex-shrink: 0; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: rgb(var(--acc-rgb) / .14); color: #9cc0ff; }
.badge.soon { background: rgba(251, 191, 36, .14); color: var(--amber); }
.badge.today { background: var(--grad-warm); color: #fff; }
.badge.expired { background: rgba(255, 77, 94, .14); color: #ff8a95; }
.badge.ok { background: rgba(52, 211, 153, .12); color: var(--green); }
.badge.wait { background: rgba(255, 154, 74, .14); color: var(--orange); }
.empty { padding: 26px 10px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.5; }
.svc-dot { width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; color: #fff; }

/* Barres */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; gap: 10px; }
.bar-head span { font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.bar-track { height: 9px; border-radius: 5px; background: rgba(44, 44, 48, .8); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 5px; background: var(--grad-blue); }

/* ===== Abonnements ===== */
.search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--card); color: var(--muted); }
.search input { border: none; background: none; outline: none; color: var(--text); width: 210px; font-size: 14px; }
.svc-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.svc-tab {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 8px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--card); color: var(--muted); font-size: 14px; font-weight: 700;
}
.svc-tab .svc-dot { width: 28px; height: 28px; border-radius: 9px; font-size: 11px; }
.svc-tab .count { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.svc-tab.active { color: #fff; border-color: rgb(var(--acc-rgb) / .6); background: linear-gradient(135deg, rgb(var(--acc-dark-rgb) / .45), rgb(var(--acc2-rgb) / .18)); box-shadow: var(--glow-blue); }
.svc-tab.add { border-style: dashed; color: var(--text); padding: 0 16px; }
.svc-summary { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.chip strong { color: var(--text); }
.accounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.account { padding: 0; overflow: hidden; gap: 0; transition: transform var(--t), box-shadow var(--t); }
.account-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: rgba(10, 10, 11, .65); border-bottom: 1px solid var(--border); }
.account-head h3 { flex: 1; min-width: 0; font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-head .meta { font-size: 12px; color: var(--muted); font-weight: 700; }
.mini-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.mini-btn:hover { color: #fff; border-color: var(--border-2); }
.drag { border: none; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; font-size: 20px; }
.account.dragging { transform: scale(1.015); box-shadow: 0 18px 40px rgba(0, 0, 0, .55), 0 0 0 1px var(--cyan), var(--glow-blue); position: relative; z-index: 5; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; }
.account-body { display: flex; flex-direction: column; }
.client {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
    padding: 12px 14px; border: none; border-bottom: 1px solid rgba(44, 44, 48, .7); background: transparent; color: var(--text); text-align: left; width: 100%;
}
.client:last-child { border-bottom: none; }
.client:hover { background: rgb(var(--acc-rgb) / .07); }
.client-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.client-main strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-main span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-amount { font-size: 14px; font-weight: 800; white-space: nowrap; }
.account-empty { padding: 18px 14px; color: var(--faint); font-size: 13px; font-style: italic; }
.add-account { min-height: 70px; border-radius: var(--radius); border: 1.5px dashed var(--border-2); background: transparent; color: var(--muted); font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; }
.add-account:hover { color: #fff; border-color: var(--cyan); background: rgb(var(--acc2-rgb) / .06); }
.add-client-inline { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border: none; border-top: 1px dashed rgba(58, 58, 64, .6); background: transparent; color: var(--cyan); font-size: 13px; font-weight: 700; width: 100%; }

/* ===== CA ===== */
.month-nav { display: flex; align-items: center; gap: 12px; }
.month-nav strong { min-width: 150px; text-align: center; font-size: 17px; font-weight: 800; }
.ca-hero { align-items: center; justify-content: center; text-align: center; background: radial-gradient(80% 120% at 100% 0%, rgb(var(--acc-rgb) / .25), transparent 60%), radial-gradient(80% 120% at 0% 100%, rgb(var(--acc2-rgb) / .22), transparent 60%), var(--card); border-color: var(--border-2); }
.ca-total { font-size: 52px; font-weight: 900; letter-spacing: -.03em; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ca-total .cur { font-size: 18px; -webkit-text-fill-color: var(--muted); }
.hint { font-size: 12.5px; color: var(--faint); max-width: 320px; line-height: 1.5; }
.ca-part { font-size: 15px; font-weight: 900; color: var(--green); white-space: nowrap; }

/* ===== Réglages / formulaires ===== */
.form label, .form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.form-grid label small { font-weight: 500; opacity: .8; }
input, select, textarea {
    height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border-2); background: rgba(10, 10, 11, .7);
    color: var(--text); font-size: 15px; font-weight: 500; outline: none; transition: border-color var(--t), box-shadow var(--t);
}
textarea { height: auto; padding: 12px 14px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgb(var(--acc2-rgb) / .15); }
select option { background: #181818; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.svc-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--border); background: rgba(16, 16, 18, .6); }
.svc-row strong { flex: 1; font-size: 14px; }

/* ===== Fenêtres ===== */
.overlay { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(0, 0, 0, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.overlay.active { display: flex; }
.sheet { width: 100%; max-width: 620px; max-height: 100%; overflow-y: auto; padding: 24px; border-radius: 24px; border: 1px solid var(--border-2); background: linear-gradient(180deg, #1a1a1c, #111113); display: flex; flex-direction: column; gap: 18px; animation: pop .22s ease; }
@keyframes pop { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { font-size: 20px; font-weight: 900; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.span-2 { grid-column: span 2; }
.sheet-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* Toasts */
.toasts { pointer-events: none; position: fixed; z-index: 200; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 18px; border-radius: 14px; background: #1e1e21; border: 1px solid var(--border-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); font-size: 14px; font-weight: 600; animation: pop .2s ease; }

.bottom-nav { display: none; }

/* ===== Écrans moyens ===== */
@media (max-width: 1180px) {
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-2, .grid-ca { grid-template-columns: 1fr; }
    .accounts { grid-template-columns: 1fr; }
}

/* ===== MOBILE ===== */
@media (max-width: 820px) {
    body { flex-direction: column; }
    .sidebar { position: sticky; top: 0; z-index: 50; width: 100%; height: auto; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-right: none; border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
    .side-nav, .side-foot { display: none; }
    .brand-mark { width: 40px; height: 40px; }
    .brand-top { font-size: 17px; max-width: 200px; }
    .brand-bottom { font-size: 10px; }
    .sidebar .bell { position: relative; top: auto; right: auto; }
    .main { height: auto; overflow: visible; padding: 18px 16px 110px; }
    .hero { padding: 22px 20px; }
    .hero h1 { font-size: 30px; }
    .hero-actions { display: none; }
    .kpis { gap: 10px; }
    .kpi { padding: 14px; }
    .kpi-value { font-size: 22px; }
    .page-head h1 { font-size: 26px; }
    .page-actions { width: 100%; }
    .page-actions .btn-grad { display: none; }
    .search { flex: 1; }
    .search input { width: 100%; }
    .chart-box { height: 220px; }
    .ca-total { font-size: 40px; }
    .month-nav { width: 100%; justify-content: space-between; }
    .form-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .overlay { align-items: flex-end; padding: 0; }
    .sheet { border-radius: 24px 24px 0 0; max-height: 92vh; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
    .toasts { left: 16px; right: 16px; bottom: 100px; }
    .bottom-nav {
        display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 8px 8px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(10, 10, 11, .94); border-top: 1px solid var(--border); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    }
    .bn-item { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 50px; justify-content: center; border: none; background: none; color: var(--faint); font-size: 11px; font-weight: 700; }
    .bn-item .ph-duotone { font-size: 23px; }
    .bn-item.active { color: var(--cyan); }
    .bn-fab { justify-self: center; width: 58px; height: 58px; margin-top: -28px; border-radius: 999px; border: none; background: var(--grad-brand); color: #fff; font-size: 28px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 26px rgb(var(--acc-rgb) / .55), inset 0 1px 0 rgba(255, 255, 255, .35); }
}

/* Corrections */
[hidden] { display: none !important; }
.svc-tabs::-webkit-scrollbar { height: 6px; }
.svc-tabs::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
.svc-tabs::-webkit-scrollbar-track { background: transparent; }
.svc-tabs { scrollbar-color: var(--border-2) transparent; }
.lbl-row { display: flex; align-items: baseline; gap: 6px; }
.lbl-row small { font-weight: 500; opacity: .75; font-size: 11px; }
@media (max-width: 820px) {
    .client { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main badge" "main amount"; row-gap: 4px; }
    .client-main { grid-area: main; }
    .client .badge { grid-area: badge; justify-self: end; }
    .client-amount { grid-area: amount; justify-self: end; font-size: 13px; color: var(--muted); }
    .svc-summary .chip { padding: 6px 10px; font-size: 12px; }
}

/* ===== Écran de bienvenue ===== */
.welcome-sheet { max-width: 480px; text-align: left; }
.welcome-mark { width: 64px; height: 64px; border-radius: 18px; background: var(--grad-blue); box-shadow: var(--btn-shadow); display: inline-flex; align-items: center; justify-content: center; }
.welcome-mark .ph-duotone { font-size: 32px; color: #fff; }
.welcome-sheet h2 { font-size: 26px; font-weight: 900; letter-spacing: -.02em; }
.welcome-sheet p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.welcome-sheet label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.welcome-sheet .btn-grad { width: 100%; height: 52px; font-size: 15px; }

/* ===== Connexion / accès (Screamify en ligne) ===== */
.gate { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; padding: 20px;
    background: radial-gradient(60% 50% at 50% 0%, rgb(var(--acc-rgb) / .25), transparent 70%), var(--bg); }
.gate.active { display: flex; }
.gate-card { width: 100%; max-width: 420px; padding: 32px 28px; border-radius: 26px; border: 1px solid var(--border-2); background: var(--card);
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.gate-brand { font-size: 13px; font-weight: 900; letter-spacing: .3em; text-transform: uppercase; color: var(--cyan); }
.gate-card h1 { font-size: 26px; font-weight: 900; letter-spacing: -.02em; }
.gate-card p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.gate-card a { color: #fff; font-weight: 800; }
.gate-login { width: 100%; height: 52px; font-size: 15px; }
.gate-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border-2); border-top-color: var(--cyan); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.gate-out { height: 40px; font-size: 13px; }
.gate .gate-login, .gate .gate-spinner, .gate .gate-out { display: none; }
.gate[data-state="login"] .gate-login { display: inline-flex; }
.gate[data-state="loading"] .gate-spinner { display: block; }
.gate[data-state="blocked"] .gate-out { display: inline-flex; }

.ro-banner { display: flex; align-items: center; gap: 8px; max-width: 1320px; margin: 0 auto 16px; padding: 12px 16px; border-radius: 14px;
    background: rgba(245, 181, 68, .12); border: 1px solid rgba(245, 181, 68, .4); color: #f5d38f; font-size: 14px; }
body.read-only .btn-grad, body.read-only .bn-fab, body.read-only .add-account, body.read-only .add-client-inline,
body.read-only .mini-btn, body.read-only .svc-tab.add, body.read-only #fDelete, body.read-only .row-actions { display: none !important; }

.acct-row { display: flex; align-items: center; gap: 12px; }
.acct-row img { width: 44px; height: 44px; border-radius: 50%; }
.acct-row div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acct-row span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
#accountCard .btn-ghost { align-self: flex-start; }

/* Les messages passent au-dessus de l'\écran de connexion */
.toasts { z-index: 400; }
.gate-err { color: #ff8a95; font-weight: 700; }

/* ===== Installer l'app ===== */
.install-card[hidden], .install-banner[hidden] { display: none !important; }
.install-card { display: flex; flex-direction: column; gap: 14px; }
.install-banner { position: fixed; z-index: 310; left: 16px; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 18px; border: 1px solid var(--border-2); background: var(--card-2); box-shadow: 0 14px 40px rgba(0, 0, 0, .45); animation: install-up .45s cubic-bezier(.2, .9, .3, 1.2) both; }
.install-banner img { border-radius: 10px; flex: none; }
.install-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.install-banner-text b { font-size: 15px; font-weight: 800; }
.install-banner-text span { font-size: 13px; color: var(--muted); }
.install-banner .btn-grad { padding: 9px 14px; font-size: 14px; }
.install-steps { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; }
.install-steps li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.45; }
.install-steps li i { color: var(--blue); font-size: 18px; vertical-align: -3px; }
.install-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 14px; color: #fff; background: var(--blue); }
.install-sheet { gap: 16px; }
#installOverlay { z-index: 320; }
.gate.active ~ .install-banner, body:has(.gate.active) .install-banner { bottom: calc(20px + env(safe-area-inset-bottom)); }
.install-sheet .muted { margin: 4px 0 0; }
.install-arrow { display: flex; justify-content: center; font-size: 30px; color: var(--blue); animation: install-bob 1.2s ease-in-out infinite; }
@keyframes install-up { from { opacity: 0; transform: translateY(24px); } }
@keyframes install-bob { 50% { transform: translateY(8px); } }
@media (min-width: 821px) { .install-banner { left: auto; right: 24px; bottom: 24px; max-width: 380px; } }
@media (prefers-reduced-motion: reduce) { .install-banner, .install-arrow { animation: none; } }
.install-ask { margin: 0; font-weight: 800; font-size: 14px; }
.install-pick button.mine { border-color: var(--blue); color: var(--text); }
.install-pick button.mine::after { content: 'Ton appareil'; font-size: 11px; font-weight: 700; color: var(--blue); }

/* ===== Vrais logos des services ===== */
.svc-logo { overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.svc-logo svg { display: block; }

/* ===== Boutons rouge vif avec reflet qui traverse ===== */
.shine-btn { position: relative; overflow: hidden; isolation: isolate; }
.shine-btn::before { content: ''; position: absolute; z-index: 1; top: -60%; left: 130%; width: 38%; height: 220%; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent); transform: rotate(22deg); animation: shine-sweep 3s ease-in-out infinite; }
.shine-btn > * { position: relative; z-index: 2; }
@keyframes shine-sweep { 0% { left: 130%; } 45%, 100% { left: -70%; } }
.install-pick button.shine-btn, .install-pick button.shine-btn.mine { border: none; color: #fff; background: linear-gradient(135deg, var(--acc-bright), var(--acc-mid)); box-shadow: 0 10px 26px rgb(var(--acc-rgb) / .38), inset 0 1px 0 rgba(255, 255, 255, .25); }
.install-pick button.shine-btn:active { transform: scale(.97); }
.install-pick button.shine-btn.mine { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--acc-bright), 0 10px 26px rgb(var(--acc-rgb) / .45); }
.install-pick button.shine-btn.mine::after { color: #fff; opacity: .9; position: relative; z-index: 2; }
.install-pick button.shine-btn:nth-child(2)::before { animation-delay: 1.5s; }
.os-logo { width: 28px; height: 28px; display: grid; place-items: center; }
.os-logo svg { width: 100%; height: 100%; }

/* ===== Billet volant ===== */
.money-fly { display: inline-block; position: relative; pointer-events: none; }
.money-fly .mf-emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--mf-size) * .82); line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; animation: money-pose 6s ease-in-out infinite; transform-origin: 50% 60%; }
.money-fly span.mf-shadow { position: absolute; left: 22%; right: 22%; bottom: -6%; height: 8%; border-radius: 50%; background: rgba(0, 0, 0, .28); filter: blur(2px); animation: money-shadow 6s ease-in-out infinite; }
.hero-money { --mf-size: 76px; position: absolute; top: 14px; right: 18px; width: 76px; height: 76px; z-index: 1; }
@keyframes money-pose {
    0%, 100% { transform: translateY(0) rotate(0); }
    22% { transform: translateY(-7px) rotate(-7deg); }
    45% { transform: translateY(-3px) rotate(5deg) scale(1.04); }
    70% { transform: translateY(-9px) rotate(-2deg); }
    85% { transform: translateY(-4px) rotate(8deg); }
}
@keyframes money-shadow { 0%, 100% { transform: scaleX(1); opacity: .28; } 22%, 70% { transform: scaleX(.75); opacity: .16; } }
@media (max-width: 820px) { .hero-money { --mf-size: 58px; width: 58px; height: 58px; top: 10px; right: 10px; } }
@media (prefers-reduced-motion: reduce) { .shine-btn::before, .money-fly .mf-emoji, .money-fly .mf-shadow { animation: none; } }

/* ===== Emoji flottant dans l'en-tête des pages ===== */
.page-head { position: relative; }
.page-fly { --mf-size: 68px; width: 68px; height: 68px; margin-left: auto; margin-right: 12px; align-self: center; }
#view-settings .page-fly { margin-right: 24px; }
@media (max-width: 820px) {
    .page-fly { --mf-size: 52px; width: 52px; height: 52px; position: absolute; top: -4px; right: 4px; margin: 0; }
}

/* ===== Logo Screamify ===== */
.brand-lockup { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo { width: 56px; height: 56px; border-radius: 15px; box-shadow: 0 10px 28px rgb(var(--acc-rgb) / .4); }
.wordmark { font-family: Figtree, sans-serif; font-weight: 900; font-size: 34px; letter-spacing: -.045em; line-height: 1; color: var(--acc-bright); }
.wordmark small { font-size: 15px; letter-spacing: 0; color: var(--muted); font-weight: 800; }
.gate-card .brand-lockup { margin-bottom: 4px; }
.welcome-sheet .welcome-tagline { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.45; }
.welcome-tagline b { color: var(--acc-bright); }

/* ===== Tarifs ===== */
.span-all { grid-column: 1 / -1; }
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 18px; border: 1px solid var(--border-2); background: var(--card-2); }
.plan h3 { font-size: 17px; font-weight: 900; }
.plan-life { border-color: rgb(var(--acc-rgb) / .55); background: linear-gradient(160deg, rgb(var(--acc-rgb) / .16), transparent 60%), var(--card-2); }
.plan-tag { align-self: flex-start; padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, var(--acc-bright), var(--acc-mid)); }
.plan-price { font-size: 15px; color: var(--muted); }
.plan-price b { font-size: 32px; font-weight: 900; color: var(--text); letter-spacing: -.02em; }
.plan-price span { font-size: 13px; }
.plan-perks { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; font-size: 14px; line-height: 1.4; }
.plan-perks li { display: flex; gap: 8px; align-items: flex-start; }
.plan-perks i { color: #22c55e; font-size: 19px; flex: none; }
.plan .muted { margin: 0; font-size: 13px; line-height: 1.5; }
.plan-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-2); }
.plan-steps li { display: flex; justify-content: space-between; padding: 8px 12px; font-size: 14px; }
.plan-steps li + li { border-top: 1px solid var(--border-2); }
.plan-steps li span { color: var(--muted); }
.plan-steps li.last { background: rgba(34, 197, 94, .1); }
.plan-steps li.last b { color: #22c55e; }
.plan-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.plan-note i { color: var(--blue); font-size: 17px; flex: none; }
@media (max-width: 820px) { .pricing { grid-template-columns: 1fr; } }

/* ===== Animation d'ouverture : le gros S rétrécit, puis « screamify » défile ===== */
.splash { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: var(--bg, #0b0b0b); transition: opacity .42s ease, transform .42s ease; }
.splash.splash-out { opacity: 0; transform: scale(1.04); pointer-events: none; }
.splash-lock { display: flex; align-items: center; }
.splash-s { width: 64px; height: 64px; border-radius: 17px; background: linear-gradient(160deg, var(--acc-bright), var(--acc-mid)); box-shadow: 0 14px 40px rgb(var(--acc-rgb) / .5); animation: splash-s 1.1s cubic-bezier(.3, 1.4, .5, 1) both; }
.splash-word { display: block; overflow: hidden; max-width: 0; margin-left: 0; animation: splash-word .6s cubic-bezier(.2, .8, .2, 1) 1.05s both; }
.splash-word span { display: block; font-family: Figtree, sans-serif; font-weight: 900; font-size: 46px; letter-spacing: -.045em; line-height: 1.15; color: var(--acc-bright); white-space: nowrap; padding-right: 4px; animation: splash-word-text .6s cubic-bezier(.2, .8, .2, 1) 1.05s both; }
@keyframes splash-s {
    0% { transform: scale(.4); opacity: 0; }
    30% { transform: scale(2.5); opacity: 1; }
    55% { transform: scale(2.5); }
    100% { transform: scale(1); }
}
@keyframes splash-word { from { max-width: 0; margin-left: 0; } to { max-width: 260px; margin-left: 14px; } }
@keyframes splash-word-text { from { transform: translateX(-40%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .splash-s, .splash-word, .splash-word span { animation: none; } .splash-word { max-width: 260px; margin-left: 14px; } }

/* ===== Comptes : tableau des clients (une ligne par client) ===== */
.accounts { grid-template-columns: 1fr; }
.account-body { overflow-x: auto; }
.client-head, .client { display: grid; grid-template-columns: minmax(120px, 1.3fr) 62px 66px 90px 90px 106px 84px 66px 72px; align-items: center; gap: 8px; min-width: 820px; }
.client-head.has-profile, .client.has-profile { grid-template-columns: 104px minmax(110px, 1.1fr) 62px 66px 90px 90px 106px 84px 66px 72px; min-width: 900px; }
.client-head { padding: 10px 14px; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--border); }
.client { cursor: pointer; padding: 0 14px; min-height: 46px; }
.client.has-profile { padding-left: 0; }
.client-head.has-profile { padding-left: 14px; }
.client:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.client-profile { align-self: stretch; display: flex; align-items: center; padding: 0 12px; border-left: 3px solid var(--pc); background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 16%, transparent), transparent); color: var(--pc); font-size: 12.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.client-profile em { color: var(--faint); font-style: normal; }
.client-name { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.client-type, .client-dur, .client-start, .client-end { font-size: 13px; color: var(--text); white-space: nowrap; }
.client-type { color: var(--muted); }
.dpill { display: inline-block; padding: 3px 9px; border-radius: 8px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.dpill.ok { background: rgba(34, 197, 94, .14); color: #22c55e; }
.dpill.soon { background: rgba(251, 191, 36, .16); color: var(--amber); }
.dpill.today { background: var(--grad-warm); color: #fff; }
.dpill.late { background: rgba(255, 77, 94, .14); color: #ff8a95; }
.dpill.none { color: var(--faint); padding-left: 0; }
.client-bill code { display: inline-block; padding: 3px 8px; border-radius: 7px; background: rgba(59, 130, 246, .14); color: var(--text); font: 700 13px ui-monospace, Consolas, monospace; }
.state { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.state.on, .state.life { background: rgba(34, 197, 94, .15); color: #22c55e; }
.state.wait { background: rgba(255, 154, 74, .15); color: var(--orange); }
.state.off { background: rgba(255, 77, 94, .14); color: #ff8a95; }
.client-actions { display: flex; gap: 6px; justify-content: flex-end; }
.client-actions .mini-btn { width: 32px; height: 32px; font-size: 16px; }
.relance-btn:hover { color: #22c55e; border-color: rgba(34, 197, 94, .5); }
.del-btn:hover { color: #ff6b77; border-color: rgba(255, 77, 94, .5); }
.client.sunk { opacity: .5; }
.client.sunk:hover { opacity: .85; }
.toast { display: flex; align-items: center; gap: 12px; }
.toast-action { pointer-events: auto; margin-left: auto; padding: 6px 12px; border-radius: 9px; border: 1px solid var(--border-2); background: transparent; color: #ff6b77; font-weight: 900; font-size: 13px; }
html[data-theme="light"] .client-bill code { background: rgba(59, 130, 246, .1); }
@media (max-width: 820px) {
    .account-body { overflow-x: visible; }
    .client-head { display: none; }
    .client, .client.has-profile { min-width: 0; padding: 10px 14px; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name days" "info state" "bill actions"; row-gap: 6px; }
    .client.has-profile { grid-template-areas: "prof days" "name state" "info info" "bill actions"; }
    .client-profile { grid-area: prof; justify-self: start; align-self: center; padding: 3px 10px; border-radius: 0 8px 8px 0; }
    .client-name { grid-area: name; }
    .client-type, .client-dur, .client-start { display: none; }
    .client-end { grid-area: info; font-size: 12px; color: var(--muted); }
    .client-end::before { content: "Fin : "; }
    .client-days { grid-area: days; justify-self: end; }
    .client-state { grid-area: state; justify-self: end; }
    .client-bill { grid-area: bill; }
    .client-actions { grid-area: actions; }
}

/* ===== Coût des comptes, dépenses et bénéfice ===== */
.acc-chip { flex-shrink: 0; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; border: 1px solid; }
.acc-chip.cost { color: #ff8a95; border-color: rgba(255, 77, 94, .45); background: rgba(255, 77, 94, .08); }
.acc-chip.renew { color: var(--amber); border-color: rgba(251, 191, 36, .45); background: rgba(251, 191, 36, .08); }
.acc-chip.renew.soon { color: #fff; border-color: transparent; background: var(--grad-warm); }
.chip.profit-up strong { color: #22c55e; }
.chip.profit-down strong { color: #ff6b77; }
.ca-profit { width: 100%; max-width: 340px; margin: 6px auto 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.ca-profit:empty { display: none; }
.ca-profit > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.ca-profit > div b { color: var(--text); font-weight: 800; }
.ca-profit > div.tot { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--border-2); font-size: 17px; color: var(--text); font-weight: 800; }
.ca-profit > div.tot b { font-size: 22px; font-weight: 900; }
.ca-profit .pos, .bar-profit .pos { color: #22c55e !important; }
.ca-profit .neg, .bar-profit .neg { color: #ff6b77 !important; }
.ca-profit .hint { text-align: center; margin: 4px 0 0; }
.bar-profit { margin-top: 5px; font-size: 12px; color: var(--muted); }
.acc-sheet { max-width: 560px; }
.acc-sheet .hint { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
@media (max-width: 820px) { .account-head { flex-wrap: wrap; row-gap: 10px; } }
.acc-sheet .hint { max-width: none; }
@media (max-width: 820px) {
    .account-head .acc-chip { order: 5; }
    .account-head .meta { order: 6; margin-left: auto; }
    .account-head h3 { flex: 1 1 0; flex-basis: auto; }
}
/* Fin de l'ouverture : le fond s'efface pendant que le logo rejoint l'écran de connexion */
.splash.splash-fly { background: transparent; transition: background-color .7s ease; pointer-events: none; }

/* ===== Présentation avant la connexion : avantages en cascade + « Commencer » ===== */
.gate-intro { display: none; }
.gate.intro .gate-intro { display: flex; flex-direction: column; gap: 16px; width: 100%; text-align: left; }
.gate.intro #gateTitle, .gate.intro #gateText, .gate.intro .gate-login { display: none !important; }
.intro-tag { margin: 0; text-align: center; font-size: 15px !important; font-weight: 700; color: var(--text) !important; line-height: 1.45; }
.intro-tag b { color: var(--acc-bright); }
.intro-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.intro-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--border); font-size: 15px; font-weight: 700; opacity: 0; transform: translateX(-26px); }
.intro-ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 11px; background: rgb(var(--acc2-rgb) / .14); font-size: 19px; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.gate.intro.intro-play .intro-list li { animation: intro-in .6s cubic-bezier(.22, 1, .36, 1) forwards; }
.gate.intro.intro-play .intro-list li .intro-ic { animation: intro-pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.gate.intro.intro-play .intro-list li:nth-child(1), .gate.intro.intro-play .intro-list li:nth-child(1) .intro-ic { animation-delay: .25s; }
.gate.intro.intro-play .intro-list li:nth-child(2), .gate.intro.intro-play .intro-list li:nth-child(2) .intro-ic { animation-delay: .53s; }
.gate.intro.intro-play .intro-list li:nth-child(3), .gate.intro.intro-play .intro-list li:nth-child(3) .intro-ic { animation-delay: .81s; }
.gate.intro.intro-play .intro-list li:nth-child(4), .gate.intro.intro-play .intro-list li:nth-child(4) .intro-ic { animation-delay: 1.09s; }
.gate.intro.intro-play .intro-tag { animation: intro-fade .6s ease both; }
.intro-go { width: 100%; height: 52px; font-size: 16px; opacity: 0; }
.gate.intro.intro-play .intro-go { animation: intro-fade .6s ease 1.45s forwards; }
@keyframes intro-in { to { opacity: 1; transform: none; } }
@keyframes intro-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes intro-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.gate.intro-leave #gateTitle, .gate.intro-leave #gateText, .gate.intro-leave .gate-login { animation: intro-fade .55s cubic-bezier(.22, 1, .36, 1) both; }
.gate.intro-leave #gateText { animation-delay: .08s; }
.gate.intro-leave .gate-login { animation-delay: .16s; }
@media (prefers-reduced-motion: reduce) { .intro-list li, .intro-go { opacity: 1 !important; transform: none !important; animation: none !important; } }
/* Boutons de l'écran d'accueil (Commencer, Continuer avec Google) : même bouton 3D, reflet toutes les 4 secondes */
.intro-go, .gate-login { height: 52px; font-size: 15px; }
.intro-go::before, .gate-login::before { animation-duration: 4s; }

/* ===== Réabonnements (page CA) ===== */
.renew-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.renew-kpis div { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--border); }
.renew-kpis span { font-size: 13px; color: var(--muted); font-weight: 600; }
.renew-kpis strong { font-size: 28px; font-weight: 900; letter-spacing: -.02em; }
.renew-kpis small { font-size: 12px; color: var(--muted); }
.renew-kpis small.up { color: #22c55e; } .renew-kpis small.down { color: #ff6b77; }
.renew-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; height: 110px; align-items: end; }
.renew-bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.renew-bar span { width: 60%; min-height: 4px; border-radius: 8px 8px 4px 4px; background: rgb(var(--acc-rgb) / .4); }
.renew-bar.on span { background: linear-gradient(180deg, var(--acc-bright), var(--acc-mid)); }
.renew-bar b { font-size: 13px; } .renew-bar small { font-size: 11px; color: var(--muted); }
.renew-line { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--muted); margin: 0; }
.renew-line i { font-size: 18px; flex: none; }
.renew-line.ok i { color: #22c55e; } .renew-line.wait i { color: #f5b70a; } .renew-line.lost i { color: #ff6b77; }
.ca-renew .hint { font-size: 12px; color: var(--faint); margin: 0; }

/* ===== Onglet Stats ===== */
.stats-body { display: flex; flex-direction: column; gap: 20px; }
.st-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.st-kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--border); }
.st-kpi span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.st-kpi span i { color: var(--blue); font-size: 16px; }
.st-kpi strong { font-size: 26px; font-weight: 900; letter-spacing: -.02em; }
.st-kpi small { font-size: 12px; color: var(--muted); }
.st-kpi small.up { color: #22c55e; } .st-kpi small.down { color: #ff6b77; }
.st-hist { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; height: 140px; align-items: end; }
.st-bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.st-bar span { width: 72%; min-height: 4px; border-radius: 7px 7px 3px 3px; background: rgb(var(--acc-rgb) / .38); animation: st-grow .7s cubic-bezier(.22, 1, .36, 1) both; transform-origin: bottom; }
.st-bar.on span { background: linear-gradient(180deg, var(--acc-bright), var(--acc-mid)); }
.st-bar b { font-size: 12px; } .st-bar small { font-size: 10px; color: var(--muted); }
@keyframes st-grow { from { transform: scaleY(0); } }
.st-champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.st-champ { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--border); }
.st-champ-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 21px; color: #fff; background: linear-gradient(135deg, var(--acc-bright), var(--acc-deep)); }
.st-champ div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-champ div > span { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.st-champ strong { font-size: 17px; font-weight: 900; }
.st-champ small { font-size: 13px; color: var(--muted); line-height: 1.4; }
.st-top { display: flex; flex-direction: column; gap: 6px; }
.st-top .label { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.st-top-row, .st-svc-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card-2); }
.st-pos { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 13px; background: var(--card); border: 1px solid var(--border-2); }
.st-pos.gold { background: linear-gradient(135deg, #fcd34d, #f59e0b); color: #2a1a00; border: none; }
.st-top-name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 800; }
.st-top-name small { font-size: 12px; color: var(--muted); font-weight: 600; }
.st-svc { display: flex; flex-direction: column; gap: 8px; }
.top-settings { display: none; }
@media (max-width: 820px) {
    .st-hist { gap: 3px; } .st-bar small { font-size: 9px; }
    .top-settings { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border-2); background: transparent; color: var(--text); font-size: 20px; margin-left: auto; margin-right: 8px; }
    .top-settings.active { color: var(--blue); border-color: var(--blue); }
    .bottom-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 820px) { .st-kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .st-kpi { padding: 12px; } .st-kpi strong { font-size: 22px; } }
/* Minuterie de test des rappels */
.push-test { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; padding: 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--border); }
.push-test-t { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.push-test-t i { color: var(--blue); font-size: 18px; }
.push-test-row { display: flex; gap: 10px; flex-wrap: wrap; }
.push-test-row select { flex: 1; min-width: 150px; height: 46px; border-radius: 14px; border: 1px solid var(--border-2); background: var(--card); color: var(--text); padding: 0 12px; font: inherit; font-weight: 700; }
.push-test .muted:empty { display: none; }
.push-test .hint { margin: 0; font-size: 12px; color: var(--faint); }

/* ===== Ma marque : logo, détourage, couleurs ===== */
.brand-mark.has-logo { padding: 0; overflow: hidden; background: #fff; }
.brand-mark.has-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-mark.has-logo.logo-cut { background: transparent; box-shadow: none; }
.brand-mark.has-logo.logo-cut img { object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45)); }
.brand-mark.big { width: 72px; height: 72px; border-radius: 20px; font-size: 32px; }
.brand-card-body { display: flex; flex-direction: column; gap: 14px; }
.brand-preview { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--border); }
.brand-preview div { display: flex; flex-direction: column; gap: 2px; }
.brand-preview strong { font-size: 18px; font-weight: 900; }
.brand-card .file-btn { align-self: flex-start; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; cursor: pointer; }
.check-row input { width: 20px; height: 20px; accent-color: var(--blue); }
.brand-colors { display: flex; flex-direction: column; gap: 10px; }
.brand-colors .label { font-size: 13px; color: var(--muted); font-weight: 700; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--border-2); background: var(--sw); cursor: pointer; transition: transform .18s cubic-bezier(.32, 1.25, .5, 1); }
.swatch:active { transform: scale(.88); }
.swatch.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--text); }
.swatch.custom { display: grid; place-items: center; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); color: #fff; font-size: 18px; }
.danger-link { align-self: flex-start; color: #ff6b77 !important; }
.brand-auto { align-self: flex-start; }
.brand-sample { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: var(--bg); border: 1px solid var(--border); }
.brand-sample .bs-btn { padding: 9px 16px; border-radius: 999px; color: #fff; font-weight: 800; font-size: 13px; background: var(--grad-blue); box-shadow: var(--btn-shadow); }
.brand-sample .bs-chip { padding: 7px 13px; border-radius: 999px; font-weight: 800; font-size: 13px; color: var(--text); background: rgb(var(--acc-rgb) / .18); border: 1px solid rgb(var(--acc-rgb) / .5); }
.brand-sample .bs-grad { width: 64px; height: 26px; border-radius: 999px; background: var(--grad-brand); }
.brand-sample .bs-card { padding: 8px 14px; border-radius: 12px; font-weight: 700; font-size: 13px; background: var(--card-2); border: 1px solid var(--border-2); }

/* ===== Corrections mobile ===== */
/* Bandeau d'installation : dans la page d'accueil, plus flottant au-dessus du contenu */
.install-banner.inline { position: relative; left: auto; right: auto; bottom: auto; z-index: 1; max-width: none; margin: 0; box-shadow: none; }
@media (max-width: 820px) {
    /* Services proposés : nom sur une ligne, boutons dessous, sans déborder */
    .svc-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) repeat(4, 34px); column-gap: 8px; row-gap: 4px; align-items: center; }
    .svc-row > .svc-dot { grid-row: 1 / 3; }
    .svc-row > strong { grid-column: 2 / 7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .svc-row > .muted { grid-column: 2; grid-row: 2; font-size: 12px; }
    .svc-row > .mini-btn { grid-row: 2; }
}

/* Fenêtre « Renouveler » */
.renew-sheet { max-width: 520px; }
.renew-sheet .renew-end { display: flex; align-items: center; height: 48px; padding: 0 14px; border-radius: 14px; border: 1px dashed var(--border-2); color: var(--text); font-weight: 800; }
.renew-sheet .hint { margin: 0; font-size: 13px; color: var(--muted); }

/* Réglages : façon de compter le CA */
.camodes { display: grid; gap: 10px; }
.camodes button { display: flex; flex-direction: column; gap: 5px; text-align: left; padding: 14px; border-radius: 16px; border: 1px solid var(--border-2); background: var(--card-2); color: var(--text); cursor: pointer; transition: border-color .2s, background .2s; }
.camodes strong { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; }
.camodes strong i { color: var(--blue); font-size: 18px; }
.camodes span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.camodes button.active { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue) inset; background: rgb(var(--acc-rgb) / .08); }

/* Écran bloqué : plus de « Changer de compte », on contacte l'admin */
.gate .gate-contact { display: none; width: 100%; height: 52px; font-size: 15px; }
.gate[data-state="blocked"] .gate-contact { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.gate[data-state="blocked"] .gate-out { display: none !important; }
.gate-contact-box { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--border-2); }
.gate-contact-box[hidden] { display: none; }
.gate-contact-box strong { font-size: 16px; font-weight: 800; }
.gate-contact-box span { color: var(--muted); font-size: 15px; }
.gate-contact-box a { width: 100%; height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; margin-top: 4px; font-weight: 800; }

/* Cycle d'abonnement et textes explicatifs (réglages) */
body.no-hints .hint, body.no-hints .muted.tip { display: none !important; }
.cycle-field { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-weight: 700; font-size: 14px; }
.cycle-field select { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--bg-card); color: var(--text); font: inherit; }
.cycle-check { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-weight: 700; font-size: 14px; cursor: pointer; }
.cycle-check small { color: var(--muted); font-weight: 500; }

/* Graphiques du CA (mensuel / annuel) */
.ca-chart-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.ca-chart-tabs button { flex: 1 1 160px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--bg-card); color: var(--muted); font: inherit; font-weight: 800; cursor: pointer; }
.ca-chart-tabs button.active { color: #fff; border-color: rgb(var(--acc-rgb) / .6); background: linear-gradient(135deg, rgb(var(--acc-rgb) / .35), rgb(var(--acc2-rgb) / .15)); }
.ca-chart-box { position: relative; width: 100%; height: 260px; }

/* Flèches sous le graphe d'accueil (12 mois / encaissement du cycle) */
.chart-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }
.chart-nav button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-2); background: var(--bg-card); color: var(--text); display: grid; place-items: center; cursor: pointer; font-size: 18px; }
.chart-nav button:disabled { opacity: .35; cursor: default; }
.chart-nav span { font-size: 13px; font-weight: 700; color: var(--muted); text-align: center; min-width: 0; }

/* Mobile : titre et total du graphe d'accueil l'un sous l'autre */
@media (max-width: 820px) { .chart-card .card-head { flex-direction: column; align-items: flex-start; gap: 4px; } .chart-card #chartTotal { font-size: 12px; line-height: 1.4; } }
.acc-chip.pay { color: var(--cyan, #38bdf8); border-color: rgba(56, 189, 248, .45); background: rgba(56, 189, 248, .08); }
.notif-opt { margin: 14px 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: rgba(16, 16, 18, .5); }
.notif-opt .tip { margin: 6px 0 0 30px; font-size: 13px; line-height: 1.5; }

/* Cartes du tableau de bord cliquables + détail par service / compte / client */
.kpi-btn { cursor: pointer; transition: transform .15s ease, border-color .15s ease; }
.kpi-btn:hover, .kpi-btn:focus-visible { transform: translateY(-2px); border-color: var(--border-2); outline: none; }
.kpi-sheet { max-width: 560px; }
.kpi-body { display: flex; flex-direction: column; gap: 14px; max-height: 65vh; overflow-y: auto; }
.kpi-grp { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: rgba(16, 16, 18, .5); }
.kpi-grp-h { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; margin-bottom: 6px; }
.kpi-acc { margin-top: 8px; }
.kpi-acc-h { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 800; color: var(--muted); padding: 4px 2px; }
.kpi-line { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border: none; border-radius: 10px; background: transparent; color: var(--text); font: inherit; font-size: 14px; text-align: left; }
button.kpi-line:hover { background: rgba(255, 255, 255, .05); cursor: pointer; }
.kpi-line small { color: var(--faint); font-weight: 500; }
.kpi-line b { white-space: nowrap; }
.kpi-line b.neg { color: #ff6b77; }

/* Réglages : revenus et facturation, tarifs en demi-largeur */
.rev-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0; }
.set-sub { margin: 16px 0 6px; font-size: 15px; font-weight: 800; }
.revenue-card .camodes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cycle-field input { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--bg-card); color: var(--text); font: inherit; }
.pricing-half .pricing { grid-template-columns: 1fr; }
@media (max-width: 820px) { .rev-fields, .revenue-card .camodes { grid-template-columns: 1fr; } }

/* Réglages : trois catégories cliquables (General, Revenue et Tarification, Application et Sauvegarde) */
.set-cats { display: flex; flex-direction: column; gap: 14px; margin: 4px 0 24px; max-width: 760px; }
.set-cat-btn { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; border-radius: 18px; border: 1.5px solid rgb(var(--acc-rgb) / .55); background: linear-gradient(135deg, rgb(var(--acc-dark-rgb) / .22), rgb(var(--acc2-rgb) / .08)); color: var(--text); font: inherit; cursor: pointer; text-align: left; box-shadow: 0 0 0 1px rgb(var(--acc-rgb) / .15) inset; }
.set-cat-btn:hover, .set-cat-btn:focus-visible { border-color: rgb(var(--acc-rgb) / .85); background: linear-gradient(135deg, rgb(var(--acc-dark-rgb) / .36), rgb(var(--acc2-rgb) / .14)); outline: none; }
.set-cat-btn span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.set-cat-btn strong { font-size: 17px; font-weight: 800; }
.set-cat-btn small { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.set-cat-btn i { font-size: 22px; color: rgb(var(--acc-rgb)); flex-shrink: 0; }
.set-panel { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.set-panel[hidden] { display: none; }
.set-pricing-wrap { margin-top: 28px; }
.set-pricing-wrap .pricing-card { max-width: 900px; }
@media (min-width: 900px) { .set-cats { max-width: 900px; } .set-panel { max-width: 900px; } }
