@keyframes circleA{ /* animation cerle placement des pieds*/
    0% {opacity: 1;transform:scale(1) rotateX(70deg); }
    50% {opacity: 0.7;transform:scale(0.5) rotateX(70deg)}
    100% {opacity: 1;transform:scale(1) rotateX(70deg); }
}

@keyframes circleB{ /* animation background écran sélection agences*/
  0% {opacity: 1;transform: translate3d(-67%,-55%,0) rotateZ(0deg); }
  50% {opacity: 0.9;transform: translate3d(-67%,-55%,0) rotateZ(180deg)}
  100% {opacity: 1;transform: translate3d(-67%,-55%,0) rotateZ(360deg); }  
  
}

@keyframes fadeUp{
    0% {opacity: 1;transform: translate3d( 0, 0, 0) scale(1); }
    100% {opacity: 0.3;transform: translate3d( 0, -50vh, 0) scale(0.5); }
}

@keyframes fadeOut{
    0% {opacity: 0;transform: scale(0); }    
    10% {opacity: 1;transform: scale(1); }
    70% {opacity: 1;transform: scale(1); }
    100% {opacity: 0;transform: scale(0); }
}

@keyframes redraw{
    0% {opacity: 1;}
    100% {opacity: .99;}
}

@keyframes fadeIn{
    0% {opacity: 0;}
    100% {opacity: 1;}
}

@keyframes counterAnim{
    0% {opacity: 1;transform:translate3d(-50%,-50%,0) scale(1);}
    100% {opacity: 0.3;transform:translate3d(-50%,-50%,0) scale(0.2) }
}

@keyframes ripple {
  0% { background-color: #e7e7e7bc;  }
  100% { background-color: #e7e7e7;   }  
}

::after, ::before {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  font-weight: normal;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

input[type=text], input[type=textarea]{
  -webkit-user-select: text;
  -khtml-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}


html {
  font-size: 10px;
  font-family: sans-serif;
  -webkit-text-size-adjust: 100%;
}

.tabsUI {
  border-spacing: 0px;
  border-collapse: collapse;
}

.tabsUI {
  position: absolute;
  top: 0px;
  left: 0;
  margin: 0;
  width: 100%;
  border-spacing: 0px;
  border-collapse: collapse;
  bottom: 0;
  overflow: hidden;  
}

.tabsUI .wrapper {
  position: absolute;
  top: 80px;
  bottom: 0;
  width: 100%;
  z-index: 0;
  overflow: hidden;
}

.wrapper .scroller {
    will-change: transform;
    transition-duration: 0ms;
    height: 100%;
    position: relative;
    /*z-index: 0;*/
}

.scroller .grid li {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  position: absolute;
  height: 60px;
}

.tabsUI li {
  cursor: pointer;
  list-style-type: none;
}

.tabsUI li span {
  border: 0;
  vertical-align: middle;
  overflow: hidden;
  line-height: 1;
  white-space: normal;
  height: 100%;
  padding: 2px;
  font-size: 15px;
}


/********************************************/
 :root {
  --blue: #001B70;
  --lightblue:#1057C8;
  --clearblue:#5aa5f5;
  --orange: #E36427;
}

body{
    touch-action: pan-y;
}



canvas {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-size: cover;
  z-index: 0;
  -webkit-transform: translate3d(0, 0, 0);
}

.logo_bas1, .logo_bas2{
    position: absolute;
    bottom: 2%;
    right: 0%;
    display: block;
    z-index: 0;
    width: 40vmin;
}

.logo_bas2{
    width: 26vmin;
    right: 3%;
}

.art_BL, .art_TR, .art_TL{
    pointer-events:none;
    z-index:0;
    background-size: contain !important;
    display: block;
    position: absolute;
    transform: translate3d(0, 0,0) scale(1);
}

.art_BL{
    background: url( ../img/art45.svg) center no-repeat;
    width: 111vmin;
    height: 111vmin;
    bottom: 0;
    left: 0;
    transform: translate3d(-62%,63%,0);
}

.art_TR{
    background: url( ../img/art46.svg) center no-repeat;
    width: 93vmin;
    height: 93vmin;
    top: 0;
    right: 0;
    transform: translate3d(70%,-60%,0);
}
    

.art_TL{
    background: url( ../img/art47.svg) center no-repeat;
    top: 0;
    left: 0;
    width: 95vmin;
    height: 95vmin;
    transform: translate3d(-67%,-55%,0);
    animation: circleB 200s  linear infinite;
}


#mainCat, #squatVision .left{
    background: #1089FF;
    background: linear-gradient(133deg, #1089FF 0%, #0955BC 50%, #001A70 100%);
}


#mainCat img.logo{
    display: block;
    padding:0;    
    position: absolute;
    top: 3%;
    width: 35%;
    max-width: 600px;
    left: 1%;
}

#mainCat span.title{
    transition: opacity 3s ease-out;
    position: relative;
    width: 84%;
    color: white;
    font-size: 3.5vh;
    opacity: 1;
    display: block;
    margin: 16vh 8% 4vh 8%;
    font-weight: bold;
    z-index:1;
}

#mainCat, #mainCat .results{
    display: block;
    position: relative;        
    text-align: center;        
}

 
#mainCat .results{
    width: 84%;
    margin: 0 8%;    
    height: 50%; /* rewrite by javascript */
    background-color: white;
    padding: 0;
    z-index:1;
}    

