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

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

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

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

.main-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1440px;
    min-width: 320px;
    padding: 0 50px;
}

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

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

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

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 5px;
}

.euro {
    font-weight: 700;
}

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

/****** Header ***********/
header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    max-width: 1440px;
    width: 100%;
}

.logo-container {
    max-height: 19px;
    max-width: 61px;
    padding: 1rem 2rem;
}

img.logo {
    height: 100%;
    width: 100%;
}

ul.nav-buttons-list {
    display: flex;
    flex-direction: row;
    gap: 68px;
    list-style: none;
    padding: 0 50px 0 50px;
}

.nav-buttons a {
    position: relative;
    display: inline-block;
    font-weight: 500;
    color: black;
    padding: 10px 0;
}

.nav-buttons a::after {
    content: "";
    position: absolute;
    left: 0;
    top: -1rem;
    width: 0%;
    height: 2px;
    background-color: var(--main-color);
}

.nav-buttons a:hover,
.nav-buttons a.active {
    color: var(--main-color);
}

.nav-buttons a:hover::after,
.nav-buttons a.active::after {
    width: 100%;
}

/****** Headline and search *******/
.headline {
    display: flex;
    flex-direction: column;
    margin-top: 30px;
    gap: 5px;
}

.headline-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
}

.headline h1 {
    font-size: 22px;
    margin: 0;
    font-weight: 700;
}

.headline p {
    font-size: 16px;
    margin: 0;
    font-weight: 400;
}

.form-container {
    margin-top: 24px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
}

i.fa-solid.fa-location-dot {
    border: 1px solid var(--main-bg-color);
    background-color: var(--main-bg-color);
    border-bottom-left-radius: 15px;
    border-top-left-radius: 15px;
    color: black;
    width: 50px;
    height: 49px;
    display: flex;
    justify-content: center;
    align-items: center;
}

form.search-form {
    display: flex;
}

input[type="text"] {
    border-top: 1px solid var(--main-bg-color);
    border-bottom: 1px solid var(--main-bg-color);
    border-left: none;
    border-right: none;
    padding-left: 30px;
    font-weight: 700;
    font-size: 18px;
}

::placeholder {
    color: black;
}

.search-button {
    background-color: var(--main-color);
    color: #FFFFFF;
    border: 1px solid var(--main-color);
    padding: 10px 20px;
    border-radius: 0 15px 15px 0;
    font-weight: 700;
}

.headline-filter {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.filter-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.filter-button {
    background-color: white;
    border: 2px solid #D9D9D9;
    padding: 10px 19px;
    border-radius: 25px;
    font-weight: 700;
}

.filter-button .fa-solid {
    margin-right: 5px;
}

.filter-button:hover {
    background-color: #DEEBFF;
}

.headline-info {
    font-size: 16px;
    color: #000000;
}

i.fa-solid.fa-circle-info {
    background: var(--main-color);
    color: white;
    border: 2px solid #D9D9D9;
    border-radius: 10px;
}

/****** Hebergements And Populaires ***********/

.hebergements-and-populaires {
    display: flex;
    flex-direction: row;
    gap: 40px;
    margin-top: 35px;
}

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

section.hebergements {
    display: flex;
    flex-direction: column;
    background: var(--main-bg-color);
    border-radius: 20px;
    box-sizing: border-box;
    padding: 1rem;
    width: calc(68% + 60px);
}

.hebergements-cards {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 30px;
    box-sizing: border-box;
    justify-content: center;
}

.hebergements-cards .card {
    flex-direction: row;
    min-width: 268px;
    box-sizing: border-box;
}

.hebergements .card-img-container {
    display: flex;
    height: 124px;
    overflow: hidden;
}

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

.hebergements-title {
    font-size: 22px;
    padding: 20px;
}

.hebergements .card-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    padding-left: 15px;
    box-sizing: border-box;
}

h3.card-title {
    margin: 0.5rem 0 0.5rem 0;
    font-size: 16px;
}

.hebergements .card-txt {
    padding: 0;
}

.card-rating {
    padding-bottom: 15px;
}

p.card-subtitle {
    font-size: 14px;
    margin: 0;
}

.hebergements-title-more {
    display: flex;
    border: none;
    font-weight: 700;
    font-size: 18px;
    padding: 1.5rem;
}

/****** Populaires ***********/
.populaires {
    display: flex;
    flex-direction: column;
    background: var(--main-bg-color);
    border-radius: 20px;
    padding: 30px;
    box-sizing: border-box;
}

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

.populaires-cards .card {
    display: flex;
    flex-direction: row;
    margin-top: 2rem;
}

.populaires .card-img-container {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 33%;
    height: 146px;
    overflow: hidden;
    box-sizing: border-box;
}

.populaires-cards img {
    box-sizing: border-box;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

.populaires-cards .card-content {
    width: 67%;
    padding-left: 0.5rem;
    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;
}

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

.activities-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    padding: 30px;
}

