/* =========================================
   STYLE IMMOFACILE SYNC V26.0 (Left Align & DPE Fix)
   ========================================= */

/* --- GRILLE --- */
.immo-listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* --- CARTE DESIGN --- */
.immo-card {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden; 
    height: 400px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
    cursor: pointer;
}
.immo-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Lien global cliquable */
.immo-card-link-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
}

/* --- IMAGE DE FOND --- */
.immo-card-image-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    transition: transform 0.5s ease;
}
.immo-card:hover .immo-card-image-bg {
    transform: scale(1.05);
}

/* --- BADGES --- */
.immo-badge-sign, .immo-badge-exclu {
    position: absolute; top: 15px; right: 15px; z-index: 5;
    padding: 6px 12px; font-weight: bold; text-transform: uppercase;
    font-family: var(--immo-title-font); font-size: 0.8em; letter-spacing: 1px;
    border-radius: 2px;
}
.immo-badge-sign {
    background: var(--immo-sign-bg); color: var(--immo-sign-col);
    border: 1px solid var(--immo-sign-col);
    font-family: var(--immo-sign-font);
}
.immo-badge-exclu {
    background: var(--immo-exclu-bg); color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* --- PANNEAU D'INFORMATION --- */
.immo-card-info-panel {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    background: #fff;
    z-index: 4;
}

/* HEADER */
.immo-info-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 15px 20px 5px 20px;
    background: #fff;
}
.info-left { display: flex; flex-direction: column; }
.info-type { font-weight: 800; font-size: 1.1em; text-transform: uppercase; font-family: var(--immo-title-font); color: #000; margin-bottom: 2px; }
.info-ref { font-size: 0.85em; color: #888; font-family: var(--immo-text-font); }
.info-right { text-align: right; }
.info-price { font-weight: 800; font-size: 1.3em; color: var(--immo-price-color); font-family: var(--immo-price-font); }

/* LOCALISATION */
.immo-info-location {
    padding: 0 20px 10px 20px;
    font-size: 0.9em; font-weight: 600; color: #333;
    display: flex; align-items: center; gap: 5px;
    font-family: var(--immo-title-font);
}
.icon-pin { color: #555; display:flex; }

/* --- DETAILS CACHES (Animation) --- */
.immo-info-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.3s ease-in;
    padding: 0 20px;
}

.immo-card:hover .immo-info-details {
    max-height: 250px;
    opacity: 1;
}

/* ICONS ROW : Alignement Gauche */
.immo-icons-row {
    display: flex; 
    align-items: center; 
    justify-content: flex-start; /* ALIGN LEFT */
    gap: 15px; /* ESPACEMENT REGULIER */
    flex-wrap: wrap; /* Permet le retour à la ligne si trop d'infos */
    margin-top: 5px; margin-bottom: 15px; padding-top: 10px; border-top: 1px solid #f0f0f0;
}

.icon-item { display: flex; flex-direction: column; align-items: center; gap: 3px; color: #555; font-size: 0.85em; font-family: var(--immo-text-font); }
.icon-item .ico { opacity: 0.7; }

/* DPE Mini Ajusté */
.energy-mini-block { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.energy-label { font-size: 9px; font-weight: bold; color: #999; }
.dpe-text-badge { font-weight: bold; background: #eee; padding: 2px 4px; border-radius: 3px; font-size: 10px; }

/* Bouton Découvrir */
.immo-btn-container { text-align: center; margin-bottom: 15px; }
.immo-btn-discover {
    display: block; width: 100%;
    background: #333; color: #fff;
    padding: 12px 0;
    text-align: center; font-weight: bold; text-transform: uppercase;
    font-size: 0.9em; font-family: var(--immo-btn-font);
    border-radius: 4px; transition: background 0.2s;
    position: relative; z-index: 10;
}
.immo-btn-discover:hover { background: #000; }

/* --- DPE BARRES (Plus compact pour la liste) --- */
.immo-energy-scale { display: inline-flex; align-items: center; gap: 1px; } /* Gap réduit */
.energy-box { display: inline-block; cursor: default; color: transparent; border-radius: 1px; opacity: 0.4; }
.energy-box.active { display: inline-flex; align-items: center; justify-content: center; opacity: 1; font-weight: 800; font-family: var(--immo-dpe-font); box-shadow: 0 1px 3px rgba(0,0,0,0.2); border-radius: 2px; z-index: 2; }

/* Version Liste (Small) */
.immo-energy-scale.dpe-small .energy-box { width: 4px; height: 12px; }
.immo-energy-scale.dpe-small .energy-box.active { width: 16px; height: 16px; font-size: 10px; }

/* Version Single (Large) */
.immo-energy-scale.dpe-large { gap: 2px; }
.immo-energy-scale.dpe-large .energy-box { width: 10px; height: 28px; }
.immo-energy-scale.dpe-large .energy-box.active { width: 34px; height: 34px; font-size: 18px; }

/* Single */
.immo-full-description h3 { font-family: var(--immo-title-font); font-size: var(--immo-title-size); color: var(--immo-title-color); }
.immo-full-description { line-height: 1.8; margin-bottom: 40px; font-family: var(--immo-text-font); font-size: var(--immo-text-size); color: var(--immo-text-color); }
.immo-specs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; background: #f9f9f9; padding: 20px; border-radius: 8px; margin-bottom: 30px; font-family: var(--immo-text-font); font-size: var(--immo-text-size); color: var(--immo-text-color); }
.immo-spec-item { display: flex; justify-content: space-between; border-bottom: 1px solid #eee; padding-bottom: 5px; align-items:center; }
.spec-label { font-weight: bold; opacity: 0.8; }
.immo-lightbox { display: none; position: fixed; z-index: 99999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.95); }
.immo-lightbox-content { margin: auto; display: block; max-width: 90%; max-height: 90vh; margin-top: 5vh; border: 5px solid #fff; }
.immo-close { position: absolute; top: 20px; right: 40px; color: #fff; font-size: 50px; font-weight: bold; cursor: pointer; }
.immo-btn-back { display: inline-block; margin-top: 20px; color: #666; text-decoration: none; font-family: var(--immo-text-font); }