/* ===========================================================
   Brochage 3000 — Design system 2026 (premium)
   =========================================================== */
:root {
    --b-bg: #f5f6f8;
    --b-bg-2: #eef0f3;
    --b-surface: #ffffff;
    --b-surface-2: #fafbfc;
    --b-ink: #0f1115;
    --b-ink-soft: #424955;
    --b-muted: #8b919d;
    --b-faint: #b9bec8;
    --b-border: #ebedf1;
    --b-border-strong: #dde0e6;

    --b-primary: #e6007e;
    --b-primary-600: #cc0070;
    --b-primary-50: #fff0f8;
    --b-primary-grad: linear-gradient(135deg, #ff3ba3 0%, #e6007e 55%, #a81f8f 100%);

    --b-success: #15a34a; --b-success-bg: #e6f7ec;
    --b-info: #2563eb;    --b-info-bg: #e8f0fe;
    --b-warning: #d97706; --b-warning-bg: #fff3e0;
    --b-danger: #dc2626;  --b-danger-bg: #fdecec;

    /* sidebar (dark) */
    --b-side-bg: #0e0f14;
    --b-side-bg-2: #15171e;
    --b-side-ink: #c4c8d2;
    --b-side-muted: #6c7280;
    --b-side-border: #20232c;

    --b-radius: 18px;
    --b-radius-sm: 12px;
    --b-radius-xs: 9px;
    --b-pill: 999px;

    --b-shadow-xs: 0 1px 2px rgba(15,17,21,.04);
    --b-shadow-sm: 0 1px 2px rgba(15,17,21,.04), 0 4px 10px -4px rgba(15,17,21,.06);
    --b-shadow-md: 0 8px 24px -8px rgba(15,17,21,.12), 0 2px 6px -2px rgba(15,17,21,.06);
    --b-shadow-lg: 0 24px 60px -16px rgba(15,17,21,.28);

    --b-sidebar-w: 270px;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: rgba(230,0,126,.18); }

body {
    font-family: var(--bs-body-font-family);
    background: var(--b-bg);
    color: var(--b-ink);
    letter-spacing: -0.012em;
}

/* ---------- Sidebar (dark, premium) ---------- */
.b3000-sidebar {
    width: var(--b-sidebar-w); min-height: 100vh;
    background: linear-gradient(180deg, var(--b-side-bg-2) 0%, var(--b-side-bg) 100%);
    border-right: 1px solid var(--b-side-border);
    position: fixed; top: 0; left: 0; z-index: 1030;
    display: flex; flex-direction: column; padding: 16px 14px 12px;
}
.b3000-brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 18px; font-weight: 700; font-size: 1.05rem; color: #fff; letter-spacing: -0.02em; }
.b3000-brand .logo {
    width: 40px; height: 40px; border-radius: 13px; background: var(--b-primary-grad);
    color: #fff; font-weight: 800; font-size: 1.15rem;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px -6px rgba(230,0,126,.7), inset 0 1px 0 rgba(255,255,255,.25);
}
.b3000-brand .sub { display: block; font-size: .68rem; font-weight: 500; color: var(--b-side-muted); letter-spacing: .02em; margin-top: 2px; }

.b3000-nav { gap: 1px; }
.b3000-nav .nav-section { font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--b-side-muted); padding: 16px 12px 6px; }
.b3000-nav .nav-link {
    color: var(--b-side-ink); border-radius: 11px; padding: .56rem .72rem; margin: 1px 0;
    display: flex; align-items: center; gap: .72rem; font-weight: 500; font-size: .92rem;
    position: relative; transition: background .15s ease, color .15s ease, transform .1s ease;
}
.b3000-nav .nav-link i { font-size: 1.06rem; color: var(--b-side-muted); width: 20px; text-align: center; transition: color .15s ease; }
.b3000-nav .nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.b3000-nav .nav-link:hover i { color: var(--b-side-ink); }
.b3000-nav .nav-link:active { transform: translateY(1px); }
.b3000-nav .nav-link.active {
    background: linear-gradient(135deg, rgba(230,0,126,.22), rgba(230,0,126,.08));
    color: #fff; font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(230,0,126,.25);
}
.b3000-nav .nav-link.active i { color: #ff5fb0; }
.b3000-nav .nav-link.active::before {
    content: ''; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--b-primary);
}

