@import url('https://fonts.googleapis.com/css2?family=Pirata+One&display=swap');
@import url("https://use.typekit.net/nkr4ztz.css");


body {
  margin: 0 10%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #bbf5ff;
  color: rgb(72, 62, 14);
  overflow: hidden;
  font-family: "Pirata One", cursive;
}

body.scroll-page {
  height: auto;
  min-height: 100vh;
  overflow-y: auto;
  justify-content: flex-start;
  align-items: stretch;
  padding: 40px 10%;
}

body.scroll-page h1 {
  text-align: center;
  width: 100%;
}

#page-accueil{
  background: linear-gradient(180deg, #29b6f6 0%, #f5e1b7 100%);}
 

/* GENERAL */

h1{
    font-size: 3rem;
}

h3 {
  font-size: 2rem;
}

h3, p{
font-family: "jaf-lapture", serif;  
}

p{ 
    max-width: 60%;
    font-size: 1.5rem;
}

nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px; /* un écart raisonnable */
  width: 100%;
}

span{
  font-size: 2rem;
}

/*-- PAGE CONNEXION --*/
.formulaire {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
 
  background-color: #dad0ac;
    font-family: "Pirata One", cursive;
    color: #5C5012;
}
 
/* TITRE */
.formulaire h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}
 
/* CONTENEUR DU FORMULAIRE */
.formulaire form {
    background: rgba(236, 227, 154, 0.8);
    border: 8px solid #5C5012;
    border-radius: 10px;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 280px;
    text-align: center;
}
 
/* INPUT */
.formulaire input[type="text"] {
    padding: 10px;
    border: 5px solid #5C5012;
    border-radius: 5px;
    font-size: 1.2rem;
    font-family: inherit;
    background: #fff9d7;
}
 
/* BUTTON */
.formulaire button[type="submit"],
.formulaire button {
    background: #ece39a;
    border: 6px solid #5C5012;
    padding: 10px;
    font-size: 1.4rem;
    cursor: pointer;
    border-radius: 6px;
    font-family: inherit;
}
 
.formulaire button:hover {
    background-color: #ffe34d;
}
 
/* LIEN */
.formulaire a {
    margin-top: 20px;
    font-size: 1.2rem;
    color: #5C5012;
    text-decoration: underline;
}
 
.formulaire a:hover {
    color: #3c350c;
}
 
 
 
 



/* BOUTONS */

button {
    margin: 10px 10px 10px 0;
    padding: 10px 20px;
    background: rgba(236, 227, 154, 1);
    border: 9px solid rgba(92, 80, 18, 1);
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    font-family: "Pirata One", cursive;
    font-size: 1.5rem;
}

button:hover {
    background-color: #ffe34d;
}

.table-wrapper {
  width: 100%;
  max-width: 1000px;
  overflow-x: auto;
  margin: 20px auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  border: 2px solid #5C5012;
  padding: 10px 12px;
  text-align: left;
  background: rgba(236, 227, 154, 0.9);
}

table th {
  background: rgba(92, 80, 18, 0.9);
  color: #fdf2c4;
}

.scores-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 20px 0 40px;
}

#scores-loader {
  text-align: center;
  margin: 20px 0;
  font-size: 1.2rem;
}

#scores-loader.hidden,
#scores-empty.hidden {
  display: none;
}

.btn-jouer {
    font-size: 3rem;
    background-color: rgb(98, 165, 62);
}

.btn-jouer:hover{
    background-color: rgb(44, 92, 18);
    border: 9px solid rgb(44, 92, 18);
    color: rgba(236, 227, 154, 1);
    border-radius: 0;
}

/*ACCUEIL*/

.intro{
    margin: 10%
}

#illu-mascotte{
  position: absolute;
  top: 0;
  right: 5%;
  width: 40vw;
  max-width: 1200px;
  height: auto;
  z-index: -1;
}

.menu {
    display: flex;
    flex-direction: row;
    gap: 20px;
}


/*NIVEAUX PYRAMIDE*/

#mascotte {
  position: absolute;
  width: 60px;
  pointer-events: none;
  display: flex;
  align-self: flex-end;
  z-index: 10;
}

