/* ══════════════════════════════════════════════════════════════
   Gestion des Frais – Feuille de style principale
   ══════════════════════════════════════════════════════════════ */

:root {
    --sidebar-width: 260px;
    --sidebar-bg: #1a1d23;
    --sidebar-hover: rgba(255,255,255,.07);
    --sidebar-active: rgba(13,110,253,.25);
    --brand-primary: #0d6efd;
}

/* ── Layout ──────────────────────────────────────────────────── */
body {
    font-size: .9rem;
    background: #f5f6fa;
    min-height: 100vh;
}

#wrapper {
    min-height: 100vh;
}

#sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transition: width .25s ease;
    z-index: 100;
}

#page-content {
    min-height: 100vh;
    background: #f5f6fa;
}

/* ── Sidebar nav ─────────────────────────────────────────────── */
.sidebar-brand {
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

#sidebar .nav-link {
    color: rgba(255,255,255,.7);
    border-radius: 8px;
    padding: .5rem .75rem;
    margin-bottom: 2px;
    font-size: .875rem;
    transition: background .15s, color .15s;
}

#sidebar .nav-link:hover {
    color: #fff;
    background: var(--sidebar-hover);
}

#sidebar .nav-link.active {
    color: #fff;
    background: var(--sidebar-active);
    font-weight: 600;
}

#sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

.nav-label {
    display: block;
    padding: .25rem .75rem;
    font-size: .7rem;
    letter-spacing: .08em;
}

/* ── Avatar sidebar ──────────────────────────────────────────── */
.sidebar-footer {
    border-color: rgba(255,255,255,.1) !important;
}

.avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .875rem;
    flex-shrink: 0;
}

/* ── Cartes statistiques ─────────────────────────────────────── */
.stat-card .card-body {
    padding: 1.25rem;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ── Login ───────────────────────────────────────────────────── */
.login-page {
    background: linear-gradient(135deg, #0d1b2a 0%, #1a3a5c 100%);
}

.login-card {
    width: 420px;
    max-width: 100%;
    border-radius: 16px;
    border: none;
}

.login-logo i {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Drop zone upload ────────────────────────────────────────── */
.drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--brand-primary);
    background: rgba(13,110,253,.04);
}

/* ── Lignes de tableau cliquables ────────────────────────────── */
.cursor-pointer {
    cursor: pointer;
}

/* ── Dot catégorie ───────────────────────────────────────────── */
.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

/* ── Badges & utilitaires ────────────────────────────────────── */
.btn-xs {
    padding: .15rem .4rem;
    font-size: .75rem;
}

.alert-success-subtle {
    background: rgba(25,135,84,.08);
}

/* ── Tables ──────────────────────────────────────────────────── */
.table > :not(caption) > * > * {
    padding: .6rem .75rem;
}

.table-hover tbody tr:hover {
    background: rgba(13,110,253,.04);
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
    border-radius: 12px;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
}

/* ── Responsive sidebar (mobile) ─────────────────────────────── */
@media (max-width: 991.98px) {
    #sidebar {
        position: fixed;
        left: calc(var(--sidebar-width) * -1);
        transition: left .25s ease;
        height: 100vh;
        z-index: 1050;
    }

    #sidebar.show {
        left: 0;
        box-shadow: 4px 0 20px rgba(0,0,0,.4);
    }

    #page-content {
        width: 100%;
    }
}

/* ── Impression ──────────────────────────────────────────────── */
@media print {
    #sidebar, .navbar, .btn, form { display: none !important; }
    #page-content { width: 100% !important; }
}

/* ── Scrollbar personnalisée (sidebar) ───────────────────────── */
#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-track { background: transparent; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }

/* ── Animations ──────────────────────────────────────────────── */
.card {
    animation: fadeIn .25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