.b3000-user { margin-top: auto; border-top: 1px solid var(--b-side-border); padding: 12px 6px 4px; display: flex; align-items: center; gap: .7rem; }
.b3000-user .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--b-primary-grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; box-shadow: 0 4px 12px -3px rgba(230,0,126,.6); }
.b3000-user .fw-semibold { color: #fff; }
.b3000-user a { color: var(--b-side-muted); text-decoration: none; font-size: .8rem; }
.b3000-user a:hover { color: #ff5fb0; }

/* ---------- Main ---------- */
.b3000-main { margin-left: var(--b-sidebar-w); padding: 30px 40px 56px; max-width: 1340px; }
.page-title { font-size: 1.78rem; font-weight: 700; letter-spacing: -0.035em; margin: 0; }
.page-sub { color: var(--b-muted); font-size: .92rem; margin-top: 2px; }

/* search field */
.b-search { position: relative; }
.b-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--b-faint); font-size: .95rem; }
.b-search .form-control { padding-left: 36px; min-width: 240px; }

/* segmented control */
.b-seg { display: inline-flex; background: var(--b-bg-2); border: 1px solid var(--b-border); border-radius: var(--b-radius-sm); padding: 3px; gap: 2px; }
.b-seg a { padding: .34rem .7rem; border-radius: 9px; font-size: .82rem; font-weight: 600; color: var(--b-ink-soft); text-decoration: none; transition: all .14s ease; }
.b-seg a:hover { color: var(--b-ink); }
.b-seg a.active { background: var(--b-surface); color: var(--b-primary-600); box-shadow: var(--b-shadow-xs); }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--b-border); border-radius: var(--b-radius); box-shadow: var(--b-shadow-sm); background: var(--b-surface); }
.card.shadow-sm { box-shadow: var(--b-shadow-sm) !important; }
.card .card-body { padding: 1.3rem 1.4rem; }

.b-stat { border-radius: var(--b-radius); border: 1px solid var(--b-border); background: var(--b-surface); padding: 1.15rem 1.3rem; box-shadow: var(--b-shadow-xs); position: relative; overflow: hidden; transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s ease; }
.b-stat::after { content: ''; position: absolute; right: -30px; bottom: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(230,0,126,.05), transparent 70%); }
.b-stat:hover { transform: translateY(-3px); box-shadow: var(--b-shadow-md); }
.b-stat .label { color: var(--b-muted); font-size: .8rem; font-weight: 500; }
.b-stat .value { font-size: 1.95rem; font-weight: 700; letter-spacing: -0.035em; margin-top: 3px; line-height: 1.1; }
.b-stat .ico { position: absolute; right: 16px; top: 16px; width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--b-primary-50); color: var(--b-primary); font-size: 1.1rem; }

