/* ============================================================================
   SEN-MAJORDOME - NOS BIENS - STYLE ANNONCE IMMOBILIÈRE
   Design inspiré des plateformes immobilières professionnelles
   ============================================================================ */

:root {
    --primary-blue: #0d5d9f;
    --secondary-blue: #1976d2;
    --accent-gold: #d4af37;
    --white: #ffffff;
    --text-dark: #2c2c2c;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-light: #f5f7fa;
    --bg-card: #ffffff;
    --border-color: #e0e0e0;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --badge-rent: #1a3c5a;
    --badge-sale: #2e7d32;
    --transition: all 0.3s ease;
}

/* ============================================================================
   HERO SECTION - AVEC IMAGE DE FOND ET ANIMATIONS
   ============================================================================ */
.properties-hero {
    position: relative;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
    background: 
        linear-gradient(135deg, rgba(13, 93, 159, 0.85) 0%, rgba(10, 69, 112, 0.9) 100%),
        url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80') center center / cover no-repeat;
}

.properties-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(13, 93, 159, 0.2) 0%, transparent 50%);
    z-index: 1;
    animation: pulseGlow 8s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.properties-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, var(--bg-light) 0%, transparent 100%);
    z-index: 1;
}

.properties-hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 2rem;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.properties-hero-content h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.8s ease-out;
    letter-spacing: 1px;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.properties-hero-content h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), transparent);
    margin: 1rem auto 0;
    animation: expandWidth 1s ease-out 0.5s both;
}

@keyframes expandWidth {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 80px;
        opacity: 1;
    }
}

.properties-hero-content p {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.7;
    animation: fadeIn 1s ease-out 0.3s both;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 0.95; }
}

/* Particules décoratives */
.properties-hero .particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(212, 175, 55, 0.6);
    border-radius: 50%;
    z-index: 1;
}

.properties-hero .particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation: floatParticle 6s ease-in-out infinite;
}

.properties-hero .particle:nth-child(2) {
    top: 60%;
    left: 20%;
    animation: floatParticle 8s ease-in-out infinite 1s;
}

.properties-hero .particle:nth-child(3) {
    top: 30%;
    right: 15%;
    animation: floatParticle 7s ease-in-out infinite 0.5s;
}

.properties-hero .particle:nth-child(4) {
    top: 70%;
    right: 25%;
    animation: floatParticle 9s ease-in-out infinite 2s;
}

.properties-hero .particle:nth-child(5) {
    top: 40%;
    left: 50%;
    animation: floatParticle 10s ease-in-out infinite 1.5s;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translate(20px, -30px) scale(1.2);
        opacity: 0.8;
    }
    50% {
        transform: translate(-10px, -50px) scale(0.8);
        opacity: 0.4;
    }
    75% {
        transform: translate(30px, -20px) scale(1.1);
        opacity: 0.7;
    }
}

/* Stats ou badges dans le hero */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2.5rem;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    display: block;
    text-shadow: 0 2px 15px rgba(212, 175, 55, 0.5);
}

.hero-stat-label {
    font-size: 0.9rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator i {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-15px);
    }
    60% {
        transform: translateX(-50%) translateY(-8px);
    }
}

/* ============================================================================
   FILTERS SECTION
   ============================================================================ */
.filters-section {
    background: var(--white);
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 70px;
    z-index: 100;
}

.filters-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select {
    padding: 0.7rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Montserrat', sans-serif;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(13, 93, 159, 0.1);
}

/* ============================================================================
   PROPERTIES GRID - 2 COLONNES SUR DESKTOP
   ============================================================================ */
.properties-section {
    background: var(--bg-light);
    padding: 2rem 1rem 4rem;
    min-height: 60vh;
}

.properties-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 900px) {
    .properties-grid {
        grid-template-columns: 1fr;
        max-width: 550px;
        gap: 1.5rem;
    }
}

/* ============================================================================
   PROPERTY CARD - STYLE ANNONCE IMMOBILIÈRE
   ============================================================================ */
.property-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

/* ========== IMAGE CAROUSEL ========== */
.card-carousel {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #e8e8e8;
}

.carousel-images {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-image.active {
    opacity: 1;
}

/* Navigation arrows */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.carousel-nav i {
    color: var(--text-dark);
    font-size: 0.9rem;
}

.carousel-nav.prev {
    left: 10px;
}

.carousel-nav.next {
    right: 10px;
}

.property-card:hover .carousel-nav {
    opacity: 1;
}

.carousel-nav:hover {
    background: var(--white);
    transform: translateY(-50%) scale(1.05);
}

/* Badge "À louer" */
.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--badge-rent);
    color: white;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    z-index: 5;
    text-transform: capitalize;
}

