/* Variables personnalisées */
:root {
    --primary-color: #0d6efd;
    --danger-color: #dc3545;
    --success-color: #198754;
}

/* Layout de base */
body {
    min-height: 100vh;
    overflow-x: hidden;
}

main {
    flex: 1;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    background: linear-gradient(180deg, #3498db 0%, #2980b9 100%);
    padding: 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h4 {
    color: #ecf0f1;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.company-info {
    color: #bdc3c7;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav .nav-link {
    color: #bdc3c7;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 0.95rem;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: #ecf0f1;
}

.sidebar-nav .nav-link.active {
    background: rgba(236, 240, 241, 0.2);
    color: #fff;
    border-left-color: #ecf0f1;
    font-weight: 500;
}

.sidebar-nav .nav-link i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.sidebar-nav .badge {
    margin-left: auto;
    font-size: 0.75rem;
}

.sidebar-section-divider {
    margin: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.sidebar-section {
    margin-bottom: 0.5rem;
}

.sidebar-section summary.sidebar-section-title {
    padding: 0.75rem 1rem 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.25rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    position: relative;
    transition: color 0.2s ease;
}

.sidebar-section summary.sidebar-section-title:hover {
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-section summary.sidebar-section-title::-webkit-details-marker {
    display: none;
}

.sidebar-section summary.sidebar-section-title::before {
    content: '▼';
    position: absolute;
    right: 1rem;
    font-size: 0.6rem;
    transition: transform 0.2s ease;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-section[open] summary.sidebar-section-title::before {
    transform: rotate(180deg);
}

.sidebar-section:not([open]) summary.sidebar-section-title::before {
    transform: rotate(0deg);
}

.sidebar-section .nav {
    padding-left: 0.5rem;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    color: #bdc3c7;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.user-info strong {
    color: #ecf0f1;
    display: block;
    margin-bottom: 0.25rem;
}

.main-content {
    margin-left: 260px;
    padding: 0;
    min-height: 100vh;
    background: #f8f9fa;
}

.content-wrapper {
    padding: 2rem;
}

.page-header {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.page-header h1 {
    margin: 0;
    font-size: 1.75rem;
    color: #2c3e50;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-ACTIVE { background: #d4edda; color: #155724; }
.status-PENDING_REVIEW { background: #fff3cd; color: #856404; }
.status-INCOMPLETE { background: #f8d7da; color: #721c24; }
.status-INFO_REQUIRED { background: #d1ecf1; color: #0c5460; }
.status-REJECTED { background: #f8d7da; color: #721c24; }
.status-SUSPENDED { background: #d6d8db; color: #383d41; }

/* Navbar stats */
.navbar-stats {
    position: sticky;
    top: 0;
    z-index: 999;
    margin: 0;
}

.stat-card {
    transition: all 0.3s ease;
    background: white;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.stat-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* Utilitaires custom */
.text-muted-light {
    color: #6c757d;
}

.alert-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
}

/* Empêcher la fermeture automatique du banner de statut */
.company-status-banner {
    pointer-events: auto !important;
}

/* Ne jamais cacher ce banner via JS */
.company-status-banner.fade {
    opacity: 1 !important;
    transition: none !important;
}