/* ==========================================================================
   HEADER (LOGO & PROFIL)
   ========================================================================== */
.custom-header {
    background-color: var(--bg-main) !important;
    border-color: var(--border-color) !important;
    transition: background-color 0.4s ease;
    position: relative;
    z-index: 1030;
}

/* La boîte qui contient le logo */
.logo-box {
    width: 40px;
    height: 40px;
    background: linear-gradient(to bottom right, var(--gacha), #4f46e5);
    border-radius: 10px;
    position: relative;
    /* overflow: hidden; /* Optionnel : si l'image dépasse trop des bords arrondis */
}

/* --- NOUVEAU : Contrôle de l'image du logo --- */
.logo-icon {
    width: 80%;       /* Prend 80% de la largeur de .logo-box */
    height: 80%;      /* Prend 80% de la hauteur de .logo-box */
    object-fit: contain; /* S'assure que l'image est entière sans déformation */
}

/* Effet de lueur (inchangé) */
.logo-glow {
    position: absolute;
    inset: -5px;
    background-color: rgba(139, 92, 246, 0.4);
    border-radius: 50%;
    filter: blur(12px);
    opacity: 0;
    transition: opacity 0.3s;
}

.logo-link:hover .logo-glow { 
    opacity: 1; 
}

.profile-btn { background: none; border: none; padding: 0; }

/* ==========================================================================
   NAVBAR & LIENS DE NAVIGATION
   ========================================================================== */
.custom-nav {
    background-color: var(--bg-nav) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color) !important;
    min-height: 64px;
    transition: background-color 0.4s ease;
}

.nav-link-custom {
    color: var(--text-secondary) !important;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- HOVERS CATÉGORIES (Lévitation + Couleurs) --- */
.nav-link-custom:hover {
    color: var(--gacha) !important;
    transform: translateY(-3px);
}

.nav-link-custom:hover i.fa-layer-group { color: #3b82f6 !important; }
.nav-link-custom:hover i.fa-shirt { color: #ec4899 !important; }
.nav-link-custom:hover i.fa-coins { color: #ffc107 !important; }
.nav-link-custom:hover i.fa-map-location-dot { color: #0dcaf0 !important; }
.nav-link-custom:hover i.fa-trophy { color: #10b981 !important; }

/* ==========================================================================
   BOUTON INVOCATION / GACHA
   ========================================================================== */
.btn-invocation {
    background-color: var(--bg-btn-invocation);
    border: 1px solid rgba(139, 92, 246, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-invocation:hover {
    border-color: var(--gacha);
    background-color: rgba(139, 92, 246, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.2);
}

.btn-invocation i {
    color: var(--gacha);
    transition: transform 0.3s ease;
}

.btn-invocation:hover i {
    transform: rotate(15deg) scale(1.1);
}

.text-gradient {
    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text; /* Pour Safari et Chrome */
    background-clip: text;         /* Version standard (corrige l'alerte VS Code) */
    -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   PROFIL & BADGE
   ========================================================================== */
.badge-cart {
    position: absolute;
    top: -6px;
    right: -8px;
    background-color: var(--gacha);
    font-size: 0.6rem;
    border: 2px solid var(--bg-main);
    color: white;
    transition: border-color 0.4s ease;
}

.profile-name { 
    color: var(--text-primary) !important; 
    transition: color 0.4s ease;
}

.profile-status {
    font-size: 0.6rem;
    letter-spacing: 1px;
    /* Vous pouvez même ajouter un ajustement de ligne si besoin */
    line-height: 1.2;
}

.profile-img { 
    width: 38px; 
    height: 38px; 
    border: 2px solid #374151; 
    transition: all 0.2s ease;
}

.profile-btn:hover .profile-img { 
    border-color: var(--gacha);
    transform: translateY(-2px);
}

.status-dot {
    width: 10px; height: 10px;
    background-color: #22c55e;
    border: 2px solid var(--bg-main);
    bottom: 0; right: 0;
    transition: border-color 0.4s ease;
}

/* BOUTON INVOCATION / GACHA */

.separator-vertical {
    width: 1px;
    height: 24px;
    background-color: var(--border-color);
}

/* ==========================================================================
   Dropdown Nexus & RESPONSIVE (Menu Burger)
   ========================================================================== */
/* Style personnalisé pour les items du dropdown Nexus */
.custom-dropdown-nexus {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
}

.custom-dropdown-nexus .dropdown-divider {
    border-color: var(--border-color);
}

.dropdown-nexus {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-nexus:hover {
    background-color: rgba(139, 92, 246, 0.1); /* Fond légèrement violet */
    color: var(--gacha) !important;           /* Texte violet */
}

/* On garde le rouge spécifique pour la déconnexion au survol */
.dropdown-nexus.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545 !important;
}

/* S'assure que les icônes font toutes la même taille pour que le texte soit aligné */
.dropdown-nexus i {
    width: 16px;
    text-align: center;
}

/* ==========================================================================
   RESPONSIVE : LOGIQUE DU MENU BURGER
   ========================================================================== */

/* On force le container de la nav à être transparent par défaut */
.navbar-collapse {
    background: transparent;
    border: none;
    transition: all 0.3s ease;
}

/* IMPORTANT : Le fond noir et la bordure ne s'appliquent 
   QUE si la classe .show est présente (menu burger ouvert)
   AJOUT de .collapsing pour éviter le flash pendant l'animation
*/
.navbar-collapse.show, 
.navbar-collapse.collapsing {
    background: var(--bg-main);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Ajustements visuels des liens quand ils sont empilés dans le burger */
.navbar-collapse.collapsing .nav-link-custom {
    white-space: nowrap;
}

.navbar-collapse.show .btn-invocation,
.navbar-collapse.collapsing .btn-invocation {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
}

.navbar-collapse.show .separator-vertical {
    display: none; /* Cache le trait vertical en mode mobile */
}