/****** General ***********/
* {
    font-family: 'Raleway', sans-serif;
}

:root {
    --main-color: #0065FC;
    --main-bg-color: #F2F2F2;
    --filter-bg-color: #DEEBFF;
}

.fa-solid {
    color: var(--main-color);
}

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    height: 100%;
}

a {
    text-decoration: none;
    color: black;
}

.neutral-star {
    color: var(--main-bg-color);
}

/****** Navbar ***********/

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 1;
}

.navbar-logo {
    width: 61px;
    padding: 1rem 2rem;
    height: auto;
}

.navbar-links {
    display: flex;
}

.navbar-links a {
    top: 0;
    padding: 1rem 2rem;
    text-decoration: none;
    color: black;
}

.navbar-links a:focus {
    border-top: var(--main-color) 2px solid;
    color: var(--main-color);
    outline: none;
}

/****** Introduction text ***********/

.introduction-text {
    margin-bottom: 35px;
}

.introduction-text h3 {
    margin-bottom: 0; 
}

.introduction-text p {
    margin-top: 8px; 
}

/****** Searchbar ***********/

.searchbar {
    width: 20%;
    max-width: 500px;
    background-color: var(--main-bg-color);
    display: flex;
    align-items: center;
    padding: 1px;
    border-radius: 10px;
    margin-left: 0; 
    margin-bottom: 35px;
}

.searchbar form {
    display: flex;
    align-items: center;
}

.searchbar i {
    color: black;
    margin-right: 15px;
    margin-left: 15px;
}

.searchbar input {
    border: none; 
    font-weight: bold;
    padding: 13px;
    font-size: 16px;
    flex-grow: 1;
}

.searchbar button {
    padding: 13px;
    background-color: var(--main-color);
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 0px 10px 10px 0px;
    cursor: pointer;
}

/****** Filters ***********/

.filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 35px;
}

.filters b {
    margin-right: 10px;
}

.theme-container {
    display: flex;
}

.theme {
    padding: 10px 20px;
    margin-right: 10px;
    border: solid 1px var(--main-bg-color);
    border-radius: 20px;
    align-items: center;
    display: flex;
    gap: 5px;
}

.theme:hover {
    background-color: var(--filter-bg-color);
    cursor: pointer;
}

/****** Info ***********/

.info {
    display: flex;
    align-items: center;
    margin-bottom: 35px;
}

.info i {
    margin-right: 10px;
    padding: 5px;
    border: 1px solid var(--filter-bg-color);
    border-radius: 50%;
    width: 10px;
    height: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
}

/****** Global Cards ***********/

.card img {
    object-fit: cover;
}

.card-content {
    background: white;
}

.card-content h3 {
    text-align: left;
}

.main-container {
    width: 100%;
    max-width: 1440px;
    padding: 0 50px;
    box-sizing: border-box;
}

.section-title {
    margin: 0;
    font-size: 22px;
}

.card {
    background-color: white;
    border-radius: 20px;
    padding: 5px;
    filter: drop-shadow(0px 3px 15px rgba(0, 0, 0, 0.1));
}

.card-title {
    font-size: 16px;
}

.euro {
    font-weight: 700;
}

/****** Hebergements And Populaires ***********/
.hebergements-and-populaires {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
}

.hebergements-and-populaires section {
    background-color: var(--main-bg-color);
    border-radius: 20px;
    padding: 30px;
    box-sizing: border-box;
}

/****** Hebergements ***********/
.hebergements {
    width: 65%;
}

.hebergements .populaires-title {
    margin-bottom: 33px;
}

.hebergements-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.hebergements-cards a {
    width: calc(33% - 20px);
    margin: 0;
}

.hebergements-cards img {
    border-radius: 20px 20px 0px 0px;
    width: 100%;
    height: 120px;
}

.hebergements-cards .card-content {
    margin: 5px;
}

.hebergements-cards .card-title, .card-subtitle {
    margin-top: 0;
    margin-bottom: 10px;
}

/****** Populaires ***********/
.populaires {
    width: 32%;
}

.populaires-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.populaires-cards .card {
    display: flex;
    margin-top: 33px;
}

