/**
 * CSS Responsive pour les formulaires de recherche HEKTOR
 * Version mobile avec menu déroulant simplifié pour Types de Biens
 */

/* === RÈGLES MOBILES POUR LA PAGE D'ACCUEIL === */
@media (max-width: 768px) {


    .hektor-resultats-filters {
        margin: 0px !important;
        padding: 0px !important;
        background: none;
    }

    /*
    .vc_column_container>.vc_column-inner {
        box-sizing: border-box;
        padding-left: 0px !important;
        padding-right: 0px !important;
        width: 100%;
    }
*/
    /* Masquer tous les champs sauf le Type de bien sur mobile */
    .hektor-maquette-search-wrapper .hektor-filters-row .hektor-filter-field:not(.hektor-mobile-type-bien) {
        display: none !important;
    }

    /* Afficher seulement le champ Type de bien adapté au mobile */
    .hektor-maquette-search-wrapper .hektor-mobile-type-bien {
        display: block !important;
        width: 100% !important;
        flex: 1 !important;
    }

    /* Style spécial pour le select Type de bien mobile */
    .hektor-maquette-search-wrapper .hektor-mobile-type-bien-select {
        width: 100% !important;
        margin: 0 auto !important;
        padding: 12px 40px 12px 15px !important;
        border: 1px solid #FFFFFF !important;
        background: #000000 !important;
        color: #ffffff !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        text-align: left !important;
        appearance: none !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
        background-position: right 15px center !important;
        background-repeat: no-repeat !important;
        background-size: 16px !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 2px 4px rgba(255, 255, 255, 0.05) !important;
        line-height: 1.4 !important;
        min-height: 44px !important;
    }

    .hektor-maquette-search-wrapper .hektor-mobile-type-bien-select:focus {
        outline: none !important;
        border-color: #4F46E5 !important;
        background-color: #1a1a1a !important;
        box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2), 0 2px 6px rgba(255, 255, 255, 0.1) !important;
        transform: translateY(-1px) !important;
    }

    .hektor-maquette-search-wrapper .hektor-mobile-type-bien-select:hover {
        border-color: #6366F1 !important;
        background-color: #1a1a1a !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 3px 6px rgba(255, 255, 255, 0.1) !important;
    }

    .hektor-maquette-search-wrapper .hektor-mobile-type-bien-select option {
        background: #1a1a1a !important;
        color: #ffffff !important;
        padding: 15px !important;
        font-size: 16px !important;
        font-weight: 500 !important;
        border: none !important;
    }

    .hektor-maquette-search-wrapper .hektor-mobile-type-bien-select option:hover {
        background: #2a2a2a !important;
    }

    /* Ajuster la disposition du formulaire pour mobile */
    .hektor-maquette-search-wrapper .hektor-filters-row {
        display: flex !important;
        flex-direction: column !important;
        padding: 1px 1px !important;
    }

    /* Masquer le bouton de recherche sur mobile - le formulaire sera soumis au changement */
    .hektor-maquette-search-wrapper .hektor-filter-btn {
        display: none !important;
    }

    /* Wrapper global pour mobile */
    .hektor-maquette-search-wrapper {
        background: none !important;
        padding: 1px 1px !important;
        margin: 0 !important;
    }

    .hektor-maquette-container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
}