#mainCat .results .first{
    width:100%;
    padding:3vh 15px 1vh 15px;
    text-align:center;
    display:block;
    font-size:2vh;    
    color:var(--orange);
    text-transform: uppercase;
}

#classement{
    height:90%;    /* rewrite by javascript */
    /*border: 2px solid green!important;*/
}

#classement .header{
    position: relative;
    z-index: 10;    
    background-color:white;
}

#classement .header span{
    position: relative;
    display: inline-block;
    padding: 0px 0;
    line-height: 2;
    overflow: visible;
    color: #999;
    font-size: 1vh;
    text-transform: uppercase;
    /*pointer-events: none;*/
}

#classement .wrapper{
    top:unset;
    bottom: 0px;
    height: calc( 100% - 25px );
    /*border: 1px solid;*/
}

#classement .scroller .grid li{
    height: 14%;
    padding: 0 0;
    white-space: nowrap;
}


#classement li span{
    font-size: 1.5vh;
    line-height: 1.5vh;
    text-align: center;
    padding: 5%;
    display: inline;
    white-space: nowrap;
    overflow: hidden;
    color: var(--blue);
    display: inline-block;
    position: relative;
    font-weight: bold;
}

#classement li span div{
    border-radius: 50%;
    width: 3.5vh;
    height: 3.5vh;
    display: block;
    position: absolute;
    top: 33%;
    left: 1%;
    overflow:hidden;
}


#classement li span img{
    width: 120%;
    height: 120%;
    display: block;
    position: absolute;
    top: -10%;
    left: -10%;
}

#classement li span:nth-child(1){
    width: 10%;
}

#classement li span:nth-child(2){
    width: 50%;
    text-transform: uppercase;
    padding-left: 10%;
    text-align:left;
}

#classement li span:nth-child(3){
    width: 20%;
}

#classement li span:nth-child(4){
    width: 20%;
}

#mainCat, #selectAgences, #squatVision{
    position:absolute;
    display:block;
    top:0;
    left:0;
    width:100vw;
    height:100%;
    overflow:hidden;
}

#selectAgences{
    left:100vw;
}

#selectAgences .ledefi{
    width: 50%;
    text-align: center;
    display: block;
    margin: 8.5vmin 25% 0 25%;    
}

#selectAgences .ledefi img{
    height:100%;
}

#selectAgences span.first{
    width: 100%;
    padding: 15px;
    text-align: center;
    display: block;
    font-size: 3.5vh;
    height: 10%;
    margin-bottom: 1%;
    color: var(--lightblue);
    font-weight: bold;
    /*border:3px solid green;*/
    z-index: 1;
    position: relative;
}

#agences{
    width: 84%;
    margin: 0 8%;
    top:0;
    bottom:0!important;    
    background-color:white;
}

#agences .wrapper{
    top:0;
}

