/****** General ***********/
html {
    scroll-behavior: smooth;
}


/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

img {
    object-fit: cover;
}

ul {
    list-style: none;
}

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

/* Font */
* {
    font-family: "Raleway", sans-serif;
}

:root {
    --main-color: #0065fc;
    --main-color-hover: #0056d3;
    --main-bg-color: #f2f2f2;
    --filter-bg-color: #deebff;
    --black-color: #000000;
    --white-color: #ffffff;
    --grey-color: #d9d9d9;
}

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

main {
    display: flex;
    flex-direction: column;
    gap: 35px;
    margin-bottom: 35px;
}

.main-container {
    max-width: 1440px;
    padding: 0 50px;
    margin: 0 auto;
}



/* Composants */
.section-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.card {
    background-color: var(--white-color);
    border-radius: 20px;
    padding: 5px;
    box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: scale(1.02);
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.15);
}

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

.euro {
    font-weight: 700;
}

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

/**************************************************************
*************************** Header ****************************
***************************************************************/
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.header-logo {
    width: 100px;
}

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

.header-nav ul {
    display: flex;
    gap: 68px;
    margin: 0;
}

.header-nav ul li {
    font-size: 16px;
    font-weight: 400;
}

/* Barre animée en haut au survol du menu */
.header-nav ul li a {
    position: relative;
    display: block;
    padding: 20px 0;
    transition: color 200ms ease-in-out;
}

.header-nav ul li a::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background-color: var(--main-color);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 200ms ease-in-out;
}

.header-nav ul li a:hover::before,
.header-nav ul li a:focus-visible::before {
    transform: scaleX(1);
}

/* Couleur du texte au hover/focus */
.header-nav ul li a:hover,
.header-nav ul li a:focus-visible {
    color: var(--main-color);
}

/**************************************************************
*************************** Search Section *******************
***************************************************************/

/*Titre et sous-titre*/
.search-section {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.search-info h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

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

/*Barre de recherche*/
.search-bar {
    display: flex;
    align-items: center;
    height: 49px;
    border: 1px solid var(--main-bg-color);
    border-radius: 15px;
    max-width: 377px;
}

.search-icon {
    background-color: var(--main-bg-color);
    border-radius: 15px 0 0 15px;
}

.search-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 49px;
    color: var(--black-color);
}

.search-input {
    flex: 1;
    height: 49px;
    border: none;
    border-block: 1px solid var(--main-bg-color);
    outline: none;
    padding: 0 24px;
    font-size: 18px;
    font-weight: 700;
    color: var(--black-color);
}

.search-input::placeholder {
    color: var(--black-color);
    opacity: 1;
}

.search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 49px;
    padding: 0 16px;
    background-color: var(--main-color);
    border: 1px solid var(--main-color);
    border-radius: 0 15px 15px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: var(--main-color-hover);
}

.search-button-text {
    color: var(--white-color);
    font-size: 18px;
    font-weight: 700;
}

.search-button-icon {
    display: none;
    color: var(--white-color);
}

/*Filtres*/
.filters-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filters-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.filters-buttons {
    display: flex;
    gap: 15px;
}

.filter-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0px 19px;
    border: 2px solid var(--grey-color);
    border-radius: 25px;
    background-color: var(--white-color);
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
    transition: background-color 0.3s ease;
}

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

.filter-button i {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    font-size: 22px;
}

/*Info section - + 500 logements*/
.info-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--grey-color);
    border-radius: 50%;
}

.info-icon i {
    font-size: 10px;
    color: var(--main-color);
}

.info-section p {
    font-size: 16px;
    margin: 0;
}

