body {
    background: #FAFAFA;
    font-family: 'Aeonik Pro', 'Inter', Arial, sans-serif;
}

.dashboard-premium {
    padding-bottom: 70px;
    /* pour la nav bottom */
    max-width: 430px;
    margin: 0 auto;
}

.wallet-section,
.orders-section,
.profile-section {
    display: none;
}

.wallet-section {
    display: block;
}

/* AffichÃ© au load */

.wallet-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 6px 24px 0 #d4dbed2f;
    padding: 22px 20px 18px 20px;
    margin: 18px 0 8px 0;
    position: relative;
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.wallet-title {
    font-size: 1.14rem;
    font-weight: 700;
    color: #233559;
}

.wallet-secure {
    font-size: .97em;
    color: #B8B7B0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wallet-balance {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 18px 0 12px 0;
    color: #181C23;
    letter-spacing: -1px;
    text-align: center;
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, #233559 0%, #5063B1 100%);
    color: #fff;
    font-weight: 700;
    border: none;
    border-radius: 11px;
    padding: 11px 0;
    font-size: 1.12rem;
    width: 100%;
    margin-top: 4px;
    cursor: pointer;
    transition: box-shadow .17s;
    box-shadow: 0 2px 12px #23355914;
}

.btn-primary:active {
    box-shadow: 0 1px 4px #23355922;
}

.wallet-history-block {
    margin-top: 18px;
}

.wallet-history-title {
    font-weight: 600;
    font-size: 1.12em;
    margin-bottom: 5px;
    color: #233559;
}

.wallet-history-list {
    min-height: 66px;
}

.wallet-tx {
    display: flex;
    align-items: center;
    background: #F4F6FB;
    border-radius: 10px;
    padding: 8px 14px;
    margin-bottom: 7px;
}

.wallet-tx-icon {
    font-size: 1.28em;
    margin-right: 11px;
}

.wallet-tx-main {
    flex: 1;
    font-size: .98em;
}

.wallet-tx-date {
    color: #A7AAB2;
    font-size: .87em;
}

.wallet-tx-amount {
    font-weight: 700;
    font-size: 1.01em;
    min-width: 78px;
    text-align: right;
}

.wallet-tx-empty {
    color: #A7AAB2;
    text-align: center;
    padding: 18px 0 6px 0;
}

.orders-section {
    padding: 10px 0 0 0;
}

.orders-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0 7px 0;
}

.orders-title {
    font-size: 1.13em;
    font-weight: 700;
    color: #233559;
}

.orders-all-btn {
    font-size: .99em;
    color: #5063B1;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 700;
}

.orders-list {
    min-height: 60px;
}

.order-card {
    background: #fff;
    border-radius: 11px;
    box-shadow: 0 2px 12px #23355911;
    padding: 13px 15px;
    margin-bottom: 10px;
    font-size: 1.01em;
}

.order-row {
    display: flex;
    justify-content: space-between;
}

.order-id {
    color: #5063B1;
    font-weight: 700;
}

.order-date {
    color: #6B7588;
}

.order-amount {
    font-weight: 600;
    margin-top: 3px;
}

.orders-empty {
    color: #A7AAB2;
    text-align: center;
    padding: 16px 0 8px 0;
}

.profile-section {
    padding: 10px 0 0 0;
}

.profile-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px #2335590f;
    padding: 17px 18px 12px 18px;
    margin: 20px 0 10px 0;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid #F1F3F7;
    font-size: 1.05em;
}

.profile-row:last-child {
    border-bottom: none;
}

.btn-logout {
    width: 100%;
    border: none;
    background: #F9F7F7;
    color: #ED3A24;
    border-radius: 8px;
    padding: 11px;
    font-size: 1.05em;
    margin-top: 22px;
    display: flex;
    align-items: center;
    gap: 9px;
    justify-content: center;
    cursor: pointer;
}

