.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.75rem 1rem;
}

.sidebar .nav-link.active {
    color: #007bff;
}

.sidebar .nav-link:hover {
    color: #007bff;
}

main {
    margin-top: 56px;
}

.risk-matrix {
    max-width: 600px;
    margin: 0 auto;
}

.kri-card {
    border-left: 4px solid #007bff;
}

.kri-card.critical {
    border-left-color: #dc3545;
}

.kri-card.warning {
    border-left-color: #ffc107;
}

.kri-card.normal {
    border-left-color: #28a745;
}

.stat-card {
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.matrix-cell {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    font-weight: bold;
}

.matrix-low { background-color: #d4edda; }
.matrix-medium { background-color: #fff3cd; }
.matrix-high { background-color: #f8d7da; }
.matrix-critical { background-color: #dc3545; color: white; }
/* Styles personnalisés pour l'application de contrôle interne */

.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.75rem 1rem;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
    color: #007bff;
    background-color: #f8f9fa;
    border-left-color: #007bff;
}

.sidebar .nav-link.active {
    color: #007bff;
    border-left-color: #007bff;
    background-color: #f8f9fa;
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
}

main {
    margin-top: 56px;
}

/* Cartes de statistiques */
.stat-card {
    transition: transform 0.2s;
    border-left: 4px solid !important;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.border-left-primary { border-left-color: #007bff !important; }
.border-left-success { border-left-color: #28a745 !important; }
.border-left-info { border-left-color: #17a2b8 !important; }
.border-left-warning { border-left-color: #ffc107 !important; }

/* Indicateurs KRI */
.kri-card {
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.kri-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.kri-card.critical { border-left-color: #dc3545; }
.kri-card.warning { border-left-color: #ffc107; }
.kri-card.normal { border-left-color: #28a745; }

/* Processus */
.process-steps {
    max-height: 200px;
    overflow-y: auto;
}

.step-item {
    padding: 8px 12px;
    border-left: 3px solid #007bff;
    background-color: #f8f9fa;
    margin-bottom: 5px;
    border-radius: 0 4px 4px 0;
}

.step-number {
    font-size: 0.8em;
    min-width: 25px;
    text-align: center;
}

.step-name {
    font-size: 0.9em;
}

/* Matrice des risques */
.risk-matrix {
    max-width: 600px;
    margin: 0 auto;
}

.matrix-cell {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    font-weight: bold;
    font-size: 0.8em;
}

.matrix-low { background-color: #d4edda; }
.matrix-medium { background-color: #fff3cd; }
.matrix-high { background-color: #f8d7da; }
.matrix-critical { background-color: #dc3545; color: white; }

/* Tableaux */
.table-responsive {
    max-height: 600px;
}

/* Badges personnalisés */
.badge-risk-low { background-color: #28a745; }
.badge-risk-medium { background-color: #ffc107; color: #212529; }
.badge-risk-high { background-color: #fd7e14; }
.badge-risk-critical { background-color: #dc3545; }

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: static;
        height: auto;
        padding-top: 0;
    }
    
    main {
        margin-top: 0;
    }
    
    .sidebar .nav-link {
        padding: 0.5rem 1rem;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Jumbotron personnalisé */
.jumbotron {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.jumbotron .display-4 {
    font-weight: 300;
}

/* Cards avec ombres */
.card {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.card-header {
    font-weight: 600;
}

/* Footer */
.footer {
    border-top: 1px solid #dee2e6;
}
/* static/css/style.css */

/* Variables CSS complémentaires */
:root {
    --transition-speed: 0.3s;
    --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
}

/* Classes utilitaires */
.animate__slideInRight {
    animation: slideInRight 0.5s var(--transition-timing);
}

.animate__slideInLeft {
    animation: slideInLeft 0.5s var(--transition-timing);
}

.animate__pulse-glow {
    animation: pulse-glow 2s infinite;
}

/* Glass effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Loading states */
.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Card hover effects */
.card-hover-lift {
    transition: transform var(--transition-speed) var(--transition-timing),
                box-shadow var(--transition-speed) var(--transition-timing);
}

.card-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Gradient text */
.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.online {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-indicator.offline {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.status-indicator.busy {
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

/* Responsive helpers */
@media (max-width: 768px) {
    .mobile-hide {
        display: none !important;
    }
    
    .mobile-show {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .desktop-hide {
        display: none !important;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card-modern {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}