/********************* Variables *********************/
:root {
  --blue: #0065fc;
  --lightblue: #deebff;
  --lightgray: #f2f2f2;
}

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

main {
  padding: 0 50px;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  text-decoration: none;
  color: #000;
}

a:visited {
  color: #000;
}

p {
  margin-top: 10px;
}

/********************* Header *********************/
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 60px 50px 60px;
}

header img {
  width: 70px;
}

header ul {
  display: flex;
}

header li a {
  padding: 35px 25px;
}

header li a:hover {
  color: var(--blue);
  border-top: 2px solid var(--blue);
}

/********************* Barre de recherche *********************/
form {
  display: flex;
  align-items: center;
  margin: 20px 0;
}

form > i {
  padding: 15px;
  border-radius: 10px 0 0 10px;
  background-color: var(--lightgray);
}

#city {
  padding: 13px 10px;
  border: 1px solid var(--lightgray);
  font-weight: bold;
  outline: none;
}

#submitSearchFormMobile {
  display: none;
}

#submitSearchForm {
  padding: 14px;
  border: none;
  border-radius: 0 10px 10px 0;
  background-color: var(--blue);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 200ms ease-in-out;
  outline: none;
}

#submitSearchForm:hover {
  transform: scale(1.05);
}

/********************* Filtres *********************/
#filters,
#filters ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

#filters h4 {
  margin-right: 15px;
}

#filters a {
  display: flex;
  align-items: center;
  padding: 0 15px;
  border: 2px solid var(--lightgray);
  border-radius: 999px;
  font-weight: bold;
  transition: background-color 200ms ease-in-out;
}

#filters ul i {
  padding: 15px;
  border: 2px solid transparent;
  border-radius: 50%;
  background-color: var(--lightblue);
  color: var(--blue);
  transition-property: transform, border-color;
  transition: 200ms ease-in-out;
  transform: scale(1.05) translateX(-15px);
}

#filters ul a:hover i {
  transform: scale(1.1) translateX(-15px) rotate(-20deg);
  border-color: var(--blue);
}

#filters ul a:hover {
  background-color: var(--lightblue);
}

#infoLink {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  margin-right: 5px;
  padding: 5px;
  border: 2px solid var(--lightgray);
  border-radius: 50%;
  color: var(--blue);
}

/********************* Sections *********************/
#sections {
  display: flex;
  flex-wrap: wrap;
  gap: 0 40px;
}

#sections section {
  margin: 30px 0;
  padding: 45px;
  border-radius: 25px;
}

#hebergements {
  flex: 2 60%;
  background-color: var(--lightgray);
}

#most_popular {
  flex: 1 30%;
  background-color: var(--lightgray);
}

#sections h2 {
  margin-bottom: 10px;
}

.stars > i {
  margin-top: 10px;
  color: var(--blue);
}

.stars .empty {
  color: var(--lightgray);
}

.cards {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 20px;
}

.card {
  flex: 30%;
  min-width: 250px;
  padding: 5px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition-property: box-shadow, transform;
  transition: 200ms ease-in-out;
}

.card-body {
  padding: 10px 15px;
}

.card:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
}

/********************* Hébergements *********************/
#hebergements .card img {
  width: 100%;
  height: 135px;
  border-radius: 15px 15px 0 0;
  object-fit: cover;
}

#hebergements > a {
  display: block;
  margin-top: 40px;
  font-size: 20px;
}

/********************* Les plus populaires *********************/
#most_popular .title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#most_popular .cards {
  flex-direction: column;
  justify-content: center;
}

#most_popular .card {
  display: flex;
  min-width: 280px;
  width: 100%;
  min-height: 180px;
  max-height: 180px;
}

#most_popular .card img {
  width: 35%;
  max-height: 100%;
  border-radius: 15px 0 0 15px;
  object-fit: cover;
}

#most_popular .card-body {
  display: flex;
  flex-direction: column;
}

#most_popular .stars {
  margin-top: auto;
}

/********************* Activités *********************/
#activities h2 {
  margin-top: 40px;
}

.row {
  display: flex;
  gap: 30px;
  margin-top: 20px;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
  max-height: 550px;
}

.activity {
  position: relative;
  flex: 1;
  border-radius: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition-property: transform, box-shadow;
  transition: 200ms ease-in-out;
}

.h45 {
  flex: 45%;
}

.h55 {
  flex: 55%;
}

.activity:hover {
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
  transform: scale(1.03);
}

.activity img {
  width: 100%;
  height: 90%;
  object-fit: cover;
}

.activity p {
  position: absolute;
  background: #fff;
  padding: 20px;
  bottom: 0;
  left: 0;
  height: 55px;
  width: 100%;
  font-weight: bold;
}

/********************* Footer *********************/
footer {
  margin-top: 70px;
  padding: 50px;
  background: var(--lightgray);
  display: flex;
}

footer > div {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

footer li {
  margin: 15px 0;
}

/********************* Media Queries *********************/

/***** Tablette *****/
@media all and (max-width: 992px) {
  .row {
    flex-direction: column;
  }
  .column {
    flex-direction: row;
  }
  .h45,
  .h55 {
    flex: 1;
  }
  .activity {
    min-height: 300px;
    max-height: 300px;
  }
  footer {
    flex-direction: column;
    gap: 30px;
  }
}

/***** Mobile *****/
@media all and (max-width: 768px) {
  main {
    padding: 0;
  }

  .container {
    padding: 0 20px;
  }

  /********************* Header *********************/
  header {
    flex-direction: column;
    padding: 20px 0;
  }

  header nav {
    width: 100%;
    margin-bottom: 10px;
  }

  header li {
    flex: 50%;
  }

  header li > a {
    padding: 40px 0 10px;
    text-align: center;
    display: block;
    border-bottom: 2px solid var(--lightgray);
  }

  header li > a:hover {
    border-top: none;
    border-bottom: 2px solid var(--blue);
  }

  /********************* Barre de recherche *********************/
  form {
    margin: 30px 0;
  }

  #submitSearchForm {
    display: none;
  }

  #submitSearchFormMobile {
    display: block;
    padding: 14px;
    border: none;
    border-radius: 10px;
    color: #fff;
    background-color: var(--blue);
    position: relative;
    right: 10px;
  }

  /********************* Filtres *********************/
  #filters {
    margin: 30px 0;
  }

  #info {
    margin-bottom: 30px;
  }

  /********************* Sections *********************/
  #sections section {
    margin: 0;
    padding: 45px 20px;
    border-radius: 0;
  }
  #most_popular {
    order: 1;
  }
  #most_popular .card {
    min-height: 140px;
    max-height: 140px;
  }
  #hebergements {
    background-color: #fff;
    order: 2;
  }
  .column {
    flex-direction: column;
    max-height: 999rem;
  }
  .activity {
    min-height: 300px;
    max-height: 300px;
  }
  .resize {
    object-position: center -300px;
  }
}

@media all and (max-width: 550px) {
  .activity {
    min-height: 250px;
    max-height: 250px;
  }
  .resize {
    object-position: center -150px;
  }
}