#agences ul.grid li{
    height: 26vw;    
    display: block;
    white-space:nowrap;
}

#agences ul.grid a{
    display: inline-block;
    width: 31%;
    height: 100%;    
    text-align: center;
    padding: 0;
    text-decoration: none;
    z-index: 10;
    margin: 5px 1%;
    position: relative;
    overflow:hidden;
}

#agences ul.grid a img{
    height: 100%;
    width: 100%;
    padding: 10px;
}

#agences ul.grid a span{
    font-size: 1.6vh;
}

#agences ul.grid a span:first-child{
    border-radius: 50%;
    background-color: #eee;
    max-width: 40px;
    max-height: 40px;
    padding: .7vh;
    font-size: 1.7vh;
    display: inline-block;
    margin-right: 40px;
    width: 3vh;
    height: 3vh;
}

#labelAgence{
    width: 60%;
    display: block;
    text-align: center;
    margin: 14vmin 20% 15% 20%;
    border: 0px solid #3333;
    background: none;
    height: 25vmin;
    z-index: 1;
    position: relative;
}

#labelAgence img{
    height: 100%;
    background-color: white;
}

#squatSelect{
    border: 0;
    border-bottom: 2px solid white;
    border-radius:0;
    text-align: center;
    font-size: 12vh;
    width: 100%;
    background:none;
    color: white;
    -webkit-user-select: none;
    pointer-events:none; /* html "disabled" change color on safari */
}

#squatVision .left .title{
    font-size: 2.5vh;
    width: 70%;
    margin:0 15%;
    display: block;
    text-align: center;
    color: white;
    font-weight: bold;
}

#squatVision button.ui{
    bottom:15%;
}

button.ui{
    border-radius: 100px;
    background-color: var(--orange);
    color: white;
    padding: 2vmin 10vmin;
    border: 0;
    font-size: 2vh;
    cursor: pointer;
    text-align: center;
    display: block;
    position: absolute;
    bottom: 9%;
    left: 50%;
    margin: auto;
    z-index: 3;
    transform: translate3d(-50%,0,0);
    white-space: nowrap;
}

#popup button{;
    bottom: -150px!important;
}

#squatVision{
    left:200vw;
    /*transition: transform 400ms cubic-bezier(.17,.84,.44,1);*/
    transition: transform 400ms;
}

#slide-container{
    /*transition: transform 800ms cubic-bezier(.17,.84,.44,1);*/
    transition: transform 400ms;
}



.agencesOn #slide-container{
    transform: translate3d(-100vw,0,0);
}

.squatVisionOn #slide-container{
    transform: translate3d(-200vw,0,0);
}

.agencesOn #backBtn{
    visibility: visible!important;
}

#squatVision .left, #squatVision .right{
    position:absolute;
    top:0;
    left:0;
    width:100vw;
    height:100%;
    overflow:hidden;
}


#squatVision .right{
    left:100vw;
}

#squatVision .estimation{
    width: 50%;
    display: block;
    text-align: center;
    margin: 10vh auto;
    position: relative;
    max-width: 600px;
}

#squatVision .estimation button{
    position:absolute;
    right:-40px;
    text-align:center;
    font-size:5vh;
    border:0px solid #bbbe;
    background: none;
    color: white;
    font-weight: bold;
    min-width:120px;
    z-index:3;
}


#incrTime{
    top:0;
}

#decrTime{
    bottom:0;
}

#squatVision .container{
    display:block;
    position:absolute;
    top:0;
    left:0;
    width:200vw;
    height:100%;
    transition: transform 400ms cubic-bezier(.17,.84,.44,1);    
}

.squatVisionOn.running #squatVision .container{
    transform: translate3d( -100vw, 0, 0);
}

#squatVision .right .infos{
    z-index: 10;    
}

#counters {
  position: absolute;
  display:block;
  width: auto;
  left: 2%;
  top: 2%;
  padding: 0;
  margin: 0;
  white-space: nowrap;
}

#counters .infos{
    background-color: var(--clearblue);       
    display: block;
    width: 100%;
    white-space: nowrap;
    position: relative;
    padding: 5px 10px;
}

