/* Cartes de propriétés - 4 colonnes max sur desktop */
.search-property-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    max-width: 100%;
}

@media (min-width: 768px) {
    .search-property-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    }
}

@media (min-width: 1024px) {
    .search-property-grid {
        grid-template-columns: repeat(4, 1fr) !important; /* 4 colonnes max sur desktop */
        gap: 1.5rem !important;
    }
}

.search-property-card {
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

.search-property-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

.search-property-image {
    width: 100% !important;
    height: 240px !important;
    object-fit: cover !important;
    transition: transform 0.3s ease !important;
}

@media (min-width: 768px) {
    .search-property-image {
        height: 260px !important;
    }
}

@media (min-width: 1024px) {
    .search-property-image {
        height: 280px !important; /* Images plus grandes avec l'espace libéré */
    }
}

.search-property-card:hover .search-property-image {
    transform: scale(1.05);
}

/* Faire en sorte que la div cliquable prenne toute la taille de la carte */
.search-property-card {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100% !important;
}

.search-property-card > div[onclick*="window.location.href"],
.search-property-card > div[onclick*="window.location"] {
    width: 100% !important;
    height: 100% !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    position: relative !important;
}

/* Corps de la carte : flex pour aligner le bouton en bas */
.search-property-card .property-body {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
}

/* Bouton Contacter / Créer un compte toujours en bas de la carte */
.search-property-card .property-body > div:last-child {
    margin-top: auto !important;
}

/* Titre : taille réduite + hauteur fixe (toujours 2 lignes réservées, annonce courte ou longue)
   pour que localisation, prix et specs démarrent au même niveau sur toutes les cartes (réf. annonce #68) */
.search-property-card .property-title {
    font-size: 0.95rem !important;
    line-height: 1.3 !important;
    min-height: 2.6em !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.search-property-card .property-location {
    font-size: 0.8rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-property-card .property-price {
    font-size: 1.15rem !important;
}

.search-property-card .property-price-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.4rem !important;
}

.search-property-card .property-price-row .property-price {
    margin: 0 !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.search-property-card .property-price-row .badge {
    font-size: 0.65rem !important;
    padding: 0.2rem 0.45rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* Specs + signaler + badges : une seule ligne compacte, hauteur identique sur toutes les cartes */
.search-property-card .property-details {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.4rem;
    overflow: hidden;
}

.search-property-card .property-specs {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

.search-property-card .property-spec-line {
    font-size: 0.75rem;
    color: #374151;
    font-weight: 500;
    white-space: nowrap;
}

/* Badges (Vente/Location + Meublé) côte à côte */
.search-property-card .property-badges-row {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.3rem;
    flex-shrink: 0;
}

.search-property-card .property-badges-row .badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.45rem;
    white-space: nowrap;
}

/* Badge Meublé pour les locations immobilier */
.search-property-card .badge-furnished {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    background: #E8F5E9;
    color: #117333;
    white-space: nowrap;
}
