/* Pages de connexion (accueil central, connexion client, connexion super-admin) :
   écran partagé formulaire / bandeau de marque. Fichier dédié plutôt que du CSS
   inline répété sur 3 vues + le partial du bandeau. */

.auth-split {
    min-height: 100vh;
}

.auth-split-form {
    min-height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem 0 5rem;
}

.auth-split-form-inner {
    width: 100%;
    max-width: 440px;
}

.auth-split-eyebrow {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    font-size: .75rem;
    color: var(--pe-primary, #ff980d);
}

.auth-split-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1.5rem;
    color: #97a1ab;
    font-size: .75rem;
    text-align: center;
}

.auth-hero-panel {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: var(--auth-hero-bg, linear-gradient(135deg, #1c1f26 0%, #2b2f38 100%));
    background-size: cover;
    background-position: center;
    color: #fff;
}

.auth-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(23, 26, 33, .92) 10%, rgba(23, 26, 33, .6) 55%, rgba(255, 152, 13, .35) 130%);
}

.auth-hero-decor {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-hero-decor span {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .12);
}

.auth-hero-decor span:nth-child(1) {
    width: 420px;
    height: 420px;
    right: -160px;
    top: -120px;
}

.auth-hero-decor span:nth-child(2) {
    width: 260px;
    height: 260px;
    right: -60px;
    bottom: -80px;
}

.auth-hero-logo-badge {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border-radius: .75rem;
    padding: .6rem 1rem;
}

@media (max-width: 991.98px) {
    .auth-hero-panel {
        display: none;
    }
}

/* Micro-interactions "de base", appliquées partout : discrètes, sans risque
   de dénaturer les pages qui n'ont pas demandé le mode animé complet. */
.auth-split-form .btn-primary {
    transition: transform .15s ease, box-shadow .15s ease;
}

.auth-split-form .btn-primary:hover,
.auth-split-form .btn-primary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(255, 152, 13, .35);
}

.auth-split-form .form-control {
    transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-split-form .form-control:focus {
    border-color: var(--pe-primary, #ff980d);
    box-shadow: 0 0 0 4px rgba(255, 152, 13, .15);
}

/* Mode animé (connexion super-admin) */
@keyframes auth-fade-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-anim-in {
    opacity: 0;
    animation: auth-fade-up .6s cubic-bezier(.22, 1, .36, 1) forwards;
}

.auth-anim-in.d-1 {
    animation-delay: .05s;
}

.auth-anim-in.d-2 {
    animation-delay: .15s;
}

.auth-anim-in.d-3 {
    animation-delay: .25s;
}

.auth-anim-in.d-4 {
    animation-delay: .35s;
}

.auth-anim-in.d-5 {
    animation-delay: .45s;
}

.auth-anim-in.d-6 {
    animation-delay: .55s;
}

@keyframes auth-gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.auth-hero-panel--fancy {
    background-size: 180% 180%;
    animation: auth-gradient-shift 18s ease-in-out infinite;
}

@keyframes auth-drift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-16px, 18px) scale(1.06);
    }
}

@keyframes auth-drift-reverse {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(18px, -14px) scale(1.08);
    }
}

.auth-hero-panel--fancy .auth-hero-decor span:nth-child(1) {
    animation: auth-drift 16s ease-in-out infinite;
}

.auth-hero-panel--fancy .auth-hero-decor span:nth-child(2) {
    animation: auth-drift-reverse 20s ease-in-out infinite;
}

.auth-hero-panel--fancy .auth-hero-decor span:nth-child(3) {
    width: 140px;
    height: 140px;
    left: 12%;
    bottom: 18%;
    animation: auth-drift 12s ease-in-out infinite;
}

@keyframes auth-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.auth-hero-panel--fancy .auth-hero-logo-badge {
    animation: auth-float 4s ease-in-out infinite;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
}

.btn-loading {
    pointer-events: none;
    opacity: .75;
}

.btn-loading .btn-loading-spinner {
    display: inline-block;
    width: .85em;
    height: .85em;
    border: .15em solid rgba(255, 255, 255, .5);
    border-top-color: #fff;
    border-radius: 50%;
    margin-inline-end: .5em;
    animation: auth-spin .6s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {

    .auth-anim-in,
    .auth-hero-panel--fancy,
    .auth-hero-panel--fancy .auth-hero-decor span,
    .auth-hero-panel--fancy .auth-hero-logo-badge,
    .btn-loading .btn-loading-spinner {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
