/* =========================================================================
   chalets-accueil.css — page d'accueil chalets (index-chalets.php)
   La barre de recherche elle-même est stylée par chalets-recherche.css
   (classes .chr-filters / .chr-destpop / .chr-datepop / .chr-guestspop).
   ========================================================================= */

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

/* ---- Hero ---- */
.chx-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-color: #2b3a42;            /* fond visible avant chargement de la photo */
    padding: 64px 16px 96px;              /* marge basse : place aux popovers */
    box-sizing: border-box;
}
/* Repli si aucune photo n'est déposée dans /images/chalet-hero.jpg */
.chx-hero--nophoto { background-image: linear-gradient(135deg, #2287aa 0%, #165e77 60%, #123f52 100%); }

/* Voile sombre : garantit la lisibilité du titre quelle que soit la photo */
.chx-hero__overlay {
    position: absolute; inset: 0;
    /*background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.30) 45%, rgba(0,0,0,.50) 100%);*/
}

.chx-hero__inner { position: relative; z-index: 2; width: 100%; max-width: 960px; text-align: center; }

.chx-hero__title {
    font-family: var(--ch-font-titre);
    font-weight: 700;
    font-size: clamp(1.9rem, 4.2vw, 3.1rem);
    line-height: 1.15;
    color: #fff;
    margin: 0 0 12px;
    text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
/* JC20261008 SEO : <h1> « Location de chalets au Québec » en surtitre, au-dessus du
   slogan (qui reste le grand titre visuel, dans un <p class="chx-hero__title">). */
.chx-hero__eyebrow {
    font-family: var(--ch-font-texte);
    font-weight: 700;
    font-size: clamp(.78rem, 1.3vw, .9rem);
    letter-spacing: .14em;
    text-transform: uppercase;
    line-height: 1.3;
    color: rgba(255,255,255,.95);
    margin: 0 0 10px;
    text-shadow: 0 1px 8px rgba(0,0,0,.35);
}
.chx-hero__sub {
    color: rgba(255,255,255,.94);
    font-size: clamp(.98rem, 1.7vw, 1.15rem);
    margin: 0 0 30px;
    text-shadow: 0 1px 8px rgba(0,0,0,.35);
}

/* ---- Barre de recherche posée sur la photo ---- */
/* .chr-filters est en position:sticky sur la page de résultats -> neutralisé ici. */
.chx-search .chr-filters {
    position: static;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0,0,0,.28);
}
/* Les popovers (dates, invités, régions) doivent passer au-dessus du hero */
.chx-search { position: relative; z-index: 3; }

@media(max-width:700px){
    .chx-hero { min-height: 440px; padding: 40px 14px 72px; }
    /* Sous ce seuil la pilule de recherche s'empile (chalets-recherche.css) et prend
       beaucoup de hauteur : on retire l'accroche pour garder le formulaire visible. */
    .chx-hero__sub { display: none; }
    .chx-hero__title { margin-bottom: 22px; }
}

/* ---- Sections de contenu sous le hero ---- */
.chx-sec { max-width: 1280px; margin: 0 auto; padding: 36px 16px 8px; }
.chx-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.chx-sec__title { font-family: var(--ch-font-titre); font-weight: 700; font-size: 1.5rem; color: #1a1a1a; margin: 0; }
.chx-sec__more { color: var(--ch-link); text-decoration: none; font-size: .92rem; font-weight: 600; white-space: nowrap; }
.chx-sec__more:hover { text-decoration: underline; }
.chx-sec__more i { font-size: .7rem; margin-left: 3px; }

/* ---- Carrousel horizontal (Régions populaires) ---- */
.chx-carnav { display: flex; gap: 8px; flex: 0 0 auto; }
.chx-carnav__btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #d7dbe0;
    background: #fff; color: #222; cursor: pointer; font-size: .75rem; padding: 0;
    display: flex; align-items: center; justify-content: center; transition: border-color .15s, opacity .15s; }
.chx-carnav__btn:hover:not(:disabled) { border-color: #9aa0a6; }
.chx-carnav__btn:disabled { opacity: .3; cursor: default; }

.chx-car {
    display: flex; gap: 18px;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 6px;                       /* respiration sous les tuiles */
    scrollbar-width: none; -ms-overflow-style: none;
}
.chx-car::-webkit-scrollbar { display: none; }   /* défilement piloté par les flèches */

/* Tuile : photo verticale, libellé posé en bas à gauche */
.chx-tile { position: relative; flex: 0 0 226px; height: 330px; border-radius: 14px;
    overflow: hidden; text-decoration: none; scroll-snap-align: start; background: #eef0f2; display: block; }
.chx-tile__img { width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .4s ease; }
.chx-tile__img--none { background: linear-gradient(135deg, #2287aa, #165e77); }
.chx-tile:hover .chx-tile__img { transform: scale(1.06); }
/* Voile bas : garantit la lisibilité du libellé sur n'importe quelle photo */
.chx-tile__shade { position: absolute; inset: auto 0 0 0; height: 55%;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.62) 100%); pointer-events: none; }
.chx-tile__label { position: absolute; left: 14px; right: 14px; bottom: 12px; color: #fff;
    font-weight: 700; font-size: 1rem; line-height: 1.25; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.chx-tile__label small { display: block; font-weight: 400; font-size: .82rem; opacity: .9; margin-top: 2px; }

@media(max-width:600px){ .chx-tile { flex-basis: 62vw; height: 270px; } }

/* 4 cartes de front (la grille .chr-grid de la page résultats est en 2 colonnes) */
.chx-grid4 { grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media(max-width:1100px){ .chx-grid4 { grid-template-columns: repeat(3, 1fr); } }
@media(max-width:820px){  .chx-grid4 { grid-template-columns: repeat(2, 1fr); } }
@media(max-width:520px){  .chx-grid4 { grid-template-columns: 1fr; } }

/* ---- Chalets par activité : cartes bordées, titre + exemples en gris ---- */
/* Titre souligné d'un petit trait (variante du titre de section) */
.chx-sec__title--rule { position: relative; padding-bottom: 16px; margin-bottom: 22px; }
.chx-sec__title--rule::after { content: ""; position: absolute; left: 0; bottom: 0;
    width: 34px; height: 3px; background: #1a1a1a; border-radius: 2px; }
/* Dans un en-tete de section (avec lien « Voir tous » / fleches), la marge vient de .chx-sec__head */
.chx-sec__head .chx-sec__title--rule { margin-bottom: 0; }

.chx-actgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media(max-width:1000px){ .chx-actgrid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width:560px){  .chx-actgrid { grid-template-columns: 1fr; } }

.chx-act { display: block; padding: 20px 22px; border: 1px solid #e4e7ea; border-radius: 12px;
    background: #fff; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.chx-act:hover { border-color: #c2c8d0; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.chx-act__titre { display: block; font-family: var(--ch-font-titre); font-weight: 700;
    font-size: 1.02rem; color: #1a1a1a; margin-bottom: 6px; }
.chx-act__sous { display: block; font-size: .88rem; color: #8a9099; line-height: 1.4;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Appel à l'action « Annoncez votre chalet » (avant le footer) ---- */
.chx-cta { position: relative; max-width: 1280px; margin: 56px auto 64px; padding: 0 16px;
    display: flex; align-items: center; }
/* La photo occupe tout le bloc ; la carte blanche se pose par-dessus, à gauche. */
.chx-cta__media { width: 100%; min-height: 440px; border-radius: 16px;
    background-size: cover; background-position: center; background-color: #2b3a42; }
.chx-cta__media--none { background-image: linear-gradient(135deg, #2287aa 0%, #165e77 60%, #123f52 100%); }

.chx-cta__card { position: absolute; left: 60px; max-width: 420px;
    background: #fff; border-radius: 16px; padding: 32px 34px 34px;
    box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.chx-cta__title { font-family: var(--ch-font-titre); font-weight: 700; font-size: 1.65rem;
    line-height: 1.2; color: #1a1a1a; margin: 0 0 14px; }
.chx-cta__txt { font-size: .98rem; line-height: 1.55; color: #4a5058; margin: 0 0 24px; }
.chx-cta__btn { display: inline-block; background: var(--ch-action); color: #fff; text-decoration: none;
    padding: 15px 30px; border-radius: 999px; font-size: 1rem; font-weight: 700; }
.chx-cta__btn:hover { background: var(--ch-action-hover); color: #fff; }

/* Sous 900px : la carte passe sous la photo (illisible en superposition) */
@media(max-width:900px){
    .chx-cta { display: block; margin: 40px auto 48px; }
    .chx-cta__media { min-height: 260px; }
    .chx-cta__card { position: static; max-width: none; margin: -40px 12px 0; }
}
