@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary:      #348E38;
    --primary-dark: #0F4229;
    --secondary:    #C68E17;
    --sand:         #F5F1E8;
    --dark:         #2C2C2C;
    --sidebar-w:    260px;
}

body { font-family: 'Poppins', sans-serif; background: #f4f6f9; color: var(--dark); }

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.admin-sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--primary-dark);
    position: fixed;
    top: 0; left: 0;
    z-index: 200;
    padding-top: 1rem;
    transition: transform .25s ease;
    overflow-y: auto;
}
.admin-sidebar .sidebar-brand {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: .5rem;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
}
.admin-sidebar .sidebar-brand img { max-height: 40px; }

/* Labels de section */
.sidebar-section-label {
    padding: .5rem 1.5rem .25rem;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.35);
    font-weight: 600;
    margin-top: .5rem;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,.75);
    padding: .55rem 1.5rem;
    font-size: .875rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    transition: .2s;
    border-left: 3px solid transparent;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.08);
    border-left-color: var(--secondary);
}
.admin-sidebar .nav-link i { width: 18px; text-align: center; flex-shrink: 0; }

/* ── Overlay mobile ─────────────────────────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 199;
    transition: opacity .25s;
}
.sidebar-overlay.show { display: block; }

/* ── Main content ───────────────────────────────────────────────────────── */
.admin-main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
}
.admin-topbar {
    background: #fff;
    padding: .85rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.admin-content { padding: 2rem 1.5rem; }

/* ── KPI Cards ──────────────────────────────────────────────────────────── */
.kpi-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}
.kpi-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.10); }
.kpi-card .kpi-value { font-size: 2rem; font-weight: 700; color: var(--primary); }
.kpi-card .kpi-label { font-size: .85rem; color: #6c757d; }
.kpi-card i { font-size: 2rem; opacity: .2; }

/* ── Cards admin ────────────────────────────────────────────────────────── */
.admin-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    overflow: hidden;
}
.admin-card .card-header {
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table th { font-weight: 600; font-size: .85rem; background: #f8f9fa; }
.table td { font-size: .875rem; vertical-align: middle; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge-unread { background: #dc3545; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-control, .form-select {
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: .875rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(52,142,56,.2);
}

/* ── Gallery grid ───────────────────────────────────────────────────────── */
.gallery-item:hover .gallery-item-actions { opacity: 1; }
.gallery-item-actions { opacity: 0; transition: opacity .2s; }

/* ── Rapport card ───────────────────────────────────────────────────────── */
.rapport-card { border-radius: 8px; }

/* ── Responsive (≤ 992px) ───────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.show {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,.25);
    }
    .admin-main {
        margin-left: 0;
    }
}

/* Bouton hamburger visible seulement en mobile */
#sidebarToggle { display: none; }
@media (max-width: 991.98px) {
    #sidebarToggle { display: inline-flex; }
}
