            .billing-forecast {
                margin: 20px 0;
                font-family: Arial, sans-serif;
            }
            
            .info-notice {
                background: #e7f3ff;
                border-left: 4px solid #0073aa;
                padding: 10px 15px;
                margin: 15px 0;
                border-radius: 4px;
            }
            
            .info-notice p {
                margin: 0;
                font-size: 0.95em;
            }
            
            .no-data-message {
                text-align: center;
                padding: 40px 20px;
                color: #666;
                background: #f9f9f9;
                border-radius: 8px;
                margin: 20px 0;
            }
            
            .pagination-info {
                background: #f8f9fa;
                padding: 10px 15px;
                border-radius: 4px;
                margin-bottom: 15px;
                border-left: 4px solid #0073aa;
            }
            
            .pagination-info p {
                margin: 0;
                color: #495057;
                font-size: 0.9em;
            }
            
            .summary-totals {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
                gap: 15px;
                margin: 25px 0;
            }
            
            .total-box {
                background: white;
                padding: 20px;
                border-radius: 8px;
                box-shadow: 0 2px 4px rgba(0,0,0,0.1);
                text-align: center;
                border-left: 4px solid #0073aa;
            }
            
            .total-box.grand-total {
                background: #0073aa;
                color: white;
                border-left: 4px solid #005a87;
            }
            
            .total-box h4 {
                margin: 0 0 10px 0;
                font-size: 0.9em;
                text-transform: uppercase;
                letter-spacing: 1px;
            }
            
            .total-box .amount {
                font-size: 1.5em;
                font-weight: bold;
            }
            
            .grand-total .amount {
                font-size: 1.8em;
            }
            
            .section-toggle {
                margin: 30px 0;
                border: 1px solid #ddd;
                border-radius: 8px;
                overflow: hidden;
            }
            
            .toggle-header {
                background: #f8f9fa;
                margin: 0;
                padding: 15px 20px;
                cursor: pointer;
                display: flex;
                align-items: center;
                transition: background 0.3s ease;
            }
            
            .toggle-header:hover {
                background: #e9ecef;
            }
            
            .toggle-chevron {
                margin-right: 10px;
                transition: transform 0.3s ease;
            }
            
            .toggle-content {
                padding: 0;
            }
            
            .billing-table, .details-table {
                width: 100%;
                border-collapse: collapse;
                margin: 0;
            }
            
            .billing-table th,
            .billing-table td,
            .details-table th,
            .details-table td {
                padding: 12px;
                text-align: left;
                border-bottom: 1px solid #eee;
            }
            
            .billing-table th,
            .details-table th {
                background: #f8f9fa;
                font-weight: bold;
                border-bottom: 2px solid #ddd;
            }
            
            .amount {
                text-align: right;
                font-family: 'Courier New', monospace;
            }
            
            .amount.total {
                font-weight: bold;
                color: #0073aa;
            }
            
            /* Styles pour le tableau compact des options */
            .compact-options td {
                vertical-align: top;
                padding: 8px 12px;
            }
            
            .equide-info {
                margin-bottom: 8px;
            }
            
            .equide-type {
                color: #666;
                font-style: italic;
            }
            
            .options-group {
                margin: 5px 0;
            }
            
            .group-label {
                font-weight: bold;
                color: #555;
                font-size: 0.9em;
            }
            
            .option-item {
                display: flex;
                justify-content: space-between;
                margin: 2px 0;
                padding-left: 10px;
                font-size: 0.85em;
            }
            
            .option-amount {
                font-family: 'Courier New', monospace;
                color: #333;
            }
            
            .presence-info {
                text-align: center;
                min-width: 120px;
            }
            
            .prorata-badge {
                background: #fff3cd;
                color: #856404;
                padding: 4px 8px;
                border-radius: 12px;
                font-size: 0.8em;
                font-weight: bold;
                margin-bottom: 4px;
            }
            
            .full-month {
                color: #155724;
                font-weight: bold;
                font-size: 0.9em;
            }
            
            .total-equide {
                font-weight: bold;
                border-top: 2px solid #0073aa;
            }
            
            /* Responsive */
            @media (max-width: 768px) {
                .summary-totals {
                    grid-template-columns: 1fr;
                }
                
                .billing-table, .details-table {
                    font-size: 0.9em;
                }
            }
 
    .ndf-list-with-details {
        max-width: 1000px;
        margin: 20px auto;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        overflow: hidden;
    }

    .ndf-list-header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 25px;
        text-align: center;
    }

    .ndf-list-header h3 {
        margin: 0 0 10px 0;
        font-size: 1.8em;
        font-weight: 300;
    }

    .ndf-list-header p {
        margin: 0;
        opacity: 0.9;
    }

    .ndf-empty-state {
        text-align: center;
        padding: 60px 20px;
        color: #6c757d;
    }

    .empty-icon {
        font-size: 64px;
        margin-bottom: 20px;
    }

    .ndf-empty-state h4 {
        margin-bottom: 10px;
        color: #495057;
    }

    .ndf-list-container {
        padding: 0;
    }

    .ndf-item {
        border-bottom: 1px solid #e9ecef;
    }

    .ndf-item:last-child {
        border-bottom: none;
    }

    .ndf-summary {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 25px;
        cursor: pointer;
        transition: background-color 0.3s;
    }

    .ndf-summary:hover {
        background: #f8f9fa;
    }

    .ndf-summary-content {
        display: flex;
        flex-direction: column;
        gap: 8px;
        flex: 1;
    }

    .ndf-ref-date {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .ndf-reference {
        font-size: 1.1em;
        color: #495057;
    }

    .ndf-date {
        color: #6c757d;
        font-size: 0.9em;
    }

    .ndf-info {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .ndf-amount {
        font-weight: bold;
        color: #495057;
    }

    .ndf-items {
        color: #6c757d;
        font-size: 0.9em;
    }

    .statut-badge {
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.85em;
        font-weight: bold;
        text-transform: uppercase;
    }

    .statut-en_attente {
        background: #fff3cd;
        color: #856404;
    }

    .statut-paye {
        background: #d4edda;
        color: #155724;
    }

    .statut-annule {
        background: #f8d7da;
        color: #721c24;
    }

    .ndf-toggle-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 16px;
        background: #667eea;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 0.9em;
        transition: all 0.3s;
    }

    .ndf-toggle-btn:hover {
        background: #764ba2;
    }

    .ndf-toggle-btn.active {
        background: #764ba2;
    }

    .ndf-toggle-btn.active .toggle-icon {
        transform: rotate(180deg);
    }

    .toggle-icon {
        transition: transform 0.3s;
        font-size: 0.8em;
    }

    .ndf-details {
        background: #f8f9fa;
        border-top: 1px solid #dee2e6;
    }

    .ndf-details-content {
        padding: 25px;
    }

    .ndf-details-loading {
        text-align: center;
        padding: 40px 20px;
        color: #6c757d;
    }

    .loading-spinner {
        border: 3px solid #f3f3f3;
        border-top: 3px solid #667eea;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        animation: spin 1s linear infinite;
        margin: 0 auto 15px;
    }

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

    /* Styles pour les détails de la NDF */
    .ndf-detail-header {
        background: white;
        padding: 20px;
        border-radius: 8px;
        margin-bottom: 20px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    .ndf-detail-meta {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin-bottom: 15px;
    }

    .summary-totals-ndf {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
        margin: 20px 0;
    }

    .total-box-ndf {
        background: white;
        padding: 15px;
        border-radius: 6px;
        text-align: center;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        border-left: 4px solid #667eea;
    }

    .total-box-ndf.grand-total {
        background: #667eea;
        color: white;
    }

    .total-box-ndf h4 {
        margin: 0 0 8px 0;
        font-size: 0.8em;
        text-transform: uppercase;
    }

    .total-box-ndf .amount {
        font-size: 1.2em;
        font-weight: bold;
    }

    .ndf-details-table {
        width: 100%;
        border-collapse: collapse;
        background: white;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

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

    .ndf-details-table td {
        padding: 12px 15px;
        border-bottom: 1px solid #e9ecef;
    }

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

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

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

    /* Responsive */
    @media (max-width: 768px) {
        .ndf-summary {
            flex-direction: column;
            align-items: flex-start;
            gap: 15px;
        }

        .ndf-ref-date {
            flex-direction: column;
            align-items: flex-start;
            gap: 5px;
        }

        .ndf-info {
            flex-wrap: wrap;
            gap: 10px;
        }

        .ndf-toggle-btn {
            align-self: flex-end;
        }

        .ndf-details-content {
            padding: 15px;
        }

        .ndf-details-table {
            font-size: 0.9em;
        }

        .summary-totals-ndf {
            grid-template-columns: 1fr;
        }
    }


            .monthly-forecast {
                margin: 20px 0;
                font-family: Arial, sans-serif;
            }
            
            /* Styles pour la recherche AJAX */
            .search-container {
                margin-bottom: 20px;
            }
            
            .search-box {
                position: relative;
                max-width: 400px;
                margin-bottom: 10px;
            }
            
            .search-input {
                width: 100%;
                padding: 12px 40px 12px 40px;
                border: 2px solid #ddd;
                border-radius: 25px;
                font-size: 16px;
                transition: all 0.3s ease;
                box-sizing: border-box;
            }
            
            .search-input:focus {
                border-color: #0073aa;
                outline: none;
                box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
            }
            
            .search-icon {
                position: absolute;
                left: 15px;
                top: 50%;
                transform: translateY(-50%);
                color: #666;
            }
            
            .clear-search {
                position: absolute;
                right: 15px;
                top: 50%;
                transform: translateY(-50%);
                background: none;
                border: none;
                font-size: 20px;
                color: #666;
                cursor: pointer;
                padding: 0;
                width: 20px;
                height: 20px;
                display: flex;
                align-items: center;
                justify-content: center;
            }
            
            .clear-search:hover {
                color: #333;
            }
            
            .search-info {
                font-size: 0.9em;
                color: #666;
                margin-top: 5px;
            }
            
            .loading {
                text-align: center;
                padding: 40px 20px;
                color: #666;
            }
            
            .loading-spinner {
                border: 3px solid #f3f3f3;
                border-top: 3px solid #0073aa;
                border-radius: 50%;
                width: 30px;
                height: 30px;
                animation: spin 1s linear infinite;
                margin: 0 auto 10px;
            }
            
            @keyframes spin {
                0% { transform: rotate(0deg); }
                100% { transform: rotate(360deg); }
            }
            
            .pagination-info {
                background: #f8f9fa;
                padding: 10px 15px;
                border-radius: 4px;
                margin-bottom: 15px;
                border-left: 4px solid #0073aa;
            }
            
            .pagination-info p {
                margin: 0;
                color: #495057;
                font-size: 0.9em;
            }
            
            .forecast-table {
                width: 100%;
                border-collapse: collapse;
                margin-top: 10px;
                margin-bottom: 20px;
            }
            
            .forecast-table th,
            .forecast-table td {
                padding: 10px;
                text-align: left;
                border: 1px solid #ddd;
            }
            
            .forecast-table th {
                background-color: #f8f9fa;
                font-weight: bold;
                position: sticky;
                top: 0;
            }
            
            .availability-cell {
                text-align: center;
            }
            
            .availability-indicator {
                padding: 4px 8px;
                border-radius: 12px;
                font-weight: bold;
                font-size: 0.9em;
            }
            
            .availability-available .availability-indicator {
                background-color: #d4edda;
                color: #155724;
            }
            
            .availability-low .availability-indicator {
                background-color: #fff3cd;
                color: #856404;
            }
            
            .availability-full .availability-indicator {
                background-color: #f8d7da;
                color: #721c24;
            }
            
            .course-row:hover {
                background-color: #f8f9fa;
            }
            
            /* Styles de pagination */
            .pagination {
                display: flex;
                justify-content: center;
                align-items: center;
                gap: 5px;
                margin: 20px 0;
                flex-wrap: wrap;
            }
            
            .pagination a,
            .pagination span {
                padding: 8px 12px;
                border: 1px solid #ddd;
                border-radius: 4px;
                text-decoration: none;
                color: #0073aa;
                font-size: 0.9em;
                transition: all 0.3s ease;
            }
            
            .pagination a:hover {
                background: #0073aa;
                color: white;
                border-color: #0073aa;
            }
            
            .pagination-current {
                background: #0073aa;
                color: white;
                border-color: #0073aa;
                font-weight: bold;
            }
            
            .pagination-numbers {
                display: flex;
                gap: 5px;
            }
            
            .pagination-first,
            .pagination-last {
                font-weight: bold;
            }
            
            .pagination-prev,
            .pagination-next {
                font-weight: bold;
            }
            
            /* Responsive */
            @media (max-width: 768px) {
                .forecast-table {
                    font-size: 0.9em;
                }
                
                .forecast-table th,
                .forecast-table td {
                    padding: 6px 8px;
                }
                
                .pagination {
                    flex-direction: column;
                    gap: 10px;
                }
                
                .pagination-numbers {
                    order: 2;
                }
                
                .pagination-first,
                .pagination-prev {
                    order: 1;
                }
                
                .pagination-next,
                .pagination-last {
                    order: 3;
                }
            }
            
            @media (max-width: 480px) {
                .forecast-table {
                    display: block;
                    overflow-x: auto;
                    white-space: nowrap;
                }
                
                .pagination a,
                .pagination span {
                    padding: 6px 8px;
                    font-size: 0.8em;
                }
            }


   /* ===== STYLES GÉNÉRAUX ===== */
    .generation-factures-wrapper {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
        max-width: 1000px;
        margin: 0 auto;
        padding: 20px;
        color: #333;
    }
    
    /* ===== HEADER ===== */
    .generation-header {
        margin-bottom: 30px;
    }
    
    .generation-title {
        font-size: 28px;
        font-weight: 600;
        color: #2c3e50;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .title-icon {
        font-size: 32px;
    }
    
    /* ===== CARTES ===== */
    .info-card,
    .warning-card,
    .generation-card,
    .logs-card,
    .success-card,
    .error-card {
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        margin-bottom: 24px;
        overflow: hidden;
        border: 1px solid #e0e6ed;
    }
    
    .card-header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 20px 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .card-header h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .card-icon {
        font-size: 20px;
    }
    
    .card-body {
        padding: 24px;
    }
    
    /* ===== CARTE SUCCÈS ===== */
    .success-card {
        border-left: 4px solid #10b981;
    }
    
    .success-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .success-icon {
        font-size: 24px;
        color: #10b981;
    }
    
    .success-header h3 {
        margin: 0;
        color: #10b981;
        font-size: 20px;
    }
    
    .success-details {
        background: #f0fdf4;
        border-radius: 8px;
        padding: 15px;
        margin-top: 15px;
    }
    
    .success-item {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 10px;
        padding: 8px 0;
    }
    
    .success-item:last-child {
        margin-bottom: 0;
    }
    
    .detail-icon {
        font-size: 18px;
        color: #059669;
    }
    
    .detail-content {
        flex: 1;
    }
    
    .detail-content strong {
        display: block;
        font-size: 14px;
        color: #374151;
        margin-bottom: 2px;
    }
    
    .detail-content span {
        display: block;
        font-size: 15px;
        color: #047857;
        font-weight: 500;
    }
    
    .errors-section {
        margin-top: 20px;
        padding-top: 15px;
        border-top: 1px solid #e5e7eb;
    }
    
    .errors-section h4 {
        color: #f59e0b;
        margin: 0 0 10px 0;
        font-size: 16px;
    }
    
    .errors-list {
        margin: 0;
        padding-left: 20px;
        color: #92400e;
    }
    
    .errors-list li {
        margin-bottom: 5px;
        font-size: 14px;
    }
    
    /* ===== CARTE ERREUR ===== */
    .error-card {
        border-left: 4px solid #ef4444;
    }
    
    .error-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .error-icon {
        font-size: 24px;
        color: #ef4444;
    }
    
    .error-header h3 {
        margin: 0;
        color: #ef4444;
        font-size: 20px;
    }
    
    /* ===== CARTE INFO ===== */
    .info-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
    }
    
    .info-item {
        display: flex;
        gap: 15px;
        align-items: flex-start;
    }
    
    .info-icon {
        font-size: 24px;
        color: #667eea;
        background: #f0f4ff;
        width: 50px;
        height: 50px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .info-content h4 {
        margin: 0 0 5px 0;
        color: #2c3e50;
        font-size: 16px;
        font-weight: 600;
    }
    
    .info-content p {
        margin: 0;
        color: #64748b;
        font-size: 14px;
        line-height: 1.4;
    }
    
    /* ===== CARTE AVERTISSEMENT ===== */
    .warning-card {
        border-left: 4px solid #f59e0b;
    }
    
    .warning-content p {
        margin: 0 0 15px 0;
        color: #92400e;
        font-size: 15px;
        line-height: 1.5;
    }
    
    .warning-list {
        margin: 0;
        padding-left: 20px;
        color: #92400e;
    }
    
    .warning-list li {
        margin-bottom: 8px;
        padding-left: 5px;
        font-size: 14px;
    }
    
    /* ===== CARTE GÉNÉRATION ===== */
    .form-section {
        margin-bottom: 25px;
        padding-bottom: 20px;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .form-section:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }
    
    .form-section h4 {
        margin: 0 0 15px 0;
        color: #374151;
        font-size: 16px;
        font-weight: 600;
    }
    
    .operation-summary {
        background: #f8fafc;
        border-radius: 8px;
        padding: 15px;
    }
    
    .summary-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .summary-item:last-child {
        border-bottom: none;
    }
    
    .summary-label {
        color: #64748b;
        font-size: 14px;
    }
    
    .summary-value {
        color: #334155;
        font-weight: 500;
        font-size: 15px;
    }
    
    /* Checkbox personnalisée */
    .checkbox-container {
        display: block;
        position: relative;
        padding-left: 35px;
        cursor: pointer;
        font-size: 14px;
        color: #4b5563;
        line-height: 1.5;
        user-select: none;
    }
    
    .checkbox-container input {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
    }
    
    .checkmark {
        position: absolute;
        top: 0;
        left: 0;
        height: 22px;
        width: 22px;
        background-color: #f3f4f6;
        border: 2px solid #d1d5db;
        border-radius: 4px;
        transition: all 0.3s ease;
    }
    
    .checkbox-container:hover input ~ .checkmark {
        background-color: #e5e7eb;
        border-color: #9ca3af;
    }
    
    .checkbox-container input:checked ~ .checkmark {
        background-color: #10b981;
        border-color: #10b981;
    }
    
    .checkmark:after {
        content: "";
        position: absolute;
        display: none;
    }
    
    .checkbox-container input:checked ~ .checkmark:after {
        display: block;
    }
    
    .checkbox-container .checkmark:after {
        left: 7px;
        top: 3px;
        width: 5px;
        height: 10px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
    }
    
    .checkbox-label {
        display: block;
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* Boutons */
    .form-actions {
        display: flex;
        gap: 15px;
        margin-top: 30px;
        flex-wrap: wrap;
    }
    
    .btn {
        padding: 14px 24px;
        border-radius: 8px;
        font-size: 15px;
        font-weight: 500;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
        border: none;
        transition: all 0.3s ease;
        min-height: 48px;
    }
    
    .btn-primary {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        flex: 1;
    }
    
    .btn-primary:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    }
    
    .btn-secondary {
        background: #f8f9fa;
        color: #5e6c84;
        border: 2px solid #e0e6ed;
    }
    
    .btn-secondary:hover {
        background: #e9ecef;
        border-color: #d0d7e0;
    }
    
    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none !important;
    }
    
    .btn-icon {
        font-size: 18px;
    }
    
    .btn-generate {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    }
    
    .btn-generate:hover:not(:disabled) {
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    }
    
    /* ===== CARTE LOGS ===== */
    .logs-card {
        border-left: 4px solid #8b5cf6;
    }
    
    .execution-stats {
        display: flex;
        gap: 30px;
        margin-bottom: 20px;
    }
    
    .stat-item {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .stat-label {
        color: #64748b;
        font-size: 14px;
    }
    
    .stat-value {
        font-size: 18px;
        font-weight: 700;
    }
    
    .stat-value.success {
        color: #10b981;
    }
    
    .stat-value.error {
        color: #ef4444;
    }
    
    .errors-detailed {
        background: #fef2f2;
        border-radius: 8px;
        padding: 15px;
        margin-top: 15px;
    }
    
    .errors-detailed h5 {
        margin: 0 0 10px 0;
        color: #dc2626;
        font-size: 15px;
    }
    
    .errors-container {
        max-height: 200px;
        overflow-y: auto;
    }
    
    .error-item {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 8px 0;
        border-bottom: 1px solid #fecaca;
    }
    
    .error-item:last-child {
        border-bottom: none;
    }
    
    .error-number {
        background: #ef4444;
        color: white;
        font-size: 12px;
        font-weight: 600;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .error-text {
        color: #991b1b;
        font-size: 13px;
        line-height: 1.4;
        flex: 1;
    }
    
    /* ===== RESPONSIVE ===== */
    @media (max-width: 768px) {
        .generation-factures-wrapper {
            padding: 15px;
        }
        
        .generation-title {
            font-size: 24px;
        }
        
        .card-header {
            padding: 16px;
        }
        
        .card-body {
            padding: 16px;
        }
        
        .info-grid {
            grid-template-columns: 1fr;
        }
        
        .execution-stats {
            flex-direction: column;
            gap: 15px;
        }
        
        .form-actions {
            flex-direction: column;
        }
        
        .btn {
            width: 100%;
            justify-content: center;
        }
    }
    
    @media (max-width: 480px) {
        .generation-title {
            font-size: 20px;
            flex-direction: column;
            align-items: flex-start;
            gap: 5px;
        }
        
        .btn {
            padding: 12px 16px;
            font-size: 14px;
        }
    }
 

       /* ===== STYLES GÉNÉRAUX ===== */
        /* ===== NOTIFICATIONS ===== */
        .notification-toast {
            animation: slideInRight 0.3s ease;
        }

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

        .notification-success {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        }

        .notification-error {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        }

        .notification-icon {
            font-size: 18px;
        }

        .notification-text {
            font-size: 14px;
        }

        /* ===== ÉTATS DE SAUVEGARDE ===== */
        .saved-ok {
            animation: savedPulse 0.6s ease;
        }

        @keyframes savedPulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.02); }
            100% { transform: scale(1); }
        }

        .btn-save-paiement.saving {
            background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%) !important;
        }
        .factures-admin-wrapper {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
            color: #333;
        }
        
        /* ===== HEADER ===== */
        .factures-header {
            margin-bottom: 30px;
        }
        
        .factures-title {
            font-size: 28px;
            font-weight: 600;
            color: #2c3e50;
            margin: 0;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .title-icon {
            font-size: 32px;
        }
        
        .title-month {
            color: #7f8c8d;
            font-size: 20px;
            font-weight: normal;
            margin-left: 10px;
        }
        
        /* ===== CARTES ===== */
        .filter-card,
        .stats-card,
        .factures-table-card,
        .status-legend-card {
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            margin-bottom: 24px;
            overflow: hidden;
            border: 1px solid #e0e6ed;
        }
        
        .card-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px 24px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .card-header h3 {
            margin: 0;
            font-size: 18px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .card-icon,
        .filter-icon {
            font-size: 20px;
        }
        
        .card-body {
            padding: 24px;
        }
        
        /* ===== LÉGENDE DES STATUTS ===== */
        .status-legend-card .card-header {
            background: linear-gradient(135deg, #9f7aea 0%, #6b46c1 100%);
        }
        
        .legend-items {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
        }
        
        .legend-item {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .status-indicator {
            display: inline-block;
            width: 20px;
            height: 20px;
            border-radius: 4px;
        }
        
        .status-paye {
            background-color: #10b981;
            border: 2px solid #047857;
        }
        
        .status-en-attente {
            background-color: #f59e0b;
            border: 2px solid #d97706;
        }
        
        .status-annule {
            background-color: #ef4444;
            border: 2px solid #dc2626;
        }
        
        .status-none {
            background-color: #9ca3af;
            border: 2px solid #6b7280;
        }
        
        .legend-text {
            font-size: 14px;
            color: #374151;
            font-weight: 500;
        }
        
        /* ===== FILTRE ===== */
        .filter-controls {
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
            align-items: flex-end;
            margin-bottom: 20px;
        }
        
        .filter-select-group {
            flex: 1;
            min-width: 250px;
        }
        
        .filter-label {
            display: block;
            margin-bottom: 8px;
            color: #5e6c84;
            font-weight: 500;
            font-size: 14px;
        }
        
        .select-wrapper {
            position: relative;
        }
        
        .month-select {
            width: 100%;
            padding: 12px 40px 12px 16px;
            border: 2px solid #e0e6ed;
            border-radius: 8px;
            font-size: 14px;
            color: #2c3e50;
            background: white;
            appearance: none;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .month-select:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }
        
        .select-arrow {
            position: absolute;
            right: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: #667eea;
            pointer-events: none;
            font-size: 12px;
        }
        
        .filter-buttons {
            display: flex;
            gap: 10px;
            flex-shrink: 0;
        }
        
        .btn {
            padding: 12px 20px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            text-decoration: none;
            border: none;
            transition: all 0.3s ease;
        }
        
        .btn-primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }
        
        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
        }
        
        .btn-secondary {
            background: #f8f9fa;
            color: #5e6c84;
            border: 2px solid #e0e6ed;
        }
        
        .btn-secondary:hover {
            background: #e9ecef;
            border-color: #d0d7e0;
        }
        
        .btn-icon {
            font-size: 16px;
        }
        
        .filter-info {
            padding: 16px;
            background: #f8f9fa;
            border-radius: 8px;
            border-left: 4px solid #667eea;
        }
        
        .filter-status {
            margin: 0;
            color: #5e6c84;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .status-icon {
            font-size: 18px;
        }
        
        /* ===== STATISTIQUES ===== */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
        }
        
        .stat-card {
            background: white;
            border-radius: 10px;
            padding: 24px;
            border: 1px solid #e0e6ed;
            display: flex;
            align-items: center;
            gap: 16px;
            transition: all 0.3s ease;
        }
        
        .stat-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }
        
        .stat-total {
            border-left: 4px solid #667eea;
        }
        
        .stat-pending {
            border-left: 4px solid #f6ad55;
        }
        
        .stat-icon {
            font-size: 32px;
            color: #667eea;
        }
        
        .stat-pending .stat-icon {
            color: #f6ad55;
        }
        
        .stat-content {
            flex: 1;
        }
        
        .stat-value {
            font-size: 28px;
            font-weight: 700;
            color: #2c3e50;
            line-height: 1;
            margin-bottom: 4px;
        }
        
        .stat-label {
            font-size: 14px;
            color: #5e6c84;
            margin-bottom: 8px;
        }
        
        .stat-amount {
            font-size: 18px;
            font-weight: 600;
            color: #2c3e50;
        }
        
        /* ===== TABLEAU DES FACTURES AVEC EXPANSION ===== */
        .table-responsive {
            overflow-x: auto;
            border-radius: 8px;
            border: 1px solid #e0e6ed;
        }
        
        .factures-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            min-width: 1200px;
        }
        
        .factures-table th {
            background: #f8f9fa;
            padding: 16px 12px;
            font-weight: 600;
            color: #5e6c84;
            text-align: left;
            border-bottom: 2px solid #e0e6ed;
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            white-space: nowrap;
        }
        
        .factures-table td {
            padding: 14px 12px;
            border-bottom: 1px solid #f1f3f9;
            vertical-align: middle;
            background: white;
        }
        
        /* Ligne de couleur dans la colonne date */
        .column-date {
            position: relative;
            border-left-width: 4px !important;
            border-left-style: solid !important;
            padding-left: 16px !important;
        }
        
        /* Styles de ligne selon le statut */
        .status-row-paye {
            background-color: #f0fdf4 !important;
        }
        
        .status-row-paye:hover {
            background-color: #dcfce7 !important;
        }
        
        .status-row-paye .column-date {
            border-left-color: #10b981 !important;
        }
        
        .status-row-en-attente {
            background-color: #fffbeb !important;
        }
        
        .status-row-en-attente:hover {
            background-color: #fef3c7 !important;
        }
        
        .status-row-en-attente .column-date {
            border-left-color: #f59e0b !important;
        }
        
        .status-row-annule {
            background-color: #fef2f2 !important;
        }
        
        .status-row-annule:hover {
            background-color: #fee2e2 !important;
        }
        
        .status-row-annule .column-date {
            border-left-color: #ef4444 !important;
        }
        
        .status-row-none {
            background-color: #f9fafb !important;
        }
        
        .status-row-none:hover {
            background-color: #f3f4f6 !important;
        }
        
        .status-row-none .column-date {
            border-left-color: #9ca3af !important;
        }
        
        .factures-table tbody tr {
            transition: all 0.3s ease;
        }
        
        /* Ligne principale (clickable) */
        .facture-row {
            cursor: pointer;
            transition: background-color 0.2s ease;
        }
        
        .facture-row:hover:not(.expanded) {
            background-color: #f8fafc !important;
        }
        
        .facture-row.expanded {
            background-color: #f0f9ff !important;
            box-shadow: inset 0 0 0 2px #3b82f6;
        }
        
        /* Animation pour la sauvegarde */
        .factures-table tbody tr.saved-ok {
            animation: savedPulse 0.6s ease;
        }
        
        @keyframes savedPulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.01); }
            100% { transform: scale(1); }
        }
        
        /* Colonnes spécifiques */
        .date-day {
            font-weight: 600;
            color: #2c3e50;
        }
        
        .date-year {
            font-size: 12px;
            color: #a0aec0;
        }
        
        .column-client {
            min-width: 200px;
        }
        
        .client-avatar {
            float: left;
            margin-right: 12px;
        }
        
        .client-avatar img {
            border-radius: 50%;
            width: 36px;
            height: 36px;
        }
        
        .client-info {
            overflow: hidden;
        }
        
        .client-name {
            display: block;
            font-weight: 600;
            color: #2c3e50;
            margin-bottom: 2px;
            font-size: 14px;
        }
        
        .client-email {
            display: block;
            font-size: 12px;
            color: #718096;
        }
        
        .column-ref {
            min-width: 120px;
        }
        
        .reference {
            font-family: 'Courier New', monospace;
            font-size: 13px;
            color: #718096;
        }
        
        .column-amount {
            min-width: 100px;
            font-weight: 600;
            color: #2c3e50;
        }
        
        /* Champs de formulaire */
        .mode-paiement-select,
        .statut-select,
        .reference-input,
        .date-paiement-input,
        .banque-input {
            width: 100%;
            padding: 8px 12px;
            border: 2px solid #e0e6ed;
            border-radius: 6px;
            font-size: 13px;
            color: #2c3e50;
            background: white;
            transition: all 0.3s ease;
        }
        
        .mode-paiement-select:focus,
        .statut-select:focus,
        .reference-input:focus,
        .date-paiement-input:focus,
        .banque-input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }
        
        .mode-paiement-select {
            min-width: 120px;
        }
        
        .statut-select {
            min-width: 110px;
        }
        
        .date-paiement-input {
            min-width: 120px;
        }
        
        .reference-input,
        .banque-input {
            min-width: 130px;
        }
        
        /* Boutons d'actions */
        .column-actions {
            min-width: 150px;
        }
        
        .action-buttons {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        
        /* Bouton sauvegarde */
        .btn-save-paiement {
            padding: 8px 16px;
            background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.3s ease;
            white-space: nowrap;
        }
        
        .btn-save-paiement:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
        }
        
        .btn-save-paiement:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }
        
        .btn-save-paiement.saving {
            background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
        }
        
        /* Bouton toggle détails */
        .btn-toggle-details {
            background: #64748b;
            color: white;
            border: none;
            border-radius: 4px;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .btn-toggle-details:hover {
            background: #475569;
            transform: translateY(-2px);
        }
        
        .btn-toggle-details.active {
            background: #3b82f6;
            transform: rotate(180deg);
        }
        
        .btn-toggle-details.active:hover {
            background: #2563eb;
        }
        
        .toggle-icon {
            font-size: 12px;
            transition: transform 0.3s ease;
        }
        
        /* ===== STYLES POUR LES DÉTAILS DE FACTURE ===== */
        .facture-details-row {
            background: #f8fafc !important;
            border-left: 4px solid #667eea;
        }
        
        .facture-details-container {
            padding: 0 !important;
            background: #f8fafc;
        }
        
        .details-loading {
            text-align: center;
            padding: 40px 20px;
            color: #64748b;
        }
        
        .details-content {
            padding: 20px;
        }
        
        .details-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid #e2e8f0;
        }
        
        .details-header h4 {
            margin: 0;
            color: #334155;
            font-size: 16px;
        }
        
        .btn-close-details {
            background: none;
            border: none;
            color: #64748b;
            cursor: pointer;
            font-size: 20px;
            padding: 0;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .btn-close-details:hover {
            color: #334155;
        }
        
        .details-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }
        
        .detail-card {
            background: white;
            border-radius: 8px;
            padding: 15px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            border: 1px solid #e2e8f0;
        }
        
        .detail-card h5 {
            margin: 0 0 10px 0;
            color: #475569;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .detail-value {
            font-size: 15px;
            color: #1e293b;
            font-weight: 500;
        }
        
        .detail-value.amount {
            font-family: 'Courier New', monospace;
            font-size: 16px;
        }
        
        .details-table-container {
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            margin-top: 20px;
        }
        
        .details-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 14px;
        }
        
        .details-table th {
            background: #f1f5f9;
            padding: 12px 15px;
            text-align: left;
            color: #475569;
            font-weight: 600;
            border-bottom: 2px solid #e2e8f0;
        }
        
        .details-table td {
            padding: 12px 15px;
            border-bottom: 1px solid #f1f5f9;
            color: #334155;
        }
        
        .details-table tbody tr:hover {
            background: #f8fafc;
        }
        
        .text-right {
            text-align: right;
        }
        
        .text-center {
            text-align: center;
        }
        
        .total-row {
            background: #f0f9ff !important;
            font-weight: 600;
            color: #0369a1;
        }
        
        /* Animation pour l'ouverture des détails */
        .facture-details-row.show {
            animation: slideDown 0.3s ease;
        }
        
        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* État vide */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
        }
        
        .empty-icon {
            font-size: 64px;
            margin-bottom: 20px;
            color: #e0e6ed;
        }
        
        .empty-state h4 {
            color: #5e6c84;
            margin-bottom: 12px;
        }
        
        .empty-state p {
            color: #a0aec0;
            max-width: 400px;
            margin: 0 auto;
        }
        
        /* ===== RESPONSIVE ===== */
        @media (max-width: 768px) {
            .factures-admin-wrapper {
                padding: 15px;
            }
            
            .factures-title {
                font-size: 24px;
            }
            
            .card-header {
                padding: 16px;
            }
            
            .card-body {
                padding: 16px;
            }
            
            .filter-controls {
                flex-direction: column;
                align-items: stretch;
            }
            
            .filter-select-group,
            .filter-buttons {
                width: 100%;
            }
            
            .filter-buttons {
                flex-direction: column;
            }
            
            .btn {
                justify-content: center;
            }
            
            .stats-grid {
                grid-template-columns: 1fr;
            }
            
            .stat-card {
                padding: 20px;
            }
            
            .legend-items {
                flex-direction: column;
                gap: 12px;
            }
            
            .table-responsive {
                margin: 0 -16px;
                border-radius: 0;
                border-left: none;
                border-right: none;
            }
            
            .factures-table th,
            .factures-table td {
                padding: 12px 8px;
                font-size: 12px;
            }
            
            .column-date {
                border-left-width: 3px !important;
                padding-left: 12px !important;
            }
            
            .action-buttons {
                flex-direction: column;
                gap: 6px;
            }
            
            .btn-save-paiement,
            .btn-toggle-details {
                width: 100%;
                justify-content: center;
            }
        }
        
        @media (max-width: 480px) {
            .factures-title {
                font-size: 20px;
                flex-direction: column;
                align-items: flex-start;
                gap: 5px;
            }
            
            .title-month {
                font-size: 16px;
                margin-left: 0;
            }
        }



