/* ============================================================
   APSolute — Styles de la page de connexion (index.php)
   Requiert : css/apsolute-fonts.css + css/apsolute.css
   ============================================================ */

/* --- Animations de la charte (couverture) --- */
@keyframes apsFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}
@keyframes apsGlow {
    0%, 100% { opacity: .55; }
    50%      { opacity: .85; }
}

/* --- Layout login deux panneaux --- */
html, body { height: 100%; margin: 0; }

.aps-login {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
}

/* --- Panneau marque (gauche) : style couverture charte --- */
.aps-login__brand {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 46px 40px;
    overflow: hidden;
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(45,120,235,.45) 0%, rgba(8,26,66,0) 55%),
        linear-gradient(180deg, #071A3E 0%, #04122E 100%);
    color: #fff;
}

/* Hexagones decoratifs (fond) */
.aps-login__brand .hex-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.aps-login__brand .hex-pattern polygon {
    fill: none;
    stroke: rgba(120,180,255,.20);
}

/* Logo + halo */
.aps-login__logo-wrap {
    position: relative;
    z-index: 2;
}
.aps-login__glow {
    position: absolute;
    inset: -30px;
    background: radial-gradient(circle at 50% 45%, rgba(59,189,255,.55), rgba(59,189,255,0) 65%);
    filter: blur(8px);
    animation: apsGlow 5s ease-in-out infinite;
}
.aps-login__logo {
    position: relative;
    width: 180px;
    height: 180px;
    object-fit: contain;
    animation: apsFloat 6s ease-in-out infinite;
    filter: drop-shadow(0 18px 40px rgba(10,40,120,.55));
}

/* Logotype texte sous le logo */
.aps-login__title {
    position: relative;
    z-index: 2;
    margin-top: 16px;
    font-family: var(--aps-font-display);
    font-weight: 700;
    font-size: 56px;
    letter-spacing: -.025em;
    line-height: 1;
}
.aps-login__title .aps-grad {
    background: linear-gradient(180deg, #9CFAFF 0%, #3BBDFF 55%, #1796F5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.aps-login__title .olute {
    color: #EAF4FF;
}

/* Sous-titre */
.aps-login__tagline {
    position: relative;
    z-index: 2;
    margin-top: 16px;
    font-size: 15px;
    font-weight: 600;
    color: #DCEBFF;
    text-align: center;
    max-width: 380px;
}

/* Badges */
.aps-login__badges {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
    justify-content: center;
}
.aps-login__badge {
    font-family: var(--aps-font-mono);
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: 7px 14px;
    border: 1px solid rgba(160,195,255,.30);
    border-radius: 999px;
    color: #CFE3FF;
}

/* --- Panneau formulaire (droite) --- */
.aps-login__form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: var(--aps-bg);
}
.aps-login__card {
    width: min(384px, 100%);
}
.aps-login__card h1 {
    font-family: var(--aps-font-display);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 6px;
    color: var(--aps-ink);
}
.aps-login__card .subtitle {
    font-family: var(--aps-font-mono);
    font-size: 10.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--aps-slate);
    margin: 0 0 28px;
}

/* Labels : JetBrains Mono (charte) */
.aps-login__card .aps-label {
    font-family: var(--aps-font-mono);
    font-size: 10.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--aps-slate);
    display: block;
    margin-bottom: 7px;
}

/* Champs : Manrope (charte), hauteur 44px, bordure arrondie */
.aps-login__card .aps-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font-size: 14px;
    font-family: var(--aps-font-body);
    border: 1px solid var(--aps-line);
    border-radius: 10px;
    background: #F7FAFE;
    color: var(--aps-ink);
    box-sizing: border-box;
    outline: none;
    transition: border-color .12s ease, box-shadow .12s ease;
    margin-bottom: 14px;
}
.aps-login__card .aps-input:focus {
    border-color: var(--aps-blue);
    box-shadow: 0 0 0 3px rgba(23,150,245,.15);
}
.aps-login__card .aps-input::placeholder {
    color: var(--aps-slate);
    opacity: .6;
}

/* Bouton : degrade bleu charte, ombre bleue, Manrope bold */
.aps-login__card .aps-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 46px;
    margin-top: 6px;
    padding: 0 22px;
    font-family: var(--aps-font-body);
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    background: var(--aps-grad-blue);
    box-shadow: var(--aps-shadow-blue);
    transition: transform .12s ease, box-shadow .12s ease;
}
.aps-login__card .aps-btn:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 14px 30px rgba(23,150,245,.5);
}
.aps-login__card .aps-btn:active {
    transform: translateY(0);
}

/* Message d'erreur */
.aps-login__error {
    margin: 0 0 18px;
    padding: 11px 14px;
    border-radius: 10px;
    font-family: var(--aps-font-body);
    font-size: 13.5px;
    font-weight: 600;
    color: #B42318;
    background: #FEF3F2;
    border: 1px solid #FDA29B;
}

/* Pied de carte */
.aps-login__footer {
    margin-top: 26px;
    font-family: var(--aps-font-mono);
    font-size: 10.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--aps-slate);
    text-align: center;
}

/* --- Responsive --- */
@media (max-width: 860px) {
    .aps-login {
        grid-template-columns: 1fr;
    }
    .aps-login__brand {
        padding: 40px 24px;
        min-height: 38vh;
    }
    .aps-login__logo {
        width: 120px;
        height: 120px;
    }
    .aps-login__title {
        font-size: 38px;
    }
    .aps-login__tagline {
        font-size: 13px;
    }
    .aps-login__badges {
        display: none;
    }
    .aps-login__form {
        padding: 36px 24px 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aps-login__logo,
    .aps-login__glow {
        animation: none;
    }
    .aps-btn { transition: none; }
    .aps-btn:hover { transform: none; }
}