.scene {
  position: relative;
  width: 100%;
  height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.pyramid {
  display: flex;
  flex-direction:column-reverse;
  align-items: stretch; 
  gap: 15px;
  width: 80%;
  max-width: 800px;
  position: relative;
}

.niv{
  position: absolute;
  right: 20px;
  top: 20px;
}

.level {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.rectangle {
  margin: 0 auto;
  height: 100px;
  background: rgba(236, 227, 154, 1);
  border: 9px solid rgba(92, 80, 18, 1);
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  font-size: 2rem;
  transition: width 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Effet d’apparition */
.rectangle {
  opacity: 0;
  transform: translateY(20px);
  animation: appear 0.5s forwards;
}

@keyframes appear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.level:nth-child(1) .rectangle { animation-delay: 1s; }
.level:nth-child(2) .rectangle { animation-delay: 0.8s; }
.level:nth-child(3) .rectangle { animation-delay: 0.6s; }
.level:nth-child(4) .rectangle { animation-delay: 0.4s; }
.level:nth-child(5) .rectangle { animation-delay: 0.2s; }

.rectangle button {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  border: none;
  border-radius: inherit;
  font: inherit;
  color: inherit;
  box-shadow: none;
  cursor: pointer;
}

#rectangle_nv1 {
  width: 80%;
}

#rectangle_nv2 {
  width: 63%;

}

#rectangle_nv3 {
  width: 47%;

}

#rectangle_nv4 {
  width: 31%;

}

#rectangle_nv5 {
  width: 15%;

}
.rectangle button:hover{
  background-color: rgba(92, 80, 18, 1);
  color: rgba(236, 227, 154, 1);
  border-radius: 0;
}

#game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* 👈 important pour éviter que tout colle au bas de la page */
  margin-top: 50px;
  min-height: 70vh;
}


/* timer */
 
#timer{
  align-self: flex-end;
  position: absolute;
  top: 15vh;
  right: 20vw;
  font-size: 2rem;
}
 
/* questions */
 
#question-container {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
 
/* Par défaut → pas de papyrus */
.scene {
  background: none;
}
 
/* Quand le jeu est actif → afficher le papyrus */
.scene.papyrus-active {
  background-image: url("img/papyrus.png");
  background-position: center; /* tu peux ajuster */
  background-size: contain;
  background-repeat: no-repeat;
 
}
 
.answers{
  display: flex;
  justify-content: center;
}

.answers button{
  font-family: "jaf-lapture", serif;
}

#question {
  max-width: 1000px;
} 
 


/* SCORES */

table {
  margin: 0 auto;
  border-collapse: collapse;
  width: 80%;
  max-height: 80vh;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  font-family: "jaf-lapture", serif;
  font-weight: 700;
  font-size: 1.5rem;
}

th, td {
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

th {
  background-color: rgba(255, 255, 255, 0.2);
  font-size: 1.1em;
}

tr:hover {
  background-color: rgba(255, 255, 255, 0.1);
}


/* GAGNE / PERDU */
 
#victoire, #perdu, .textresult, .score{
  margin: auto;
}
 
#victoire, #perdu{
  padding-top: 7vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
 
#perdu{
  background-color: #380B0C;
 
}
 
#victoire{
  background-color: #B0F2CE;
 
}
 
 
 
.textresult, .score, .lien-victoire{
  display: flex;
  font-family: "Pirata One";
  font-size: 3rem;
  margin-left: 7vw;
  color: #5C5012;
}
 
.btg, .lien-victoire{
  align-self:flex-start ;
  margin-left: 7vw;
 
 
}
 
.lien-victoire{
  font-size: 2.5rem;
}
 
.perdu{
  color: #ECE39A;
}
 
.score{
  font-size: 2rem;
}
 
.osiris{
  width: 60vw;
  height: 80vh;
  transform: rotate(200deg);
  display: flex;
  position: fixed;
  top: -39vh;
  right: -10vw;
}
 
.balance{
  height: 60vh;
  position: relative;
  top: 20px;
  left: 20px;
}
 
 
.sol{
  height: 10vh;
  width: 98vw;
  background-color: #ECE39A;
  display: flex;
  border: 12px solid #5C5012;
}
 
.perdusol{
  background-color: #585337;
}
 
