/* **************************Variable************************* */

:root {
  --primary-color: #0065fc;
  --secondary-color: #deebff;
  --font-color: #f2f2f2;
  --border-line: #d9d9d9;
  --font1: Raleway;
}

/* **************************Element commun************************* */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font1);
  list-style: none;
}

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

/* ******************************HEADER************************* */
header {
  max-width: 1400px;
  margin: 0 auto;
}
/* NavBar*************************** */

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 30px;
}
.logo {
  width: 61px;
}
nav ul {
  display: flex;
  align-items: center;
  height: 100px;
}
nav ul li {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 150px;
  height: 100%;
  text-align: center;
  text-transform: capitalize;
  font-size: 16px;
  font-weight: 400;
}

nav ul li a {
  color: black;
  transition: 0.3s;
}

nav li a:hover:before {
  content: "";
  width: 100%;
  height: 2px;
  position: absolute;
  background: var(--primary-color);
  top: 0;
  left: 0;
}
nav ul li a:hover {
  color: var(--primary-color);
}

/* ******************************MAIN************************* */
main {
  max-width: 1400px;
  margin: 0 auto;
}

/* ******************************1er SECTION ************************** */
/* SearchBar**************************** */

.header-containers {
  margin: 0 30px;
}
.header-containers h1 {
  font-size: 22px;
  font-weight: 700;
  line-height: 40px;
}
.header-containers p {
  opacity: 0.5;
  font-size: 16px;
  font-weight: 400;
  line-height: 19px;
}
.header-containers p:last-child {
  font-size: 16px;
  font-weight: 400;
  margin: 30px 0;
}
.header-containers p i {
  color: var(--primary-color);
  font-size: 10px;
  border: 1px solid var(--border-line);
  border-radius: 50%;
  padding: 3px 5px;
}
.input-search {
  border: 1px solid var(--font-color);
  border-radius: 10px;
  height: 49px;
  display: flex;
  width: 350px;
  margin: 30px 0;
}
.input-search i {
  width: 10%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--font-color);
  border-radius: 10px 0 0 10px;
}
#searchBar {
  width: 50%;
  border: none;
  padding-left: 10px;
  font-size: 18px;
  font-weight: 700;
}
#searchBar:focus {
  color: var(--primary-color);
  outline: none;
}
#searchBar::placeholder {
  font-weight: bold;
  color: black;
}
#buttonSearch {
  width: 40%;
  border-radius: 0 10px 10px 0;
  background-color: var(--primary-color);
  border: none;
  font-size: 18px;
  font-weight: 700;
  color: var(--font-color);
  position: relative;
}

#buttonSearch:hover {
  cursor: pointer;
}
#buttonSearch i {
  display: none;
}
/* Filter**************************** */
#filter-containers {
  display: flex;
  align-items: center;
  gap: 20px;
}
.filter-flex {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
}
#filter-containers h2 {
  text-transform: capitalize;
  font-size: 18px;
  font-weight: 700;
}
.filter {
  height: 45px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-line);
  border-radius: 25px;
  transition: 0.3s ease;
  overflow: hidden;
}

.filter i {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 10px;
  font-size: 1.3em;
  color: var(--primary-color);
  transition: 0.3s;
}
.filter:hover {
  background-color: var(--secondary-color);
  cursor: pointer;
  transform: scale(1.05);
}

.filter p {
  font-size: 13px;
  font-weight: 900;
  word-wrap: break-word;
}

/* ******************************2e SECTION ************************** */
/* 1er Bloc Gauche**************************** */
.top {
  display: flex;
  justify-content: space-between;
}
#search-result {
  background-color: var(--font-color);
  padding: 42px 40px;
  margin: 0 20px;
  width: 65%;
  border-radius: 25px;
  font-size: 18px;
}
#search-result h2 {
  padding: 0 0 23px 0;
  font-size: 18px;
}
a[title="displayMore"] {
  display: inline-block;
  margin: 50px 0 20px 10px;

  color: black;
  font-weight: bold;
}

