/* ==========================================================================
   MAP-FIRST EXPERIENCE - EXPÉRIENCE GÉOCENTRÉE RÉVOLUTIONNAIRE
   ========================================================================== */

/* Reset spécifique pour l'expérience Map-First */
.map-first-main {
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   CONTAINER PRINCIPAL - LAYOUT RÉVOLUTIONNAIRE
   ========================================================================== */

.map-first-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
    background: #f8fafc;
}

/* Ajustement pour le header */
.map-first-container {
    padding-top: var(--header-height, 80px);
    height: calc(100vh - var(--header-height, 80px));
}

/* ==========================================================================
   CARTE GÉANTE - 70% DE L'ÉCRAN
   ========================================================================== */

.map-main-section {
    flex: 0 0 70%;
    position: relative;
    background: #e2e8f0;
    overflow: hidden;
}

/* Header overlay sur la carte */
.map-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0.3), transparent);
    padding: 2rem;
    color: white;
}

.map-branding h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.map-tagline {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.highlight {
    background: linear-gradient(135deg, #5DBBF0, #4a9fd8);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
}

.property-count {
    color: #ffffff;
    font-weight: 600;
}

/* Navigation par quartiers */
.districts-navigation {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.district-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.district-btn:hover,
.district-btn.active {
    background: rgba(93, 187, 240, 0.9);
    border-color: rgba(93, 187, 240, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(93, 187, 240, 0.4);
}

.district-btn i {
    font-size: 1rem;
}

/* Carte interactive */
.map-first-interactive {
    width: 100%;
    height: 100%;
    background: #e2e8f0;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

/* Contrôles de carte */
.map-controls {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
}

.map-control-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    color: #374151;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.map-control-btn:hover {
    background: #5DBBF0;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(93, 187, 240, 0.4);
}

/* ==========================================================================
   SIDEBAR FLOTTANTE - 30% DE L'ÉCRAN
   ========================================================================== */

.property-sidebar {
    flex: 0 0 30%;
    background: white;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1001;
    transform: translateX(0);
    transition: transform 0.4s ease;
}

.property-sidebar.hidden {
    transform: translateX(100%);
}

/* Header de la sidebar */
.sidebar-header {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    position: relative;
}

.sidebar-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 0.5rem;
}

.sidebar-title p {
    color: #6b7280;
    font-size: 0.95rem;
}

.sidebar-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(107, 114, 128, 0.1);
    border: none;
    border-radius: 50%;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-close:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* Contenu de la sidebar */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* ==========================================================================
   ÉTAT DÉCOUVERTE - SIDEBAR INITIALE
   ========================================================================== */

.discovery-state {
    padding: 2rem;
    text-align: center;
    display: none;
}

.discovery-state.active {
    display: block;
}

.discovery-visual {
    margin-bottom: 2rem;
}

.discovery-visual i {
    font-size: 4rem;
    color: #5DBBF0;
    opacity: 0.8;
}

.discovery-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 1rem;
}

.discovery-state p {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Statistiques rapides */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}

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

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #5DBBF0;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Astuces d'exploration */
.discovery-tips {
    text-align: left;
    background: linear-gradient(135deg, rgba(93, 187, 240, 0.05), rgba(74, 159, 216, 0.05));
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(93, 187, 240, 0.1);
}

.discovery-tips h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 1rem;
}

.discovery-tips ul {
    list-style: none;
    padding: 0;
}

.discovery-tips li {
    padding: 0.5rem 0;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ==========================================================================
   ÉTAT SÉLECTION MAISON - SIDEBAR DYNAMIQUE
   ========================================================================== */

.property-details-state {
    display: none;
    animation: slideInRight 0.4s ease;
}

.property-details-state.active {
    display: block;
}

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

/* Image principale de la propriété */
.property-main-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.property-badge-large {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
    backdrop-filter: blur(10px);
}

.property-badge-large.nouveau {
    background: rgba(93, 187, 240, 0.9);
}

.property-badge-large.prix-reduit {
    background: rgba(16, 185, 129, 0.9);
}

.property-favorite-large {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    color: #ef4444;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.property-favorite-large:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Détails de la propriété */
.property-info {
    padding: 1.5rem;
}

.property-price-large {
    font-size: 2rem;
    font-weight: 700;
    color: #5DBBF0;
    margin-bottom: 0.5rem;
}

.property-title-large {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.property-location-large {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #5DBBF0;
    font-weight: 500;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: rgba(93, 187, 240, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(93, 187, 240, 0.1);
}

/* Caractéristiques détaillées */
.property-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #374151;
}

.feature-item i {
    width: 16px;
    color: #5DBBF0;
    font-size: 14px;
}

/* Description */
.property-description-large {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Points forts */
.property-highlights {
    background: linear-gradient(135deg, rgba(93, 187, 240, 0.05), rgba(74, 159, 216, 0.05));
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(93, 187, 240, 0.1);
    margin-bottom: 1.5rem;
}

.property-highlights h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 0.75rem;
}

.highlights-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.highlight-item i {
    color: #10b981;
    font-size: 12px;
}

/* ==========================================================================
   ACTIONS SIDEBAR
   ========================================================================== */

.sidebar-actions {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
    display: flex;
    gap: 1rem;
}

.action-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.action-btn.primary {
    background: #5DBBF0;
    color: white;
}

.action-btn.primary:hover {
    background: #4a9fd8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(93, 187, 240, 0.4);
}

.action-btn.secondary {
    background: white;
    color: #5DBBF0;
    border: 2px solid #5DBBF0;
}

.action-btn.secondary:hover {
    background: #5DBBF0;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(93, 187, 240, 0.3);
}

.action-btn i {
    font-size: 1rem;
}

/* ==========================================================================
   MARQUEURS PREMIUM POUR LA CARTE
   ========================================================================== */

.premium-marker {
    position: relative;
    cursor: pointer;
}

.marker-premium-pin {
    width: 40px;
    height: 50px;
    position: relative;
    animation: markerBounce 2s infinite ease-in-out;
}

.marker-premium-pin::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #5DBBF0, #4a9fd8);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    top: 0;
    left: 0;
    box-shadow: 0 8px 24px rgba(93, 187, 240, 0.4);
    border: 3px solid white;
}

.marker-premium-icon {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
    z-index: 2;
}

.marker-price-tag {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #1e3a5f;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    z-index: 3;
}

@keyframes markerBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Marqueurs spéciaux pour les coups de cœur */
.premium-marker.favorite .marker-premium-pin::before {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    animation: heartBeat 2s infinite ease-in-out;
}

.premium-marker.favorite .marker-premium-icon {
    color: white;
}

@keyframes heartBeat {
    0%, 100% {
        transform: rotate(-45deg) scale(1);
    }
    50% {
        transform: rotate(-45deg) scale(1.1);
    }
}

/* Preview hover pour les marqueurs */
.marker-preview {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    padding: 1rem;
    min-width: 220px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.premium-marker:hover .marker-preview {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

.preview-image {
    width: 100%;
    height: 80px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.preview-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 0.25rem;
}

.preview-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #5DBBF0;
    margin-bottom: 0.5rem;
}

.preview-details {
    font-size: 0.8rem;
    color: #6b7280;
    display: flex;
    gap: 0.75rem;
}

/* ===== GALLERY SECTION ===== */
.properties-gallery-section {
    background: #f8fafc;
    min-height: 100vh;
    padding: 80px 0;
}

/* Gallery Header */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.gallery-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0 0 8px 0;
}

.gallery-subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    margin: 0;
}

.property-count-gallery {
    font-weight: 600;
    color: #ffffff;
}

.view-controls {
    display: flex;
    gap: 8px;
}

.view-btn {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.view-btn:hover {
    background: #e2e8f0;
    color: #5dbbf0;
    border-color: #5dbbf0;
}

.view-btn.active {
    background: #5dbbf0;
    color: white;
    box-shadow: 0 2px 4px rgba(93, 187, 240, 0.2);
}

/* Gallery Filters */


/* Filtres simplifiés en ligne */
.simple-filters {
    margin: 0 20px 24px 20px;
    padding: 0;
}

.filter-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.simple-filter-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
}

.simple-filter-btn:hover {
    border-color: #5dbbf0;
    background: #f0f9ff;
    color: #1e3a5f;
}

.simple-filter-btn.active {
    background: #5dbbf0;
    border-color: #5dbbf0;
    color: white;
}

.filter-separator {
    color: #cbd5e1;
    font-weight: 600;
    margin: 0 4px;
    user-select: none;
}



.active-filters-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.active-filter-tag {
    background: #5dbbf0;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.active-filter-tag i {
    cursor: pointer;
    opacity: 0.8;
}

.active-filter-tag i:hover {
    opacity: 1;
}

.reset-filters {
    background: #f1f5f9;
    color: #6b7280;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.reset-filters:hover {
    background: #e2e8f0;
    color: #475569;
}

/* Gallery Results */
.gallery-results {
    padding: 0 20px;
    margin-bottom: 24px;
}

.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6b7280;
    font-size: 0.95rem;
}

.results-count {
    font-weight: 600;
    color: #1e3a5f;
}

.results-filters {
    font-style: italic;
}

/* Properties Grid */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 32px;
    padding: 0 20px;
}