.dashboard-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    box-shadow: 0 -1px 12px #23355922;
    display: flex;
    z-index: 90;
    height: 59px;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-btn {
    flex: 1;
    background: none;
    border: none;
    color: #6B7588;
    font-size: .95em;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 7px 0 2px 0;
    transition: color .15s;
}

.bottom-nav-btn.active {
    color: #233559;
}

.nav-icon {
    display: inline-block;
    width: 23px;
    height: 23px;
    margin-bottom: 2px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.nav-icon.home {
    background-image: url('assets/icon-home.svg');
}

.nav-icon.orders {
    background-image: url('assets/icon-orders.svg');
}

.nav-icon.wallet {
    background-image: url('assets/icon-wallet.svg');
}

.nav-icon.profile {
    background-image: url('assets/icon-user.svg');
}

.dashboard-toast {
    display: none;
    position: fixed;
    left: 50%;
    bottom: 72px;
    transform: translateX(-50%);
    background: #233559;
    color: #fff;
    font-weight: 700;
    padding: 13px 24px;
    border-radius: 11px;
    font-size: 1.05em;
    box-shadow: 0 3px 12px #23355922;
    z-index: 999;
}

.dashboard-toast.error {
    background: #ED3A24;
}

.dashboard-loader {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(250, 250, 250, 0.88);
    z-index: 999;
    justify-content: center;
    align-items: center;
}

.dashboard-loader>div {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3.5px solid #5063B1;
    border-top-color: #233559;
    animation: spin .6s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Squelette loading (si tu veux push encore plus loin, mais optionnel) */
.wallet-history-list:empty::after,
.orders-list:empty::after {
    content: '';
    display: block;
    height: 48px;
    background: linear-gradient(90deg, #F3F3F3 25%, #EDEDED 37%, #F3F3F3 63%);
    border-radius: 8px;
    margin: 7px 0;
    animation: loading-skeleton 1.4s infinite linear;
}

@keyframes loading-skeleton {
    0% {
        background-position: -100px 0;
    }

    100% {
        background-position: 130px 0;
    }
}

body {
    background: #FAFAFA;
    font-family: 'Aeonik Pro', 'Inter', Arial, sans-serif;
    color: #181C23;
}

.dashboard-premium {
    padding-bottom: 110px;
    /* pour bien espacer le contenu du menu bas */
    max-width: 430px;
    margin: 0 auto;
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .dashboard-premium {
        padding-bottom: calc(110px + env(safe-area-inset-bottom));
    }
}

/* Header */
.dashboard-header {
    margin: 18px 0 8px 0;
    padding: 0 20px;
    text-align: left;
}

.dashboard-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #233559;
    margin-bottom: 2px;
}

.dashboard-desc {
    font-size: 0.98em;
    color: #6B7588;
    line-height: 1.55;
}

/* Wallet Card */
.wallet-section,
.orders-section,
.profile-section {
    display: none;
}

.wallet-section {
    display: block;
}

.wallet-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 6px 24px 0 #d4dbed24;
    padding: 24px 18px 22px 18px;
    margin: 18px 18px 12px 18px;
    position: relative;
    transition: box-shadow 0.18s;
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.wallet-title {
    font-size: 1.13rem;
    font-weight: 700;
    color: #233559;
}

.wallet-secure {
    font-size: .81em;
    color: #B8B7B0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.wallet-balance {
    font-size: 2.4rem;
    font-weight: 700;
    margin: 20px 0 18px 0;
    color: #181C23;
    letter-spacing: -1px;
    text-align: center;
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: linear-gradient(90deg, #233559 0%, #5063B1 100%);
    color: #fff;
    font-weight: 700;
    border: none;
    border-radius: 13px;
    padding: 14px 0;
    font-size: 1.12rem;
    width: 100%;
    margin-top: 4px;
    cursor: pointer;
    transition: box-shadow .17s;
    box-shadow: 0 2px 12px #23355914;
}

.btn-primary:active {
    box-shadow: 0 1px 4px #23355922;
}

/* Historique */
.wallet-history-block {
    margin: 21px 18px 0 18px;
}

.wallet-history-title {
    font-weight: 600;
    font-size: 1.09em;
    margin-bottom: 6px;
    color: #233559;
}

.wallet-history-list {
    min-height: 64px;
}

.wallet-tx {
    display: flex;
    align-items: center;
    background: #F4F6FB;
    border-radius: 10px;
    padding: 8px 14px;
    margin-bottom: 8px;
    box-shadow: 0 1px 6px #2335590a;
}

.wallet-tx-icon {
    font-size: 1.24em;
    margin-right: 13px;
}

.wallet-tx-main {
    flex: 1;
    font-size: .98em;
}

.wallet-tx-date {
    color: #A7AAB2;
    font-size: .87em;
}

.wallet-tx-amount {
    font-weight: 700;
    font-size: 1.01em;
    min-width: 78px;
    text-align: right;
}

.wallet-tx-empty {
    color: #A7AAB2;
    text-align: center;
    padding: 17px 0 7px 0;
}

.orders-section {
    padding: 10px 0 0 0;
}

.orders-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 13px 18px 7px 18px;
}

.orders-title {
    font-size: 1.13em;
    font-weight: 700;
    color: #233559;
}

.orders-all-btn {
    font-size: 1em;
    color: #5063B1;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 700;
    border-radius: 8px;
    padding: 5px 11px;
    transition: background 0.13s;
}

.orders-all-btn:active {
    background: #F4F6FB;
}

.orders-list {
    min-height: 60px;
    margin: 0 18px;
}

.order-card {
    background: #fff;
    border-radius: 11px;
    box-shadow: 0 2px 12px #2335590a;
    padding: 14px 15px;
    margin-bottom: 10px;
    font-size: 1.01em;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-row {
    display: flex;
    justify-content: space-between;
}

.order-id {
    color: #5063B1;
    font-weight: 700;
}

.order-date {
    color: #6B7588;
}

.order-amount {
    font-weight: 600;
    margin-top: 3px;
}

.orders-empty {
    color: #A7AAB2;
    text-align: center;
    padding: 16px 0 8px 0;
}

.profile-section {
    padding: 10px 0 0 0;
}

.profile-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px #2335590a;
    padding: 17px 18px 12px 18px;
    margin: 18px 18px 10px 18px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #F1F3F7;
    font-size: 1.06em;
}

.profile-row:last-child {
    border-bottom: none;
}

.btn-logout {
    width: 100%;
    border: none;
    background: #F9F7F7;
    color: #ED3A24;
    border-radius: 10px;
    padding: 12px;
    font-size: 1.07em;
    margin-top: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.13s;
}

.btn-logout:active {
    background: #FFE6E3;
}

/* Menu bas */
.dashboard-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    box-shadow: 0 -1px 16px #23355915;
    display: flex;
    z-index: 90;
    height: 62px;
    justify-content: space-around;
    align-items: center;
    border-radius: 18px 18px 0 0;
}

.bottom-nav-btn {
    flex: 1;
    background: none;
    border: none;
    color: #6B7588;
    font-size: .98em;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 7px 0 2px 0;
    transition: color .14s, background .16s;
    border-radius: 12px;
    margin: 0 6px;
}

.bottom-nav-btn.active {
    color: #233559;
    background: #F4F6FB;
}

.nav-icon {
    display: inline-block;
    width: 23px;
    height: 23px;
    margin-bottom: 2px;
    line-height: 0;
    /* Pour bien centrer le svg */
}

/* Toast notification */
.dashboard-toast {
    display: none;
    position: fixed;
    left: 50%;
    bottom: 78px;
    transform: translateX(-50%);
    background: #233559;
    color: #fff;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1.05em;
    box-shadow: 0 3px 15px #23355922;
    z-index: 999;
}

.dashboard-toast.error {
    background: #ED3A24;
}

/* Loader */
.dashboard-loader {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(250, 250, 250, 0.93);
    z-index: 999;
    justify-content: center;
    align-items: center;
}

.dashboard-loader>div {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3.7px solid #5063B1;
    border-top-color: #233559;
    animation: spin .62s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Squelette loading */
.wallet-history-list:empty::after,
.orders-list:empty::after {
    content: '';
    display: block;
    height: 48px;
    background: linear-gradient(90deg, #F3F3F3 25%, #EDEDED 37%, #F3F3F3 63%);
    border-radius: 8px;
    margin: 7px 0;
    animation: loading-skeleton 1.4s infinite linear;
}

@keyframes loading-skeleton {
    0% {
        background-position: -100px 0;
    }

    100% {
        background-position: 130px 0;
    }
}

.parrainage-section {
    padding: 24px 12px 0 12px;
    max-width: 420px;
    margin: 0 auto;
}

.parrainage-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 18px #5063B11a;
    padding: 27px 18px 18px 18px;
    margin-bottom: 19px;
    text-align: center;
}

.parrainage-title {
    font-size: 1.18em;
    font-weight: 700;
    color: #233559;
    margin-bottom: 8px;
    letter-spacing: .03em;
}

.parrainage-desc {
    color: #4d5e8a;
    font-size: 1.02em;
    margin-bottom: 14px;
    line-height: 1.52;
}

.parrainage-code-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #F6F8FC;
    border-radius: 10px;
    padding: 13px 16px;
    margin: 0 auto 8px auto;
    font-size: 1.16em;
    font-weight: 700;
    letter-spacing: .09em;
    box-shadow: 0 1px 6px #5063B115;
}

.parrainage-code {
    font-size: 1.25em;
    letter-spacing: .18em;
    color: #233559;
    font-family: 'Aeonik Pro', 'Inter', Arial, sans-serif;
}

.parrainage-copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 0 0 6px;
    border-radius: 8px;
    transition: background .13s;
}

