@font-face {
  font-family: "Minisim";
  src: url(../fonts/Minisim-Regular.ttf) format("truetype");
}

@font-face {
  font-family: "Cadara";
  src: url(../fonts/Candara_Bold.ttf) format("truetype");
}

@font-face {
  font-family: "Cadara-N";
  src: url(../fonts/Candara.ttf) format("truetype");
}

:root {
  --green: #9dc541;
  --blue: #00b7d7;
  --orange: #fdce6e;
}

* {
  box-sizing: border-box;
}

body {
  height: 100vh;
  margin: 0%;
  /* display: flex; */
  justify-content: center;
  align-items: center;
  position: relative;
}

#canvas3d {
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: -1;
}

.hidden {
  display: none !important;
}

.visible {
  display: flex;
  flex-direction: column;
}

/*-------------------Main page-------------------*/

h2 {
  font-family: "Cadara";
  color: white;
  text-shadow: 3px 3px 0 #000000b0;
  font-size: 3rem;
  text-align: center;
  letter-spacing: 1px;
  margin: 0;
}

p {
  font-family: "Cadara";
  color: white;
  text-shadow: 2px 3px 2px #000000d1;
  font-size: 2rem;
  letter-spacing: 1px;
  text-align: center;
  margin: 0;
}

.text-middle {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.middle {
  padding: 1rem;
  background-color: #ee7269;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  margin: 8px;
  font-family: "Cadara";
  /*position: absolute;*/
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 1.5rem;
  color: rgb(0, 0, 0);
  box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.462);
  transition: transform 0.2s ease;
  text-decoration: none;
    position: absolute;
  z-index: 2;
  cursor: pointer;
}

#btn-terre {
  background-color: var(--green);
  bottom: 18%;
  left: 15%;
}

#btn-air {
  background-color: var(--orange);
  top: 15%;
  right: 25%;
}

#btn-eau {
  background-color: var(--blue);
  bottom: 10%;
  right: 15%;
}

.btn-eau:active {
  background-color: #1769aa;
}

.btn-air:active {
  background-color: #d19547;
}

.btn-terre:active {
  background-color: #82a529;
}

.btn:hover {
  transform: scale(1.08);
}

.btn-retour {
  background-color: #fff;
  color: #333;
  border: 2px solid #333;
  margin: 32px auto 0 auto;
  display: block;
  width: fit-content;
  font-family: "Cadara";
  box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.2);
  position: absolute;
  top: 2%;
  left: 2%;
    cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.btn-retour:active {
  background-color: #e0e0e0;
  color: #000;
  border-color: #666;
}

/*-------------------Dialogue Narrateur-------------------*/

.text {
  background-color: white;
  border-radius: 50px;
  text-align: center;
  padding: 20px;
  padding-inline: 40px;
  margin-inline: 5px;
  font-size: 1.5rem;
  border: 3px black solid;
  font-family: "Cadara";
}

.dialogue-narrateur {
  /* position: absolute; */
  display: flex;
  justify-content: flex-end;
  align-items: center;
  bottom: 4%;
}

.img-narrateur img {
  height: 10rem;
}

/*-------------------Info grid-------------------*/

.popup-info-grid {
  /* position: absolute; */
  display: flex;
  justify-content: center;
  top: 15%;
}

.info-grid {
  display: grid;
  width: 80vw;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto 1fr;
  row-gap: 10rem;
  align-items: center;
}

.detail {
  align-items: center;
  border-radius: 20px;
  border: 5px solid rgb(0, 0, 0);
  box-shadow: 10px 10px black;
}

.nom {
  grid-column: span 3 / span 3;
  grid-column-start: 1;
  color: white;
  background-color: #f18fbbe1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-self: center;
  width: fit-content;
  padding-inline: 1.75rem;
}

.detail-image {
  grid-row-start: 2;
  display: flex;
  justify-content: flex-end;
  overflow: hidden;
  background-color: black;
}

.detail-image img {
  width: 100%;
  object-fit: cover;
  max-height: 500px;
}

.detail-text {
  grid-column-start: 3;
  grid-row-start: 2;

  font-family: "Cadara-N";
  color: black;
  height: fit-content;
  max-width: 450px;
  font-size: 1.5rem;
  padding-inline: 2rem;
  padding-block: 2rem;
  position: relative;
}

.detail-text i {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 2rem;
  cursor: pointer;
}

.insects {
  background-color: var(--blue);
}

.plants {
  background-color: var(--green);
}

.animaux {
  background-color: var(--orange);
}

/*----------------------------top name grid--------------------------*/
.sous-nom {
  text-align: center;
  font-family: "Cadara-N";
  font-size: 1.5rem;
}

.info-nom {
  font-family: "Minisim";
  color: white;
  text-align: center;
  font-size: 4rem;
}

.info-nom h3 {
  margin: 0;
  letter-spacing: 5px;
}

/*------------------------------------------------------*/


#mainpage {
  position: absolute;
  width: 99vw;
  height: 100vh;
  top: 0%;
  z-index: 1;
}

.text-center {
  width: 60%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#biome-terre,
#biome-air,
#biome-eau {
  position: absolute;
  width: 60vw;
  bottom: 3%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.pop-info{
  position: absolute;
  width: 100vw;
  height: 90vh;
  top: 10%;
  z-index: 2;
  overflow-y: auto;
  padding-bottom: 2rem;
  justify-content: space-between;
}

.pop-info .dialogue-narrateur{
  justify-content: center;
}

#loading-screen {
  width: 200px;
}
#loading-section {
  position: absolute;
  width: 100vw;
  height: 100vh;
  background-color: var(--blue);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3;
}