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

/********** Navbar ***********/
#navbar ul {
    gap: 68px;
}
#navbar ul li a:hover {
    color: var(--main-color);
    border-top: 2px solid var(--main-color);
    padding-top: calc(1rem - 2px);
}
#navbar img {
    width: 61px;
    height: 19px;
}

/**** Main ****/
#info_logo {
    width: 24px;  /* Taille du rond */
    height: 24px; /* Taille du rond */
    border-width: 1px;
}
#info_logo::before {
    font-size: 10px; /* Taille du texte correspondant à la hauteur */
}

/****** Search and Filters ***********/
#search-bar {
    width: 377px;
    height: 49px;
}
.search-form {
    border-left: none;
    border-right: none;
    border: 1px solid var(--main-bg-color);
    border-radius: 15px;
}
input::placeholder {
    color: black;
}
#search-btn .fa-solid {
    display: none;
}

/****** lodgements ***********/
.lodgements a {
    width: calc((100% - 60px) / 3);
}
.lodgements-cards .card-title {
    margin-top: 4px;
}
.lodgements-cards .card-content {
    height: 40%;
    width: 100%;
}
.lodgements-cards img {
    height: 124px;
}

/****** popular ***********/
.popular-cards img {
    height: 136px;
}
.popular-cards .card-title {
    margin-top: 10px;
}

/****** Activités ***********/
#activities {
    height: 560px;
}
.activities-cards a {
    width: calc((100% - 90px) / 4);
}
.activities-cards img {
    height: 86.5%;
}
.activities-cards a .card .card-txt {
    height: 13.4%;
    padding: 0 19px;
    align-items: center;
}

/******** Footer ***********/
#footer-nav {
    height: 8.62%;
}
.footer-div {
    width: calc((100%) / 3);
}

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

    /**** Filters ****/
    #flex-filters {
        height: 91px;
        width: 668px;
        gap: 20px;
        flex-direction: column;
        align-items: flex-start;
    }
    #filter-title {
        margin: 0;
    }
    #filters {
        height: 100%;
        width: 100%;
        margin: 0;
    }
    .filter-container {
        padding: 0;
        height: 46px;
        width: 100%;
    }
    .filter-link {
        font-size: 16px;
    }
    #filters-txt h2 {
        margin: 0;
    }

    /**** Main ****/

    /***** Lodgements and Popular *****/
    .lodgements-and-popular {
        flex-direction: column;
    }
    .lodgements {
        width: 100%;
        height: 43.75%;
    }
    .lodgements-cards .card {
        flex-basis: calc(50% - 60px);
    }
    .popular {
        width: 100%;
        margin-top: 20px;
        gap: 20px;
    }
    .popular-cards {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }
    .popular-cards a {
        width: 30%;
    }
    .popular-cards a .card {
        margin-top: 20px;
    }
    .popular-cards .card-title {
        font-size: 14px;
    }
    .popular-cards .card-subtitle {
        font-size: 13px;
    }

    /***** Activities *****/
    #activities {
        height: 390px;
    }
    .activities-cards {
        height: 270px;
    }
    .activities-cards .card a {
        width: calc((100% - 30px) / 4);
    }
    .activities-cards .card img {
        height: 74%;
    }
    .activities-cards a .card .card-txt {
        height: 26%;
        justify-self: center;
    }
    .activities-cards a .card .card-txt h3 {
        margin: 0;
        align-self: center;
    }
}

/* Small devices (phones, less than 768px) */
@media (max-width: 768px) {

    /* ... */
    .main-container {
        padding: 0;
    }
    header {
        display: flex;
        flex-direction: column;
        gap: 35px;
    }

    /**** Header ****/
    .title {
        margin: 0;
    }

    /* Navbar */
    #navbar {
        flex-direction: column;
        gap: 30px;
    }
    #navbar img {
        margin-top: 30px;
    }
    #navbar ul {
        display: flex;
        justify-content: center;
        width: 100%;
        gap: 0;
        padding: 0;
        margin: 0;
    }
    #navbar ul li {
        width: 100%;
        text-align: center;
    }
    #navbar ul li a {
        font-size: 19px;
        width: 100%;
        display: block;
        /* Permet de prendre toute la largeur */
        padding: 14px 0;
        /* Pour éviter un déplacement du texte au hover */
        border-bottom: 2px solid var(--main-bg-color);
        transition: border-color 0.3s ease, color 0.2s ease;
    }
    #navbar ul li a:hover {
        border: none;
        border-bottom: 2px solid var(--main-color)
    }

    /*** Search and Filters ***/
    #title-text,
    #search-bar,
    #flex-filters,
    #nb-results {
        padding-left: 20px;
        padding-right: 20px;
    }
    #flex-filters {
        padding: 0 20px 0 20px;
    }
    #search-input {
        width: calc((100% - 100px));
    }
    #search-btn span {
        display: none;
    }
    #search-bar {
        width: 100%;
    }
    #search-btn {
        width: 49px;
        border-radius: 15px;
        box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    }
    #search-btn .fa-solid {
        display: flex;
        height: 19px;
    }
    #flex-filters {
        width: 100%;
        height: 161px;
    }
    #filters {
        flex-flow: row wrap;
    }
    #flex-filters h2, .popular {
        margin: 0;
    }
    .filter-container {
        width: calc((100% - 15px) / 2);
    }
    .filter-link {
        font-size: 14px;
    }
    #nb-results {
        justify-content: left;
        align-items: center;
    }
    #nb-results p {
        margin-bottom: 0;
    }
    /**** Main ****/
    .popular {
        order: -1;
    }
    .popular-cards, .lodgements-cards, #activities, #footer-nav {
        flex-direction: column;
    }
    .popular-cards a,
    .lodgements-cards a, #display-more,
    .activities-cards a,
     footer, #footer-nav, .footer-div {
        width: 100%;
    }
    .lodgements {
        background-color: transparent;
    }
    #activities {
        min-height: 970px;
        padding: 30px;
    }
    .activities-cards {
        height: 200px;
        gap : 15px;
    }

    /**** Footer ****/
    #footer-nav {
        height: 100%;
        padding: 30px;
    }
}