/* =========================================================================
 *    chalets-recherche.css — page de recherche de chalets
 *       ========================================================================= */

/* Couleurs et polices : voir css/chalets-tokens.css (source de verite),
   a charger AVANT ce fichier. */

body { background-color: var(--ch-bg-page); }

.chr { max-width: 1550px; margin: 16px auto 24px; padding: 0 16px; }
.chr a:not([class]) { color: var(--ch-link); }   /* liens texte de la page recherche */

/* ---- Header + barre de recherche collants (page recherche) ---- */
/* --chr-headerH / --chr-filtersH sont mesurés en JS (measureSticky). */
.chr-page #header-wrapper { position: sticky; top: 0; z-index: 900; }
.chr-filters { position: sticky; top: var(--chr-headerH, 0px); z-index: 800; }
@media(max-width:900px){ .chr-filters { position: static; } }   /* pas de sticky filtres sur mobile (trop haut) */

/* ---- Barre de filtres : pilule (segments destination · dates · invités + bouton rond) ---- */
.chr-filters {
    display: flex; align-items: center; gap: 0;
    max-width: 920px; margin: 0 auto; padding: 6px 6px 6px 8px;
    background: #fff; border: 1px solid #e4e7ea; border-radius: 999px;
    box-shadow: 0 3px 14px rgba(0,0,0,.08);
}
.chr-filters__field { position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: center;
    padding: 8px 18px; border-radius: 999px; cursor: pointer; }
