/* =========================================================
   Global EPITA loader
   One branded overlay for page loads and long-running requests.
   ========================================================= */

[hidden] {
    display: none !important;
}

#appGlobalLoader.app-loader {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    background: rgba(248, 250, 253, .6);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .4s ease, visibility .4s ease;
}

#appGlobalLoader.app-loader.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.epita-loader-circle {
    position: relative;
    width: min(140px, 45vw);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.epita-loader-track {
    position: absolute;
    inset: 0;
    border: 5px solid #e9eff7;
    border-radius: 50%;
}

.epita-loader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        transparent 35deg,
        #1685ed 115deg,
        #00c8f4 255deg,
        transparent 325deg,
        transparent 360deg
    );
    -webkit-mask: radial-gradient(
        farthest-side,
        transparent calc(100% - 5px),
        #000 calc(100% - 4px)
    );
    mask: radial-gradient(
        farthest-side,
        transparent calc(100% - 5px),
        #000 calc(100% - 4px)
    );
    filter: drop-shadow(0 0 5px rgba(0, 174, 239, .4));
    animation: epita-rotate 1.6s linear infinite;
}

.epita-loader-ring::after {
    content: "";
    position: absolute;
    top: 1px;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    transform: translateX(-50%);
    box-shadow:
        0 0 6px #00c8f4,
        0 0 12px #00bfff,
        0 0 18px rgba(0, 174, 239, .8);
}

.epita-logo-holder {
    position: relative;
    z-index: 2;
    width: 72%;
    height: 72%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: #ffffff;
    box-shadow:
        0 8px 30px rgba(38, 83, 135, .25),
        0 0 25px rgba(0, 132, 230, .15);
}

.epita-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

@keyframes epita-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Inline empty state used inside dynamic result panels */
.app-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 34px 20px;
    color: #78909c;
    text-align: center;
}

.app-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: #e3f2fd;
    color: #1e88e5;
    font-size: 22px;
}

.app-empty__title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #455a64;
}

.app-empty__text {
    margin: 0;
    font-size: 12.5px;
    color: #90a4ae;
}

@media (max-width: 576px) {
    .epita-loader-circle {
        width: 110px;
    }

    .epita-loader-ring {
        animation-duration: 1.7s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .epita-loader-ring {
        animation: none;
    }

    #appGlobalLoader.app-loader {
        transition: none;
    }
}
