:root {
    --technistyle-loader-bg: #af897a;
    --technistyle-loader-line: #f0e400;
    --technistyle-loader-duration: 2.8s;
}

html.technistyle-loading,
html.technistyle-loading body {
    overflow: hidden;
}

.technistyle-loader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--technistyle-loader-bg);
    opacity: 1;
    visibility: visible;
    transition: opacity .55s ease, visibility 0s linear .55s;
}

/* Évite tout flash lors des navigations suivantes de la même session. */
html.technistyle-loader-seen .technistyle-loader {
    display: none;
}

.technistyle-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.technistyle-loader__inner {
    width: min(80vw, 1148px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.technistyle-loader__logo {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.technistyle-loader__logo path {
    fill: none;
    stroke: var(--technistyle-loader-line);
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    opacity: .2;
    animation:
        technistyle-draw var(--technistyle-loader-duration) cubic-bezier(.65, 0, .35, 1) forwards,
        technistyle-glow var(--technistyle-loader-duration) ease-in-out forwards;
}

.technistyle-loader__logo path:nth-of-type(2) { animation-delay: .12s; }
.technistyle-loader__logo path:nth-of-type(3) { animation-delay: .24s; }
.technistyle-loader__logo path:nth-of-type(4) { animation-delay: .36s; }
.technistyle-loader__logo path:nth-of-type(5) { animation-delay: .48s; }
.technistyle-loader__logo path:nth-of-type(6) { animation-delay: .60s; }

.technistyle-loader__progress {
    width: min(420px, 58vw);
    height: 2px;
    overflow: hidden;
    background: rgb(240 228 0 / 22%);
}

.technistyle-loader__progress-bar {
    display: block;
    width: 0;
    height: 100%;
    background: var(--technistyle-loader-line);
    box-shadow: 0 0 8px rgb(240 228 0 / 45%);
    transition: width .18s linear;
}

@keyframes technistyle-draw {
    0% {
        stroke-dashoffset: 1;
        opacity: .2;
    }
    68%,
    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

@keyframes technistyle-glow {
    0%,
    70% {
        filter: drop-shadow(0 0 0 rgb(240 228 0 / 0%));
    }
    100% {
        filter: drop-shadow(0 0 10px rgb(240 228 0 / 72%));
    }
}

@media (max-width: 767px) {
    .technistyle-loader__inner {
        width: 88vw;
        gap: 22px;
    }

    .technistyle-loader__progress {
        width: 62vw;
    }
}

@media (prefers-reduced-motion: reduce) {
    .technistyle-loader__logo path {
        animation: none;
        stroke-dashoffset: 0;
        opacity: 1;
    }

    .technistyle-loader {
        transition-duration: .2s;
    }
}
