@import url("https://fonts.googleapis.com/css2?family=Raleway:wght@200;300;400;500;600;700;800;900&display=swap");

:root {
  --blue: #0065fc;
  --blueLight: #deebff;
  --grey: #f2f2f2;
}

/****** RÉGLAGES GÉNÉRAUX 
                          ******/

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Raleway", Verdana, Geneva, Tahoma, sans-serif;
  color: black;
  max-width: 1440px;
  margin: auto;
}

input::-webkit-input-placeholder {
  font-family: "Raleway", Verdana, Geneva, Tahoma, sans-serif;
  color: black;
}

input::-moz-placeholder {
  opacity: 1;
  font-family: "Raleway", Verdana, Geneva, Tahoma, sans-serif;
  color: black;
}

h1,
h2,
h3 {
  font-size: 1.4rem;
}

ul {
  list-style-type: none;
}

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

button,
input {
  border: none;
  background: transparent;
}

.blueStars {
  font-size: 0.7rem;
  color: var(--blue);
}

.greyStars {
  color: #d9d9d9;
}

.card {
  box-shadow: 0px 3px 20px rgb(153 153 153 / 30%);
}

.card:hover {
  transform: scale(1.05);
  transition: 0.3s;
}

.mainFooter a:hover {
  font-weight: 700;
}

/****** HEADER 
                ******/

header {
  min-height: 120px;
  padding: 0 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

#topNavbar ul {
  display: flex;
  flex-wrap: wrap;
}

#topNavbar li {
  min-width: 155px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 120px;
}

.navLinkLodg {
  border-top: solid 3px var(--blue);
}

.registerLink a {
  color: var(--blue);
  font-weight: 700;
}

/************/

#topNavbar li:hover {
  border-top: solid 3px var(--blue);
}

#topNavbar .navLinkAct a:hover {
  color: var(--blue);
}

#topNavbar ul:hover > .navLinkLodg {
  border-top: none;
}
#topNavbar ul:hover > .navLinkLodg a {
  color: black;
}

#topNavbar ul .navLinkLodg:hover {
  border-top: solid 3px var(--blue);
}
#topNavbar ul .navLinkLodg a:hover {
  color: var(--blue);
}

/****** RÉGLAGES DU MAIN 
                          ******/

main {
  padding: 0 55px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  column-gap: 35px;
}

main img {
  width: 100%;
  object-fit: cover;
}

/****** SECTION RECHERCHE 
                          ******/

#search {
  grid-column: 1 / 3;
  margin-bottom: 40px;
}

#searchTitle h1 {
  margin-bottom: 5px;
}

#searchSection {
  display: flex;
  max-width: 420px;
  height: 50px;
  border: solid 1px var(--grey);
  border-radius: 15px;
  overflow: hidden;
  margin: 20px 0 30px 0;
}

#searchSection label {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  background-color: var(--grey);
}

#searchSection label:hover {
  cursor: pointer;
}

#searchSection input {
  width: 235px;
  padding-left: 15px;
  font-size: 1em;
  font-weight: 700;
  color: black;
}

#searchButton {
  width: 135px;
  background-color: var(--blue);
  font-size: 1em;
  font-weight: 700;
  border-radius: 0 15px 15px 0;
  color: white;
}

#searchButton:hover {
  cursor: pointer;
  border: solid 5px var(--blueLight);
}

.fas.fa-search {
  display: none; /*** Icône loupe cachée en mode desktop ***/
}

.searchFilter p {
  font-weight: 700;
  font-size: 1.2rem;
}

.searchFilter {
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
  align-items: center;
  min-height: 50px;
}

.itemsContainer {
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
  align-items: center;
  min-height: 50px;
}

.filterItems {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 15px;
  padding-right: 15px;
  border: solid 2px var(--grey);
  border-radius: 40px;
  height: 50px;
}

.filterItems:hover {
  background-color: var(--blueLight);
  transition: 0.5s;
  cursor: pointer;
}

.filterItems i {
  height: 50px;
  width: 50px;
  border-radius: 50%;
  background-color: var(--blueLight);
  color: var(--blue);
  text-align: center;
  padding: 17px 0;
  margin-right: 15px;
}

.filterItems i:hover {
  background-color: white;
  transition: 0.5s;
}