#squatVision .infos.time{
    position: absolute;
    right: 2%;
    top: 2%;
    padding: 0;    
    margin: 0;
    width: auto;
    background-color: white;
    border-radius: 50%;
}

#squatVision .infos.estimated{
    margin-top: 4px;    
}

body.popup #squatVision .infos.estimated{
    pointer-events:none;
}


#squatVision .right .infos span{
    display:block;
    width:100%;    
    color:white;
}

#squatVision .right .infos span:nth-child(1){
    font-weight: :bold;    
}    

#squatIndicator{
    font-size:7vh;    
}    

#estimatedSquatsNumber{
    font-size:5vh;    
}  

#squatVision .right .infos span:nth-child(2){
    font-size:2.7vh;
    white-space:nowrap;
}

#squatIndicator{
    color: #001b70!important;
}


#timelapse{
    font-weight: bold;
    text-align: center;    
}

.progress {
  width: 16.5vh!important;
  height: 16.5vh!important;
  position: relative;
  display: flex!important;
  align-items: center;
  justify-content: center;
}

.progress > .inner {
  position: absolute;
  color: var(--orange); 
  border-radius: 50%;
  border: 20px solid #f5c7b1;
  z-index: 0;
  height: 100%;
  width: 100%;
  display: flex!important;
  align-items: center;
  justify-content: center;
  font-size:5vh;
}

.progress > svg {
  height: 100%;
  display: block;
  z-index: 1;
}

#popup{
    opacity:0;
    position: fixed;
    display: block;
    z-index: 100;
    background-color: #ffb210;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%,-50%,0);
    border: 0;
    padding: 10% 13%;
    font-size: 5vh;
    transition: opacity 300ms;
    pointer-events:none;
    width: 80%;
    color: white;
    text-align:center;
}

#popup p, #popup i{
    color: white;
}


.f2{
    font-size: 2vh;
}

.f2-5{
    font-size: 2.5vh;
}

.f3{
    font-size: 3vh;
}

#popup i{
    font-size: 7vh;
    margin: 0 20px;
    font-style: normal; 
}

#popup div{
  display: block;
  width: 70%;
  height: 2px;
  border-top: 2px solid white;
  margin: 10% 15%;
}


body.popup #popup{
    opacity:1;
    pointer-events:all;
}    

body.popup #canvas1, .help #canvas1{
    filter:blur(7px);
}

body.popup #squatPlace{
    display:none!important;
}

body.popup #backBtn{
    display:none;
}

#video-container, #front-camera{
    display: block;
    width: 100%;
    height: 100%;
}

#canvas1, #squatPlace{
    display:none;
}

#squatPlace{
    position:absolute;
    border:1px solid orange;
    border-radius:30px;    
    min-width: 250px;
    top:50%;
    left:50%;
    transform:translate3d(-50%,-50%,0);
    z-index:2;
}

#squatPlace i.circle{
    position: absolute;
    bottom: -10vh;
    right: -2vh;
    display: block;
    width: 27vh;
    height: 27vh;
    background-size: contain;
    animation: circleA 1500ms infinite;
    border: 2vh solid rgb(241, 71, 28);
    border-style: dashed;
    border-radius: 50%;
}

#squatPlace i.good, #squatPlace i.bad{
    position: absolute;
    bottom: 0;
    left: 0;
    display: block;
    animation: fadeUp 2000ms;
    font-size: 15vh;
    padding: 10px;
    font-style: normal;
    width: 100%;
    text-align: center;
}

#squatPlace i.good{
    color: var(--clearblue);
}

#squatPlace i.bad{    
    font-size:10vh;
    animation-delay:1500ms;
    color: var(--orange);
}


.counter{
    position: absolute;
    z-index: 100;
    font-size: 35em;
    text-align: center;
    color: var(--clearblue);
    top: 50%;
    left: 50%;
    transform: translate3d(-50%,-50%,0);
}

.counter.anim{
    animation: 1s counterAnim;
    animation-delay: 0s;
}

#canvas1{
    z-index:1;
}

