/* ========================================
   HEADER V4 FINAL - CSS OPTIMISÉ MOBILE
   Bandeau livraison + Infos responsive optimisées
   Version : 4.2.0
   ======================================== */

/* === RESET & BASE === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

/* === CONTENEUR === */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
}

/* === BANDEAU SUPÉRIEUR === */
.top-bar {
    background: #f8f9fa;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #e0e0e0;
}

.top-bar-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-bar i {
    color: #c41e3a;
    margin-right: 8px;
}

/* === HEADER PRINCIPAL === */
.main-header {
    background: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    z-index: 100; /* ✅ CORRIGÉ : Augmenté pour que les résultats de recherche passent au-dessus du menu */
}

.main-header.header-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100; /* ✅ CORRIGÉ : Augmenté pour que les résultats de recherche passent au-dessus du menu */
    padding: 15px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Logo */
.logo-section {
    flex-shrink: 0;
}

.logo-section img {
    height: 60px;
    width: auto;
    transition: height 0.3s;
}

.main-header.header-sticky .logo-section img {
    height: 50px;
}

/* Coordonnées */
.contact-info {
    display: flex;
    gap: 30px;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-item i {
    color: #c41e3a;
    font-size: 22px;
}

.contact-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.contact-text strong {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.contact-text span {
    font-size: 13px;
    color: #666;
}

/* === RECHERCHE === */
.search-section {
    width: 280px;
    position: relative;
}

.search-form {
    position: relative;
}

.search-form input {
    width: 100%;
    padding: 12px 50px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-form input:focus {
    outline: none;
    border-color: #c41e3a;
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.search-form button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #c41e3a;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-form button:hover {
    background: #a01829;
}

/* Résultats de recherche */
#resultatrecherche {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 5px;
}

#resultatrecherche #interieurrecherche {
    padding: 10px;
}

#resultatrecherche a {
    display: block;
    padding: 10px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

#resultatrecherche a:hover {
    background: #f8f9fa;
    color: #c41e3a;
}

#resultatrecherche a:last-child {
    border-bottom: none;
}

/* === NAVIGATION === */
.main-navigation {
    background: #c41e3a;
    position: relative;
    z-index: 99;
    transition: all 0.3s;
}

.main-navigation.nav-sticky {
    position: fixed;
    top: 85px;
    left: 0;
    right: 0;
    z-index: 998;
}

.nav-container {
    display: flex;
    align-items: center;
    position: relative;
}

/* Hamburger caché en desktop */
.menu-toggle {
    display: none;
    background: #fff;
    border: none;
    color: #c41e3a;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.menu-toggle:hover {
    background: #f8f9fa;
    transform: scale(1.05);
}

.menu-toggle.active {
    background: #fff;
    color: #c41e3a;
}

/* Menu principal */
.main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.menu-item {
    position: relative;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 18px 25px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.menu-link:hover,
.menu-item.active .menu-link {
    background: #a01829;
}

.menu-link i {
    margin-left: 8px;
    font-size: 12px;
    transition: transform 0.3s;
}

.menu-item:hover .menu-link i {
    transform: rotate(180deg);
}

/* === DROPDOWN DESKTOP === */
.dropdown-menu-custom {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 920px;
    max-height: 75vh;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    border-radius: 0 0 8px 8px;
    padding: 30px;
    display: none;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-15px);
    transition: all 0.3s ease;
}

