/* ===================================================================
   BURGER MOBILE FULLSCREEN - Menu fullscreen 100% viewport
   Version: 1.0 - 2025-10-24
   Basé sur la maquette de démo validée
   =================================================================== */

/* ==================== OVERLAY ==================== */
.burger-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* ==================== SIDEBAR FULLSCREEN ==================== */
.burger-mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 9998;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.burger-mobile-sidebar.active {
    transform: translateX(0);
}

/* ==================== HEADER STICKY ==================== */
.burger-mobile-header {
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 2px solid #e5e7eb;
    padding: 20px;
    z-index: 10;
}

.burger-mobile-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.burger-mobile-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.burger-mobile-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 4px 8px;
}

.burger-mobile-close:hover {
    color: #1f2937;
}

/* Barre de recherche */
.burger-mobile-search {
    position: relative;
}

.burger-mobile-search input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
}

.burger-mobile-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

/* ==================== MENU NAVIGATION ==================== */
.burger-mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.burger-mobile-item {
    border-bottom: 1px solid #f3f4f6;
}

/* ==================== MEGA CATEGORY HEADER (Niveau 1) ==================== */
.burger-mobile-mega-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    cursor: pointer;
    user-select: none;
}

.burger-mobile-mega-header:hover {
    background: #f3f4f6;
}

.burger-mobile-label-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.burger-mobile-mega-header i.fa {
    color: #0066cc;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.burger-mobile-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f2937;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.burger-mobile-count {
    padding: 2px 8px;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 10px;
    margin-left: 8px;
}

.burger-mobile-chevron {
    color: #9ca3af;
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.burger-mobile-item.accordion-open .burger-mobile-chevron {
    transform: rotate(90deg);
}

/* ==================== SUBMENUS ==================== */
.burger-mobile-level-2,
.burger-mobile-level-3,
.burger-mobile-level-4 {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
}

.burger-mobile-level-2.show,
.burger-mobile-level-3.show,
.burger-mobile-level-4.show {
    display: block;
}

/* ==================== CATEGORY NIVEAU 2 ==================== */
.burger-mobile-header-level2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 14px 40px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.burger-mobile-header-level2:hover {
    background: #f9fafb;
}

.burger-mobile-header-level2 i.fa {
    color: #0066cc;
    font-size: 0.9rem;
    width: 18px;
}

.burger-mobile-header-level2 .burger-mobile-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    text-transform: none;
    letter-spacing: normal;
}

/* ==================== SUBCATEGORY NIVEAU 3 ==================== */
.burger-mobile-header-level3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 12px 60px;
    background: #f9fafb;
    border-left: 3px solid #e5e7eb;
    cursor: pointer;
}

.burger-mobile-header-level3:hover {
    background: #ffffff;
}

.burger-mobile-header-level3 i.fa {
    color: #6b7280;
    font-size: 0.85rem;
    width: 16px;
}

.burger-mobile-header-level3 .burger-mobile-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f2937;
    text-transform: none;
    letter-spacing: normal;
}

/* ==================== ITEM LINKS (Niveau 4 et items directs) ==================== */
.burger-mobile-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px 10px 80px;
    text-decoration: none;
    color: #6b7280;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.burger-mobile-link:hover {
    background: #f3f4f6;
    color: #0066cc;
    padding-left: 82px;
}

.burger-mobile-link i.fa {
    color: #d1d5db;
    font-size: 0.7rem;
    width: 14px;
}

.burger-mobile-link:hover i.fa {
    color: #0066cc;
}

/* Items niveau 2 direct (Comptabilité, Paye) */
.burger-mobile-link-level2 {
    padding-left: 40px;
    font-size: 0.85rem;
    color: #374151;
}

.burger-mobile-link-level2:hover {
    padding-left: 42px;
}

