﻿/* =========================================================================
   socle/loaders.css  —  Indicateurs de chargement (GLOBAL, toutes pages)
   Extrait de Site.css (preloader, .divWait*, #circularG) — relocation neutre.
   Sélecteurs uniques, aucune collision : voir Architecture-CSS-SCSS (lot S1).
   ========================================================================= */

/*** Preloader ***/
:root {
    --preloader-size: 72px;
    --preloader-mini-size: 36px;
    --preloader-border-width: 4px;
    --preloader-mini-border-width: 2px;
}

.preloader, .preloader-mini, .wait {
    z-index: 1;
    transition: all 0.6s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
}
    .preloader:before,
    .preloader:after,
    .wait:before,
    .wait:after, .preloader-mini:before,
    .preloader-mini:after {
        content: "";
        position: absolute;
        border-radius: 50%;
    }

    .preloader:before,
    .preloader:after,
    .wait:before,
    .wait:after {
        animation: animate-preloader 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    }

    .preloader-mini:before,
    .preloader-mini:after {
        animation: animate-preloader-mini 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    }

    .preloader:after,
    .preloader-mini:after,
    .wait:after {
        animation-delay: -0.5s;
    }

/* Styles spécifiques */
.preloader {
    padding: 35px;
}

    .preloader:before, .preloader:after {
        border: 4px solid;
    }

.preloader-mini {
    padding: 15px;
}

    .preloader-mini:before, .preloader-mini:after {
        border: 2px solid;
    }

@keyframes animate-preloader {
    0% {
        width: 10px;
        height: 10px;
        top: calc(50% - 5px);
        left: calc(50% - 5px);
        opacity: 1;
    }

    100% {
        width: 72px;
        height: 72px;
        top: calc(50% - 36px);
        left: calc(50% - 36px);
        opacity: 0;
    }
}

@keyframes animate-preloader-mini {
    0% {
        width: 5px;
        height: 5px;
        top: calc(50% - 2.5px);
        left: calc(50% - 2.5px);
        opacity: 1;
    }

    100% {
        width: 36px;
        height: 36px;
        top: calc(50% - 18px);
        left: calc(50% - 18px);
        opacity: 0;
    }
}

.divWait {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    margin-left: -100px;
    height: 124px;
    margin-top: -62px;
    border: 2px solid gray;
    text-align: center;
}

.divWaitText {
    text-align: center;
    padding: 10px;
    font-weight: bold;
    background-color: gray;
    color: White;
}

.divWaitRecherche {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    margin-left: -100px;
    height: 124px;
    margin-top: -62px;
    border: 2px solid gray;
    text-align: center;
}

#circularG {
    display: none;
    bottom: 1px;
    right: -18px;
    position: absolute;
    width: 18px;
    height: 18px;
    margin: auto;
}

.circularG {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 3px;
    -o-border-radius: 3px;
    -ms-border-radius: 3px;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    animation-name: bounce_circularG;
    -o-animation-name: bounce_circularG;
    -ms-animation-name: bounce_circularG;
    -webkit-animation-name: bounce_circularG;
    -moz-animation-name: bounce_circularG;
    animation-duration: 0.718s;
    -o-animation-duration: 0.718s;
    -ms-animation-duration: 0.718s;
    -webkit-animation-duration: 0.718s;
    -moz-animation-duration: 0.718s;
    animation-iteration-count: infinite;
    -o-animation-iteration-count: infinite;
    -ms-animation-iteration-count: infinite;
    -webkit-animation-iteration-count: infinite;
    -moz-animation-iteration-count: infinite;
    animation-direction: normal;
    -o-animation-direction: normal;
    -ms-animation-direction: normal;
    -webkit-animation-direction: normal;
    -moz-animation-direction: normal;
}

#circularG_1 {
    left: 0;
    top: 7px;
    animation-delay: 0.268s;
    -o-animation-delay: 0.268s;
    -ms-animation-delay: 0.268s;
    -webkit-animation-delay: 0.268s;
    -moz-animation-delay: 0.268s;
}

#circularG_2 {
    left: 2px;
    top: 2px;
    animation-delay: 0.364s;
    -o-animation-delay: 0.364s;
    -ms-animation-delay: 0.364s;
    -webkit-animation-delay: 0.364s;
    -moz-animation-delay: 0.364s;
}

