/* =========================================
   PROPERTIES PAGE
   file: /assets/css/properties.css
   Scoped uniquement à .properties-page
   Premium / professionnel / RTL friendly
========================================= */

/* =========================
   RESET LOCAL
========================= */
.properties-page,
.properties-page *,
.properties-page *::before,
.properties-page *::after {
    box-sizing: border-box;
}

.properties-page img,
.properties-page svg {
    max-width: 100%;
    display: block;
}

/* =========================
   TOKENS
========================= */
html,
body {
    overflow-x: hidden;
}

.properties-page {
    --properties-bg:
        radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.96), transparent 28%),
        radial-gradient(circle at 86% 16%, rgba(153, 246, 228, 0.42), transparent 26%),
        radial-gradient(circle at 50% 82%, rgba(20, 184, 166, 0.18), transparent 24%),
        linear-gradient(135deg, #f3fdfb 0%, #e6fbf6 36%, #edfbf8 68%, #ddf7f3 100%);

    --properties-text: #0f172a;
    --properties-title: #0b1b48;
    --properties-muted: #64748b;
    --properties-line: rgba(15, 23, 42, 0.10);

    --properties-surface: rgba(255, 255, 255, 0.76);
    --properties-surface-strong: rgba(255, 255, 255, 0.88);
    --properties-card: rgba(248, 250, 252, 0.94);

    --properties-primary: #0f766e;
    --properties-primary-2: #14b8a6;
    --properties-accent: #22c55e;

    --properties-shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.08);
    --properties-shadow-card: 0 26px 70px rgba(15, 23, 42, 0.12);
    --properties-shadow-btn: 0 14px 34px rgba(15, 118, 110, 0.22);

    min-height: 100vh;
    color: var(--properties-text);
    background: var(--properties-bg);
    overflow-x: hidden;
    overflow-y: visible;
}

.properties-page main,
.properties-page .page,
.properties-page .container {
    overflow: visible;
}

/* =========================
   PAGE LAYOUT
========================= */
.properties-page .page {
    position: relative;
    width: 100%;
    padding-top: 106px;
    padding-bottom: 84px;
    isolation: isolate;
}

.properties-page .page::before,
.properties-page .page::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(18px);
    opacity: 0.72;
    z-index: -1;
}

.properties-page .page::before {
    width: 360px;
    height: 360px;
    top: 120px;
    right: -80px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95), transparent 68%);
}

.properties-page .page::after {
    width: 420px;
    height: 420px;
    left: -90px;
    bottom: 80px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.12), transparent 68%);
}

/* =========================
   TYPOGRAPHY
========================= */
.properties-page h1,
.properties-page h2,
.properties-page h3 {
    margin: 0;
    color: var(--properties-title);
}

.properties-page h1 {
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.properties-page .h2 {
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.15;
    font-weight: 900;
    color: var(--properties-title);
}

.properties-page .muted {
    color: var(--properties-muted);
    font-size: 15px;
    line-height: 1.8;
}

/* =========================
   HERO TOP / BADGE LUXE
========================= */
.properties-page .pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px 10px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #065f46 0%, #059669 55%, #10b981 100%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow:
        0 10px 28px rgba(5, 150, 105, 0.32),
        0 0 0 3px rgba(5, 150, 105, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

/* shimmer qui traverse au chargement */
.properties-page .pill::before {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 55%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 255, 255, 0.22) 50%,
        transparent 100%
    );
    animation: pill-shimmer 3.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pill-shimmer {
    0%        { left: -80%; }
    55%, 100% { left: 120%; }
}

.properties-page .pill::after {
    display: none;
}

/* point vert qui pulse */
.properties-page .pill .pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6ee7b7;
    flex-shrink: 0;
    animation: pill-pulse 2s ease-in-out infinite;
}

@keyframes pill-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(110, 231, 183, 0.65); }
    50%       { box-shadow: 0 0 0 5px rgba(110, 231, 183, 0); }
}

/* icône check SVG */
.properties-page .pill .pill-check {
    flex-shrink: 0;
    display: block;
}

.properties-page>.pill,
.properties-page .page>.pill {
    width: fit-content;
    max-width: 100%;
}

.properties-page .page>.muted {
    margin: 0 0 22px;
    font-size: clamp(15px, 2vw, 19px);
    color: rgba(15, 23, 42, 0.84);
}

/* Titre du bloc de filtres (sous-titre + icône entonnoir) */
.properties-page .prop-filters-title {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 14px;
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 800;
    line-height: 1.5;
    color: var(--properties-title);
}

.properties-page .prop-filters-title .pft-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--properties-primary), var(--properties-primary-2));
    color: #fff;
    box-shadow: var(--properties-shadow-btn);
}

.properties-page .prop-filters-title .pft-icon svg {
    width: 17px;
    height: 17px;
}