/**************************************************************
****************** 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;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

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

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

.hebergements-cards .card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 10px;
    height: 100%;
    overflow: hidden;
}

.hebergements-cards a {
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.hebergements-cards .card-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    padding-inline: 15px;
    gap: 8px;
}

.hebergements-cards .card-txt {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hebergements-cards .card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.hebergements-cards .card-subtitle {
    font-size: 14px;
    font-weight: 400;
    margin: 0;
    line-height: 1.2;
}

.hebergements-cards .card-rating {
    margin-top: auto;
}

.hebergements-link {
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    color: inherit;
}

.hebergements-link:hover {
    color: var(--main-color);
}

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

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

.populaires-cards {
    display: flex;
    flex-direction: column;
    gap: 33px;
}

.populaires-cards .card {
    display: flex;
}

.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;
    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;
    font-size: 14px;
}

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

/**************************************************************
*************************** Activités *************************
***************************************************************/
.activites {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.activites-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.activites-card {
    background-color: var(--white-color);
    border-radius: 20px;
    box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.activites-card:hover {
    transform: scale(1.02);
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.15);
}

.activites-card img {
    width: 100%;
    flex-grow: 1;
}

.activites-card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    padding: 20px 19px;
    color: var(--black-color);
    display: flex;
    align-items: center;
}

/**************************************************************
*************************** Footer *****************************
***************************************************************/
footer {
    background-color: var(--main-bg-color);
}

.footer-content {
    display: flex;
}

.footer-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 15px;
}

.footer-column h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--black-color);
    margin: 0;
}

.footer-column ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0;
    margin: 0;
}

.footer-column ul li a {
    font-size: 16px;
    font-weight: 400;
    color: var(--black-color);
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--main-color);
}

/************************************************************
/************************************************************
/******************* MEDIA QUERIES **************************
/*************************************************************
/*************************************************************/

/****************TABLETTE****************/
@media (max-width: 1023px) {

    /* Filtres */
    .filter-button span {
        font-size: 16px;
    }

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

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

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

    .populaires-cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    /************ Activités ****************/
    .activites-card {
        height: 270px;
    }

    .activites-card img {
        height: 200px;
        flex-grow: 0;
        flex-shrink: 0;
    }

    .activites-card-title {
        height: 70px;
    }
}

/*****************MOBILE****************/
@media screen and (max-width: 767px) {
    .main-container {
        padding: 0;
    }

    /************ Header ****************/
    .header-container {
        flex-direction: column;
        margin-bottom: 0;
        margin-bottom: 30px;
    }

    .header-logo {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 30px 0 30px 0;
    }

    .header-nav {
        width: 100%;
    }

    .header-nav ul {
        margin: 0;
        padding: 0;
        gap: 0;
        width: 100%;
    }

    .header-nav ul li {
        flex: 1;
        text-align: center;
    }

    .header-nav ul li a {
        padding: 14px 0;
        border-bottom: 2px solid var(--main-bg-color);
    }

    .header-nav ul li a::before {
        display: none;
    }

    .header-nav ul li a:hover,
    .header-nav ul li a:focus-visible {
        color: var(--main-color);
        border-bottom: 2px solid var(--main-color);
    }

    /************ Search Section ****************/
    .search-section {
        gap: 35px;
        padding: 0 20px;
    }

    .search-bar {
        max-width: 100%;
    }

    .search-input {
        font-size: clamp(14px, 4vw, 18px);
    }

    .search-button {
        width: 49px;
        height: 49px;
        padding: 0;
        border-radius: 15px;
        margin-left: -2rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .search-button-text {
        display: none;
    }

    .search-button-icon {
        display: block;
    }

    .filters-section {
        gap: 20px;
    }

    .filters-buttons {
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }

    .filter-button {
        font-size: 14px;
        padding: 0 15px;
        min-height: 50px;
        flex: 1;
    }

    .filter-button span {
        font-size: 14px;
    }

    /************ Hebergements And Populaires ****************/
    .hebergements-and-populaires {
        flex-direction: column;
        gap: 15px;
        justify-content: center;
        align-items: center;
    }

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

    /* Hebergements */
    .hebergements {
        order: 2;
        background-color: transparent !important;
        padding: 20px 0;
    }

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

    /* Populaires */
    .populaires {
        order: 1;
        width: 100%;
        margin: 0 -20px;
    }

    .populaires-cards {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    /************ Activités ****************/
    .activites {
        padding: 20px;
    }

    .activites-cards {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .activites-card {
        height: 200px;
    }

    .activites-card img {
        height: 141px;
        flex-grow: 0;
        flex-shrink: 0;
    }

    .activites-card-title {
        height: 70px;
    }

    /************ Footer ****************/
    .footer-content {
        padding: 20px;
        flex-direction: column;
    }


}