/* Styles pour les codes comptables CEGID */
.code-comptable-badge {
    display: inline-block;
    padding: 3px 8px;
    background-color: #e0f2fe;
    color: #0369a1;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    border: 1px solid #7dd3fc;
}

/* Table avec code comptable */
.ndf-details-table th:nth-child(7),
.ndf-details-table td:nth-child(7) {
    text-align: center;
    width: 100px;
}

/* Style pour l'affichage admin */
.details-table th:nth-child(7),
.details-table td:nth-child(7) {
    text-align: center;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* Résumé des codes comptables */
.codes-comptables-summary {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.codes-comptables-summary h4 {
    margin-top: 0;
    color: #1e40af;
    font-size: 16px;
}

.code-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.code-summary-item:last-child {
    border-bottom: none;
}

.code-summary-code {
    font-weight: 600;
    color: #1e40af;
    font-family: 'Courier New', monospace;
}

.code-summary-total {
    font-weight: 600;
    color: #059669;
}

/* Styles pour les codes comptables CEGID */
.code-comptable-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    border: 1px solid;
    min-width: 70px;
    text-align: center;
}

.code-comptable-badge.code-706100 {
    background-color: #e0f2fe;
    color: #0369a1;
    border-color: #7dd3fc;
}

.code-comptable-badge.code-706200 {
    background-color: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

/* Table avec code comptable */
.ndf-details-table th:nth-child(7),
.ndf-details-table td:nth-child(7),
.details-table th:nth-child(7),
.details-table td:nth-child(7) {
    text-align: center;
    width: 100px;
}

/* Section codes CEGID */
.cegid-codes-summary {
    margin: 15px 0;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.code-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.code-label {
    font-weight: 600;
    color: #1e40af;
    font-family: 'Courier New', monospace;
    min-width: 80px;
}

.code-desc {
    color: #475569;
    font-size: 14px;
}

/* Statistiques */
.codes-stats-summary {
    margin: 20px 0;
    padding: 15px;
    background: #f0f9ff;
    border-radius: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-card {
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.stat-code {
    font-weight: 600;
    color: #1e40af;
    font-family: 'Courier New', monospace;
}

.stat-count {
    font-size: 12px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 10px;
}

.stat-label {
    font-size: 13px;
    color: #475569;
    margin-bottom: 8px;
}

.stat-amount {
    font-weight: 600;
    color: #059669;
    font-size: 18px;
}

/* Section CEGID dans admin */
.cegid-section {
    margin: 15px 0;
    padding: 15px;
    background: #f0f9ff;
    border-radius: 8px;
}

.cegid-codes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.cegid-code-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #bae6fd;
}

.cegid-code {
    font-weight: 600;
    color: #0369a1;
    font-family: 'Courier New', monospace;
    background: #e0f2fe;
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 70px;
    text-align: center;
}

.cegid-label {
    color: #475569;
    font-size: 14px;
}

/* Journal d'écriture */
.cegid-stats {
    margin: 20px 0;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

.stats-table table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table th {
    background: #e2e8f0;
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: #475569;
}

.stats-table td {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.code-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.journal-entries {
    margin-top: 15px;
}

.journal-entry {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.entry-header {
    background: #f1f5f9;
    padding: 10px 15px;
    display: flex;
    gap: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.entry-journal {
    font-weight: 600;
    color: #059669;
}

.entry-details {
    padding: 15px;
}

.entry-line {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.entry-line:last-child {
    border-bottom: none;
}

.entry-account {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #1e40af;
    min-width: 70px;
}

.entry-label {
    flex: 1;
    color: #475569;
}

.entry-debit, .entry-credit {
    min-width: 100px;
    text-align: right;
    font-weight: 600;
}

.entry-debit {
    color: #ef4444;
}

.entry-credit {
    color: #10b981;
}

/* Actions CEGID */
.cegid-actions {
    margin-top: 20px;
    padding: 15px;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.btn-cegid-export, .btn-cegid-copy, .btn-cegid-download {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-cegid-export {
    background: #3b82f6;
    color: white;
}

.btn-cegid-copy {
    background: #f59e0b;
    color: white;
}

.btn-cegid-download {
    background: #10b981;
    color: white;
    text-decoration: none;
}

.btn-icon {
    font-size: 16px;
}

/* Notice CEGID */
.cegid-info {
    margin-top: 10px;
    padding: 10px;
    background: #fef3c7;
    border-radius: 6px;
    border-left: 4px solid #f59e0b;
    font-size: 14px;
    color: #92400e;
}


    .cegid-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 10000;
    }
    .cegid-modal .modal-content {
        background: white;
        margin: 50px auto;
        width: 80%;
        max-width: 800px;
        border-radius: 8px;
    }