/**
 * Densification UX — pages compte / transactions IFY PAY (web).
 * Ajouter la classe .ify-tx-page sur le conteneur racine de chaque page.
 */
.ify-tx-page {
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
}

.ify-tx-page > .row > [class*="col-"] > h1,
.ify-tx-page > .row > [class*="col-"] > h2,
.ify-tx-page h2.mb-4,
.ify-tx-page .mb-4.h2 {
    margin-bottom: 0.75rem !important;
    font-size: 1.35rem;
}

.ify-tx-page .card-body {
    padding: 0.85rem 1rem;
}

.ify-tx-page .card-header {
    padding: 0.55rem 1rem;
}

.ify-tx-page .card-body.p-5 {
    padding: 1.25rem !important;
}

.ify-tx-page .py-4 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

.ify-tx-page .mb-4 {
    margin-bottom: 0.85rem !important;
}

.ify-tx-page .mb-3 {
    margin-bottom: 0.65rem !important;
}

.ify-tx-page .form-label {
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.ify-tx-page .form-control,
.ify-tx-page .form-select {
    min-height: calc(1.5em + 0.55rem + 2px);
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    font-size: 0.9rem;
}

.ify-tx-page .form-control-sm,
.ify-tx-page .form-select-sm {
    min-height: calc(1.5em + 0.45rem + 2px);
    font-size: 0.875rem;
}

.ify-tx-page .table > :not(caption) > * > * {
    padding: 0.45rem 0.6rem;
    font-size: 0.875rem;
}

.ify-tx-page .alert {
    padding: 0.55rem 0.85rem;
    margin-bottom: 0.85rem;
}

.ify-tx-page .btn:not(.btn-sm):not(.btn-lg) {
    padding: 0.35rem 0.85rem;
    font-size: 0.9rem;
}

/* Blocs du haut (grille 4 colonnes) */
.ify-tx-page .ify-tx-top-block {
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.55);
    height: 100%;
}

body.home-fintech-site .ify-tx-page .ify-tx-top-block {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 229, 255, 0.18);
}

/* Cartes portefeuille / stats plus denses */
.ify-tx-page .wallet-card .card-body,
.ify-tx-page .card .card-body.text-center.py-md-4 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

.ify-tx-page .fa-2x {
    font-size: 1.35em !important;
}

.ify-tx-page .fa-3x {
    font-size: 1.75em !important;
}

@media (min-width: 992px) {
    .ify-tx-page {
        padding-top: 0.65rem !important;
        padding-bottom: 0.65rem !important;
    }

    /* Grille portefeuilles : 4 colonnes sur grand écran */
    .ify-tx-page .ify-tx-wallet-col {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .ify-tx-page .ify-tx-stat-icon {
        font-size: 1.25rem !important;
        margin-bottom: 0.25rem !important;
    }
}

@media (max-width: 991.98px) {
    .ify-tx-page .ify-tx-top-grid > [class*="col-"] {
        margin-bottom: 0;
    }
}

/**
 * Surface claire lisible sous thème fintech (texte sombre sur fond clair).
 * Utiliser .ify-light-surface sur tout panneau / formulaire à fond clair.
 */
.ify-tx-page .ify-light-surface {
    background: #f8fafc;
    color: #1f2937;
}
body.home-fintech-site .ify-tx-page .ify-light-surface {
    background: #f8fafc !important;
    color: #1f2937 !important;
    -webkit-text-fill-color: #1f2937 !important;
}
body.home-fintech-site .ify-tx-page .ify-light-surface *:not(.btn):not(.badge):not(.form-check-input):not(.form-control):not(.form-select) {
    color: #1f2937 !important;
    -webkit-text-fill-color: #1f2937 !important;
}
body.home-fintech-site .ify-tx-page .ify-light-surface .text-muted,
body.home-fintech-site .ify-tx-page .ify-light-surface .text-secondary {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
}
body.home-fintech-site .ify-tx-page .ify-light-surface .form-control,
body.home-fintech-site .ify-tx-page .ify-light-surface .form-select {
    background: #fff !important;
    color: #1f2937 !important;
    -webkit-text-fill-color: #1f2937 !important;
    border-color: #cbd5e1 !important;
}

/**
 * BOWI import (retraits) — contraste forcé (fichier global, toujours chargé).
 * Corrige texte blanc sur fond clair / texte sombre sur fond sombre sous thème fintech.
 */
body.home-fintech-site main .bowi-shell,
body.home-fintech-site main .bowi-shell.ify-light-surface,
.bowi-shell {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.85rem !important;
    padding: 0.75rem !important;
    color: #1f2937 !important;
    -webkit-text-fill-color: #1f2937 !important;
}
body.home-fintech-site main .bowi-shell *:not(.btn):not(.badge):not(.form-check-input),
.bowi-shell *:not(.btn):not(.badge):not(.form-check-input) {
    color: #1f2937 !important;
    -webkit-text-fill-color: #1f2937 !important;
}
body.home-fintech-site main .bowi-intro,
.bowi-intro {
    background: #eef2ff !important;
    border: 1px solid #c7d2fe !important;
    color: #1e3a5f !important;
    -webkit-text-fill-color: #1e3a5f !important;
    border-radius: 0.7rem !important;
    padding: 0.55rem 0.7rem !important;
}
body.home-fintech-site main .bowi-product-card,
.bowi-product-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.75rem !important;
    padding: 0.75rem !important;
    margin-bottom: 0.65rem !important;
    color: #1f2937 !important;
}
body.home-fintech-site main .bowi-product-title,
.bowi-product-title {
    font-weight: 700 !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}
