/* ==========================================================================
   CORRECTIF GLOBAL - SUPPRESSION ESPACE BLANC
   ========================================================================== */
body {
    margin: 0;
    padding: 0 !important; /* Force la suppression des paddings automatiques */
}

/* ==========================================================================
   BARRE DE NAVIGATION PRINCIPALE (DESKTOP)
   ========================================================================== */
.navigation.white {
    border-bottom: 1px solid #efefef;
    box-shadow: none !important;
    height: 80px !important;
    line-height: 80px !important;
    background-color: #fff !important;
    position: sticky;
    top: 0;
    z-index: 999;
}

.pinterest-layout {
    display: flex !important;
    align-items: center;
    justify-content: space-between; /* Assure la répartition Logo | Menu | Tools */
    width: 100%;
    padding: 0 24px !important;
    gap: 15px;
    height: 100%; 
}

.logo-section { 
    flex-shrink: 0; 
    display: flex;
    align-items: center;
}

.brand-logo-static img { 
    height: 48px; 
    display: block; 
    width: auto;
}

.navi_tab_custom {
    display: flex;
    margin-left: auto !important;
    margin-right: 20px !important;
    padding: 0;
    list-style: none;
}

.navi_tab_custom li a {
    color: #111 !important;
    font-weight: 600;
    padding: 0 20px;
    height: 48px !important;
    line-height: 48px !important;
    border-radius: 24px;
    transition: all 0.3s ease;
    font-size: 16px;
}

.navi_tab_custom li a:hover { 
    background-color: #efefef; 
}

.navi_tab_custom li.active a {
    background-color: #111;
    color: #fff !important;
}

/* SECTION DROITE - CORRIGÉE POUR LA VISIBILITÉ */
.right-section {
    display: flex !important;
    align-items: center;
    gap: 12px;
    flex-shrink: 0; /* Empêche la section de se compresser et de disparaître */
}

.user-profile-trigger {
    display: flex;
    align-items: center;
}

.profile-nav-img { 
    width: 35px !important; 
    height: 35px !important; 
    object-fit: cover; 
    border: 1px solid #ddd; 
    margin: 0 !important;
}

/* BOUTONS STYLE PINTEREST */
.btn-pinterest {
    border-radius: 24px !important;
    text-transform: none !important;
    font-weight: 700 !important;
    height: 45px !important;
    line-height: 45px !important;
    padding: 0 20px !important;
    box-shadow: none !important;
    font-size: 15px;
    transition: transform 0.2s ease;
    white-space: nowrap;
}

.btn-pinterest:hover {
    transform: scale(1.05);
}

.btn-connexion { background-color: #e60023 !important; color: #fff !important; }
.btn-inscription { background-color: #efefef !important; color: #111 !important; }

/* ==========================================================================
   MENU MOBILE (SIDENAV) - OPTIMISATION UX/UI
   ========================================================================== */
.sidenav {
    width: 300px !important;
    border-radius: 0 24px 24px 0;
    box-shadow: 10px 0 30px rgba(0,0,0,0.1) !important;
    top: 0 !important; 
}

.sidenav .user-view {
    padding: 40px 32px 20px !important;
    margin-bottom: 8px;
}

.sidenav li > a {
    font-weight: 600;
    color: #333 !important;
    padding: 0 24px !important;
    height: 56px !important;
    line-height: 56px !important;
    display: flex !important;
    align-items: center;
    border-radius: 0 28px 28px 0;
    margin-right: 15px;
    transition: background 0.2s;
}

.sidenav li > a:hover { background-color: #f5f5f5 !important; }

.sidenav li > a > i.material-icons {
    margin-right: 16px !important;
    color: #666;
    font-size: 24px;
    height: 56px;
    line-height: 56px;
}

.sidenav .divider {
    margin: 15px 24px !important;
    background-color: #eee;
}

.sidenav-trigger-custom {
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sidenav-trigger-custom:hover { background-color: #efefef; }
.sidenav-trigger-custom i { color: #111; font-size: 28px; }

/* ==========================================================================
   RESPONSIVE & FIX ESPACE VIDE
   ========================================================================== */
@media (max-width: 992px) {
    .navi_tab_custom { display: none !important; }
    .logo-section { margin-right: auto; }
    .right-section { gap: 10px; }

    header, main, footer {
        padding-top: 0 !important;
    }
}

@media (max-width: 600px) {
    .navigation.white { 
        height: 64px !important; 
        line-height: 64px !important;
    }
    .brand-logo-static img { height: 35px; }
    .pinterest-layout { padding: 0 12px !important; }
    
    .btn-inscription { 
        padding: 0 12px !important; 
        font-size: 13px;
        height: 38px !important;
        line-height: 38px !important;
    }
    
    /* On s'assure que la section droite reste alignée sur mobile */
    .right-section { gap: 5px; }
}

/* État actif */
.sidenav li.active { background-color: rgba(230, 0, 35, 0.05); }
.sidenav li.active > a { color: #e60023 !important; font-weight: 700; }
.sidenav li.active > a > i.material-icons { color: #e60023 !important; }

/* Animation du Spinner */
.loader-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Style quand le bouton est désactivé */
.btn-submit:disabled {
    background-color: #a5a5a5 !important;
    cursor: not-allowed;
    opacity: 0.8;
}