/* =========================================================
   ORILYT – PAGES AUTH (login / register)
   Clean indigo design, self-contained
   ========================================================= */

:root {
    --orilyt-bg: #ffffff;
    --orilyt-bg-soft: #F9FAFB;
    --orilyt-border: #E5E7EB;
    --orilyt-title: #1D2939;
    --orilyt-text: #3D3D3D;
    --orilyt-muted: #747487;
    --orilyt-meta: #98A2B3;
    --orilyt-primary: #4F46E5;
    --orilyt-primary-dark: #3730A3;
    --radius-control: 10px;
}

/* Reset minimal */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    background: rgba(0,0,0,0.55);
    color: var(--orilyt-text);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Conteneur principal */
.auth-shell {
    width: 100%;
    max-width: 440px;
    padding: 24px 16px;
}

/* Carte centrale */
.auth-card {
    position: relative;
    border-radius: 22px;
    padding: 28px 24px 22px;
    background: #ffffff;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 24px 70px rgba(0,0,0,0.25);
    overflow: hidden;
    width: 440px;
    max-width: 100%;
}

.auth-card-inner {
    position: relative;
    z-index: 1;
}

/* Header avec logo + titre */
.auth-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.auth-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.auth-logo img {
    display: block;
    width: 22px;
    height: 22px;
}

.auth-header-text h1 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 650;
    letter-spacing: -0.03em;
    color: var(--orilyt-title);
}

.auth-header-text p {
    margin: 2px 0 0;
    font-size: 0.82rem;
    color: var(--orilyt-muted);
}

/* Champ de formulaire */
.auth-field {
    margin-bottom: 12px;
}

.auth-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 550;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--orilyt-meta);
    margin-bottom: 5px;
}

.auth-field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-control);
    border: 2px solid var(--orilyt-border);
    background: #ffffff;
    color: var(--orilyt-text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s ease;
}

.auth-field input::placeholder {
    color: #CBD5E1;
}

.auth-field input:focus,
.auth-field input:focus-visible {
    outline: none;
    box-shadow: none;
    border-color: var(--orilyt-primary);
}

/* Hint sous le mot de passe */
.auth-password-hint {
    font-size: 0.72rem;
    color: var(--orilyt-meta);
    margin-top: 2px;
}

/* Bloc erreurs */
.auth-error-box {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #B91C1C;
    font-size: 0.82rem;
    line-height: 1.45;
}

.auth-error-box strong {
    display: block;
    margin-bottom: 4px;
}

.auth-error-box ul {
    margin: 0;
    padding-left: 18px;
}

/* Success box */
.auth-success-box {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.25);
    color: #166534;
    font-size: 0.82rem;
    line-height: 1.45;
}

/* Ligne boutons / helper */
.auth-btn-row {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
}

/* Bouton principal */
.auth-btn-primary {
    border: none;
    border-radius: var(--radius-control);
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, var(--orilyt-primary), var(--orilyt-primary-dark));
    color: #ffffff;
    box-shadow:
        0 8px 24px rgba(79,70,229,0.35),
        0 0 0 1px rgba(15,23,42,0.04);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow:
        0 12px 28px rgba(79,70,229,0.45),
        0 0 0 1px rgba(15,23,42,0.06);
}

.auth-btn-primary:active {
    transform: translateY(0);
}

/* Helper "pas de compte"/"déjà inscrit" */
.auth-helper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.75rem;
    color: var(--orilyt-muted);
    text-align: right;
}

.auth-helper-line1 {
    margin-bottom: 2px;
}

.auth-helper-link {
    color: var(--orilyt-primary);
    text-decoration: none;
    font-weight: 550;
}

.auth-helper-link:hover {
    text-decoration: underline;
}

/* Language switcher */
.auth-lang {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 10px;
    font-size: 0.75rem;
}

.auth-lang a {
    color: var(--orilyt-muted);
    text-decoration: none;
}

.auth-lang a:hover {
    color: var(--orilyt-title);
}

.auth-lang a[aria-current="true"] {
    color: var(--orilyt-title);
    font-weight: 600;
    pointer-events: none;
}

/* Footer en bas de carte */
.auth-footer {
    margin-top: 12px;
    font-size: 0.72rem;
    color: var(--orilyt-meta);
    text-align: center;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: 22px 18px 18px;
    }
}

/* Focus rings — indigo, consistent */
.auth-card :where(a, button):focus-visible {
    outline: 2px solid rgba(79,70,229,.50);
    outline-offset: 2px;
    border-radius: var(--radius-control);
}
