/**
 * Repiauto 19/11/2026 : selecteur vehicule des pages categorie, maquette
 * « barre blanche arrondie » : libelles MARQUE / MODELE / ANNEE au-dessus de
 * « Selectionnez », separateurs verticaux, bouton rouge « Voir les pieces → ».
 * Charge APRES homeselector_category.css (qu'il surcharge) ; nouveau nom de
 * fichier pour ne pas dependre des caches (CDN / nginx) de l'ancien.
 * Desktop/tablette uniquement (>= 641px) ; le mobile (modale) garde son
 * apparence, seuls les libelles y sont ajoutes.
 */

/* Libelle : visible partout (aussi dans la modale mobile). */
.hs-cat-label {
    display: block;
    margin: 0 0 2px;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #163C5D;
    line-height: 1.3;
}

.hs-cat-search-btn .hs-cat-search-arrow {
    margin-left: 8px;
    flex-shrink: 0;
    transition: transform .2s ease;
}

@media (min-width: 641px) {
    .hs-category-selector-wrapper {
        background-color: #F4F6F8;
        padding: 22px 20px;
        border-bottom: 0;
    }

    /* Le sous-titre de la modale n'a pas sa place dans la barre desktop. */
    .hs-category-selector-wrapper .hs-cat-modal-header-text {
        display: none;
    }

    .hs-cat-steps-row {
        max-width: 1000px;
        margin: 0 auto;
        flex-wrap: nowrap;
        gap: 0;
        background: #FFFFFF;
        border: 1px solid #E5E7EB;
        border-radius: 999px;
        padding: 6px 6px 6px 8px;
        box-shadow: 0 2px 10px rgba(22, 60, 93, .06);
    }

    .hs-cat-step {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
        padding: 6px 24px;
    }

    .hs-cat-step + .hs-cat-step {
        border-left: 1px solid #E5E7EB;
    }

    .hs-cat-dropdown {
        height: 26px;
        border: 0;
        border-radius: 0;
        background-color: transparent;
        padding: 0 26px 0 0;
        font-size: 14px;
        font-weight: 400;
        color: #163C5D;
        box-shadow: none;
    }

    .hs-cat-dropdown:focus {
        border: 0;
        box-shadow: none;
    }

    .hs-cat-select-arrow {
        right: 0;
        width: 16px;
        height: 16px;
    }

    /* Etapes pas encore disponibles : grisees, sans voile sur le libelle. */
    /* 19/11/2026 : etapes pas encore disponibles en BLEU aussi (pas de gris). */
    .hs-cat-step.hs-cat-disabled .hs-cat-dropdown,
    .hs-cat-dropdown:disabled {
        opacity: 1;
        color: #163C5D;
    }

    .hs-cat-step.hs-cat-disabled .hs-cat-select-arrow {
        opacity: 1;
    }

    .hs-cat-search-container {
        margin-left: 12px;
    }

    /* 19/11/2026 : meme bouton que la page d'accueil (.rp-hero-btn) :
       graisse 500, rouge #D71F1F, survol #B81919 + fleche qui glisse. */
    .hs-cat-search-btn {
        height: 52px;
        padding: 0 30px;
        border-radius: 999px;
        background-color: #D71F1F;
        font-size: 14px;
        font-weight: 500;
    }

    .hs-cat-search-btn:hover {
        background-color: #B81919;
    }

    .hs-cat-search-btn:hover .hs-cat-search-arrow {
        transform: translateX(3px);
    }

    .hs-cat-search-btn:focus-visible {
        outline: 2px solid #1B8EF8;
        outline-offset: 2px;
    }

    /* Comme l'accueil : meme rouge plein tant que le vehicule n'est pas
       choisi (le clic reste sans effet tant que le JS bloque). */
    .hs-cat-search-btn:disabled {
        background-color: #D71F1F;
        opacity: 1;
    }

    .hs-cat-search-btn:disabled:hover {
        background-color: #B81919;
    }
}

/* Tablette etroite : bouton plus compact. */
@media (min-width: 641px) and (max-width: 900px) {
    .hs-cat-step {
        padding: 6px 14px;
    }

    .hs-cat-search-btn {
        padding: 0 18px;
    }
}

/* ------------------------------------------------------------------
 * 19/11/2026 (2) : listes = celles du selecteur de la page d'accueil
 * (champ avec recherche + liste stylee, homeselector_category_combo.js).
 * Desktop/tablette ; en mobile, selects natifs dans la modale.
 * ------------------------------------------------------------------ */
.hs-cat-combo,
.hs-cat-list {
    display: none;
}

@media (min-width: 641px) {
    /* Le select natif reste dans la page (source de verite), invisible. */
    .hs-cat-select-wrapper select.hs-cat-dropdown {
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
        pointer-events: none;
    }

    .hs-cat-combo {
        display: block;
        width: 100%;
        height: 26px;
        border: 0;
        outline: 0;
        background: transparent;
        padding: 0 26px 0 0;
        font-family: 'Poppins', sans-serif;
        font-size: 14px;
        font-weight: 400;
        color: #163C5D;
        text-overflow: ellipsis;
        cursor: pointer;
        box-shadow: none;
    }

    .hs-cat-combo:focus {
        cursor: text;
    }

    .hs-cat-combo::placeholder {
        color: #163C5D;
        opacity: 1;
    }

    .hs-cat-combo:disabled {
        cursor: not-allowed;
    }

    .hs-cat-combo:disabled {
        color: #163C5D;
        -webkit-text-fill-color: #163C5D;
        opacity: 1;
    }

    .hs-cat-combo:disabled::placeholder {
        color: #163C5D;
        opacity: 1;
    }

    .hs-cat-step {
        position: relative;
        cursor: pointer;
    }

    .hs-cat-list {
        position: absolute;
        top: calc(100% + 16px);
        left: -18px;
        min-width: calc(100% + 36px);
        width: 280px;
        max-height: 288px;
        overflow-y: auto;
        margin: 0;
        padding: 6px;
        list-style: none;
        background: #FFFFFF;
        border: 1px solid #D5DCE6;
        border-radius: 16px;
        z-index: 70;
        text-align: left;
        scrollbar-width: thin;
        box-shadow: 0 12px 32px rgba(11, 30, 61, .18);
    }

    .hs-cat-list.is-open {
        display: block;
    }

    .hs-cat-list li {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 14px;
        padding: 9px 14px;
        border-radius: 10px;
        font-family: 'Poppins', sans-serif;
        font-size: 14px;
        line-height: 1.35;
        color: #0B1E3D;
        cursor: pointer;
    }

    .hs-cat-list li b {
        font-weight: 600;
        color: #D71F1F;
    }

    .hs-cat-list li.is-active {
        background: #EEF2F7;
    }

    .hs-cat-list li[aria-selected="true"] {
        font-weight: 500;
    }

    .hs-cat-list .hs-cat-empty {
        color: #163C5D;
        cursor: default;
    }

    /* Fleche : pivote quand la liste est ouverte. */
    .hs-cat-select-wrapper:focus-within .hs-cat-select-arrow {
        transform: translateY(-50%) rotate(0deg);
    }
}
