/*
 * BindiPay — thème du back-office.
 * Orange doux, typographie légère, cartes aérées ; mode clair et mode sombre.
 * Feuille de style simple (sans compilation), chargée par FilamentAsset.
 */
:root {
    --bp-brand: #f97316;        /* orange 500 */
    --bp-brand-strong: #ea580c; /* orange 600 */
    --bp-brand-soft: #fff1e6;
    --bp-accent: #fb7185;       /* corail */
    --bp-gold: #fbbf24;
    --bp-bg: #f6f4f2;
    --bp-card: rgba(255, 255, 255, .82);
    --bp-card-solid: #ffffff;
    --bp-border: rgba(28, 25, 23, .05);
    --bp-ink: #1c1917;
    --bp-ink-soft: #44403c;
    --bp-muted: #a8a29e;
    --bp-shadow: 0 1px 1px rgba(28, 25, 23, .02), 0 8px 28px -14px rgba(28, 25, 23, .10);
    --bp-radius: 24px;
}
.dark {
    --bp-brand-soft: rgba(249, 115, 22, .12);
    --bp-bg: #0d0b0a;
    --bp-card: rgba(28, 25, 23, .62);
    --bp-card-solid: #1c1917;
    --bp-border: rgba(255, 255, 255, .05);
    --bp-ink: #f5f5f4;
    --bp-ink-soft: #d6d3d1;
    --bp-muted: #78716c;
    --bp-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 12px 32px -18px rgba(0, 0, 0, .7);
}

