/* === Pages d'authentification (Login, Register, mot de passe oublié, confirmation d'e-mail…) ===
   Feuille commune chargée par AuthLayout : les pages Account sont rendues en statique avec ce layout.
   Remplace les copies isolées Login.razor.css / Register.razor.css (identiques à 4 règles près). */

/* === Auth pages — split-screen layout === */

.auth-page {
    min-height: 100vh;
}

/* === Left hero panel === */

.auth-hero {
    flex: 1 1 50%;
    background: linear-gradient(135deg, #006bb7 0%, #003a66 60%, #1a1a4e 100%);
    color: #ffffff;
    padding: 4rem 3rem;
    display: none;
    position: relative;
    overflow: hidden;
}

.auth-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.08) 0, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.06) 0, transparent 50%);
    pointer-events: none;
}

.auth-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
}

.auth-brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.auth-brand-glyph {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #ffffff;
    color: #006bb7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-brand-name {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.auth-hero-title {
    font-size: 2.5rem;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0 0 1rem;
    color: #ffffff;
}

.auth-hero-sub {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
    margin: 0 0 2rem;
}

.auth-hero-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-hero-bullets li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.95rem;
}

.bullet-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18);
    flex-shrink: 0;
}

/* === Right form panel === */

.auth-form-wrap {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background-color: var(--bg-color);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-card-head {
    margin-bottom: 0.5rem;
}

.auth-brand-mark--mobile {
    margin-bottom: 1.5rem;
}

.auth-card-head h1 {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
    color: var(--text-color);
}

.auth-card-sub {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
}

/* === Form === */

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

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.auth-field-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.auth-field label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: 0.01em;
}

.auth-link-muted {
    font-size: 0.8125rem;
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-link-muted:hover {
    text-decoration: underline;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-input-icon svg {
    display: block;
}

.auth-input {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 44px;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: var(--text-color);
    background-color: var(--bg-color);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.auth-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.auth-input:hover {
    border-color: color-mix(in srgb, var(--link-color) 30%, var(--border-color));
}

.auth-input:focus,
.auth-input:focus-visible {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--link-color) 15%, transparent);
}

.auth-input.invalid,
.auth-input[aria-invalid="true"] {
    border-color: #dc2626;
}

.auth-field-error {
    font-size: 0.8125rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

.auth-validation-summary {
    background-color: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 0 0 0.5rem;
    color: #b91c1c;
    font-size: 0.875rem;
}

.auth-validation-summary ul {
    margin: 0;
    padding-left: 1.25rem;
}

/* === Checkbox === */

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-color);
    cursor: pointer;
    user-select: none;
}

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

/* === Buttons === */

.auth-submit {
    width: 100%;
    height: 48px;
    margin-top: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--link-color) 0%, color-mix(in srgb, var(--link-color) 80%, #000) 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.1s ease, box-shadow 0.15s ease, filter 0.15s ease;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--link-color) 25%, transparent);
}

.auth-submit:hover {
    filter: brightness(1.08);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--link-color) 35%, transparent);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-submit-arrow {
    transition: transform 0.15s ease;
}

.auth-submit:hover .auth-submit-arrow {
    transform: translateX(3px);
}

/* === Divider === */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* === Passkey button === */

.auth-passkey {
    width: 100%;
    height: 44px;
    background: transparent;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 0.9375rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    text-decoration: none;
}

.auth-passkey:hover {
    border-color: var(--link-color);
    background-color: color-mix(in srgb, var(--link-color) 6%, transparent);
}

.auth-passkey svg {
    flex-shrink: 0;
}

/* === External login === */

.auth-external {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.auth-external-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin: 0 0 0.75rem;
    text-align: center;
}

/* === Footer === */

.auth-card-foot {
    text-align: center;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.auth-card-foot p {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-card-foot a {
    color: var(--link-color);
    font-weight: 500;
    text-decoration: none;
}

.auth-card-foot a:hover {
    text-decoration: underline;
}

.auth-card-foot-small {
    font-size: 0.8125rem !important;
}

/* === Responsive === */

@media (min-width: 960px) {
    .auth-hero {
        display: block;
    }

    .auth-brand-mark--mobile {
        display: none;
    }
}

@media (max-width: 959px) {
    .auth-form-wrap {
        padding: 2rem 1rem;
        min-height: 100vh;
    }

    .auth-card-head h1 {
        font-size: 1.625rem;
    }
}

/* === StatusMessage compatibility (legacy Bootstrap alert classes) === */

.auth-page .alert {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    border: 1px solid transparent;
}

.auth-page .alert-danger {
    background-color: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.3);
    color: #b91c1c;
}

.auth-page .alert-success {
    background-color: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.3);
    color: #15803d;
}

.auth-cle-refusee {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.auth-cle-refusee a {
    color: var(--link-color);
    font-weight: 600;
}

.auth-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0;
    line-height: 1.4;
}

.auth-card-foot-tos {
    color: var(--text-secondary);
    font-style: italic;
}

/* === Messages d'information (e-mail envoyé, lien invalide…) === */

.auth-notice {
    padding: 1rem 1.125rem;
    border-radius: 0.625rem;
    border: 1px solid color-mix(in srgb, var(--link-color) 25%, transparent);
    background-color: color-mix(in srgb, var(--link-color) 7%, transparent);
    color: var(--text-color);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.auth-notice p {
    margin: 0 0 0.5rem;
}

.auth-notice p:last-child {
    margin-bottom: 0;
}

.auth-notice--error {
    border-color: rgba(220, 38, 38, 0.3);
    background-color: rgba(220, 38, 38, 0.08);
}

a.auth-submit {
    text-decoration: none;
}