body.squatVisionOn.running #canvas1, body.squatVisionOn.running #squatPlace,
body.squatVisionOn.running #zoneDebug, body.squatVisionOn.running #playPause{
    display:block;
}

body.settingsOn #settingsPanel{
    display: block!important;
}

body.squatVisionOn.running #mainCat,
body.squatVisionOn.running #selectAgences{
    display:none!important;
}

#settingsPanel{
    position: fixed;
    display: none;
    width: 50%;
    background-color: #ddd;
    width: 320px;
    border-radius: 10px;    
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%,0);
    padding: 50px;
    z-index: 5;
    border-right: 3px solid #bbb3;
    border-bottom: 3px solid #bbb3;
}

#settingsPanel span{
    position: relative;
    width: 100%;
    display: inline-block;
    text-align: center;
    margin: 20px 0;        
}

#settingsPanel input{
    position: relative;
    width: 100%;
    display: inline;    
}

#settingsPanel label{
    position: relative;
    width: 100%;
    display: inline-block;    
    font-size: 1em;
}

#settingsPanel button{
  width: 100px;
  height: 35px;
  margin: 0 4px;
  border: 0;
}

#settingsPanel select{
    background:none;
    border: 0;
}

#helpLabel{
    position: absolute;
    visibility: hidden;
    top: 50%;
    width: 70%;
    border: 0px solid;
    z-index: 10;
    font-size: 3vh;
    right: 0;
    padding: 1%;
    color: white;
    text-shadow: 2px 2px 5px #334;    
    left: 50%;
    transform: translate3d(-50%,-50%,0);
}

#helpLabel p{
    font-size: 8vh;
    color:white;
}

#helpLabel p, button.ui, #squatSelect{
    font-weight: bold;
}

.help #helpLabel{
    visibility: visible;
}

#zoneDebug{
    position:fixed;
    bottom: 5px;
    background-color: #bbbd;
    color: red;
    width:98%;
    margin: 0 1%;
    border: 0;
    height: 20vh;
    z-index: 0;
    font-size: 20px;
    display:none;
}


.squatVisionOn.running #rcDebug{
    display: inline-block!important;
}

#rcDebug{
    display:none;
    position:fixed;
    bottom:21vh;
    left:3vh;
    z-index:1000;
    background-color:#ccc;
    width: 350px;
    height: 200px;
    padding: 3vh 0;
    box-shadow: 4px 3px 13px #444;    
}

#rcDebug span{
width: 100%;
float: left;
text-align: center;
display: block;
margin: 7px 0;
}

#rcDebug button{
    padding: 10px;
    font-size: 20px;
    min-width: 90px;
    border: 0;
    margin: 0 2px;  
}


.popFade{
    position: absolute;
    height: 70%;
    width: 36%;
    right: 4%;
    background-color: #ffb210;
    border-radius: 50px;
    animation: 3s fadeOut;
    top: 15%;
    white-space: nowrap;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.7vh;
    font-weight: bold;
    z-index: 10;
}


@media screen and (max-width: 475px){         
    #mainCat span.title{
        margin: 11vh 8% 25px 8%;        
    }    
    

    #classement li span div{
        top: 27%;
    }
    
    #selectAgences span.first{
        font-size: 3.5vh;
    }
    
    #agences ul.grid a img{
        padding:1px;
    }
    
    #timelapse{
        font-size:4vh !important;
    }
    
    #counters .infos{
        padding:5px;
    }
    
    #squatVision .right .infos span:nth-child(2){
         font-size:2vh;   
    }    
    
    #counters .infos span:nth-child(2){
         font-size:2vh ;   
    }
    #counters .infos span:nth-child(1){
         font-size:4vh ;   
    } 
}

@media screen and (orientation: landscape) {
  html { }

  #slide-container{
    display:none;
  }
  
  #landscapeMsg{        
        background-color: black;
        display: block !important;
        position: absolute;
        left: 0;
        right: 0;
        width: 100%;
        height: 100%;
        padding: 30%;  
    }
    
    #landscapeMsg span{
        position:absolute;
        font-size: 50px;
        text-align: center;
        color:white;
        top:50%;
        left:50%;
        transform:translate3d(-50%,-50%,0);
    }
}