.properties-page .prop-filters-title span:not(.pft-icon) {
    text-decoration: underline;
    text-decoration-color: var(--properties-primary-2);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

/* Éléments du bottom sheet mobile — masqués sur desktop */
.properties-page .filters-mobile-trigger,
.properties-page .filters-backdrop,
.properties-page .filters-sheet-head,
.properties-page .filters-apply-btn,
.filters-fab {
    display: none;
}

/* Desktop : le wrapper s'efface pour que les champs restent des items de la grille */
.properties-page .filters-scroll { display: contents; }

/* =========================
   FILTERS
========================= */
.properties-page .filters {
    display: grid;
    grid-template-columns:
        minmax(220px, 1fr) minmax(180px, 1fr) minmax(220px, 1.1fr) minmax(220px, 1.1fr) minmax(220px, 1.1fr) 180px;
    gap: 14px;
    align-items: end;
    width: min(1380px, 100%);
    margin: 18px auto 16px;
    padding: 20px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(248, 250, 252, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: var(--properties-shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.properties-page .field {
    min-width: 0;
}

.properties-page .field label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 800;
}

.properties-page .field input,
.properties-page .field select,
.properties-page .field textarea {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(255, 255, 255, 0.72);
    color: var(--properties-text);
    font: inherit;
    outline: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.80),
        0 1px 2px rgba(15, 23, 42, 0.03);
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.16s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.properties-page .field input::placeholder,
.properties-page .field textarea::placeholder {
    color: #94a3b8;
}

.properties-page .field input:hover,
.properties-page .field select:hover,
.properties-page .field textarea:hover {
    border-color: rgba(100, 116, 139, 0.65);
    background: rgba(255, 255, 255, 0.82);
}

.properties-page .field input:focus,
.properties-page .field select:focus,
.properties-page .field textarea:focus {
    border-color: rgba(20, 184, 166, 0.85);
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 0 0 4px rgba(20, 184, 166, 0.12),
        0 10px 24px rgba(20, 184, 166, 0.08);
    transform: translateY(-1px);
}

.properties-page .field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    /* RTL (par défaut, AR) : flèche à gauche, padding logique à droite (start). */
    padding-inline-start: 44px;
    padding-inline-end: 16px;
    background-image:
        linear-gradient(45deg, transparent 50%, #1e293b 50%),
        linear-gradient(135deg, #1e293b 50%, transparent 50%);
    background-position:
        16px calc(50% - 3px),
        24px calc(50% - 3px);
    background-size: 8px 8px, 8px 8px;
    background-repeat: no-repeat;
}

/* LTR (français) : flèche à DROITE, padding à droite — sans ça, la flèche
   reste à gauche par-dessus le texte et bloque le clic sur le select. */
[dir="ltr"] .properties-page .field select {
    padding-inline-start: 16px;
    padding-inline-end: 44px;
    background-position:
        calc(100% - 24px) calc(50% - 3px),
        calc(100% - 16px) calc(50% - 3px);
}

/* ── Dropdown custom des filtres (composant components/hs-combo.css) ──
   Variables de surface pour matcher les champs translucides + z-index pour que
   le panneau passe au-dessus du contenu suivant (le .filters a un backdrop-filter
   qui crée un contexte d'empilement). */
.properties-page .filters {
    position: relative;
    z-index: 5;
    --hs-btn-h: 54px;
    --hs-btn-radius: 18px;
    --hs-btn-bg: rgba(255, 255, 255, .72);
    --hs-btn-border: rgba(148, 163, 184, .45);
    --hs-accent: rgba(20, 184, 166, .85);
}

.properties-page .filters-reset-btn,
.properties-page #btnReset {
    width: 100%;
    min-height: 54px;
    padding: 0 20px;
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #111827;
    font: inherit;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        background-color 0.18s ease,
        color 0.18s ease;
    align-self: end;
    white-space: nowrap;
}

.properties-page .filters-reset-btn:hover,
.properties-page #btnReset:hover {
    transform: translateY(-2px);
    border-color: rgba(100, 116, 139, 0.48);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.10);
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
}

.properties-page .filters-reset-btn:focus-visible,
.properties-page #btnReset:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 4px rgba(148, 163, 184, 0.16),
        0 16px 30px rgba(15, 23, 42, 0.08);
}

/* =========================
   NOTICE
========================= */
.properties-page .notice {
    width: min(1380px, 100%);
    margin: 0 auto 26px;
    padding: 18px 22px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.80);
    box-shadow: var(--properties-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.90);
    color: #334155;
    font-size: 15px;
    line-height: 1.9;
}

.properties-page .notice b {
    color: #0f172a;
    font-weight: 900;
}

/* =========================
   RESULTS HEADER
========================= */
.properties-page .results-section {
    width: min(1380px, 100%);
    margin: 0 auto;
}

.properties-page .row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.properties-page .results-head {
    margin-bottom: 16px;
}

.properties-page #count {
    font-size: 17px;
    color: #475569;
}

/* =========================
   GRID
========================= */
.properties-page .properties-grid,
.properties-page #grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

/* =========================
   CARD PREMIUM
========================= */
.properties-page .card {
    position: relative;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(244, 247, 252, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.90);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
    /* Entrée animée en cascade (le délai est piloté par --card-i depuis le JS) */
    animation: propCardIn 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    animation-delay: calc(var(--card-i, 0) * 65ms);
}

@keyframes propCardIn {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .properties-page .card { animation: none; }
}

.properties-page .card:hover {
    transform: translateY(-6px);
    /* Halo teal doux au lieu de l'ombre grise neutre */
    box-shadow:
        0 20px 46px rgba(13, 148, 136, 0.24),
        0 6px 18px rgba(15, 23, 42, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.94);
    border-color: rgba(20, 184, 166, 0.34);
}

.properties-page .card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.properties-page .card-media,
.properties-page .thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 260px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.04);
}

.properties-page .card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 18, 40, 0.28) 0%,
        rgba(10, 18, 40, 0.02) 38%,
        transparent 60%
    );
    pointer-events: none;
    z-index: 1;
}

.properties-page .card-media img,
.properties-page .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Retour rapide quand on quitte la carte */
    transition: transform 0.6s ease;
}

.properties-page .card:hover .card-media img,
.properties-page .card:hover .thumb img,
.properties-page .card-link:hover .card-media img {
    /* Zoom lent type Ken Burns à l'entrée */
    transform: scale(1.08);
    transition: transform 6s ease-out;
}

.properties-page .card-body,
.properties-page .body {
    padding: 18px 18px 20px;
}