.card-badge.vente {
    background: var(--badge-sale);
}

/* ========== CARD CONTENT ========== */
.card-content {
    padding: 1.2rem 1.2rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Title */
.card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-transform: uppercase;
}

/* Price */
.card-price {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.card-price .amount {
    font-weight: 700;
    color: var(--text-dark);
}

/* Location */
.card-location {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
}

.card-location i {
    color: var(--primary-blue);
    font-size: 0.85rem;
    margin-top: 2px;
}

/* Description */
.card-description {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Features (chambres, sdb, surface) */
.card-features {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.2rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.feature-item i {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========== ÉQUIPEMENTS ========== */
.card-equipments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.equipment-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(13, 93, 159, 0.08) 0%, rgba(212, 175, 55, 0.08) 100%);
    border: 1px solid rgba(13, 93, 159, 0.15);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--primary-blue);
    font-weight: 500;
    transition: all 0.2s ease;
}

.equipment-tag:hover {
    background: linear-gradient(135deg, rgba(13, 93, 159, 0.15) 0%, rgba(212, 175, 55, 0.15) 100%);
    transform: translateY(-1px);
}

.equipment-tag i {
    font-size: 0.7rem;
    color: var(--accent-gold);
}

/* ========== AGENT INFO ========== */
.card-agent {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.agent-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
    overflow: hidden;
}

.agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-info {
    flex: 1;
}

.agent-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 2px;
}

.agent-phone {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.agent-phone i {
    color: var(--primary-blue);
    font-size: 0.8rem;
}

.agent-phone a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.agent-phone a:hover {
    color: var(--primary-blue);
}

/* ============================================================================
   LOADING STATE
   ============================================================================ */
.loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    gap: 1rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading span {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ============================================================================
   NO PROPERTIES STATE
   ============================================================================ */
.no-properties {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
}

.no-properties i {
    font-size: 4rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
}

.no-properties h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.no-properties p {
    color: var(--text-light);
    font-size: 1rem;
}

/* ============================================================================
   MODALS
   ============================================================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-light);
    transform: rotate(90deg);
}

/* Modal Header */
.modal-header-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-property-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    color: var(--text-dark);
    margin: 0 0 0.3rem;
}

.modal-subtitle {
    font-size: 0.9rem;
    color: var(--accent-gold);
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.modal-property-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.modal-property-location i {
    color: var(--primary-blue);
}

/* Modal Gallery */
.modal-gallery-section {
    padding: 1.5rem;
}

.modal-main-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.modal-main-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.modal-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

/* Modal Info */
.modal-info-section {
    padding: 1.5rem;
}

.modal-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.modal-price span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-light);
}

.modal-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-light);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.modal-feature i {
    color: var(--primary-blue);
}

.modal-equipments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-equipment-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(13, 93, 159, 0.1);
    color: var(--primary-blue);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.modal-btn {
    flex: 1;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.modal-btn-whatsapp {
    background: #25D366;
    color: white;
}

.modal-btn-whatsapp:hover {
    background: #1da851;
}

.modal-btn-email {
    background: var(--primary-blue);
    color: white;
}

.modal-btn-email:hover {
    background: var(--secondary-blue);
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */
@media (max-width: 768px) {
    .properties-hero {
        padding: 80px 15px 40px;
    }
    
    .properties-hero-content h1 {
        font-size: 2rem;
    }
    
    .filters-section {
        position: relative;
        top: 0;
    }
    
    .filters-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .card-carousel {
        height: 200px;
    }
    
    .card-title {
        font-size: 0.95rem;
    }
    
    .modal-content {
        max-height: 95vh;
        border-radius: 8px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .filters-container {
        grid-template-columns: 1fr;
    }
    
    .properties-grid {
        padding: 0 0.5rem;
    }
    
    .card-features {
        gap: 0.8rem;
    }
    
    .feature-item {
        font-size: 0.8rem;
    }
}

/* ============================================================================
   MODAL DÉTAILS PROPRIÉTÉ - STYLE COMPACT & PROFESSIONNEL
   ============================================================================ */
.property-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.property-detail-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.property-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.property-detail-container {
    position: relative;
    background: var(--white);
    width: 100%;
    max-width: 900px;
    margin: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.property-detail-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.property-detail-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.property-detail-content {
    padding: 0;
}

/* Header Section - Compact */
.detail-header-section {
    padding: 1.2rem 1.5rem;
    background: #fafbfc;
    border-bottom: 1px solid #eee;
}

.detail-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.detail-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detail-badge-current {
    background: #dc3545;
    color: white;
}

.detail-badge-rent {
    background: #198754;
    color: white;
}

.detail-views {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #888;
    font-size: 0.75rem;
    margin-left: auto;
}

.detail-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 0.6rem;
}

.detail-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
    flex: 1;
    line-height: 1.4;
}

.detail-price {
    text-align: right;
    flex-shrink: 0;
}

.detail-price .amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #dc3545;
    display: block;
}

.detail-price .period {
    font-size: 0.8rem;
    color: #888;
}

.detail-location {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #666;
    font-size: 0.85rem;
}

.detail-location i {
    color: #dc3545;
    font-size: 0.9rem;
}

/* ============================================================================
   GALLERY SECTION - COMPACT & CLEAN
   ============================================================================ */
.detail-gallery-section {
    background: #fff;
}

.detail-gallery-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4px;
    padding: 4px;
}

