/* Style de base amélioré */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8fafc;
    color: #334155;
    padding-top: 70px; 
    
  
}

/* Style pour le bouton PDF */
.btn-success {
    background-color: #198754;
    border-color: #198754;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #157347;
}

/* Style pour les champs désactivés */
input[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Style pour la description */
.form-control {
    min-height: 80px;
    resize: vertical;
}

/* Style pour les champs désactivés */
textarea[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed ;
}

/* Style pour les labels des champs désactivés */
.disabled-label {
    color: #6c757d;
}

/* Style pour les cellules grisées */
.text-muted {
    color: #6c757d;
}

/* Tableau stylisé */
.table-container {
    border-radius: 12px;
    overflow:hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.table {
    margin-bottom: 0;
    background-color: white;
}

.table thead th {
    background: linear-gradient(5deg, #02104ede, #3184f8);
    color: white;
    font-weight: 500;
    text-transform:uppercase;
    font-size: 0.80rem;
    letter-spacing: 0.5px;
    border: none;
    padding: 1rem;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f5f3ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-top: 1px solid #0062e2;
}

/* Style des cellules de montant */
td:nth-child(2) { /* Recettes */
    color: #10b981;
    font-weight: 600;
}

td:nth-child(3) { /* Dépenses */
    color: #ef4444;
    font-weight: 600;
}

td:nth-child(5) { /* Bénéfices */
    color: #3b82f6;
    font-weight: 600;
}

td:nth-child(6) { /* Imprévus */
    color: #f59e0b;
    font-weight: 600;
}

/* Boutons d'action */
.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
    font-weight: 500;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.btn-warning {
    background-color: #0062e2;
    border-color:gainsboro;
    color: white;
}

.btn-warning:hover {
    background-color:#f59e0b;
    transform: translateY(-1px);
    color: white;
   
}

.btn-danger {
    background-color: #ef4444;
    border-color: #ef4444;
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
}

/* Message d'erreur amélioré */
.error-message {
    background: #ffebee;
    border-left: 4px solid #f44336;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .table-responsive {
        border-radius: 8px;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border-radius: 8px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        border: none;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #64748b;
        margin-right: 1rem;
    }
    
    .table tbody td:last-child {
        border-bottom: none;
        justify-content: center;
        gap: 0.5rem;
    }
    
}

/* Animation pour les lignes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.table tbody tr {
    animation: fadeIn 0.3s ease forwards;
}

.table tbody tr:nth-child(1) { animation-delay: 0.1s; }
.table tbody tr:nth-child(2) { animation-delay: 0.2s; }
.table tbody tr:nth-child(3) { animation-delay: 0.3s; }
.table tbody tr:nth-child(4) { animation-delay: 0.4s; }
.table tbody tr:nth-child(5) { animation-delay: 0.5s; }
.table tbody tr:nth-child(6) { animation-delay: 0.6s; }
.table tbody tr:nth-child(7) { animation-delay: 0.7s; }
.table tbody tr:nth-child(8) { animation-delay: 0.8s; }
/* Continuez selon le nombre de lignes attendues */