:root {
    --red-insa: #e42418;
    --nav-bg: rgba(0, 0, 0, 0.4);
    --sumeria: 5, 64, 62;
}

/* Gestion équipes
Equipes :
- samourai
- viking
- inka
- grec

*/

html:not(.main) #home-flex { display: none; }
html.main #info { display: none; } 
html.info body { overflow-y: scroll; }
html:not(.planning) #info-planning { display: none; }
html:not(.blouse) #info-blouse { display: none; }
html:not(.guide-ppa) #info-guide-ppa { display: none; }
html:not(.prevention) #info-prevention { display: none; }
html.ss-equipe #team { display: none; }
html.ss-equipe #menu { display: none; }
html:not(.ss-equipe) #no-team { display: none; }
html:not(.viking) #it-vik { display: none; }
html:not(.grec) #it-grec { display: none; }
html:not(.inka) #it-inka { display:none; }
html:not(.samourai) #it-sam { display:none; }
html.viking #info-mid-2 { background-image: url('../medias/fondviking.png'); }
html.samourai #info-mid-2 { background-image: url('../medias/fondsamourai.png'); }
html.grec #info-mid-2 { background-image: url('../medias/fondgrec.png'); }
html.inka #info-mid-2 { background-image: url('../medias/fondinka.png'); }
html.loading #home-flex { display: none; }
html.loading #info { display: none; }
html:not(.loading) #splash { display: none; }
html.loading #full-screen { display: none; }
html.viking #info-mid-2 { color: #fff; }
html.fs #fs-img { content:url("../medias/fsexit.svg"); }
/* html:not(.ss-equipe) #team-logo { display: none; } */

html.main { background-color: #ffffff; }


body {
    margin: 0;
    /* padding: 0; */
    padding: env(safe-area-inset-top, 16px) 
         env(safe-area-inset-right, 16px) 
         env(safe-area-inset-bottom, 16px) 
         env(safe-area-inset-left, 16px);
    width: 100dvw;
    height: 100dvh;
    overflow: hidden;
    box-sizing: border-box;
}

.gloria-hallelujah-regular {
  font-family: "Gloria Hallelujah", cursive;
  font-weight: 400;
  font-style: normal;
}

.pf-d-bureau-title {
  font-family: "Playfair Display", serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
}
.pf-d-tip {
    font-family: "Playfair Display", serif;
    font-optical-sizing: auto;
    font-weight: 800;
    font-style: normal;
}

.lato-regular {
  font-family: "Lato", sans-serifs;
  font-weight: 400;
  font-style: normal;
}

.lato-bold {
  font-family: "Lato", sans-serif;
  font-weight: 700;
  font-style: normal;
}

.lato-bold-italic {
  font-family: "Lato", sans-serif;
  font-weight: 700;
  font-style: italic;
}

.chokokutai-regular {
  font-family: "Chokokutai", system-ui;
  font-weight: 400;
  font-style: normal;
}

h1 {
    margin: 0;
}

h4 {
    margin: 0;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}


#popup {
    width: calc(min(500px, 100dvw - 2rem));
    z-index: 20;
    position: fixed;
    background-color: var(--red-insa);
    color: white;
    border-radius: 30px;
    padding: 1rem;
    text-align: center;
    margin: 1rem;
    border-style: solid;
    border-color: #fff;
    border-width: 2px;
    font-size: 1rem;
}

#backdrop {
    position: fixed;
    z-index: 5;
    left: 0;
    top: 0;
    width: 100dvw;
    height: 100dvh;
    /* display: block; */
    background: rgba(0, 0, 0, 0, 0.5);
    display: none;
}

#backdrop:not(.no-show) {
    display: block;
}

div.blur {
    width: 100%;
    height: 100%;
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
}


#home-flex {
    display: flex;
    align-content: flex-start;
    width: 100dvw;
    height: 100dvh;
    align-items: stretch;
    flex-direction: row;
    position: relative;
}

#bureau-container {
    display: flex;
    flex-direction: column;
    width: 35dvw;
    height: 100dvh;
    background-color: var(--nav-bg);
    position: absolute;
    z-index: 1;
    transform: translateX(-35dvw);
    transition: transform 0.5s ease-in-out;

}
.bureau-ouvert {
    transform: translateX(0) !important;
}

#bureau-header {
    display: flex;
    height: 8dvh;
    align-items: center;
    background-color: #fff;
    justify-content: space-between;
    padding: 0 20px;
}

