/* ========================================
   STEP 8 - BUDGET RECAP
   Styles pour la page de récapitulatif budgétaire CFI.
   Source : design system /campaign_generation/step9_budget_light.html
   ======================================== */

/* Badge numéroté de section (02, 03, 04, 05) */
.budget-section-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    border-radius: 8px;
    background: var(--bs-primary, #003080);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.budget-section-code--02 { background: #1d4ed8; }
.budget-section-code--03 { background: #0d9488; }
.budget-section-code--04 { background: #c2410c; }
.budget-section-code--05 { background: #7e22ce; }

.budget-tarif-section-title {
    font-weight: 600;
    color: var(--bs-body-color, #1a1a1a);
}

.budget-tarif-table {
    margin-bottom: 0;
}

.budget-tarif-table thead th {
    /* Fond et bordure thematiques (--theme-bg-secondary suit le theme :
       gris pale en light, bordeaux/marine semi-transparent en dark). Color
       sur --theme-text-secondary pour rester lisible dans les 3 themes. */
    background: var(--theme-bg-secondary, #f5f7fa);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--theme-text-secondary, #6c757d);
    border-bottom: 2px solid var(--theme-border-color, #e5e7eb);
}

.budget-tarif-table tfoot td {
    background: var(--theme-bg-secondary, #fafbfc);
    color: var(--theme-text-primary, #1a1a1a);
    font-size: 0.95rem;
    border-top: 2px solid var(--theme-border-color, #e5e7eb);
}

.budget-col-prestation { width: 35%; }
.budget-col-unite      { width: 15%; }
.budget-col-prix       { width: 15%; }
.budget-col-qty        { width: 12%; }
.budget-col-total      { width: 23%; }

/* Carte du grand total (fond bleu clair, accent primary) */
.budget-grand-total {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.04) 0%, rgba(0, 48, 128, 0.06) 100%);
    border: 1px solid rgba(13, 110, 253, 0.15);
}

.budget-grand-total .display-5 {
    font-size: 2.25rem;
    line-height: 1;
}

/* Variante Avanci : carte cadree (bordure primary 2px + radius + padding),
   conforme au mockup design system (.budget-total-card). */
.budget-grand-total--avanci {
    border: 2px solid var(--color-primary);
    border-radius: var(--border-radius-xl);
    padding: var(--spacing-2xl);
}

/* Bloc paiement PayPal (mode Avanci) — encadre thematique aligne sur le grand total */
.budget-payment-card {
    border: 1px solid var(--theme-border-color, #e5e7eb);
    background: var(--theme-bg-secondary, #fafbfc);
}

/* Montant « Tarif Avanci a definir » (placeholder violet, source design system) :
   utilise dans la carte Total et le bloc Paiement quand le tarif n'est pas resolu. */
.budget-total-pending {
    color: #7e22ce;
}

/* Conteneur du bouton PayPal : largeur contrainte pour rester inline avec le
   montant (mockup), au lieu d'occuper toute la largeur de la carte. */
.budget-paypal-btn {
    width: 100%;
    max-width: 280px;
}

/* Badge securite « SSL / 3D Secure » du bloc paiement (mockup step9_budget_light) */
.budget-paypal-secure {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(25, 135, 84, 0.10);
    color: var(--bs-success, #198754);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Bandeau Avanci (mode AVANCI / UPLOAD_AVANCI) — encadre violet leger, source design system */
.budget-avanci-banner {
    background: linear-gradient(135deg, rgba(126, 34, 206, 0.06), rgba(126, 34, 206, 0.02));
    border: 1px solid rgba(126, 34, 206, 0.20);
    border-radius: 14px;
    padding: 1rem 1.5rem;
}

.budget-avanci-icon {
    color: #7e22ce;
}

.budget-avanci-logo {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #7e22ce;
}

/* Responsive : sur mobile, les codes sections restent visibles et la table scroll */
@media (max-width: 767.98px) {
    .budget-tarif-section-header {
        flex-wrap: wrap;
    }

    .budget-tarif-section-header .ms-auto {
        width: 100%;
        margin-top: 0.5rem;
        margin-left: 0 !important;
    }
}
