/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Styles pour le formulaire de recherche multicritère */
.search-container {
    margin-bottom: 1.5rem;
}

.search-container .card {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.search-container .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
}

.search-container .card-header h5 {
    margin: 0;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
}

.search-container .card-body {
    padding: 1rem;
}

.search-form .form-group {
    margin-bottom: 1rem;
}

.search-form .form-control {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.search-form .form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.search-form label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.search-form .btn {
    margin-right: 0.5rem;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.search-criteria {
    margin-bottom: 1rem;
}

.search-criteria .alert {
    padding: 0.75rem 1rem;
    margin-bottom: 0;
    border-radius: 0.375rem;
}

.search-criteria .badge {
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Réduire la taille de tous les H1 */
h1 {
    font-size: 1.25rem !important;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Layout principal */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 0.75rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    margin-right: 0.5rem;
}

/* Profile Menu */
.profile-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

.auth-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.auth-buttons .btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-buttons .btn:hover {
    transform: translateY(-1px);
}

.profile-dropdown {
    position: relative;
}

.profile-trigger {
    background: none;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.profile-trigger:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.profile-trigger i {
    font-size: 1.2rem;
}

.profile-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    min-width: 280px;
    z-index: 1000;
    margin-top: 0.5rem;
    overflow: hidden;
}

.profile-content.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-header i {
    font-size: 2.5rem;
}

.profile-info strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.profile-info small {
    opacity: 0.9;
    font-size: 0.85rem;
}

.profile-divider {
    height: 1px;
    background: #e9ecef;
    margin: 0;
}

.profile-section {
    padding: 1rem 0;
}

.profile-section h4 {
    padding: 0 1.5rem 0.75rem;
    margin: 0;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-section h4 i {
    margin-right: 0.5rem;
    color: #28a745;
}

.profile-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-links li {
    margin: 0;
}

.profile-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.profile-links a:hover {
    background-color: #f8f9fa;
    color: #28a745;
    transform: translateX(5px);
}

.profile-links a i {
    width: 16px;
    text-align: center;
    color: #6c757d;
}

.profile-links a:hover i {
    color: #28a745;
}

/* Navigation */
.nav,
nav.nav,
body .nav,
body nav.nav,
html body .nav,
html body nav.nav,
.mega-dropdown-content,
body .mega-dropdown-content,
.nav .mega-dropdown-content,
html body .mega-dropdown-content,
html body .nav .mega-dropdown-content {
    background: #e8f5e9 !important;
    background-color: #e8f5e9 !important;
}

.nav {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
}

.nav *,
nav.nav * {
    background-color: transparent !important;
}

.nav-container,
.nav-container * {
    background-color: transparent !important;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    min-height: 40px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    padding-left: 0 !important;
}

/* Header actions avec recherche */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.search-container:focus-within {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
    transform: translateY(-1px);
}

.search-input {
    border: none;
    outline: none;
    padding: 8px 15px;
    font-size: 0.9rem;
    min-width: 300px;
    background: transparent;
    color: #495057;
}

.search-input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.search-btn {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    border: none !important;
    color: white !important;
    padding: 8px !important;
    border-radius: 50% !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
}

.search-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.search-btn i {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.85rem !important;
    line-height: 1 !important;
    display: block !important;
    text-align: center !important;
}

/* Styles pour les résultats de recherche */
.table tbody tr.highlight {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb) !important;
    border-left: 4px solid #2196f3;
    animation: highlightRow 0.5s ease-in-out;
}

@keyframes highlightRow {
    0% {
        background: white;
        transform: scale(1);
    }
    50% {
        background: linear-gradient(135deg, #e3f2fd, #bbdefb);
        transform: scale(1.02);
    }
    100% {
        background: linear-gradient(135deg, #e3f2fd, #bbdefb);
        transform: scale(1);
    }
}

.no-results {
    padding: 2rem !important;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Responsive pour la recherche */
@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .search-container {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-input {
        min-width: auto;
        flex: 1;
    }
    
    .search-btn {
        flex-shrink: 0;
    }
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.85rem;
}

.nav-menu a:hover {
    background-color: #28a745;
    color: white;
}

.nav-menu a.active {
    background-color: #e8f5e9 !important;
    color: #fd7e14 !important;
    font-weight: bold;
}

.mega-dropdown-section a.active {
    background-color: #e8f5e9 !important;
    color: #fd7e14 !important;
    font-weight: bold;
}

/* Main content */
.main-content {
    padding: 1rem 0;
    min-height: calc(100vh - 200px);
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.dashboard-card h3 {
    color: #28a745;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.dashboard-card .number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.dashboard-card .description {
    color: #666;
    font-size: 0.9rem;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    overflow-x: auto;
}

.table-actions {
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
    margin: -1rem -1rem 0.75rem -1rem;
}

.table-actions .btn {
    margin-right: 0.5rem;
}

/* Styles pour l'alignement des montants dans les tableaux */
.text-right, .text-end {
    text-align: right !important;
}

.table .numeric-column {
    text-align: right !important;
}

.table .numeric-header {
    text-align: right !important;
}

/* Fallback général */
.numeric-column {
    text-align: right !important;
}

.numeric-header {
    text-align: right !important;
}

/* Styles pour le tableau des lignes de facture */
#lignesTable {
    margin-bottom: 0;
}

#lignesTable th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 0.75rem;
    text-align: left;
}

#lignesTable td {
    padding: 0.5rem;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

#lignesTable input,
#lignesTable select {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Réduire la largeur des champs quantité et prix */
#lignesTable .qte-input,
#lignesTable .prix-input {
    width: 60px;
    text-align: right;
    font-size: 0.8rem;
}

/* Réduire la largeur du champ libellé */
#lignesTable .libelle-input {
    width: 150px;
    font-size: 0.8rem;
}

/* Réduire la largeur du select TVA */
#lignesTable .tva-select {
    width: 60px;
    font-size: 0.8rem;
}

/* Style pour le select de prestations */
#lignesTable .prestation-select {
    width: 120px;
    font-size: 0.8rem;
}

/* Styles spécifiques pour Select2 dans le tableau des lignes */
#lignesTable .select2-container {
    width: 100% !important;
    min-width: 100%;
}

