/* ===== OPTIMISATIONS MOBILES GLOBALES ===== */

/* Variables CSS pour les breakpoints */
:root {
    --mobile: 480px;
    --tablet: 768px;
    --desktop: 1024px;
}

/* ===== HEADER MOBILE - OPTIMISATIONS CRITIQUES ===== */

/* Navbar principale */
.navbar {
    padding: 0.5rem 1rem;
    min-height: 60px;
}

/* Logo et marque */
.navbar-brand {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin-right: 0;
    flex-shrink: 0;
}

.navbar-brand .navbar-brand-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Menu hamburger */
.navbar-toggler {
    padding: 0.375rem 0.5rem;
    margin-right: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.375rem;
}

/* Navigation items - Layout horizontal pour les boutons */
.navbar-nav {
    flex-direction: row !important;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.navbar-nav .nav-item {
    margin: 0;
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 44px;
    min-height: 44px;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Boutons spécifiques - Layout horizontal */
.btn-validation-mobile,
.btn-notification-mobile {
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.2s ease;
    margin: 0 0.25rem;
}

.btn-validation-mobile:hover,
.btn-notification-mobile:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Dropdown profile - Correction critique */
.navbar-nav .dropdown {
    position: relative;
}

.navbar-nav .dropdown-toggle {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    padding: 0.5rem 0.75rem;
    min-width: 120px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0.375rem;
}

.navbar-nav .dropdown-toggle::after {
    margin-left: 0.5rem;
    border-top-color: white;
}

.navbar-nav .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Menu dropdown - Positionnement corrigé */
.navbar-nav .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    margin-top: 0.5rem;
    min-width: 200px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1050;
}

.navbar-nav .dropdown-menu .dropdown-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-nav .dropdown-menu .dropdown-item:last-child {
    border-bottom: none;
}

.navbar-nav .dropdown-menu .dropdown-item:hover {
    background: rgba(0, 174, 158, 0.1);
    color: #00AE9E;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Très petits écrans (320px - 480px) */
@media (max-width: 480px) {
    .navbar {
        padding: 0.5rem;
        min-height: 56px;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
        gap: 0.375rem;
    }
    
    .navbar-brand .navbar-brand-icon {
        width: 20px;
        height: 20px;
    }
    
    .navbar-nav {
        gap: 0.25rem;
    }
    
    .navbar-nav .nav-link,
    .btn-validation-mobile,
    .btn-notification-mobile {
        padding: 0.375rem;
        min-width: 40px;
        min-height: 40px;
        font-size: 0.875rem;
    }
    
    .navbar-nav .dropdown-toggle {
        min-width: 100px;
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* Petits écrans (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
        min-height: 64px;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-nav {
        gap: 0.5rem;
    }
}

/* ===== CORRECTIONS SPÉCIFIQUES POUR STRATELIA ===== */

/* Header principal */
.navbar.bg-primary {
    background: linear-gradient(135deg, #00AE9E 0%, #008B7D 100%) !important;
}

/* Espacement entre les éléments du header */
.navbar > .container-fluid {
    gap: 0.5rem;
}

/* Alignement vertical des éléments */
.navbar .navbar-collapse {
    align-items: center;
}

/* ===== ANIMATIONS ET TRANSITIONS ===== */

.navbar-nav .nav-link,
.btn-validation-mobile,
.btn-notification-mobile,
.navbar-nav .dropdown-toggle {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-nav .nav-link:active,
.btn-validation-mobile:active,
.btn-notification-mobile:active,
.navbar-nav .dropdown-toggle:active {
    transform: scale(0.95);
}

/* ===== CORRECTIONS POUR LES BADGES ===== */

/* Badge de notification sur les boutons */
.btn-validation-mobile .badge,
.btn-notification-mobile .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.75rem;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== CORRECTIONS POUR LES ICÔNES ===== */

.navbar-nav .nav-link i,
.btn-validation-mobile i,
.btn-notification-mobile i {
    font-size: 1rem;
    line-height: 1;
}

/* ===== CORRECTIONS POUR LE DROPDOWN ===== */

/* Assurer que le dropdown est visible */
.navbar-nav .dropdown.show .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    z-index: 9999 !important;
}

/* Forcer l'affichage du dropdown sur mobile */
@media (max-width: 768px) {
    .navbar-nav .dropdown-menu {
        display: none !important;
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
        z-index: 9999 !important;
        background: white !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
    }
    
    .navbar-nav .dropdown.show .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        animation: slideDown 0.3s ease !important;
    }
    
    /* Animation d'entrée du dropdown */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Styles des éléments du dropdown */
    .navbar-nav .dropdown-menu .dropdown-item {
        padding: 1rem !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
        font-size: 1rem !important;
        color: #495057 !important;
        transition: all 0.2s ease !important;
    }
    
    .navbar-nav .dropdown-menu .dropdown-item:hover {
        background: rgba(0, 174, 158, 0.1) !important;
        color: #00AE9E !important;
    }
    
    .navbar-nav .dropdown-menu .dropdown-item:active {
        background: rgba(0, 174, 158, 0.2) !important;
        transform: scale(0.98) !important;
    }
    
    .navbar-nav .dropdown-menu .dropdown-divider {
        margin: 0.5rem 0 !important;
        border-color: rgba(0, 0, 0, 0.1) !important;
    }
}

/* Animation d'entrée du dropdown */
.navbar-nav .dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.navbar-nav .dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===== CORRECTIONS POUR LES PANNEAUX ===== */

/* Panneaux de validation et notification */
.validation-panel,
.notification-panel {
    position: fixed !important;
    top: 70px !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    z-index: 1050;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Forcer la largeur complète sur mobile */
@media (max-width: 768px) {
    .validation-panel,
    .notification-panel {
        position: fixed !important;
        top: 70px !important;
        right: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
        transform: none !important;
        transform-origin: unset !important;
    }
    
    /* Forcer la suppression des styles inline */
    .validation-panel[style*="width"],
    .notification-panel[style*="width"] {
        width: 100vw !important;
        max-width: 100vw !important;
        right: 0 !important;
        left: 0 !important;
        margin: 0 !important;
    }
}

@media (max-width: 576px) {
    .validation-panel,
    .notification-panel {
        top: 65px !important;
    }
}

@media (max-width: 480px) {
    .validation-panel,
    .notification-panel {
        top: 60px !important;
    }
}

/* ===== CORRECTIONS POUR LES MODALS ===== */

/* Styles pour les modals Bootstrap */
.modal {
    z-index: 1050 !important;
}

.modal-backdrop {
    z-index: 1040 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
}

/* Modal de création/édition d'objectif stratégique */
.modal .modal-header {
    border-bottom: 2px solid var(--primary-green);
    border-radius: 15px 15px 0 0;
}

.modal .modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal .modal-body {
    padding: 2rem;
}

.modal .modal-footer {
    border-top: 2px solid var(--light-gray);
    border-radius: 0 0 15px 15px;
    padding: 1.5rem 2rem;
}

/* Responsive pour les modals */
@media (max-width: 768px) {
    .modal .modal-body {
        padding: 1.5rem;
    }
    
    .modal .modal-footer {
        padding: 1rem 1.5rem;
    }
    
    .modal .modal-dialog {
    margin: 1rem;
        max-width: calc(100% - 2rem);
    }
}

@media (max-width: 576px) {
    .modal .modal-body {
    padding: 1rem;
}

    .modal .modal-footer {
    padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal .modal-footer .btn {
        width: 100%;
        margin: 0;
    }
    
    .modal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
}

/* ===== BREADCRUMB AMÉLIORÉ ET RESPONSIVE ===== */

/* Container principal du breadcrumb */
.breadcrumb-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-bottom: 2px solid #dee2e6 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Navigation du breadcrumb */
.breadcrumb-nav {
    position: relative;
}

/* Liste du breadcrumb */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

/* Éléments du breadcrumb */
.breadcrumb-item {
    display: flex;
    align-items: center;
    max-width: 100%;
}

/* Séparateurs du breadcrumb */
.breadcrumb-separator {
    display: flex;
    align-items: center;
    color: #6c757d;
    margin: 0 0.5rem;
}

/* Liens du breadcrumb */
.breadcrumb-link {
    color: #495057 !important;
    transition: all 0.3s ease;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem !important;
    margin: 0.125rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    font-size: 0.875rem;
}

.breadcrumb-link:hover {
    color: #20B2AA !important;
    background-color: rgba(32, 178, 170, 0.1);
    transform: translateY(-1px);
}

.breadcrumb-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(32, 178, 170, 0.25);
    outline: none;
}

/* Texte du breadcrumb */
.breadcrumb-text {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Élément actif du breadcrumb */
.breadcrumb-item.active .breadcrumb-text {
    color: #20B2AA !important;
    font-weight: 700;
    position: relative;
}

.breadcrumb-item.active .breadcrumb-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #20B2AA, #48D1CC);
    border-radius: 1px;
}

/* Indicateur mobile */
.breadcrumb-mobile-indicator {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Responsive pour petits écrans */
@media (max-width: 768px) {
    .breadcrumb-container {
        padding: 0.75rem !important;
    }
    
    .breadcrumb {
        gap: 0.125rem;
    }
    
    .breadcrumb-link {
        max-width: 100px;
        padding: 0.125rem 0.375rem !important;
        font-size: 0.8rem;
    }
    
    .breadcrumb-separator {
        margin: 0 0.25rem;
    }
    
    .breadcrumb-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .breadcrumb-container {
        padding: 0.5rem !important;
    }
    
    .breadcrumb {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .breadcrumb-item {
        width: 100%;
        max-width: none;
    }
    
    .breadcrumb-link {
        max-width: none;
        width: 100%;
        text-align: left;
        justify-content: flex-start;
        padding: 0.375rem 0.5rem !important;
    }
    
    .breadcrumb-separator {
        display: none;
    }
    
    .breadcrumb-text {
        font-size: 0.8rem;
    }
    
    .breadcrumb-mobile-indicator {
        font-size: 0.7rem;
        margin-top: 0.5rem !important;
    }
}

/* Animation d'apparition */
.breadcrumb-item {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

.breadcrumb-item:nth-child(1) { animation-delay: 0.1s; }
.breadcrumb-item:nth-child(2) { animation-delay: 0.2s; }
.breadcrumb-item:nth-child(3) { animation-delay: 0.3s; }
.breadcrumb-item:nth-child(4) { animation-delay: 0.4s; }
.breadcrumb-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== BARRES DE PROGRESSION POUR SOUS-ACTIONS ===== */

/* Barre de progression dans le modal d'édition */
.progress-container {
    margin-bottom: 0.5rem;
}

.progress {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    transition: width 0.6s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
}

.progress-text {
    font-size: 0.875rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

/* Barre de progression désactivée pour les utilisateurs sans permissions */
.progress-bar-disabled {
    background: linear-gradient(45deg, #6c757d, #495057) !important;
    position: relative;
    cursor: not-allowed;
}

.progress-bar-disabled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.1) 2px,
        rgba(255, 255, 255, 0.1) 4px
    );
    pointer-events: none;
}

/* Styles pour les barres de progression dans les tableaux */
.progress-container .progress {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-container .progress-bar {
    transition: width 0.6s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
}

.progress-container .progress-text {
    font-size: 0.875rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

/* Barre de progression compacte (comme dans la liste des objectifs stratégiques) */
.progress-compact {
    height: 8px !important;
    border-radius: 4px;
}

.progress-compact .progress-bar {
    border-radius: 4px;
}

/* Responsive pour les barres de progression */
@media (max-width: 768px) {
    .progress {
        height: 32px !important;
    }
    
    .progress-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .progress {
        height: 28px !important;
    }
    
    .progress-text {
        font-size: 0.75rem;
    }
}

/* ===== CORRECTIONS POUR LES TABLEAUX ===== */

/* Tableaux responsifs */
.table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table th,
.table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
}

/* Styles spécifiques pour le tableau des objectifs stratégiques sur mobile */
@media (max-width: 768px) {
    /* Tableau des objectifs stratégiques - Vue mobile optimisée */
    .table-responsive .table {
        font-size: 0.8rem;
    }
    
    .table-responsive .table th,
    .table-responsive .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
        white-space: nowrap;
        min-width: auto;
    }
    
    /* Réduire la largeur des colonnes sur mobile */
    .table-responsive .table th:nth-child(1), /* Code */
    .table-responsive .table td:nth-child(1) {
        width: 12% !important;
        min-width: 60px;
    }
    
    .table-responsive .table th:nth-child(2), /* Libellé */
    .table-responsive .table td:nth-child(2) {
        width: 25% !important;
        min-width: 120px;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .table-responsive .table th:nth-child(3), /* Progression */
    .table-responsive .table td:nth-child(3) {
        width: 18% !important;
        min-width: 80px;
    }
    
    .table-responsive .table th:nth-child(4), /* Date d'échéance */
    .table-responsive .table td:nth-child(4) {
        width: 15% !important;
        min-width: 70px;
    }
    
    .table-responsive .table th:nth-child(5), /* Propriétaire */
    .table-responsive .table td:nth-child(5) {
        width: 15% !important;
        min-width: 70px;
    }
    
    .table-responsive .table th:nth-child(6), /* Objectifs Spécifiques */
    .table-responsive .table td:nth-child(6) {
        width: 8% !important;
        min-width: 50px;
    }
    
    .table-responsive .table th:nth-child(7), /* Actions */
    .table-responsive .table td:nth-child(7) {
        width: 7% !important;
        min-width: 60px;
    }
    
    /* Optimiser les badges et boutons sur mobile */
    .table-responsive .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }
    
    .table-responsive .btn-action {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
        min-width: 32px;
        min-height: 32px;
    }
    
    /* Optimiser la barre de progression sur mobile */
    .table-responsive .progress-compact {
        height: 6px;
        margin-bottom: 0.25rem;
    }
    
    /* Masquer certains éléments sur très petits écrans */
    @media (max-width: 480px) {
        .table-responsive .table th:nth-child(4), /* Date d'échéance */
        .table-responsive .table td:nth-child(4) {
            display: none;
        }
        
        .table-responsive .table th:nth-child(6), /* Objectifs Spécifiques */
        .table-responsive .table td:nth-child(6) {
            display: none;
        }
        
        /* Réajuster les largeurs des colonnes restantes */
        .table-responsive .table th:nth-child(1),
        .table-responsive .table td:nth-child(1) {
            width: 15% !important;
        }
        
        .table-responsive .table th:nth-child(2),
        .table-responsive .table td:nth-child(2) {
            width: 35% !important;
        }
        
        .table-responsive .table th:nth-child(3),
        .table-responsive .table td:nth-child(3) {
            width: 25% !important;
        }
        
        .table-responsive .table th:nth-child(5),
        .table-responsive .table td:nth-child(5) {
            width: 15% !important;
        }
        
        .table-responsive .table th:nth-child(7),
        .table-responsive .table td:nth-child(7) {
            width: 10% !important;
        }
    }
    
    /* Masquer encore plus d'éléments sur ultra-petits écrans */
    @media (max-width: 360px) {
        .table-responsive .table th:nth-child(5), /* Propriétaire */
        .table-responsive .table td:nth-child(5) {
            display: none;
        }
        
        /* Réajuster les largeurs des colonnes restantes */
        .table-responsive .table th:nth-child(1),
        .table-responsive .table td:nth-child(1) {
            width: 18% !important;
        }
        
        .table-responsive .table th:nth-child(2),
        .table-responsive .table td:nth-child(2) {
            width: 42% !important;
        }
        
        .table-responsive .table th:nth-child(3),
        .table-responsive .table td:nth-child(3) {
            width: 30% !important;
        }
        
        .table-responsive .table th:nth-child(7),
        .table-responsive .table td:nth-child(7) {
            width: 10% !important;
        }
    }
}

/* Styles spécifiques pour le tableau des objectifs stratégiques */
.objectifs-strategiques-table {
    border-radius: 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.objectifs-strategiques-table .table {
    margin-bottom: 0;
}

.objectifs-strategiques-table .table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border: none;
    padding: 1rem 0.75rem;
}

.objectifs-strategiques-table .table td {
    vertical-align: middle;
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.objectifs-strategiques-table .table tbody tr:hover {
    background-color: rgba(0, 174, 158, 0.05);
    transform: scale(1.001);
    transition: all 0.2s ease;
}

/* Responsive pour le tableau des objectifs stratégiques */
@media (max-width: 768px) {
    .objectifs-strategiques-table .table th,
    .objectifs-strategiques-table .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    .objectifs-strategiques-table .table th {
        font-size: 0.75rem;
        letter-spacing: 0.25px;
    }
    
    /* Optimiser les colonnes spécifiques */
    .objectifs-strategiques-table .col-code {
        min-width: 60px !important;
    }
    
    .objectifs-strategiques-table .col-libelle {
        min-width: 120px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .objectifs-strategiques-table .col-progression {
        min-width: 80px !important;
    }
    
    .objectifs-strategiques-table .col-echeance {
        min-width: 70px !important;
    }
    
    .objectifs-strategiques-table .col-proprietaire {
        min-width: 70px !important;
    }
    
    .objectifs-strategiques-table .col-osp {
        min-width: 50px !important;
    }
    
    .objectifs-strategiques-table .col-actions {
        min-width: 60px !important;
    }
    
                /* Garder les textes des en-têtes visibles sur tous les écrans */
            .objectifs-strategiques-table .table th .d-sm-inline {
                display: inline !important;
            }
    
    /* Optimiser les badges et boutons */
    .objectifs-strategiques-table .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }
    
    .objectifs-strategiques-table .btn-action {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
        min-width: 32px;
        min-height: 32px;
    }
    
    /* Optimiser la barre de progression */
    .objectifs-strategiques-table .progress-compact {
        height: 6px;
        margin-bottom: 0.25rem;
    }
    
    /* Masquer certaines colonnes sur très petits écrans */
    @media (max-width: 480px) {
        .objectifs-strategiques-table .col-echeance,
        .objectifs-strategiques-table .col-osp {
            display: none !important;
        }
    }
    
    @media (max-width: 360px) {
        .objectifs-strategiques-table .col-proprietaire {
            display: none !important;
        }
    }
}

/* Styles pour les tableaux avec scroll horizontal sur mobile */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e0 #f7fafc;
    }
    
    .table-responsive::-webkit-scrollbar {
        height: 6px;
    }
    
    .table-responsive::-webkit-scrollbar-track {
        background: #f7fafc;
        border-radius: 3px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb {
        background: #cbd5e0;
        border-radius: 3px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: #a0aec0;
    }
}

/* ===== CORRECTIONS POUR LES BOUTONS ===== */

/* Boutons responsifs */
.btn-group .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* ===== CORRECTIONS POUR LES CARTES ===== */

/* Cartes responsives */
.card {
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 1rem;
}

/* ===== CORRECTIONS POUR LES PROGRESS BARS ===== */

/* Barres de progression */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
}

/* ===== CORRECTIONS POUR LES BADGES ===== */

/* Badges responsifs */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
}

/* ===== CORRECTIONS POUR LES ALERTES ===== */

/* Alertes responsives */
.alert .fa-hand-wave {
    font-size: 1.25rem;
}

.alert-heading {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.alert p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* ===== CORRECTIONS POUR LA SIDEBAR ===== */

/* Overlay de la sidebar - Masqué par défaut sur desktop */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
    opacity: 0;
    pointer-events: none;
}

/* Sidebar mobile - Plus claire et interactive */
@media (max-width: 768px) {
    .sidebar {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
        color: #495057 !important;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15) !important;
        z-index: 9999 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    .sidebar.show {
        transform: translateX(0) !important;
    }
    
    .sidebar-header {
        background: linear-gradient(135deg, #00AE9E 0%, #008B7D 100%) !important;
        color: white !important;
        border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
        padding: 1rem !important;
    }
    
    .sidebar-menu .nav-link {
        color: #495057 !important;
        background: rgba(255, 255, 255, 0.7) !important;
        border: 1px solid rgba(0, 0, 0, 0.05) !important;
        margin: 0.25rem 0.5rem !important;
        border-radius: 0.5rem !important;
        transition: all 0.2s ease !important;
        padding: 0.75rem 1rem !important;
        cursor: pointer !important;
        user-select: none !important;
    }
    
    .sidebar-menu .nav-link:hover {
        background: rgba(0, 174, 158, 0.1) !important;
        color: #00AE9E !important;
        transform: translateX(5px) !important;
        box-shadow: 0 2px 8px rgba(0, 174, 158, 0.2) !important;
    }
    
    .sidebar-menu .nav-link:active {
        transform: scale(0.98) !important;
    }
    
    .sidebar-menu .nav-link.active {
        background: linear-gradient(135deg, #00AE9E 0%, #008B7D 100%) !important;
        color: white !important;
        box-shadow: 0 2px 8px rgba(0, 174, 158, 0.3) !important;
    }
    
    /* Boutons Profil et Déconnexion dans la sidebar */
    .sidebar-menu .nav-link.btn-link {
        background: transparent !important;
        border: none !important;
        color: #495057 !important;
        text-decoration: none !important;
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0.5rem !important;
        border-radius: 0.5rem !important;
        transition: all 0.2s ease !important;
        cursor: pointer !important;
        user-select: none !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }
    
    .sidebar-menu .nav-link.btn-link:hover {
        background: rgba(220, 53, 69, 0.1) !important;
        color: #dc3545 !important;
        transform: translateX(5px) !important;
    }
    
    .sidebar-menu .nav-link.btn-link:active {
        transform: scale(0.98) !important;
    }
    
    /* Séparateur dans la sidebar */
    .sidebar-menu .dropdown-divider {
        border-color: rgba(0, 0, 0, 0.1) !important;
        margin: 1rem 0.5rem !important;
    }
    
    /* Bouton toggle de la sidebar */
    .sidebar-toggle {
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        color: white !important;
        padding: 0.5rem !important;
        border-radius: 0.375rem !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        z-index: 10000 !important;
    }
    
    .sidebar-toggle:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        transform: scale(1.05) !important;
    }
    
    .sidebar-toggle:active {
        transform: scale(0.95) !important;
    }
    
    /* Overlay de la sidebar mobile - Visible seulement sur mobile */
    .sidebar-overlay {
        background: rgba(0, 0, 0, 0.6) !important;
        backdrop-filter: blur(2px) !important;
        z-index: 9998 !important;
        transition: opacity 0.3s ease !important;
        pointer-events: auto !important;
    }
    
    .sidebar-overlay.show {
        display: block !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

/* Sur desktop, l'overlay ne doit jamais être visible */
@media (min-width: 769px) {
    .sidebar-overlay {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    .sidebar-overlay.show {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* Sidebar mobile */
.sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.sidebar.show {
    transform: translateX(0);
}

/* ===== CORRECTIONS POUR LE CONTENU PRINCIPAL ===== */

/* Contenu principal */
.main-content {
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

@media (min-width: 992px) {
    .main-content {
        margin-left: 250px;
    }
}

/* ===== CORRECTIONS POUR LES STATS CARDS ===== */

/* Cartes de statistiques compactes */
.stats-card-compact {
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-action-compact {
    padding: 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
}

/* ===== OPTIMISATIONS MOBILES POUR LES CARTES PARENT ===== */

/* Classes pour les cartes optimisées mobile */
.mobile-optimized-card {
    transition: all 0.3s ease;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mobile-optimized-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* En-têtes des cartes */
.mobile-card-header {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem 0.75rem 0 0;
}

.mobile-header-text {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Corps des cartes */
.mobile-card-body {
    padding: 1rem;
}

/* Titres des cartes */
.mobile-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

/* Descriptions (masquées sur mobile) */
.mobile-description {
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Codes, échéances et propriétaires */
.mobile-code, .mobile-echeance, .mobile-owner {
    margin-bottom: 0.75rem;
}

.mobile-label {
    font-size: 0.8rem;
    font-weight: 500;
}

.mobile-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
}

/* Section progression */
.mobile-progress {
    margin-top: 1rem;
}

.mobile-progress-circle {
    margin-bottom: 0.5rem;
}

.mobile-percentage {
    font-weight: 700;
}

.mobile-label-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Très petits écrans (xs) */
@media (max-width: 575.98px) {
    .mobile-optimized-card {
        margin-bottom: 0.5rem;
        height: auto !important;
        min-height: auto !important;
    }
    
    .mobile-card-header {
        padding: 0.4rem 0.6rem;
    }
    
    .mobile-header-text {
        font-size: 0.75rem;
    }
    
    .mobile-card-body {
        padding: 0.6rem;
    }
    
    .mobile-title {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
        line-height: 1.2;
    }
    
    .mobile-code, .mobile-echeance {
        margin-bottom: 0.3rem;
    }
    
    .mobile-label {
        font-size: 0.7rem;
    }
    
    .mobile-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.3rem;
    }
    
    .mobile-progress {
        margin-top: 0.4rem;
    }
    
    .mobile-progress-circle svg {
        width: 30px !important;
        height: 30px !important;
    }
    
    .mobile-percentage {
        font-size: 0.7rem;
    }
    
    .mobile-label-text {
        font-size: 0.65rem;
        margin-top: 0.15rem;
    }
}

/* Petits écrans (sm) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .mobile-optimized-card {
        margin-bottom: 0.5rem;
        height: auto !important;
        min-height: auto !important;
    }
    
    .mobile-card-header {
        padding: 0.5rem 0.75rem;
    }
    
    .mobile-header-text {
        font-size: 0.8rem;
    }
    
    .mobile-card-body {
        padding: 0.75rem;
    }
    
    .mobile-title {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
        line-height: 1.25;
    }
    
    .mobile-code, .mobile-echeance {
        margin-bottom: 0.4rem;
    }
    
    .mobile-label {
        font-size: 0.75rem;
    }
    
    .mobile-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .mobile-progress {
        margin-top: 0.5rem;
    }
    
    .mobile-progress-circle svg {
        width: 35px !important;
        height: 35px !important;
    }
    
    .mobile-percentage {
        font-size: 0.75rem;
    }
    
    .mobile-label-text {
        font-size: 0.7rem;
        margin-top: 0.2rem;
    }
}

/* Écrans moyens (md) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .mobile-optimized-card {
        margin-bottom: 0.5rem;
    }
    
    .mobile-card-header {
        padding: 0.7rem 0.9rem;
    }
    
    .mobile-header-text {
        font-size: 0.88rem;
    }
    
    .mobile-card-body {
        padding: 0.9rem;
    }
    
    .mobile-title {
        font-size: 0.98rem;
        margin-bottom: 0.7rem;
    }
    
    .mobile-code, .mobile-echeance {
        margin-bottom: 0.7rem;
    }
    
    .mobile-label {
        font-size: 0.8rem;
    }
    
    .mobile-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .mobile-progress {
        margin-top: 0.9rem;
    }
    
    .mobile-label-text {
        font-size: 0.8rem;
    }
}

/* ===== ANIMATIONS ET TRANSITIONS ===== */

/* Animation d'apparition des cartes */
.mobile-optimized-card {
    animation: fadeInUp 0.5s ease-out;
}

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

/* Animation des cercles de progression */
.mobile-progress-circle svg circle:last-child {
    transition: stroke-dashoffset 0.8s ease-in-out;
}

/* ===== OPTIMISATIONS SPÉCIFIQUES POUR LES CARTES PARENT ===== */

/* Forcer l'affichage sur une seule ligne en mobile */
@media (max-width: 767px) {
    .statistics-container .row {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .statistics-container .col-4 {
        flex: 0 0 auto !important;
        width: 33.333333% !important;
        max-width: 33.333333% !important;
        scroll-snap-align: start;
        min-width: 200px;
    }
    
    .mobile-optimized-card {
        width: 100%;
        min-width: 200px;
        margin-right: 0.5rem;
    }
    
    /* Masquer la barre de défilement mais garder la fonctionnalité */
    .statistics-container .row::-webkit-scrollbar {
        height: 0;
        width: 0;
    }
    
    .statistics-container .row {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
}

/* ===== OPTIMISATIONS TOUCH ===== */

/* Amélioration de la zone de clic sur mobile */
.mobile-optimized-card {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-card-header {
    cursor: pointer;
    user-select: none;
}

/* ===== ACCESSIBILITÉ ===== */

/* Amélioration du contraste sur mobile */
@media (max-width: 767.98px) {
    .mobile-title {
        color: #1a1a1a !important;
    }
    
    .mobile-label {
        color: #495057 !important;
    }
    
    .mobile-badge {
        color: #ffffff !important;
    }
    
    .mobile-percentage {
        color: #1a1a1a !important;
    }
}

/* ===== PERFORMANCE ===== */

/* Optimisation du rendu sur mobile */
.mobile-optimized-card {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
