/* 6.2. États de chargement */
.content-container.loading {
    opacity: 0;
}
/* Animation de chargement login/logout */
#main {
    display: none; /* Par défaut caché, affiché par JS avec display:flex */
    position: fixed;
    z-index: 99999;
    left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(10, 25, 40, 0.95);
    justify-content: center;
    align-items: center;
}
#myCircle {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Prend toute la hauteur de #main */
}
#mainCircle {
    position: relative;
    max-width: 300px;
    max-height: 300px;
    margin: auto; /* Centre #mainCircle dans #myCircle */
}
#mainContent {
    position: absolute;
    top: 0;
    height: 100%;
    width: 100%;
    cursor: pointer;
    border-radius: 50%;
}
#mainText {
    text-align: center;
    vertical-align: middle;
    margin-top: 30%; /* Ajustement pour centrer verticalement dans le cercle */
    transform: translateY(-50%);
    color: #ccc;
    animation: fade 3s infinite linear; /* Keyframe en section 7 */
    font-size: 30px;
    visibility: visible; /* S'assurer qu'il est visible si #main est affiché */
}
.circle {
    background-color: rgba(0, 0, 0, 0);
    opacity: .9;
    border-radius: 300px;
    box-shadow: 0 0 75px #2187e7;
    width: 300px;
    height: 300px;
    margin: 0 auto; /* Centre le cercle lui-même si #mainCircle a une taille définie */
    animation: spinPulse 2s infinite ease-in-out; /* Keyframe en section 7 */
}
.circle1 {
    background-color: rgba(0, 0, 0, 0);
    border: 5px solid rgba(0,183,229,0.9);
    opacity: .9;
    border-left: 5px solid rgba(0,0,0,0);
    border-right: 5px solid rgba(0,0,0,0);
    border-radius: 250px;
    box-shadow: 0 0 100px #2187e7;
    width: 250px;
    height: 250px;
    margin: 0 auto;
    position: absolute;
    top: 20px; /* Positionnement par rapport à #mainCircle */
    left: 20px;
    animation: spinoffPulse 4s infinite linear; /* Keyframe en section 7 */
}
.bars { /* Barres de chargement alternatives */
    position: absolute;
    left: 50%;
    top: 60%; /* Ajusté pour être plus bas que le centre du cercle */
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 5px;
}
.bars li {
    background-color: #fff !important; /* Important pour surcharger si besoin */
    width: 10px;
    height: 10px; /* Hauteur initiale */
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    animation: loadbars 0.6s cubic-bezier(0.645,0.045,0.355,1) infinite; /* Keyframe en section 7 */
}
.bars li:nth-child(2) {
    animation-delay: -0.2s;
}
.bars li:nth-child(3) {
    animation-delay: -0.4s;
}
/* Loader Light Mode */
html.light-mode #main {
    background: rgba(245, 235, 224, 0.95) !important;
}
html.light-mode #mainText {
    color: var(--color-text) !important;
}
html.light-mode .bars li {
    background-color: var(--color-text) !important;
}