/* ================= NAVBAR ================= */

.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;

    background: rgba(11, 11, 13, 0.7);
    backdrop-filter: blur(8px);
    padding: 12px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-inner {
    max-width: 1250px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-logo {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 10px;
}

.brand-text {
    line-height: 1;
}

.brand-main {
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -1px;
}

.just-text {
    background: linear-gradient(
        180deg,
        #fff 0%,
        #eee 35%,
        #a7a7a7 70%,
        #fff 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 1px 1px 2px rgba(0,0,0,.7);
}

.goal-text {
    background: linear-gradient(
        180deg,
        #fff2a8 0%,
        #ffd33d 30%,
        #d99b00 65%,
        #8e5c00 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 1px 1px 2px rgba(0,0,0,.7);
}

.boost-text {
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1.4px;
    background: linear-gradient(
        180deg,
        #39bdff 0%,
        #008cff 50%,
        #0060bd 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f3f4f6;
    border-radius: 12px;
    font-size: 13px;
}

.account-name {
    font-weight: 700;
}

.balance {
    color: #16a34a;
    font-weight: 800;
}

.cart-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    text-decoration: none;
}

.menu-btn {
    border: 0;
    background: #111827;
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    font-size: 20px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    max-width: 1250px;
    margin: 10px auto 0;
    background: #fff;
    border-radius: 15px;
    padding: 10px;
    box-shadow: 0 10px 35px rgba(0,0,0,.08);
}

.mobile-menu.show {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 13px 15px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    color: #172033;
}

.mobile-menu a:hover {
    background: #f3f4f6;
}
/* Espace réservé à la navbar fixe */
body {
    padding-top: 74px;
}

/* ===== NAVBAR FIXE DEFINITIVE ===== */
html,
body {
    margin: 0;
}

header.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
}
/* ================= MOBILE NAVBAR ================= */

@media (max-width: 650px) {

    .navbar {
        padding: 10px 12px;
    }

    .nav-inner {
        gap: 8px;
    }

    .brand-container {
        gap: 7px;
        min-width: 0;
    }

    .brand-logo {
        width: 43px;
        height: 43px;
        flex-shrink: 0;
    }

    .brand-main {
        font-size: 17px;
    }

    .boost-text {
        font-size: 10px;
        letter-spacing: 1px;
    }

    .nav-right {
        gap: 6px;
    }

    .account-box {
        padding: 7px 9px;
        gap: 5px;
        font-size: 11px;
    }

    .cart-icon,
    .menu-btn {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .mobile-menu {
        margin-left: 10px;
        margin-right: 10px;
    }
}

/* ===== ADAPTATION DES NOMS D'UTILISATEUR LONGS ===== */
header.navbar .nav-inner {
    min-width: 0;
}

header.navbar .brand-container {
    flex-shrink: 0;
}

header.navbar .nav-right {
    min-width: 0;
    flex-shrink: 1;
}

header.navbar .account-box {
    min-width: 0;
    max-width: 100%;
    flex-shrink: 1;
    white-space: nowrap;
}

header.navbar .account-name {
    display: block;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    font-size: 13px;
    line-height: 1.3;
}

header.navbar .balance {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 650px) {
    header.navbar .account-box {
        padding: 7px 6px;
        gap: 4px;
    }

    header.navbar .account-name {
        font-size: 11px;
    }
}
