@import url('https://fonts.googleapis.com/css2?family=Concert+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Itim&display=swap');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  --gradient-color :  -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#edba6d));
  --gradient-color1 : -moz-linear-gradient(top, #ffffff, #edba6d);
  --gradient-color2 : linear-gradient(to bottom, #ffffff, #edba6d);
  --main-color : black;
  --main-typo : "Concert One", sans-serif; 
  --box-color : linear-gradient(180deg, rgba(117,65,226,1) 0%, rgba(64,36,124,1) 100%);
}

/* Positionnement du background */
body{
  background-color: #fcb242;;
  background-image:url(./img/Desktop_background.png);
  background-repeat: no-repeat;
  background-size: cover;
  height: 100%;
}
/* background mobile */
@media(max-width : 500px) {
  body{
    background-image: url(./img/Mobile_background.png);
    background-size: cover;
    background-repeat: no-repeat;
  }
}

/* Box Score */
header {
  height: 30vh;
  display: flex;
  flex-direction: row-reverse;
  padding: 2rem;
}
.score-background{
  background: var(--box-color);
  align-self: flex-end;
  height: 15vh;
  width: 15vw;
  border-radius: 1.5rem;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  font-family: var(--main-typo);
  color: white;
  .box{
    width: 50%;
    .box_title{
      max-width: 100%;
      max-height: 30%;
      font-size: 2.3rem;
    }
    .box_value{
      max-width: 100%;
      max-height: 70%;
      margin-top: 10%;
      font-size: 1rem;
      span{
        font-size: 3rem;
      }
    } 
  }
}
/* Version mobile */
@media (max-width : 450px){
  header{
    justify-content: center;
    height: 12vh;
    margin-top: 130px;
    padding-bottom: 10px;
  }
  .score-background{
    padding-bottom: 10%;
    padding-top: 2%;
    margin-top: 0;
    height: 12vh;
    width: 90%;
    .box {
      text-align: center;
      padding-right: 40px;
      .box_title {
        font-size: 1.5rem;
      }
      .box_value{
        font-size: 0.8rem;
        span {
          font-size: 2.5rem;
        }
      } 
    }
  }
}


/* SECTION HOME CONTAINNER  */

main{
  display: flex;
  justify-content: center;
  padding: 2rem;
}

.home-containner{
  background: var(--box-color);
  border-radius: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  width: 55%;
  height: 29rem;
  font-family: var(--main-typo);

  .welcome {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    background-color: #FFE5BF;
    margin-top: 2rem;
    margin-bottom: 2rem;
    height: 10rem;
    width: 75%;
    border-radius: 0.1rem;
    p {
      margin: 0.3rem;
      filter: drop-shadow(1px 2px 2px black);
      font-style: normal;
      font-size: x-large;
      span {
        font-style: italic;
        font-size: 2rem;
      }
    }
  }
  
  .former {
    form{
      margin-top: 3rem;
      
      label{
        color: white;
        margin-right: 2rem;
        font-size: 1.2rem;
      }
      input{
        width: 16rem;
        height : 1.8rem;
      }
    }
  }

  .button-containner {
    margin-top: 4rem;
    width: 90%;
    display: flex;
    justify-content: flex-end;

    .go-button {
      height: 3rem;
      width: 5rem;
      border-radius: 0.5rem;
      border-color: black;
      background-color: #FFE5BF;
      color: black;
      box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.75);
    }
    .go-button:hover {
      background-color: #FFA216;
      color: white;
    }
  }
}

/* MEDIA QUERIE SECTION HOME CONTAINNER  */

@media(max-width : 450px) {
  main{
  margin-top: 0rem;
 }
 .home-containner{
  width: 98%;
  height: 32rem;

  .welcome {
    width: 95%;
    p {
      font-size: larger;
    }
  }
  .former {
    form{
      margin-top: 1rem;
      display: flex;
      flex-direction: column;
      align-items: center;

      label{
        color: white;
        margin-right: 0rem;
        font-size: 1.2rem;
      }
      input{
        width: 16rem;
        height : 1.8rem;
        margin-top: 1rem;
      }
    }
  }
  .button-containner {
    margin-top: 4rem;
    width: 90%;
    display: flex;
    justify-content: center;

    .go-button {
      height: 3rem;
      width: 11rem;
    }
    .go-button:hover {
      background-color: #FFA216;
      color: white;
    }
  }
 }
}


/* quizz container */

