/**
 * Overlay plein écran pour Espo.Ui.notify(' ... ') — ~75 % de transparence (≈ 25 % d’opacité du voile) + flou.
 */
#espocrm-fullscreen-loading {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* 75 % transparent → alpha 0,25 sur le gris (voile discret) */
    background: rgba(235, 236, 238, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: espocrm-fs-fade-in 0.25s ease-out;
}

/* Halos très légers pour ne pas alourdir le voile */
#espocrm-fullscreen-loading::before {
    content: '';
    position: absolute;
    top: -35vh;
    left: -20vw;
    width: min(85vw, 52rem);
    height: min(85vh, 52rem);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.12) 0%, transparent 62%);
    pointer-events: none;
}

#espocrm-fullscreen-loading::after {
    content: '';
    position: absolute;
    bottom: -25vh;
    right: -15vw;
    width: min(70vw, 40rem);
    height: min(70vh, 40rem);
    border-radius: 50%;
    background: radial-gradient(circle at 60% 60%, rgba(0, 0, 0, 0.02) 0%, transparent 58%);
    pointer-events: none;
}

@keyframes espocrm-fs-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.espocrm-fullscreen-loading__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 1.75rem;
    max-width: 90vw;
    position: relative;
    z-index: 1;
}

/* Anneau : gris neutre, pas d’accent couleur vive */
.espocrm-fullscreen-loading__icon {
    width: 112px;
    height: 112px;
    margin-bottom: 2rem;
    position: relative;
}

.espocrm-fullscreen-loading__icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 6px solid #d1d5db;
    border-top-color: #64748b;
    border-radius: 50%;
    animation: espocrm-fs-spin 0.88s linear infinite;
}

@keyframes espocrm-fs-spin {
    to { transform: rotate(360deg); }
}

.espocrm-fullscreen-loading__message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    max-width: 22rem;
    margin: 0;
}

.espocrm-fullscreen-loading__line {
    display: block;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

.espocrm-fullscreen-loading__line--primary {
    font-size: 1.125rem;
    font-weight: 600;
    color: #334155;
    /* Léger halo clair si le contenu derrière est sombre */
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(255, 255, 255, 0.7);
}

.espocrm-fullscreen-loading__line--secondary {
    font-size: 1rem;
    font-weight: 400;
    color: #64748b;
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.9), 0 1px 1px rgba(255, 255, 255, 0.65);
}

body.espocrm-fullscreen-loading-active {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .espocrm-fullscreen-loading__icon::before {
        animation-duration: 2s;
    }

    #espocrm-fullscreen-loading {
        animation: none;
    }
}