#lignesTable .select2-container--bootstrap-5 .select2-selection {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    height: 38px;
    font-size: 0.875rem;
}

#lignesTable .select2-container--bootstrap-5 .select2-selection--single {
    background-color: #fff;
    padding: 0.375rem 0.75rem;
}

#lignesTable .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: #495057;
    line-height: 1.5;
    padding-left: 0;
}

#lignesTable .select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

#lignesTable .select2-container--bootstrap-5 .select2-dropdown {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

#lignesTable .select2-container--bootstrap-5 .select2-results__option {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

#lignesTable .select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected] {
    background-color: #28a745;
    color: white;
}

#lignesTable .select2-container--bootstrap-5 .select2-search__field {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

#lignesTable .select2-container--bootstrap-5 .select2-search__field:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    outline: none;
}

/* Styles pour la cellule prestation/libellé */
#lignesTable .prestation-libelle-cell {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 250px;
}

#lignesTable .prestation-libelle-cell .prestation-select {
    width: 100%;
    margin-bottom: 0.25rem;
}

#lignesTable .prestation-libelle-cell .libelle-input {
    width: 100%;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    background-color: #f8f9fa;
}

#lignesTable .prestation-libelle-cell .libelle-input:focus {
    background-color: #fff;
    border-color: #28a745;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

#lignesTable .prestation-libelle-cell .libelle-input::placeholder {
    color: #6c757d;
    font-style: italic;
}

/* Styles pour les nouveaux éléments */
#lignesTable .campagne-select {
    min-width: 150px;
    font-size: 0.8rem;
}

#lignesTable .select-assos-btn {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

#lignesTable .selected-assos-info {
    margin-top: 0.25rem;
    font-size: 0.7rem;
}

/* Styles pour la modal des assolements */
#assosModal .modal-body {
    max-height: 400px;
    overflow-y: auto;
}

#assosModal .form-check {
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background-color: white;
    transition: all 0.3s ease;
}

#assosModal .form-check:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

#assosModal .form-check:has(input:checked) {
    background-color: #e3f2fd;
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

#assosModal .form-check-label {
    font-size: 0.9rem;
    line-height: 1.4;
}

#assosModal .ilot-nom {
    font-weight: 600;
    color: #495057;
}

#assosModal .espece-libelle {
    color: #6c757d;
    font-style: italic;
}

#assosModal .surface {
    color: #007bff;
    font-weight: 600;
}

#assosModal .cumul-info {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background-color: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    color: #1565c0;
}

#assosModal .cumul-info strong {
    color: #1565c0;
}

#assosModal .espece-header {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    width: 100% !important;
}

#assosModal .espece-header .espece-group {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid #e9ecef;
    flex-wrap: nowrap !important;
    width: 100% !important;
    min-height: 60px !important;
}

#assosModal .espece-group {
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#assosModal .espece-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid #e9ecef;
    flex-wrap: nowrap;
}

#assosModal .espece-group .form-check {
    flex: 1 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
}

#assosModal .espece-group .form-check-label {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    margin: 0 !important;
    flex: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

#assosModal .collapse-btn {
    padding: 0.5rem !important;
    color: #495057 !important;
    border: none !important;
    background: none !important;
    font-size: 1.2rem !important;
    margin: 0 !important;
    line-height: 1 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 10 !important;
}

#assosModal .collapse-btn:hover {
    color: #007bff !important;
    background-color: #f8f9fa !important;
    transform: scale(1.1) !important;
}

#assosModal .asso-container {
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 500px;
    opacity: 1;
    margin-bottom: 0.5rem;
}

#assosModal .espece-group .collapse-btn {
    padding: 0.5rem !important;
    font-size: 1.2rem !important;
    color: #495057 !important;
    border: none !important;
    background: none !important;
    margin: 0 !important;
    line-height: 1 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#assosModal .asso-container.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: none !important;
}

#assosModal .asso-item {
    margin-left: 1rem;
    margin-bottom: 0.25rem;
}

#assosModal .asso-item .form-check {
    margin-bottom: 0;
}

/* Réduire le padding des cellules */
#lignesTable td {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

#lignesTable th {
    padding: 0.5rem;
    font-size: 0.85rem;
}

/* Réduire la taille des boutons */
#lignesTable .btn-sm {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    margin: 0 0.1rem;
}

#lignesTable input:focus,
#lignesTable select:focus {
    border-color: #007bff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#lignesTable .ht-cell,
#lignesTable .ttc-cell {
    font-weight: 600;
    color: #495057;
    text-align: right;
}

#lignesTable .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    margin: 0 0.125rem;
}

/* Animation pour les nouvelles lignes */
#lignesTable tbody tr {
    transition: all 0.3s ease;
}

#lignesTable tbody tr:hover {
    background-color: #f8f9fa;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-header h1 {
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.table-header h2 {
    color: #333;
    font-size: 1.1rem;
    margin: 0;
}

.btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

/* Table styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.table th,
.table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

/* Alignement numérique spécifique */
.table td.numeric-column,
.table th.numeric-header {
    text-align: right !important;
}

/* Styles spécifiques pour les tableaux de tarifs */
.table-container .table td.numeric-column {
    text-align: right !important;
}

