/*
    Important de définir "html, body" ici car tant que les sources d'EXTJS
    ne sont pas chargée, l'apparence est brut de décoffrage pendant
    quelques secondes...
*/

html, body {
    margin: 0;
    padding: 0;
    background: #f6f6f6;
}

/**********************/
/* ABSOLUTE CENTERING */
/**********************/

#loading #barre,
#loading #pourcentage,
#loading #status,
#loading:not(.progressing) #status {
    position: absolute;
    left: 0;
    right: 0;
    margin: auto;
    width: 30%;
}

@media all and (max-width: 1000px) {
    /**********/
    /* MOBILE */
    /**********/
    #loading #barre,
    #loading #pourcentage,
    #loading #status,
    #loading:not(.progressing) #status {
        width: 70%;
    }
}

/***********/
/* LOADING */
/***********/

#loading * {
    pointer-events: none;
    box-sizing: border-box;
}

#loading {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 99999;
    background: #32465b;
    background: radial-gradient(ellipse at center, rgba(65, 90, 117, 1) 0%, rgba(50, 70, 91, 1) 100%);
    transition-duration: 200ms;
    transition-property: opacity;
    transition-timing-function: ease-in;
    opacity: 1;
}

html:not(.loading-finished) {
    overflow: hidden !important;
}

body.loading-finished #loading {
    opacity: 0;
    pointer-events: none;
}

/****************************/
/*** BARRE DE PROGRESSION ***/
/****************************/

#loading #barre {
    top: calc(50% - 10px);
    height: 20px;
    border-radius: 10px;
    background: #202f40;
    box-shadow: 1px 1px 0 0 rgba(255, 255, 255, .1), inset 1px 1px 0 0 rgba(0, 0, 0, .3);
    padding: 2px;
    box-sizing: initial !important;
}

#loading #barre #progression {
    width: 0;
    min-width: 5%;
    height: 20px;
    border-radius: 8px;
    box-shadow: inset 1px 1px 0 0 rgba(255, 255, 255, .3);
    background: #faa819;
    background: repeating-linear-gradient(
            45deg,
            #faa819,
            #faa819 10px,
            #e09616 10px,
            #e09616 20px
    );
}

#loading:not(.progressing) #barre #progression {
    display: none;
}

/**************/
/*** LOADER ***/
/**************/

#loading #barre .loader {
    position: absolute;
    top: calc(50% - 10px);
    left: 2px;
    border-top: 2px solid #faa819;
    border-right: 2px solid #faa819;
    border-bottom: 2px solid #faa819;
    border-left: 2px solid transparent;
    animation: rotation 1.4s infinite linear;
}

#loading #barre .loader,
#loading #barre .loader:after {
    border-radius: 20px;
    width: 20px;
    height: 20px;
}

#loading.progressing #barre .loader {
    display: none;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg) scale(0.5);
    }
    50% {
        transform: rotate(360deg) scale(.9);
    }
    100% {
        transform: rotate(720deg) scale(0.5);
    }
}

/*******************/
/*** POURCENTAGE ***/
/*******************/

#loading #pourcentage:after {
    content: ' %';
}

#loading #pourcentage {
    top: calc(50% - 40px);
    height: 20px;
    text-align: center;
}

/**************/
/*** STATUS ***/
/**************/

#loading #status {
    top: calc(50% + 20px);
    height: 20px;
}

#loading #pourcentage,
#loading #status {
    font-family: Helvetica, sans-serif;
    font-weight: 400;
    line-height: 20px;
    font-size: 14px;
    color: white;
    text-shadow: -1px -1px 0 rgba(0, 0, 0, .3);
    white-space: nowrap;
    text-align: center;
}

#loading:not(.progressing) #status {
    top: calc(50% - 8px);
    width: calc(30% - 50px);
    text-align: left;
}