/* ============================================
   GRAPHISCANN - NAVIGATION MOBILE
   Menu 2 niveaux style Vistaprint/HelloPrint
   
   Version : 1.0.0
   Date : Janvier 2026
   
   Ce fichier gère uniquement le menu mobile (<992px)
   Le menu desktop est dans navigation-desktop.css
   ============================================ */

/* ========================================
   1. VARIABLES SPÉCIFIQUES MOBILE
   ======================================== */

:root {
    --gs-mobile-menu-width: 100%;
    --gs-mobile-menu-max-width: 400px;
    --gs-mobile-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gs-mobile-z-overlay: 9000;
    --gs-mobile-z-menu: 9100;
}

/* ========================================
   2. OVERLAY SOMBRE
   ======================================== */

.gs-mobile-overlay {
    display: none;
}

@media (max-width: 992px) {
    .gs-mobile-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: var(--gs-mobile-z-overlay);
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--gs-mobile-transition), visibility var(--gs-mobile-transition);
    }
    
    .gs-mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* ========================================
   3. CONTENEUR MENU MOBILE
   ======================================== */

.gs-mobile-menu {
    display: none;
}

@media (max-width: 992px) {
    .gs-mobile-menu {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: var(--gs-mobile-menu-width);
        max-width: var(--gs-mobile-menu-max-width);
        height: 100%;
        background: #fff;
        z-index: var(--gs-mobile-z-menu);
        transform: translateX(-100%);
        transition: transform var(--gs-mobile-transition);
        overflow: hidden;
    }
    
    .gs-mobile-menu.active {
        transform: translateX(0);
    }
}

/* ========================================
   4. HEADER DU MENU MOBILE
   ======================================== */

.gs-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid var(--gs-border, #e5e5e5);
    min-height: 64px;
    position: relative;
}

/* Bouton Retour */
.gs-mobile-back {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: var(--gs-text, #333);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 0;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.2s ease;
}

.gs-mobile-back.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.gs-mobile-back i {
    color: var(--gs-primary, #c41e3a);
    font-size: 0.85rem;
}

.gs-mobile-back:hover {
    color: var(--gs-primary, #c41e3a);
}

/* Titre (niveau 2) */
.gs-mobile-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: 700;
    color: var(--gs-text, #333);
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gs-mobile-title.visible {
    opacity: 1;
}

/* Bouton Fermer */
.gs-mobile-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--gs-text-light, #666);
    font-size: 1.25rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.gs-mobile-close:hover {
    background: var(--gs-bg-light, #f8f9fa);
    color: var(--gs-text, #333);
}

/* ========================================
   5. CONTENEUR DES PANELS
   ======================================== */

.gs-mobile-panels {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* ========================================
   6. PANELS (Niveau 1 et 2)
   ======================================== */

.gs-mobile-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform var(--gs-mobile-transition);
}

/* Scrollbar stylisée */
.gs-mobile-panel::-webkit-scrollbar {
    width: 4px;
}

.gs-mobile-panel::-webkit-scrollbar-track {
    background: transparent;
}

.gs-mobile-panel::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

/* Panel 1 - Navigation principale */
.gs-mobile-panel-1 {
    transform: translateX(0);
}

.gs-mobile-panel-1.slide-out {
    transform: translateX(-100%);
}

/* Panel 2 - Produits catégorie */
.gs-mobile-panel-2 {
    transform: translateX(100%);
}

.gs-mobile-panel-2.slide-in {
    transform: translateX(0);
}

/* ========================================
   7. SECTIONS DU MENU
   ======================================== */

.gs-mobile-section {
    padding: 8px 0;
}

.gs-mobile-section-title {
    padding: 14px 20px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gs-text-muted, #999);
}

.gs-mobile-divider {
    height: 1px;
    background: var(--gs-border, #e5e5e5);
    margin: 8px 20px;
}

/* ========================================
   8. ITEMS DU MENU
   ======================================== */

.gs-mobile-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    color: var(--gs-text, #333);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.gs-mobile-item:hover {
    background: var(--gs-bg-light, #f8f9fa);
}

.gs-mobile-item:active {
    background: var(--gs-bg-hover, #f0f0f0);
}

/* Chevron */
.gs-mobile-item i.fa-chevron-right {
    color: #ccc;
    font-size: 0.75rem;
    transition: all 0.15s ease;
}

.gs-mobile-item:hover i.fa-chevron-right {
    color: var(--gs-primary, #c41e3a);
    transform: translateX(3px);
}

/* Icône à gauche */
.gs-mobile-item-icon {
    width: 24px;
    margin-right: 12px;
    color: var(--gs-primary, #c41e3a);
    text-align: center;
}

/* Item "Voir tous" (niveau 2) */
.gs-mobile-item-all {
    color: var(--gs-primary, #c41e3a);
    font-weight: 600;
    background: rgba(196, 30, 58, 0.05);
    border-bottom: 1px solid var(--gs-border, #e5e5e5);
    margin-bottom: 8px;
}

.gs-mobile-item-all:hover {
    background: rgba(196, 30, 58, 0.1);
}

/* ========================================
   9. CTA DEVIS (sticky bottom)
   ======================================== */

.gs-mobile-cta {
    padding: 15px 20px;
    background: #fff;
    border-top: 1px solid var(--gs-border, #e5e5e5);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}

.gs-mobile-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--gs-primary, #c41e3a) 0%, var(--gs-primary-dark, #a01829) 100%);
    color: #fff !important;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
    transition: all 0.2s ease;
}

.gs-mobile-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}

.gs-mobile-cta-btn:active {
    transform: translateY(0);
}

/* ========================================
   10. RESPONSIVE - TRÈS PETIT MOBILE
   ======================================== */

@media (max-width: 576px) {
    :root {
        --gs-mobile-menu-max-width: 100%;
    }
    
    .gs-mobile-header {
        padding: 14px 16px;
    }
    
    .gs-mobile-item {
        padding: 14px 16px;
    }
    
    .gs-mobile-section-title {
        padding: 12px 16px 8px;
    }
    
    .gs-mobile-divider {
        margin: 8px 16px;
    }
    
    .gs-mobile-cta {
        padding: 12px 16px;
    }
    
    .gs-mobile-cta-btn {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
}

/* ========================================
   11. MASQUER EN DESKTOP
   ======================================== */

@media (min-width: 993px) {
    .gs-mobile-overlay,
    .gs-mobile-menu {
        display: none !important;
    }
}