.properties-page .card-title,
.properties-page .title {
    margin: 2px 0 0;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 800;
    color: #0b1b48;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Réserve TOUJOURS 2 lignes (1.5 × 2 = 3em) → toutes les cartes à la même hauteur,
       que le titre tienne sur 1 ou 2 lignes ; coupe à 2 lignes avec « … » si plus long. */
    min-height: 3em;
}

.properties-page .card-text {
    margin: 8px 0 0;
    font-size: 15px;
    line-height: 1.85;
    color: #64748b;
}

.properties-page .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: var(--properties-muted);
    font-size: 14px;
}

.properties-page .price {
    font-weight: 900;
    color: #0f172a;
}

/* =========================
   CARD BADGES — OVERLAY SUR IMAGE
========================= */
/* Groupe empilé (action + type) en haut à droite, comme l'index */
.properties-page .card-badges {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.properties-page .card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    white-space: nowrap;
}

/* Badge type de bien — pastille sombre translucide (identique à .lcard-type de l'index) */
.properties-page .card-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    white-space: nowrap;
}

.properties-page .card-badge::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    flex-shrink: 0;
}

.properties-page .card-badge--rent {
    background: linear-gradient(135deg, rgba(10, 94, 86, 0.93) 0%, rgba(14, 152, 130, 0.89) 100%);
    color: #ffffff;
}

.properties-page .card-badge--sale {
    background: linear-gradient(135deg, rgba(28, 72, 176, 0.93) 0%, rgba(45, 112, 230, 0.89) 100%);
    color: #ffffff;
}

/* =========================
   CARD TAGS — TYPE + VILLE
========================= */
/* =========================
   CARD FOOTER — PRIX + META
========================= */
.properties-page .card-footer {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.07);
}

/* ✦ Signature VECTRA : petit accent teal sur le séparateur, au-dessus du prix,
   qui se déploie sur toute la largeur au survol de la carte. */
.properties-page .card-footer::before {
    content: "";
    position: absolute;
    top: -1px;
    inset-inline-start: 0;
    width: 34px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #0f766e, #14b8a6);
    transition: width 0.34s cubic-bezier(0.4, 0, 0.2, 1);
}

.properties-page .card:hover .card-footer::before {
    width: 100%;
}

.properties-page .card-price {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 20px;
    font-weight: 900;
    color: var(--properties-primary);
    letter-spacing: -0.01em;
    width: fit-content;
}

.properties-page .card-meta {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;             /* passe proprement sur 2 lignes si besoin (puces entières) */
    align-items: center;
    gap: 6px 16px;
    /* Réserve ~2 lignes → cartes alignées même si l'une a 1 ligne et l'autre 2. */
    min-height: 40px;
}

/* Specs allégées : icône + texte gris, sans encadré (look épuré type portail) */
.properties-page .card-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #5a6a80;
    white-space: nowrap;        /* chaque puce reste entière (plus de « salles de / bain ») */
}

.properties-page .card-meta-item svg {
    flex-shrink: 0;
    opacity: 0.6;
    color: var(--properties-primary);
}

.properties-page .card-meta-sep { display: none; }

/* CTA button at bottom of card */
/* Badge « Nouveau » — annonces de moins de 7 jours, pulse doux */
.properties-page .card-new-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #fff;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.96), rgba(234, 88, 12, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.30);
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.38);
    white-space: nowrap;
    animation: cardNewPulse 2s ease-in-out infinite;
}

.properties-page .card-new-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    animation: cardNewDot 2s ease-in-out infinite;
}

@keyframes cardNewPulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(234, 88, 12, 0.38); }
    50%      { box-shadow: 0 4px 22px rgba(234, 88, 12, 0.62); }
}

@keyframes cardNewDot {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(1.35); }
}

@media (prefers-reduced-motion: reduce) {
    .properties-page .card-new-badge,
    .properties-page .card-new-badge::before { animation: none; }
}

/* CTA « Voir les détails » — révélé en glissant depuis le bas de l'image au survol */
.properties-page .card-cta-reveal {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--properties-primary) 0%, var(--properties-primary-2) 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(13, 148, 136, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transform: translateY(140%);
    transition: opacity 0.28s ease, transform 0.38s cubic-bezier(0.22, 0.61, 0.36, 1);
    pointer-events: none;
}

.properties-page .card:hover .card-cta-reveal {
    opacity: 1;
    transform: translateY(0);
}

.properties-page .card-cta-reveal svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Appareils tactiles (pas de survol) : CTA affiché en permanence */
@media (hover: none) {
    .properties-page .card-cta-reveal {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .properties-page .card-cta-reveal { transition: opacity 0.2s ease; transform: none; }
}

/* Favorite button overlay */
.properties-page .card-fav {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.60);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #cbd5e1;
    cursor: pointer;
    transition: color 0.18s ease, transform 0.18s ease, background 0.18s ease;
    text-decoration: none;
}

.properties-page .card-fav:hover {
    color: #ef4444;
    transform: scale(1.12);
    background: rgba(255, 255, 255, 0.96);
}

.properties-page .card-fav svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: fill 0.18s ease, stroke 0.18s ease;
}

/* Favori actif : cœur rempli en rouge */
.properties-page .card-fav.is-fav {
    color: #ef4444;
    background: rgba(255, 255, 255, 0.96);
}

.properties-page .card-fav.is-fav svg {
    fill: #ef4444;
    stroke: #ef4444;
}

/* Animation « pop » à l'ajout */
.properties-page .card-fav.just-faved {
    animation: favPop 0.36s ease;
}

@keyframes favPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.35); }
    70%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .properties-page .card-fav.just-faved { animation: none; }
}

/* Legacy pill classes — kept for backward compat */
.properties-page .pill-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 6px;
}