/* === RÈGLES MOBILES POUR LA PAGE DE RÉSULTATS === */
@media (max-width: 768px) {

    /* Masquer tous les champs sauf le Type de bien sur mobile dans la page résultats */
    .hektor-resultats-maquette-wrapper .hektor-filters-row .hektor-filter-field:not(.hektor-mobile-type-bien) {
        display: none !important;
    }

    /* Afficher seulement le champ Type de bien adapté au mobile */
    .hektor-resultats-maquette-wrapper .hektor-mobile-type-bien {
        display: block !important;
        width: 100% !important;
        flex: 1 !important;
    }

    /* Style spécial pour le select Type de bien mobile sur la page résultats */
    .hektor-resultats-maquette-wrapper .hektor-mobile-type-bien-select {
        width: 100% !important;
        padding: 18px 50px 18px 20px !important;
        border: 2px solid #FFFFFF !important;
        background: #000000 !important;
        color: #ffffff !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        text-align: left !important;
        appearance: none !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
        background-position: right 20px center !important;
        background-repeat: no-repeat !important;
        background-size: 20px !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1) !important;
        line-height: 1.4 !important;
        min-height: 56px !important;
    }

    .hektor-resultats-maquette-wrapper .hektor-mobile-type-bien-select:focus {
        outline: none !important;
        border-color: #4F46E5 !important;
        background-color: #1a1a1a !important;
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2), 0 4px 12px rgba(255, 255, 255, 0.15) !important;
        transform: translateY(-1px) !important;
    }

    .hektor-resultats-maquette-wrapper .hektor-mobile-type-bien-select:hover {
        border-color: #6366F1 !important;
        background-color: #1a1a1a !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 6px 12px rgba(255, 255, 255, 0.15) !important;
    }

    .hektor-resultats-maquette-wrapper .hektor-mobile-type-bien-select option {
        background: #1a1a1a !important;
        color: #ffffff !important;
        padding: 15px !important;
        font-size: 16px !important;
        font-weight: 500 !important;
        border: none !important;
    }

    .hektor-resultats-maquette-wrapper .hektor-mobile-type-bien-select option:hover {
        background: #2a2a2a !important;
    }

    /* Ajuster la disposition du formulaire pour mobile */
    .hektor-resultats-maquette-wrapper .hektor-filters-row {
        display: flex !important;
        flex-direction: column !important;
        background-color: #000000 !important;
    }

    /* Masquer le bouton de recherche sur mobile - le formulaire sera soumis au changement */
    .hektor-resultats-maquette-wrapper .hektor-filter-btn {
        display: none !important;
    }

    /* Wrapper global pour mobile */
    .hektor-resultats-maquette-wrapper {
        padding: 15px !important;
    }

    /* Ajustements spécifiques pour les filtres de résultats */

}

/* === TABLETTE - Conserver le comportement normal === */
@media (min-width: 769px) and (max-width: 1024px) {

    /* Les tablettes conservent l'affichage normal des filtres */
    .hektor-mobile-type-bien {
        display: none !important;
    }
}

/* === DESKTOP - Conserver le comportement normal === */
@media (min-width: 1025px) {

    /* Les écrans desktop conservent l'affichage normal des filtres */
    .hektor-mobile-type-bien {
        display: none !important;
    }
}

/* === GESTION DES PANNEAUX DROPDOWN SUR MOBILE === */
@media (max-width: 768px) {

    /* Masquer tous les panneaux dropdown sur mobile */
    .hektor-dropdown-panels {
        display: none !important;
    }

    /* Masquer tous les éléments de dropdown sur mobile */
    .hektor-dropdown-field:not(.hektor-mobile-type-bien) {
        display: none !important;
    }

    /* S'assurer que les boutons dropdown sont masqués sur mobile */
    .hektor-dropdown-toggle:not(.hektor-mobile-type-bien-select) {
        display: none !important;
    }
}

/* === ANIMATION DE CHARGEMENT POUR MOBILE === */
@media (max-width: 768px) {

    /* Animation de sélection pour indiquer que la recherche se lance */
    .hektor-mobile-type-bien-select.loading {
        opacity: 0.7 !important;
        pointer-events: none !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3e%3ccircle cx='12' cy='12' r='10' stroke='%23ffffff' stroke-width='4' stroke-dasharray='32' stroke-dashoffset='32'%3e%3canimateTransform attributeName='transform' type='rotate' dur='1s' repeatCount='indefinite' values='0 12 12;360 12 12'/%3e%3c/circle%3e%3c/svg%3e") !important;
        background-position: right 20px center !important;
        background-size: 20px !important;
    }

    /* Feedback visuel au moment de la sélection */
    .hektor-mobile-type-bien-select:active {
        transform: scale(0.98) !important;
        background-color: #2a2a2a !important;
    }
}