/* Styles pour les cartes compactes des biens */
.sg-property-card-compact {
    background: white !important;
    border-radius: 12px !important;
    border: 2px solid #e9ecef !important;
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    height: 300px !important; /* Hauteur augmentée pour éviter les coupures */
    display: flex !important;
    flex-direction: column !important;
}

.sg-property-card-compact:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--sg-blue) !important;
}

.sg-property-image-container {
    position: relative;
    height: 220px; /* Hauteur d'image augmentée */
    overflow: hidden;
}

.sg-property-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sg-property-card-compact:hover .sg-property-img {
    transform: scale(1.05);
}

.sg-property-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.85) 100%) !important;
    color: white !important;
    padding: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    opacity: 1 !important;
    transition: all 0.3s ease !important;
}

.sg-property-card-compact:hover .sg-property-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.9) 100%) !important;
}

.sg-property-type {
    background: rgba(33, 75, 117, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sg-property-description {
    color: white !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    margin: 10px 0 !important;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.9) !important;
    background: rgba(0,0,0,0.6) !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    backdrop-filter: blur(4px) !important;
    font-weight: 500 !important;
    /* Show on hover only */
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease !important;
    /* Center in overlay */
    align-self: center !important;
    text-align: center !important;
    max-width: 90% !important;
}

.sg-property-card-compact:hover .sg-property-description {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
}

.sg-property-price {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-weight: bold !important;
    font-size: 1rem !important;
    align-self: flex-end !important;
    box-shadow: 0 3px 15px rgba(220, 53, 69, 0.5) !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5) !important;
}

.sg-property-compact-info {
    padding: 12px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 80px;
}

.sg-property-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--sg-blue-dark);
    margin: 0 0 6px 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sg-property-actions-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

.sg-btn-compact {
    padding: 5px 8px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.sg-btn-details {
    background: linear-gradient(135deg, var(--sg-blue), var(--sg-blue-dark));
    color: white;
    border: none;
}

.sg-btn-details:hover {
    background: linear-gradient(135deg, var(--sg-blue-dark), var(--sg-blue-darker));
    color: white;
    transform: translateY(-2px);
}

.sg-btn-phone {
    background: linear-gradient(135deg, var(--sg-success), #20c997);
    color: white;
    border: none;
}

.sg-btn-phone:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    color: white;
    transform: translateY(-2px);
}

.sg-property-location {
    color: var(--sg-gray-500);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.sg-property-location i {
    color: var(--sg-red);
}

/* Responsive */
@media (max-width: 768px) {
    .sg-property-card-compact {
        height: auto;
        min-height: 260px;
    }
    
    .sg-property-image-container {
        height: 180px;
    }
    
    .sg-property-actions-inline {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .sg-btn-compact {
        justify-content: center;
        width: 100%;
    }
    
    .sg-property-location {
        margin-left: 0;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .sg-property-card-compact {
        margin-bottom: 20px;
    }
    
    .sg-property-overlay {
        padding: 12px;
    }
    
    .sg-property-description {
        font-size: 0.8rem;
    }
    
    .sg-property-price {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}
