/* ========================================
   SGI LEASE & GO - Mobile Navigation
   Design moderne e-commerce mobile
   ======================================== */

:root {
    --mobile-header-height: 60px;
    --mobile-bottom-nav-height: 65px;
    --sgi-orange: #FF6B35;
    --sgi-orange-dark: #E85A2A;
    --sgi-blue-marine: #0D0D2B;
}

/* ========================================
   MASQUER LE HEADER DESKTOP SUR MOBILE
   ======================================== */

@media (max-width: 991px) {
    .header_wrap {
        display: none !important;
    }
    
    /* Ajouter du padding en haut pour le header mobile fixe */
    body {
        padding-top: var(--mobile-header-height) !important;
        padding-bottom: var(--mobile-bottom-nav-height) !important;
    }
    
    /* Ajuster le footer pour ne pas être caché par la bottom nav */
    footer {
        margin-bottom: var(--mobile-bottom-nav-height) !important;
    }
}

/* ========================================
   MOBILE HEADER
   ======================================== */

.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--mobile-header-height);
    background-color: var(--sgi-blue-marine);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.mobile-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 15px;
}

.mobile-menu-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
    color: var(--sgi-orange);
    outline: none;
}

.mobile-logo {
    display: flex;
    align-items: center;
}

.mobile-logo img {
    max-height: 40px;
    width: auto;
}

.mobile-header-icons {
    display: flex;
    align-items: center;
    gap: 5px;
}

.mobile-icon {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-icon:hover {
    color: var(--sgi-orange);
}

.mobile-icon .badge-count {
    position: absolute;
    top: 5px;
    right: 5px;
    min-width: 18px;
    height: 18px;
    background: var(--sgi-orange);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ========================================
   MOBILE SIDE MENU
   ======================================== */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-side-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 1002;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-side-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--sgi-blue-marine);
    color: #fff;
}

.mobile-menu-title {
    font-size: 18px;
    font-weight: 600;
}

.mobile-menu-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease;
    order: -1;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-menu-content {
    padding: 15px 0;
}

/* Recherche mobile dans le menu */
.mobile-search {
    padding: 0 15px 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.mobile-search form {
    display: flex;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.mobile-search input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
}

.mobile-search button {
    width: 50px;
    background: var(--sgi-orange);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.mobile-search button:hover {
    background: var(--sgi-orange-dark);
}

/* Navigation list */
.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list li a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--sgi-blue-marine);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.3s ease;
}

.mobile-nav-list li a i {
    width: 24px;
    margin-right: 12px;
    font-size: 18px;
    color: var(--sgi-orange);
}

.mobile-nav-list li a:hover {
    background: rgba(255, 107, 53, 0.08);
    color: var(--sgi-orange);
}

/* Sections du menu */
.mobile-menu-section {
    padding-top: 15px;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

.mobile-section-title {
    padding: 0 20px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.5px;
    margin: 0;
}

/* ========================================
   BOTTOM NAVIGATION BAR
   ======================================== */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-bottom-nav-height);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    text-decoration: none;
    color: #666;
    font-size: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.bottom-nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.bottom-nav-item span {
    line-height: 1;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--sgi-orange);
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

/* Badge panier sur bottom nav */
.bottom-nav-cart {
    position: relative;
}

.bottom-nav-cart .cart-badge {
    position: absolute;
    top: 8px;
    right: 50%;
    transform: translateX(15px);
    min-width: 18px;
    height: 18px;
    background: var(--sgi-orange);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ========================================
   MOBILE SEARCH OVERLAY
   ======================================== */

.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: 1003;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-search-container {
    width: 90%;
    max-width: 400px;
    position: relative;
}

.mobile-search-container form {
    display: flex;
    background: #fff;
    border: 2px solid var(--sgi-orange);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.mobile-search-container input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    font-size: 16px;
    outline: none;
}

.mobile-search-container button[type="submit"] {
    width: 60px;
    background: var(--sgi-orange);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.mobile-search-container button[type="submit"]:hover {
    background: var(--sgi-orange-dark);
}

.close-search {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-search:hover {
    background: var(--sgi-orange);
    color: #fff;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

/* Tablette */
@media (min-width: 768px) and (max-width: 991px) {
    .mobile-side-menu {
        width: 320px;
    }
    
    .mobile-logo img {
        max-height: 45px;
    }
}

/* Très petits écrans */
@media (max-width: 374px) {
    .mobile-header-inner {
        padding: 0 10px;
    }
    
    .mobile-icon {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }
    
    .mobile-logo img {
        max-height: 35px;
    }
    
    .bottom-nav-item i {
        font-size: 20px;
    }
    
    .bottom-nav-item span {
        font-size: 9px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========================================
   DESKTOP - MASQUER LES ÉLÉMENTS MOBILE
   ======================================== */

/* ========================================
   MOBILE CATEGORIES MENU (Left Side)
   ======================================== */

.mobile-categories-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 1002;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-categories-menu.active {
    left: 0;
}

.mobile-categories-menu .mobile-menu-header {
    background: var(--sgi-orange);
}

.mobile-categories-menu .mobile-menu-close {
    order: 1;
}

.mobile-categories-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-categories-list .category-item {
    position: relative;
}

.mobile-categories-list .category-item > a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.mobile-categories-list .subcategory-arrow {
    margin-left: auto;
    margin-right: 0;
    font-size: 12px;
    color: #999;
    transition: transform 0.3s ease;
}

.mobile-categories-list .category-item.open .subcategory-arrow {
    transform: rotate(90deg);
}

.mobile-subcategories {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f9f9f9;
}

.mobile-categories-list .category-item.open .mobile-subcategories {
    display: block;
}

.mobile-subcategories li a {
    padding: 12px 20px 12px 50px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #666 !important;
    border-bottom: 1px solid #eee !important;
}

.mobile-subcategories li a:hover {
    color: var(--sgi-orange) !important;
    background: rgba(255, 107, 53, 0.05) !important;
}

@media (min-width: 992px) {
    .mobile-header,
    .mobile-side-menu,
    .mobile-categories-menu,
    .mobile-menu-overlay,
    .mobile-bottom-nav,
    .mobile-search-overlay {
        display: none !important;
    }
    
    body {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
}
