/**
 * E42 Real Estate Pro - Apartments Table Styles
 * Version: 104.0.0
 * Description: Styles pour le tableau d'appartements, tooltip et modal
 */

.irec-apartments-container {
    font-family: "Red Hat Display";
    /* background: linear-gradient(180deg, #7a8a6b 0%, #a8b89a 100%);*/
    padding: 40px 20px;
    border-radius: 10px;
    /* max-width: 1470px; REMOVED - Full width */
    width: 100%;
    margin: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}
.irec-header {
    text-align: center;
    color: #2d3e1f;
    margin-bottom: 30px;
}
.irec-header h2 {
    font-size: 32px;
    font-weight: normal;
    margin: 0 0 10px 0;
    color: #2d3e1f;
}
.irec-header p {
    font-size: 14px;
    color: #4a5940;
    margin: 5px 0;
    line-height: 1.6;
}
.irec-image-container {
    margin-bottom: 30px;
   /* background: #f5f5f5;
    padding: 20px;*/
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Hotspots */
.irec-hotspot {
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}
.irec-hotspot:hover {
    z-index: 20;
    transform: translate(-50%, -50%) scale(1.2) !important;
}
.irec-hotspot-marker {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    position: relative;
    animation: pulse 2s infinite;
}
.irec-hotspot-marker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
}
.irec-hotspot:hover .irec-hotspot-marker {
    animation: none;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}
.irec-hotspot-label {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}
.irec-hotspot:hover .irec-hotspot-label {
    opacity: 1;
    top: 45px;
}
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 0 15px rgba(102, 126, 234, 0);
    }
}

/* Mini popup au hover (style référence image) */
.irec-mini-popup {
    position: absolute;
    background: white;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 100;
    min-width: 280px;
    max-width: 320px;
    pointer-events: none;
    transition: opacity 0.3s ease;
    overflow: hidden;
}
.irec-mini-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: none;
}
.irec-mini-popup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    color: white;
}
.irec-mini-popup-number {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}
.irec-mini-popup-type {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.irec-mini-popup-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.irec-mini-popup-status.available {
    background: #4CAF50;
}
.irec-mini-popup-status.reserved {
    background: #FF9800;
}
.irec-mini-popup-status.sold {
    background: #F44336;
}
.irec-mini-popup-info {
    padding: 20px;
}
.irec-mini-popup-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #333;
}
.irec-mini-popup-row:last-child {
    margin-bottom: 0;
}
.irec-mini-popup-icon {
    width: 24px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
}
.irec-mini-popup-icon svg {
    display: block;
}
.irec-mini-popup-value {
    font-weight: 500;
}
.irec-mini-popup-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 0;
}
.irec-mini-popup-btn {
    width: 100%;
    padding: 15px;
    background: #2196F3;
    color: white;
    border: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease;
    pointer-events: all;
}
.irec-mini-popup-btn:hover {
    background: #1976D2;
}

/* Hotspots (points cliquables simples) */
.irec-hotspot {
    position: absolute;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.irec-hotspot:hover {
    transform: translate(-50%, -50%) scale(1.15);
    z-index: 101;
}
.irec-hotspot:active {
    transform: translate(-50%, -50%) scale(0.95);
}
.irec-hotspot-marker {
    width: 34px;
    height: 34px;
    background: #ffffff;
    border: 3px solid #2d3e1f;
    border-radius: 50%;
    box-shadow: 0 3px 12px rgba(0,0,0,0.3), 0 0 0 4px rgba(45,62,31,0.1);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
}
.irec-hotspot:hover .irec-hotspot-marker {
    background: #2d3e1f;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4), 0 0 0 6px rgba(45,62,31,0.2);
    animation: hotspotPulse 0.6s ease-in-out;
}
@keyframes hotspotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.irec-hotspot-marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #2d3e1f;
    border-radius: 50%;
    transition: all 0.3s ease;
}
.irec-hotspot:hover .irec-hotspot-marker::after {
    background: #ffffff;
}
.irec-hotspot-label {
    display: none; /* Caché, on utilise le tooltip à la place */
}

