/* ──────────────────────────────────────────────────────────────
   Favoris — cœur sur les cartes de chalets (page /recherche-chalets.php).
   Fichier séparé : ni chalets-recherche.css ni include/chalets-card.php
   ne sont modifiés. Le bouton est injecté par /js/chalets-favori.js.
   ────────────────────────────────────────────────────────────── */

.chr-fav {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;                      /* au-dessus des flèches du carrousel (z-index 2) */
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 0;
    background: none;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

/* Cœur : contour blanc sur fond sombre translucide -> lisible sur toute photo */
.chr-fav i {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, .92);
    text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
    transition: transform .15s ease, color .15s ease;
}
.chr-fav:hover i { transform: scale(1.12); }
.chr-fav:active i { transform: scale(.94); }

/* État « en favori » */
.chr-fav.is-on i {
    color: #e0203c;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

/* Requête en cours */
.chr-fav.is-busy { pointer-events: none; opacity: .55; }

/* Accessibilité clavier */
.chr-fav:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    border-radius: 50%;
}

/* Carte hors zone de recherche : cœur atténué comme le reste de la carte */
.chr-card--muted .chr-fav i { color: rgba(255, 255, 255, .7); }

/* ──────────────────────────────────────────────────────────────
   Variante fiche (/annonce-chalets.php) : bouton texte à droite du titre,
   sur fond clair -> cœur sombre, pas de voile. Le bouton est écrit dans la
   page ; seul le libellé est mis à jour par le JS.
   ────────────────────────────────────────────────────────────── */
.ch-titlerow {
    display: flex;
    align-items: center;          /* boutons alignés sur l'axe du titre, pas sur son sommet */
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.ch-titlerow .ch-title { flex: 1 1 auto; min-width: 0; }

.chr-fav--fiche {
    position: static;
    width: auto;
    height: auto;
    gap: 8px;
    flex: none;
    align-self: center;
    padding: 8px 14px;
    border-radius: 24px;
    font-size: .95rem;
    font-weight: 600;
    color: #1a1a1a;
    background: transparent;
    transition: background .15s ease;
}
.chr-fav--fiche:hover { background: rgba(0, 0, 0, .05); }

.chr-fav--fiche i {
    font-size: 1rem;
    color: #1a1a1a;
    text-shadow: none;
}
.chr-fav--fiche.is-on i { color: #e0203c; text-shadow: none; }

.chr-fav--fiche:focus-visible { outline: 2px solid #1a1a1a; border-radius: 24px; }

@media (max-width: 560px) {
    .chr-fav--fiche { padding: 8px 10px; }
    .chr-fav--fiche .chr-fav__txt { display: none; }   /* place au titre : cœur seul */
}

.chr-fav__sr {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
