/* ═══════════════════════════════════════════════════════════════════════════
   Omega Kube — Dashboard : écran de connexion

   Deux colonnes : identité à gauche, formulaire à droite. Sous 900 px la
   colonne d'identité disparaît — elle occuperait la place du formulaire sans
   rien apporter à quelqu'un qui vient simplement se connecter.
   ═══════════════════════════════════════════════════════════════════════════ */

.auth-body {
    display: flex;
    min-height: 100dvh;
}

.auth-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    min-height: 100dvh;
}

/* ── Colonne d'identité ─────────────────────────────────────────────────── */

.auth-aside {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.5rem 3rem;
    /* La colonne défile si l'écran est court : sans cela, le pied de page
       passait sous la ligne de flottaison en 800 px de haut. */
    max-height: 100dvh;
    overflow-y: auto;
    border-right: 1px solid var(--glass-border);
    background:
        radial-gradient(circle at 20% 20%, rgba(139, 58, 98, 0.16), transparent 55%),
        var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

/* Halo bas, qui évite que la colonne paraisse plate. */
.auth-aside::after {
    content: '';
    position: absolute;
    left: -20%;
    bottom: -30%;
    width: 80%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(166, 77, 121, 0.18), transparent 70%);
    pointer-events: none;
}

.auth-aside > * {
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.35rem;
    color: var(--text-primary);
    align-self: flex-start;
}

.auth-brand img {
    display: block;
}

.auth-brand-accent {
    color: var(--accent-light);
}

.auth-brand--mobile {
    display: none;
    margin-bottom: 2rem;
    font-size: 1.15rem;
}

