/* Auth — Layout split-screen
 * Tokens locaux (seront centralis\u00e9s en S\u00e9quence 3 "design system").
 */
:root {
    --auth-primary: #006EB9;
    --auth-primary-dark: #005a9a;
    --auth-accent: #FFBC00;
    --auth-bg: #ffffff;
    --auth-text: #1f2937;
    --auth-text-soft: #6b7280;
    --auth-text-muted: #9ca3af;
    --auth-border: #e5e7eb;
    --auth-input-bg: #f9fafb;
    --auth-radius: 8px;
    --auth-radius-lg: 16px;
    --auth-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--auth-text);
    background: var(--auth-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body:has(.auth-page) {
    /* Évite une bande blanche sous le panneau bleu quand le zoom page < 100 % */
    background: #002B55;
}

.auth-page {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh / var(--page-zoom, 1));
    width: 100%;
}

.auth-page__brand {
    flex: 1 1 50%;
    align-self: stretch;
    min-height: 100%;
    background:
        radial-gradient(ellipse 55% 45% at 38% 48%, rgba(255, 255, 255, 0.22) 0%, transparent 60%),
        linear-gradient(135deg,
            #2A99DE 0%,
            #1283C9 18%,
            #006EB9 40%,
            #004F8E 65%,
            #002B55 88%,
            #001830 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    position: relative;
    overflow: hidden;
}

.auth-page__brand::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -15%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-page__brand::after {
    content: '';
    position: absolute;
    bottom: -25%;
    right: -20%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.35) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-page__brand-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.auth-page__form {
    flex: 1 1 50%;
    align-self: stretch;
    background: var(--auth-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    position: relative;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
}
/* Auth — Branding (côté gauche du split) */
.brand-card {
    background: var(--auth-bg);
    border-radius: var(--auth-radius-lg);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.20);
    padding: 36px 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    width: 100%;
    min-height: 110px;
}

.brand-card__logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    width: 100%;
}

.brand-card__logos img {
    height: 38px;
    width: auto;
    display: block;
}

.brand-card__divider {
    width: 1px;
    height: 32px;
    background: var(--auth-border);
    display: block;
}

.brand-card__accent {
    width: 56px;
    height: 3px;
    background: var(--auth-accent);
    border-radius: 2px;
    display: block;
}

.auth-page__brand-title {
    margin: 0;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.auth-page__footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;
    text-align: center;
    font-size: 12px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.7);
    padding: 0 16px;
    z-index: 1;
}

.auth-page__footer a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.auth-page__footer a:hover,
.auth-page__footer a:focus-visible {
    text-decoration: none;
    opacity: 0.85;
}
/* Auth — Formulaire (c\u00f4t\u00e9 droit du split) */
.auth-form__overline {
    margin: 0;
    color: var(--auth-primary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.auth-form__title {
    margin: 8px 0 0 0;
    color: var(--auth-text);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.auth-form__subtitle {
    margin: 8px 0 32px 0;
    color: var(--auth-text-soft);
    font-size: 14px;
    line-height: 1.5;
}

.auth-form__message {
    display: none;
    padding: 10px 14px;
    border-radius: var(--auth-radius);
    font-size: 13px;
    text-align: center;
    margin-bottom: 16px;
}

.auth-form__message.is-error {
    display: block;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.auth-form__message.is-success {
    display: block;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #bbf7d0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field label {
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.auth-field input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius);
    font-family: inherit;
    font-size: 14px;
    color: var(--auth-text);
    background: var(--auth-input-bg);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

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

.auth-field input:focus {
    outline: none;
    background: var(--auth-bg);
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(0, 110, 185, 0.12);
}

.auth-field__password {
    position: relative;
}

.auth-field__toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--auth-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

.auth-field__toggle:hover {
    color: var(--auth-primary);
    background: rgba(0, 110, 185, 0.08);
}

.auth-field__toggle svg {
    width: 18px;
    height: 18px;
}

.auth-field__hint {
    margin: 0;
    color: var(--auth-text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.auth-button {
    width: 100%;
    padding: 13px;
    background: var(--auth-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--auth-radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    margin-top: 6px;
}

.auth-button:hover:not(:disabled) {
    background: var(--auth-primary-dark);
    box-shadow: 0 4px 12px rgba(0, 110, 185, 0.25);
}

.auth-button:disabled {
    background: #93c5e8;
    cursor: not-allowed;
}

.auth-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: var(--auth-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.15s ease;
}

.auth-link:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

.auth-help {
    text-align: center;
    margin: 32px 0 0 0;
    color: var(--auth-text-muted);
    font-size: 12px;
}
/* Auth — Responsive (mobile / tablette) */
@media (max-width: 900px) {
    .auth-page {
        flex-direction: column;
        min-height: calc(100vh / var(--page-zoom, 1));
    }

    .auth-page__brand {
        flex: 0 0 auto;
        padding: 40px 24px 32px;
        min-height: 240px;
    }

    .auth-page__form {
        flex: 1 1 auto;
        padding: 32px 24px 48px;
    }

    .auth-page__footer {
        position: static;
        margin-top: 24px;
    }

    .auth-page__brand-inner {
        gap: 18px;
    }

    .brand-card {
        padding: 28px 36px;
        max-width: 340px;
        min-height: 90px;
    }

    .brand-card__logos {
        gap: 22px;
    }

    .brand-card__logos img {
        height: 32px;
    }

    .brand-card__accent {
        width: 48px;
    }

    .auth-page__brand-title {
        font-size: 18px;
    }

    .auth-form__title {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .auth-page__brand {
        padding: 32px 20px 24px;
        min-height: 200px;
    }

    .auth-page__form {
        padding: 24px 20px 40px;
    }

    .brand-card {
        padding: 20px 24px;
    }

    .auth-form__title {
        font-size: 22px;
    }
}
