/*
  Project: QR Code Treasure Hunt
  Author: Alex Juré
  Date: 2026-01-18
  Description: Styles pour la page d'accueil pour accéder à l'énigme finale
*/
body {
    background-color: #020617;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: "JetBrains Mono",Arial, Helvetica, sans-serif;
}

/*Partie titre*/

.title {
    width: 90%;
    height: auto;
    text-align: center;
}

h1,
h2 {
    color: #22c55E;
}

h1 {
    font-size: 50px;
}

h2 {
    font-size: 30px;
}

/*Partie quiz*/

p {
    color: #94a3b8;
    font-size: 25px;
}

.formContainer {
    width: 70%;
    display: flex;
    justify-content: center;
}

form {
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    
}

form p{
    text-align: center;
    margin: 10px;
}

input{
    width: 200px;
    height: 20px;
    margin: 10px;
    padding: 14px 16px;
    background-color: #020617;
    color: #22c55E;
    border: 1px solid #22C55e;
    border-radius: 30px;
    font-size: 25px;
}

button{
    width: 200px;
    height: 60px;
    background-color: transparent;
    color: #22C55e;
    border: 1px solid #22C55e;
    border-radius: 15px;
    margin-top: 20px;
    font-size: 30px;
}

.errorMessage{
    display: flex;
    flex-direction: column;
    align-items: center;
}
.errorMessage h3{
    color: red;
    font-size: 30px;
}

.errorMessage p{
    color: #22C55e;
    font-size: 23px;
    margin: 10px;
}

.errorMessage i{
    color: red;
}

/* LOADER */

.hidden {
    display: none;
}

/*Height 32px, width 200px (a l'origine)*/

.loader{
    display: block;
    position: relative;
    height: 48px;
    width: 300px;
    background: #fff;
    border:2px solid #fff;
    color: #22C55e;
    overflow: hidden;
  }
  .loader::before{
    content: '';
    background: #22C55e;
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    animation: loading 3.5s linear infinite;
  }
  .loader:after{
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    font-size: 24px;
    line-height: 48px;
    color: rgb(0,255,255);
    mix-blend-mode: difference;
    animation: percentage 3.5s linear infinite;
  }
  
  @keyframes loading {
    0% { width: 0 }
    100% { width: 100% }
  }
  @keyframes percentage {
    0% { content: "0%"}
    5% { content: "5%"}
    10% { content: "10%"}
    20% { content: "20%"}
    30% { content: "30%"}
    40% { content: "40%"}
    50% { content: "50%"}
    60% { content: "60%"}
    70% { content: "70%"}
    80% { content: "80%"}
    90% { content: "90%"}
    95% { content: "95%"}
    96% { content: "96%"}
    97% { content: "97%"}
    98% { content: "98%"}
    99% { content: "99%"}
    100% { content: "100%"}
  }
  
/*Version tablette*/

@media screen and (min-width: 768px) and (max-width: 992px) {
  
  /*Partie titre*/
  .title{
    width: 80%;
  }
  
  h1{
    font-size: 40px;
  }

  h2{
    font-size: 20px;
  }

  /*Partie quiz*/

  p{
    font-size: 20px;
  }

  form p{
    margin-top: 5px;
  }

  input{
    width: 150px;
    height: 15px;
    font-size: 20px;
  }

  button{
    width: 150px;
    height: 50px;
    margin-top: 5px;
    font-size: 25px;
    font-size: 25px;
  }

  /*Message d'erreur*/

  .errorMessage h3{
    font-size: 25px;
  }

  .errorMessage p{
    font-size: 22px;
    margin-top: 5px;
  }

}

/*Version mobile*/

@media screen and (max-width:767px) {
  
  .title{
    width: 95%;
  }

  h1{
    font-size: 35px;
  }

  h2{
    font-size: 20px;
  }

  /*Partie quiz*/

  .formContainer{
    width: 90%;
  }

  form{
    width:100%;
  }

  form p{
    font-size: 20px;

  }

  input{
    width: 90%;  
    height: 10px;
    margin: 5px 0 0 0;
    font-size: 22px;
  }

  button{
    width: 50%;
    height: 50px;
    font-size: 25px;

  }
  /*Message d'erreur*/
  .errorMessage{
    width: 80%;
  }

  .errorMessage h3{
    text-align: center;
    font-size: 25px;
    margin: 15px 0 10px 0;
  }

  .errorMessage p{
    font-size: 22px;
    margin: 5px 0;
    text-align: justify;
  }

  /*Loader*/

  .loader{
    height: 32px;
    width: 200px;
  }

  .loader:after{
    line-height: 32px;
  }
}

/*W3C Validator ok*/