.chr-filters__field:hover { background: #f4f4f4; }
.chr-filters__field--search { flex: 1.4 1 0; }        /* destination un peu plus large */

/* Séparateurs verticaux entre segments */
.chr-sep { flex: 0 0 auto; width: 1px; height: 26px; background: #e0e0e0; }
.chr-filters__field:hover + .chr-sep { background: transparent; }   /* masque le trait à droite du segment survolé */

/* Icône de segment + contenu commun */
.chr-seg__icon { flex: 0 0 auto; color: var(--ch-action-alternate); font-size: 1.15rem; margin-right: 12px; }

/* Champ de recherche (autosuggest) : input sans bordure, transparent */
.chr-suggest { display: flex; align-items: center; width: 100%; min-width: 0; }
.chr-suggest input { flex: 1 1 auto; min-width: 0; border: none; background: transparent; padding: 0;
    font-size: .95rem; color: #222; font-family: inherit; outline: none; }
.chr-suggest input::placeholder { color: #6b6b6b; }
.chr-suggest__clear { flex: 0 0 auto; margin-left: 8px; width: 20px; height: 20px; padding: 0;
    border: none; border-radius: 50%; background: #e6e6e6; color: #555; cursor: pointer;
    font-size: 1.05rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.chr-suggest__clear:hover { background: #d5d5d5; color: #222; }
.chr-suggest__clear[hidden] { display: none; }

/* Panneau "Régions populaires" (champ localisation vide) */
.chr-destpop { position: absolute; z-index: 45; top: calc(100% + 8px); left: 0;
    width: 880px; max-width: 92vw; background: #fff; border: 1px solid #e0e0e0; border-radius: 18px;
    box-shadow: 0 14px 44px rgba(0,0,0,.18); padding: 22px 26px 24px; cursor: default; }
.chr-destpop[hidden] { display: none; }
.chr-destpop__title { font-weight: 700; font-size: 1rem; color: #222; margin-bottom: 12px; }
.chr-destpop__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 16px; }
@media(max-width:760px){ .chr-destpop { width: 92vw; } .chr-destpop__grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width:480px){ .chr-destpop__grid { grid-template-columns: 1fr; } }
.chr-destpop__item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
    padding: 10px 12px; border: none; background: none; border-radius: 10px; cursor: pointer;
    font-size: .95rem; color: #222; font-family: inherit; }
.chr-destpop__item:hover { background: #f4f4f4; }
.chr-destpop__item i { color: var(--ch-action); font-size: .95rem; width: 18px; text-align: center; flex: 0 0 auto; }
.chr-destpop__item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Menu de résultats de l'autosuggest (localisation) — jQuery UI, scopé à la page ---- */
body.chr-page .ui-autocomplete.ui-menu {
    padding: 6px 0 8px; margin-top: 0; border: 1px solid #e4e7ea; border-radius: 18px;   /* écart géré par la position JS (bottom+8) */
    background: #fff; box-shadow: 0 14px 44px rgba(0,0,0,.18); list-style: none;
    max-height: 70vh; overflow-y: auto; z-index: 1200 !important;
    scrollbar-width: thin;
}
body.chr-page .ui-autocomplete.ui-menu::before {
    content: "Résultats"; display: block; padding: 12px 24px 8px;
    font-weight: 700; font-size: 1rem; color: #222;
}
body.chr-page .ui-autocomplete .ui-menu-item { border: none; margin: 0; }
body.chr-page .ui-autocomplete .ui-menu-item + .ui-menu-item { border-top: 1px solid #f0f0f0; }
body.chr-page .ui-autocomplete .ui-menu-item a,
body.chr-page .ui-autocomplete .ui-menu-item .ui-menu-item-wrapper {
    display: flex; align-items: center; gap: 14px; padding: 13px 24px; margin: 0;
    color: #222; font-size: .98rem; line-height: 1.2; text-decoration: none;
    border: none; background: none; cursor: pointer; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
body.chr-page .ui-autocomplete .ui-menu-item a::before,
body.chr-page .ui-autocomplete .ui-menu-item .ui-menu-item-wrapper::before {
    content: "\f3c5"; font-family: "Font Awesome 6 Free"; font-weight: 900;   /* location-dot (défaut : région) */
    color: #717171; font-size: .95rem; flex: 0 0 auto; width: 18px; text-align: center;
}
/* ville / arrondissement / quartier (type_id 1/2/3) -> tree-city */
body.chr-page .ui-autocomplete .ui-menu-item.chr-ac-city a::before,
body.chr-page .ui-autocomplete .ui-menu-item.chr-ac-city .ui-menu-item-wrapper::before {
    content: "\e587";
}
body.chr-page .ui-autocomplete .ui-menu-item a.ui-state-active,
body.chr-page .ui-autocomplete .ui-menu-item a.ui-state-focus,
body.chr-page .ui-autocomplete .ui-menu-item a:hover,
body.chr-page .ui-autocomplete .ui-menu-item .ui-menu-item-wrapper.ui-state-active,
body.chr-page .ui-autocomplete .ui-menu-item .ui-menu-item-wrapper:hover {
    background: #f4f4f4 !important; color: #111 !important; border: none !important; margin: 0 !important;
}
/* Override du partagé « .ui-autocomplete p { font-size:1.1em } » (jquery-ui-logis.css l.125) */
body.chr-page .ui-autocomplete p { margin: 0; font-size: .98rem; line-height: 1.2; }
body.chr-page .ui-autocomplete .autocomplete-type { display: none; }   /* type masqué -> nom seul (comme le modèle) */
body.chr-page .ui-autocomplete .autocomplete-name {
    font-size: .85rem; color: #222; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Sélecteur de plage Arrivée – Départ (popover 2 mois) — bouton sans bordure, plein segment */
.chr-dates__toggle { width: 100%; display: flex; align-items: center; box-sizing: border-box;
    padding: 0; border: none; background: transparent; cursor: pointer;
    font-size: .95rem; color: #6b6b6b; text-align: left; font-family: inherit; }
.chr-dates__toggle #chr-dates-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chr-dates__toggle #chr-dates-label.is-set { color: #222; font-weight: 600; }
.chr-datepop { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0;
    background: #fff; border: 1px solid #e0e0e0; border-radius: 16px; box-shadow: 0 14px 40px rgba(0,0,0,.16);
    padding: 22px 24px 16px; }
.chr-datepop__months { display: flex; gap: 40px; }
@media(max-width:640px){ .chr-datepop { left: 50%; transform: translateX(-50%); } .chr-datepop__months { flex-direction: column; gap: 24px; } }
.chr-cal { min-width: 240px; }
.chr-cal__title { text-align: center; font-weight: 700; font-size: 1rem; margin-bottom: 14px; color: #222; }
.chr-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.chr-cal__dow { text-align: center; font-size: .75rem; color: #8a7d6a; padding-bottom: 8px; }
.chr-cal__day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    font-size: .9rem; color: #7a5c3e; border-radius: 50%; cursor: pointer; user-select: none; }
.chr-cal__day:hover:not(.chr-cal__day--off):not(.chr-cal__day--empty) { background: var(--ch-action-soft); }
.chr-cal__day--empty { visibility: hidden; cursor: default; }
.chr-cal__day--off { color: #d3d3d3; text-decoration: line-through; cursor: default; }
.chr-cal__day.is-inrange { background: var(--ch-action-soft); border-radius: 0; color: var(--ch-action); }
.chr-cal__day.is-start, .chr-cal__day.is-end { background: var(--ch-action); color: #fff; font-weight: 700; }
.chr-datepop__arrow { position: absolute; top: 18px; width: 34px; height: 34px; border: none; background: none;
    font-size: 1.5rem; line-height: 1; color: #222; cursor: pointer; border-radius: 50%; z-index: 1; }
.chr-datepop__arrow:hover:not(:disabled) { background: #f0f0f0; }
.chr-datepop__arrow:disabled { opacity: .3; cursor: default; }
.chr-datepop__arrow[data-cal-prev] { left: 20px; }
.chr-datepop__arrow--next { right: 20px; }
.chr-datepop__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f0f0; }
.chr-datepop__clear { background: none; border: none; color: var(--ch-action); font-weight: 700; text-decoration: underline; cursor: pointer; font-size: .9rem; }
.chr-datepop__apply { background: var(--ch-action); color: #fff; border: none; border-radius: 8px; padding: 9px 20px; font-size: .9rem; font-weight: 600; cursor: pointer; }
.chr-datepop__apply:hover { background: var(--ch-action-hover); }

/* Menu Voyageurs (steppers) */
.chr-guests__toggle { width: 100%; display: flex; align-items: center; box-sizing: border-box;
    padding: 0; border: none; background: transparent; cursor: pointer;
    font-size: .95rem; color: #6b6b6b; text-align: left; font-family: inherit; }
.chr-guests__toggle #chr-guests-summary { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chr-guests__toggle #chr-guests-summary.is-set { color: #222; font-weight: 600; }
.chr-guestspop { position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; min-width: 320px;
    background: #fff; border: 1px solid #e0e0e0; border-radius: 16px; box-shadow: 0 14px 40px rgba(0,0,0,.16); padding: 8px 22px; }
@media(max-width:560px){ .chr-guestspop { left: 0; right: auto; min-width: 0; width: 100%; } }
.chr-guestrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid #eee; }
.chr-guestrow:last-of-type { border-bottom: none; }
.chr-guestrow__txt b { display: block; font-size: .98rem; color: #222; font-weight: 700; }
.chr-guestrow__txt small { color: #777; font-size: .82rem; }
.chr-guestrow__ctrl { display: flex; align-items: center; gap: 14px; }
.chr-guestrow__ctrl button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #b0b0b0;
    background: #fff; color: #444; font-size: 1.1rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.chr-guestrow__ctrl button:hover:not(:disabled) { border-color: #222; color: #222; }
.chr-guestrow__ctrl button:disabled { opacity: .35; cursor: default; }
.chr-guestrow__val { min-width: 20px; text-align: center; font-size: .95rem; }
.chr-guestspop__footer { display: flex; justify-content: flex-end; padding: 12px 0 14px; }
.chr-guestspop__apply { background: var(--ch-action); color: #fff; border: none; border-radius: 8px; padding: 9px 20px; font-size: .9rem; font-weight: 600; cursor: pointer; }
.chr-guestspop__apply:hover { background: var(--ch-action-hover); }

.chr-filters__submit {
    flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; padding: 0; margin-left: 6px;
    background: var(--ch-action-alternate); color: #fff; border: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
    transition: background-color .2s ease, transform .15s ease;
}
.chr-filters__submit:hover { background: var(--ch-action-alternate-hover); }
.chr-filters__submit-lbl { display: none; }   /* libellé affiché uniquement en mobile */

/* ---- Mobile : la pilule devient une carte, chaque champ est encadré ----
   et le bouton passe en pleine largeur avec son libellé. */
@media(max-width:700px){
    .chr-filters { flex-wrap: wrap; gap: 10px; border-radius: 18px; padding: 12px; }

    /* Un cadre par champ */
    .chr-filters__field {
        flex: 1 1 100%; padding: 14px 16px; border-radius: 12px;
        border: 1px solid #d7dbe0; background: #fff;
    }
    .chr-filters__field:hover { background: #fff; }        /* pas de survol au doigt */
    .chr-filters__field--search { flex: 1 1 100%; }        /* annule le 1.4 du desktop */
    .chr-sep { display: none; }                            /* séparateurs inutiles une fois encadré */

    /* Bouton pleine largeur, libellé visible */
    .chr-filters__submit {
        width: 100%; height: auto; margin: 2px 0 0; padding: 15px 20px;
        border-radius: 12px; gap: 9px; font-size: 1rem; font-weight: 700;
    }
    .chr-filters__submit-lbl { display: inline; }

    /* Popovers : plein cadre sous le champ concerné */
    .chr-datepop, .chr-guestspop, .chr-destpop { left: 0; right: 0; width: auto; max-width: none; }
}

/* ---- Barre résultats (total + tri) ---- */
.chr-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 4px 16px; flex-wrap: wrap; }
.chr-bar__count { font-family: var(--ch-font-titre); font-size: 1.1rem; font-weight: 700; color: #222; }
/* JC20261008 : le compteur est maintenant le <h1> — on neutralise les styles de titre par defaut. */
h1.chr-bar__count { margin: 0; padding: 0; line-height: 1.3; text-transform: none; letter-spacing: normal; }

/* JC20261008 SEO : texte d'introduction des destinations (/location/…) sous la liste */
.chr-seo { margin: 28px 2px 8px; padding-top: 20px; border-top: 1px solid #e6e6e6; font-size: .92rem; line-height: 1.6; color: #444; }
.chr-seo__titre { margin: 0 0 8px; font-family: var(--ch-font-titre); font-size: 1.1rem; font-weight: 700; color: #222; }
.chr-seo p { margin: 0 0 10px; }
.chr-seo a { color: inherit; text-decoration: underline; }
.chr-seo__liens-titre { margin: 14px 0 6px !important; font-weight: 700; color: #222; }
.chr-seo__liens { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0; padding: 0; list-style: none; }
.chr-seo__liens a { display: inline-block; padding: 4px 10px; border: 1px solid #ddd; border-radius: 999px; text-decoration: none; font-size: .85rem; }
.chr-seo__liens a:hover { border-color: #222; }
/* Actions à droite de la barre : pilules "Filtres" / "Trier par" */
.chr-bar__actions { display: flex; align-items: center; gap: 10px; }
.chr-selpill { position: relative; display: inline-flex; align-items: center; gap: 8px; line-height: 1;
    padding: 9px 16px; border: 1px solid #d7dbe0; border-radius: 999px; background: #fff;
    font-size: .9rem; font-weight: 600; color: #222; font-family: inherit; cursor: pointer; white-space: nowrap; }
.chr-selpill:hover { border-color: #b0b6bd; background: #f7f7f7; }
.chr-selpill__icon { color: #444; font-size: .9rem; }
.chr-selpill__caret { color: #888; font-size: .7rem; margin-left: 2px; }
/* Bulle "nombre de filtres actifs" */
.chr-selpill__badge { display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; box-sizing: border-box;
    background: var(--ch-action); color: #fff; font-size: .7rem; font-weight: 700; line-height: 1;
    margin-top: -4px; margin-bottom: -3px; }   /* marges négatives -> n'agrandit pas la hauteur de la pilule */
.chr-selpill__badge[hidden] { display: none; }
/* Pilule mise en avant quand au moins un filtre est actif */
#chr-filters-btn:has(.chr-selpill__badge:not([hidden])) { border-color: var(--ch-action); }
/* <select> transparent posé sur toute la pilule -> le libellé "Trier par" reste fixe */
.chr-selpill__native { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
    opacity: 0; cursor: pointer; border: none; -webkit-appearance: none; appearance: none; }

/* Menu "Trier par" custom */
.chr-sortwrap { position: relative; display: inline-flex; }
.chr-selpill--sort[aria-expanded="true"] .chr-selpill__caret { transform: rotate(180deg); }
.chr-sortmenu { position: absolute; z-index: 50; top: calc(100% + 8px); right: 0; min-width: 250px;
    background: #fff; border: 1px solid #e4e7ea; border-radius: 16px; box-shadow: 0 14px 40px rgba(0,0,0,.16); padding: 8px; }
.chr-sortmenu[hidden] { display: none; }
.chr-sortmenu__item { display: block; width: 100%; text-align: left; border: none; background: none;
    padding: 11px 16px; border-radius: 10px; font-size: .92rem; color: #222; cursor: pointer; font-family: inherit; white-space: nowrap; }
.chr-sortmenu__item:hover { background: #f4f4f4; }
.chr-sortmenu__item.is-active { background: #f0f0f0; font-weight: 700; }

/* ===== Panneau Filtres (modale) ===== */
.chr-fmodal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.chr-fmodal[hidden] { display: none; }
.chr-fmodal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.chr-fmodal__box { position: relative; background: #fff; border-radius: 18px; width: 100%; max-width: 760px; max-height: 88vh;
    display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; }
.chr-fmodal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 26px; border-bottom: 1px solid #eee; }
.chr-fmodal__head h2 { margin: 0; padding: 0; font-size: 1.05rem; }
.chr-fmodal__x { background: none; border: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: #333; padding: 2px 8px; border-radius: 8px; }
.chr-fmodal__x:hover { background: #f0f0f0; }
.chr-fmodal__body { padding: 24px 26px; overflow-y: auto; }
.chr-fmodal__foot { display: flex; align-items: center; justify-content: space-between; padding: 16px 26px; border-top: 1px solid #eee; }
.chr-fclear { background: none; border: 1px solid #d7dbe0; border-radius: 10px; padding: 11px 22px; font-size: .95rem; font-weight: 600; color: #222; cursor: pointer; }
.chr-fclear:hover { background: #f5f5f5; }
.chr-fsearch { display: inline-flex; align-items: center; background: var(--ch-action); color: #fff; border: none; border-radius: 10px; padding: 12px 24px; font-size: .95rem; font-weight: 700; cursor: pointer; }
.chr-fsearch:hover { background: var(--ch-action-hover); }
.chr-fsearch.is-loading { opacity: .75; }   /* rafraîchissement du compteur en cours */

.chr-fsec { margin: 20px 0; padding: 20px 0 0 0; border-top: 1px solid #eee; }
.chr-fsec:first-of-type { margin: 0; padding: 0; border-top: none; }

.chr-fsec__title { font-size: 1rem; font-weight: 700; text-transform: none; padding: 0; margin: 0 0 16px; color: #222; }

/* Slider double custom (poignées) */
.chr-slider { position: relative; height: 26px; margin: 12px 12px 26px; }
.chr-slider__rail { position: absolute; top: 50%; left: 0; right: 0; height: 4px; transform: translateY(-50%); background: #e4e4e4; border-radius: 4px; }
.chr-slider__fill { position: absolute; top: 50%; height: 4px; transform: translateY(-50%); background: var(--ch-action); border-radius: 4px; }
.chr-slider__handle { position: absolute; top: 50%; width: 24px; height: 24px; transform: translate(-50%, -50%);
    background: #fff; border: 1px solid #c9ccd1; border-radius: 50%; box-shadow: 0 1px 5px rgba(0,0,0,.25);
    cursor: grab; touch-action: none; z-index: 2; }
.chr-slider__handle:hover { border-color: var(--ch-action); }
.chr-slider__handle:active { cursor: grabbing; }
.chr-slider__handle:focus { outline: none; box-shadow: 0 0 0 4px var(--ch-action-ring), 0 1px 5px rgba(0,0,0,.25); }

/* Champs prix min / max */
.chr-fprice { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media(max-width:520px){ .chr-fprice { grid-template-columns: 1fr; } }
.chr-fprice__field { display: flex; flex-direction: column; }
.chr-fprice__field span { font-size: .85rem; color: #555; margin-bottom: 6px; }
.chr-fprice__field input { padding: 13px 14px; border: 1px solid #c9ccd1; border-radius: 12px; font-size: .95rem; color: #222; font-family: inherit; }
.chr-fprice__field input:focus { outline: none; border-color: var(--ch-action); box-shadow: 0 0 0 2px var(--ch-action-ring); }
.chr-fprice__field input::placeholder { color: #9aa0a6; }

/* Section "Chambres et lits" — lignes label + stepper (Tout / N+) */
.chr-bedrow { display: flex; align-items: center; gap: 16px; padding: 10px 0; border-top: none; }
.chr-bedrow:first-of-type { border-top: none; }
.chr-bedrow__label { flex: 1; font-size: .95rem; color: #222; }
.chr-bedstep { display: flex; align-items: center; gap: 16px; }
.chr-bedstep__val { min-width: 46px; text-align: center; font-size: .95rem; color: #222; }
.chr-bedstep__btn { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%; border: 1px solid #b8bcc2;
    background: #fff; color: #222; font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0;
    display: flex; align-items: center; justify-content: center; transition: border-color .15s, color .15s; }
.chr-bedstep__btn:hover:not(:disabled) { border-color: var(--ch-action); color: var(--ch-action); }
.chr-bedstep__btn:disabled { opacity: .35; cursor: default; }

/* Section "Commodités" — pilules à cocher (icône SVG en currentColor) */
.chr-commod { display: flex; flex-wrap: wrap; gap: 10px; }
.chr-commod__item { position: relative; display: inline-flex; align-items: center; gap: 9px;
    padding: 9px 16px; border: 1px solid #d7dbe0; border-radius: 999px; background: #fff;
    font-size: .9rem; color: #222; cursor: pointer; user-select: none;
    transition: border-color .15s, background .15s, color .15s; }
.chr-commod__item:hover { border-color: #9aa0a6; }
.chr-commod__item input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.chr-commod__item.is-on { border-color: var(--ch-action); background: var(--ch-action-soft); color: var(--ch-action); }
.chr-commod__icon { flex: 0 0 auto; font-size: 1.05rem; line-height: 0; display: inline-flex; color: inherit; }
.chr-commod__icon svg { width: 1.05em; height: 1.05em; display: block; }
.chr-commod__label { line-height: 1; }

/* ---- Vue scindée : grille 2×2 — [barre tri / liste] à gauche, carte pleine hauteur à droite ----
 *    La barre compteur/tri occupe la rangée 1 (colonne liste) ; la carte s'étend sur les 2 rangées
 *       (elle récupère la hauteur libérée par la barre de tri). Seule la liste (rangée 2) défile. */
.chr-split { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr;
    column-gap: 24px; margin: 16px 0 24px; height: var(--chr-splitH, calc(100vh - 260px)); }
.chr-split .chr-bar { grid-column: 1; grid-row: 1; margin: 0 2px 12px; }
.chr-split__list { grid-column: 1; grid-row: 2; min-height: 0; height: 100%; overflow-y: auto; overflow-x: hidden;
    scrollbar-width: none; -ms-overflow-style: none; }               /* Firefox / vieux Edge */
.chr-split__list::-webkit-scrollbar { width: 0; height: 0; display: none; }   /* WebKit : barre masquée */
.chr-split__map { grid-column: 2; grid-row: 1 / span 2; height: 100%; }   /* carte sur toute la hauteur */

/* Desktop : la liste défile en interne et la carte reste fixe pendant ce temps.
   La page, elle, reste défilable sur la faible hauteur restante -> le footer est
   accessible en poursuivant le défilement une fois la liste terminée.
   (Avant : overflow:hidden sur html/body rendait le footer inatteignable.) */
@media(min-width:901px){
    html.chr-html, html.chr-html body.chr-page { height: auto; overflow: visible; }
}
.chr-map { width: 100%; height: 100%; border-radius: 16px; overflow: hidden; z-index: 0; background: #e9eef1; }
.chr-map .leaflet-container { border-radius: 16px; font: inherit; }

/* ---- Grille de résultats : 2 colonnes, puis 1 colonne sous le breakpoint ---- */
.chr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media(max-width:1250px){ .chr-grid { grid-template-columns: 1fr; } }   /* liste (50%) trop étroite pour 2 cartes */

/* Pins-prix (marqueurs Leaflet) */
.chr-pin { }
.chr-pin__lbl { position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
    background: #fff; color: #222; border: 1px solid #d0d0d0; border-radius: 999px;
    padding: 5px 11px; font-size: .82rem; font-weight: 700; line-height: 1;
    box-shadow: 0 1px 5px rgba(0,0,0,.28); cursor: pointer; transition: transform .12s, background .12s; }
.chr-pin.is-active { z-index: 1000 !important; }
/* JC20260819 : pin actif en vert marque (etait #222), coherent avec la surbrillance .chr-card.is-hl */
.chr-pin.is-active .chr-pin__lbl { background: var(--ch-action); color: #fff; border-color: var(--ch-action); }

/* Chalets hors zone de recherche : grises et en retrait, mais toujours cliquables
   (le visiteur voit ce qui existe juste a cote de sa recherche). */
.chr-pin--muted .chr-pin__lbl { background: #f2f3f4; color: #8a9099; border-color: #dcdfe3;
    font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.chr-pin--muted:hover .chr-pin__lbl { background: #fff; color: #222; border-color: #b8bcc2;
    box-shadow: 0 1px 5px rgba(0,0,0,.28); }

/* Survol d'un pin -> même effet que le survol direct de la carte (ombre + léger soulèvement) */
.chr-card.is-hl { box-shadow: 0 10px 30px rgba(0,0,0,.10); transform: translateY(-2px); }

/* Popup mini-carte (clic sur un pin) — surcharge du style Leaflet */
.chr-pop-wrap .leaflet-popup-content-wrapper { padding: 0; border-radius: 16px; overflow: hidden;
    box-shadow: 0 8px 28px rgba(0,0,0,.28); }
.chr-pop-wrap .leaflet-popup-content { font-family: var(--ch-font-texte); margin: 0; width: 260px !important; }
.chr-pop-wrap .leaflet-popup-tip-container { display: none; }   /* pas de flèche -> carte flottante */
/* spécificité renforcée (body.chr-page) pour battre .leaflet-container a.leaflet-popup-close-button */
body.chr-page .chr-pop-wrap a.leaflet-popup-close-button { top: 12px; right: 12px; width: 24px; height: 24px;
    background: rgba(255,255,255,.92); border-radius: 50%; color: #222; font: 700 16px/24px sans-serif;
    text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.3); z-index: 3; }
body.chr-page .chr-pop-wrap a.leaflet-popup-close-button:hover { background: #fff; color: #000; }
.chr-pop { display: block; text-decoration: none; color: inherit; }
.leaflet-container a.chr-pop:hover { text-decoration: none; }
.chr-pop__photo { aspect-ratio: 16/10; background: #eef0f2; overflow: hidden; }
.chr-pop__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chr-pop__body { padding: 12px 14px 14px; }
.chr-pop__title { font-weight: 700; font-size: 1rem; color: #1a1a1a; margin-bottom: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chr-pop__lieu  { font-size: .85rem; color: #717171; margin-bottom: 5px; }
.chr-pop__facts { font-size: .85rem; color: #555; margin-bottom: 6px; }
.chr-pop__price { font-size: 1rem; color: #333; }
.chr-pop__price b { font-weight: 800; color: #1a1a1a; font-size: 1.2rem; }   /* seul le montant est agrandi */
.chr-pop__price span { color: #666; }

/* Bascule liste / carte (mobile uniquement) */
.chr-maptoggle { display: none; }

@media(max-width:900px){
    /* empilement normal : la page défile, pas de scroll interne ni hauteur fixe */
    .chr-split { grid-template-columns: 1fr; grid-template-rows: none; height: auto !important; }
    .chr-split .chr-bar { grid-column: 1; grid-row: auto; margin: 18px 2px 14px; }
    .chr-split__list { grid-column: 1; grid-row: auto; height: auto; overflow: visible; padding-right: 0; }
    .chr-split__map { grid-column: 1; grid-row: auto; display: none; position: fixed; inset: 0; top: 0; height: 100vh; z-index: 500; }
    .chr-map { border-radius: 0; height: 100% !important; }   /* plein écran (annule la hauteur JS) */
    .chr-split.is-mapview .chr-split__map { display: block; }
    .chr-split.is-mapview .chr-split__list { display: none; }
    .chr-maptoggle { display: inline-flex; align-items: center; gap: 8px; position: fixed; z-index: 600;
        bottom: 24px; left: 50%; transform: translateX(-50%);
        background: #222; color: #fff; border: none; border-radius: 999px; padding: 12px 22px;
        font-size: .95rem; font-weight: 600; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
}
@media(max-width:560px){ .chr-grid { grid-template-columns: 1fr; } }

.chr-card { display: block; background: #fff; border: 1px solid #eceef0; border-radius: 16px;
    overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .18s, transform .18s; }
.chr-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,.10); transform: translateY(-2px); text-decoration: none; }
.chr-card__photo { position: relative; aspect-ratio: 4/3; background: #eef0f2; overflow: hidden; }
.chr-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chr-card__noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: #b8c0c6; font-size: 2rem; }

/* Carrousel photo dans la carte */
.chr-carousel { position: absolute; inset: 0; overflow: hidden; }
.chr-carousel__track { display: flex; height: 100%; transition: transform .3s ease; }
.chr-carousel__slide { flex: 0 0 100%; height: 100%; }
.chr-carousel__slide img { width: 100%; height: 100%; object-fit: cover; display: block; background: #eef0f2; }
.chr-carousel__arrow { position: absolute; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.9); color: #222;
    display: flex; align-items: center; justify-content: center; font-size: .8rem; cursor: pointer;
    box-shadow: 0 1px 5px rgba(0,0,0,.3); opacity: 0; transition: opacity .15s, background .15s; z-index: 2; }
.chr-carousel__arrow--prev { left: 10px; }
.chr-carousel__arrow--next { right: 10px; }
.chr-carousel__arrow:hover { background: #fff; }
.chr-carousel__arrow.is-hidden { display: none; }
.chr-card:hover .chr-carousel__arrow { opacity: 1; }               /* flèches au survol de la carte */
@media (hover: none){ .chr-card .chr-carousel__arrow { opacity: 1; } }   /* tactile : toujours visibles */
.chr-carousel__dots { position: absolute; bottom: 8px; left: 0; right: 0; z-index: 2;
    display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.chr-carousel__dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6);
    box-shadow: 0 0 2px rgba(0,0,0,.4); transition: background .15s; }
.chr-carousel__dot.is-active { background: #fff; }
.chr-card__body { padding: 14px 16px 18px; }
.chr-card__type { font-size: .82rem; color: #717171; margin-bottom: 3px; }

/* JC20261002 — Etiquettes payantes (include/chalets-card.php). Classes .chr-tag* et
   non .tag-urgent / .tag-offre / .tag-vip : main.css positionne ces dernieres en
   absolu partout sur le site (top:5px; left:-5px; 9px), ce qui les casserait ici.
   Couleurs reprises des annonces LQ.
   - Urgent, Offre speciale : en haut a gauche de la photo, empilees si les deux ;
     au-dessus des fleches du carrousel (z-index 2), comme le coeur.
   - VIP : en haut a droite de la zone texte ; la ligne type/lieu lui laisse la
     place (padding-right) pour ne jamais passer dessous. */
.chr-tags { position: absolute; top: 10px; left: 10px; z-index: 3;
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px; pointer-events: none; }
.chr-tag { display: inline-block; padding: 2px 6px; border-radius: .25rem;
    font-size: .7rem; font-weight: 600; line-height: 1.4; letter-spacing: .02em;
    text-transform: uppercase; color: #fff; white-space: nowrap; }
.chr-tag--urgent { background: rgba(204, 0, 0, .85); }
.chr-tag--offre  { background: rgba(119, 71, 255, .85); }
.chr-tag--vip    { background: rgba(153, 153, 153, .9); }
.chr-card__body--vip { position: relative; }
.chr-card__body--vip .chr-tag--vip { position: absolute; top: 14px; right: 16px; }
.chr-card__body--vip .chr-card__type { padding-right: 44px; }
.chr-card__title { font-weight: 700; font-size: 1.05rem; color: #1a1a1a; margin-bottom: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chr-card__facts { font-size: .88rem; color: #555; margin-bottom: 10px; }
.chr-card__price { font-size: .95rem; color: #333; }
.chr-card__price b { font-weight: 800; color: #1a1a1a; }
.chr-card__price span { color: #666; }

/* ---- Annonces hors zone de recherche : zone texte grisee ----
   La photo reste en couleur ; seul le bloc texte est estompe, pour marquer
   qu'elles ne repondent pas aux criteres tout en restant attrayantes. */
.chr-card--muted .chr-card__body { background: #f4f5f6; }
.chr-card--muted .chr-card__title { color: #5b6470; }
.chr-card--muted .chr-card__price b { color: #5b6470; }
.chr-card--muted .chr-card__type,
.chr-card--muted .chr-card__facts { color: #8a9099; }
.chr-card--muted:hover .chr-card__body { background: #eef0f2; }

/* Section « Autres chalets hors de votre recherche » */
.chr-nearby { margin-top: 30px; padding-top: 22px; border-top: 1px solid #e4e7ea; }
.chr-nearby[hidden] { display: none; }
.chr-nearby__title { font-size: .95rem; font-weight: 700; color: #5b6470; margin-bottom: 16px; }

/* ---- Aucun résultat ---- */
.chr-empty { padding: 40px 4px 24px; color: #666; }
.chr-empty__title { font-size: 1.5rem; font-weight: 700; color: #1a1a1a; margin: 0 0 8px; }
.chr-empty__sub { font-size: .98rem; color: #5b6470; margin: 0 0 22px; line-height: 1.5; }

/* Action principale : dézoome d'un cran pour élargir la zone */
.chr-empty__wider { display: inline-block; background: #1a1a1a; color: #fff; border: none;
    padding: 13px 26px; border-radius: 999px; font-size: .95rem; font-weight: 600;
    font-family: inherit; cursor: pointer; margin-right: 10px; }
.chr-empty__wider:hover:not(:disabled) { background: #000; }
.chr-empty__wider:disabled { opacity: .4; cursor: default; }

.chr-empty__reset { display: inline-block; background: none; color: #5b6470; text-decoration: underline;
    padding: 13px 4px; border-radius: 999px; font-weight: 600; font-size: .92rem; }
.chr-empty__reset:hover { color: #1a1a1a; }

/* ---- Pagination ---- */
.chr-pager { display: flex; justify-content: center; gap: 8px; margin: 36px 0 10px; flex-wrap: wrap; }
.chr-pager__btn { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
    padding: 0 10px; border: 1px solid #d7dbe0; border-radius: 10px; text-decoration: none; color: #333;
    font-size: .95rem; background: #fff; }
.chr-pager__btn:hover { border-color: var(--ch-action); color: var(--ch-action); }
.chr-pager__btn.is-active { background: var(--ch-action); border-color: var(--ch-action); color: #fff; }