/* Tooltip style screenshot - Au-dessus du hotspot */
.irec-hotspot-tooltip-e42 {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 2px solid #7d9b6f;
    border-radius: 8px;
    padding: 16px 20px;
    min-width: 200px;
    max-width: 280px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 10000;
    font-family: "Red Hat Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: center;
}

.irec-hotspot:hover .irec-hotspot-tooltip-e42 {
    opacity: 1;
    visibility: visible;
    bottom: 55px;
}

/* Masquer l'image dans le tooltip hover */
.irec-hotspot-tooltip-e42 .irec-tooltip-plan-image {
    display: none;
}

/* Image du plan en haut - Pour modal seulement */
.irec-tooltip-plan-image {
    width: 100%;
    padding: 0;
    margin: 0;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image dans TOOLTIP HOVER (petit) */
.irec-hotspot-tooltip-e42 .irec-tooltip-plan-image img {
    width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    display: block;
    border-radius: 6px 6px 0 0;
}

/* Image dans MODAL (grand) */
.irec-tooltip-modal .irec-tooltip-plan-image img {
    width: 100%;
    height: auto;
    max-height: 224px;
    padding: 3%;
    object-fit: contain;
    display: block;
    border-radius: 6px 6px 0 0;
}

/* Barre verte avec titre "Lot 22 (1 étage)" - MODAL */
.irec-tooltip-header-green {
    background: #7d9b6f;
    color: white;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    letter-spacing: 0.3px;
    font-family: "Red Hat Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Barre verte simplifiée pour TOOLTIP HOVER - Centré */
.irec-hotspot-tooltip-e42 .irec-tooltip-header-green {
    background: transparent;
    color: #2d2d2d;
    padding: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    border-bottom: 2px solid #7d9b6f;
    margin-bottom: 12px;
}

/* Zone des données - Grille 2 colonnes - MODAL */
.irec-tooltip-data {
    padding: 15px 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 15px;
}

/* Zone des données - 1 colonne centrée - TOOLTIP HOVER */
.irec-hotspot-tooltip-e42 .irec-tooltip-data {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

/* Cellule de donnée */
.irec-tooltip-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Label en haut - MODAL */
.irec-tooltip-label {
    color: #000;
    font-family: "Red Hat Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Label simplifié - TOOLTIP HOVER (masqué) */
.irec-hotspot-tooltip-e42 .irec-tooltip-label {
    display: none;
}

/* Label "Prix par lots" et "Places de parking" - Font weight 700 */
.irec-tooltip-label.bold {
    font-weight: 700;
}

/* Valeur en bas - MODAL */
.irec-tooltip-value {
    color: #000;
    font-family: "Red Hat Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    font-style: normal;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Valeur simplifiée - TOOLTIP HOVER */
.irec-hotspot-tooltip-e42 .irec-tooltip-value {
    font-size: 18px;
    font-weight: 600;
    color: #2d2d2d;
    text-align: center;
}
    text-overflow: ellipsis;
}
}

/* Valeur pour prix - Font weight 700 */
.irec-tooltip-value.bold {
    font-weight: 700;
}


/* ========================================
   RESPONSIVE PIXEL PERFECT
   ======================================== */

/* Desktop Large (>1200px) - Défaut déjà défini */

/* Desktop Standard (1024px - 1200px) */
@media (max-width: 1200px) {
    .irec-tooltip-modal {
        width: 500px;
    }
    
    .irec-popup-close {
        width: 30px;
        height: 30px;
        font-size: 19px;
        top: 10px;
        right: 10px;
    }
}

/* Tablette (768px - 1024px) */
@media (max-width: 1024px) {
    /* Modal */
    .irec-tooltip-modal {
        width: 90%;
        max-width: 500px;
    }
    
    .irec-tooltip-modal .irec-tooltip-plan-image img {
        max-height: 200px;
        padding: 2.5%;
    }
    
    .irec-tooltip-header-green {
        font-size: 13px;
        padding: 10px 14px;
        line-height: 1.3;
    }
    
    .irec-tooltip-data {
        padding: 14px 14px;
        gap: 11px 14px;
    }
    
    .irec-tooltip-label {
        font-size: 11px;
        line-height: 1.3;
    }
    
    .irec-tooltip-value {
        font-size: 16px;
        line-height: 1.3;
    }
    
    .irec-popup-close {
        width: 30px;
        height: 30px;
        font-size: 18px;
        top: 9px;
        right: 9px;
    }
    
    /* Tooltip hover */
    .irec-hotspot-tooltip-e42 {
        min-width: 300px;
        max-width: 380px;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-plan-image img {
        max-height: 75px;
    }
}

/* Tablette Portrait (768px) */
@media (max-width: 768px) {
    /* Forcer le centrage du popup en tablette */
    .irec-popup-overlay {
        align-items: center !important;
        justify-content: center !important;
    }
    
    .irec-popup-overlay.active {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Modal */
    .irec-tooltip-modal {
        width: 95%;
        max-width: 450px;
        margin: 0 auto; /* Centrage parfait tablette */
    }
    
    .irec-tooltip-modal .irec-tooltip-plan-image img {
        max-height: 180px;
        padding: 2%;
    }
    
    .irec-tooltip-header-green {
        font-size: 13px;
        padding: 10px 12px;
        line-height: 1.3;
    }
    
    .irec-tooltip-data {
        padding: 12px 12px;
        gap: 10px 12px;
    }
    
    .irec-tooltip-label {
        font-size: 11px;
        line-height: 1.3;
    }
    
    .irec-tooltip-value {
        font-size: 15px;
        line-height: 1.3;
    }
    
    .irec-popup-close {
        width: 28px;
        height: 28px;
        font-size: 17px;
        top: 8px;
        right: 8px;
    }
    
    /* Tooltip hover */
    .irec-hotspot-tooltip-e42 {
        min-width: 280px;
        max-width: 340px;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-plan-image img {
        max-height: 70px;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-header-green {
        font-size: 13px;
        padding: 9px 12px;
        line-height: 1.3;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-data {
        padding: 12px 12px;
        gap: 10px 12px;
    }
}

/* Mobile Large (480px - 640px) */
@media (max-width: 640px) {
    /* Modal */
    .irec-popup-overlay {
        padding: 15px;
    }
    
    .irec-tooltip-modal {
        width: 100%;
        max-width: 100%;
    }
    
    .irec-tooltip-modal .irec-tooltip-plan-image img {
        max-height: 160px;
        padding: 2%;
    }
    
    .irec-tooltip-header-green {
        font-size: 13px;
        padding: 10px 12px;
        line-height: 1.4;
    }
    
    .irec-tooltip-data {
        padding: 12px 12px;
        gap: 10px 12px;
    }
    
    .irec-tooltip-label {
        font-size: 11px;
        line-height: 1.4;
    }
    
    .irec-tooltip-value {
        font-size: 15px;
        line-height: 1.4;
    }
    
    .irec-popup-close {
        width: 28px;
        height: 28px;
        font-size: 17px;
        top: 8px;
        right: 8px;
    }
    
    /* Tooltip hover */
    .irec-hotspot-tooltip-e42 {
        min-width: 260px;
        max-width: 320px;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-plan-image img {
        max-height: 65px;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-header-green {
        font-size: 12px;
        padding: 8px 10px;
        line-height: 1.4;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-data {
        padding: 10px 10px;
        gap: 9px 10px;
    }
}

/* Mobile Standard (≤480px) */
@media (max-width: 480px) {
    /* Modal */
    .irec-popup-overlay {
        padding: 15px;
    }
    
    .irec-tooltip-modal {
        width: 95%;
        max-width: 95%;
        max-height: 90vh;
        margin: 0 auto; /* Centrage parfait mobile */
    }
    
    .irec-tooltip-modal .irec-tooltip-plan-image img {
        max-height: 160px;
        padding: 2%;
    }
    
    .irec-tooltip-header-green {
        font-size: 14px;
        padding: 12px 14px;
        line-height: 1.4;
    }
    
    .irec-tooltip-data {
        padding: 12px 10px; /* Réduit pour 2 colonnes */
        gap: 10px 8px; /* Gap réduit pour 2 colonnes */
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur mobile */
    }
    
    .irec-tooltip-label {
        font-size: 11px; /* Réduit pour 2 colonnes */
        line-height: 1.4;
    }
    
    .irec-tooltip-value {
        font-size: 15px; /* Réduit pour 2 colonnes */
        line-height: 1.4;
    }
    
    .irec-popup-close {
        width: 28px;
        height: 28px;
        font-size: 17px;
        top: 8px;
        right: 8px;
    }
    
    /* Tooltip hover */
    .irec-hotspot-tooltip-e42 {
        min-width: 240px;
        max-width: 300px;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-plan-image img {
        max-height: 60px;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-header-green {
        font-size: 12px;
        padding: 8px 10px;
        line-height: 1.4;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-data {
        padding: 10px 10px;
        gap: 8px 10px;
        grid-template-columns: 1fr; /* 1 colonne */
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-label {
        font-size: 10px;
        line-height: 1.4;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-value {
        font-size: 13px;
        line-height: 1.4;
    }
}

/* Mobile Petit (≤375px) - iPhone SE */
@media (max-width: 375px) {
    /* Modal */
    .irec-popup-overlay {
        padding: 10px;
    }
    
    .irec-tooltip-modal {
        width: 95%;
        max-width: 95%;
        margin: 0 auto; /* Centrage parfait iPhone SE */
    }
    
    .irec-tooltip-modal .irec-tooltip-plan-image img {
        max-height: 140px;
        padding: 1.5%;
    }
    
    .irec-tooltip-header-green {
        font-size: 13px;
        padding: 10px 12px;
        line-height: 1.4;
    }
    
    .irec-tooltip-data {
        padding: 12px 12px;
        gap: 10px 12px;
    }
    
    .irec-tooltip-label {
        font-size: 11px;
        line-height: 1.4;
    }
    
    .irec-tooltip-value {
        font-size: 15px;
        line-height: 1.4;
    }
    
    .irec-popup-close {
        width: 26px;
        height: 26px;
        font-size: 16px;
        top: 7px;
        right: 7px;
    }
    
    /* Tooltip hover */
    .irec-hotspot-tooltip-e42 {
        min-width: 220px;
        max-width: 280px;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-plan-image img {
        max-height: 55px;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-header-green {
        font-size: 11px;
        padding: 7px 9px;
        line-height: 1.5;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-data {
        padding: 9px 9px;
        gap: 7px 9px;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-label {
        font-size: 9px;
        line-height: 1.5;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-value {
        font-size: 12px;
        line-height: 1.5;
    }
}

/* Mobile Très Petit (≤320px) - Anciens devices */
@media (max-width: 320px) {
    /* Modal */
    .irec-popup-overlay {
        padding: 5px;
    }
    
    .irec-tooltip-modal .irec-tooltip-plan-image img {
        max-height: 100px;
        padding: 1%;
    }
    
    .irec-tooltip-header-green {
        font-size: 11px;
        padding: 7px 9px;
        line-height: 1.5;
    }
    
    .irec-tooltip-data {
        padding: 9px 9px;
        gap: 7px 9px;
    }
    
    .irec-tooltip-label {
        font-size: 9px;
        line-height: 1.5;
    }
    
    .irec-tooltip-value {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .irec-popup-close {
        width: 22px;
        height: 22px;
        font-size: 14px;
        top: 5px;
        right: 5px;
    }
    
    /* Tooltip hover */
    .irec-hotspot-tooltip-e42 {
        min-width: 200px;
        max-width: 260px;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-plan-image img {
        max-height: 50px;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-header-green {
        font-size: 10px;
        padding: 6px 8px;
        line-height: 1.5;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-data {
        padding: 8px 8px;
        gap: 6px 8px;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-label {
        font-size: 9px;
        line-height: 1.5;
    }
    
    .irec-hotspot-tooltip-e42 .irec-tooltip-value {
        font-size: 11px;
        line-height: 1.5;
    }
}


.irec-image-container {
    margin: 20px 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}
.irec-image-container img {
    width: 100%;
    height: auto;
    display: block;
    border: none;
}
.irec-table-wrapper {
    background: #d4dcc8;
    border-radius: 0;
    overflow-x: visible;
    box-shadow: none;
    border: 1px solid #d0d0d0;
}
.irec-custom-table {
    width: 100%;
    border-collapse: collapse;
}
.irec-custom-table thead {
    /* Background administrable via Real Estate → Couleurs */
}
.irec-custom-table th {
    padding: 12px 15px;
    text-align: center;
    font-weight: 400;
    font-size: 12px;
    border-right: 1px solid rgba(255,255,255,0.1);
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    word-break: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}
.irec-custom-table th:last-child {
    border-right: none;
}
.irec-custom-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #e8e8e8;
    border-right: 1px solid #e8e8e8;
    color: #333;
    font-size: 13px;
    white-space: nowrap;
    word-break: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}
.irec-custom-table td:last-child {
    border-right: none;
}
.irec-custom-table tbody tr {
    border-bottom: 1px solid #e8e8e8;
    transition: background-color 0.2s ease;
}
.irec-custom-table tbody tr:nth-child(odd) {
    background-color: #f8f9f6;
}
.irec-custom-table tbody tr:nth-child(even) {
    background-color: white;
}
.apt-row-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}
.apt-row-clickable:hover {
    background: #84906b82 !important;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
}
.apt-row-clickable:active {
    transform: scale(0.99);
    background: #84906b82 !important;
}
.apt-row-clickable .apt-cell {
    position: relative;
}

/* Lien PDF - Style "Découvrir +" */
.irec-pdf-link {
    font-family: "Red Hat Display";
    display: inline-block;
    padding: 6px 12px;
    background: transparent;
    color: #7b68ee;
    text-decoration: none;
    border-radius: 0;
    font-size: 20px;
    font-weight: 400;
    transition: color 0.2s ease;
    box-shadow: none;
}
.irec-pdf-link:hover {
    color: #5a4bbd;
    text-decoration: underline;
}
.irec-pdf-link svg {
    display: none;
}
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
    color: white;
}

.irec-custom-table tbody tr {
    background: white;
    transition: background 0.2s;
}
.irec-custom-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}
.irec-custom-table tbody tr:hover {
    background: #f0f4eb;
}
.irec-status-badge {
    font-family: "Red Hat Display";
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 20px;
    font-weight: 500;
    text-transform: capitalize;
}

/* Badge statut agrandi et centré pour TOOLTIP HOVER */
.irec-hotspot-tooltip-e42 .irec-status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.irec-status-available {
    background: #4caf50;
    color: white;
}
.irec-status-reserved {
    background: #ff9800;
    color: white;
}
.irec-status-sold {
    background: #9e9e9e;
    color: white;
}
.irec-discover-btn {
    background: transparent;
    border: 1px solid #7a8a6b;
    color: #7a8a6b;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}
.irec-discover-btn:hover {
    background: #7a8a6b;
    color: white;
}

/* Modal centré (même structure que tooltip) */
/* =================================================================
   MODAL - Style compact identique au tooltip
   ================================================================= */

/* Overlay sombre */
.irec-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.irec-popup-overlay.active {
    display: flex;
}

/* Cacher tous les tooltips quand le popup est ouvert */
.irec-popup-overlay.active ~ * .irec-hotspot-tooltip-e42,
.irec-hotspot-tooltip-e42 {
    pointer-events: none;
}

.irec-popup-overlay.active ~ * .irec-hotspot-tooltip-e42 {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Conteneur modal - Style tooltip */
.irec-tooltip-modal {
    position: relative;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    width: 531px;
    height: auto;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
    font-family: "Red Hat Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0 auto; /* Centrage horizontal parfait */
}
    animation: popupAppear 0.3s ease-out;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

@keyframes popupAppear {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Bouton fermer */
.irec-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    color: white;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
    flex-shrink: 0;
}

.irec-popup-close:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

/* Le contenu utilise les mêmes classes que le tooltip */
.irec-tooltip-content {
    text-align: left;
}


.irec-status-badge.available {
    background: #e8f5e9;
    color: #2e7d32;
}
.irec-status-badge.reserved {
    background: #fff3e0;
    color: #ef6c00;
}
.irec-status-badge.sold {
    background: #ffebee;
    color: #c62828;
}


/* ========== RESPONSIVE MOBILE - CONTENEUR PRINCIPAL ========== */

/* Tablette */
@media (max-width: 768px) {
    .irec-apartments-container {
        padding: 20px 10px;
        max-width: 100%;
        border-radius: 0;
    }
    
    .irec-header h2 {
        font-size: 28px;
    }
    
    .irec-header p {
        font-size: 13px;
    }
    
    .irec-image-container {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .irec-image-map {
        max-width: 100%;
        height: auto !important;
    }
    
    .irec-hotspot-marker {
        width: 30px;
        height: 30px;
        border: 2px solid white;
    }
    
    .irec-hotspot-marker::before {
        width: 8px;
        height: 8px;
    }
    
    .irec-hotspot-label {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    /* Tableau responsive tablette */
    .irec-table-wrapper {
        overflow-x: visible;
    }
    
    .irec-custom-table {
        width: 100%;
        font-size: 11px;
    }
    
    .irec-custom-table th {
        padding: 10px 6px;
        font-size: 10px;
        line-height: 1.3;
    }
    
    .irec-custom-table td {
        padding: 10px 6px;
        font-size: 11px;
        line-height: 1.3;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .irec-apartments-container {
        padding: 15px 5px;
    }
    
    /* Forcer le centrage du popup en mobile */
    .irec-popup-overlay {
        display: none;
        align-items: center !important;
        justify-content: center !important;
        padding: 15px;
    }
    
    .irec-popup-overlay.active {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .irec-header {
        margin-bottom: 20px;
    }
    
    .irec-header h2 {
        font-size: 18px;
        margin: 0 0 6px 0;
    }
    
    .irec-header p {
        font-size: 11px;
        line-height: 1.5;
    }
    
    .irec-image-container {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .irec-hotspot {
        transform-origin: center center;
    }
    
    .irec-hotspot-marker {
        width: 25px;
        height: 25px;
    }
    
    .irec-hotspot-marker::before {
        width: 6px;
        height: 6px;
    }
    
    .irec-footnote-text {
        font-size: 10px !important;
        line-height: 1.3;
    }
    
    /* Tableau responsive mobile avec scroll */
    .irec-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .irec-custom-table {
        min-width: 600px;
        font-size: 10px;
    }
    
    .irec-custom-table th {
        padding: 8px 6px;
        font-size: 10px;
        line-height: 1.2;
    }
    
    .irec-custom-table td {
        padding: 8px 6px;
        font-size: 11px;
        line-height: 1.2;
    }
}

/* Très petits mobiles (iPhone SE, etc.) */
@media (max-width: 375px) {
    .irec-apartments-container {
        padding: 10px 5px;
    }
    
    /* Forcer le centrage du popup en iPhone SE */
    .irec-popup-overlay {
        align-items: center !important;
        justify-content: center !important;
        padding: 10px;
    }
    
    .irec-popup-overlay.active {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .irec-header h2 {
        font-size: 16px;
    }
    
    .irec-header p {
        font-size: 10px;
    }
    
    .irec-image-container {
        padding: 8px;
    }
    
    .irec-hotspot-marker {
        width: 20px;
        height: 20px;
    }
    
    .irec-hotspot-marker::before {
        width: 5px;
        height: 5px;
    }
    
    .irec-custom-table {
        font-size: 11px;
    }
    
    .irec-custom-table th,
    .irec-custom-table td {
        padding: 6px 3px;
        font-size: 9px;
        line-height: 1.2;
    }
}

/* ========================================
   SYSTÈME DE CLIGNOTEMENT INTERACTIF
   ======================================== */

/* Hotspot actif (cliqué) */
.irec-hotspot.active .irec-hotspot-marker {
    background: #2d3e1f;
    box-shadow: 0 0 0 0 rgba(45,62,31,0.7);
    animation: hotspotBlink 1.5s ease-in-out infinite;
    z-index: 10001;
}

/* Animation de clignotement */
@keyframes hotspotBlink {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(45,62,31,0.7);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 15px rgba(45,62,31,0);
    }
}

/* Point central du hotspot actif */
.irec-hotspot.active .irec-hotspot-marker::after {
    background: #ffffff;
    animation: hotspotBlinkInner 1.5s ease-in-out infinite;
}

@keyframes hotspotBlinkInner {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
    }
}

/* Hotspots masqués */
.irec-hotspot.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