.properties-page .pill-row .pill-strong { flex-shrink: 0; }

.properties-page .pill-row .pill,
.properties-page .pill-soft,
.properties-page .pill-strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(148, 163, 184, 0.24);
    white-space: nowrap;
}

.properties-page .pill-row .pill {
    background: rgba(255, 255, 255, 0.82);
    color: #334155;
}

.properties-page .pill-soft {
    background: rgba(255, 255, 255, 0.82);
    color: #475569;
}

.properties-page .pill-strong {
    background: rgba(15, 118, 110, 0.10);
    color: #0f766e;
}

/* =========================
   FOOTER PREMIUM
========================= */
.properties-page .footer {
    margin-top: 38px;
    padding: 0 0 18px;
    background: transparent;
}

.properties-page .footer .foot {
    width: min(1380px, 100%);
    margin: 0 auto;
    padding: 26px 32px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(248, 250, 252, 0.88));
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow:
        0 16px 40px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.properties-page .properties-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    flex-wrap: wrap;
}

.properties-page .properties-footer-brand {
    min-width: 0;
    flex: 1 1 auto;
}

.properties-page .properties-footer-brand b {
    display: block;
    margin-bottom: 6px;
    color: #0f172a;
    font-size: 18px;
    font-weight: 900;
}

.properties-page .properties-footer-brand .muted {
    margin: 0;
}

.properties-page .properties-footer-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    flex: 0 1 auto;
}

.properties-page .properties-copy {
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
    white-space: nowrap;
}

.properties-page .footer-socials {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.properties-page .footer-socials a {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    color: #0f172a;
    text-decoration: none;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease,
        color 0.18s ease;
}

.properties-page .footer-socials a:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.14);
}

.properties-page .footer-socials a[aria-label="تيك توك"] {
    color: #111111;
    background: #ffffff;
}

.properties-page .footer-socials a[aria-label="تيك توك"]:hover {
    background: #111111;
    color: #ffffff;
}

.properties-page .footer-socials a[aria-label="إنستغرام"] {
    color: #E4405F;
    background: #ffffff;
}

.properties-page .footer-socials a[aria-label="إنستغرام"]:hover {
    color: #ffffff;
    background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af, #515bd4);
}

.properties-page .footer-socials a[aria-label="فيسبوك"] {
    color: #1877F2;
    background: #ffffff;
}

.properties-page .footer-socials a[aria-label="فيسبوك"]:hover {
    background: #1877F2;
    color: #ffffff;
}

/* =========================
   WHATSAPP FLOAT
========================= */
.properties-page .whatsapp-float {
    position: fixed;
    left: max(18px, env(safe-area-inset-left));
    right: auto;
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 9999;
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background:
        radial-gradient(circle at center, #25d366 0 58%, rgba(255, 255, 255, 0.30) 59% 100%);
    color: #ffffff;
    text-decoration: none;
    box-shadow:
        0 18px 40px rgba(37, 211, 102, 0.28),
        0 0 0 10px rgba(37, 211, 102, 0.14);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.properties-page .whatsapp-float:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow:
        0 22px 46px rgba(37, 211, 102, 0.34),
        0 0 0 12px rgba(37, 211, 102, 0.18);
    filter: saturate(1.04);
}

.properties-page .whatsapp-float:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 5px rgba(37, 211, 102, 0.20),
        0 18px 40px rgba(37, 211, 102, 0.34);
}

.properties-page .whatsapp-float svg {
    width: 30px;
    height: 30px;
    display: block;
    flex: 0 0 auto;
}

/* =========================
   OPTIONAL FORM STYLE
========================= */
.properties-page .form {
    max-width: 520px;
    padding: 14px;
    border: 1px solid var(--properties-line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.55);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1280px) {
    .properties-page .filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .properties-page .filters-reset-btn,
    .properties-page #btnReset {
        grid-column: 1 / -1;
    }

    .properties-page .properties-grid,
    .properties-page #grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .properties-page .filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .properties-page .filters-reset-btn,
    .properties-page #btnReset {
        grid-column: 1 / -1;
    }
}

/* Grille : 2 colonnes jusqu'à 1024 (iPad Pro), 1 colonne ≤820 (iPad Mini + téléphones) */
@media (max-width: 820px) {
    .properties-page .properties-grid,
    .properties-page #grid {
        grid-template-columns: 1fr;
    }
}

/* ── Bouton « retour en haut » (desktop, apparaît au scroll) ── */
.scroll-top {
    position: fixed;
    inset-inline-end: 24px;
    bottom: 24px;
    z-index: 980;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #0f172a;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.30);
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.18s ease;
}

.scroll-top.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.scroll-top:hover {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(13, 148, 136, 0.40);
}

.scroll-top svg { width: 20px; height: 20px; }

/* Mobile : on garde le FAB filtre, pas le retour-en-haut */
@media (max-width: 1024px) {
    .scroll-top { display: none; }
}