/* ==================== VIEW ALL LINKS ==================== */
.burger-mobile-view-all {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px 10px 80px;
    text-decoration: none;
    color: #0066cc;
    font-size: 0.8rem;
    font-weight: 600;
    border-top: 1px solid #e5e7eb;
    margin-top: 4px;
    padding-top: 12px;
    transition: all 0.2s ease;
}

.burger-mobile-view-all:hover {
    background: #eff6ff;
    color: #1e40af;
    padding-left: 82px;
}

.burger-mobile-view-all i.fa {
    color: #0066cc;
    font-size: 0.75rem;
}

.burger-mobile-view-all-global {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: #0066cc;
    font-size: 0.9rem;
    font-weight: 600;
    background: #eff6ff;
    border-top: 1px solid #e5e7eb;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.burger-mobile-view-all-global:hover {
    background: #dbeafe;
    color: #1e40af;
}

/* ==================== BRAND ITEMS ==================== */
.burger-mobile-brand-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px 12px 40px;
    text-decoration: none;
    color: #374151;
    transition: all 0.2s ease;
}

.burger-mobile-brand-item:hover {
    background: #f3f4f6;
}

.burger-mobile-brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.burger-mobile-brand-item span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ==================== FOOTER STICKY ==================== */
.burger-mobile-footer {
    position: sticky;
    bottom: 0;
    background: white;
    border-top: 2px solid #e5e7eb;
    padding: 16px 20px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.burger-mobile-footer-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.burger-mobile-footer-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.burger-mobile-cta-primary {
    background: #0066cc;
    color: white;
}

.burger-mobile-cta-primary:hover {
    background: #0052a3;
}

.burger-mobile-cta-secondary {
    background: white;
    color: #0066cc;
    border: 2px solid #0066cc;
}

.burger-mobile-cta-secondary:hover {
    background: #eff6ff;
}

/* ==================== DIVIDER ==================== */
.burger-mobile-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 20px;
}

/* ==================== RESPONSIVE ==================== */
@media (min-width: 768px) {
    /* Sur tablette, limiter la largeur */
    .burger-mobile-sidebar {
        max-width: 420px;
    }
}

/* ==================== RÉSULTATS RECHERCHE API ==================== */
.burger-search-results {
    padding: 1rem;
    overflow-y: auto;
    max-height: calc(100vh - 180px);
}

/* Stats résultats */
.burger-search-stats {
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #00557f;
    margin-bottom: 1rem;
    font-size: 14px;
    color: #333;
}

.burger-search-stats strong {
    color: #00557f;
    font-weight: 700;
}

/* Liste résultats */
.burger-search-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Item résultat */
.burger-search-item {
    display: block;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.burger-search-item:hover {
    border-color: #00557f;
    box-shadow: 0 2px 8px rgba(0, 85, 127, 0.1);
    transform: translateY(-2px);
}

.burger-search-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.burger-search-brand {
    background: linear-gradient(135deg, #00557f 0%, #0077b3 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.burger-search-category {
    background: #f5f5f5;
    color: #666;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
}

.burger-search-title {
    margin: 0 0 0.5rem 0;
    font-size: 16px;
    font-weight: 700;
    color: #00557f;
    line-height: 1.3;
}

.burger-search-desc {
    margin: 0 0 0.5rem 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.burger-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.burger-search-tags .tag {
    background: #e8f4f8;
    color: #00557f;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    border: 1px solid #c5e3ee;
}

/* État vide */
.burger-search-empty {
    text-align: center;
    padding: 3rem 1rem;
}

/* Suggestions */
.burger-search-suggestions {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.burger-search-suggestions h4 {
    margin: 0 0 0.75rem 0;
    color: #856404;
    font-size: 14px;
    font-weight: 600;
}

.burger-search-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.burger-search-suggestions li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8e5b9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.burger-search-suggestions li:last-child {
    border-bottom: none;
}

.suggestion-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.burger-search-suggestions a {
    color: #856404;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
}

.burger-search-suggestions a:hover {
    text-decoration: underline;
}