#searchInfo {
  display: flex;
  align-items: baseline;
  margin-top: 20px;
}

#searchInfo i {
  margin-right: 0.6rem;
  border: solid 2px var(--grey);
  border-radius: 50%;
  color: var(--blue);
  font-size: 0.7rem;
  padding: 6px 10px;
}

/****** SECTION HÉBERGEMENTS 
                              ******/

#lodging {
  grid-column: 1 / 2;
  background-color: var(--grey);
  border-radius: 20px;
  padding: 50px 40px 0;
  margin-bottom: 60px;
}

#lodging h2 {
  margin-bottom: 30px;
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.card-container .card {
  background-color: white;
  width: 245px;
  height: 200px;
  margin-bottom: 30px;
  border: solid 5px #ffffff;
  border-radius: 20px;
  overflow: hidden;
}

.card-container .card img {
  height: 115px;
}

.card-body {
  padding: 7px 7px 3px 7px;
}

.card-body h4 {
  font-size: 1.07rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.card-body p {
  font-size: 13px;
  margin-bottom: 5px;
}

.more {
  font-weight: 700;
  margin-bottom: 50px;
}

/****** SECTION "POPULAIRES" 
                              ******/

aside {
  grid-column: 2 / 3;
  background-color: var(--grey);
  border-radius: 20px;
  padding: 50px 40px 40px;
  padding-bottom: 0px;
  margin-bottom: 60px;
}

#popular-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  font-size: 1.3rem;
}

#popular-title > i {
  font-size: 1.3rem;
}

aside .container {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

aside .container .card {
  background-color: white;
  width: 100%;
  height: 140px;
  margin-bottom: 30px;
  border: solid 5px #ffffff;
  border-radius: 20px;
  overflow: hidden;
}

.imgPopular {
  width: 130px;
  height: 140px;
}

aside .container .card a figure {
  display: flex;
}

.card-body {
  position: relative;
}

.popStar {
  position: absolute;
  bottom: 17px;
}

/****** SECTION ACTIVITÉS 
                          ******/

#activity {
  grid-column: 1 / 3;
  margin-bottom: 60px;
}

#activity h3 {
  margin-bottom: 30px;
}

.gridActivity {
  display: grid; /* Grille générale section activités */
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
}

.grid-1 {
  display: grid; /* Grille gauche en desktop et haute en smartphone */
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1.3fr 1fr;
  gap: 40px;
}

.grid-1 :nth-child(1) {
  grid-column-start: 1;
  grid-row-start: 1;
  grid-row-end: span 2;
}

.grid-2 {
  display: grid; /* Grille droite en desktop et basse en smartphone */
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 40px;
}

.grid-2 :nth-child(1) {
  grid-column-start: 1;
  grid-row-start: 1;
  grid-row-end: span 2;
}

.grid-1 .card {
  height: 100%;
  min-height: 180px;
  border-radius: 25px;
  position: relative;
  overflow: hidden;
}

.grid-2 .card {
  height: 100%;
  min-height: 180px;
  border-radius: 25px;
  position: relative;
  overflow: hidden;
}

.card-img-activity {
  height: 100%;
  position: absolute;
  border-radius: 25px 25px 30px 30px;
}

.card-body-activity {
  position: absolute;
  bottom: 0;
  background: white;
  width: 100%;
  border-radius: 0 0 25px 25px;
  padding: 20px 10px 20px 20px;
}

/****** FOOTER ******/

.mainFooter {
  display: flex;
  justify-content: flex-start;
  min-height: 220px;
  padding: 50px;
  background-color: var(--grey);
}

.footerNav {
  width: 450px;
  margin-right: 20px;
}

.footerTitle {
  font-size: 1.1rem;
  margin-bottom: 15px;
}
.footerNav a {
  display: inline-block;
  margin-bottom: 10px;
  margin-right: 40px;
}

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

@media (max-width: 1200px) {
  main {
    grid-template-columns: 1fr;
    column-gap: 0;
    grid-template-areas: /* template areas pour changement de position de sections */
      "search"
      "aside"
      "lodging";
    padding: 0 55px;
  }

  #search {
    grid-area: search;
    margin-bottom: 40px;
  }
  .searchFilter {
    padding-left: 0;
  }
  .itemsContainer {
    padding: 10px 0;
  }

  .filterItems {
    margin-bottom: 0.9rem;
    margin-left: 0px;
  }

  #lodging {
    grid-area: lodging;
    background-color: var(--grey);
    border-radius: 20px;
    padding: 50px 50px 0;
    margin-bottom: 60px;
  }

  aside {
    grid-area: aside;
    background-color: var(--grey);
    border-radius: 20px;
    padding: 50px 50px 0;
    margin-bottom: 60px;
  }
}

