/* Centrage et marges latérales pour le formulaire de connexion */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');

.login-container {
    position: fixed;
    left: 0;
    right: 0;
    top: 48%;
    transform: translateY(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding-left: calc(32px + env(safe-area-inset-left));
    padding-right: calc(32px + env(safe-area-inset-right));
    z-index: 1000;
    pointer-events: auto;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    padding: 32px 24px;
    max-width: 360px; /* carte plus étroite pour laisser de l'espace latéral */
    width: calc(100% - 64px) !important; /* garantit 32px de chaque côté sur petits écrans */
    margin: 0 auto; /* centrée horizontalement */
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .login-card {
        padding: 18px 14px;
        /* garantir de l'espace latéral visible sur petits écrans */
        width: calc(100% - 64px) !important;
        max-width: 360px;
        margin: 0 auto;
    }
    .login-container {
        padding-left: calc(20px + env(safe-area-inset-left));
        padding-right: calc(20px + env(safe-area-inset-right));
        top: 46%; /* légèrement plus bas sur petits écrans */
    }
}
html, body {
    min-height: 100vh;
    margin: 0;
    /* prevent horizontal scrolling caused by 100vw and small overflow */
    max-width: 100%;
    overflow-x: hidden;
}
/* Garantir la cliquabilité des liens d'action */
.action-buttons {
    position: relative;
    z-index: 50;
}

.action-buttons a {
    pointer-events: auto !important;
}

.form-container {
    
    background-color: #fff;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    border-radius: 10px;
    box-sizing: border-box;
    padding: 20px 30px;
}

.title {
    text-align: center;
    font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
        "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
    margin: 10px 0 30px 0;
    font-size: 28px;
    font-weight: 800;
}

.form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 15px;
}

.input {
    border-radius: 20px;
    border: 1px solid #c0c0c0;
    outline: 0 !important;
    box-sizing: border-box;
    padding: 12px 15px;
}

.page-link {
    text-decoration: underline;
    margin: 0;
    text-align: end;
    color: #747474;
    text-decoration-color: #747474;
}

.page-link-label {
    cursor: pointer;
    font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
        "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
    font-size: 9px;
    font-weight: 700;
}

.page-link-label:hover {
    color: #000;
}

.form-btn {
    padding: 10px 15px;
    font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
        "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
    border-radius: 20px;
    border: 0 !important;
    outline: 0 !important;
    background: teal;
    color: white;
    cursor: pointer;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.form-btn:active {
    box-shadow: none;
}

.sign-up-label {
    margin: 0;
    font-size: 10px;
    color: #747474;
    font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
        "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
}

.sign-up-link {
    margin-left: 1px;
    font-size: 11px;
    text-decoration: underline;
    text-decoration-color: teal;
    color: teal;
    cursor: pointer;
    font-weight: 800;
    font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
        "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
}

.buttons-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-top: 20px;
    gap: 15px;
}

.apple-login-button,
.google-login-button {
    border-radius: 20px;
    box-sizing: border-box;
    padding: 10px 15px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
        rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
        "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
    font-size: 11px;
    gap: 5px;
}

.apple-login-button {
    background-color: #000;
    color: #fff;
    border: 2px solid #000;
}

.google-login-button {
    border: 2px solid #747474;
}

.apple-icon,
.google-icon {
    font-size: 18px;
    margin-bottom: 1px;
}


* {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.account-balance {
    background-color: #007bff;
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: start;
}

.account-balance h2 {
    font-size: 2em;
    margin: 0;
}

.btn-custom {

    display: inline-block;
    width: 48%;
    margin: 10px 1%;
}

.transaction-history {
    margin-top: 20px;

}

/* Timeline / transaction history styles */
.timeline-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
    margin-bottom: 18px;
}

.timeline-header h4 {
    margin: 0 0 6px 0;
    font-size: 1.05rem; /* slightly larger for header */
    font-weight: 700;
}

.timeline-item {
    display: flex;
    gap: 12px;
    padding: 10px 8px;
    align-items: center;
    border-radius: 8px;
    transition: background 120ms ease;
}
.timeline-item + .timeline-item {
    margin-top: 8px;
}
.timeline-item:hover {
    background: rgba(11,101,209,0.03); /* subtle default for older browsers */
}

/* Apply enhanced hover (lift + subtle bg) only on devices that support hover */
@media (hover: hover) and (pointer: fine) {
    .timeline-item {
        transition: background 120ms ease, transform 120ms ease;
    }
    .timeline-item:hover {
        background: rgba(11,101,209,0.04);
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(11,101,209,0.04);
    }
}
.timeline-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
}

/* Ensure the inner icon glyph or image fits the circular container */
.timeline-icon i {
    font-size: 1.15rem;
    line-height: 1;
}
.timeline-icon img {
    width: 60%;

/* Ensure transfert page uses same photo rendering as show page */
.transfer-section .avatar-sm img,
.dashboard nav .avatar-sm img,
.transfer-section .image1,
.transfer-section .image1 img,
.transfer-section .image,
.transfer-section .image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
    height: 60%;
    object-fit: contain;
    display: block;
}