@media (max-width: 1024px) {
    .properties-page .page {
        padding-top: 94px;
        padding-bottom: 74px;
        padding-inline: 16px;
    }

    .properties-page h1 {
        font-size: clamp(28px, 9vw, 44px);
    }

    .properties-page .page>.pill {
        margin: 0 auto 16px;
    }

    .properties-page .page>.muted {
        margin-bottom: 18px;
        font-size: 14px;
    }

    /* Simplicité mobile : on masque le titre verbeux (hero badges masqués plus bas,
       après leur règle de base — sinon la cascade le ré-affiche) */
    .properties-page .prop-filters-title { display: none; }

    /* Bouton « Filtres » — clair et évident (façon Yakeey) */
    .properties-page .filters-mobile-trigger {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        width: 100%;
        margin: 0 0 16px;
        padding: 13px 18px;
        border-radius: 16px;
        border: 1px solid rgba(13, 148, 136, 0.25);
        background: linear-gradient(135deg, var(--properties-primary), var(--properties-primary-2));
        color: #fff;
        font: inherit;
        font-size: 15px;
        font-weight: 800;
        cursor: pointer;
        box-shadow: var(--properties-shadow-btn);
        -webkit-tap-highlight-color: transparent;
    }

    .properties-page .filters-mobile-trigger .fmt-icon {
        display: inline-flex;
        align-items: center;
    }

    .properties-page .filters-mobile-trigger .fmt-icon svg {
        width: 20px;
        height: 20px;
    }

    .properties-page .filters-mobile-trigger .fmt-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 22px;
        height: 22px;
        padding: 0 6px;
        margin-inline-start: auto;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.92);
        color: var(--properties-primary);
        font-size: 12px;
        font-weight: 900;
    }

    .properties-page .filters-mobile-trigger .fmt-count[hidden] { display: none; }

    /* Voile sombre derrière le sheet */
    .properties-page .filters-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1099;
        background: rgba(10, 18, 40, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .properties-page .filters-backdrop.is-open {
        opacity: 1;
        visibility: visible;
    }

    /* Bottom sheet : un SEUL conteneur scrollable (robuste sur iOS Safari) */
    .properties-page .filters {
        position: fixed;
        inset: auto 0 0 0;
        z-index: 1100;
        width: 100%;
        max-height: 86vh;
        max-height: 86dvh;   /* dynamic viewport : ignore la barre d'adresse mobile */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: flex;
        flex-direction: column;
        align-items: stretch;   /* annule le `align-items:end` de la grille desktop */
        gap: 14px;
        margin: 0;
        padding: 0 16px calc(20px + env(safe-area-inset-bottom, 0px));
        background: #ffffff;
        border: none;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -10px 40px rgba(10, 18, 40, 0.22);
        transform: translateY(100%);
        visibility: hidden;
        transition: transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0.34s ease;
    }

    /* Le wrapper s'efface : ses champs deviennent enfants directs du sheet */
    .properties-page .filters-scroll { display: contents; }

    .properties-page .filters.filters--open {
        transform: translateY(0);
        visibility: visible;
    }

    /* En-tête collant : reste visible en haut pendant le défilement */
    .properties-page .filters-sheet-head {
        display: flex;
        align-items: center;
        justify-content: center;
        position: sticky;
        top: 0;
        z-index: 2;
        flex-shrink: 0;
        margin: 0 -16px 0;          /* bleed pleine largeur (le sheet a 16px de padding) */
        padding: 16px 16px 12px;
        background: #ffffff;
        border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    }

    .properties-page .fsh-grab {
        position: absolute;
        top: 7px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        border-radius: 999px;
        background: rgba(15, 23, 42, 0.18);
    }

    .properties-page .fsh-title {
        flex: 1;
        text-align: center;
        font-size: 16px;
        font-weight: 900;
        color: var(--properties-title);
    }

    .properties-page .fsh-close {
        position: absolute;
        inset-inline-end: 4px;
        top: 50%;
        transform: translateY(-50%);
        width: 34px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: none;
        border-radius: 50%;
        background: rgba(15, 23, 42, 0.06);
        color: #334155;
        cursor: pointer;
    }

    .properties-page .fsh-close svg { width: 18px; height: 18px; }

    /* Bouton « Voir les résultats » : footer fixe en bas du sheet (hors zone défilante) */
    .properties-page .filters-apply-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 100%;
        margin: 2px 0 0;
        padding: 15px 20px;
        border: none;
        border-radius: 16px;
        background: linear-gradient(135deg, var(--properties-primary), var(--properties-primary-2));
        color: #fff;
        font: inherit;
        font-size: 16px;
        font-weight: 900;
        cursor: pointer;
        box-shadow: var(--properties-shadow-btn);
    }

    /* Blocage du scroll de fond quand le sheet est ouvert : on fige le body
       (position fixed + top piloté par le JS) pour que le viewport ne bouge plus
       → le sheet fixed reste parfaitement aligné, quel que soit le sens du scroll */
    body.filters-sheet-open {
        position: fixed;
        inset-inline: 0;
        width: 100%;
        overflow: hidden;
    }

    /* iOS : police ≥16px sur les champs → empêche le zoom automatique de Safari
       au focus (qui, avec le body figé, donnait un rendu bancal) */
    .properties-page .field input,
    .properties-page .field select,
    .properties-page .field textarea,
    .properties-page .results-sort select {
        font-size: 16px;
    }

    /* Bouton filtres flottant (apparaît au scroll, .is-visible via JS) */
    .filters-fab {
        position: fixed;
        inset-block-end: calc(20px + env(safe-area-inset-bottom, 0px));
        inset-inline-end: 16px;
        z-index: 1090;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 12px 18px;
        border: none;
        border-radius: 999px;
        background: linear-gradient(135deg, var(--properties-primary), var(--properties-primary-2));
        color: #fff;
        font: inherit;
        font-size: 14px;
        font-weight: 800;
        cursor: pointer;
        box-shadow: 0 12px 32px rgba(13, 148, 136, 0.45);
        opacity: 0;
        transform: translateY(20px) scale(0.92);
        pointer-events: none;
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    .filters-fab.is-visible {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .filters-fab .fab-icon { display: inline-flex; align-items: center; }
    .filters-fab .fab-icon svg { width: 18px; height: 18px; }

    .filters-fab .fab-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.92);
        color: var(--properties-primary);
        font-size: 12px;
        font-weight: 900;
    }

    .filters-fab .fab-count[hidden] { display: none; }

    .properties-page .field label {
        font-size: 13px;
    }

    .properties-page .field input,
    .properties-page .field select,
    .properties-page .field textarea,
    .properties-page .filters-reset-btn,
    .properties-page #btnReset {
        min-height: 50px;
        border-radius: 16px;
        font-size: 14px;
    }

    .properties-page .notice {
        padding: 16px;
        border-radius: 18px;
        margin-bottom: 22px;
        font-size: 14px;
    }

    .properties-page .row-between.results-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .properties-page .properties-grid,
    .properties-page #grid {
        gap: 18px;
    }

    .properties-page .card {
        border-radius: 24px;
    }

    .properties-page .card-media,
    .properties-page .thumb {
        min-height: 230px;
    }

    .properties-page .card-title,
    .properties-page .title {
        font-size: 14px;
    }

    .properties-page .card-body,
    .properties-page .body {
        padding: 16px 16px 18px;
    }

    .properties-page .footer {
        margin-top: 28px;
    }

    .properties-page .footer .foot {
        padding: 20px 18px;
        border-radius: 22px;
    }

    .properties-page .properties-foot {
        flex-direction: column;
        align-items: flex-start;
    }

    .properties-page .properties-footer-meta {
        width: 100%;
        align-items: flex-start;
    }

    .properties-page .whatsapp-float {
        left: max(14px, env(safe-area-inset-left));
        bottom: max(14px, env(safe-area-inset-bottom));
        width: 68px;
        height: 68px;
    }

    .properties-page .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 560px) {
    .properties-page .page {
        padding-top: 88px;
        padding-bottom: 66px;
        padding-inline: 14px;
        text-align: center;
    }

    .properties-page .pill {
        padding: 10px 18px;
        font-size: 12px;
        margin-bottom: 14px;
    }

    .properties-page .page>.pill {
        display: flex;
        width: fit-content;
        max-width: 100%;
        margin: 0 auto 16px;
        text-align: center;
        box-shadow:
            0 10px 24px rgba(5, 150, 105, 0.28),
            0 0 0 3px rgba(5, 150, 105, 0.10),
            inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }

    .properties-page h1 {
        font-size: 26px;
        line-height: 1.14;
        margin-bottom: 8px;
    }

    .properties-page .h2 {
        font-size: 22px;
    }

    .properties-page .muted {
        font-size: 14px;
        line-height: 1.75;
    }

    .properties-page .page>h1,
    .properties-page .page>.muted {
        text-align: center;
    }

    /* (.filters est un bottom sheet sur mobile — voir le bloc 820px) */
    .properties-page .filters { gap: 12px; }

    .properties-page .field input,
    .properties-page .field select,
    .properties-page .field textarea,
    .properties-page .filters-reset-btn,
    .properties-page #btnReset {
        min-height: 48px;
        padding: 12px 14px;
        border-radius: 15px;
    }

    .properties-page .notice {
        padding: 14px;
        border-radius: 16px;
        margin-bottom: 18px;
        font-size: 14px;
        text-align: start;
    }

    .properties-page .properties-grid,
    .properties-page #grid {
        gap: 16px;
    }

    .properties-page .card {
        border-radius: 22px;
    }

    .properties-page .card-media,
    .properties-page .thumb {
        min-height: 210px;
        aspect-ratio: 4 / 3;
    }

    .properties-page .card-body,
    .properties-page .body {
        padding: 14px 14px 16px;
    }

    .properties-page .card-title,
    .properties-page .title {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .properties-page .card-text {
        font-size: 14px;
        line-height: 1.75;
    }

    .properties-page .pill-row {
        gap: 6px;
        margin-top: 8px;
    }

    .properties-page .pill-row .pill,
    .properties-page .pill-soft,
    .properties-page .pill-strong {
        min-height: 31px;
        padding: 5px 12px;
        font-size: 12px;
    }

    .properties-page .card-badges {
        top: 10px;
        right: 10px;
        gap: 5px;
    }

    .properties-page .card-badge {
        padding: 5px 11px;
        font-size: 11px;
    }

    .properties-page .card-type-badge {
        padding: 4px 10px;
        font-size: 10px;
    }

    .properties-page .card-price {
        font-size: 17px;
    }

    .properties-page .card-cta-reveal {
        font-size: 12px;
        padding: 10px 14px;
        border-radius: 12px;
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .properties-page .card-fav {
        width: 30px;
        height: 30px;
        top: 10px;
        left: 10px;
    }

    .properties-page .card-meta-item {
        font-size: 11px;
    }

    .properties-page .footer {
        margin-top: 24px;
        padding-bottom: 14px;
    }

    .properties-page .footer .foot {
        padding: 16px 14px;
        border-radius: 18px;
    }

    .properties-page .properties-foot {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .properties-page .properties-footer-brand {
        flex: unset;
        width: 100%;
        min-width: 0;
    }

    .properties-page .properties-footer-brand b {
        font-size: 16px;
    }

    .properties-page .properties-footer-brand .muted {
        margin: 4px 0 0;
    }

    .properties-page .properties-footer-meta {
        width: 100%;
        gap: 8px;
        align-items: center;
        justify-content: center;
    }

    .properties-page .properties-copy {
        width: 100%;
        text-align: center;
        font-size: 13px;
        line-height: 1.5;
        white-space: normal;
        margin: 0;
    }

    .properties-page .footer-socials {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }

    .properties-page .footer-socials a {
        width: 36px;
        height: 36px;
    }

    .properties-page .whatsapp-float {
        left: max(12px, env(safe-area-inset-left));
        bottom: max(12px, env(safe-area-inset-bottom));
        width: 64px;
        height: 64px;
        box-shadow:
            0 16px 36px rgba(37, 211, 102, 0.26),
            0 0 0 8px rgba(37, 211, 102, 0.14);
    }

    .properties-page .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}

/* =========================
   REDUCED MOTION
========================= */
@media (prefers-reduced-motion: reduce) {

    .properties-page .card,
    .properties-page .card-media img,
    .properties-page .thumb img,
    .properties-page .filters-reset-btn,
    .properties-page #btnReset,
    .properties-page .whatsapp-float,
    .properties-page .field input,
    .properties-page .field select,
    .properties-page .field textarea,
    .properties-page .footer-socials a,
    .properties-page .pill {
        transition: none !important;
    }
}

/* =========================
   HERO BADGES
========================= */
.properties-page .prop-hero-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0 26px;
}

.properties-page .prop-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 18px 10px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.84);
    box-shadow: var(--properties-shadow-soft);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.properties-page .phb-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.properties-page .phb-icon svg {
    width: 14px;
    height: 14px;
}