@media (max-width: 810px) {
  /*** tablettes "ipad" et liseuses "kindle" ***/

  header,
  main {
    padding: 0 1rem;
  }

  .card-container .card {
    width: 100%;
  }

  aside .container {
    align-items: center;
  }

  .gridActivity {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    row-gap: 2.5rem;
  }
}

@media (max-width: 600px) {
  /*** écran de faible largueur et smartphones ***/

  /* media600 header */

  header {
    padding: 0 0;
    height: 130px;
    margin-bottom: 30px;
  }

  #topLogo {
    margin-right: 150px;
    margin-left: 1.25rem;
    margin-top: 1rem;
  }

  #topNavbar {
    width: 100%;
  }

  #topNavbar ul {
    flex-wrap: nowrap;
  }

  #topNavbar li {
    height: 50px;
    margin-left: 0px;
    align-items: center;
    padding: 0 1.25rem;
  }

  .navLinkLodg {
    border-bottom: solid 3px var(--blue);
    border-top: none;
    width: 50%;
    margin-top: 1rem;
  }

  .navLinkAct {
    border-bottom: solid 3px var(--grey);
    width: 50%;
    margin-top: 1rem;
  }

  .registerLink {
    position: absolute;
    padding: 0 0rem;
    top: 1rem;
    right: 0;
  }

  #topNavbar li:hover {
    border-bottom: solid 3px var(--blue);
    border-top: none;
  }

  #topNavbar ul:hover > .navLinkLodg {
    border-bottom: none;
    border-top: none;
  }
  #topNavbar ul .navLinkLodg:hover {
    border-bottom: solid 3px var(--blue);
  }

  /* media600 réglages du main et de ses sections */

  main {
    padding: 0;
  }

  #search,
  #lodging,
  #popular,
  #activity {
    padding: 0 20px;
  }

  /* media600 section recherches */

  #searchTitle h1 {
    margin-bottom: 1rem;
  }

  #searchTitle {
    margin-bottom: 2rem;
  }
  #searchSection {
    width: 335px;
  }
  .searchFilter {
    padding: 0.625rem 0;
  }

  .fas.fa-search {
    display: initial; /*** Icône loupe affichée en mode smartphone ***/
  }

  #searchButton span {
    display: none; /*** Texte bouton caché en mode smartphone ***/
  }

  #searchButton {
    width: 50px;
    border-radius: 15px;
  }

  .searchFilter p {
    margin-bottom: 0.5rem;
  }

  .filterItems {
    margin-right: 5px;
    font-size: 1rem;
  }

  #searchInfo {
    margin: 0;
  }

  /* media600 réglages des cartes */

  aside .container .card {
    margin-bottom: 15px;
  }

  .card-container .card {
    margin-bottom: 15px;
  }

  /* media600 section les plus populaires */

  #popular {
    border-radius: 0;
    padding-top: 2rem;
    margin-bottom: 2.4rem;
  }

  /* media600 section hébergements */

  #lodging {
    border-radius: 0;
    background-color: unset;
    margin-bottom: 2.4rem;
  }

  .more {
    margin-bottom: 1rem;
    font-size: 1.2rem;
  }

  /* media600 section activités */

  .gridActivity {
    gap: 25px;
  }

  .grid-1,
  .grid-2 {
    grid-template-columns: 1fr;
    grid-template-rows: 3fr;
    gap: 25px;
  }

  /* media600 footer */

  .mainFooter {
    flex-direction: column;
    padding: 50px 50px 0 30px;
  }

  .footerNav {
    margin-bottom: 2rem;
  }
}

@media (max-width: 374px) {
  /*** écran de smartphones en dessous de 375px ***/

  #searchSection {
    width: 255px;
  }

  #searchSection label {
    display: none;
  }

  #searchSection input {
    width: 205px;
  }

  .filterItems {
    margin-right: 10px;
  }
}
