﻿/* Styles de base */
body {
    overflow-x: hidden;
}

/* Conteneur des résultats */
.results-container {
    width: 100%;
    min-height: 100vh;
}

/* Conteneur de la carte */
.map-container {
    display: none;
}

/* Contrôles mobiles */
.mobile-controls {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    width: auto;
    text-align: center;
}

/* Styles desktop (≥992px) */
@media (min-width: 992px) {
    .results-container {
        width: 60%;
        overflow-y: auto;
    }

    .map-container {
        display: block;
        width: 40%;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    #map {
        height: calc(100vh - 2rem) !important;
    }
}

/* Styles mobile (<992px) */
@media (max-width: 991.98px) {
    .map-container.mobile-visible {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1030;
        background-color: white;
    }

    /* Animation de transition */
    .map-container, .results-container {
        transition: all 0.3s ease-in-out;
    }

    /* Ajustements quand la carte est visible */
    body.map-visible .results-container {
        pointer-events: none;
    }

    body.map-visible .mobile-controls {
        position: fixed;
        z-index: 1050;
    }
}

/* Style pour le bouton toggle */
#toggleMapList {
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

#toggleMapList:hover {
    transform: scale(1.05);
}

/* Ajustement de la hauteur de la carte */
#map {
    min-height: 400px;
    height: 100%;
}