.properties-page .phb-teal {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(20, 184, 166, 0.18));
    color: #0f766e;
}

.properties-page .phb-blue {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.10), rgba(20, 184, 166, 0.16));
    color: #0f766e;
}

.properties-page .phb-green {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.12), rgba(16, 185, 129, 0.18));
    color: #059669;
}

.properties-page .phb-amber {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.12), rgba(245, 158, 11, 0.18));
    color: #d97706;
}

/* =========================
   FILTER LABEL ICONS
========================= */
.properties-page .field label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.properties-page .field-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--properties-primary);
}

.properties-page .field-icon svg {
    width: 14px;
    height: 14px;
}

/* Reset button with icon */
.properties-page .filters-reset-btn,
.properties-page #btnReset {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.properties-page #btnReset svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

/* =========================
   NOTICE — with icon
========================= */
.properties-page .notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.properties-page .notice-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.10), rgba(20, 184, 166, 0.16));
    color: var(--properties-primary);
    flex: 0 0 auto;
    margin-top: 1px;
}

.properties-page .notice-icon svg {
    width: 18px;
    height: 18px;
}

/* =========================
   RESULTS HEAD — kicker
========================= */
.properties-page .results-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.properties-page .results-head-right {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.properties-page .results-head-right .h2 {
    text-decoration: underline;
    text-decoration-color: #0f766e;
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
}

.properties-page .results-kicker {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: var(--properties-primary);
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(20, 184, 166, 0.14));
    border: 1px solid rgba(15, 118, 110, 0.12);
    width: fit-content;
}

