/*
 * SIRU SAS - SIRU Identity
 * Module : connexion.css
 *
 * Interface graphique d'authentification.
 * Compatible avec les themes de SIRU IA.
 *
 * Date de creation : 30/11/2026
 */

body.identity-page {
    display: grid;
    place-items: center;
    min-height: 100dvh;
    box-sizing: border-box;
    padding: 25px 20px;
    background: radial-gradient(
        ellipse at 50% 30%,
        var(--bg-ia),
        var(--bg-page) 75%
    );
}

.identity-page [hidden] {
    display: none !important;
}

.identity-container {
    width: 100%;
    max-width: 440px;
}

.identity-entete {
    text-align: center;
    margin-bottom: 25px;
}

.identity-animation {
    position: relative;
    height: 190px;
    color: var(--border-ia);
}

#identity-particules {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.identity-cadenas {
    position: absolute;
    width: 94px;
    height: 110px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 12px var(--border-ia));
}

.identity-marque {
    font-size: 30px;
    font-weight: bold;
    letter-spacing: 2px;
}

.identity-marque span {
    color: var(--border-ia);
    font-weight: normal;
    letter-spacing: 1px;
}

.identity-entete p {
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.identity-panneau {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 8px 30px #00000018;
}

.identity-panneau h2 {
    font-size: 20px;
    text-align: center;
    margin: 0 0 22px;
}

.identity-panneau p {
    font-size: 14px;
    line-height: 1.6;
}

.identity-panneau form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.identity-panneau label {
    font-size: 13px;
    font-weight: 500;
}

.identity-panneau input {
    width: 100%;
    font-size: 15px;
    margin-bottom: 8px;
}

.identity-panneau input:focus {
    outline: 2px solid var(--border-ia);
    outline-offset: 2px;
}

.identity-panneau button {
    width: 100%;
    min-height: 44px;
}

.identity-panneau button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.identity-code {
    text-align: center;
    font-family: monospace;
    font-size: 27px !important;
    letter-spacing: 10px;
}

#identity-qrcode {
    display: block;
    width: 210px;
    max-width: 100%;
    height: auto;
    margin: 8px auto 18px;
    background: white;
    padding: 12px;
    border-radius: 8px;
    box-sizing: border-box;
}

#identity-message:not(:empty) {
    padding: 12px;
    margin-bottom: 18px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    background: var(--bg-ia);
    border: 1px solid var(--border-ia);
}

#identity-message.erreur {
    border-color: #ef4444;
}

.identity-secondaire {
    margin-top: 15px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.identity-secondaire:hover {
    background: var(--bg-page);
}

#identity-theme {
    position: fixed;
    top: 18px;
    right: 18px;
    background: var(--bg-panel);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 20px;
}

.identity-pied {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 24px;
}

.identity-page[data-etat="verification"] .identity-cadenas {
    animation: identity-pulsation 0.8s infinite alternate;
}

.identity-page[data-etat="connecte"] .identity-cadenas {
    color: #22c55e;
    filter: drop-shadow(0 0 15px #22c55e);
}

@keyframes identity-pulsation {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .identity-page *,
    .identity-page *::before,
    .identity-page *::after {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 480px) {
    .identity-panneau {
        padding: 22px;
    }

    .identity-animation {
        height: 160px;
    }
}


.identity-page > .theme-radial {
    position: fixed;
    top: 18px;
    right: 18px;
}
