/*
 * Écran de connexion (spec design §3.1) — plein écran, hors shell.
 * Non transcrits : bandeau de stats, version, 2FA, « se souvenir », « mot de passe oublié » (reportés par
 * T22), sous-titre de durée de session et encart de notification (non implémentés par l'application).
 */
.rb-auth {
    display: grid;
    min-height: 100vh;
    background-color: var(--rb-bg-base);
}

/* Colonne de marque : masquée sous 1180 px, comme la maquette. Purement éditoriale, le h1 reste dans le formulaire. */
.rb-auth__hero {
    position: relative;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px 64px;
    overflow: hidden;
    background-image: radial-gradient(120% 90% at 15% 10%, var(--rb-auth-hero-glow) 0%, var(--rb-auth-hero-mid) 45%, var(--rb-bg-base) 100%);
}

.rb-auth__hero::before,
.rb-auth__hero::after {
    position: absolute;
    content: '';
}

/* Grille de fond. */
.rb-auth__hero::before {
    inset: 0;
    background-image:
        linear-gradient(var(--rb-auth-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--rb-auth-grid) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: 0.5;
}

/* Halo cyan en bas à gauche. */
.rb-auth__hero::after {
    bottom: -200px;
    left: -140px;
    width: 520px;
    height: 520px;
    background-image: radial-gradient(circle, rgb(93 214 240 / 16%), transparent 68%);
    border-radius: 50%;
}

.rb-auth__brand,
.rb-auth__pitch {
    position: relative;
    z-index: 1;
}

.rb-auth__brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Losange décoratif : le nom de marque juste à côté porte l'information. */
.rb-auth__logo {
    flex: none;
    width: 30px;
    height: 30px;
    background-image: linear-gradient(135deg, rgb(95 227 245 / 35%), rgb(169 140 255 / 25%));
    border: 1.5px solid var(--rb-accent-cyan);
    transform: rotate(45deg);
}

.rb-auth__brand-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--rb-text-secondary-light);
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.rb-auth__brand-suffix {
    color: var(--rb-accent-cyan);
}

.rb-auth__pitch {
    max-width: 560px;
}

.rb-auth__eyebrow {
    margin-bottom: 22px;
    font-family: var(--rb-font-mono);
    font-size: 11px;
    color: var(--rb-accent-cyan);
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.rb-auth__tagline {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.04;
    color: var(--rb-text-primary);
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.rb-auth__description {
    max-width: 460px;
    margin-top: 22px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--rb-nav-text-idle);
    text-wrap: pretty;
}

.rb-auth__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
    background-color: var(--rb-bg-panel);
}

.rb-auth__container {
    width: 100%;
    max-width: 392px;
    animation: rbFade 0.5s ease both;
}

.rb-auth__title {
    font-size: 26px;
    font-weight: 700;
    color: var(--rb-text-primary);
    letter-spacing: -0.02em;
}

/* L'erreur porte un texte explicite : la couleur ne fait que le renforcer. */
.rb-auth__error {
    margin-top: 20px;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--rb-accent-red);
    background-color: rgb(255 107 107 / 8%);
    border: 1px solid rgb(255 107 107 / 33%);
    border-radius: var(--rb-radius-md);
}

.rb-auth__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
}

.rb-auth__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rb-auth__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--rb-text-subdued);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.rb-auth__input {
    width: 100%;
    padding: 13px 14px;
    font-size: 14px;
    color: var(--rb-text-primary);
    background-color: var(--rb-bg-inset);
    border: 1px solid var(--rb-border-input);
    border-radius: var(--rb-radius-md);
}

.rb-auth__input--mono {
    font-family: var(--rb-font-mono);
}

.rb-auth__input--secret {
    letter-spacing: 0.3em;
}

/* Halo en plus de l'outline global : le focus reste visible (frontend-quality.md). */
.rb-auth__input:focus-visible {
    border-color: var(--rb-accent-cyan);
    box-shadow: 0 0 0 3px rgb(95 227 245 / 12%);
}

.rb-auth__submit {
    width: 100%;
    margin-top: 10px;
    padding: 15px;
    font-size: 15px;
    font-weight: 700;
    color: var(--rb-text-on-accent);
    letter-spacing: 0.02em;
    cursor: pointer;
    background-image: linear-gradient(100deg, var(--rb-accent-cyan), var(--rb-accent-cyan-dark));
    border: 0;
    border-radius: 9px;
}

.rb-auth__submit:hover {
    filter: brightness(1.1);
}

@media (min-width: 760px) {
    .rb-auth__panel {
        padding: 48px;
    }
}

@media (min-width: 1180px) {
    .rb-auth {
        grid-template-columns: 1.05fr 0.95fr;
    }

    .rb-auth__hero {
        display: flex;
    }

    .rb-auth__panel {
        border-left: 1px solid var(--rb-auth-divider);
    }
}