.properties-page .results-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 5px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    color: #475569;
    background: rgba(255, 255, 255, 0.80);
    border: 1px solid rgba(255, 255, 255, 0.86);
    box-shadow: var(--properties-shadow-soft);
    white-space: nowrap;
}

/* ── Tri des résultats ── */
.properties-page .results-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.properties-page .results-sort {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.properties-page .results-sort__icon {
    position: absolute;
    inset-inline-start: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    color: var(--properties-primary);
    pointer-events: none;
}

.properties-page .results-sort__icon svg { width: 16px; height: 16px; }

.properties-page .results-sort select {
    min-height: 36px;
    padding-block: 6px;
    padding-inline-start: 36px;
    padding-inline-end: 14px;
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.22);
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--properties-shadow-soft);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.properties-page .results-sort select:hover,
.properties-page .results-sort select:focus {
    border-color: rgba(15, 118, 110, 0.45);
    outline: none;
}

/* ── Tri en dropdown custom (pill + icône de tête) ── */
.properties-page .results-sort {
    z-index: 20;                 /* le panneau passe au-dessus des cartes */
    --hs-btn-h: 36px;
    --hs-btn-radius: 999px;
    --hs-btn-bg: #fff;
    --hs-btn-border: rgba(15, 118, 110, .22);
    --hs-btn-shadow: var(--properties-shadow-soft);
    --hs-accent: rgba(15, 118, 110, .45);
}
.properties-page .results-sort .hs-combo__btn {
    width: auto;
    min-width: 168px;
    padding-inline-start: 36px;  /* dégage l'icône de tri (absolue) */
    font-size: 13px;
    font-weight: 800;
    color: #334155;
}
/* L'icône de tri (absolue) doit rester visible par-dessus le bouton custom */
.properties-page .results-sort__icon { z-index: 1; }

/* ── Chips de filtres actifs ── */
.properties-page .active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
}

/* display:flex écraserait l'attribut [hidden] → on le rétablit explicitement */
.properties-page .active-filters[hidden] { display: none; }

.properties-page .af-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.22);
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.07), rgba(20, 184, 166, 0.12));
    color: var(--properties-primary);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.properties-page .af-chip:hover {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.13), rgba(20, 184, 166, 0.20));
    border-color: rgba(15, 118, 110, 0.42);
}

.properties-page .af-chip:active { transform: scale(0.96); }

.properties-page .af-chip svg { width: 13px; height: 13px; opacity: 0.8; }

.properties-page .af-clear {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: none;
    background: none;
    color: #64748b;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.16s ease;
}

.properties-page .af-clear:hover { color: #dc2626; }

/* =========================
   EMPTY STATE
========================= */
.properties-page .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 64px 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: var(--properties-shadow-soft);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.properties-page .empty-state[hidden] {
    display: none;
}

.properties-page .empty-state-icon {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(20, 184, 166, 0.14));
    color: var(--properties-primary);
    margin-bottom: 20px;
}

.properties-page .empty-state-icon svg {
    width: 36px;
    height: 36px;
}

.properties-page .empty-state h3 {
    font-size: 22px;
    font-weight: 900;
    color: var(--properties-title);
    margin: 0 0 10px;
}

.properties-page .empty-state p {
    color: var(--properties-muted);
    font-size: 15px;
    line-height: 1.75;
    max-width: 420px;
    margin: 0 0 28px;
}

