/****** General ***********/
* {
    font-family: 'Raleway', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

body {
    display: flex;
    justify-content: center;
    height: 100vh;
}

.main-container {
    justify-content: space-between;
    width: 100%;
    max-width: 1440px;
    padding: 0 50px;
}

a {
    color: inherit;
    text-decoration: none;
    border-radius: 20px;
}

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

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

.card img {
    object-fit: cover;
}

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

.euro {
    font-weight: 700;
}

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

/* ################################## */

.direction-row {
    display: flex;
    align-items: center;
}

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

.gap-35 {
    gap: 35px;
}

.margin-top-10 {
    margin-top: 10px;
}

.font-bold {
    font-weight: bold;
}

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

.border-radius-15 {
    border-radius: 15px;
}

h1,
h2,
h4,
.cursor-default {
    cursor: default;
}

/* ################################## */
/****** Header ***********/
header {
    height: 79px;
    display: flex;
    justify-content: space-between;
}

.logo {
    width: 162px;
    height: 79px;
}

nav {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    width: 344px;
    height: 35px;
}

nav a {
    position: relative;
    transition: color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

nav a::before {
    content: '';
    top: -15px;
    position: absolute;
    width: 100%;
    height: 2px;
    transition: background-color 0.3s ease;
}

nav a:hover {
    color: var(--main-color);
}

nav a:hover::before {
    background-color: var(--main-color);
    color: var(--main-color);
}

/****** groupe information ***********/
/* BARRE RECHERCHER */
.form {
    display: flex;
    height: 49px;
    width: 377px;
    box-shadow: inset 0 0 0 1px var(--main-bg-color);
}

.form .fa-location-dot {
    justify-content: center;
    color: black;
    width: 50px;
    background-color: var(--main-bg-color);
    border-radius: 15px 0 0 15px;
}

input[type="search"] {
    text-align: center;
    width: 52%;
    border: none;
    outline: none;
    background-color: transparent;
}

.btn-search {
    color: white;
    background-color: var(--main-color);
    border-radius: 0 15px 15px 0;
    cursor: pointer;
    border: none;
    width: 132px;
}

.fa-magnifying-glass {
    display: none;
}

/* FILTRE */
.titre-and-filtre,
.content-filtre {
    gap: 15px;
    box-sizing: border-box;
}

.btn-group {
    display: flex;
    gap: 15px;
}

.btn-filtre {
    justify-content: center;
    height: 50px;
    padding: 4px 19px;
    gap: 8px;
    border: solid 2px var(--filter-border-color);
    background-color: white;
    border-radius: 50px;
    cursor: pointer;
}

.btn-filtre:hover {
    background-color: var(--filter-bg-color);
}

.font-size-btn-filtre {
    font-size: 17px;
}

/* INFO */
.fa-info {
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 100%;
    border: solid 1px var(--filter-border-color);
    margin-right: 10px;
}


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

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

/*****  hebergements cards + populaires cards ******/
.populaires-cards .card-content,
.hebergements-cards .card-content {
    display: flex;
    flex-direction: column;
}

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

.hebergements-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 30px 0;
}

.hebergements-cards img {
    width: 100%;
    height: 136px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.hebergements-cards .card {
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.hebergements-cards .card-content {
    padding: 0 10px;
    gap: 8px;
    /* ajout pour aligner etoile */
    flex: 1;
}

.hebergements-cards .card-txt {
    /* ajout pour aligner etoile */
    flex: 1;
}

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

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

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

.populaires-cards a {
    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;
    justify-content: space-between;
}

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

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

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

/***** activités *****/
.activites {
    padding: 30px;
}

.activites-cards {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.activites-cards a {
    width: 33%;
}


.activites-cards .card {
    flex-direction: column;
    height: 100%;
    padding: 0px;
}

.activites-cards .card-title {
    /* ajout garder le titre au centre */
    display: flex;
    align-items: center;
    flex: 1;
    padding: 20px;
}

.activites-cards img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

/***** FOOTER  *****/
.footer {
    display: flex;
    background-color: var(--main-bg-color);
    padding: 20px 20px 50px;
}

.case-footer {
    width: 100%;
}

.liste-footer {
    list-style-type: none;
}

.liste-footer li {
    margin-top: 15px;
}

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

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

    /***** FILTRE *****/
    .titre-and-filtre {
        flex-direction: column;
        align-items: flex-start;
    }

    .font-size-btn-filtre {
        font-size: 16px;
    }

    /****** Hebergements And Populaires ***********/
    .hebergements-and-populaires {
        flex-direction: column;
        gap: 50px;
    }

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

    /*****  hebergements cards + populaires cards ******/
    .hebergements-cards .card-title,
    .populaires-cards .card-title {
        font-size: 14px;
    }

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

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

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

    /***** activités *****/
    .activites-cards img {
        height: 200px;
    }
}

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

    /***** header ******/
    header {
        flex-direction: column;
        align-items: center;
        height: 115px;
    }

    .logo {
        justify-content: center;
        width: 121px;
    }

    nav {
        width: 100%;
        align-items: flex-start;
    }

    nav a {
        width: 100%;
    }

    nav a::before {
        background-color: var(--main-bg-color);
        top: auto;
        bottom: -16px;
    }

    /****** groupe information ***********/
    .contenaire-info {
        padding: 0px 15px;
    }

    /* BARRE RECHERCHER */
    .form {
        width: 100%;
    }

    .rechercher {
        display: none;
    }

    .fa-magnifying-glass {
        display: block;
        color: white;
        font-size: medium;
    }

    input[type="search"] {
        flex: 1;
    }

    .btn-search {
        border-radius: 15px;
        width: 50px;
        box-shadow: 0px 2px 4px 0px #8B8B8B;
    }

    /* FILTER */
    .content-filtre {
        width: 100%;
        flex-direction: column;
    }

    .btn-group {
        width: 100%;
    }

    .btn-filtre {
        width: 100%;
    }

    .btn-filtre {
        justify-content: flex-start;
        padding: 0 5%;
        gap: 8%;
    }

    .btn-group:nth-child(1) .btn-filtre:nth-child(2) {
        order: -1;
    }

    .font-size-btn-filtre {
        font-size: 14px;
    }

    /****** Hebergements And Populaires ***********/
    .hebergements-and-populaires {
        gap: 15px;
    }

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

    .hebergements-and-populaires section:nth-child(2) {
        order: -1;
    }

    /****** Hebergements ***********/
    section.hebergements {
        background-color: transparent;
    }

    /*****  hebergements cards + populaires cards ******/
    .hebergements-cards,
    .populaires-cards {
        display: flex;
        flex-direction: column;
    }

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

    /***** activités *****/
    .activites-cards {
        flex-direction: column;
    }

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

    .activites-cards img {
        height: 141px;
    }

    /***** FOOTER  *****/
    .footer {
        flex-direction: column;
        padding: 30px 30px 60px;
        gap: 50px;
    }
}