.table-container .table th.numeric-header {
    text-align: right !important;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table tbody tr td {
    vertical-align: middle;
}

/* Grouped table with collapse */
.table-grouped .group-row {
    background-color: #f8f9fa;
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
}

.table-grouped .recolt-group {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    font-weight: 600;
}

.table-grouped .recolt-group .group-header {
    color: white;
}

.table-grouped .societe-group {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #495057;
    border-left-color: #6c757d;
}

.table-grouped .societe-group .group-header {
    color: #495057;
}

.table-grouped .data-row {
    background-color: white;
    border-left: 4px solid #dee2e6;
}

.table-grouped .data-row:hover {
    background-color: #f8f9fa;
    border-left-color: #28a745;
}

/* Collapse functionality */
.collapsed {
    display: none !important;
}

.collapse-btn {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 3px;
    transition: all 0.3s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collapse-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.recolt-group .collapse-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.societe-group .collapse-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
}

.group-header.sub-group {
    font-size: 1rem;
    padding-left: 1rem;
}

.group-count {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: normal;
}

.ilot-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ilot-name i {
    color: #28a745;
}

.ilot-name small {
    margin-left: 0.5rem;
    opacity: 0.7;
}

/* Onglets de récoltes */
.recolte-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

/* Onglets de récoltes dans le header */
.header-actions .recolte-tabs {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.tab-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #6c757d;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.tab-link:hover {
    background-color: #f8f9fa;
    color: #495057;
    text-decoration: none;
}

.tab-link.active {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.tab-link i {
    font-size: 0.8rem;
}

.tab-link .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

/* Liste déroulante de récoltes pour mobile */
.recolte-select-mobile {
    display: none;
}

@media (max-width: 768px) {
    /* Cacher les onglets en mobile */
    .recolte-tabs {
        display: none !important;
    }
    
    /* Afficher la liste déroulante en mobile */
    .recolte-select-mobile {
        display: block !important;
        min-width: 200px;
        flex: 1;
    }
    
    .recolte-select-mobile .form-select {
        width: 100%;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        border: 1px solid #ced4da;
        border-radius: 6px;
        background-color: white;
        color: #495057;
    }
    
    .recolte-select-mobile .form-select:focus {
        border-color: #28a745;
        outline: 0;
        box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    }
    
    /* Ajuster le header-actions en mobile */
    .header-actions {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .header-actions .recolte-select-mobile {
        order: 1;
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Groupes de sociétés */
.societe-groupe {
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.societe-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.societe-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.collapse-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
    color: #6c757d;
}

.societe-header:hover .collapse-icon {
    color: #495057;
}

.societe-header .badge {
    background-color: #6c757d;
    color: white;
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    margin-left: 0.5rem;
}

.societe-header .badge.badge-info {
    background-color: #17a2b8;
}

.societe-groupe .table {
    margin: 0;
    border: none;
}

.societe-groupe .table thead th {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.societe-content {
    transition: all 0.3s ease;
}

.societe-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

/* Grouped tables */
.recolte-group {
    margin-bottom: 3rem;
}

.recolte-group:last-child {
    margin-bottom: 0;
}

.recolte-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px 10px 0 0;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.societe-group {
    margin-bottom: 2rem;
    border: 1px solid #dee2e6;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

.societe-group:last-child {
    margin-bottom: 0;
}

.societe-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #495057;
    padding: 0.75rem 1.5rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.societe-group .table {
    margin-top: 0;
    border-radius: 0;
}

.societe-group .table th {
    background-color: #ffffff;
    border-top: none;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.badge-primary {
    background-color: #007bff;
    color: white;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

.badge-purple {
    background-color: #6f42c1;
    color: white;
}

/* Styles pour les badges de statut */
.statut-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.statut-badge i {
    font-size: 0.8rem;
    opacity: 0.9;
}

.statut-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Text utilities */
.text-muted {
    color: #6c757d !important;
}

.text-center {
    text-align: center;
}

/* Forms */
.form-container {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

/* Select2 Styles */
.select2-container--bootstrap-5 .select2-selection {
    border: 1px solid #ddd;
    border-radius: 5px;
    min-height: 42px;
    padding: 0.5rem;
}

.select2-container--bootstrap-5 .select2-selection--single {
    display: flex;
    align-items: center;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    padding: 0;
    color: #333;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 10px;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.select2-container--bootstrap-5 .select2-results__option {
    padding: 0.5rem 1rem;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected] {
    background-color: #28a745;
    color: white;
}

.select2-container--bootstrap-5 .select2-results__group {
    background-color: #f8f9fa;
    color: #666;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #dee2e6;
}

.select2-container--bootstrap-5 .select2-search__field {
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 0.5rem;
}

.select2-container--bootstrap-5 .select2-search__field:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

/* Checkbox group styles */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-group .form-check {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.checkbox-group .form-check:last-child {
    margin-bottom: 0;
}

.checkbox-group .form-check:hover {
    border-color: #28a745;
    background-color: #f8fff9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.checkbox-group .form-check:has(input:checked) {
    border-color: #28a745;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.checkbox-group .form-check input[type="checkbox"] {
    display: none;
}

.checkbox-group .form-check label::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 3px;
    margin-right: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-group .form-check input[type="checkbox"]:checked + label::before {
    background-color: white;
    border-color: white;
}

.checkbox-group .form-check input[type="checkbox"]:checked + label::after {
    content: '✓';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
    font-weight: bold;
    font-size: 0.9rem;
}

.checkbox-group .form-check:hover label::before {
    border-color: #28a745;
}

.checkbox-group .form-check label {
    cursor: pointer;
    font-weight: 500;
    margin: 0;
    flex: 1;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.checkbox-group .form-check:hover label {
    color: #28a745;
}

.checkbox-group .form-check:has(input:checked) label {
    color: white;
    font-weight: 600;
}

.checkbox-group .form-check:has(input:checked)::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 1.5s infinite;
}

.checkbox-group .form-check input:checked + label {
    color: white;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.form-help {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* Form sections with checkboxes */
.form-section:has(.checkbox-group) {
    background: linear-gradient(135deg, #f8fff9, #f0fff4);
    border: 1px solid #d4edda;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.form-section:has(.checkbox-group) h3 {
    color: #28a745;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    position: relative;
}

.form-section:has(.checkbox-group) h3::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 2px;
}

.form-section:has(.checkbox-group) .form-group {
    margin-bottom: 0.1rem;
}

.form-section:has(.checkbox-group) .form-help {
    color: #28a745;
    font-weight: 500;
}

/* Regular form sections */
.form-section {
    margin-bottom: 0.2rem;
}

.form-section h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.form-group:has(button[type="submit"]) {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #dee2e6;
    text-align: center;
}

.form-group:has(button[type="submit"]) .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    min-width: 200px;
}

.form-group:has(button[type="submit"]) .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.text-center {
    text-align: center;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

/* Detail pages */
.detail-section {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h3 {
    color: #28a745;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item label {
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

/* Quick actions */
.quick-actions {
    margin-top: 2rem;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
    color: inherit;
}

.action-card i {
    font-size: 2rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.action-card h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.action-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Dropdown menu */
.dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-content,
body .dropdown-content,
.nav .dropdown-content,
html body .dropdown-content,
html body .nav .dropdown-content {
    display: none !important;
    position: absolute !important;
    background: #155724 !important; /* Vert foncé */
    background-color: #155724 !important;
    min-width: 180px !important;
    box-shadow: 0 6px 12px rgba(0,0,0,0.2) !important;
    z-index: 1 !important;
    border-radius: 4px !important;
    top: 100% !important;
    left: 0 !important;
    border: 1px solid #145523 !important;
}

.dropdown-content.show,
body .dropdown-content.show,
.nav .dropdown-content.show,
html body .dropdown-content.show {
    display: block !important;
    background: #155724 !important;
    background-color: #155724 !important;
}

.dropdown-content li {
    list-style: none;
}

.dropdown-content a {
    color: #fff; /* Texte blanc */
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
    font-size: 0.85rem;
}

.dropdown-content a:hover {
    background-color: #28a745; /* Vert plus clair au survol */
    color: white;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

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

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

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 1.25rem;
    cursor: pointer;
    color: #333;
    z-index: 1001;
    position: relative;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Menu overlay pour mobile */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.menu-overlay.active {
    display: block !important;
    opacity: 1;
    pointer-events: auto;
}

/* Responsive design - Version Mobile Pro */
@media (max-width: 768px) {
    /* Header mobile amélioré */
    .header {
        padding: 0.875rem 0;
        box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    }
    
    .header-content {
        flex-direction: row;
        gap: 0.75rem;
        align-items: center;
        justify-content: space-between;
        padding: 0 0.5rem;
    }
    
    .logo {
        font-size: 1.25rem;
        flex: 1;
        min-width: 0;
    }
    
    .logo i {
        font-size: 1.35rem;
    }
    
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .nav-container {
        position: relative;
    }
    
    /* Cacher le menu normal en mobile */
    .nav-menu {
        display: none !important;
    }
    
    /* Cacher la barre de navigation complète en mobile pour éviter le bandeau vert vide */
    .nav {
        display: none !important;
    }
    
    .dropdown-content {
        position: static;
        box-shadow: none;
        margin-left: 1rem;
    }

    /* Dashboard mobile */
    .dashboard {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Tableaux mobile - amélioration */
    .table-container {
        padding: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
        background: white;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    /* S'assurer que le tableau desktop reste visible en desktop */
    @media (min-width: 769px) {
        .table-container > .table {
            display: table !important;
        }
        
        .table-swipe-container {
            display: none !important;
        }
        
        /* S'assurer que les actions sont visibles en desktop */
        .table td:last-child {
            display: table-cell !important;
            visibility: visible !important;
        }
        
        .table .btn-group {
            display: flex !important;
        }
    }
    
    .table-container::before,
    .table-container::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        width: 15px;
        pointer-events: none;
        z-index: 0;
        opacity: 0.6;
    }
    
    .table-container::before {
        left: 0;
        background: linear-gradient(to right, rgba(255, 255, 255, 0.8), transparent);
    }
    
    .table-container::after {
        right: 0;
        background: linear-gradient(to left, rgba(255, 255, 255, 0.8), transparent);
    }
    
    .table {
        font-size: 0.875rem;
        min-width: 800px;
        border-collapse: separate;
        border-spacing: 0;
        margin: 0;
        width: 100%;
        position: relative;
        z-index: 1;
        background: white;
    }
    
    .table thead th {
        background: linear-gradient(135deg, #f8f9fa, #e9ecef);
        font-weight: 600;
        font-size: 0.8125rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 0.875rem 0.625rem;
        border-bottom: 2px solid #dee2e6;
        position: sticky;
        top: 0;
        z-index: 3;
        white-space: nowrap;
        background-color: #f8f9fa;
    }
    
    .table tbody tr {
        transition: all 0.2s ease;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .table tbody tr:last-child {
        border-bottom: none;
    }
    
    .table tbody tr:hover {
        background-color: #f8f9fa;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.625rem;
        white-space: nowrap;
        vertical-align: middle;
    }
    
    .table tbody td {
        border-bottom: 1px solid #f0f0f0;
    }
    
    /* Actions dans les tableaux mobile - version compacte */
    .table td:last-child {
        position: sticky;
        right: 0;
        background: white;
        z-index: 2;
        box-shadow: -4px 0 8px rgba(0,0,0,0.05);
        padding: 0.5rem;
        min-width: 120px;
    }
    
    .table tbody tr:hover td:last-child {
        background: #f8f9fa;
    }
    
    .table tbody td {
        background: white;
    }
    
    .table tbody tr:hover td {
        background: #f8f9fa;
    }
    
    .table .btn-group {
        display: flex;
        gap: 0.375rem;
        flex-wrap: nowrap;
        align-items: center;
    }
    
    .table .btn-group form {
        display: inline-block;
        margin: 0;
    }
    
    .table .btn {
        padding: 0.5rem;
        font-size: 0.75rem;
        min-height: 36px;
        min-width: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        border-radius: 6px;
    }
    
    .table .btn i {
        margin: 0;
        font-size: 0.875rem;
    }
    
    /* Cacher le texte dans les boutons en mobile, garder seulement les icônes */
    .table .btn span.d-none {
        display: none !important;
    }
    
    /* S'assurer que les formulaires dans les tableaux sont inline */
    .table form {
        display: inline-block;
        margin: 0;
        vertical-align: middle;
    }
    
    /* Cartes pour tableaux en mobile */
    .table-responsive {
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        background: white;
    }
    
    /* Badges dans tableaux mobile */
    .table .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
        white-space: nowrap;
    }
    
    /* Alertes de recherche mobile */
    .search-criteria {
        margin-bottom: 1.25rem;
    }
    
    .search-criteria .alert {
        padding: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
        border-radius: 12px;
        border-left: 4px solid #17a2b8;
    }
    
    .search-criteria .alert strong {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.9375rem;
    }
    
    .search-criteria .alert .badge {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .search-criteria .alert .btn {
        width: 100%;
        justify-content: center;
        margin-left: 0 !important;
        margin-top: 0.25rem;
        min-height: 44px;
    }
    
    /* Message "Aucun résultat" mobile */
    .table-container .text-center {
        padding: 2rem 1rem;
    }
    
    .table-container .text-center p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        color: #6c757d;
    }
    
    .table-container .text-center .btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    /* Profile menu mobile */
    .profile-menu {
        flex-direction: row;
        gap: 0.5rem;
        width: auto;
        justify-content: flex-end;
        flex-shrink: 0;
    }
    
    .profile-menu .user-name {
        display: none;
    }

    .profile-menu .btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
        white-space: nowrap;
    }
    
    .profile-content {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        margin: 0;
        border-radius: 0;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    }
    
    .profile-content.show {
        transform: translateX(0);
    }
    
    .profile-trigger {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
        min-width: 44px;
        height: 44px;
        border-radius: 10px;
    }
    
    .profile-trigger i:first-child {
        font-size: 1.35rem;
    }

    /* Grilles mobile */
    .action-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Formulaires mobile */
    .form-layout {
        flex-direction: column;
        gap: 1.25rem;
    }
    
    .form-column {
        width: 100%;
    }
    
    .form-group,
    .mb-3,
    .mb-4 {
        margin-bottom: 1.25rem !important;
    }
    
    .form-label {
        font-weight: 600;
        font-size: 0.875rem;
        color: #495057;
        margin-bottom: 0.5rem;
        display: block;
    }
    
    .form-control,
    .form-select {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border: 2px solid #dee2e6;
        border-radius: 10px;
        transition: all 0.3s ease;
        min-height: 48px;
        background-color: white;
    }
    
    .form-control:focus,
    .form-select:focus {
        border-color: #28a745;
        outline: none;
        box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
        transform: translateY(-1px);
    }
    
    .form-control::placeholder {
        color: #adb5bd;
        font-size: 0.9375rem;
    }
    
    textarea.form-control {
        min-height: 120px;
        resize: vertical;
    }
    
    .form-check {
        margin-bottom: 1rem;
        padding-left: 2rem;
    }
    
    .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
        margin-left: -2rem;
        margin-top: 0.25rem;
        border: 2px solid #dee2e6;
    }
    
    .form-check-input:checked {
        background-color: #28a745;
        border-color: #28a745;
    }
    
    .form-check-label {
        font-size: 0.9375rem;
        color: #495057;
        cursor: pointer;
    }
    
    .invalid-feedback,
    .valid-feedback {
        font-size: 0.8125rem;
        margin-top: 0.5rem;
        padding: 0.5rem;
        border-radius: 6px;
    }
    
    .invalid-feedback {
        background-color: #f8d7da;
        color: #721c24;
        border-left: 3px solid #dc3545;
    }
    
    .valid-feedback {
        background-color: #d4edda;
        color: #155724;
        border-left: 3px solid #28a745;
    }
    
    /* Cartes mobile */
    .card {
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.08);
        margin-bottom: 1.25rem;
        border: 1px solid #e9ecef;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    .card:hover {
        box-shadow: 0 4px 16px rgba(0,0,0,0.12);
        transform: translateY(-2px);
    }
    
    .card-header {
        padding: 1.25rem 1rem;
        font-size: 0.95rem;
        font-weight: 600;
        background: linear-gradient(135deg, #f8f9fa, #e9ecef);
        border-bottom: 2px solid #dee2e6;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .card-header h5,
    .card-header h4,
    .card-header h3 {
        margin: 0;
        font-size: 1rem;
        font-weight: 700;
        color: #495057;
    }
    
    .card-body {
        padding: 1.25rem 1rem;
    }
    
    .card-footer {
        padding: 1rem;
        background-color: #f8f9fa;
        border-top: 1px solid #e9ecef;
        display: flex;
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    
    .card-footer .btn {
        flex: 1;
        min-width: 120px;
    }
    
    /* Boutons mobile */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
        border-radius: 10px;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        font-weight: 600;
        transition: all 0.3s ease;
        border: 2px solid transparent;
        white-space: nowrap;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
    
    .btn-primary {
        background: linear-gradient(135deg, #007bff, #0056b3);
        border-color: #007bff;
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    }
    
    .btn-primary:hover {
        background: linear-gradient(135deg, #0056b3, #004085);
        box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
        transform: translateY(-2px);
    }
    
    .btn-success {
        background: linear-gradient(135deg, #28a745, #20c997);
        border-color: #28a745;
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    }
    
    .btn-success:hover {
        background: linear-gradient(135deg, #20c997, #17a2b8);
        box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
        transform: translateY(-2px);
    }
    
    .btn-danger {
        background: linear-gradient(135deg, #dc3545, #c82333);
        border-color: #dc3545;
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    }
    
    .btn-danger:hover {
        background: linear-gradient(135deg, #c82333, #bd2130);
        box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
        transform: translateY(-2px);
    }
    
    .btn-outline-primary,
    .btn-outline-success,
    .btn-outline-danger {
        border-width: 2px;
        background: white;
    }
    
    .btn-outline-primary:hover,
    .btn-outline-success:hover,
    .btn-outline-danger:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    .btn-sm {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        min-height: 44px;
    }
    
    .btn-group {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        flex: 1;
        min-width: 100px;
    }
    
    /* Espacement général mobile */
    .main-content {
        padding: 1rem 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    /* Titres mobile */
    h1 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem;
    }
    
    h2 {
        font-size: 1.25rem !important;
        margin-bottom: 0.875rem;
    }
    
    h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem;
    }
    
    /* Table header mobile */
    .table-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin-bottom: 1.25rem;
    }
    
    .table-header h1 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem;
    }
    
    /* Header actions mobile */
    .header-actions {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .header-actions .input-group {
        width: 100%;
        display: flex;
    }
    
    .header-actions .input-group .form-control {
        flex: 1;
        min-width: 0;
        border-radius: 10px 0 0 10px;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        min-height: 48px;
    }
    
    .header-actions .input-group .btn {
        border-radius: 0 10px 10px 0;
        min-width: 48px;
        padding: 0.75rem 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .header-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }
    
    .header-actions form {
        width: 100%;
    }
    
    .header-actions .d-inline-block {
        width: 100%;
    }
    
    .search-container {
        width: 100%;
        border-radius: 12px;
        padding: 6px;
    }
    
    .search-input {
        min-width: auto;
        flex: 1;
        font-size: 0.875rem;
        padding: 8px 12px;
    }
    
    /* Badges mobile */
    .badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
        border-radius: 6px;
        font-weight: 600;
    }
    
    /* Alertes mobile */
    .alert {
        padding: 1rem 1.25rem;
        border-radius: 12px;
        font-size: 0.875rem;
        border-left-width: 4px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    /* Modals mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-content {
        border-radius: 12px;
        border: none;
        box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    }
    
    .modal-header {
        padding: 1.25rem 1.5rem;
        border-bottom: 2px solid #e9ecef;
        border-radius: 12px 12px 0 0;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-footer {
        padding: 1rem 1.5rem;
        border-top: 2px solid #e9ecef;
        border-radius: 0 0 12px 12px;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        flex: 1;
        min-width: 120px;
    }
    
    /* Pagination mobile */
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .page-link {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        font-size: 0.875rem;
    }
    
    /* Tabs mobile */
    .nav-tabs {
        flex-wrap: wrap;
        border-bottom: 2px solid #dee2e6;
    }
    
    .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        border-radius: 10px 10px 0 0;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Footer mobile */
    .footer {
        padding: 1.5rem 0;
        font-size: 0.875rem;
        text-align: center;
    }
    
    /* Amélioration générale de l'espacement */
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    .mb-3 {
        margin-bottom: 1.25rem !important;
    }
    
    .mt-4 {
        margin-top: 1.5rem !important;
    }
    
    .mt-3 {
        margin-top: 1.25rem !important;
    }
    
    /* Amélioration du scroll */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Amélioration de la lisibilité */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Styles pour la mise en page des formulaires sur deux colonnes */
.form-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 1rem;
}

    .form-column {
        flex: 1;
        min-width: 0;
    }

/* Styles pour la page d'attente */
.waiting-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.waiting-card {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.waiting-icon {
    font-size: 4rem;
    color: #ffc107;
    margin-bottom: 1.5rem;
}

.waiting-card h1 {
    color: #333;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.waiting-message {
    text-align: left;
    margin-bottom: 2rem;
}

.waiting-message p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #555;
}

.waiting-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    border-left: 4px solid #28a745;
}

.waiting-info h3 {
    color: #28a745;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.waiting-info ul {
    list-style: none;
    padding: 0;
}

.waiting-info li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.waiting-info li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.waiting-contact {
    background: #e3f2fd;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    border-left: 4px solid #2196f3;
}

.waiting-contact h3 {
    color: #2196f3;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.waiting-actions {
    margin-top: 2rem;
}

.waiting-actions .btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

/* Styles pour la page d'approbation */
.approval-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.approval-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    max-width: 800px;
    width: 100%;
}

.approval-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.approval-header h1 {
    margin: 0;
    color: #333;
    font-size: 1.8rem;
}

.user-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.user-info h3 {
    color: #28a745;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.user-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.user-details .detail-item {
    display: flex;
    flex-direction: column;
}

.user-details .detail-item label {
    font-weight: bold;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.user-details .detail-item span {
    color: #333;
    font-size: 1rem;
}

.approval-form h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.form-help {
    color: #666;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.role-descriptions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.role-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #28a745;
    transition: transform 0.2s ease;
}

.role-card:hover {
    transform: translateY(-2px);
}

.role-card h4 {
    color: #28a745;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.role-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.form-actions .btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

.form-column .form-group {
    margin-bottom: 1rem;
}

.form-column .form-group:last-child {
    margin-bottom: 0;
}

/* Positionner le bouton de sauvegarde en bas à droite */
.form-group:has(button[type="submit"]) {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.form-group:has(button[type="submit"]) .btn {
    min-width: 200px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
}

/* Responsive pour les colonnes */
@media (max-width: 768px) {
    .form-layout {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-column {
        width: 100%;
    }
}

/* Styles pour la pagination */
.pagination-container {
    margin-top: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid #e9ecef;
}

.pagination-info {
    text-align: center;
    margin-bottom: 1rem;
}

.pagination-size-selector {
    text-align: center;
    margin-top: 1rem;
}

.pagination-size-selector a {
    color: #6c757d;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.pagination-size-selector a:hover {
    background-color: #e9ecef;
    color: #495057;
}

.pagination-size-selector a.fw-bold {
    color: #007bff;
    background-color: #e7f3ff;
}

.pagination .page-link {
    color: #007bff;
    border: 1px solid #dee2e6;
    transition: all 0.2s;
}

.pagination .page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Styles pour les filtres et la recherche */
.filters-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.filters-header h4 {
    margin: 0;
    color: #495057;
    font-size: 1rem;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-badge {
    background: #007bff;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-remove {
    color: white;
    text-decoration: none;
    font-size: 0.75rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.filter-remove:hover {
    opacity: 1;
    color: white;
}

.search-filters-container {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-filters-form .row {
    align-items: end;
}

.search-filters-form .form-control {
    border-radius: 6px;
}

.search-filters-form .btn {
    border-radius: 6px;
    font-size: 0.9rem;
}

.gap-2 {
    gap: 0.5rem;
}

/* Responsive pour les filtres */
@media (max-width: 768px) {
    .search-filters-form .row > div {
        margin-bottom: 1rem;
    }
    
    .search-filters-form .row > div:last-child {
        margin-bottom: 0;
    }
    
    .filters-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .active-filters {
        justify-content: center;
    }
}

/* Styles pour la liste déroulante de statut */
.statut-select {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid #e9ecef;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    cursor: pointer;
    position: relative;
    min-height: 3.5rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.statut-select:hover {
    border-color: #667eea;
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
    transform: translateY(-3px);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.statut-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.3rem rgba(102, 126, 234, 0.3);
    outline: none;
    transform: scale(1.02);
}

/* Amélioration du style de la liste déroulante */
.statut-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23495057' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.statut-select:hover {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23007bff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

.statut-select:focus {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23007bff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* Styles pour les options de la liste déroulante */
.statut-select option {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 0.75rem;
    margin: 0.5rem 0;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

/* Couleurs spécifiques pour chaque statut dans la liste déroulante */
.statut-select option[value*="DRAFT"] {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border-color: #6c757d;
}

.statut-select option[value*="PENDING"] {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: #212529;
    border-color: #ffd700;
}

.statut-select option[value*="CONFIRMED"] {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    border-color: #00d4ff;
}

.statut-select option[value*="IN_PROGRESS"] {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-color: #4facfe;
}

.statut-select option[value*="COMPLETED"] {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    border-color: #43e97b;
}

.statut-select option[value*="DELIVERED"] {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
    border-color: #fa709a;
}

.statut-select option[value*="INVOICED"] {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
    border-color: #a8edea;
}

.statut-select option[value*="CANCELLED"] {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border-color: #ff6b6b;
}

/* Style pour l'option sélectionnée */
.statut-select option:checked {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    font-weight: 600;
}

/* Style pour l'option au survol */
.statut-select option:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #495057;
}

/* Amélioration de l'apparence générale */
.statut-select {
    font-family: inherit;
    line-height: 1.5;
}

/* Style pour les icônes dans les options (si supporté) */
.statut-select option i {
    margin-right: 0.5rem;
    opacity: 0.8;
}

/* Amélioration générale du formulaire */
.form-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.form-section h3 {
    color: #495057;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-section h3 i {
    color: #667eea;
    font-size: 1.2em;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
    transition: color 0.3s ease;
}

.form-group:focus-within label {
    color: #667eea;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    /* transform: translateY(-1px); - supprimé pour éviter les conflits de curseur */
}

.form-control:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

/* Animation pour les champs de formulaire - désactivée pour éviter les conflits de curseur */
.form-control {
    /* animation: slideInUp 0.6s ease-out; */
}

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

/* Effet de brillance au survol - désactivé pour éviter les conflits de curseur */
.form-control::before {
    /* content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s; */
}

.form-control:hover::before {
    /* left: 100%; */
}

/* Style pour stabiliser le curseur sur les champs de saisie */
input[type="text"], input[type="number"] {
    cursor: text !important;
}

input[type="text"]:focus, input[type="number"]:focus {
    cursor: text !important;
}

/* Styles pour les filtres */
.filters-container {
    margin-bottom: 1.5rem;
}

.filters-container .card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.filters-container .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.filters-container .card-header:hover {
    background-color: #e9ecef;
}

.filters-container .card-header h5 {
    margin: 0;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filters-container .card-header i {
    margin-right: 0.5rem;
    color: #6c757d;
}

.filters-container .card-body {
    padding: 1rem;
    transition: all 0.3s ease;
}

.filters-container .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.filters-container .form-control {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.filters-container .form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.filters-container .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    margin-right: 0.5rem;
}

.filters-container .d-flex.gap-2 {
    gap: 0.5rem !important;
}

/* Animation pour le toggle des filtres */
.filters-container .card-body {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.filters-container .card-body[style*="display: none"] {
    max-height: 0;
    opacity: 0;
    padding: 0 1rem;
}

.filters-container .card-body[style*="display: block"] {
    max-height: 1000px;
    opacity: 1;
}

/* Responsive pour les filtres */
@media (max-width: 768px) {
    .filters-container .row .col-md-3 {
        margin-bottom: 1rem;
    }
    
    .filters-container .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filters-container .btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* Style pour l'affichage sélectionné avec couleur */
.statut-select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.statut-select-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0.75rem;
    pointer-events: none;
    z-index: -1;
    transition: all 0.3s ease;
}

/* Couleurs de fond pour chaque statut sélectionné */
.statut-select[data-selected="DRAFT"] {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border-color: #6c757d;
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

.statut-select[data-selected="PENDING"] {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: #212529;
    border-color: #ffd700;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.statut-select[data-selected="CONFIRMED"] {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    border-color: #00d4ff;
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.statut-select[data-selected="IN_PROGRESS"] {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-color: #4facfe;
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

.statut-select[data-selected="COMPLETED"] {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    border-color: #43e97b;
    box-shadow: 0 8px 25px rgba(67, 233, 123, 0.4);
}

.statut-select[data-selected="DELIVERED"] {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
    border-color: #fa709a;
    box-shadow: 0 8px 25px rgba(250, 112, 154, 0.4);
}

.statut-select[data-selected="INVOICED"] {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
    border-color: #a8edea;
    box-shadow: 0 8px 25px rgba(168, 237, 234, 0.4);
}

.statut-select[data-selected="CANCELLED"] {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border-color: #ff6b6b;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

/* Couleurs spécifiques pour chaque statut */
.statut-buttons .form-check-label[for*="DRAFT"] {
    border-color: #6c757d;
    color: #6c757d;
}

.statut-buttons .form-check-input:checked + .form-check-label[for*="DRAFT"] {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.statut-buttons .form-check-label[for*="PENDING"] {
    border-color: #ffc107;
    color: #856404;
}

.statut-buttons .form-check-input:checked + .form-check-label[for*="PENDING"] {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #856404;
}

.statut-buttons .form-check-label[for*="CONFIRMED"] {
    border-color: #17a2b8;
    color: #17a2b8;
}

.statut-buttons .form-check-input:checked + .form-check-label[for*="CONFIRMED"] {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.statut-buttons .form-check-label[for*="IN_PROGRESS"] {
    border-color: #007bff;
    color: #007bff;
}

.statut-buttons .form-check-input:checked + .form-check-label[for*="IN_PROGRESS"] {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.statut-buttons .form-check-label[for*="COMPLETED"] {
    border-color: #28a745;
    color: #28a745;
}

.statut-buttons .form-check-input:checked + .form-check-label[for*="COMPLETED"] {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.statut-buttons .form-check-label[for*="DELIVERED"] {
    border-color: #20c997;
    color: #20c997;
}

.statut-buttons .form-check-input:checked + .form-check-label[for*="DELIVERED"] {
    background-color: #20c997;
    border-color: #20c997;
    color: white;
}

.statut-buttons .form-check-label[for*="INVOICED"] {
    border-color: #6f42c1;
    color: #6f42c1;
}

.statut-buttons .form-check-input:checked + .form-check-label[for*="INVOICED"] {
    background-color: #6f42c1;
    border-color: #6f42c1;
    color: white;
}

.statut-buttons .form-check-label[for*="CANCELLED"] {
    border-color: #dc3545;
    color: #dc3545;
}

.statut-buttons .form-check-input:checked + .form-check-label[for*="CANCELLED"] {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Responsive pour les boutons de statut */
@media (max-width: 768px) {
    .statut-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .statut-buttons .form-check-label {
        min-width: auto;
        width: 100%;
    }
}

/* Mega Dropdown Styles */
.mega-dropdown {
    position: relative;
}

.mega-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 4px;
    position: relative;
}

.mega-dropdown-trigger:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.mega-dropdown-trigger i.fa-chevron-down {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.mega-dropdown:hover .mega-dropdown-trigger i.fa-chevron-down {
    transform: rotate(180deg);
}

.mega-dropdown-content,
body .mega-dropdown-content,
.nav .mega-dropdown-content,
html body .mega-dropdown-content,
html body .nav .mega-dropdown-content {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: #e8f5e9 !important; /* Vert clair */
    background-color: #e8f5e9 !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25) !important;
    min-width: 900px !important;
    max-width: 1200px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    pointer-events: none !important;
    z-index: 1000 !important;
    border: 1px solid #c8e6c9 !important; /* Bordure vert clair un peu plus foncé */
    padding: 1.5rem !important;
}

.mega-dropdown-content.show,
body .mega-dropdown-content.show,
.nav .mega-dropdown-content.show,
html body .mega-dropdown-content.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    background: #e8f5e9 !important;
    background-color: #e8f5e9 !important;
}

/* Fallback pour le cas où JavaScript ne fonctionne pas */
.mega-dropdown:hover .mega-dropdown-content,
body .mega-dropdown:hover .mega-dropdown-content,
html body .mega-dropdown:hover .mega-dropdown-content {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    background: #e8f5e9 !important;
    background-color: #e8f5e9 !important;
}

.mega-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.mega-dropdown-section,
.mega-dropdown-content .mega-dropdown-section,
body .mega-dropdown-content .mega-dropdown-section {
    min-width: 0 !important;
    background-color: transparent !important;
    background: transparent !important;
}

.mega-dropdown-section h4 {
    color: #1b5e20; /* Titre vert foncé pour contraste sur fond clair */
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4caf50; /* Bordure vert moyen */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mega-dropdown-section h4 i {
    color: #2e7d32; /* Icône vert moyen-foncé */
    font-size: 0.8rem;
}

.mega-dropdown-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-dropdown-section li {
    margin-bottom: 0.5rem;
}

.mega-dropdown-section a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: #1b5e20; /* Texte vert foncé pour contraste */
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.mega-dropdown-section a:hover {
    background-color: #c8e6c9; /* Fond un peu plus foncé au survol */
    color: #1b5e20;
    transform: translateX(5px);
    text-decoration: none;
}

.mega-dropdown-section a i {
    width: 16px;
    text-align: center;
    color: #2e7d32; /* Icône vert moyen */
    transition: color 0.3s ease;
}

.mega-dropdown-section a:hover i {
    color: #1b5e20;
}

/* Responsive Mega Dropdown */
@media (max-width: 768px) {
    .mega-dropdown-content {
        position: static;
        min-width: auto;
        max-width: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0;
        margin-top: 0.5rem;
        background: transparent;
        pointer-events: auto;
    }
    
    .mega-dropdown-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .mega-dropdown-section {
        background: rgba(255, 255, 255, 0.5);
        border-radius: 6px;
        padding: 1rem;
    }
    
    .mega-dropdown-section h4 {
        color: #1b5e20;
        border-bottom-color: #4caf50;
    }
    
    .mega-dropdown-section a {
        color: #1b5e20;
    }
    
    .mega-dropdown-section a:hover {
        background-color: rgba(0, 0, 0, 0.05);
        color: #000;
    }
    
    .mega-dropdown-section a i {
        color: #2e7d32;
    }
    
    .mega-dropdown-section a:hover i {
        color: #000;
    }
    
    .mega-dropdown-section a::before {
        display: none;
    }
}

/* Styles pour l'import/export Excel */
.excel-actions {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-left: 4px solid #28a745;
}

.excel-actions h4 {
    color: #28a745;
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Styles pour la modal d'import */
.modal {
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    animation: slideIn 0.3s ease-in-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Styles pour les boutons Excel */
.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
    color: white;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    color: white;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
    color: #212529;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: white;
}

/* Responsive pour la section Excel */
@media (max-width: 768px) {
    .excel-actions {
        padding: 0.75rem;
    }
    
    .excel-actions > div {
        flex-direction: column;
        align-items: stretch;
    }
    
    .excel-actions .header-actions {
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