/* ---------- Buttons ---------- */
.btn { border-radius: var(--b-radius-sm); font-weight: 600; font-size: .9rem; padding: .52rem 1rem; transition: all .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-magenta, .btn-primary { background: var(--b-primary-grad); border: none; color: #fff; box-shadow: 0 10px 22px -10px rgba(230,0,126,.75), inset 0 1px 0 rgba(255,255,255,.2); }
.btn-magenta:hover, .btn-primary:hover { color: #fff; filter: brightness(1.05); box-shadow: 0 12px 26px -10px rgba(230,0,126,.85); }
.btn-outline-secondary { border-color: var(--b-border-strong); color: var(--b-ink-soft); background: var(--b-surface); }
.btn-outline-secondary:hover { background: var(--b-bg-2); color: var(--b-ink); border-color: var(--b-border-strong); }
.btn-outline-primary { border-color: var(--b-primary); color: var(--b-primary); }
.btn-outline-primary:hover { background: var(--b-primary); color: #fff; }
.btn-success { background: var(--b-success); border: none; box-shadow: 0 10px 20px -10px rgba(21,163,74,.7); }
.btn-success:hover { background: #128a3f; }
.btn-outline-danger { border-color: #f0b9b9; color: var(--b-danger); }
.btn-outline-danger:hover { background: var(--b-danger); border-color: var(--b-danger); }
.btn-dark { background: var(--b-ink); border: none; }
.btn-sm { padding: .36rem .64rem; font-size: .82rem; border-radius: 9px; }
.text-magenta { color: var(--b-primary) !important; }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: .82rem; color: var(--b-ink-soft); margin-bottom: .35rem; }
.form-control, .form-select { border-radius: var(--b-radius-sm); border: 1px solid var(--b-border-strong); padding: .58rem .85rem; font-size: .92rem; background: var(--b-surface); color: var(--b-ink); transition: border-color .15s ease, box-shadow .15s ease; }
.form-control:hover, .form-select:hover { border-color: var(--b-faint); }
.form-control:focus, .form-select:focus { border-color: var(--b-primary); box-shadow: 0 0 0 4px rgba(230,0,126,.12); }
.form-control::placeholder { color: #bcc1cb; }
.input-group-text { border-radius: var(--b-radius-sm); border: 1px solid var(--b-border-strong); background: var(--b-surface-2); color: var(--b-muted); }
.form-check-input { border-color: var(--b-border-strong); }
.form-check-input:checked { background-color: var(--b-primary); border-color: var(--b-primary); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(230,0,126,.12); border-color: var(--b-primary); }

/* ---------- Tables & lists ---------- */
.card .table { margin: 0; }
.table { color: var(--b-ink-soft); border-color: var(--b-border); }
.table > thead th { background: var(--b-surface-2); color: var(--b-muted); font-weight: 600; font-size: .73rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--b-border); padding: .85rem 1.1rem; }
.table > tbody > tr { transition: background .12s ease; }
.table > tbody > tr:hover { background: var(--b-primary-50); }
.table > tbody td { padding: .9rem 1.1rem; border-color: var(--b-border); vertical-align: middle; }
.table-responsive { border-radius: var(--b-radius); }

.list-group-item { border-color: var(--b-border); padding: 1rem 1.3rem; transition: background .12s ease; }
.list-group-item.list-row:hover, a.list-group-item-action:hover { background: var(--b-primary-50); }

/* ---------- Badges (soft pills with dot) ---------- */
.badge { font-weight: 600; border-radius: var(--b-pill); padding: .38em .72em; letter-spacing: .01em; display: inline-flex; align-items: center; gap: .4em; }
.badge.has-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.text-bg-secondary { background: #eef0f3 !important; color: #5b6270 !important; }
.badge.text-bg-info { background: var(--b-info-bg) !important; color: #1d4ed8 !important; }
.badge.text-bg-primary { background: var(--b-primary-50) !important; color: var(--b-primary-600) !important; }
.badge.text-bg-warning { background: var(--b-warning-bg) !important; color: #b45309 !important; }
.badge.text-bg-success { background: var(--b-success-bg) !important; color: #15803d !important; }
.badge.text-bg-danger  { background: var(--b-danger-bg) !important; color: #c01f1f !important; }
.badge.text-bg-light { background: var(--b-bg-2) !important; color: var(--b-ink-soft) !important; border: 1px solid var(--b-border); }
.badge-statut { font-size: .7rem; }

/* ---------- Modal / toasts ---------- */
.modal-content { border: none; border-radius: var(--b-radius); box-shadow: var(--b-shadow-lg); }
.modal-header, .modal-footer { border-color: var(--b-border); }
.modal-header { padding: 1.15rem 1.4rem; }
.modal-title { font-weight: 700; letter-spacing: -0.02em; }
.toast { border-radius: 14px; box-shadow: var(--b-shadow-lg); border: none; }
.toast.text-bg-dark { background: #0f1115 !important; }
.toast.text-bg-success { background: var(--b-success) !important; }
.toast.text-bg-danger { background: var(--b-danger) !important; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-aside { position: relative; overflow: hidden; color: #fff; background: var(--b-side-bg); padding: 56px 60px; display: flex; flex-direction: column; justify-content: space-between; }
.login-aside .mesh { position: absolute; inset: 0; background: radial-gradient(640px 380px at 78% 8%, rgba(230,0,126,.55), transparent 60%), radial-gradient(520px 360px at 8% 100%, rgba(120,40,200,.45), transparent 55%), radial-gradient(420px 300px at 100% 100%, rgba(255,90,160,.30), transparent 60%); animation: meshFloat 14s ease-in-out infinite alternate; }
.login-aside .grain { position: absolute; inset: 0; opacity: .5; background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px); background-size: 22px 22px; }
@keyframes meshFloat { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-18px,-10px,0) scale(1.06); } }
.login-aside .la-brand { position: relative; display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.15rem; }
.login-aside .la-brand .logo { width: 44px; height: 44px; border-radius: 14px; background: var(--b-primary-grad); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; box-shadow: 0 8px 22px -6px rgba(230,0,126,.7); }
.login-aside .la-hero { position: relative; }
.login-aside .la-hero h2 { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.045em; line-height: 1.06; margin-bottom: 16px; }
.login-aside .la-hero p { font-size: 1.04rem; color: rgba(255,255,255,.78); max-width: 400px; }
.login-aside .la-list { position: relative; margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.login-aside .la-list span { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.85); font-size: .95rem; }
.login-aside .la-list i { color: #ff7bbf; }
.login-aside .la-foot { position: relative; font-size: .82rem; color: rgba(255,255,255,.55); }
.login-form-side { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--b-surface); }
.login-card { width: 100%; max-width: 392px; }
.login-card h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; }
.quick-btn { border: 1px solid var(--b-border-strong); background: var(--b-surface); border-radius: var(--b-radius-sm); padding: .58rem; font-weight: 600; font-size: .85rem; color: var(--b-ink-soft); transition: all .15s ease; }
.quick-btn:hover { border-color: var(--b-primary); color: var(--b-primary); background: var(--b-primary-50); transform: translateY(-1px); }

/* ---------- Mobile : barre du haut + tiroir ---------- */
.b3000-topbar { display: none; }
.b3000-burger { display: none; }
.b3000-backdrop { display: none; }

@media (max-width: 992px) {
    .login-wrap { grid-template-columns: 1fr; }
    .login-aside { display: none; }

    /* Barre du haut fixe */
    .b3000-topbar {
        display: flex; align-items: center; gap: 12px;
        position: fixed; top: 0; left: 0; right: 0; height: 58px; z-index: 1035;
        padding: 0 14px; background: rgba(14,15,20,.92);
        backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
        border-bottom: 1px solid var(--b-side-border);
    }
    .b3000-burger {
        display: inline-flex; align-items: center; justify-content: center;
        width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--b-side-border);
        background: rgba(255,255,255,.06); color: #fff; font-size: 1.25rem;
    }
    .b3000-burger:active { transform: scale(.95); }
    .b3000-topbrand { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 700; letter-spacing: -0.02em; }
    .b3000-topbrand .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--b-primary-grad); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem; box-shadow: 0 4px 12px -4px rgba(230,0,126,.6); }

    /* Sidebar → tiroir coulissant */
    .b3000-sidebar {
        transform: translateX(-100%);
        transition: transform .28s cubic-bezier(.2,.7,.3,1);
        box-shadow: var(--b-shadow-lg); width: 280px;
    }
    body.nav-open .b3000-sidebar { transform: translateX(0); }

    /* Voile */
    .b3000-backdrop {
        position: fixed; inset: 0; z-index: 1031;
        background: rgba(10,11,15,.5); backdrop-filter: blur(2px);
        opacity: 0; pointer-events: none; transition: opacity .25s ease;
    }
    body.nav-open .b3000-backdrop { display: block; opacity: 1; pointer-events: auto; }
    body.nav-open { overflow: hidden; }

    /* Contenu pleine largeur sous la barre */
    .b3000-main { margin-left: 0; padding: 76px 16px 40px; max-width: 100%; }
    .page-title { font-size: 1.4rem; }
    .page-head { gap: 10px; }
    .page-head .b-search .form-control { min-width: 0; }
}

@media (max-width: 576px) {
    .b3000-main { padding: 74px 12px 36px; }
    .b-stat .value { font-size: 1.5rem; }
    .b-stat .ico { display: none; }
    .b-devis-hero { padding: 1.2rem 1.2rem; }
    .b-devis-hero .grand { font-size: 1.5rem; }
    .page-head { flex-direction: column; align-items: stretch; }
    .page-head .d-flex { width: 100%; }
    .page-head .b-search, .page-head .b-search .form-control { width: 100%; }
    .modal-dialog { margin: .5rem; }
    /* listes : actions et montants repassent sous le contenu proprement */
    .list-group-item.list-row { flex-wrap: wrap; }
}

a.card, .hover-lift { transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s ease; }
a.card:hover, .hover-lift:hover { transform: translateY(-3px); box-shadow: var(--b-shadow-md); }

/* page enter animation */
.b3000-main > * { animation: fadeUp .4s cubic-bezier(.2,.7,.3,1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===== Page content helpers ===== */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }

/* card with header bar */
.b-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 1rem 1.4rem; border-bottom: 1px solid var(--b-border); }
.b-card-head h6 { margin: 0; font-weight: 600; font-size: .95rem; letter-spacing: -0.01em; }
.b-card-head .count { font-size: .75rem; font-weight: 600; color: var(--b-muted); background: var(--b-bg-2); padding: .2em .6em; border-radius: var(--b-pill); }

/* section title inside cards/forms */
.b-section { display: flex; align-items: center; gap: 10px; margin-bottom: 1.1rem; }
.b-section .ic { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--b-primary-50); color: var(--b-primary); font-size: 1rem; flex: none; }
.b-section h6 { margin: 0; font-weight: 600; font-size: .98rem; letter-spacing: -0.01em; }
.b-section small { display: block; color: var(--b-muted); font-weight: 400; font-size: .78rem; }

/* avatar initials (neutral) */
.b-avatar { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .92rem; flex: none; background: linear-gradient(135deg,#f3f4f7,#e9ebf0); color: var(--b-ink-soft); border: 1px solid var(--b-border); }
.b-avatar.tint { background: var(--b-primary-50); color: var(--b-primary-600); border-color: #fbd6ea; }

/* key-value list */
.b-kv { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.2rem; font-size: .9rem; }
.b-kv dt { color: var(--b-muted); font-weight: 500; }
.b-kv dd { margin: 0; color: var(--b-ink); text-align: right; font-weight: 500; }

/* totals panel */
.b-totals { display: flex; flex-direction: column; gap: .55rem; }
.b-totals .row-t { display: flex; justify-content: space-between; align-items: baseline; font-size: .92rem; }
.b-totals .row-t .lbl { color: var(--b-muted); }
.b-totals .row-t .val { font-variant-numeric: tabular-nums; font-weight: 600; }
.b-totals .row-t.sub { padding-top: .55rem; border-top: 1px dashed var(--b-border); }
.b-totals .row-t.grand .lbl { color: var(--b-ink); font-weight: 700; }
.b-totals .row-t.grand .val { color: var(--b-primary); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; }
.b-amount { font-variant-numeric: tabular-nums; }

/* empty state */
.b-empty { text-align: center; padding: 56px 20px; color: var(--b-muted); }
.b-empty .ic { width: 64px; height: 64px; border-radius: 18px; background: var(--b-bg-2); display: inline-flex; align-items: center; justify-content: center; font-size: 1.7rem; color: var(--b-faint); margin-bottom: 14px; }
.b-empty h6 { color: var(--b-ink-soft); font-weight: 600; }

/* meta line with dot separators */
.b-meta { color: var(--b-muted); font-size: .82rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.b-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--b-faint); }

/* form card */
.form-card { max-width: 760px; }
.row-actions { display: flex; gap: .4rem; justify-content: flex-end; }

/* icon button (square) */
.btn-icon { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* invoice header strip on devis show */
.b-devis-hero { background: linear-gradient(135deg, #14161c 0%, #1d2029 100%); color: #fff; border-radius: var(--b-radius); padding: 1.5rem 1.7rem; position: relative; overflow: hidden; }
.b-devis-hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(230,0,126,.35), transparent 70%); }
.b-devis-hero .num { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.03em; }
.b-devis-hero .proj { color: rgba(255,255,255,.7); }
.b-devis-hero .grand { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; }

/* ===========================================================
   Couche d'animations 2026 — fluide & globale
   =========================================================== */

/* Easing maison */
:root { --b-ease: cubic-bezier(.22,.61,.36,1); --b-spring: cubic-bezier(.34,1.56,.64,1); }

/* Entrée de page : conteneur */
.b3000-main { animation: pageIn .45s var(--b-ease) both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

/* Entrée en cascade des blocs principaux */
.b3000-main > .page-head { animation: fadeUp .5s var(--b-ease) both; }
.b3000-main > .row > [class*="col"],
.b3000-main > .card,
.b3000-main > form > .card,
.b3000-main .b-stat { animation: fadeUp .5s var(--b-ease) both; }

/* Cascade sur les cartes/colonnes */
.b3000-main .row > [class*="col"]:nth-child(1) { animation-delay: .03s; }
.b3000-main .row > [class*="col"]:nth-child(2) { animation-delay: .08s; }
.b3000-main .row > [class*="col"]:nth-child(3) { animation-delay: .13s; }
.b3000-main .row > [class*="col"]:nth-child(4) { animation-delay: .18s; }

/* Cascade sur les lignes de liste et de tableau */
.list-group-item, .card .table > tbody > tr { animation: rowIn .42s var(--b-ease) both; }
.list-group-item:nth-child(1), tbody tr:nth-child(1) { animation-delay: .02s; }
.list-group-item:nth-child(2), tbody tr:nth-child(2) { animation-delay: .05s; }
.list-group-item:nth-child(3), tbody tr:nth-child(3) { animation-delay: .08s; }
.list-group-item:nth-child(4), tbody tr:nth-child(4) { animation-delay: .11s; }
.list-group-item:nth-child(5), tbody tr:nth-child(5) { animation-delay: .14s; }
.list-group-item:nth-child(6), tbody tr:nth-child(6) { animation-delay: .17s; }
.list-group-item:nth-child(7), tbody tr:nth-child(7) { animation-delay: .20s; }
.list-group-item:nth-child(8), tbody tr:nth-child(8) { animation-delay: .23s; }
.list-group-item:nth-child(n+9), tbody tr:nth-child(n+9) { animation-delay: .26s; }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Liens de nav : translation douce au survol */
.b3000-nav .nav-link { transition: background .18s var(--b-ease), color .18s var(--b-ease), transform .18s var(--b-ease), padding-left .18s var(--b-ease); }
.b3000-nav .nav-link:hover { padding-left: .95rem; }

/* Boutons : ressort léger */
.btn { transition: transform .14s var(--b-spring), box-shadow .18s var(--b-ease), filter .18s var(--b-ease), background .18s var(--b-ease); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.99); }

/* Cartes stat / hover-lift : survol fluide */
.b-stat, a.card, .hover-lift, .card { transition: transform .2s var(--b-ease), box-shadow .2s var(--b-ease); }

/* Modale : zoom + fondu */
.modal.fade .modal-dialog { transform: scale(.95) translateY(12px); opacity: 0; transition: transform .3s var(--b-spring), opacity .25s var(--b-ease); }
.modal.show .modal-dialog { transform: none; opacity: 1; }
.modal-backdrop.show { transition: opacity .25s var(--b-ease); }

/* Contenu de modale rechargé en AJAX : léger fondu */
#appModalContent { animation: fadeUp .3s var(--b-ease) both; }

/* Toasts : glissent depuis la droite */
.toast.show { animation: toastIn .4s var(--b-spring) both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px) scale(.96); } to { opacity: 1; transform: none; } }

/* Champs : focus plus vivant */
.form-control, .form-select { transition: border-color .18s var(--b-ease), box-shadow .2s var(--b-ease), background .18s var(--b-ease); }

/* Badges au survol d'une ligne : léger pop */
tbody tr:hover .badge, .list-group-item:hover .badge { transition: transform .18s var(--b-spring); }

/* Spinner de chargement modale */
.spinner-border { animation-duration: .8s; }

/* Carte Leaflet : coins arrondis cohérents */
.leaflet-container { border-radius: 14px; font-family: var(--bs-body-font-family); }

/* Respecte la préférence « moins d'animations » */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