/* DisplayFlex des Résulats dans la 1er section*/
.search-result-containers {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 30px;
}

/* Boite ds results */
.card-results {
  padding: 3px;
  width: 30%;
  background-color: white;
  border-radius: 20px;
  box-shadow: 2px 2px 6px 0px rgb(0 0 0 / 38%);
}

.card-results img {
  object-fit: cover;
  height: 150px;
  width: 100%;
  border-radius: 17px 17px 0 0;
}

.card-results h3 {
  font-size: 13px;
  padding-left: 10px;
}
.card-results span {
  padding-left: 10px;
  font-size: 14px;
  font-weight: 400;
}
.stars {
  padding-bottom: 10px;
  padding-left: 10px;
}
.blue-star {
  color: var(--primary-color);
}
.silver-star {
  color: var(--font-color);
}

/* 2e Bloc -Droit********************************** */

.popular-result {
  background-color: var(--font-color);
  padding: 42px 40px;
  margin: 0 20px;
  width: 35%;
  border-radius: 25px;
}
.popular-result-title {
  display: flex;
  justify-content: space-between;
  padding: 0 0 23px 0;
}
.popular-result-title h2 {
  font-size: 18px;
}
.popular-result-title i {
  color: var(--primary-color);
}
.results-flex {
  height: 95%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  row-gap: 30px;
}
.results-right a {
  display: flex;
}
.results-right {
  width: 100%;
}
.results-right-contains {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 10px;
}
.results-right-contains span {
  padding-left: 0;
}
.results-right img {
  object-fit: cover;
  border-radius: 17px 0 0 17px;
  width: 40%;
}

/* ******************************3e SECTION ************************** */
#bottom {
  margin: 40px 20px;
}
#bottom > h2 {
  padding: 50px 0 20px 10px;
  font-size: 22px;
  font-weight: 700;
}
.bottom-containers {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 100%;
}
.card-bottom {
  width: 23%;
  padding: 0;
  border-radius: 20px;
  box-shadow: 2px 2px 6px 0px rgb(0 0 0 / 38%);
}
.bottom-containers h2 {
  height: 10%;
  font-size: 1em;
  font-weight: 700;
  display: flex;
  justify-content: left;
  align-items: center;
  padding-left: 20px;
  padding-bottom: 10px;
}
.bottom-containers img {
  object-fit: cover;
  border-radius: 17px 17px 0 0;
  width: 100%;
  height: 90%;
}

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

footer {
  max-width: 1400px;
  margin: 0 auto;
}
.footer-container {
  display: flex;
  margin: 70px 20px 0 20px;
  padding: 70px 45px;
  background-color: var(--font-color);
}
.footer {
  width: 33%;
}
.footer h3 {
  font-size: 18px;
  font-weight: 700;
  padding-bottom: 20px;
}
.footer a {
  font-size: 16px;
  font-weight: 400;
  line-height: 30px;
}

.footer a:hover {
  color: var(--primary-color);
}

/* *************************************************************************************** */
/* ************************************ANIMATION PAGE************************************* */
/* *************************************************************************************** */

/* Animation Section1*********************/