.auth-aside-title {
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    line-height: 1.25;
    margin-bottom: 0.9rem;
    animation: featIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.auth-aside-text {
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 430px;
    margin: 0;
    font-size: 0.92rem;
    animation: featIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

/* ── Aperçu animé de l'espace ───────────────────────────────────────────────
   Maquette en CSS pur : montrer l'interface vaut mieux qu'une liste de
   promesses. Volontairement abstraite — des tuiles et un graphique, pas un
   panneau de réglages : l'espace ne se limite pas aux bots.
   Aucune capture d'écran à maintenir, rien à refaire quand l'interface évolue. */

.mock {
    position: relative;
    margin: 2.25rem 0 2.5rem;
    max-width: 400px;
    animation: mockIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

@keyframes mockIn {
    from { opacity: 0; transform: translateY(18px) rotateX(8deg); }
    to   { opacity: 1; transform: translateY(0) rotateX(0); }
}

/* Légère perspective : donne l'impression d'un écran posé, pas d'un rectangle
   collé sur le fond. Elle se redresse au survol de la colonne. */
.mock-fen {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 11px;
    height: 176px;
    padding: 13px 15px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--bg-deep);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
    transform: perspective(900px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-aside:hover .mock-fen {
    transform: perspective(900px) rotateY(0) rotateX(0);
}

.mock-halo {
    position: absolute;
    inset: 12% 8%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(166, 77, 121, 0.4), transparent 65%);
    filter: blur(34px);
    animation: mockHalo 5s ease-in-out infinite;
}

@keyframes mockHalo {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50%      { opacity: 0.85; transform: scale(1.1); }
}

.mock-tete {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
}

.mock-pt {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-light));
}

.mock-titre {
    width: 42%;
    height: 7px;
    border-radius: 4px;
    background: var(--text-muted);
    opacity: 0.5;
}

/* Quatre tuiles qui s'allument à tour de rôle : suggère plusieurs espaces
   disponibles plutôt qu'une seule fonction. */
.mock-grille {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.mock-tuile {
    height: 30px;
    border-radius: 7px;
    border: 1px solid var(--glass-border);
    background: var(--bg-secondary);
    animation: mockTuile 5.6s ease-in-out infinite;
}

.mock-tuile--1 { animation-delay: 0s; }
.mock-tuile--2 { animation-delay: 0.6s; }
.mock-tuile--3 { animation-delay: 1.2s; }
.mock-tuile--4 { animation-delay: 1.8s; }

@keyframes mockTuile {
    0%, 12%, 40%, 100% {
        border-color: var(--glass-border);
        background: var(--bg-secondary);
    }
    20%, 32% {
        border-color: var(--accent-primary);
        background: rgba(139, 58, 98, 0.22);
    }
}

.mock-graph {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 42px;
    margin-top: auto;
    padding-top: 9px;
    border-top: 1px solid var(--glass-border);
}

.mock-graph span {
    flex: 1;
    border-radius: 2px 2px 0 0;
    background: linear-gradient(180deg, var(--accent-light), var(--accent-primary));
    opacity: 0.7;
    animation: mockBarre 2.4s ease-in-out infinite;
}

.mock-graph span:nth-child(1)  { animation-delay: 0s; }
.mock-graph span:nth-child(2)  { animation-delay: 0.1s; }
.mock-graph span:nth-child(3)  { animation-delay: 0.2s; }
.mock-graph span:nth-child(4)  { animation-delay: 0.3s; }
.mock-graph span:nth-child(5)  { animation-delay: 0.4s; }
.mock-graph span:nth-child(6)  { animation-delay: 0.5s; }
.mock-graph span:nth-child(7)  { animation-delay: 0.6s; }
.mock-graph span:nth-child(8)  { animation-delay: 0.7s; }
.mock-graph span:nth-child(9)  { animation-delay: 0.8s; }
.mock-graph span:nth-child(10) { animation-delay: 0.9s; }
.mock-graph span:nth-child(11) { animation-delay: 1s; }
.mock-graph span:nth-child(12) { animation-delay: 1.1s; }

@keyframes mockBarre {
    0%, 100% { height: 30%; }
    50%      { height: 90%; }
}

/* ── Arguments ──────────────────────────────────────────────────────────── */

.auth-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    opacity: 0;
    animation: featIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Apparition décalée : le regard descend la liste au lieu de recevoir un bloc
   d'un coup. */
.auth-features li:nth-child(1) { animation-delay: 0.45s; }
.auth-features li:nth-child(2) { animation-delay: 0.58s; }
.auth-features li:nth-child(3) { animation-delay: 0.71s; }
.auth-features li:nth-child(4) { animation-delay: 0.84s; }

@keyframes featIn {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

.auth-feat-ic {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(139, 58, 98, 0.16);
    color: var(--accent-light);
}

.auth-feat-ic svg {
    width: 16px;
    height: 16px;
}

.auth-feat-txt {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.83rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.auth-feat-txt strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.auth-aside-foot {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.auth-aside-foot a {
    color: var(--accent-light);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease;
}

.auth-aside-foot a:hover {
    border-bottom-color: var(--accent-primary);
}

/* ── Colonne de connexion ───────────────────────────────────────────────── */

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.auth-panel-inner {
    width: 100%;
    max-width: 390px;
}

.auth-head {
    margin-bottom: 2rem;
}

.auth-head h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.auth-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* Bouton Discord aux couleurs de la marque : c'est un repère universel,
   le teinter en violet Omega Kube le rendrait moins identifiable. */
.btn-discord {
    background: #5865f2;
    color: #fff;
    padding: 0.85rem 1.35rem;
}

.btn-discord:hover {
    background: #4752c4;
    transform: translateY(-2px);
    box-shadow: 0 7px 22px rgba(88, 101, 242, 0.35);
}

.auth-sep {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.75rem 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-sep::before,
.auth-sep::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

/* ── Champs ─────────────────────────────────────────────────────────────── */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.field label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* L'icône est posée DANS le conteneur, pas en fond : elle reste alignée quelle
   que soit la hauteur du champ, et suit la couleur d'accent au focus. */
.field-input {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.field-input:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 58, 98, 0.18);
}

.field-input > svg {
    width: 17px;
    height: 17px;
    margin-left: 1rem;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color 0.25s ease;
}

.field-input:focus-within > svg {
    color: var(--accent-light);
}

.field-input input {
    flex: 1;
    min-width: 0;
    padding: 0.85rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
}

.field-input input:focus {
    outline: none;
}

.field-input input::placeholder {
    color: var(--text-muted);
}

.field-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.9rem;
    color: var(--text-muted);
    transition: color 0.25s ease;
}

.field-toggle svg {
    width: 16px;
    height: 16px;
}

.field-toggle:hover {
    color: var(--text-primary);
}

/* Champ en erreur : la bordure suffit, un message générique est affiché en bas
   du formulaire. Multiplier les messages par champ alourdirait l'écran. */
.field-input.is-error {
    border-color: var(--danger);
}

/* ── Ligne « se souvenir / mot de passe oublié » ────────────────────────── */

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.87rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.auth-forgot {
    font-size: 0.85rem;
    color: var(--accent-light);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease;
}

.auth-forgot:hover {
    border-bottom-color: var(--accent-primary);
}

/* ── Retour utilisateur ─────────────────────────────────────────────────── */

.auth-feedback {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    line-height: 1.55;
    border: 1px solid transparent;
}

.auth-feedback--error {
    background: rgba(231, 76, 60, 0.12);
    border-color: rgba(231, 76, 60, 0.38);
    color: var(--danger);
}

.auth-feedback--success {
    background: rgba(46, 204, 113, 0.12);
    border-color: rgba(46, 204, 113, 0.38);
    color: var(--ok);
}

.auth-feedback--info {
    background: rgba(90, 150, 235, 0.12);
    border-color: rgba(90, 150, 235, 0.38);
    color: var(--info);
}

.auth-foot {
    margin: 2rem 0 0;
    text-align: center;
    font-size: 0.87rem;
    color: var(--text-muted);
}

.auth-foot a {
    color: var(--accent-light);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease;
}

.auth-foot a:hover {
    border-bottom-color: var(--accent-primary);
}

/* ── Mobile ─────────────────────────────────────────────────────────────── */

/* Entre 900 et 1150 px, la colonne devient trop étroite pour la maquette :
   elle sortirait de son cadre. Les arguments suffisent. */
@media (max-width: 1150px) {
    .mock {
        display: none;
    }

    .auth-aside {
        gap: 2.5rem;
    }
}

@media (max-width: 900px) {
    .auth-wrap {
        grid-template-columns: 1fr;
    }

    /* La colonne d'identité disparaît : sur un écran étroit, elle repousserait
       le formulaire hors de vue. Le logo est repris dans le panneau. */
    .auth-aside {
        display: none;
    }

    .auth-brand--mobile {
        display: inline-flex;
    }

    .auth-panel {
        padding: 2.5rem 1.35rem;
        align-items: flex-start;
    }
}

@media (max-width: 420px) {
    .auth-panel {
        padding: 2rem 1.1rem;
    }

    .auth-head h2 {
        font-size: 1.5rem;
    }
}
