@import url("./header.css");
@import url("./search.css");
@import url("./footer.css");

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

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

:root {
  --main-color: #0065fc;
  --main-bg-color: #f2f2f2;
  --filter-bg-color: #deebff;
}

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

html,
body {
  min-width: 320px;
}

body {
  display: block;
  margin: 0;
}

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

.main-container,
header,
footer {
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: 30px;
}

.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));
}

.card img {
  object-fit: cover;
}

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

.euro {
  font-weight: 700;
}

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

/********* Filters ***********/

.filters {
  display: flex;
  flex-direction: row;
  margin-bottom: 30px;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

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

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

.filters p {
  font-size: 18px;
  font-weight: bold;
}

.filter-btn {
  display: flex;
  font-size: 17px;
  font-weight: bold;
  background-color: white;
  border: #d9d9d9 2px solid;
  border-radius: 20px;
  height: 49px;
  cursor: pointer;
  padding: 15px;
}

.filter-btn:hover {
  background-color: #deebff;
}

.filters i {
  color: var(--main-color);
  height: 25px;
  width: 25px;
  padding-right: 8px;
}

.results {
  margin-bottom: 30px;
}

/********* Results Infos ***********/

.results-info {
  display: flex;
  margin: 15px 0 15px;
  align-items: center;
  text-align: center;
}

.results-info i {
  display: flex;
  text-align: center;
  justify-content: center;
  align-items: center;
  color: var(--main-color);
  border: #d9d9d9 1px solid;
  border-radius: 50%;
  height: 25px;
  width: 25px;
  padding: 0;
}

.results-info p {
  font-weight: 400;
  margin-left: 10px;
}

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

.hebergements-and-populaires {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 35px;
}

.hebergements-and-populaires section {
  background-color: var(--main-bg-color);
  border-radius: 20px;
  padding: 30px;
}

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

.hebergements {
  width: 65%;
}

.hebergements-title {
  display: flex;
}

.hebergements-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.hebergements-cards a {
  flex: 1 1 calc(33.33% - 20px);
}

.hebergement-card {
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.1);
}

.hebergement-card img {
  width: 100%;
  height: 124px;
  padding: 5px;
  object-fit: cover;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.hebergement-card .card-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hebergement-card .card-title {
  margin: 0 0 5px;
  font-size: 16px;
  font-weight: 700;
}

.hebergement-card .card-subtitle {
  font-size: 14px;
}

.hebergements-plus {
  padding-top: 20px;
}

.hebergements-plus h3 {
  display: inline;
}

.card-subtitle {
  padding-bottom: 5px;
}

/******** Populaires ***********/

.populaires {
  width: 32%;
}

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

.populaires-cards .populaire-card {
  display: flex;
  margin-top: 20px;
  background-color: white;
  border-radius: 20px;
}

.populaires-cards img {
  width: 33%;
  height: 136px;
  padding: 5px;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  object-fit: cover;
}

.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-rating {
  margin-bottom: 5px;
}

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

.activites {
  width: 100%;
}

.activites-title {
  margin-left: 30px;
  padding-top: 20px;
}

.activites-cards {
  display: flex;
  flex-wrap: wrap;
  padding: 30px;
  gap: 30px;
}

.activites-cards a {
  flex: 1 1 calc(25% - 30px);
}

.activite-card {
  display: flex;
  height: 439px;
  flex-direction: column;
  border-radius: 20px;
  box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.1);
}

.activite-card img {
  width: 100%;
  height: 90%;
  border-radius: 20px 20px 0 0;
  display: block;
}

.activite-card h3 {
  padding: 16px;
  flex-wrap: wrap;
  font-weight: bold;
}

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

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

@media (width <= 1024px) {
  .filters {
    display: flex;
    flex-direction: column;
    align-items: start;
  }

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

  .hebergements {
    width: 100%;
  }

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

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

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

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

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

  .activite-card {
    height: 270px;
  }

  .activite-card img {
    height: 75%;
  }
}

/* Small devices (phones, less than 768px) */
@media (width < 768px) {
  .main-container {
    padding: 0;
  }
  
header {
  padding-inline: 0;
}

  .header-title,
  .header-desc,
  .search-bar,
  .filters-results {
    margin-left: 30px;
    margin-right: 30px;
  }

  #search-desktop {
    display: none;
  }

  #search-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 15px;
    background: var(--main-color);
    color: white;
    box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.25);
  }

  .search-icon {
    font-size: 17px;
  }

  .filters {
    display: flex;
    flex-direction: column;
  }

  .filters-btn {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
  }

  .filter-btn {
    flex: 1 1 calc(50% - 10px);
    justify-content: center;
    height: 50px;
  }

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

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

  #hebergements {
    display: flex;
    flex-direction: column;
    background-color: white;
  }

  .hebergements-cards a {
    flex: 1 1 100%;
    height: 215px;
  }

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

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

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

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

  .activites-cards a {
    flex: 1 1 100%;
    height: 200px;
  }

  .activite-card img {
    object-fit: cover;
  }
}