/* Ensure icon containers are perfectly square and center their content */
.timeline-icon i,
.iconHist, .iconHist2, .iconHist3 {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Replace padding-based circular icons with fixed-size boxes to avoid deformation */
.iconHist, .iconHist2, .iconHist3 {
    width: 44px;
    height: 44px;
    padding: 0; /* remove variable padding that caused ovals */
    border-radius: 50%;
    font-size: 1.1rem; /* scale icon glyph */
    margin-right: 12px;
}

.timeline-content {
    flex: 1 1 auto;
}

.timeline-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

/* Prevent title wrapping and keep amount on the right with ellipsis for long titles */
.timeline-row .timeline-title {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 1 auto !important;
    min-width: 0 !important; /* allow flex shrink inside overflow:hidden parent */
}
.timeline-row .timeline-amount {
    flex: 0 0 auto !important;
    margin-left: 12px !important;
}

@media (max-width: 420px) {
    /* On very small screens, slightly reduce amount size to avoid overflow */
    .timeline-row .timeline-amount {
        font-size: 1.22rem !important;
    }
    .timeline-row .timeline-title {
        font-size: 1.26rem !important;
    }
}

.timeline-title {
    font-size: 1.18rem; /* larger for better readability */
    font-weight: 700;
    color: #111827;
}

.timeline-amount {
    font-size: 1.18rem; /* match title */
    font-weight: 900;
    color: #0b65d1;
    white-space: nowrap; /* prevent wrapping */
    text-align: right;
    flex: 0 0 auto;
}

.timeline-meta, .timeline-datetime {
    /* adjusted per design: slightly smaller and medium weight */
    font-size: 0.80rem !important;
    color: #6b7280;
}

/* Make timeline labels (title, operator/number, datetime) pure black like the design */
.timeline-card .timeline-item .timeline-title,
.timeline-card .timeline-item .timeline-meta,
.timeline-card .timeline-item .timeline-datetime {
    color: #000000 !important;
}

/* Force date/time to pure black and slightly stronger weight to match reference */
.timeline-card .timeline-item .timeline-datetime,
.timeline-card .timeline-item .timeline-meta,
span.timeline-datetime,
span.timeline-meta {
    color: #000000 !important;
    font-weight: 600 !important;
    font-size: 0.80rem !important;
}

/* Keep amount coloring intact (positive/negative), do not override .timeline-amount */

/* Ensure operator logos and inline icons inside timeline meta are compact and aligned */
.timeline-meta .operator-logo,
.timeline-meta i.fab,
.timeline-meta i.fas {
    vertical-align: middle;
    margin-right: 2px; /* tightened to bring number closer to logo */
    display: inline-block;
}

@media (max-width: 768px) {
    .timeline-title,
    .timeline-amount {
        font-size: 1.24rem; /* noticeably larger on tablets/small screens */
    }
    .timeline-meta, .timeline-datetime {
        /* tablet: keep consistent smaller size */
        font-size: 0.80rem !important;
    }
    .timeline-icon { width:48px; height:48px; flex:0 0 48px; }
}

/* Mobile-specific tweaks for transaction history (phones) */
@media (max-width: 576px) {
    .timeline-item {
        padding: 12px 10px;
        gap: 10px;
        border-radius: 10px;
    }

    .timeline-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }

    .timeline-title,
    .timeline-amount {
        font-size: 1.36rem; /* larger on phones */
        line-height: 1.15;
    }

    .timeline-amount {
        font-weight: 900;
    }

    .timeline-meta, .timeline-datetime {
        /* phone: keep consistent smaller size */
        font-size: 0.80rem !important;
        color: #6b7280;
    }

    .timeline-icon {
        width: 52px;
        height: 52px;
        flex: 0 0 52px;
    }

    .timeline-icon i { font-size: 1.3rem; }
    .timeline-icon img { width: 62%; height: 62%; }

    .iconHist, .iconHist2, .iconHist3 { width:52px; height:52px; font-size:1.15rem; margin-right:12px; }

    .timeline-title { word-break: break-word; }
}

/* Very small phones — keep legible but avoid wrapping issues */
@media (max-width: 420px) {
    .timeline-title,
    .timeline-amount {
        font-size: 1.44rem;
    }

    .timeline-meta, .timeline-datetime {
        font-size: 0.80rem !important;
    }

    /* On very narrow screens ensure label and amount remain on a single row when possible */
    .timeline-row { gap: 6px; }
}

/* Strong override: ensure timeline titles and amounts are larger (high specificity) */
.timeline-card .timeline-item .timeline-title {
    font-size: 1.36rem !important;
    font-weight: 800 !important;
    line-height: 1.08 !important;
}
.timeline-card .timeline-item .timeline-amount {
    font-size: 1.36rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
    text-align: right !important;
    color: #0b65d1 !important;
}

