/**
 * AS CRUSIX - Palette de couleurs personnalisée
 * Mode Dark par défaut
 */


/* ===== Palette de couleurs personnalisée ===== */

:root {
    /* Couleurs primaires - Thème Autoshop */
    --bs-primary: #ff4757;
    /* Rouge vif pour accents */
    --bs-primary-rgb: 255, 71, 87;
    --bs-secondary: #2f3542;
    /* Gris foncé */
    --bs-secondary-rgb: 47, 53, 66;
    --bs-success: #26de81;
    /* Vert néon */
    --bs-success-rgb: 38, 222, 129;
    --bs-info: #45aaf2;
    /* Bleu clair */
    --bs-info-rgb: 69, 170, 242;
    --bs-warning: #fed330;
    /* Jaune */
    --bs-warning-rgb: 254, 211, 48;
    --bs-danger: #fc5c65;
    /* Rouge corail */
    --bs-danger-rgb: 252, 92, 101;
    /* Couleurs dark mode */
    --bs-dark: #1e272e;
    /* Noir profond */
    --bs-dark-rgb: 30, 39, 46;
    --bs-light: #a4b0be;
    /* Gris clair */
    --bs-light-rgb: 164, 176, 190;
}


/* ===== Mode Dark personnalisé ===== */

[data-bs-theme="dark"] {
    /* Background principal */
    --bs-body-bg: #0a0e27;
    /* Bleu très foncé */
    --bs-body-bg-rgb: 10, 14, 39;
    /* Texte */
    --bs-body-color: #e4e6eb;
    /* Blanc cassé */
    --bs-body-color-rgb: 228, 230, 235;
    /* Surfaces/Cards */
    --bs-surface-bg: #1a1f3a;
    /* Bleu foncé */
    --bs-border-color: #2d3561;
    /* Bordures subtiles */
    /* Links */
    --bs-link-color: #ff4757;
    --bs-link-hover-color: #ff6b7a;
}

/* FORCE DARK MODE même si Windows est en light mode */
@media (prefers-color-scheme: light) {
    [data-bs-theme="dark"] {
        --bs-body-bg: #0a0e27 !important;
        --bs-body-bg-rgb: 10, 14, 39 !important;
        --bs-body-color: #e4e6eb !important;
        --bs-body-color-rgb: 228, 230, 235 !important;
        --bs-surface-bg: #1a1f3a !important;
        --bs-border-color: #2d3561 !important;
        --bs-link-color: #ff4757 !important;
        --bs-link-hover-color: #ff6b7a !important;
    }
}


/* ===== Background de la page auth avec image ===== */

body.bg-primary {
    position: relative;
    overflow: hidden;
}

/* Image de fond floutée (pseudo-élément pour appliquer filter) */
body.bg-primary::before {
    content: '';
    position: fixed;
    top: -20px;
    left: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    background-image: url('../images/backgrounder.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(15px);
    /* Effet blur FORT sur l'image */
    -webkit-filter: blur(15px);
    z-index: 0;
}

/* Overlay sombre par-dessus l'image floutée */
body.bg-primary::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.7);
    /* Overlay sombre 70% */
    z-index: 1;
    pointer-events: none;
}


/* Alternative : Gradient au lieu d'overlay sombre */

body.bg-primary.gradient-overlay::before {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
}


/* Alternative 2 : Si pas d'image, juste gradient */

body.autoshop-bg {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #2d3561 100%) !important;
}


/* ===== Cards en mode dark avec glassmorphism ===== */

[data-bs-theme="dark"] .card {
    background: rgba(26, 31, 58, 0.75);
    /* Semi-transparent pour voir le fond */
    border: 1px solid rgba(45, 53, 97, 0.5);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(10px);
    /* Effet verre dépoli */
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    position: relative;
    z-index: 10;
}


/* ===== Boutons personnalisés ===== */