/* ---------- Habillage général ---------- */
.fi-body {
    background:
        radial-gradient(1000px 520px at 88% -8%, rgba(251, 146, 60, .10), transparent 60%),
        radial-gradient(800px 480px at -8% 108%, rgba(251, 113, 133, .06), transparent 60%),
        var(--bp-bg) !important;
}
.fi-sidebar {
    background: var(--bp-card) !important;
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--bp-border);
}
.fi-sidebar-item-btn { border-radius: 14px !important; transition: background .2s; }
.fi-sidebar-item-label { font-weight: 450 !important; }
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: linear-gradient(135deg, #fb923c, #f97316 60%, #fb7185) !important;
    box-shadow: 0 8px 20px -12px rgba(249, 115, 22, .8);
}
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-icon { color: #fff !important; }
.fi-sidebar-group-label { font-weight: 500 !important; letter-spacing: .02em; color: var(--bp-muted) !important; }
.fi-topbar > nav, .fi-topbar { background: transparent !important; box-shadow: none !important; }
.fi-section, .fi-ta-ctn, .fi-wi-stats-overview-stat {
    border-radius: var(--bp-radius) !important;
    background: var(--bp-card) !important;
    backdrop-filter: blur(16px);
    box-shadow: var(--bp-shadow) !important;
    border: 1px solid var(--bp-border) !important;
    --tw-ring-color: transparent !important;
}
.fi-wi-stats-overview-stat { padding: 1.25rem 1.4rem !important; }
.fi-wi-stats-overview-stat-label { font-size: .8rem !important; color: var(--bp-muted) !important; font-weight: 450 !important; }
.fi-wi-stats-overview-stat-value { font-size: 1.6rem !important; font-weight: 400 !important; letter-spacing: -.02em; }
.fi-btn { border-radius: 12px !important; }
.fi-header-heading { font-weight: 500 !important; letter-spacing: -.02em; }

/* ---------- Composants du tableau de bord ---------- */
.bp-widget { height: 100%; }
.bp-card, .bp-pill, .bp-case {
    border-radius: var(--bp-radius);
    background: var(--bp-card);
    border: 1px solid var(--bp-border);
    box-shadow: var(--bp-shadow);
    backdrop-filter: blur(16px);
    color: var(--bp-ink);
}
.bp-card { padding: 1.4rem 1.5rem; height: 100%; position: relative; overflow: hidden; }
.bp-card-title, .bp-hero-label, .bp-section-title, .bp-pill small, .bp-kv dt {
    font-size: .7rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--bp-muted);
}
.bp-center { text-align: center; }
.bp-muted { color: var(--bp-muted); font-size: .82rem; }
.bp-bad { color: #e11d48; }
.bp-big { font-size: 2.1rem; font-weight: 300; letter-spacing: -.03em; margin-top: .6rem; line-height: 1.1; color: var(--bp-ink); }
.bp-huge { font-size: 2.5rem; font-weight: 300; letter-spacing: -.035em; margin-top: .6rem; line-height: 1.05; }
.bp-unit { font-size: .45em; color: var(--bp-muted); font-weight: 400; letter-spacing: 0; margin-left: .15em; }
.bp-empty { color: var(--bp-muted); }
.bp-ico { width: 1.1rem; height: 1.1rem; }

/* Pastilles du haut */
.bp-hero-wrap { display: flex; flex-direction: column; gap: .9rem; height: 100%; }
.bp-pills { display: flex; gap: .9rem; flex-wrap: wrap; }
.bp-pill { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; border-radius: 18px; flex: 1 1 220px; }
.bp-pill strong { display: block; font-size: .95rem; font-weight: 500; margin-top: .1rem; }
.bp-pill-icon {
    width: 2.2rem; height: 2.2rem; border-radius: 12px; display: grid; place-items: center; flex: none;
    background: var(--bp-brand-soft); color: var(--bp-brand-strong);
}
.dark .bp-pill-icon { color: #fdba74; }
.bp-pill-meta { margin-left: auto; font-size: .72rem; padding: .25rem .55rem; border-radius: 8px; background: var(--bp-brand-soft); color: var(--bp-brand-strong); font-weight: 500; white-space: nowrap; }
.dark .bp-pill-meta { color: #fdba74; }

/* Carte principale : dégradé orange doux */
.bp-hero {
    position: relative; overflow: hidden; flex: 1; padding: 1.6rem 1.6rem 1.3rem; color: #fff;
    border-radius: var(--bp-radius);
    background:
        radial-gradient(90% 110% at 100% 100%, rgba(253, 224, 71, .55), transparent 55%),
        radial-gradient(70% 80% at 80% 10%, rgba(251, 113, 133, .45), transparent 60%),
        linear-gradient(135deg, #1c1410 0%, #7c2d12 32%, #ea580c 68%, #fb923c 100%);
    box-shadow: 0 18px 40px -22px rgba(234, 88, 12, .65);
}
.bp-hero-glow {
    position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.3px);
    background-size: 8px 8px;
    mask-image: radial-gradient(60% 55% at 78% 28%, #000, transparent 70%);
}
.bp-hero .bp-hero-label { color: rgba(255, 255, 255, .7); position: relative; }
.bp-hero-amount { position: relative; font-size: clamp(2.3rem, 4.2vw, 3rem); font-weight: 300; letter-spacing: -.04em; margin: .8rem 0 .25rem; }
.bp-hero-amount span { font-size: .42em; opacity: .7; font-weight: 400; margin-left: .2em; }
.bp-hero-sub { position: relative; font-size: .8rem; color: rgba(255, 255, 255, .72); font-weight: 400; }
.bp-hero-actions { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-top: 1.4rem; }
.bp-action {
    display: flex; flex-direction: column; gap: .3rem; padding: .9rem 1rem; border-radius: 18px; min-height: 92px;
    background: rgba(255, 255, 255, .9); color: #292524; text-decoration: none; font-weight: 450; font-size: .85rem;
    transition: transform .2s, background .2s; backdrop-filter: blur(6px);
}
.bp-action:hover { transform: translateY(-2px); background: #fff; }
.bp-action:nth-child(3) { background: rgba(255, 247, 237, .94); }
.bp-action-icon { width: 1.9rem; height: 1.9rem; border-radius: 10px; display: grid; place-items: center; background: #fff7ed; color: #ea580c; margin-bottom: .2rem; }
.bp-action b { margin-top: auto; font-size: 1.2rem; font-weight: 400; color: #ea580c; }

/* Jauge */
.bp-gauge-card { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: radial-gradient(70% 60% at 50% 95%, rgba(251, 146, 60, .16), transparent 70%), var(--bp-card); }
.bp-gauge { width: min(100%, 320px); margin-top: .6rem; overflow: visible; }
.bp-gauge-track { fill: none; stroke: var(--bp-border); stroke-width: 10; stroke-linecap: round; }
.dark .bp-gauge-track { stroke: rgba(255, 255, 255, .06); }
.bp-gauge-value { fill: none; stroke: url(#bp-gauge-grad); stroke-width: 10; stroke-linecap: round; }
.bp-gauge-tick { stroke: var(--bp-muted); stroke-width: 1; opacity: .35; }
.bp-gauge-knob { fill: var(--bp-card-solid); stroke: var(--bp-brand); stroke-width: 3; }
.bp-gauge-value-text { font-size: 2.6rem; font-weight: 300; letter-spacing: -.04em; margin-top: -3.8rem; color: var(--bp-ink); }
.bp-gauge-value-text span { font-size: .5em; color: var(--bp-muted); }

/* Mini-graphiques */
.bp-spark { margin-top: 1.1rem; height: 52px; }
.bp-spark svg { width: 100%; height: 52px; display: block; }
.bp-bars rect { fill: var(--bp-muted); opacity: .22; }
.bp-bars rect.bp-bar-last { fill: var(--bp-brand); opacity: 1; }
.bp-line polyline { fill: none; stroke: var(--bp-brand); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.bp-line-fill { fill: rgba(249, 115, 22, .10); }

/* Téléphone collecteur */
.bp-device { display: flex; align-items: center; gap: .75rem; margin-top: .9rem; }
.bp-device strong { font-weight: 500; }
.bp-dot { width: .6rem; height: .6rem; border-radius: 50%; flex: none; }
.bp-dot-ok { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .14); }
.bp-dot-bad { background: #f43f5e; box-shadow: 0 0 0 4px rgba(244, 63, 94, .14); }
.bp-kv { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1rem; margin-top: 1.1rem; }
.bp-kv dd { font-weight: 400; margin-top: .15rem; color: var(--bp-ink-soft); display: flex; align-items: center; gap: .3rem; }
.bp-ok-ico { color: #22c55e; }
.bp-bad-ico { color: #f43f5e; }

/* Dossiers */
.bp-section-head { display: flex; align-items: center; gap: .6rem; margin: .1rem .3rem .8rem; }
.bp-section-title { color: var(--bp-ink-soft); }
.bp-count { min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: 999px; display: grid; place-items: center; background: var(--bp-brand-soft); color: var(--bp-brand-strong); font-size: .72rem; font-weight: 500; }
.dark .bp-count { color: #fdba74; }
.bp-link { margin-left: auto; font-size: .78rem; font-weight: 450; padding: .4rem .75rem; border-radius: 10px; background: var(--bp-card); border: 1px solid var(--bp-border); color: var(--bp-ink-soft); text-decoration: none; }
.bp-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.bp-case { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem; text-decoration: none; min-height: 120px; transition: transform .2s; }
.bp-case:hover { transform: translateY(-2px); }
.bp-case strong { font-size: 1.3rem; font-weight: 300; letter-spacing: -.02em; margin-top: auto; }
.bp-case-type { align-self: flex-start; font-size: .68rem; font-weight: 500; padding: .2rem .5rem; border-radius: 7px; background: var(--bp-brand-soft); color: var(--bp-brand-strong); }
.dark .bp-case-type { color: #fdba74; }
.bp-card.bp-empty { padding: 1.1rem 1.5rem; height: auto; font-size: .88rem; }

.bp-period { display: flex; flex-direction: column; justify-content: center; }

/* Bloc « Exploitation » : sans double carte autour des indicateurs */
.fi-wi-stats-overview .fi-section {
    background: transparent !important; box-shadow: none !important; border: 0 !important; backdrop-filter: none !important;
}
.fi-wi-stats-overview .fi-section-header-heading {
    font-size: .7rem !important; font-weight: 500 !important; letter-spacing: .08em; text-transform: uppercase; color: var(--bp-ink-soft) !important;
}

@media (max-width: 640px) {
    .bp-hero-actions { grid-template-columns: 1fr 1fr; }
}

/* Logo : pastille « B » + nom (masqué quand le menu est replié) */
.bp-brand { display: inline-flex; align-items: center; gap: .6rem; height: 2rem; }
.bp-brand-mark {
    width: 2rem; height: 2rem; border-radius: 10px; display: grid; place-items: center; flex: none;
    background: linear-gradient(135deg, #fb923c, #f97316 55%, #fb7185); color: #fff;
    font-weight: 600; font-size: 1rem; letter-spacing: -.02em; box-shadow: 0 6px 14px -8px rgba(249, 115, 22, .9);
}
.bp-brand-text { font-size: 1.15rem; font-weight: 500; letter-spacing: -.02em; color: var(--bp-ink); white-space: nowrap; }

/* Barre du haut : fond flouté pour que le contenu ne passe plus sous le logo au défilement */
.fi-topbar {
    background: color-mix(in srgb, var(--bp-bg) 78%, transparent) !important;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--bp-border);
}
.fi-topbar > nav { background: transparent !important; }