@media (max-width: 576px) {
    .timeline-card .timeline-item .timeline-title,
    .timeline-card .timeline-item .timeline-amount {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 420px) {
    .timeline-card .timeline-item .timeline-title,
    .timeline-card .timeline-item .timeline-amount {
        font-size: 1.6rem !important;
    }
}

/* Strong fallback to force perfectly circular icon backgrounds across all pages */
.timeline-icon, .iconHist, .iconHist2, .iconHist3 {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    min-height: 64px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.timeline-icon i { font-size: 1.3rem !important; line-height:1 !important; }
.timeline-icon img { width: 62% !important; height: 62% !important; object-fit: contain !important; }

/* FINAL OVERRIDES: ensure amount colors follow variant on all viewports.
    This is appended last so it wins over earlier conflicting rules. */
.timeline-card .timeline-item .timeline-amount { color: inherit !important; }
.timeline-card .timeline-item .timeline-amount.variant-positive { color: #16a34a !important; }
.timeline-card .timeline-item .timeline-amount.variant-refund { color: #16a34a !important; }
.timeline-card .timeline-item .timeline-amount.variant-negative { color: #dc2626 !important; }
.timeline-card .timeline-item .timeline-amount.variant-neutral { color: #000000 !important; }

/* also accept bare classes outside timeline-card */
.timeline-amount.variant-positive { color: #16a34a !important; }
.timeline-amount.variant-refund { color: #16a34a !important; }
.timeline-amount.variant-negative { color: #dc2626 !important; }
.timeline-amount.variant-neutral { color: #000000 !important; }


* {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-outline: none;
    outline: none;
}


i {
    font-style: italic;
}




.iconHist {
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: #ccebf5;
    border-radius: 50%;
    font-size: 1.1rem;
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.iconHist2 {
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: red;
    border-radius: 50%;
    font-size: 1.1rem;
    margin-right: 12px;
    color: #f0f0f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.iconHist3 {
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: green;
    border-radius: 50%;
    font-size: 1.1rem;
    margin-right: 12px;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Timeline icon variant backgrounds - couleurs pastel douces comme la référence */
.timeline-icon.variant-positive {
    background-color: #d1fae5 !important;
    color: #059669 !important;
}

.timeline-icon.variant-negative {
    background-color: #fecdd3 !important;
    color: #dc2626 !important;
}

.timeline-icon.variant-refund {
    background-color: #d1fae5 !important;
    color: #059669 !important;
}

.timeline-icon.variant-neutral {
    background-color: #e0e7ff !important;
    color: #6366f1 !important;
}

.virement {
    font-size: .8rem;
}

.carte {
    font-size: .8rem;
}

.lobster-regular {
    font-family: "Lobster", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.balance {
    font-family: "Acme", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1.8rem;
} 
* {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.form-container {
    max-width: 600px;
    margin: 50px auto;
    text-align: center;
}

.form-container {
    background-color: #fff;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    border-radius: 10px;
    box-sizing: border-box;
    padding: 20px 30px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.alert-info {
    display: flex;
    body {
        padding-left: 12px;
        padding-right: 12px;
    }
}
    align-items: center;
}

.alert-info i {
    font-size: 1.2em;
    margin-right: 10px;
}

.alert-warning {
    margin-top: 20px;
}

.dashboard {
    position: relative;
    background-color: white;
    max-width: 900px;
    width: 100%;
    min-height: 100vh;
    margin: auto;
    box-shadow: 0 0 12px 0 rgba(0, 0, 0, .2);
    overflow: auto;
    padding: 10px 30px 150px 30px; /* default desktop padding */
    transition: all 200ms linear;
}

footer {
    position: fixed;
    display: flex;
    flex-wrap: nowrap;
    max-width: 840px; /* match .dashboard visual width (900 - horizontal padding) */
    width: calc(100% - 80px); /* leave larger horizontal margin on very wide screens */
    left: 50%;
    transform: translateX(-50%);
    height: 64px; /* standard height optimized for fs-4 icons */
    border-radius: 20px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
    border: 1px solid #e9f2ff;
    bottom: 16px;
    overflow: hidden;
    background-color: white;
    z-index: 1000;
    padding: 0 12px;
    box-sizing: border-box;
    /* keep footer visually narrower than main dashboard content for desktop */
}

/* On small viewports prefer fixed offsets instead of translate centering to avoid rounding/overflow issues */
@media screen and (max-width: 800px) {
    footer {
        left: 20px;
        right: 20px;
        transform: none;
        width: auto;
        border-radius: 16px;
        bottom: 14px;
    }
}

/* Optimized footer for tablets and phones */
@media screen and (max-width: 768px) {
    footer {
        width: calc(100% - 24px);
        max-width: 100%;
        left: 12px;
        right: 12px;
        transform: none;
        bottom: 12px;
        padding: 10px 8px;
        border-radius: 24px;
        height: auto;
    }
    
    footer a {
        padding: 8px 6px;
        font-size: 1.05rem; /* slightly larger for better legibility on tablets/large phones */
        font-weight: 700; /* make labels bold for readability */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    footer a i {
        font-size: 1.6rem; /* increased icon size for better tap targets */
        height: auto;
        margin-bottom: 4px;
        line-height: 1;
    }
}

/* Slightly bigger on smaller phones */
@media screen and (max-width: 480px) {
    footer a {
        font-size: 1.1rem;
        padding: 10px 6px;
    }

    footer a i {
        font-size: 1.8rem;
        margin-bottom: 6px;
    }
}

/* Optimized footer for mobile */
@media screen and (max-width: 576px) {
    footer {
        padding: 8px 6px;
        bottom: 10px;
        border-radius: 20px;
    }
    
    footer a {
        font-size: 0.88rem; /* slightly larger on small phones for readability */
        padding: 8px 6px;
        line-height: 1.1;
        white-space: normal; /* allow wrapping if label is long */
        font-weight: 700; /* bold labels under icons */
    }
    
    footer a i {
        font-size: 1.35rem;
    }
    
    footer a.active {
        border-bottom-width: 2.5px;
    }
}

@media screen and (min-width: 901px) {
    footer {
        width: min(840px, calc(100% - 80px));
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Ensure there's enough bottom space on small screens so fixed footer doesn't cover buttons */
@media (max-width: 480px) {
    .dashboard {
        padding-bottom: 240px; /* leave space for footer and safe tap area */
    }

    /* Make sure primary CTA buttons are above overlays (if any) */
    .balance-card, .action-buttons a.btn-premium {
        position: relative;
        z-index: 2;
    }
}

footer a i {
    display: block;
    color: #007bff; /* match the blue color from the card page */
    margin-bottom: 6px; /* space between icon and label */
    font-size: 1.5rem; /* match Bootstrap fs-4 size */
    line-height: 1;
    height: 26px; /* proportional height for fs-4 size */
}

/* Footer typography: use site font and increase label/icon legibility */
footer, footer a, footer a i {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

footer a {
    font-weight: 700; /* bolder labels for legibility */
}

/* Slightly larger footer labels and icons on tablet/mobile for better tap targets */
@media screen and (max-width: 768px) {
    footer a {
        font-size: 1.12rem;
    }
    footer a i {
        font-size: 1.9rem;
    }
}

@media screen and (max-width: 480px) {
    footer a {
        font-size: 1.16rem;
    }
    footer a i {
        font-size: 2.0rem;
        margin-bottom: 8px;
    }
}

/* Page-specific override to match the 'carte' footer exactly on the show page */
.footer-show a i {
    font-size: 1.9rem; /* slightly larger on show page */
    height: 34px;
    color: #6f63ff;
}
/* footer a i:hover {
    display: flex;
    justify-content: center;
    color: white;
    padding-bottom: .5rem;
    position: relative;
    top: 4px;
    color: white;
} */

/* footer links: center icon above label and vertically center content inside the pill */
footer a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

footer a:hover {
    background-color: #ccebf5;

}


footer a {
    text-decoration: none;
    width: 25%;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 11px 6px; /* optimal spacing for fs-4 sized icons */
    transition: all 120ms ease;
    color: #1f2937;
    position: relative;
}

footer a.active {
    border-bottom: 3px solid #6f63ff;
}

.footer-show a {
    color: #6f63ff;
}

/* Styles desktop pour footer-show */
footer.footer-show {
    max-width: 780px;
    width: min(780px, calc(100% - 120px));
    left: 50%;
    transform: translateX(-50%);
    bottom: 12px;
}

@media (max-width: 800px) {
    footer.footer-show {
        left: 20px;
        right: 20px;
        transform: none;
        width: auto;
    }
}

@media (max-width: 768px) {
    footer.footer-show {
        width: calc(100% - 24px);
        left: 12px;
        right: 12px;
        bottom: 12px;
        border-radius: 25px;
    }
}

@media (max-width: 576px) {
    footer.footer-show {
        padding: 8px 6px;
        bottom: 10px;
        border-radius: 25px;
    }
    
    footer.footer-show a {
        font-size: 0.75rem;
    }
    
    footer.footer-show a i {
        font-size: 1.2rem;
    }
}

i {
    font-style: italic;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-control {
    padding: 12px 12px 12px 36px;
}

.form-control:focus~label,
.form-control:not(:placeholder-shown)~label {
    top: -10px;
    left: 12px;
    font-size: 0.75rem;
    color: #007bff;
    background: white;
    padding: 0 5px;
    z-index: 10;

}

label {
    position: absolute;
    top: 12px;
    left: 36px;
    color: #aaa;
    font-size: 1rem;
    transition: all 0.2s;
    pointer-events: none;
}

.d-grid {
    display: grid !important;
}



.dashboard nav {
    display: flex;
    justify-content: space-between;
}

.d-flex {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.imageV > div {
    flex: 1;
    min-width: 200px; /* Pour assurer que les divs ne deviennent pas trop petits */
}

.image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 5px;
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .dashboard {
        padding: 10px 16px 120px 16px;
        max-width: 100%;
        box-shadow: none;
    }

    .form-container {
        margin: 20px 12px;
        max-width: 100%;
        padding: 18px;
    }

    footer {
        width: calc(100% - 24px);
        left: 12px;
        height: 64px;
        border-radius: 18px;
    }

    .account-balance h2 {
        font-size: 1.6em;
    }

    .title {
        font-size: 22px;
    }

    .form-btn {
        font-size: 14px;
    }
}

/* Helpful defaults for images & buttons on small screens */
img, .image, .image1 {
    max-width: 100%;
    height: auto;
}

/* Small circular avatar used in headers/navigation. Use a wrapper to avoid global img rules overriding dimensions. */
.avatar-sm {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-block;
    flex: 0 0 auto;
}
.avatar-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* consistent subtle border for header avatars */
.avatar-sm {
    border: 2px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Force circular rendering for header/logo images to match avatar style */
.icon-circle img,
.avatar-sm img,
.card-logo-zone img,
.header-logo img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
}

/* If a page shows a larger square branding image, scale it down to avoid layout imbalance on mobile */
.card-logo-zone img.large,
.header-logo img.large {
    width: 72px;
    height: 72px;
}

/* Strong final override for alert typography to ensure legibility across pages */
.alert-modern .alert-title,
.alert-premium .alert-title,
.alert-info .alert-title,
.balance-credit-alert .alert-title {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
}

.alert-modern .alert-message,
.alert-premium .alert-message,
.alert-info .alert-message,
.balance-credit-alert .alert-message {
    font-size: 1.08rem !important;
    line-height: 1.6 !important;
    font-weight: 400 !important; /* keep body text regular weight */
}

/* Make only the semantic pieces bold: title, amount, and source/bank names */
.alert-modern .alert-title,
.alert-premium .alert-title,
.alert-info .alert-title,
.balance-credit-alert .alert-title {
    font-weight: 800 !important;
}

/* Bold inline strong/b elements inside alert messages (amounts or emphasized parts) */
.alert-modern .alert-message strong,
.alert-premium .alert-message strong,
.alert-info .alert-message strong,
.alert-modern .alert-message b,
.alert-premium .alert-message b,
.alert-info .alert-message b {
    font-weight: 800 !important;
}

/* Common classes for amount/source if present in markup */
.alert-modern .alert-amount,
.alert-premium .alert-amount,
.alert-info .alert-amount,
.alert-modern .alert-source,
.alert-premium .alert-source,
.alert-info .alert-source {
    font-weight: 800 !important;
}

@media (max-width: 768px) {
    .alert-modern .alert-title,
    .alert-premium .alert-title,
    .alert-info .alert-title {
        font-size: 1.08rem !important;
    }
    .alert-modern .alert-message,
    .alert-premium .alert-message,
    .alert-info .alert-message {
        font-size: 1.03rem !important;
    }
}

@media (max-width: 480px) {
    .alert-modern .alert-title,
    .alert-premium .alert-title,
    .alert-info .alert-title {
        font-size: 1.03rem !important;
    }
    .alert-modern .alert-message,
    .alert-premium .alert-message,
    .alert-info .alert-message {
        font-size: 1.00rem !important;
    }
}

/* Make input placeholders bold and fully opaque for better legibility */
input::placeholder,
textarea::placeholder,
.form-control::placeholder {
    font-weight: 700;
    opacity: 1; /* override browsers that dim placeholders */
    color: #6b7280;
}

/* Vendor-prefixed placeholders for broader browser support */
:-ms-input-placeholder { /* IE 10+ */
    font-weight: 700;
    opacity: 1;
}
::-ms-input-placeholder { /* Microsoft Edge */
    font-weight: 700;
    opacity: 1;
}
::-webkit-input-placeholder { /* Chrome/Safari/Opera */
    font-weight: 700;
    opacity: 1;
}
/* (no moz-specific rules required here) */

/* Make inline icons (labels, inputs, cards) visually bolder */
label i,
.form-floating label i,
.transfer-card .transfer-icon i,
.transfer-icon i,
footer a i {
    font-weight: 700;
    /* slightly increase size so icons read as 'bolder' */
    font-size: 1.05em;
    line-height: 1;
}

/* Specific: ensure icon inside input labels keeps good spacing */
.form-floating label i {
    margin-right: 0.35rem;
    vertical-align: middle;
}

@media (max-width: 576px) {
    .btn-premium {
        width: 100% !important;
    }

    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .transaction-amount {
        align-self: flex-end;
        margin-top: 8px;
    }
}

@media (max-width: 576px) {
    /* Make modals nearly full-screen on small devices */
    .modal-dialog {
        max-width: 94% !important;
        margin: 12px auto;
    }

    .modal-content {
        border-radius: 12px;
    }

    /* Progress bar full width and comfortable padding */
    .custom-progress {
        margin-left: 8px;
        margin-right: 8px;
        height: 48px; /* keep the new height */
    }

    .custom-progress-bar {
        line-height: 48px;
        font-size: 0.9rem;
    }

    footer {
        width: calc(100% - 20px);
        left: 10px;
        bottom: 12px;
    }

    /* Make form labels and inputs comfortable */
    label {
        left: 12px;
        top: 10px;
        font-size: 0.9rem;
    }

    .form-control {
        padding: 10px 10px 10px 40px;
        font-size: 0.95rem;
    }

    .status-title, .success-modal-title, .failure-modal-title {
        font-size: 1.25rem;
    }

    .success-modal-body, .failure-modal-body {
        padding: 18px;
    }

    /* Stack footer links and increase tap targets */
    footer a {
        width: 25%;
        padding: 8px 6px;
    }
}

/* Small tweak for very small phones */
@media (max-width: 360px) {
    .custom-progress {
        height: 44px;
    }
    .custom-progress-bar { line-height: 44px; }
}

@media (max-width: 768px) {
    .image {
        width: 60px;
        height: 60px;
    }
    
.iconHist {
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: #ccebf5;
    border-radius: 50%;
    font-size: 1.1rem;
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.iconHist2 {
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: red;
    border-radius: 50%;
    font-size: 1.1rem;
    margin-right: 12px;
    color: #f0f0f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.iconHist3 {
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: green;
    border-radius: 50%;
    font-size: 1.1rem;
    margin-right: 12px;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
}

@media (max-width: 480px) {
    .image {
        width: 40px;
        height: 40px;
    }
    .transf{
        font-size: .6rem;
    }
      
.iconHist {
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: #ccebf5;
    border-radius: 50%;
    font-size: 1.1rem;
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.iconHist2 {
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: red;
    border-radius: 50%;
    font-size: 1.1rem;
    margin-right: 12px;
    color: #f0f0f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.iconHist3 {
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: green;
    border-radius: 50%;
    font-size: 1.1rem;
    margin-right: 12px;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
}



.image1 {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin: 5px;
    cursor: pointer;
}

/* --- MOBILE-FIRST RESPONSIVE DESIGN --- */

/* Base mobile styles (320px+) */
@media screen and (max-width: 768px) {
    body {
        background: #f8fafc;
        font-size: 15px;
    }

    .container {
        padding: 0;
        max-width: 100%;
    }

    .dashboard {
        max-width: 100%;
        margin: 0;
        padding: 16px 16px 100px 16px;
        border-radius: 0;
        box-shadow: none;
        background: #f8fafc;
        min-height: 100vh;
    }

    /* Header mobile clean */
    .dashboard nav {
        padding: 12px 0 8px;
        margin-bottom: 8px;
    }

    .dashboard nav .menu-icon {
        font-size: 18px;
        margin-right: 8px;
    }

    .dashboard nav strong {
        font-size: 18px;
        font-weight: 700;
    }

    .dashboard hr {
        margin: 12px 0 16px;
        border-color: #e2e8f0;
    }

    /* Cards mobiles style iOS */
    .card-modern,
    .info-card,
    .transfer-card,
    .confirm-card,
    .summary-card,
    .progress-card,
    .alert-modern {
        background: #fff;
        border-radius: 16px;
        padding: 20px;
        margin-bottom: 16px;
        border: none;
        box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    }

    /* Alerts style mobile */
    .alert-premium,
    .alert-modern {
        background: #fff;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 16px;
        border-left: 4px solid #3b82f6;
        display: flex;
        align-items: flex-start;
        gap: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .alert-modern .btn-close {
        margin-left: auto;
        padding: 4px;
    }

    /* Boutons mobile */
    .btn-premium,
    .btn-deconnexion,
    .cta-soft,
    .primary-btn,
    .ghost-btn {
        width: 100%;
        padding: 16px 20px;
        border-radius: 12px;
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    /* Footer mobile fixe style iOS */
    footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 80px;
        background: #fff;
        border-top: 1px solid #e5e7eb;
        border-radius: 0;
        box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
        padding: 8px 0 20px 0;
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 1000;
    }

    footer a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        color: #6b7280;
        text-decoration: none;
        padding: 8px 4px;
        font-size: 12px;
        font-weight: 700; /* make footer labels bold on mobile (override earlier rules) */
        transition: color 0.2s;
    }

    footer a i {
        font-size: 22px;
        margin-bottom: 4px;
    }

    footer a:hover,
    footer a.active {
        color: #3b82f6;
    }

    /* Layout mobile spécifique */
    .row {
        margin: 0 -8px;
    }

    .col-md-6,
    .col-lg-6,
    .col-12 {
        padding: 0 8px;
        width: 100%;
    }

    /* Typography mobile */
    h1, h2, h3, h4, h5 {
        font-size: 20px;
        font-weight: 600;
        margin-bottom: 12px;
        line-height: 1.3;
    }

    /* Forms mobile */
    .form-floating input,
    .form-floating textarea,
    .form-control {
        font-size: 16px;
        padding: 16px 12px;
        border-radius: 8px;
    }

    .form-floating label {
        font-size: 14px;
    }

    /* Modals mobile */
    .modal-dialog {
        margin: 20px 16px;
        max-width: none;
    }

    .modal-content {
        border-radius: 16px;
    }
}

/* Très petits écrans (iPhone SE, etc.) */
@media screen and (max-width: 375px) {
    .dashboard {
        padding: 12px 12px 100px 12px;
    }

    .card-modern,
    .info-card,
    .transfer-card,
    .confirm-card,
    .summary-card,
    .progress-card {
        padding: 16px;
    }

    footer {
        height: 75px;
        padding: 6px 0 18px 0;
    }

    footer a i {
        font-size: 20px;
    }

    footer a {
        font-size: 11px;
    }
}

/* Final override: ensure timeline labels and amounts are visibly larger regardless of previous rules */
@media all {
    .timeline-card .timeline-item .timeline-title {
        font-size: 1.9rem !important;
        font-weight: 800 !important;
    }
    .timeline-card .timeline-item .timeline-amount {
        font-size: 1.9rem !important;
        font-weight: 900 !important;
        color: #0b65d1 !important;
    }
}


@media (max-width: 768px) {
    .image1 {
        width: 40px;
        height: 40px;
    }
      
.iconHist {
    padding: 1rem;
    background-color: #ccebf5;
    border-radius: 50%;
    font-size: 1.5rem;
    margin-right: 5px;
    object-fit: cover;
}

/* -------------------------------------------------------------------------- */
/* HOTFIX — Consolidated overrides to restore consistent timeline / avatar sizes */
/* Appended last to override earlier conflicting rules that caused deformation */
/* -------------------------------------------------------------------------- */

/* Ensure page doesn't scroll horizontally (reinforce) */
html, body { max-width: 100% !important; overflow-x: hidden !important; }

/* Canonical timeline item sizing and layout */
.timeline-card .timeline-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 12px !important;
    border-radius: 10px !important;
}

/* Canonical circular icon box for all icon classes used across pages */
.timeline-card .timeline-item .timeline-icon,
.timeline-card .timeline-item .iconHist,
.timeline-card .timeline-item .iconHist2,
.timeline-card .timeline-item .iconHist3,
.timeline-card .timeline-item .avatar-sm {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Make sure any image or glyph fits its circular container */
.timeline-card .timeline-item .timeline-icon img,
.timeline-card .timeline-item .iconHist img,
.timeline-card .timeline-item .avatar-sm img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.timeline-card .timeline-content { min-width: 0 !important; }

.timeline-card .timeline-row { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 12px !important; }

/* Single-line title with ellipsis, fixed moderate size to avoid overflow */
.timeline-card .timeline-row .timeline-title {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    line-height: 1.08 !important;
}

/* Amount stays on the right and does not wrap */
.timeline-card .timeline-row .timeline-amount {
    flex: 0 0 auto !important;
    margin-left: 12px !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #0b65d1 !important;
    text-align: right !important;
    white-space: nowrap !important;
}

/* Slightly smaller on very small screens but still single-line */
@media (max-width: 576px) {
    .timeline-card .timeline-item { padding: 9px 8px !important; }
    .timeline-card .timeline-row .timeline-title { font-size: 1.00rem !important; }
    .timeline-card .timeline-row .timeline-amount { font-size: 1.00rem !important; }
    .timeline-card .timeline-item .timeline-icon,
    .timeline-card .timeline-item .iconHist,
    .timeline-card .timeline-item .iconHist2,
    .timeline-card .timeline-item .iconHist3 { width: 40px !important; height: 40px !important; min-width: 40px !important; }
}

/* Limit hover effects to pointer-capable devices and keep them subtle */
@media (hover: hover) and (pointer: fine) {
    .timeline-card .timeline-item:hover {
        background: rgba(11,101,209,0.03) !important;
        transform: none !important; /* avoid lift which caused layout shifts */
        box-shadow: none !important;
    }
}

/* Override overly-large final rule that was causing huge titles */
.timeline-card .timeline-item .timeline-title {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    line-height: 1.08 !important;
}
.timeline-card .timeline-item .timeline-amount {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #0b65d1 !important;
}

/* Small safety: prevent footer from growing too large accidentally */
footer a i { line-height: 1 !important; }

/* End HOTFIX */

/* Variant-specific amount colors (force priority over global blue) */
.timeline-card .timeline-item .timeline-amount.variant-positive { color: #16a34a !important; }
.timeline-card .timeline-item .timeline-amount.variant-refund { color: #16a34a !important; }
.timeline-card .timeline-item .timeline-amount.variant-negative { color: #dc2626 !important; }
.timeline-card .timeline-item .timeline-amount.variant-neutral { color: #374151 !important; }

/* Also accept bare classes (outside timeline-card) */
.timeline-amount.variant-positive { color: #16a34a !important; }
.timeline-amount.variant-refund { color: #16a34a !important; }
.timeline-amount.variant-negative { color: #dc2626 !important; }
.timeline-amount.variant-neutral { color: #374151 !important; }



.iconHist2 {
    padding: 1rem;
    background-color: red;
    border-radius: 50%;
    font-size: 1.5rem;
    margin-right: 5px;
    color: #f0f0f0;
    object-fit: cover;
}

.iconHist3 {
    padding: 1rem;
    background-color: green;
    border-radius: 50%;
    font-size: 1.5rem;
    margin-right: 5px;
    color: white;
    object-fit: cover;
}
}

@media (max-width: 480px) {
    .image1 {
        width: 30px;
        height: 30px;
    }
    .transf{
        font-size: .6rem;
    }  
.iconHist {
    padding: 1rem;
    background-color: #ccebf5;
    border-radius: 50%;
    font-size: 1.5rem;
    margin-right: 5px;
    object-fit: cover;
}

.iconHist2 {
    padding: 1rem;
    background-color: red;
    border-radius: 50%;
    font-size: 1.5rem;
    margin-right: 5px;
    color: #f0f0f0;
    object-fit: cover;
}

.iconHist3 {
    padding: 1rem;
    background-color: green;
    border-radius: 50%;
    font-size: 1.5rem;
    margin-right: 5px;
    color: white;
    object-fit: cover;
}
    
}



.imageV {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

* {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.card-container {
    max-width: 400px;
    margin: 50px auto;
    text-align: center;
}

.card-custom {
    background-color: #007bff;
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    height: 12rem;
}

.card-number {
    font-size: 1.5em;
    letter-spacing: 2px;
}

.card-name {
    margin-top: 10px;
    font-size: 1.2em;
}

.card-expiry,
.card-cvv {

    font-size: .7rem;
    margin-top: 5px;

}

.loader {
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid #007bff;
    width: 30px;
    height: 30px;
    animation: spin 2s linear infinite;
    display: flex;
    justify-content: center;
    margin-top: 20px;

}



i {
    font-style: italic;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}





.account-container {
    max-width: 600px;
    margin: 50px auto;
    text-align: left;
}

.account-container h5 {
    margin-top: 20px;
}

.account-container .alert-warning {
    text-align: center;
}

.account-container .info-section {
    margin-top: 20px;
}

.account-container .info-section h6 {
    margin-bottom: 10px;
}

.account-container .info-section p {
    margin: 0;
}

.btn-logout {
    margin-top: 20px;
}


i {
    font-style: italic;
}





.progress {
    height: 45px;
    background-color: #f3f3f3;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 20px;
}

.modal-header {
    background-color: #d60a0a;
    color: #f3f3f3;
}

.btn-danger {
    background-color: #d60a0a;
    color: #f3f3f3;
}

.close {
    background-color: #f3f3f3;
    color: #d60a0a;
    font-size: 1rem;
    border: 0;
    border-radius: 100%;
}

.header2 {
    background-color: #4caf50;
    color: #f3f3f3;
}

.succes {
    background-color: #4caf50;
    color: #f3f3f3;
}

.close2 {
    background-color: #f3f3f3;
    color: #4caf50;
    font-size: 1rem;
    border: 0;
    border-radius: 100%;
}

.progress-bar {
    height: 100%;
    background-color: #4caf50;
    text-align: center;
    line-height: 45px;
    color: white;
    transition: width 0.4s;
}

@media (max-width: 576px) {
    .list-group-item .col-auto i,
    .list-group-item .col-auto strong,
    .list-group-item .col-auto small {
        font-size: 0.8em;
        border: 0px;

    }
    .list-group-item .col-auto {
        margin-right: 10px;
    }
}

/* Forcer la couleur verte sur la notification solde crédité */
.balance-credit-alert.variant-success {
    border-left: 4px solid #10b981 !important;
}
.balance-credit-alert .alert-icon.variant-success {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #047857 !important;
}
.balance-credit-alert .alert-title {
    color: #047857 !important;
}

/* Correction forcée pour notification solde crédité */
.alert-modern.balance-credit-alert.variant-success {
    border-left: 4px solid #10b981 !important;
    box-shadow: 0 0 0 2px #10b98122 !important;
}
.alert-modern.balance-credit-alert .alert-icon.variant-success {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #047857 !important;
    border: 2px solid #10b981 !important;
}
.alert-modern.balance-credit-alert .alert-title {
    color: #047857 !important;
}
.alert-modern.balance-credit-alert .btn-close {
    color: #047857 !important;
}

/* Notifications: increase font sizes and use site's main font for better legibility */
.alert-modern,
.alert-premium,
.balance-credit-alert,
.alert-info,
.alert-warning,
.alert-stack {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; /* ensure same 'police' as site */
}

.alert-modern .alert-title,
.alert-premium .alert-title,
.balance-credit-alert .alert-title,
.alert-info .alert-title {
    font-size: 1.05rem; /* slightly larger for headings */
    font-weight: 700;
    color: #0f172a;
}

.alert-modern .alert-message,
.alert-premium .alert-message,
.balance-credit-alert .alert-message,
.alert-info .alert-message {
    font-size: 1.00rem; /* make body message readable on mobile */
    line-height: 1.5;
    color: #374151;
    font-weight: 500;
}

@media (max-width: 768px) {
    .alert-modern .alert-title,
    .alert-premium .alert-title,
    .alert-info .alert-title {
        font-size: 1.03rem;
    }
    .alert-modern .alert-message,
    .alert-premium .alert-message,
    .alert-info .alert-message {
        font-size: 0.98rem;
    }
}

@media (max-width: 480px) {
    .alert-modern .alert-title,
    .alert-premium .alert-title,
    .alert-info .alert-title {
        font-size: 1.00rem;
    }
    .alert-modern .alert-message,
    .alert-premium .alert-message,
    .alert-info .alert-message {
        font-size: 0.95rem;
    }
}




/* --------------------------------------------------------------------------- */
/* Footer mobile typography fixes: increase label size and weight on small viewports */
/* Ensures the site's font and weight are used so labels read larger on phones */
/* --------------------------------------------------------------------------- */
@media (max-width: 576px) {
    footer, footer a, footer a div {
        font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
        -webkit-font-smoothing: antialiased !important;
        text-rendering: optimizeLegibility !important;
    }

    /* Make footer labels larger and bolder for better legibility */
    footer a {
        font-size: 1.05rem !important; /* ~16.8px */
        font-weight: 800 !important;
        line-height: 1 !important;
        padding: 10px 6px !important;
    }

    /* Ensure the label text inside the anchor is visible and not truncated */
    footer a div {
        font-size: 0.98rem !important;
        font-weight: 800 !important;
        white-space: normal !important;
    }

    /* Slightly increase icon size to match the label weight */
    footer a i {
        font-size: 1.9rem !important;
    }

    /* Reduce footer pill height so labels fit without wrapping */
    footer {
        height: auto !important;
        padding: 8px 6px !important;
    }
}

/* FINAL OVERRIDE: reduce footer font-size and use system font on very small screens
   This lowers visual weight while keeping labels legible; uses !important to
   ensure it overrides earlier more aggressive rules. */
@media (max-width: 576px) {
    footer, footer a, footer a div {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
        -webkit-font-smoothing: antialiased !important;
        text-rendering: optimizeLegibility !important;
    }

    footer a {
        font-size: 0.95rem !important; /* slightly smaller */
        font-weight: 700 !important;  /* keep readable but less heavy */
        padding: 8px 6px !important;
    }

    footer a div {
        font-size: 0.85rem !important; /* label text slightly smaller than anchor */
        font-weight: 700 !important;
        white-space: normal !important;
    }

    footer a i {
        font-size: 1.6rem !important; /* reduce icon size to fit */
        line-height: 1 !important;
    }

    footer {
        height: auto !important;
        padding: 6px 6px !important;
    }
}

/* Ensure footer labels do not wrap and can ellipsize if space is tight */
@media (max-width: 576px) {
    footer {
        display: flex;
        align-items: center;
        justify-content: space-around;
        gap: 6px;
    }

    footer a {
        flex: 1 1 auto !important;
        min-width: 0 !important; /* allow flex items to shrink */
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 6px 4px !important;
    }

    /* Prevent label from breaking into two lines */
    footer a div {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
        display: block !important;
    }
}

/* Strongest override for timeline date/time/number to ensure user-requested styles apply */
html body .timeline-card .timeline-item span.timeline-datetime,
html body .timeline-card .timeline-item span.timeline-meta,
html body .timeline-card .timeline-item .timeline-datetime,
html body .timeline-card .timeline-item .timeline-meta,
html body span.timeline-datetime,
html body span.timeline-meta {
    font-weight: 600 !important;
    font-size: 0.80rem !important;
    color: inherit !important; /* keep color from other rules unless explicitly set inline */
}

/* Extra: reduce icon size inside datetime to match smaller text */
html body .timeline-card .timeline-item .timeline-datetime i,
html body span.timeline-datetime i {
    font-size: 0.75rem !important;
}

/* APPENDED FINAL OVERRIDES: place at end so these win over any previous !important rules */
/* Ensure variant-specific colors are applied on desktop and mobile */
.timeline-card .timeline-item .timeline-amount { color: inherit !important; }
.timeline-card .timeline-item .timeline-amount.variant-positive { color: #16a34a !important; }
.timeline-card .timeline-item .timeline-amount.variant-refund { color: #16a34a !important; }
.timeline-card .timeline-item .timeline-amount.variant-negative { color: #dc2626 !important; }
.timeline-card .timeline-item .timeline-amount.variant-neutral { color: #000000 !important; }

.timeline-amount.variant-positive { color: #16a34a !important; }
.timeline-amount.variant-refund { color: #16a34a !important; }
.timeline-amount.variant-negative { color: #dc2626 !important; }
.timeline-amount.variant-neutral { color: #000000 !important; }

/* Also ensure parent timeline-item doesn't force a single color to children */
.timeline-card .timeline-item { color: inherit !important; }

/* Ensure timeline titles (Remboursement, Paiement...) are as heavy as amounts */
.timeline-card .timeline-item .timeline-title,
.timeline-row .timeline-title,
.timeline-title {
    font-weight: 900 !important;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}