#circularG_3 {
    top: 0;
    left: 7px;
    animation-delay: 0.45s;
    -o-animation-delay: 0.45s;
    -ms-animation-delay: 0.45s;
    -webkit-animation-delay: 0.45s;
    -moz-animation-delay: 0.45s;
}

#circularG_4 {
    right: 2px;
    top: 2px;
    animation-delay: 0.536s;
    -o-animation-delay: 0.536s;
    -ms-animation-delay: 0.536s;
    -webkit-animation-delay: 0.536s;
    -moz-animation-delay: 0.536s;
}

#circularG_5 {
    right: 0;
    top: 7px;
    animation-delay: 0.632s;
    -o-animation-delay: 0.632s;
    -ms-animation-delay: 0.632s;
    -webkit-animation-delay: 0.632s;
    -moz-animation-delay: 0.632s;
}

#circularG_6 {
    right: 2px;
    bottom: 2px;
    animation-delay: 0.718s;
    -o-animation-delay: 0.718s;
    -ms-animation-delay: 0.718s;
    -webkit-animation-delay: 0.718s;
    -moz-animation-delay: 0.718s;
}

#circularG_7 {
    left: 7px;
    bottom: 0;
    animation-delay: 0.814s;
    -o-animation-delay: 0.814s;
    -ms-animation-delay: 0.814s;
    -webkit-animation-delay: 0.814s;
    -moz-animation-delay: 0.814s;
}

#circularG_8 {
    left: 2px;
    bottom: 2px;
    animation-delay: 0.9s;
    -o-animation-delay: 0.9s;
    -ms-animation-delay: 0.9s;
    -webkit-animation-delay: 0.9s;
    -moz-animation-delay: 0.9s;
}

/*bounce_circularG{
    0%{
        transform:scale(1)}

    100%{
        ;
        -o-transform:scale(1)}

    100%{
        ;
        -ms-transform:scale(1)}

    100%{
        ;
        -webkit-transform:scale(1)}

    100%{
        ;
        -moz-transform:scale(1)}

    100%{
        transform:scale(.3)
};
        -o-transform:scale(.3)
};
        -ms-transform:scale(.3)
};
        -webkit-transform:scale(.3)
};
        -moz-transform:scale(.3)
}*/

@keyframes bounce_circularG {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(.3);
    }
}

@-o-keyframes bounce_circularG {
    0% {
        -o-transform: scale(1);
    }

    100% {
        -o-transform: scale(.3);
    }
}

@-ms-keyframes bounce_circularG {
    0% {
        -ms-transform: scale(1);
    }

    100% {
        -ms-transform: scale(.3);
    }
}

@-webkit-keyframes bounce_circularG {
    0% {
        -webkit-transform: scale(1);
    }

    100% {
        -webkit-transform: scale(.3);
    }
}

@-moz-keyframes bounce_circularG {
    0% {
        -moz-transform: scale(1);
    }

    100% {
        -moz-transform: scale(.3);
    }
}

/* Loader boite (.divWait / .divWaitRecherche : #genericLoader, #ocrGenericLoader, pop de recherche...) :
   layout centre propre (spinner + message alignes, esprit ecran de login) au lieu du .preloader en
   height:100% + hacks bottom/margins qui decalaient le spinner tres au-dessus du texte. */
.divWait, .divWaitRecherche {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    height: auto;
    min-height: 200px;
    padding: 2.25rem 2.5rem;
}
    /* Spinner aligne sur le preloader de l'ecran de connexion (72px) pour un espacement coherent. */
    .divWait > .preloader,
    .divWaitRecherche > .preloader {
        width: 72px;
        height: 72px;
        padding: 0;
        flex: 0 0 auto;
        bottom: auto !important;
        margin: 0 !important;
    }
    /* Message : texte simple centre (plus de barre grise en haut de la boite). */
    .divWait > .ui-dialog-titlebar,
    .divWait > .t-window-titlebar,
    .divWaitRecherche > .ui-dialog-titlebar,
    .divWaitRecherche > .t-window-titlebar {
        background: transparent;
        color: inherit;
        border: 0;
        padding: 0;
        /* Meme police/taille que le texte du preloader de connexion (.messagePop .modal-title = <h5>). */
        font-family: inherit;
        font-size: 1.25rem;
        font-weight: 500;
        line-height: 1.5;
        white-space: nowrap;
    }