.populaires-cards img {
    width: 33%;
    height: 136px;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

.populaires-cards .card-content {
    width: 67%;
    padding-left: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.populaires-cards .card-title {
    margin-top: 10px;
    margin-bottom: 4px;
}

.populaires-cards .card-subtitle {
    margin: 0;
}

.populaires-cards .card-rating {
    margin-bottom: 5px;
}

/****** Activity ***********/

.activity-title {
    padding-left: 40px;
    padding-bottom: 30px;
}

.activity-card-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px; 
    text-align: left;
}

.activity-card-container a {
    width: calc(90% / 4);
}

.activity-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease-in-out;
}

.activity-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.activity-card h3 {
    padding-left: 10px;
}

/****** Footer ***********/

footer {
    display: flex;
    margin-top: 50px;
    bottom: 0;
    justify-content: space-between;
    padding: 20px;
    background-color: var(--main-bg-color);
}

.footer-column {
    flex: 1;
    margin: 0 10px;
}

.footer-column h3 {
    margin-bottom: 10px;
}

.footer-column a {
    display: block;
    font-size: small;
    color: rgb(0, 0, 0);
    text-decoration: none;
    margin-bottom: 10px;
}

/* Le code ci-dessous correspond à la version responsive uniquement */

/****** Media queries ***********/
/* Medium devices (tablets, less/equal than 1024px) */
@media (max-width: 1024px) {
    /****** Searchbar ***********/

    .searchbar {
        width: 89%;
        max-width: 340px;
    }

    /****** Filters ***********/

    .filters {
        flex-direction: column;
        align-items: flex-start;
    }

    /****** Hébergement ***********/

    .hebergements-and-populaires {
        flex-direction: column;
    }

    .hebergements {
        width: 100%;
    }

    /****** Populaires ***********/

    .populaires {
        width: 100%;
        margin-top: 50px;
    }

    .populaires-cards {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    .populaires-cards a {
        top: 0;
        width: 31%;
    }

    .populaires-cards .card-title {
        font-size: 14px;
    }

    .populaires-cards .card-subtitle {
        font-size: 13px;
    }

    /****** Activity card ***********/

    .activity-card img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        transition: transform 0.3s ease-in-out;
    }
}

/* Small devices (phones, less than 768px) */
@media (max-width: 767.98px) {
    /****** Global ***********/
    .main-container {
        padding: 0;
    }

    /****** Navbar ***********/
    .navbar {
        position: sticky;
        justify-content: center;
        align-items: center;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
    }

    .navbar-logo {
        margin-top: 10px;
        margin-bottom: 10px;
        margin: auto;
        justify-content: center;
        display: flex;
    }
    
    .navbar-links {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        border-bottom: var(--main-bg-color) 1px solid;
        padding: 0;
    }

    .navbar-links a {
        flex-grow: 1;
        text-align: center;
        padding: 1rem 0; 
    }

    .navbar-links a:focus {
        border-top: 0;
        border-bottom: var(--main-color) 2px solid;
        color: var(--main-color);
        outline: none;
    }

    /****** Introduction text ***********/

    .introduction-text {
        font-size: large;
        margin-left: 15px;
        margin-right: 15px;
    }

    /****** Searchbar ***********/

    .searchbar {
        margin: 0 15px;
        width: 89%;
    }

    /****** Filters ***********/

    .filters, .info {
        margin: 15px;
    }

    .theme-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between; /* Ajouté pour l'espacement */
    }
    
    .theme {
        flex: 0 0 calc(50% - 10px); /* Modifié flex: 1 0 en flex: 0 0 */
        margin: 5px;
        box-sizing: border-box; /* Ajouté pour inclure la marge et le padding dans la largeur */
    }
    
    

    /****** Hebergement and populaires ***********/

    .hebergements-and-populaires {
        flex-direction: column;
    }

    .hebergements-and-populaires section {
        border-radius: 0;
    }

    .hebergements, .populaires {
        width: 100%;
    }

    /****** Populaires ***********/
    .populaires {
        order: 1;
    }

    .populaires-cards {
        flex-direction: column;
    }

    .populaires-cards a {
        width: 100%;
    }

    /****** Hebergements ***********/
    .hebergements {
        order: 2;
        background-color: white !important;
    }

    .hebergements-cards a {
        width: 100%;
        margin-bottom: 15px;
    }

    /****** Activity ***********/

    .activity-card {
        width: 100%;
    }

    .activity-card img {
        height: 250px;
    }

    /****** Footer ***********/

    footer {
        flex-direction: column;
    }

    .footer-column {
        margin: 15px 0;
        text-align: left;
    }

    .activity-card-container a {
        margin: 15px;
        width: 80%;
    }
    .activity-card img {
        height: 150px;
    }
}
