/****** 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;
}

body {
    display: flex;
    justify-content: center;
}

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

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

.section-title {
    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;
}

.card img {
    object-fit: cover;
}

.euro,
h3 {
    font-weight: 700;
}

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

li {
    list-style-type: none;
}

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

/****** Header ******/

header {
    display: flex;
    justify-content: space-between;
}

.logo img {
    padding: 30px 0;
    width: 61px;
    height: auto;
}

.nav-links {
    display: flex;
    align-items: start;
    gap: 68px;
}

.nav-links li {
    border-top: transparent solid 2px;
    padding: 17px 0;
    transition: border-color 0.3s, color 0.3s;
}

.nav-links li:hover {
    color: var(--main-color);
    border-top: 2px solid var(--main-color);
}

/****** Search ******/

.search-container {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.title h1 {
    padding-bottom: 8px;
}

.search-bar {
    width: 377px;
    display: flex;
    align-items: center;
    border-radius: 15px;
}

.search-bar i {
    color: black;
}

.search-mobile i {
    color: #ffffff;
}

.search-form {
    height: 50px;
    width: 100%;
    display: flex;
}

.search-desktop {
    height: 100%;
    border-radius: 0 15px 15px 0;
    background-color: var(--main-color);
    border: none;
    padding: 15px 16px;
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.search-mobile {
    display: none;
}

::placeholder {
    text-align: center;
    font-weight: 700;
    color: black;
}

.location-icon {
    height: 100%;
    background-color: var(--main-bg-color);
    padding: 14px 16px;
    border-radius: 15px 0 0 15px;
    cursor: pointer;
}

#location {
    height: 100%;
    border: none;
    border: 1px solid var(--main-bg-color);
}

/****** Filtres ******/

.filters {
    display: flex;
    gap: 15px;
    font-weight: 700;
    align-items: center;
}

.sort-order {
    display: flex;
    gap: 10px;
}

.sort-order button {
    background-color: unset;
    font-size: 17px;
    font-weight: 700;
    border-radius: 25px;
    padding: 13px;
    border: 2px solid #D9D9D9;
    transition: background-color 0.3s, border-color 0.3s;
}

.sort-order .fa-solid {
    padding-right: 10px;
}

.sort-order button:hover {
    background-color: var(--filter-bg-color);
    border: 2px solid var(--main-color);
}

/****** Infos *****/

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

.infos-icon {
    width: 24px;
    height: 24px;
    border: 1px solid #D9D9D9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.infos-icon i {
    font-size: 12px;
}

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

.hebergements,
.populaires {
    background-color: var(--main-bg-color);
}

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

/****** Hebergements ***********/
.hebergements {
    width: 65%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

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

.hebergements-cards {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.section-card-1,
.section-card-2 {
    display: flex;
    width: 100%;
    gap: 30px;
}

.hebergements-cards .card-content {
    padding-left: 15px;
}

.hebergements-cards .card {
    padding: 4px;
    width: 33%;
}

.more-results {
    font-size: 18px;
    font-weight: 700;
    margin-top: 30px;
}

/****** 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-radius: 20px 0 0 20px;
}

.populaires-cards .card-content {
    padding-left: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

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

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

/****** Activités ******/

.activity {
    display: flex;
    flex-direction: column;
    margin: 30px;
}

.activity-title {
    margin: 30px 0;
}

.activity-cards {
    display: flex;
    gap: 30px;
}

.activity-cards h3 {
    padding: 20px 19px;
}

.activity-cards .card {
    width: 25%;
    padding: 0;
}

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

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

footer {
    background-color: var(--main-bg-color);
    display: flex;
    margin-top: 60px;
}

footer p {
    font-size: 18px;
    font-weight: 700;
}

footer li {
    margin-top: 20px;
}

footer section {
    padding: 20px;
    width: 33.333%;
    font-size: 18px;
    font-weight: 400;
}

ul {
    padding: 0;
}

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

/****** Media queries ***********/
/* Medium devices (tablets, less/equal than 1024px) */
@media (max-width: 1024px) {
    .hebergements-and-populaires {
        flex-direction: column;
        gap: 50px;
    }

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

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

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

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

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

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

    /****** Header ******/

    header {
        flex-direction: column;
    }

    .logo {
        display: flex;
        justify-content: center;
    }

    .nav-links {
        gap: 0;
        display: flex;
    }

    .nav-links li {
        display: flex;
        width: 50%;
        justify-content: center;
        border-top: none;
        border-bottom: transparent solid 2px;
        transition: border-color 0.3s, color 0.3s;
    }

    .nav-links li:hover {
        color: var(--main-color);
        border-top: none;
        border-bottom: 2px solid var(--main-color);
    }

    /****** Search ******/

    .search-container {
        padding: 0 20px;
        justify-content: center;
        align-items: center;
    }

    .search-desktop {
        display: none;
    }

    .search-mobile {
        height: 50px;
        width: 50px;
        border-radius: 15px;
        background-color: var(--main-color);
        border: none;
        color: white;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .search-container .title {
        text-align: center;
    }

    .search-form {
        justify-content: center;
    }

    .filters {
        flex-direction: column;
    }

    .sort-order {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .sort-order button {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 50px;
        font-size: 14px;
    }

    #location {
        border: none;
    }

    .search-bar {
        width: auto;
        border-top: 1px solid var(--main-bg-color);
        border-bottom: 1px solid var(--main-bg-color);
    }

    button.search-mobile {
        box-shadow: 0px 4px 4px 0px #00000040;
    }

    /****** Hebergements and populaires *****/

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

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

    .hebergements {
        background-color: unset;
    }

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

    .populaires {
        width: 100%;
    }

    .populaires-cards .card {
        display: flex;
        height: 146px;
        padding: 0;
    }

    .populaires-cards img {
        border-radius: 20px 0 0 20px;
        height: 146px;
        padding: 5px;
    }

    .populaires-cards .card-content {
        padding: 10px 5px 5px 15px;
    }

    /****** Hebergements ******/

    section .hebergements {
        background-color: unset;
    }

    .hebergements {
        width: 100%;
        gap: 0;
    }

    section .hebergements {
        background-color: unset;
    }

    .hebergements-title {
        margin-bottom: 30px;
    }

    .hebergements-cards {
        gap: 0;
    }

    .section-card-1,
    .section-card-2 {
        width: 100%;
        gap: 0;
        flex-direction: column;
    }

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

    .more-results {
        margin-top: 0;
    }


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

    .activity-cards {
        width: 100%;
        gap: 0;
        flex-direction: column;
    }

    .activity-cards .card {
        display: block;
        width: 100%;
        margin-bottom: 30px;
    }

    .hebergements-cards.card img,
    .activity-cards .card img {
        width: 100%;
        height: 141px;
    }

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

    footer {
        flex-direction: column;
    }

    footer section {
        width: 100%;
        padding: 30px;
    }
}