.btn-primary {
    background: linear-gradient(135deg, #ff4757 0%, #fc5c65 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    transition: all 0.3s ease;
    color: #ffffff !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #fc5c65 0%, #ff4757 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.6);
    color: #ffffff !important;
}

.btn-success {
    color: #ffffff !important;
}

.btn-success:hover {
    color: #ffffff !important;
}

.btn-danger {
    color: #ffffff !important;
}

.btn-danger:hover {
    color: #ffffff !important;
}

.btn-warning {
    color: #ffffff !important;
}

.btn-warning:hover {
    color: #ffffff !important;
}

.btn-info {
    color: #ffffff !important;
}

.btn-info:hover {
    color: #ffffff !important;
}

.btn-dark {
    color: #ffffff !important;
}

.btn-dark:hover {
    color: #ffffff !important;
}

.btn-secondary {
    color: #ffffff !important;
}

.btn-secondary:hover {
    color: #ffffff !important;
}


/* Force le texte blanc sur TOUS les boutons */

.btn {
    color: #ffffff !important;
}

.btn:hover,
.btn:focus,
.btn:active {
    color: #ffffff !important;
}

/* Force texte blanc sur boutons avec liens */
a.btn,
a.btn:hover,
a.btn:focus,
a.btn:active,
a.btn:visited {
    color: #ffffff !important;
}

/* Force texte blanc sur tous les variants de boutons */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-secondary,
.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.btn-success,
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-danger,
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-warning,
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active,
.btn-info,
.btn-info:hover,
.btn-info:focus,
.btn-info:active,
.btn-dark,
.btn-dark:hover,
.btn-dark:focus,
.btn-dark:active,
.btn-light,
.btn-light:hover,
.btn-light:focus,
.btn-light:active {
    color: #ffffff !important;
}

/* Force texte blanc sur liens dans les boutons */
.btn a,
.btn i,
.btn span {
    color: #ffffff !important;
}


/* ===== Inputs en mode dark ===== */

[data-bs-theme="dark"] .form-control {
    background-color: #0a0e27;
    border-color: #2d3561;
    color: #e4e6eb;
}

[data-bs-theme="dark"] .form-control:focus {
    background-color: #1a1f3a;
    border-color: #ff4757;
    color: #e4e6eb;
    box-shadow: 0 0 0 0.25rem rgba(255, 71, 87, 0.25);
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: #6c757d;
}


/* ===== Checkbox personnalisée ===== */

[data-bs-theme="dark"] .form-check-input {
    background-color: #0a0e27;
    border-color: #2d3561;
}

[data-bs-theme="dark"] .form-check-input:checked {
    background-color: #ff4757;
    border-color: #ff4757;
}


/* ===== Alerts ===== */

[data-bs-theme="dark"] .alert-danger {
    background-color: rgba(252, 92, 101, 0.15);
    border-color: rgba(252, 92, 101, 0.3);
    color: #fc5c65;
}

[data-bs-theme="dark"] .alert-success {
    background-color: rgba(38, 222, 129, 0.15);
    border-color: rgba(38, 222, 129, 0.3);
    color: #26de81;
}


/* ===== Logo glow effect ===== */

.auth-logo img {
    filter: drop-shadow(0 0 10px rgba(255, 71, 87, 0.3));
}


/* ===== Liens en mode dark ===== */

[data-bs-theme="dark"] a {
    color: #ff4757;
}

[data-bs-theme="dark"] a:hover {
    color: #ff6b7a;
}


/* ===== Texte blanc-50 plus visible ===== */

.text-white-50 {
    color: rgba(228, 230, 235, 0.7) !important;
}

.text-white-50 a {
    color: #e4e6eb !important;
}


/* ===== Scrollbar personnalisée ===== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0e27;
}

::-webkit-scrollbar-thumb {
    background: #2d3561;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff4757;
}


/* ===== Fix alignement vertical des icônes dans les boutons ===== */

.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem;
}

.btn i,
.btn .bx,
.btn .fa,
.btn .fas,
.btn .far,
.btn .fab {
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.input-group-text {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.input-group-text i,
.input-group-text .bx {
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}


/* ===== Wallet Display (Casino Style) ===== */

.wallet-display {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.1) 0%, rgba(69, 170, 242, 0.1) 100%);
    border: 2px solid rgba(255, 71, 87, 0.3);
    border-radius: 50px;
    padding: 8px 16px 8px 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.2);
}

.wallet-display:hover {
    border-color: rgba(255, 71, 87, 0.6);
    box-shadow: 0 6px 25px rgba(255, 71, 87, 0.4);
    transform: translateY(-2px);
}

.wallet-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff4757 0%, #fc5c65 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.4);
    animation: walletPulse 2s ease-in-out infinite;
}

@keyframes walletPulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.wallet-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 100px;
}

.wallet-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
}

.wallet-amount {
    font-size: 18px;
    font-weight: 700;
    color: #ff4757;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.5px;
}

.wallet-add-btn {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #26de81 0%, #20bf6b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
}

.wallet-add-btn:hover {
    transform: rotate(90deg) scale(1.1);
    color: white;
}

.wallet-add-btn i {
    line-height: 1;
}


/* Animation de mise à jour du solde */

@keyframes balanceUpdate {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.wallet-amount.updating {
    animation: balanceUpdate 0.5s ease-in-out;
    color: #fed330;
}

/* ===== News Section Styling ===== */

.news-container {
    position: relative;
    padding-right: 8px !important; /* Espace pour la scrollbar */
}

.news-container .simplebar-content-wrapper {
    padding-right: 8px !important;
}

.news-item {
    background-color: rgba(42, 50, 90, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-left: 3px solid rgba(255, 71, 87, 0.5) !important;
    transition: all 0.3s ease;
    overflow: hidden;
}

.news-item:hover {
    background-color: rgba(42, 50, 90, 0.5);
    border-left-color: rgba(255, 71, 87, 0.8) !important;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.15);
}

.news-item .avatar-sm {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
}

.news-item h5 {
    color: #e4e6eb;
    font-weight: 600;
}

.news-item p {
    color: #a4b0be;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Badge styles for news */

.badge.bg-success-subtle {
    background-color: rgba(38, 222, 129, 0.15) !important;
    border: 1px solid rgba(38, 222, 129, 0.3);
}

.badge.bg-warning-subtle {
    background-color: rgba(254, 211, 48, 0.15) !important;
    border: 1px solid rgba(254, 211, 48, 0.3);
}

.badge.bg-info-subtle {
    background-color: rgba(69, 170, 242, 0.15) !important;
    border: 1px solid rgba(69, 170, 242, 0.3);
}

/* Simplebar customization for news */

.news-container .simplebar-scrollbar::before {
    background-color: var(--bs-primary);
    opacity: 0.5;
}

.news-container .simplebar-scrollbar.simplebar-visible::before {
    opacity: 1;
}