.properties-page .empty-state-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 28px;
    border-radius: 999px;
    border: none;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(135deg, var(--properties-primary) 0%, var(--properties-primary-2) 100%);
    box-shadow: var(--properties-shadow-btn);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.properties-page .empty-state-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(15, 118, 110, 0.30);
}

/* =========================
   GRID ERROR STATE (réseau / Supabase indisponible)
========================= */
.properties-page .grid-error-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 64px 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: var(--properties-shadow-soft);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.properties-page .grid-error-state__icon {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.10), rgba(248, 113, 113, 0.18));
    color: #dc2626;
    margin-bottom: 20px;
}

.properties-page .grid-error-state__icon svg {
    width: 36px;
    height: 36px;
}

.properties-page .grid-error-state h3 {
    font-size: 22px;
    font-weight: 900;
    color: var(--properties-title);
    margin: 0 0 10px;
}

.properties-page .grid-error-state p {
    color: var(--properties-muted);
    font-size: 15px;
    line-height: 1.75;
    max-width: 420px;
    margin: 0 0 28px;
}

.properties-page .grid-error-state__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 28px;
    border-radius: 999px;
    border: none;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(135deg, var(--properties-primary) 0%, var(--properties-primary-2) 100%);
    box-shadow: var(--properties-shadow-btn);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.properties-page .grid-error-state__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(15, 118, 110, 0.30);
}

.properties-page .grid-error-state__btn svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 560px) {
    .properties-page .grid-error-state {
        padding: 48px 20px;
        border-radius: 22px;
    }

    .properties-page .grid-error-state__icon {
        width: 60px;
        height: 60px;
        border-radius: 20px;
    }

    .properties-page .grid-error-state__icon svg {
        width: 28px;
        height: 28px;
    }

    .properties-page .grid-error-state h3 {
        font-size: 19px;
    }

    .properties-page .grid-error-state p {
        font-size: 14px;
    }
}

/* =========================
   PAGINATION
========================= */
.properties-page .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 36px;
    flex-wrap: wrap;
    direction: ltr;
}

.properties-page .pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 10px;
    border-radius: 13px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.76);
    color: #334155;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--properties-shadow-soft);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.16s ease, box-shadow 0.16s ease,
                background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.properties-page .pg-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(20, 184, 166, 0.30);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
    color: var(--properties-primary);
}

.properties-page .pg-btn.pg-active {
    background: linear-gradient(135deg, var(--properties-primary) 0%, var(--properties-primary-2) 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 10px 26px rgba(15, 118, 110, 0.28);
    cursor: default;
    transform: none;
}

.properties-page .pg-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    transform: none;
}

.properties-page .pg-prev,
.properties-page .pg-next {
    min-width: 42px;
    padding: 0;
}

.properties-page .pg-prev svg,
.properties-page .pg-next svg {
    width: 16px;
    height: 16px;
    display: block;
    flex: 0 0 auto;
}

.properties-page .pg-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 42px;
    color: #94a3b8;
    font-size: 15px;
    font-weight: 700;
    user-select: none;
}

/* Bouton « Voir plus » — pagination mobile (rendu uniquement sur mobile) */
.properties-page .load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 380px;
    margin: 4px auto 0;
    padding: 15px 24px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--properties-primary), var(--properties-primary-2));
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--properties-shadow-btn);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.properties-page .load-more-btn:active {
    transform: translateY(1px);
}

.properties-page .load-more-count {
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 12.5px;
    font-weight: 800;
}

/* =========================
   RESPONSIVE — new elements
========================= */
@media (max-width: 1024px) {
    /* Masqués sur mobile (placé APRÈS leurs règles de base pour gagner la
       cascade — la media query n'ajoute pas de spécificité) */
    .properties-page .prop-hero-badges { display: none; }
    .properties-page .notice { display: none; }

    .properties-page .results-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .properties-page .results-head-actions {
        width: 100%;
        justify-content: space-between;
    }

    .properties-page .empty-state {
        padding: 48px 20px;
        border-radius: 22px;
    }
}

@media (max-width: 560px) {
    .properties-page .pagination {
        gap: 5px;
        margin-top: 28px;
    }

    .properties-page .pg-btn {
        min-width: 38px;
        height: 38px;
        border-radius: 11px;
        font-size: 13px;
    }

    .properties-page .prop-hero-badges {
        margin: 12px 0 18px;
        gap: 7px;
        flex-direction: column;
        align-items: stretch;
    }

    .properties-page .prop-hero-badge {
        font-size: 12px;
        padding: 8px 12px 8px 8px;
        width: 100%;
        justify-content: flex-start;
    }

    .properties-page .phb-icon {
        width: 24px;
        height: 24px;
        min-width: 24px;
        border-radius: 8px;
    }

    .properties-page .prop-filters-title {
        align-items: flex-start;
        gap: 9px;
    }

    .properties-page .prop-filters-title .pft-icon {
        width: 30px;
        height: 30px;
        min-width: 30px;
        margin-top: 1px;
    }

    .properties-page .notice {
        gap: 10px;
    }

    .properties-page .notice-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        border-radius: 10px;
    }

    .properties-page .empty-state {
        padding: 40px 16px;
        border-radius: 20px;
    }

    .properties-page .empty-state-icon {
        width: 60px;
        height: 60px;
        border-radius: 20px;
    }

    .properties-page .empty-state-icon svg {
        width: 28px;
        height: 28px;
    }

    .properties-page .empty-state h3 {
        font-size: 19px;
    }

    .properties-page .empty-state p {
        font-size: 14px;
    }
}

.pill {
    direction: ltr;
    unicode-bidi: isolate;
}

.properties-page .surface-pill {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}