.parrainage-copy-btn:active,
.parrainage-copy-btn:focus {
    background: #e9eefc;
}

.parrainage-exp-btn {
    width: 100%;
    background: linear-gradient(90deg, #233559 0%, #5063B1 100%);
    color: #fff;
    font-weight: 700;
    border-radius: 11px;
    font-size: 1.08em;
    padding: 12px 0;
    border: none;
    box-shadow: 0 1px 8px #5063B115;
    margin-top: 11px;
    cursor: pointer;
    transition: background .15s;
}

.parrainage-exp-btn:active {
    background: #233559;
}

.parrainage-stats {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin: 9px 0 18px 0;
    flex-wrap: wrap;
}

.parrainage-stat {
    background: #F6F8FC;
    border-radius: 12px;
    box-shadow: 0 1px 6px #5063B113;
    padding: 13px 16px 10px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.parrainage-stat-value {
    font-size: 1.18em;
    font-weight: bold;
    color: #233559;
    margin-bottom: 3px;
    letter-spacing: .04em;
}

.parrainage-stat-label {
    color: #5063B1;
    font-size: 0.97em;
    font-weight: 500;
    letter-spacing: .01em;
}

.parrainage-progress-block {
    margin: 5px 0 12px 0;
    text-align: left;
}

.parrainage-progress-bar {
    background: #e9eefc;
    border-radius: 9px;
    width: 100%;
    height: 12px;
    margin-bottom: 6px;
    overflow: hidden;
    box-shadow: 0 1px 6px #5063B112;
}

.parrainage-progress-inner {
    height: 100%;
    background: linear-gradient(90deg, #233559 0%, #5063B1 100%);
    width: 0;
    border-radius: 9px 0 0 9px;
    transition: width .45s cubic-bezier(.7, 0, .24, 1);
}

.parrainage-progress-txt {
    font-size: 0.98em;
    color: #5063B1;
    margin-top: 2px;
    font-weight: 500;
}

.btn-secondary {
    background: #fff;
    color: #233559;
    border: 2px solid #5063B1;
    border-radius: 9px;
    padding: 10px 0;
    font-weight: 700;
    font-size: 1.05em;
    box-shadow: 0 1px 7px #5063B11a;
    cursor: pointer;
    transition: background .16s, color .13s, border .13s;
}

.btn-secondary:hover,
.btn-secondary:active {
    background: #5063B1;
    color: #fff;
    border-color: #233559;
}

@media (max-width: 500px) {
    .parrainage-stats {
        gap: 6px;
    }

    .parrainage-stat {
        padding: 10px 7px 7px 7px;
        min-width: 82px;
    }

    .parrainage-stat-value {
        font-size: 1em;
    }

    .parrainage-stat-label {
        font-size: 0.91em;
    }
}

.parrainage-popup {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.parrainage-popup-blur {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(40, 56, 103, 0.13);
    backdrop-filter: blur(6px);
    z-index: 1;
}

.parrainage-popup-content {
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 6px 44px #5063B11c;
    padding: 22px 17px 18px 17px;
    min-width: 290px;
    max-width: 96vw;
    width: 340px;
    max-height: 80vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: popupShow .22s cubic-bezier(.18, .95, .44, 1.09);
}

@keyframes popupShow {
    from {
        opacity: 0;
        transform: translateY(44px) scale(.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.popup-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.82;
    padding: 2px;
    border-radius: 50%;
    transition: background .13s, opacity .15s;
}

.popup-close-btn:hover {
    background: #e9eefc;
    opacity: 1;
}

.popup-title {
    margin: 0 0 12px 0;
    font-size: 1.12em;
    color: #233559;
    font-weight: 700;
    text-align: center;
}

.popup-history-list {
    width: 100%;
    margin-top: 2px;
}

.popup-history-item {
    background: #F4F6FB;
    border-radius: 12px;
    box-shadow: 0 1px 6px #5063B111;
    margin-bottom: 10px;
    padding: 11px 10px 8px 10px;
    font-size: 0.98em;
    display: flex;
    flex-direction: column;
}

.popup-history-amount {
    font-weight: bold;
    color: #13B888;
    font-size: 1.08em;
}

.popup-history-date {
    color: #6B7588;
    font-size: .96em;
    margin-top: 2px;
}

.popup-history-desc {
    color: #5063B1;
    font-size: 0.98em;
    margin-top: 2px;
}

@media (max-width: 500px) {
    .parrainage-popup-content {
        padding: 16px 3vw 11px 3vw;
        min-width: 0;
        width: 96vw;
    }
}

.popup-offre-exclu {
    position: fixed;
    right: 28px;
    bottom: 120px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 340px;
    animation: popupOffreShow .46s cubic-bezier(.43, .72, .41, 1.18);
}

@keyframes popupOffreShow {
    from {
        opacity: 0;
        transform: translateY(44px) scale(.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.popup-offre-img {
    width: 240px;
    max-width: 85vw;
    height: auto;
    display: block;
}

.popup-offre-close {
    position: absolute;
    top: 8px;
    right: 13px;
    background: #fff;
    color: #233559;
    border: none;
    border-radius: 99px;
    width: 31px;
    height: 31px;
    font-size: 1.55em;
    cursor: pointer;
    box-shadow: 0 1px 8px #23355918;
    opacity: .84;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .13s, opacity .16s;
}

.popup-offre-close:hover {
    background: #5063B1;
    color: #fff;
    opacity: 1;
}

@media (max-width: 700px) {
    .popup-offre-exclu {
        right: 8px;
        bottom: 90px;
        max-width: 92vw;
    }

    .popup-offre-img {
        width: 45vw;
        min-width: 0;
    }

    .popup-offre-close {
        top: 6px;
        right: 8px;
        width: 27px;
        height: 27px;
        font-size: 1.19em;
    }
}