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

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

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

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

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

main {
    padding: 0 50px;
    margin-top: 30px;
}

.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 img {
    object-fit: cover;
}

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

.euro {
    font-weight: 700;
}

.neutralStar {
    color: var(--main-bg-color)
}

.hebergements a,
.activities a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.header-logo {
    padding: 30px;
    display: flex;
    align-items: center;
}

.header-logo img { 
    width: 61px;
}

nav {
    width: 328.6px;
    height: 35px;
    padding: 0 25px;
    display: flex;
    justify-content: center;
}

nav ul {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 68px;
}

nav ul li a {
    text-decoration: none;
    color: initial;
    padding-top: 14px;
    border-top: 2px solid transparent;
}

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

/***** Search *****/
h1 {
    font-size: 22px;
    margin-bottom: 8px;
}

.recherche {
    display: flex;
    flex-direction: column;
    justify-content: left;
    gap: 35px;
    margin-bottom: 35px;
}

.recherche-bar {
    display: flex;
    align-items: center;
    height: 50px;
    width: 377px;
}

.recherche-bar label, 
.recherche-bar input,
.recherche-bar button {
    height: 100%;
    font-size: 18px;
}

.recherche-bar label {
    min-width: 50px; 
    background-color: var(--main-bg-color);
    border-radius: 15px 0 0 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fa-location-dot {
    color: black;
}

.recherche-bar input,
.recherche-bar button {
    font-weight: bold;
}

#recherche-location {
    border-right: none;
    border-left: none;
    border-top: 1px solid var(--main-bg-color);
    border-bottom: 1px solid var(--main-bg-color);
    width: 100%;
    text-align: center;
}

#recherche-location::-webkit-search-cancel-button { /* to center  placeholder with Chrome */
    display: none;
}

.recherche-bar input::placeholder {
    color: black;
    opacity: 1; /* pour Firefox */
} 

.recherche-bar button {
    border: none;
    background-color: var(--main-color);
    padding: 14px 16px;
    color: white;
}

#recherche-button-desktop {
    border-radius: 0 15px 15px 0;
}

#recherche-button-mobile {
    display: none;
}

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

.filters p {
    font-weight: bold;
}

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

.filters-sort { 
    display: flex;
    gap: 15px; 
    font-size: 17px;
}

.filters-sort li {
    height: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 17px;
    border: 2px solid #D9D9D9;
    border-radius: 25px; 
}

.filters-sort i { 
    width: 22px; 
    text-align: center;
}

.filters-sort li:hover {
    background-color: var(--filter-bg-color);
}

.recherche-text {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.fa-solid.fa-info {
    min-width: 24px;
    line-height: 22px;
    border: 1px solid #D9D9D9;
    border-radius: 50%;
    text-align: center;
}



/****** Hebergements et 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 ***********/
.hebergements {
    width: 65%;
}

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

.hebergements-cards .card {
    flex: 1 1 0;
    margin-top: 30px;
}

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

 .hebergements-cards .card-content {
    display: flex;
    flex-direction: column;
    padding: 5px 10px 10px 10px;
}

.hebergements-cards .card-subtitle {
    font-size: 14px;
    padding: 8px 0;
} 

.hebergements-cards .card-rating {
    font-size: 14px;
} 

.hebergements-text {
    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: 134px;
    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;
}

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

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


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

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

.activities-cards .card {
    padding: 0;
    flex: 1 1 0;
}

.activities-cards .card .card-content {
    padding: 20px 19px;
} 

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


/***** footer *****/
footer {
    margin: 0 50px;
    display: flex;
    background-color: var(--main-bg-color);
}

.footer-info {
    padding: 20px;
    flex: 1 1 0; 
}

footer ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
    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) {
    .filters {
        flex-direction: column;
        align-items: flex-start;
    }

    .filters-sort { 
        flex-wrap: wrap;
    }

    .filters-sort li p {
        font-size: 16px;
    }

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

    .hebergements {
        width: 100%;
    }

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

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

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

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

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

    .activities-cards .card .card-content {
        height: 70px;
        padding: 0 19px;
        display: flex;
        align-items: center;
    } 

    .activities-cards .card img {
        height: 200px;
    }

    footer {
        gap: 30px;
    }
}

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

    .activities-cards,
    .populaires-cards,
    .hebergements-cards, 
    header, 
    footer {
        flex-direction: column;
    }

    header {
        height: auto;
    }

    .header-logo {
        justify-content: center;
        width: 100%;
    }

    nav {
        width: 100%;
        padding: 0;
    }

    nav ul {
        gap: 0;
        width: 100%;
        justify-content: space-around;
    }

    nav ul li {
        flex: 1 1 0;
    }

    nav ul li a {
        display: inline-block;
        width: 100%;
        text-align: center;
        padding-top: 0;
        padding-bottom: 14px;
        border-bottom: 2px solid var(--main-bg-color)
    }

    nav ul li a:hover {
        color: var(--main-color);
        border-bottom: 2px solid var(--main-color);
        border-top: transparent;
    }

    .recherche {
        padding: 0 20px;
    }

    .recherche-bar {
        width: 100%;
    }

    #recherche-button-desktop {
        display: none;/*pour retirer le bouton rechercher*/
    }

    #recherche-button-mobile {
        display: unset;/*pour faire apparaitre le bouton avec la loupe*/
        border-radius: 15px;
    }

    #recherche-button-mobile i {
        color: white;
    }

    #recherche-location::-webkit-search-cancel-button { 
        display: unset;
    }

  
    .filters-sort li {
        padding: 4px 19px;
        flex: 1 1 47%; 
    }

    .filters-sort li p {
        font-size: 14px;
        white-space: nowrap;
    }

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

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

    .hebergements-and-populaires .populaires {
        margin-top: 0;
        padding: 30px 20px;
        gap: 15px;
    }

    .populaires-cards {
        gap: 0px;
    }

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

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

    .hebergements-and-populaires .hebergements {
        background-color: white;
        padding: 20px;
        margin-top: 0px;
    }

    .hebergements-cards {
        gap: 15px;
        margin-top: 15px;
    }

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

    .hebergements-text {
        margin-top: 15px;
    }

    .activities-cards {
        gap: 15px;
    }

    .activities-cards .card img {
        height: 141px;
    }

    .activities-cards .card .card-content {
        height: 59px;
    } 

    footer {
        margin: 0;
        padding: 30px;
        gap: 50px;
    }

    .footer-info {
        padding: 0;
    }

}