/* ============================================
   🔥 CORRECTION DÉFINITIVE BARRE DE RECHERCHE
   Fichier: search-bar-complete-fix.css
   ⚠️ CE FICHIER DOIT ÊTRE CHARGÉ EN DERNIER
   ============================================ */

/* ==========================================
   💻 VERSION DESKTOP (> 992px)
   ========================================== */

/* STRUCTURE : #coordonnees est DANS #logo, donc position absolue par rapport à body */

body #logo {
    position: relative !important;
    float: left !important;
    padding: 4px 0 0 16px !important;
    display: block !important;
    max-width: 450px !important;
    height: auto !important;
}

body #logo > div:first-child {
    display: block !important;
    margin-bottom: 5px !important;
}

body #logo > a {
    display: block !important;
}

body img#lelogo {
    width: 346px !important;
    height: 61px !important;
    display: block !important;
}

/* ⚠️ CRITIQUE : #coordonnees doit sortir du flux de #logo */
body #logo #coordonnees {
    width: 280px !important;
    position: fixed !important;  /* FIXED au lieu d'absolute */
    top: 6px !important;
    right: 20px !important;
    left: auto !important;
    bottom: auto !important;
    font-size: 0.9em !important;
    z-index: 100 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    display: block !important;
}

body #logo #coordonnees p {
    text-align: right !important;
    margin-bottom: 12px !important;
    line-height: 1.5 !important;
    display: block !important;
    color: #333 !important;
}

/* ==========================================
   🔍 CHAMP DE RECHERCHE
   ========================================== */
body #logo #coordonnees #champrecherche {
    width: 100% !important;
    border: 1px solid #ccc !important;
    padding: 10px 40px 10px 12px !important;
    font-size: 0.95em !important;
    color: #333 !important;
    background: #fff !important;
    border-radius: 20px !important;
    transition: all 0.3s ease !important;
    line-height: 1.4 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    background-image: url(images/icons/search.png) !important;
    background-size: 20px !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-color: #fff !important;
}

body #logo #coordonnees #champrecherche:hover {
    border-color: #999 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12) !important;
}

body #logo #coordonnees #champrecherche:focus {
    outline: 2px solid #dd0333 !important;
    outline-offset: 1px !important;
    border-color: #dd0333 !important;
    background-color: #fffef8 !important;
    box-shadow: 0 3px 10px rgba(221, 3, 51, 0.2) !important;
    background-size: 22px !important;
}

body #logo #coordonnees #champrecherche::placeholder {
    color: #999 !important;
    opacity: 1 !important;
    font-style: italic;
}

/* ==========================================
   📋 RÉSULTATS DE RECHERCHE
   ========================================== */
body #logo #coordonnees #resultatrecherche {
    padding: 0 !important;
    margin-top: 8px !important;
    position: relative !important;
    z-index: 1000 !important;
}

body #logo #coordonnees #resultatrecherche #interieurrecherche {
    position: relative !important;
    z-index: 1001 !important;
    background: #fff !important;
    padding: 12px 15px !important;
    border: 2px solid #dd0333 !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
    margin-top: 5px !important;
    animation: slideDown 0.3s ease-out !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body #logo #coordonnees #resultatrecherche #interieurrecherche a {
    display: block !important;
    padding: 10px 12px !important;
    color: #333 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #eee !important;
    transition: all 0.2s ease !important;
    font-weight: 500 !important;
    border-radius: 5px !important;
    margin-bottom: 3px !important;
}

body #logo #coordonnees #resultatrecherche #interieurrecherche a:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

body #logo #coordonnees #resultatrecherche #interieurrecherche a:hover {
    background: #f8f9fa !important;
    color: #dd0333 !important;
    padding-left: 18px !important;
    transform: translateX(3px) !important;
}

body #logo #coordonnees #resultatrecherche #interieurrecherche a::before {
    content: '→' !important;
    margin-right: 8px !important;
    color: #dd0333 !important;
    font-weight: bold !important;
    opacity: 0 !important;
    transition: opacity 0.2s ease !important;
}

body #logo #coordonnees #resultatrecherche #interieurrecherche a:hover::before {
    opacity: 1 !important;
}

/* ==========================================
   📱 RESPONSIVE MOBILE (≤ 992px)
   ========================================== */
@media (max-width: 992px) {
    /* Logo centré */
    body #logo {
        position: relative !important;
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 60px 10px 10px !important;
        text-align: center !important;
        display: block !important;
    }
    
    /* Cacher le texte "Livraison" */
    body #logo > div:first-child {
        display: none !important;
    }
    
    body #logo > a {
        display: inline-block !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    body img#lelogo {
        max-width: 280px !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
        display: block !important;
    }
    
    /* Coordonnées + Recherche CENTRÉES */
    body #logo #coordonnees {
        position: relative !important;
        width: 100% !important;
        right: auto !important;
        top: auto !important;
        left: auto !important;
        bottom: auto !important;
        text-align: center !important;
        padding: 15px 10px !important;
        margin: 0 !important;
        display: block !important;
        transform: none !important;
    }
    
    /* Cacher l'adresse sur mobile */
    body #logo #coordonnees p {
        display: none !important;
    }
    
    /* Champ de recherche adapté mobile */
    body #logo #coordonnees #champrecherche {
        width: calc(100% - 20px) !important;
        max-width: 400px !important;
        margin: 0 auto !important;
        display: block !important;
        font-size: 16px !important;
        padding: 12px 45px 12px 15px !important;
        background-size: 20px !important;
        background-position: right 12px center !important;
    }
    
    body #logo #coordonnees #resultatrecherche {
        width: calc(100% - 20px) !important;
        max-width: 400px !important;
        margin: 0 auto !important;
    }
}

/* ==========================================
   📱 TRÈS PETIT MOBILE (≤ 580px)
   ========================================== */
@media (max-width: 580px) {
    body #logo #coordonnees #champrecherche {
        font-size: 16px !important;
        padding: 14px 45px 14px 15px !important;
    }
    
    body #logo {
        padding: 10px 55px 10px 5px !important;
    }
    
    body img#lelogo {
        max-width: 220px !important;
    }
}

/* ==========================================
   💬 MESSAGES
   ========================================== */
body #logo #coordonnees #interieurrecherche .no-result {
    color: #999 !important;
    font-style: italic !important;
    padding: 15px !important;
    text-align: center !important;
    background: #f8f9fa !important;
    border-radius: 5px !important;
}

body #logo #coordonnees #interieurrecherche .result-count {
    font-size: 0.85em !important;
    color: #666 !important;
    padding: 8px 12px !important;
    background: #f8f9fa !important;
    border-bottom: 1px solid #eee !important;
    font-weight: 600 !important;
    margin: -12px -15px 10px -15px !important;
    border-radius: 8px 8px 0 0 !important;
}

/* ==========================================
   ✅ FIN DU FICHIER
   ========================================== */