#bureau-header img {
    max-height: 7dvh;
    margin-right: 1dvw;
    padding: 0.5dvh;
    background-color: white;
    cursor: pointer;
}
#close-nav {
    height: 5dvh;
    transition: transform 0.3s ease-in-out;
}
#close-nav:hover {
    transform: scale(1.1);
}
#menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    height: 84dvh;
    margin: 5% 0 5% 0;
}



.menu-item {
    display: flex;
    flex-wrap: nowrap;
    /* border: #000;
    border-radius: 3dvh;
    border-style: solid; */
    align-items: center;
    justify-content: center;
    height: 15%;
    width: 85%;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: none;
    background-color: #fff;
    transition: .3s;
    border-radius: 25px
}
.menu-item:hover {
    box-shadow: rgba(50, 50, 93, 0.25) 0px 30px 60px -12px inset, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px inset;
}

#no-team {
  height: 100%;
  width: 100%;
}

#no-t-text {
    color: #fff;
    font-size: 2.3rem;
    max-width: 100%;
    max-height: 100%;
    text-align: justify;
    text-justify: auto;
}

#scene-container {
    width: 100dvw;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 0.5rem solid;
    position: relative;
}

#scene-container canvas {
    display: block; /* Ensure it's a block element */
    /*  max-width: 100%;
     max-height: 100%;*/
    width: 100vw !important;
    height: 100vh !important;
 }



 .fs #scene-container {
     height: 100%;
 }

 #full-screen {
     display: none;
     position: absolute;
     bottom: 2%;
     right: 2%;
 }

 #fs-img {
     height: 5dvh;
     width: auto;
 }

 #map {
   display: block;
   position: absolute;
   bottom: 2%;
   right: 2%;
 }

 #map-img {
   height: 7dvh;
   width: auto;
 }

#menu-nav {
    display: block;
    position: absolute;
    top: 2%;
    left: 2%;
}

#menu-img {
    height: 7dvh;
    width: auto;
    cursor: pointer;
    transition: height 0.3s ease-in-out;
}
#menu-img:hover {
    height: 8dvh;
}


 #credit-main {
   color: #fff;
   position: absolute;
   bottom: 2%;
   left: 2%;
   font-size: 2rem;
 }
#credit-main:hover {
    color: #9a9898;
}

 #team {
     position: absolute;
     top: 2%;
     right: 2%;
     height: 25%;
     display: flex;
     flex-direction: column;
     justify-content: center;
 }

 .team-border {
     border-style: solid;
     border-color: #fff;
     border-radius: 3px;
 }

 .team-logo-Dsize {
     height: 100%;
     width: auto;
     padding: 2px;
 }

 .vikinsize {
     height: 100%;
     width: auto;
 }

 /* [id^="info-"] {
   min-height: 100dvh;
 }
 */

#info-planning, #info-blouse, #info-guide-ppa, #info-prevention {
  height: 100dvh;
}

#info-top {
    width: 100dvw;
    height: 90dvh;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-content: center;
    padding: 5%;
}

#back-arrow, #back-arrow-2, #back-arrow-3, #back-arrow-4 {
    width: 4dvw;
    height: auto;
    position: fixed;
    top: 5.5%;
    left: 5.5%;
    z-index: 1;
    transition: 0.3s ease-in-out;
}
#back-arrow:hover, #back-arrow-2:hover, #back-arrow-3:hover, #back-arrow-4:hover {
    transform: scale(1.25);
}

#ba-tip {
    position: fixed;
    left: 9%;
    top: 2%;
    height: 8dvw;
    width: 8dvw;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

#tip-text {
    max-height: 100%;
    max-width: 100%;
    font-size: 1.5rem;
    text-align: center;
}

.it-logo {
    width: 35%;
    height: auto;
    margin: auto;
    max-height: 100%;
}


#cross-img {
    height: 10%;
    width: auto;
    align-self: center;
}

#junction {
    height: 10dvh;
    width: 100dvw;
    display: flex;
    justify-content: center;
    padding-bottom: 2dvh;
}

#down-arrow {
    height: 100%;
    width: auto;
    position: relative;
    top: 0dvh;
}

.animate-down-arrow {
  animation: bounceAnim 0.5s ease-in-out 3;
}

@keyframes bounceAnim {
  0%   { top: 0px; }
  50%  { top: -4dvh; }
  100% { top: 0px; }
}



#info-mid, #info-mid-2, #info-mid-3, #info-mid-4 {
    display: flex;
    background-size: contain;
    background-repeat: repeat;
    flex-direction: column;
    min-height: 100dvh;
    min-width: 100dvw;
    margin-top: 2px;
}

#info-mid { background-color: var(--red-insa) };
#info-mid-2 { background-image: url('../medias/pattern_sa.jpg'); }
#info-mid-3 { background-image: url('../medias/pattern_sa.jpg'); }
#info-mid-4 { background-image: url('../medias/pattern_prev.jpg'); }