.properties-grid.list-view {
    grid-template-columns: 1fr;
}

.properties-grid.list-view .property-card {
    display: block;
    max-width: none;
    padding: 16px 24px;
    margin-bottom: 8px;
}

.properties-grid.list-view .property-image {
    display: none;
}

.properties-grid.list-view .property-content {
    padding: 0;
}

/* Property Cards */
.property-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #5dbbf0;
}

.property-card.favorite {
    border-color: #dc2626;
}

.property-card.favorite::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #dc2626, #ef4444);
    border-radius: 18px;
    z-index: -1;
}

.property-image {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    position: relative;
    overflow: hidden;
}

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

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

.property-badges {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.property-badge {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e3a5f;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.property-badge.new {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.property-badge.exclusive {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.property-favorite {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.property-favorite:hover {
    background: white;
    transform: scale(1.1);
}

.property-favorite.active {
    background: #dc2626;
    color: white;
}

.property-favorite.active:hover {
    background: #b91c1c;
}

.property-content {
    padding: 24px;
}

.property-header {
    margin-bottom: 16px;
}

.property-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #5dbbf0;
    margin: 0 0 4px 0;
}

.property-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e3a5f;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.property-location {
    color: #6b7280;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.property-location i {
    color: #5dbbf0;
}

.property-features {
    display: flex;
    gap: 20px;
    margin: 16px 0;
    padding: 16px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.property-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.property-feature i {
    color: #5dbbf0;
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.property-feature-value {
    font-weight: 600;
    color: #1e3a5f;
    font-size: 0.95rem;
}

.property-feature-label {
    color: #6b7280;
    font-size: 0.8rem;
    margin-top: 2px;
}

.property-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.property-action-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.property-action-btn.primary {
    background: #5dbbf0;
    color: white;
}

.property-action-btn.primary:hover {
    background: #4da9d9;
}

.property-action-btn.secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.property-action-btn.secondary:hover {
    background: #e2e8f0;
    color: #334155;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
}

.no-results-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-results i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 24px;
}

.no-results h3 {
    font-size: 1.5rem;
    color: #1e3a5f;
    margin: 0 0 12px 0;
}

.no-results p {
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.btn-primary {
    background: #5dbbf0;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #4da9d9;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1024px) {
    .map-first-container {
        flex-direction: column;
        height: auto;
    }
    
    .map-main-section {
        flex: none;
        height: 60vh;
    }
    
    .property-sidebar {
        flex: none;
        height: auto;
        transform: translateX(0);
    }
    
    .property-sidebar.hidden {
        display: none;
    }
    
    .map-header-overlay {
        padding: 1rem;
    }
    
    .map-branding h1 {
        font-size: 1.8rem;
    }
    
    .districts-navigation {
        gap: 0.5rem;
    }
    
    .district-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .map-controls {
        top: auto;
        bottom: 1rem;
        right: 1rem;
        flex-direction: row;
        transform: none;
    }
    
    .map-control-btn {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 1024px) {
    /* Gallery responsive adjustments */
    .gallery-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    

    
    .filters-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .filters-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .properties-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 20px;
        padding: 0 10px;
    }
    
    .properties-grid.list-view .property-card {
        flex-direction: column;
    }
    
    .properties-grid.list-view .property-image {
        width: 100%;
        height: 240px;
    }
}

@media (max-width: 768px) {
    .simple-filters {
        margin: 0 10px 20px 10px;
    }
    
    .filter-buttons {
        gap: 6px;
        justify-content: flex-start;
    }
    
    .simple-filter-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    /* Masquer complètement la carte sur mobile */
    .map-first-container {
        display: none;
    }
    
    /* Afficher directement la section galerie */
    .properties-gallery-section {
        margin-top: 0;
        padding-top: 2rem;
    }
    
    .map-first-main {
        padding-top: 0;
    }
}



@media (max-width: 640px) {
    .map-header-overlay {
        padding: 0.5rem;
    }
    
    .map-branding h1 {
        font-size: 1rem;
    }
    
    .map-tagline {
        font-size: 0.75rem;
    }
    
    /* Gallery mobile styles */
    .gallery-title h2 {
        font-size: 1.8rem;
    }
    
    .gallery-subtitle {
        font-size: 1rem;
    }
    
    .simple-filters {
        margin: 0 5px 15px 5px;
    }
    
    .filter-buttons {
        gap: 4px;
    }
    
    .simple-filter-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .filter-separator {
        font-size: 0.75rem;
        margin: 0 2px;
    }
    
    .filters-header {
        display: none;
    }
    
    .filters-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 12px 16px;
        background: #f8fafc;
        border: 2px solid #e2e8f0;
        border-radius: 8px;
        font-size: 1rem;
        font-weight: 600;
        color: #1e3a5f;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .filters-toggle:hover {
        background: #e2e8f0;
        border-color: #5dbbf0;
    }
    
    .filters-toggle.active {
        background: #5dbbf0;
        color: white;
        border-color: #5dbbf0;
    }
    
    .filters-toggle.active .fa-chevron-down {
        transform: rotate(180deg);
    }
    
    .filters-row.collapsed {
        display: none;
    }
    
    .mobile-only {
        display: none;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 5px;
    }
    
    .property-card {
        border-radius: 12px;
    }
    
    .property-content {
        padding: 16px;
    }
    
    .property-price {
        font-size: 1.5rem;
    }
    
    .property-features {
        gap: 12px;
    }
    
    .property-feature-value {
        font-size: 0.9rem;
    }
    
    .property-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .active-filters {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .active-filters-list {
        justify-content: center;
    }
    
    .sidebar-header {
        padding: 1rem;
    }
    
    .sidebar-title h2 {
        font-size: 1.25rem;
    }
    
    .discovery-state {
        padding: 1rem;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .property-features {
        grid-template-columns: 1fr;
    }
    
    .sidebar-actions {
        flex-direction: column;
        padding: 1rem;
    }
}

/* ==========================================================================
   ANIMATIONS ET TRANSITIONS AVANCÉES
   ========================================================================== */

.map-first-container * {
    transition: all 0.3s ease;
}

/* Animation d'entrée pour la sidebar */
.property-sidebar {
    animation: slideInFromRight 0.6s ease-out;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animation pour les marqueurs */
.premium-marker {
    animation: fadeInUp 0.6s ease-out;
}

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

/* États de loading */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #5DBBF0;
}

.loading-spinner {
    animation: spin 1s linear infinite;
    font-size: 2rem;
    margin-bottom: 1rem;
}

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