/* Barre de recherche FS Motos (js/recherche.js). Classes préfixées rch- pour ne rien toucher d'autre. */

.rch-droite {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rch-bouton {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 40px;
    padding: 0 0.85rem;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    background: #fff;
    color: #111827;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.rch-bouton:hover,
.rch-bouton:focus-visible {
    border-color: #dc2626;
    color: #dc2626;
}

.rch-bouton svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Ordinateur : même taille que les catégories de l'en-tête (13 px, puis 14 px) */
@media (min-width: 1024px) {
    .rch-bouton {
        font-size: 13px;
    }
}

@media (min-width: 1280px) {
    .rch-bouton {
        font-size: 14px;
    }
}

@media (max-width: 639px) {
    .rch-bouton {
        width: 40px;
        padding: 0;
        justify-content: center;
    }

    .rch-bouton-texte {
        display: none;
    }
}

/* Panneau */
html.rch-ouvert,
html.rch-ouvert body {
    overflow: hidden;
}

.rch-panneau {
    position: fixed;
    inset: 0;
    z-index: 100;
}

.rch-panneau[hidden] {
    display: none;
}

.rch-fond {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
}

.rch-boite {
    position: relative;
    display: flex;
    flex-direction: column;
    max-width: 720px;
    /* Bien sous la barre de contact noire (64 px) : au moins 110 px du haut */
    max-height: calc(100vh - max(12vh, 110px) - 40px);
    margin: max(12vh, 110px) auto 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

@media (max-width: 639px) {
    .rch-boite {
        max-height: none;
        height: 100%;
        margin: 0;
        border-radius: 0;
    }
}

.rch-barre {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.rch-champ {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px; /* 16px minimum : évite le zoom automatique sur iPhone */
    color: #111827;
    outline: none;
}

.rch-champ:focus {
    border-color: #dc2626;
}

.rch-fermer {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    background: #f3f4f6;
    font-size: 26px;
    line-height: 1;
    color: #374151;
    cursor: pointer;
}

.rch-fermer:hover {
    background: #e5e7eb;
}

.rch-info {
    margin: 0;
    padding: 0.75rem 1rem 0.25rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.rch-liste {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0.5rem 0.75rem;
    overflow-y: auto;
}

.rch-lien {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    color: #111827;
    text-decoration: none;
}

.rch-lien:hover,
.rch-actif .rch-lien {
    background: #fef2f2;
}

.rch-photo {
    width: 72px;
    height: 54px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 6px;
    background: #f3f4f6;
}

.rch-texte {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.rch-titre {
    font-weight: 900;
    font-size: 0.9rem;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rch-details {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rch-prix {
    flex-shrink: 0;
    font-weight: 900;
    font-size: 0.9rem;
    color: #dc2626;
}

.rch-categorie a {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    font-weight: 900;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #111827;
    text-decoration: none;
}

.rch-categorie a:hover {
    background: #fef2f2;
    color: #dc2626;
}

.rch-plus {
    padding: 0.75rem;
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
}