.detail-gallery-main {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.detail-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.detail-gallery-main:hover img {
    transform: scale(1.02);
}

.detail-gallery-main .view-all-photos {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.detail-gallery-main:hover .view-all-photos {
    opacity: 1;
    transform: translateY(0);
}

.detail-gallery-thumbs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
}

.detail-thumb {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
}

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

.detail-thumb:hover img {
    transform: scale(1.05);
}

.detail-thumb.more-photos::after {
    content: attr(data-count) ' photos';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.detail-thumb.empty-thumb {
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-thumb.empty-thumb::after {
    content: '\\f03e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    font-size: 1.5rem;
    color: #ccc;
}

/* Gallery Actions - Compact */
.detail-gallery-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
    padding: 0.8rem 1.2rem;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.detail-action-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    font-size: 0.85rem;
}

.detail-action-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: #f0f7ff;
}

/* Description Section - Compact */
.detail-description-section {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.detail-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.8rem;
}

.detail-description-text {
    color: #555;
    font-size: 0.85rem;
    line-height: 1.7;
    text-align: justify;
    max-height: 120px;
    overflow-y: auto;
}

/* Tags Section - Compact */
.detail-tags-section {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    background: #fafbfc;
}

.detail-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.detail-tag {
    display: inline-block;
    padding: 0.4rem 0.7rem;
    background: #dc3545;
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    border-radius: 3px;
}

/* Contact Section - Compact */
.detail-contact-section {
    padding: 1.2rem 1.5rem;
    background: #f8f9fa;
}

.detail-contact-buttons {
    display: flex;
    gap: 0.8rem;
}

.detail-contact-btn {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.detail-btn-whatsapp {
    background: #25D366;
    color: white;
}

.detail-btn-whatsapp:hover {
    background: #1da851;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.detail-btn-call {
    background: var(--primary-blue);
    color: white;
}

.detail-btn-call:hover {
    background: #0a4a7d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 93, 159, 0.3);
}

.detail-btn-email {
    background: #6c757d;
    color: white;
}

.detail-btn-email:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* ============================================================================
   LIGHTBOX - CLEAN & SIMPLE
   ============================================================================ */
.detail-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 20000;
    align-items: center;
    justify-content: center;
}

.detail-lightbox.active {
    display: flex;
}

.detail-lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 20001;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.detail-lightbox-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.detail-lightbox-content {
    max-width: 85%;
    max-height: 85vh;
    position: relative;
}

.detail-lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

.detail-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.detail-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.detail-lightbox-nav.prev {
    left: -60px;
}

.detail-lightbox-nav.next {
    right: -60px;
}

.detail-lightbox-counter {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* ============================================================================
   RESPONSIVE - MODAL
   ============================================================================ */
@media (max-width: 800px) {
    .property-detail-modal {
        padding: 10px;
    }
    
    .detail-gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-gallery-main {
        aspect-ratio: 16/9;
    }
    
    .detail-gallery-thumbs {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .detail-title-row {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .detail-price {
        text-align: left;
    }
}

@media (max-width: 550px) {
    .property-detail-modal {
        padding: 0;
    }
    
    .property-detail-container {
        border-radius: 0;
        max-height: 100vh;
    }
    
    .detail-header-section,
    .detail-description-section,
    .detail-tags-section,
    .detail-contact-section {
        padding: 1rem;
    }
    
    .detail-title {
        font-size: 0.95rem;
    }
    
    .detail-price .amount {
        font-size: 1.1rem;
    }
    
    .detail-gallery-thumbs {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .detail-contact-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .detail-lightbox-nav.prev {
        left: 10px;
    }
    
    .detail-lightbox-nav.next {
        right: 10px;
    }
}

/* ============================================================================
   OPTIMISATIONS RESPONSIVE - TOUS APPAREILS
   ============================================================================ */

/* === TRÈS GRANDS ÉCRANS (4K, Ultrawide) === */
@media (min-width: 1920px) {
    .properties-grid {
        max-width: 1400px;
        gap: 2.5rem;
    }
    
    .property-card {
        border-radius: 12px;
    }
    
    .card-carousel {
        height: 280px;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .property-detail-container {
        max-width: 1000px;
    }
}

/* === GRANDS ÉCRANS (Desktop) === */
@media (min-width: 1200px) and (max-width: 1919px) {
    .properties-grid {
        max-width: 1100px;
    }
}

/* === ÉCRANS MOYENS (Laptop) === */
@media (min-width: 992px) and (max-width: 1199px) {
    .properties-grid {
        max-width: 960px;
        gap: 1.5rem;
    }
    
    .card-carousel {
        height: 220px;
    }
}

/* === TABLETTES PAYSAGE === */
@media (min-width: 768px) and (max-width: 991px) {
    .properties-hero {
        min-height: 380px;
    }
    
    .properties-hero-content h1 {
        font-size: 2.8rem;
    }
    
    .properties-hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .hero-stat-number {
        font-size: 2rem;
    }
    
    .properties-grid {
        max-width: 720px;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
    
    .card-carousel {
        height: 200px;
    }
    
    .card-title {
        font-size: 0.9rem;
    }
    
    .card-price .amount {
        font-size: 1.1rem;
    }
    
    .filters-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === TABLETTES PORTRAIT === */
@media (min-width: 576px) and (max-width: 767px) {
    .properties-hero {
        min-height: 350px;
    }
    
    .properties-hero-content h1 {
        font-size: 2.2rem;
    }
    
    .properties-hero-content p {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    
    .hero-stat-number {
        font-size: 1.8rem;
    }
    
    .hero-stat-label {
        font-size: 0.8rem;
    }
    
    .scroll-indicator {
        bottom: 25px;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        gap: 1.2rem;
    }
    
    .card-carousel {
        height: 220px;
    }
    
    .filters-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-group select {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* === MOBILES GRANDS (iPhone Plus, Android XL) === */
@media (min-width: 414px) and (max-width: 575px) {
    .properties-hero {
        min-height: 320px;
    }
    
    .properties-hero-content h1 {
        font-size: 1.9rem;
    }
    
    .properties-hero-content p {
        font-size: 0.95rem;
    }
    
    .hero-stats {
        gap: 1.2rem;
        margin-top: 1.5rem;
    }
    
    .hero-stat-number {
        font-size: 1.5rem;
    }
    
    .hero-stat-label {
        font-size: 0.7rem;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        padding: 0 0.8rem;
        gap: 1rem;
    }
    
    .card-carousel {
        height: 200px;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 0.85rem;
    }
    
    .card-price .amount {
        font-size: 1.05rem;
    }
    
    .filters-section {
        padding: 1rem;
    }
    
    .filters-container {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
    
    .filter-group label {
        font-size: 0.7rem;
    }
    
    .filter-group select {
        padding: 0.5rem 0.7rem;
        font-size: 0.85rem;
    }
}

/* === MOBILES STANDARD (iPhone, Android) === */
@media (min-width: 375px) and (max-width: 413px) {
    .properties-hero {
        min-height: 300px;
    }
    
    .properties-hero-content {
        padding: 0 1rem;
    }
    
    .properties-hero-content h1 {
        font-size: 1.7rem;
    }
    
    .properties-hero-content p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .hero-stats {
        gap: 1rem;
        margin-top: 1.2rem;
    }
    
    .hero-stat-number {
        font-size: 1.3rem;
    }
    
    .hero-stat-label {
        font-size: 0.65rem;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    .particle {
        display: none;
    }
    
    .properties-grid {
        padding: 0 0.6rem;
        gap: 1rem;
    }
    
    .card-carousel {
        height: 180px;
    }
    
    .card-content {
        padding: 0.9rem;
    }
    
    .card-title {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .card-price .amount {
        font-size: 1rem;
    }
    
    .card-location {
        font-size: 0.8rem;
    }
    
    .card-features {
        gap: 0.6rem;
    }
    
    .feature-item {
        font-size: 0.75rem;
    }
    
    .card-agent {
        padding: 0.8rem;
    }
    
    .agent-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
    
    .agent-name {
        font-size: 0.8rem;
    }
    
    .agent-phone {
        font-size: 0.75rem;
    }
}

/* === PETITS MOBILES (iPhone SE, anciens Android) === */
@media (max-width: 374px) {
    .properties-hero {
        min-height: 280px;
    }
    
    .properties-hero-content {
        padding: 0 0.8rem;
    }
    
    .properties-hero-content h1 {
        font-size: 1.5rem;
    }
    
    .properties-hero-content h1::after {
        width: 50px;
        margin-top: 0.6rem;
    }
    
    .properties-hero-content p {
        font-size: 0.8rem;
    }
    
    .hero-stats {
        gap: 0.8rem;
        margin-top: 1rem;
    }
    
    .hero-stat-number {
        font-size: 1.2rem;
    }
    
    .hero-stat-label {
        font-size: 0.6rem;
    }
    
    .scroll-indicator,
    .particle {
        display: none;
    }
    
    .properties-grid {
        padding: 0 0.5rem;
        gap: 0.8rem;
    }
    
    .card-carousel {
        height: 160px;
    }
    
    .carousel-nav {
        width: 30px;
        height: 30px;
    }
    
    .carousel-nav i {
        font-size: 0.75rem;
    }
    
    .card-content {
        padding: 0.8rem;
    }
    
    .card-title {
        font-size: 0.75rem;
    }
    
    .card-price .amount {
        font-size: 0.95rem;
    }
    
    .card-description {
        font-size: 0.7rem;
        -webkit-line-clamp: 1;
    }
    
    .feature-item {
        font-size: 0.7rem;
        gap: 0.3rem;
    }
    
    .filters-container {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    
    .filter-group select {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Modal sur petits écrans */
    .detail-title {
        font-size: 0.85rem;
    }
    
    .detail-price .amount {
        font-size: 1rem;
    }
    
    .detail-badge {
        padding: 0.25rem 0.6rem;
        font-size: 0.6rem;
    }
    
    .detail-section-title {
        font-size: 0.9rem;
    }
    
    .detail-description-text {
        font-size: 0.8rem;
        max-height: 100px;
    }
    
    .detail-tag {
        padding: 0.3rem 0.5rem;
        font-size: 0.55rem;
    }
    
    .detail-contact-btn {
        padding: 0.7rem;
        font-size: 0.8rem;
    }
}

/* === ORIENTATION PAYSAGE SUR MOBILE === */
@media (max-height: 500px) and (orientation: landscape) {
    .properties-hero {
        min-height: 250px;
    }
    
    .properties-hero-content h1 {
        font-size: 1.6rem;
        margin-bottom: 0.5rem;
    }
    
    .properties-hero-content h1::after {
        margin-top: 0.5rem;
    }
    
    .properties-hero-content p {
        display: none;
    }
    
    .hero-stats {
        margin-top: 1rem;
    }
    
    .hero-stat-number {
        font-size: 1.3rem;
    }
    
    .scroll-indicator,
    .particle {
        display: none;
    }
    
    .filters-section {
        padding: 0.8rem;
    }
    
    .property-detail-container {
        max-height: 95vh;
    }
    
    .detail-header-section {
        padding: 0.8rem 1rem;
    }
    
    .detail-gallery-main {
        aspect-ratio: 16/7;
    }
}

/* === ÉCRANS HAUTE DENSITÉ (Retina) === */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .property-card {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }
    
    .property-card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    }
}

/* === PRÉFÉRENCE MOUVEMENT RÉDUIT === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .property-card:hover {
        transform: none;
    }
    
    .carousel-image {
        transition: none;
    }
}

/* === MODE SOMBRE (si supporté) === */
@media (prefers-color-scheme: dark) {
    /* Optionnel - décommenter pour activer le mode sombre
    :root {
        --bg-light: #1a1a2e;
        --bg-card: #16213e;
        --text-dark: #e8e8e8;
        --text-light: #b8b8b8;
        --border-color: #2a2a4a;
    }
    */
}

/* === PRINT === */
@media print {
    .properties-hero,
    .filters-section,
    .whatsapp-float,
    .carousel-nav,
    .card-agent {
        display: none !important;
    }
    
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .property-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