.quizz-containner{
  background: var(--box-color);
  border-radius: 3rem;
  padding: 1rem;
  width: 55%;
  height: 29rem;
}

  #question {
    background-color: rgb(255, 229, 191);
    margin: 2rem 10.7rem;
    padding-top: 1rem;
    height: 8rem;
    width: 65%;text-align: center;
    p {
      margin-top: 1rem;
      filter: drop-shadow(1px 2px 2px black);
      font-family: var(--main-typo);
      font-style: normal;
      font-size: larger;
    }
  } 

article {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  border-radius: 5px;
  padding: 0 3.9rem;
  width: 100%;
  .answer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    border-radius: 5px;
    padding: 0 3.9rem;
    width: 100%;
    align-items: center;
    background-color: #FFE5BF;
    height: 4.7rem;
    width: 47%;
    margin-top: 2rem;
    border-radius: 0.5rem;
    border-color: whitesmoke;
    font-family: "Itim", cursive;
    font-weight: 400;
    font-style: normal;  
  }  
  .answer:hover {
    background-color: #ffa216;
    color: white;
  }
  .answer.true {
    background-color: green;
    animation-name: trueAnswer;
    animation-duration: 2s;
  }
  .answer.wrong {
    background-color: red;
    animation: wrongAnswer 2s;
  }
}

@keyframes trueAnswer {
  0% {
    transform: translate(0px, 0px);
  }
  17%{
    transform: translate(0px, -20px);
  }
  33%{
    transform: translate(0px, 0px);
  }
  50%{
    transform: translate(0px, -20px);
  }
  66%{
    transform: translate(0px, 0px);
  }
  83%{
    transform: translate(0px, -20px);
  }
  100%{
    transform: translate(0px, 0px);
  }
}

@keyframes wrongAnswer {
  0% {
    animation-timing-function: ease-out;
    transform: translateX(0);
  }

  5% {
    animation-timing-function: ease-in;
    transform: translateX(-30px);
  }

  15% {
    animation-timing-function: ease-out;
    transform: translateX(0);
  }

  25% {
    animation-timing-function: ease-in;
    transform: translateX(-40px);
  }

  38% {
    animation-timing-function: ease-out;
    transform: translateX(0);
  }

  52% {
    animation-timing-function: ease-in;
    transform: translateX(-50px);
  }

  70% {
    animation-timing-function: ease-out;
    transform: translateX(0);
  }

  85% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(-250px);
  }
}

/* MEDIA QUERIE SECTION QUIZZ CONTAINNER  */

@media(max-width : 450px) {
  main{
    margin-top: 0rem;
    padding: 0 1rem;
  }
  .quizz-containner {
    background: var(--box-color);
    width: 98%;
    height: 33.2rem;
  }
  #question {
    background-color: var(--box-color);
    margin: 0 0 0 1rem;
    padding: 0;
    height: auto;
    width: auto;
    flex-direction: column;
    justify-content: flex-start;
    text-align: left;

    p{
      color: white;
    }
  }

  article{
    display: flex;
    flex-direction: column;
    margin-top: 1rem;
    padding: 0;
    align-items: center;

    .answer{
      margin-top: 1rem;
      width: 90%;
      justify-content: flex-start;
      padding: 0.5rem;
    }
    .answer:active {
      background-color: #ffa216;
      color: white;
    }
    .answer.true {
      background-color: green;
      animation-name: trueAnswer;
      animation-duration: 2s;
    }
    .answer.wrong {
      background-color: red;
      animation: wrongAnswer 2s;
    }
  }
}

/* FOOTER  */
footer {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(0deg, rgba(255,222,174,1) 0%, rgb(158, 92, 6) 100%);
  height: 5rem;
  position: absolute;
  bottom: 0;
  width: 100%;
  font-family: var(--main-typo);
}
@media(max-width : 450px){
  footer {
    position: static;
    margin-top: 2%;
  }
}

/* Final page */
.final{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color : white;
  font-family: var(--main-typo);
  padding: 3rem;
  h2 {
    font-size: 3.5rem;
  }
  p{
    font-size: 2rem;
    text-align: center;
  }
  #replay {
    font-size: 1rem;
    align-self: flex-start;
  }
}
/* Page finale mobile */
@media (max-width : 450px) {
  .final{
    width: 98%;
    height: 30rem;
    margin-top: -5rem;
    h2 {
      font-size: 2.5rem;
    }
    p{
      font-size: 1.5rem;
    }
    #comment{
      font-size: 1rem;
      margin-bottom: 9rem;
    }
    #replay{
      align-self: center;
    }
  }
}