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

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

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

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

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

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

ul{
    margin: 0;
    padding: 0;
}

li{
    padding: 0;
    list-style: none;
}


.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));
    transition: 0.2s ease-out;
}

.card:hover{
    filter: drop-shadow(0px 3px 10px rgba(0, 0, 0, 0.3));
}

.card img {
    object-fit: cover;
}

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

.bold {
    font-weight: 700;
}

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

/***************** Header ********************/
header{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header img{
    height: 20px;
}

nav ul{
    height: 79px;
    display: flex;
}

nav li{
    padding-top: 16px;
    margin-left: 48px;
    border-top: 3px white solid;
    transition: border-top 0.4s ease-out;
}

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

/************ search-and-filters **************/
.search-and-filters{
    padding: 20px 0;
}

/************** Searchs *******************/
.searchs{
    display: flex;
}

.fa-location-dot{
    color: black;
    padding: 16px 15px 15px 17px;
    background-color: var(--main-bg-color);
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
}

input[type="search"]{
    padding: 15px;
    margin: 0;
    border: 2px var(--main-bg-color) solid;
}

button[type="submit"]{
    background-color: var(--main-color);
    color: white;
    border: 0;
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
    cursor: pointer;
    transition: 0.2s linear;
}

button[type="submit"]:hover{
    box-shadow: inset 8em 0 #4F96FF;
}

.button-text{
    padding: 15px;
}

.button-magnifying-glass-logo{
    display: none;
    border-radius: 15px;
    background-color:var(--main-color);
    padding: 8px;
}

.fa-magnifying-glass{
    color: white;
    padding: 10px;
}

/************** Filters *******************/
.filters{
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.filter-selection{
    display: flex;
    margin: 0 10px;
}

.element{
    margin-right: 15px;
    padding: 5px 20px 5px 10px;
    background-color: white;
    border-radius: 25px;
    display: flex;
    align-items: center;
    border: 2px var(--filter-border-color) solid;
    transition: 0.2s ease-out;
    cursor: pointer;
}

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

.element i{
    padding: 10px ;
}

/**************** Info *********************/
.info{
    display: flex;
    align-items: center;
}

.info i{
    padding: 6px 11px;
    margin: 10px;
    border: 1px var(--filter-border-color) solid;
    border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
}

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

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

/****** Hebergements ***********/
.hebergements {
    background-color: var(--main-bg-color);
    width: 65%;
}

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

.hebergements-cards .card {
    margin-top: 31px;
}

.hebergements-cards a{
    width: 31%;
}

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

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

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

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

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

.show-more{
    margin-top: 30px;
    margin-bottom: 0;
    font-size: 18px;
    transition: 0.2s;
}

.show-more:hover{
    color: #0065FC;
}

/****** Populaires ***********/
.populaires {
    background-color: var(--main-bg-color);
    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: 35%;
    height: 136px;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

.populaires-cards .card-content {
    width: 65%;
    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;
}

/*************** Activities *****************/
.activities {
    padding: 30px;
}

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

.activities-cards .card {
    padding: 0;
    margin-top: 30px;
}

.activities-cards a{
    width: 23%;
}

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

.activities-cards .card-title {
    height: 22px;
    display: flex;
    align-items: center;
    padding: 0 15px 20px 15px;
    margin-top: 15px;
}

/***************** Footer *********************/
footer{
    background-color: var(--main-bg-color);
    display: flex;
    justify-content: space-between;
}

footer div{
    padding: 15px;
    display: flex;
    flex-direction: column;
    width: 33%;
}

h4{
    font-weight: 700;
    padding: 8px;
    margin: 0;
}

footer li{
    padding: 8px;
    transition: 0.15s linear;
}

footer li:hover{
    color: var(--main-color);
}

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

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

    /* ******** filters ********* */
    .filters{
        flex-direction: column;
        align-items: flex-start;
        margin: 10px 0;
    }

    .filter-selection{
        margin-left: 0;
    }

    .info i{
        margin-left: 0;
    }

    /* ****** heb and pop ******* */
    .hebergements-and-populaires {
        flex-direction: column;
    }

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

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

    .hebergements {
        width: 100%;
    }

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

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

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

    /* ****** activities ******* */
    .activities-cards .card-title {
        height: 27px;
    }
    .activities-cards img{
        height: 200px;
    }
}

/***************** Small devices (phones, less than 768px) *****************/
@media (max-width: 768px) {
    /* ***** General ******* */
    section{
        margin: 15px;
    }

    .main-container {
        padding: 0;
        margin: 0;
    }

    /* ***** Header ******* */
    header{
        flex-direction: column;
    }

    header img{
        margin: 30px;
    }

    nav{
        width: 100%;
    }

    nav ul{
        height: 36px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        text-align: center;
    }
    
    nav li{
        border-top: 0;
        margin: 0;
        padding: 15px;
        border-bottom: 3px var(--main-bg-color) solid;
        transition: border-bottom 0.3s ease-out;
    }
    
    nav li:hover{
        border-top: 0;
        border-bottom: 3px var(--main-color) solid;
    }

    /* ***** Search ******* */
    .button-magnifying-glass-logo{
        display: initial;
    }

    input[type="search"]{
        border-right: 0;
    }

    .button-text{
        display: none;
    }

    /* ***** Filters ******* */
    .filter-selection{
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .element{
        margin: 0;
    }

    /* ***** Heb & pop ******* */
    .hebergements-and-populaires {
        flex-direction: column-reverse;
    }

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

    /* ***** populaires ******* */
    .populaires{
        margin: 0;
    }

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

    .populaires-cards .card{
        margin-top: 15px;
    }

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

    /* ***** hebergements ******* */
    .hebergements{
        background-color: unset;
        margin: 0;
    }

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

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

    .hebergements-cards a:nth-child(2){
        order: 6;
    }
    .hebergements-cards a:nth-child(3){
        order: 3;
    }
    .hebergements-cards a:nth-child(4){
        order: 4;
    }
    .hebergements-cards a:nth-child(5){
        order: 2;
    }
    .hebergements-cards a:last-child{
        order: 5;
    }

    /* ***** Activities ******* */
    .activities-cards{
        flex-direction: column;
    }

    .activities-cards .card-title{
        height: 22px;
    }

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

    .activities-cards img{
        height: 141px;
    }
    
    /* ******* Footer ********* */
    footer{
        flex-direction: column;
    }

    footer div{
        width: 100%;
    }
}