/* Styles critiques : splash visible immédiatement, page masquée jusqu’au ready. */
html {
    background: #fff;
}

html.is-loading body > :not(#splash):not(script) {
    visibility: hidden !important;
}

.splash {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    background: transparent;
    pointer-events: auto;
}

.splash__veil {
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 1;
    transition: opacity 1.85s cubic-bezier(0.33, 0, 0.2, 1);
}

.splash__logo {
    position: relative;
    z-index: 1;
    display: block;
    width: min(280px, 58vw);
    height: auto;
    transform-origin: top left;
    will-change: transform;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.splash.is-animating {
    pointer-events: none;
}

.splash.is-animating .splash__veil {
    opacity: 0;
}

.splash.is-animating .splash__logo {
    transition: transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Pendant la révélation : page en place mais opaque à 0, puis fondu progressif. */
html.is-revealing .site-logo {
    visibility: visible;
    opacity: 0;
}

/* Logo réel allumé sous le logo splash (pas de fondu → pas de clignotement au handoff). */
html.is-revealing.is-logo-ready .site-logo,
html.is-ready .site-logo {
    opacity: 1;
    transition: none;
}

html.is-revealing body::before {
    opacity: 0;
    transition: opacity 1.85s cubic-bezier(0.33, 0, 0.2, 1) 0.15s;
}

html.is-revealing .page-content,
html.is-revealing .orientation-lock {
    visibility: visible;
    opacity: 0;
    transition: opacity 1.85s cubic-bezier(0.33, 0, 0.2, 1) 0.2s;
}

html.is-revealing.is-content-visible body::before,
html.is-revealing.is-content-visible .page-content,
html.is-revealing.is-content-visible .orientation-lock {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .splash__veil,
    .splash.is-animating .splash__logo,
    html.is-revealing body::before,
    html.is-revealing .page-content,
    html.is-revealing .orientation-lock {
        transition: none;
    }
}
