/* [resalys_recherche] — barre de recherche visuelle (charte VLL, cf. blocs-vll/docs/tokens.md).
   Le squelette extérieur (.search-bar : blanc, rayon, ombre, chevauchement du
   bandeau via translateY(-50%)) reste fourni par le thème ; tout l'intérieur
   est ici. Esthétique des panneaux portée du widget devis de leo-experiences
   (activity-quote), recolorée : CTA/sélection = bleu #1972b1, accent = jaune #e5a92e. */

.rsl-srch {
    position: relative;
    align-items: stretch;
}

.rsl-srch__champs {
    display: flex;
    align-items: stretch;
    width: 80%;
    padding: 8px 16px;
}

/* ---- Déclencheurs (faux selects) ---- */
.rsl-srch__champ {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
}
.rsl-srch__champ + .rsl-srch__champ {
    border-left: 0.5px solid #3e405b;
}

.rsl-srch__declencheur {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background-color .2s;
}
.rsl-srch__declencheur:hover,
.rsl-srch__champ.est-ouvert .rsl-srch__declencheur {
    background-color: #f5f5f6;
}

.rsl-srch__icone {
    height: clamp(15px, 1.8vw, 30px);
    flex-shrink: 0;
}

.rsl-srch__valeur {
    flex: 1;
    min-width: 0;
    color: #3e405b;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rsl-srch__champ.a-valeur .rsl-srch__valeur {
    color: #1972b1;
}

.rsl-srch__fleche {
    flex-shrink: 0;
    color: #999;
    display: flex;
    align-items: center;
    transition: transform .25s, color .25s;
}
.rsl-srch__champ.est-ouvert .rsl-srch__fleche {
    transform: rotate(180deg);
    color: #1972b1;
}

/* Tags d'activités dans le déclencheur */
.rsl-srch__tags {
    display: none;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
}
.rsl-srch__champ.a-valeur .rsl-srch__tags {
    display: flex;
}
.rsl-srch__champ--activites.a-valeur .rsl-srch__valeur {
    display: none;
}
.rsl-srch__tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e5a92e;
    color: #3e405b;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 7px 3px 9px;
    border-radius: 999px;
    line-height: 1.3;
    white-space: nowrap;
    max-width: 150px;
}
.rsl-srch__tag-texte {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rsl-srch__tag-retirer {
    background: none;
    border: none;
    color: #3e405b;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    padding: 0 1px;
    line-height: 1;
    opacity: .7;
    display: flex;
    align-items: center;
}
.rsl-srch__tag-retirer:hover {
    opacity: 1;
}

/* Bouton Rechercher : le thème (.bt.secondary.search-bar--bt) fait le reste */
.rsl-srch__bt {
    cursor: pointer;
}

/* ---- Panneaux ---- */
.rsl-srch__panneau {
    display: none;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    max-height: min(70vh, 560px);
    background: #fff;
    border: 1px solid #ebebee;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(62, 64, 91, .22);
    z-index: 9999;
    overflow: hidden;
    text-align: left;
}
.rsl-srch__champ.est-ouvert .rsl-srch__panneau {
    display: flex;
}
.rsl-srch__panneau--liste {
    width: min(360px, 100%);
}
.rsl-srch__panneau--lieux {
    width: min(680px, 100%);
}
.rsl-srch__panneau--activites {
    width: 100%;
}

.rsl-srch__panneau-entete {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #ebebee;
    font-size: 17px;
    font-weight: 700;
    color: #3e405b;
    flex-shrink: 0;
}
.rsl-srch__fermer {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.rsl-srch__fermer:hover {
    color: #3e405b;
}

.rsl-srch__panneau-corps {
    overflow-y: auto;
    padding: 14px;
    flex: 1;
    min-height: 0;
}

/* ---- Options « Vous êtes ? » (rangées à picto) ---- */
.rsl-srch__option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 11px 14px;
    background: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background-color .15s;
}
.rsl-srch__option:hover {
    background-color: #f5f5f6;
}
.rsl-srch__option-picto {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9f1f8;
    color: #1972b1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rsl-srch__option-picto svg {
    width: 24px;
    height: 24px;
}
.rsl-srch__option-nom {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #3e405b;
    line-height: 1.35;
}
.rsl-srch__option-coche {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #1972b1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(.5);
    transition: opacity .2s, transform .2s;
}
.rsl-srch__option-coche svg {
    width: 13px;
    height: 13px;
    fill: #fff;
}
.rsl-srch__option.est-choisie {
    background-color: #e9f1f8;
}
.rsl-srch__option.est-choisie .rsl-srch__option-picto {
    background: #1972b1;
    color: #fff;
}
.rsl-srch__option.est-choisie .rsl-srch__option-coche {
    opacity: 1;
    transform: scale(1);
}

/* ---- Grilles de cartes (lieux + activités) ---- */
.rsl-srch__grille {
    display: grid;
    gap: 10px;
}
.rsl-srch__grille--lieux {
    grid-template-columns: repeat(3, 1fr);
}
.rsl-srch__grille--activites {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 4px;
}

.rsl-srch__carte {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: none;
    border: 3px solid transparent;
    font-family: inherit;
    user-select: none;
    transition: transform .2s ease, box-shadow .2s ease, opacity .3s ease, border-color .2s ease;
}
.rsl-srch__carte:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(62, 64, 91, .18);
}
.rsl-srch__carte-image {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    object-position: center;
    display: block;
}
.rsl-srch__carte-fond {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1972b1 0%, #3e405b 100%);
}
.rsl-srch__carte-voile {
    position: absolute;
    inset: auto 0 0 0;
    padding: 10px 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .7));
    pointer-events: none;
    display: block;
    text-align: left;
}
.rsl-srch__carte-nom {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    display: block;
}
.rsl-srch__carte-coche {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e5a92e;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(.5);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}
.rsl-srch__carte-coche svg {
    width: 16px;
    height: 16px;
    fill: #3e405b;
}
.rsl-srch__carte.est-choisie {
    border-color: #e5a92e;
    box-shadow: 0 0 0 2px rgba(229, 169, 46, .3);
}
.rsl-srch__carte.est-choisie .rsl-srch__carte-coche {
    opacity: 1;
    transform: scale(1);
}
/* Quand au moins une carte est choisie, les autres s'estompent (multi-sélection) */
.rsl-srch__panneau--activites.a-selection .rsl-srch__carte:not(.est-choisie) {
    opacity: .55;
}
.rsl-srch__panneau--activites.a-selection .rsl-srch__carte:not(.est-choisie):hover {
    opacity: .85;
}

