/* Budget Prévisions - Styles Frontend */

.bp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Header */
.bp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #2271b1;
}

.bp-header h2 {
    margin: 0;
    font-size: 28px;
    color: #1d2327;
}

.bp-btn-export {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bp-btn-export:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Carte mois */
.bp-mois-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.bp-mois-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Header mois */
.bp-mois-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bp-mois-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.bp-solde {
    font-size: 20px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 25px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.bp-solde.bp-positif {
    background: rgba(76, 175, 80, 0.3);
    color: #fff;
}

.bp-solde.bp-negatif {
    background: rgba(244, 67, 54, 0.3);
    color: #fff;
}

/* Résumé */
.bp-resume {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-bottom: 1px solid #e0e0e0;
}

.bp-resume-item {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bp-resume-item:first-child {
    border-right: 1px solid #e0e0e0;
}

.bp-salaire {
    background: #f0f9ff;
}

.bp-depenses-total {
    background: #fef3f2;
}

.bp-label {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bp-montant {
    font-size: 18px;
    font-weight: 700;
}

.bp-salaire .bp-montant {
    color: #16a34a;
}

.bp-depenses-total .bp-montant {
    color: #dc2626;
}

/* Liste des dépenses */
.bp-depenses-liste {
    padding: 25px;
}

.bp-depenses-liste h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #475569;
}

.bp-no-depenses {
    text-align: center;
    padding: 30px;
    color: #16a34a;
    font-size: 16px;
    font-weight: 500;
}

/* Tableau */
.bp-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.bp-table thead {
    background: #f8fafc;
}

.bp-table th {
    padding: 12px 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.bp-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.bp-table tbody tr:hover {
    background: #f8fafc;
}

.bp-table td {
    padding: 15px;
    font-size: 14px;
    color: #334155;
}

.bp-montant-cell {
    font-weight: 600;
    color: #dc2626;
    text-align: right;
}

/* Badge type */
.bp-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bp-type-récurrente {
    background: #dbeafe;
    color: #1e40af;
}

.bp-type-ponctuelle {
    background: #fef3c7;
    color: #92400e;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .bp-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .bp-mois-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .bp-resume {
        grid-template-columns: 1fr;
    }
    
    .bp-resume-item:first-child {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .bp-table {
        font-size: 12px;
    }
    
    .bp-table th,
    .bp-table td {
        padding: 10px 8px;
    }
    
    .bp-type-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
}

@media screen and (max-width: 480px) {
    .bp-container {
        padding: 10px;
    }
    
    .bp-header h2 {
        font-size: 22px;
    }
    
    .bp-btn-export {
        width: 100%;
        padding: 10px;
    }
    
    .bp-mois-header h3 {
        font-size: 18px;
    }
    
    .bp-solde {
        font-size: 16px;
        padding: 8px 15px;
    }
    
    /* Table responsive - format mobile */
    .bp-table thead {
        display: none;
    }
    
    .bp-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .bp-table td {
        display: block;
        text-align: right;
        padding: 10px 15px;
        border-bottom: 1px solid #f1f5f9;
        position: relative;
        padding-left: 50%;
    }
    
    .bp-table td:last-child {
        border-bottom: none;
    }
    
    .bp-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        font-weight: 600;
        color: #64748b;
        text-transform: uppercase;
        font-size: 11px;
    }
    
    .bp-montant-cell {
        text-align: right;
        font-size: 16px;
    }
}

/* Animation d'entrée */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bp-mois-card {
    animation: slideIn 0.4s ease-out;
}
