:root {
    --primary-color: #415168;
    --primary-hover: rgba(65, 81, 104, 0.1);
    --primary-dark: #344154;
    --sidebar-width: 250px;
}

/* --- STRUCTURE DESKTOP --- */
@media (min-width: 768px) {
    #sidebar {
        min-height: calc(100vh - 56px);
        position: fixed;
        top: 56px;
        left: 0;
        width: var(--sidebar-width);
        z-index: 100;
        overflow-y: auto;
        box-shadow: 1px 0 5px rgba(0,0,0,0.1);
        background-color: #f8f9fa;
        transition: transform 0.3s ease;
    }
    main {
        margin-left: var(--sidebar-width);
        margin-top: 56px;
        padding: 25px;
        min-height: calc(100vh - 56px);
    }
}

/* --- STRUCTURE MOBILE (Améliorée pour visibilité titre) --- */
@media (max-width: 767.98px) {
    #sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        width: var(--sidebar-width);
        height: 100%;
        z-index: 1050; /* Doit être au dessus de la navbar pour le menu */
        background-color: #f8f9fa;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }
    #sidebar.show {
        transform: translateX(0);
    }
    main {
        /* On pousse le contenu pour qu'il ne soit pas caché sous la barre bleue */
        margin-top: 80px !important; 
        padding: 15px;
        margin-left: 0;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
    }
    .sidebar-overlay.show {
        display: block;
    }
}

/* --- VOS STYLES (Conservés à 100%) --- */
.navbar.bg-primary { background-color: var(--primary-color) !important; }
.nav-link { color: #495057; padding: 0.5rem 1rem; border-radius: 0.375rem; transition: all 0.2s; }
.nav-link:hover, .dropdown-item:hover { background-color: var(--primary-hover); color: var(--primary-color) !important; }
.nav-link.active { background-color: var(--primary-color) !important; color: white !important; }

.card { border: none; box-shadow: 0 0 15px rgba(0,0,0,0.05); border-radius: 0.75rem; transition: transform 0.2s; }
.card.bg-primary { background-color: var(--primary-color) !important; }
.btn-primary { background-color: var(--primary-color); border-color: var(--primary-color); }
.btn-primary:hover { background-color: var(--primary-dark); border-color: var(--primary-dark); }

.table th { font-size: 0.875rem; font-weight: 600; background-color: #ebeef1; }

.bg-danger.bg-opacity-10 { background-color: rgba(220, 53, 69, 0.1) !important; }
.bg-orange { background-color: #fd7e14 !important; color: #ffffff !important; }
.bg-orange-subtle { background-color: rgba(253, 126, 20, 0.2) !important; color: #fd7e14 !important; border: 1px solid rgba(253, 126, 20, 0.3); }
/* --- AJOUTS DANS ATELIER.CSS --- */
.bg-success-soft { 
    background-color: rgba(25, 135, 84, 0.1) !important; 
    color: #198754 !important;
    border: 1px solid rgba(25, 135, 84, 0.2);
}

.bg-danger-soft { 
    background-color: rgba(220, 53, 69, 0.1) !important; 
    color: #dc3545 !important;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Amélioration visuelle des badges de transaction */
.badge.px-3.py-2 {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }
.list-group-item.text-danger { animation: pulse 2s infinite; }