#info-mid {
  background-size: cover;
  background-repeat: no-repeat;
}

#corpus-title {
    margin-top: 7dvh;
    margin-right: 7dvh;
    display: flex;
    flex-direction: row;
    justify-content: end;
}

.title-content {
    max-width: 70%;
    font-size: 2rem;
    text-align: right;
    text-wrap: pretty;
}

#corpus {
    margin: 6dvh 20dvw 0 20dvw;
    padding-bottom: 4dvh;
}

.corpus-content {
    display: block;
    font-size: 1.4rem;
    text-align: justify;
    text-justify: inter-word;
}

#blouse-img-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.blouse-img {
  max-width: 70%;
  aspect-ratio: 1.0;
  height: auto;
}

#spec-img {
  margin-bottom: 2dvh;
}

#plan-img-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin: 3dvh 0 3dvh 0;
    max-height: 70dvh;
}

#planning-img {
    /* scale: 0.15; */
    /*max-width: 90dvw;*/
    max-height: 75dvh;
}

#last-bls-img {
  margin-bottom: 5dvh;
}

#bottom {
  height: 5dvh;
  max-height: 5dvh;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 5dvh;
}

/* // -------- Animation */
/* ........................................................; */
/* ........................................................ */


@keyframes fade-in {
  from {
    background-color: rgba(#000 0.25);
    opacity: 0;
    transform: translateY(50dvh);
  }
  to {
    background-color: rgba(#000 0);
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes main-fade-in {
  from {
    background-color: rgba(#000 0.25);
    opacity: 0;
  }
  to {
    background-color: rgba(#000 0);
    opacity: 1;
  }
}

@keyframes info-main-fade-in {
  from {
    transform: translateX(50dvw);
  }
  to {
    transform: translateX(0);
  }
}

#info-top.transition {
  animation: fade-in 1.5s forwards;
  background-color: rgba(#000 0.25);
  opacity: 0;
  transform: translateY(35dvh);
}

html.main-transition {
  animation: main-fade-in 0.5s forwards;
  background-color: rgba(#000 0.25);
  opacity: 0;
}

html.info-main-transition {
  animation: info-main-fade-in 1s forwards;
  transform: translateX(50dvw);
}


@media screen and (orientation: landscape) {
  .img-portrait {
    display:none;
  }

}


@media screen and (orientation: portrait) {
  html.fs #bureau-container { }
  html.fs #scene-container, #scene-container #canvas { height: 100dvh; }
  html.ss-equipe #scene-container {  height: 100dvh;}
  html.ss-equipe #bureau-container { height: 35% }
 
  .img-landscape {
    display:none;
  }


  #popup {
    font-size: 1.5rem;
    overflow-y: scroll;
    max-height: 80dvh;
  }
  #home-flex {
    flex-direction: column;
  }
  #bureau-container {
      display: flex;
      height: 100dvh;
    width: 100%;
      transform: translateY(-100dvh);
      transition: transform 0.5s ease-in-out;
  }
    .bureau-ouvert {
        transform: translateY(0) !important;
    }

  #menu {
    height: 84%;
  }
  .menu-item {
    font-size: 1.15rem;
  }
  #no-t-text {
    color: #fff;
    font-size: 4dvh;
  }
  #full-screen {
    display: none;
  }
  #credit-main {
    font-size: 2rem;
  }
  #info-top {
    flex-direction: column;
  }
  .it-logo {
    height: 35%;
    width: auto;
    max-width: 70%;
  }
  #back-arrow, #back-arrow-2, #back-arrow-3, #back-arrow-4{
    height: 8dvh;
    width: auto;
      left: 0;
    top: 0;
      margin-top: 15px;
      margin-left: 5px;
  }
  #ba-tip {
    top: 8%;
    left: 2%;
    height: 8dvh;
    width: 8dvh;
  }
  #tip-text {
    font-size: 1.2rem;
  }
  #corpus-title {
    padding-top: 5dvh;
    margin-top: 2px;
    /* margin-right: 4dvh; */
  }
  .title-content {
    font-size: 2rem;
  }
  #corpus {
    margin: 6dvh 13dvw 0 13dvw;
  }
  .corpus-content {
    font-size: 1.1rem;
  }
  #plan-img-container {
    max-height: none;
    align-items: start;
    margin: 0;
  }
  /*#planning-img {
    transform: rotate(90deg);
  }*/
  #bottom {
    font-size: 2rem;
  }
}

.no-show {
    display: none !important;
}