.menu-item:hover .dropdown-menu-custom {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Header du dropdown */
.dropdown-header {
    background: linear-gradient(135deg, #c41e3a 0%, #a01829 100%);
    margin: -30px -30px 25px -30px;
    padding: 25px 30px;
    text-align: center;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

.view-all-products {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: white;
    color: #c41e3a;
    padding: 16px 45px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.view-all-products:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(196, 30, 58, 0.4);
}

/* Colonnes du dropdown */
.dropdown-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.category-title {
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #c41e3a;
    border-radius: 4px;
}

.dropdown-column ul {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.dropdown-column ul li {
    margin-bottom: 8px;
}

.dropdown-column ul li a {
    display: block;
    padding: 9px 12px;
    color: #495057;
    font-size: 14px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
}

.dropdown-column ul li a:hover {
    background: #f8f9fa;
    color: #c41e3a;
    padding-left: 20px;
}

.voir-tous a {
    font-weight: 600;
    color: #c41e3a !important;
    background: rgba(196, 30, 58, 0.05);
}

.voir-tous a:hover {
    background: rgba(196, 30, 58, 0.1);
}

/* Spacer pour le header sticky */
.header-spacer {
    height: 0;
    transition: height 0.3s;
}

/* ========================================
   RESPONSIVE MOBILE (<992px)
   ======================================== */

@media (max-width: 992px) {
    /* === BANDEAU SUPÉRIEUR MOBILE === */
    .top-bar {
        padding: 8px 0;
        font-size: 13px;
    }
    
    /* === HEADER MOBILE OPTIMISÉ === */
    .main-header {
        padding: 12px 0;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    /* Logo à gauche (plus petit) */
    .logo-section {
        order: 1;
        flex-shrink: 0;
    }
    
    .logo-section img {
        height: 45px;
    }
    
    /* === COORDONNÉES COMPACTES === */
    .contact-info {
        order: 2;
        flex: 1;
        flex-direction: row;
        gap: 15px;
        justify-content: center;
    }
    
    /* Afficher uniquement les icônes + numéro/ville */
    .contact-item {
        flex-direction: row;
        gap: 8px;
        font-size: 13px;
    }
    
    .contact-item i {
        font-size: 18px;
    }
    
    /* Cacher les labels "Notre adresse" et "Appelez-nous" */
    .contact-text strong {
        display: none;
    }
    
    .contact-text span {
        font-size: 12px;
    }
    
    /* Simplifier l'adresse : afficher uniquement la ville */
    .contact-item:first-child .contact-text span {
        font-size: 0;
    }
    
    .contact-item:first-child .contact-text span::after {
        content: "Vaulx-en-Velin";
        font-size: 12px;
    }
    
    /* === RECHERCHE COMPACTE === */
    .search-section {
        order: 3;
        width: 100%;
    }
    
    .search-form input {
        padding: 10px 45px 10px 12px;
        font-size: 13px;
    }
    
    /* === HAMBURGER VISIBLE === */
    .menu-toggle {
        display: flex !important;
        order: 0;
        flex-shrink: 0;
        position: relative;
        z-index: 100000; /* ✅ Au-dessus du menu */
        margin-right: 10px;
    }
    
    .menu-toggle.active {
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 100000; /* ✅ Toujours au-dessus */
    }
    
    /* Navigation adaptée */
    .nav-container {
        justify-content: center;
        padding: 0;
    }
    
    /* === MENU MOBILE === */
    .main-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(180deg, #c41e3a 0%, #a01829 100%);
        flex-direction: column;
        padding: 90px 20px 30px;
        overflow-y: auto;
        z-index: 99999; /* ✅ CORRECTION : Au-dessus de tout */
    }
    
    .main-menu.active {
        display: flex !important;
    }
    
    /* Items menu mobile */
    .menu-item {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.15);
    }
    
    .menu-link {
        width: 100%;
        justify-content: space-between;
        padding: 20px 15px;
        font-size: 1.1rem;
    }
    
    /* === DROPDOWN MOBILE === */
    .dropdown-menu-custom {
        position: static !important;
        display: none !important;
        background: rgba(0,0,0,0.2);
        padding: 20px !important;
        margin: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        min-width: 100% !important;
        max-height: none !important;
        z-index: 100001; /* ✅ Au-dessus de tout */
    }
    
    .menu-products.open .dropdown-menu-custom {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .dropdown-header {
        background: rgba(255,255,255,0.15);
        margin: 0 0 20px 0 !important;
        padding: 20px !important;
        border-radius: 12px;
    }
    
    .view-all-products {
        width: 100%;
        padding: 18px 20px;
        font-size: 1rem;
        justify-content: center;
    }
    
    .dropdown-columns {
        display: block !important;
        padding: 0 !important;
    }
    
    .dropdown-column {
        margin-bottom: 20px;
    }
    
    .category-title {
        color: white !important;
        background: rgba(255,255,255,0.15) !important;
        border-left-color: white !important;
        font-size: 1.05rem;
        margin-top: 15px;
    }
    
    .category-title:first-child {
        margin-top: 0;
    }
    
    .dropdown-column ul li a {
        color: rgba(255,255,255,0.95);
        font-size: 0.95rem;
        padding: 12px 15px;
    }
    
    .dropdown-column ul li a:hover {
        background: rgba(255,255,255,0.15);
        color: white;
    }
    
    .voir-tous a {
        color: white !important;
        background: rgba(255,255,255,0.1);
        padding: 12px 15px;
        border-radius: 6px;
    }
}

/* Très petit mobile */
@media (max-width: 576px) {
    /* Cacher le bandeau sur très petit écran */
    .top-bar {
        display: none;
    }
    
    .logo-section img {
        height: 40px;
    }
    
    /* En très petit mobile : cacher les coordonnées, garder juste recherche */
    .contact-info {
        display: none !important;
    }
    
    .search-section {
        width: 100%;
        max-width: none;
    }
    
    .menu-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .main-menu {
        padding: 80px 15px 20px;
    }
    
    .menu-link {
        font-size: 1rem;
        padding: 18px 12px;
    }
}

/* Desktop large */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .dropdown-menu-custom {
        min-width: 1000px;
    }
}