@keyframes animation1 {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
.card-results:hover {
  cursor: pointer;
  animation: animation1 1s ease 0s infinite normal none;
}

/* ANIMATION Section2 *********************/

@keyframes animation2 {
  0%,
  100% {
    transform: translateY(0);
  }
  10%,
  30%,
  50%,
  70% {
    transform: translateY(-8px);
  }
  20%,
  40%,
  60% {
    transform: translateY(8px);
  }
  80% {
    transform: translateY(6.4px);
  }
  90% {
    transform: translateY(-6.4px);
  }
}

.animHover:hover {
  cursor: pointer;
  animation: animation2 3s ease 0s infinite normal none;
}

/* ****************************BREAK POINT*************************** */

@media screen and (max-width: 992px) {
  /* **********header */
  .top {
    flex-direction: column;
    gap: 50px;
  }

  #searchBar {
    font-size: 14px;
  }
  .input-search {
    width: 50%;
  }
  .filter-flex {
    justify-content: space-around;
    padding: 0 20px;
  }

  /* **********1er section result left */
  #search-result {
    margin: 0 20px;
    width: 96%;
  }

  /* **********1er section popular Right */
  .popular-result {
    width: 96%;
  }
  .results-flex {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }
  .results-right {
    width: 31%;
  }

  /* **********2e Section Bottom */

  .card-bottom {
    width: 21%;
    /* height: 35vh; */
    max-height: 300px;
  }

  .bottom-containers img {
    height: 80%;
  }
  .bottom-containers h2 {
    height: 20%;
    justify-content: left;
    text-align: left;
  }
}
/* ****************************BREAK POINT*************************** */
@media screen and (max-width: 768px) {
  nav,
  .header-containers,
  #search-result,
  .popular-result,
  #bottom,
  footer {
    margin: 0 0;
  }

  /* **********header */
  nav a,
  .header-containers,
  p {
    margin: 5% 5%;
  }
  .header-containers h1 {
    line-height: 1;
  }
  .header-containers p {
    margin: 15px 0;
  }
  .header-containers {
    margin: 40px 40px 0 40px;
  }
  header p {
    margin: 0 5% 10% 5%;
  }
  nav {
    flex-direction: column;
  }
  nav ul {
    width: 100%;
    height: 50px;
  }
  nav ul li {
    margin: 0 0;
    width: 50%;
  }
  nav li a::before {
    content: "";
    width: 100%;
    height: 2px;
    position: absolute;
    background: var(--font-color);
    top: 100%;
    left: 0;
  }
  nav li a:hover:before {
    top: 100%;
  }

  .input-search {
    width: 100%;
  }

  /* **********Formulaire */

  #buttonSearch {
    width: 15%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  #searchBar {
    width: 75%;
  }
  #buttonSearch span {
    display: none;
  }
  #buttonSearch i {
    /* margin: 0 auto; */
    display: block;
    background: var(--primary-color);
    color: white;
    transform: translateX(-80%);
  }
  /* **********Filtre */

  #filter-containers {
    /* height: 180px;
    width: 95%;
    display: grid;
    grid-template-rows: 20% 50px 50px;
    grid-template-columns: 50% 50%;
    grid-template-areas:
      "Tit Tit"
      "eco fam"
      "rom ani";
    gap: 5%;
    padding-right: 0; */
    padding-right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    height: 100%;
  }
  .filter-flex {
    display: flex;
    flex-wrap: wrap;
    row-gap: 20px;
    column-gap: 3%;
    padding: 0;
  }
  .filter {
    flex: 1 1 47%;
    min-width: 150px;
    margin-left: 0;
    padding-left: 15px;
    justify-content: left;
  }
  /* #filter-containers + h2 {
    grid-area: Tit;
  }
  #filter-containers div:nth-child(2) {
    grid-area: eco;
  }
  #filter-containers div:nth-child(3) {
    grid-area: fam;
  }
  #filter-containers div:nth-child(4) {
    grid-area: rom;
  }
  #filter-containers div:last-child {
    grid-area: ani;
  } */

  /* **********Main */
  .top {
    flex-direction: column-reverse;
  }
  #search-result {
    background: none;
    width: 100%;
    border-radius: 0;
  }
  .popular-result {
    width: 100%;
    border-radius: 0;
  }
  .search-result-containers {
    flex-direction: column;
  }
  .results-flex {
    flex-direction: column;
    align-items: center;
  }
  .card-results {
    width: 100%;
  }
  a[title="displayMore"] {
    display: none;
  }
  #bottom {
    padding: 0 40px;
  }
  #bottom > h2 {
    width: 30%;
  }
  .bottom-containers {
    flex-direction: column;
  }
  .card-bottom {
    width: auto;
    height: 200px;
    margin: 15px 0;
  }

  /* **********footer */

  .footer-container {
    flex-direction: column;
    padding: 40px 50px;
    margin: 50px 0 0 0;
  }
  .footer {
    padding-bottom: 20px;
    width: 100%;
  }
}