/* ---- Catégories du mega-dropdown ---- */
.rsl-srch__categorie-titre {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #1972b1;
    margin: 18px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5a92e;
    display: inline-block;
}
.rsl-srch__categorie:first-child .rsl-srch__categorie-titre {
    margin-top: 0;
}

/* ---- Pied du mega-dropdown ---- */
.rsl-srch__panneau-pied {
    padding: 12px 20px;
    border-top: 1px solid #ebebee;
    text-align: right;
    flex-shrink: 0;
    background: #fff;
}
.rsl-srch__valider {
    display: inline-block;
    padding: 10px 28px;
    background: #1972b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s, transform .15s;
}
.rsl-srch__valider:hover {
    background: #3e405b;
    transform: translateY(-1px);
}

/* Verrou de défilement (panneau plein écran mobile) */
body.rsl-srch-verrouille {
    overflow: hidden !important;
}

/* ============================================================
   Responsive — la barre passe en colonne, les panneaux en plein
   écran (même bascule que le widget leo-experiences)
   ============================================================ */
@media (max-width: 1024px) {
    .rsl-srch__grille--activites {
        grid-template-columns: repeat(3, 1fr);
    }
    .rsl-srch {
        flex-direction: column;
        max-width: 400px;
    }
    .rsl-srch__champs {
        flex-direction: column;
        width: 100%;
        padding: 8px;
    }
    .rsl-srch__champ + .rsl-srch__champ {
        border-left: none;
        border-top: 0.5px solid #ebebee;
    }
    .rsl-srch__declencheur {
        padding: 13px 12px;
    }
    .rsl-srch__icone {
        height: auto;
        width: 17px;
    }
    .rsl-srch__bt {
        width: 100%;
        border-radius: 0 0 10px 10px;
        padding: 14px 16px;
    }
}

@media (max-width: 768px) {
    .rsl-srch__panneau {
        position: fixed;
        inset: 0;
        width: 100% !important;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
        z-index: 99999;
    }
    .rsl-srch__panneau-entete {
        display: flex;
    }
    .rsl-srch__grille--lieux {
        grid-template-columns: 1fr;
    }
    .rsl-srch__grille--lieux .rsl-srch__carte {
        aspect-ratio: 16 / 7;
    }
    .rsl-srch__grille--activites {
        grid-template-columns: repeat(2, 1fr);
    }
    .rsl-srch__panneau-pied {
        text-align: center;
        padding: 12px 15px;
    }
    .rsl-srch__valider {
        width: 100%;
    }
}