.activities-cards a {
    flex: 1 1 calc(25% - 22.5px);
    max-width: 297px;
}

.activities-cards .card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.activities-cards .card-img-container {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.activities-cards .card-img-container img {
    padding: 0;
}

.activities-cards .card-content {
    padding: 1rem;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}



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

.footer-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    background-color: var(--main-bg-color);
    margin-top: 30px;
}

ul.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 15px;
    padding: 20px;
    width: 100%;
}

.footer-links h2 {
    font-size: 18px;
    margin: 0;
    font-weight: 700;
}

.footer-links li {
    font-size: 16px;
    margin: 0;
    font-weight: 400;
}

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

/****** Media queries ***********/

@media (max-width: 1440px) {

    .hebergements {
        width: 68%;
        margin: 0;
    }

    .populaires {
        width: 32%;
        margin: 0;
    }

}


/* Medium devices (tablets, less/equal than 1024px) */

@media (max-width: 1024px) {
    .hebergements-and-populaires {
        flex-direction: column;
        max-width: 100% !important;
        gap: 30px;
    }

    .headline-filter {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding-bottom: 15px;
    }

    .filter-buttons {
        width: 100%;
        display: flex;
        flex-direction: row;
        gap: 10px;
    }

    .hebergements,
    .populaires {
        width: 100% !important;
        margin: 0;
    }

    .populaires-cards {
        display: flex;
        flex-direction: row;
        gap: 20px;
    }

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

    .populaires-cards .card {
        flex-direction: row;
        margin-top: 0.5rem;
    }

    .populaires-cards .card-content {
        width: 67%;
    }

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

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


    .activities-cards {
        width: 100%;
        padding: 0;
    }

}

/* Small devices (phones, less than 768px) */

@media (max-width: 767.98px) {

    .main-container {
        justify-content: center;
        padding: 0;
    }

    /* Header : logo centré + menu en dessous */
    .header {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .logo-container {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .logo {
        margin: 0 auto;
        padding: 20px 0 10px 0;
    }

    ul.nav-buttons-list {
        padding: 0;
        width: 100dvw;
        gap: 0;
    }

    .nav-buttons-list {
        flex-direction: row;
        justify-content: space-evenly;
        width: 100%;
        padding: 0;
        border-bottom: 2px solid var(--main-bg-color);
    }

    .nav-buttons-list li {
        width: 50dvw;
        text-align: center;
        padding: 15px 0;
    }

    .nav-buttons a {
        position: relative;
        display: inline-block;
        color: black;
        font-weight: 500;
        padding: 8px 0;
    }

    .nav-buttons a::after {
        content: "";
        position: absolute;
        left: 0;
        top: auto;
        bottom: -1rem;
        height: 2px;
        background-color: var(--main-color);
        width: 0%;
    }

    .nav-buttons a:hover {
        color: var(--main-color);
        width: 100%;
    }

    .nav-buttons a:hover::after {
        width: 100%;
    }

    .nav-buttons a.active {
        color: var(--main-color);
    }

    .nav-buttons a.active::after {
        width: 100%;
    }

    /* Headline / search */

    .headline {
        padding: 1rem;
    }

    .search-button {
        width: 49px;
        height: 49px;
        border-radius: 15px;
        padding: 0;
        font-size: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.2);
    }

    .search-button::before {
        content: "\f002";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 18px;
        color: white;
    }

    .form-container form {
        width: 100%;
        display: flex;
    }

    .search-form input[type="text"] {
        flex: 1;
        font-size: 16px;
        padding-left: 15px;
    }

    i.fa-location-dot {
        border-radius: 15px 0 0 15px;
    }

    /*  filtres */

    .headline-filter {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        display: flex;
    }

    .filter-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        align-items: stretch;
        justify-items: stretch;
        width: 100%;
    }

    .filter-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
        padding: 10px 0;
    }


    /* Hébergements & Populaires */
    .hebergements-and-populaires {
        flex-direction: column;
        gap: 0;
    }

    section.hebergements {
        width: 100% !important;
        order: 0;
        background: white;
    }

    section.populaires {
        order: -1;
        width: 100%;
        background-color: var(--main-bg-color);
        border-radius: 0;
    }

    /* Cartes hébergements / populaires / activités */
    .hebergements-cards,
    .populaires-cards {
        flex-direction: column;
        padding: 1rem;
    }

    .hebergements-title-more {
        padding: 0;
    }

    .activities-cards {
        flex-direction: column;
        display: flex;
        padding-left: 2rem;
    }

    /* Activités */

    .activities-cards a {
        max-width: 363px;
    }

    .activities-cards .card-img-container {
        height: 141px;
        display: flex;
        overflow: hidden;
    }

    .activities-title {
        padding-left: 2rem;
        align-items: center;
    }

    /* Footer */
    .footer-container {
        flex-direction: column;
    }

    .footer-links {
        max-width: 100%;
        padding: 20px 0;
    }
}