/* ================================
   Style général : titres et paragraphes
================================ */
p, h2 {
    text-align: center;
}

h2 {
    font-weight: bold;
}

/* ================================
   Barre de recherche Airbnb
================================ */
.search-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    padding: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    width: 60%;
    margin: 20px auto;
    flex-wrap: wrap; /* Adaptatif pour petits écrans */
}

.search-bar form {
    display: flex;
    width: 100%;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.search-field {
    display: flex;
    flex-direction: column;
    margin: 10px;
    min-width: 130px;
}

.search-field label {
    font-size: 12px;
    color: #555;
    margin-bottom: 5px;
    text-align: center;
}

.search-field select,
.search-field input {
    border: none;
    padding: 10px;
    border-radius: 25px;
    background: #f7f7f7;
    font-size: 14px;
    width: 150px;
    text-align: center;
}

.search-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
    position: static;
}

.search-button:hover {
    background: #0056b3;
}

/* ================================
   Listings : grille principale
================================ */
.listings {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

/* Carte individuelle de logement */
.listing {
    width: 300px;
    height: 250px;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: transparent;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.listing:hover {
    transform: scale(1.05);
}

/* Image de fond */
.listing-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Détails */
.details {
    position: absolute;
    bottom: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    z-index: 2;
}

.details h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.details p {
    font-size: 14px;
}

/* Note (rating) */
.rating {
    position: relative;
    margin-bottom: 5px;
    top: 190px;
    right: -230px;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.41);
    color: white;
    display: flex;
    align-items: center;
    z-index: 3;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

.rating-value {
    color: white;
    font-weight: bold;
}

/* Boutons favoris */
.buttons {
    position: absolute;
    bottom: 5px;
    display: flex;
    padding: 5px 10px;
    z-index: 2;
}

.heart-button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* Titre du logement */
.title-container {
    position: relative;
    border-radius: 10px;
    font-weight: bold;
    top: 10px;
    left: 10px;
    color: #f5f6f7;
    padding: 5px;
    background: rgba(0, 0, 0, 0.41);
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    display: inline-block;
    z-index: 3;
}

.title-container h3 {
    font-weight: bold;
    font-size: 15px;
    margin: 0;
    color: #fff;
}

/* ================================
   Responsive Tablette
================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .search-bar {
        width: 90%;
        padding: 15px;
    }

    .search-field input,
    .search-field select {
        width: 100%;
        font-size: 13px;
    }

    .search-button {
        width: auto;
        padding: 10px 16px;
    }
}

/* ================================
   Responsive Mobile
================================ */
@media (max-width: 768px) {
    .listings-group-wrapper {
        padding: 10px;
    }
    
    h2{
    font-size: 18px;
    font-weight: bold;
    }

    .region-group {
        margin-bottom: 30px;
    }

    .region-title {
        font-size: 18px;
        font-weight: bold;
        margin: 10px 0 15px 10px;
        color: #333;
    }
.listings.mobile-scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 15px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-padding-left: 0; /* ← assure que le snap commence au tout début */
    padding-left: 0 !important; /* ← neutralise tout décalage éventuel */
    margin-left: 0 !important; /* ← évite les décalages liés aux marges */
    justify-content: flex-start; /* ← très important */
}
   
.listings.mobile-scroll .listing {
    flex: 0 0 80%;
    min-width: 250px;
    max-width: 80%;
    height: 200px;
    scroll-snap-align: start;
    margin-left: 0 !important;
}

    .details h3,
    .title-container h3 {
        font-size: 14px;
    }

    .details p {
        font-size: 13px;
    }

    .rating {
        font-size: 13px;
        padding: 4px 8px;
        right: -200px;
        top: 185px;
    }

    .title-container h3 {
        font-size: 14px;
    }

    .heart-button {
        font-size: 18px;
    }
}