body.home-fintech-site main .bowi-shell .form-label,
body.home-fintech-site main .bowi-shell .form-check-label,
body.home-fintech-site main .bowi-shell label,
.bowi-shell .form-label,
.bowi-shell .form-check-label,
.bowi-shell label {
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
}
body.home-fintech-site main .bowi-shell .form-control,
body.home-fintech-site main .bowi-shell .form-select,
body.home-fintech-site main .bowi-shell .form-control:focus,
body.home-fintech-site main .bowi-shell .form-select:focus,
.bowi-shell .form-control,
.bowi-shell .form-select {
    background: #ffffff !important;
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
}
body.home-fintech-site main .bowi-shell .form-control::placeholder,
.bowi-shell .form-control::placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    opacity: 1 !important;
}
body.home-fintech-site main .bowi-shell .text-muted,
body.home-fintech-site main .bowi-shell .text-secondary,
body.home-fintech-site main .bowi-shell .bowi-rate-note,
body.home-fintech-site main .bowi-shell .bowi-summary-label,
.bowi-shell .text-muted,
.bowi-shell .text-secondary,
.bowi-shell .bowi-rate-note,
.bowi-shell .bowi-summary-label {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
}
body.home-fintech-site main .bowi-shell .text-info,
.bowi-shell .text-info {
    color: #0f766e !important;
    -webkit-text-fill-color: #0f766e !important;
}
body.home-fintech-site main .bowi-summary-box,
.bowi-summary-box {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.6rem !important;
    padding: 0.5rem 0.65rem !important;
}
body.home-fintech-site main .bowi-summary-value,
.bowi-summary-value {
    font-weight: 700 !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    font-size: 0.85rem !important;
}
body.home-fintech-site main .bowi-calc-card,
.bowi-calc-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.6rem !important;
    padding: 0.5rem !important;
    margin-top: 0.55rem !important;
}
body.home-fintech-site main .bowi-calc-row,
.bowi-calc-row {
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
}
body.home-fintech-site main .bowi-calc-row strong,
body.home-fintech-site main .bowi-calc-total,
body.home-fintech-site main .bowi-calc-total strong,
.bowi-calc-row strong,
.bowi-calc-total,
.bowi-calc-total strong {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}
body.home-fintech-site main .bowi-total-bar,
.bowi-total-bar {
    background: #ecfdf5 !important;
    border: 1px solid #99f6e4 !important;
    color: #134e4a !important;
    -webkit-text-fill-color: #134e4a !important;
}
body.home-fintech-site main .bowi-total-bar strong,
.bowi-total-bar strong {
    color: #0f766e !important;
    -webkit-text-fill-color: #0f766e !important;
}
body.home-fintech-site main #bowi_summary,
body.home-fintech-site main #bowi_summary.card,
body.home-fintech-site main #bowi_summary .card-body,
body.home-fintech-site main #bowi_summary h6,
#bowi_summary,
#bowi_summary .card-body,
#bowi_summary h6 {
    background: #ffffff !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    border-color: #e2e8f0 !important;
}
body.home-fintech-site main .bowi-rates-table,
body.home-fintech-site main .bowi-rates-table td,
body.home-fintech-site main .bowi-rates-table th,
.bowi-rates-table,
.bowi-rates-table td,
.bowi-rates-table th {
    --bs-table-bg: #fff !important;
    --bs-table-color: #1f2937 !important;
    background: #fff !important;
    color: #1f2937 !important;
    -webkit-text-fill-color: #1f2937 !important;
    border-color: #e2e8f0 !important;
}
body.home-fintech-site main .bowi-shell select option,
.bowi-shell select option {
    background: #fff !important;
    color: #1f2937 !important;
}

/* Autres surfaces claires à risque (QR, badges clairs) */
body.home-fintech-site main .badge.bg-warning,
body.home-fintech-site main .badge.bg-warning.text-dark,
body.home-fintech-site main .badge.bg-info.text-dark,
body.home-fintech-site main .badge.bg-light {
    color: #1f2937 !important;
    -webkit-text-fill-color: #1f2937 !important;
}
body.home-fintech-site main .bg-white:not(.btn):not(.navbar):not(.card-header) {
    color: #1f2937 !important;
    -webkit-text-fill-color: #1f2937 !important;
}

/* Cartes méthodes de dépôt : texte toujours sombre sur fond blanc */
body.home-fintech-site main .payment-method-card {
    background: #ffffff !important;
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
}
body.home-fintech-site main .payment-method-card .payment-method-label,
body.home-fintech-site main .payment-method-card .payment-method-company {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
}
body.home-fintech-site main .payment-method-card .payment-method-company {
    color: #374151 !important;
    -webkit-text-fill-color: #374151 !important;
}

/* Formulaire preuve offline / surfaces claires de paiement */
body.home-fintech-site main .payment-receipt-form,
body.home-fintech-site main .payment-receipt-form h5,
body.home-fintech-site main .payment-receipt-form .form-label,
body.home-fintech-site main .payment-receipt-form label,
body.home-fintech-site main .payment-receipt-form small,
body.home-fintech-site main .payment-receipt-form .form-text {
    color: #1f2937 !important;
    -webkit-text-fill-color: #1f2937 !important;
}
body.home-fintech-site main .payment-receipt-form {
    background: #ffffff !important;
}
body.home-fintech-site main .payment-receipt-form .form-control {
    background: #ffffff !important;
    color: #1f2937 !important;
    -webkit-text-fill-color: #1f2937 !important;
    border-color: #cbd5e1 !important;
}
