/* Connexion, inscription et mot de passe oublié (maquette « Connexion et inscription · refonte », 29/11/2026).
   Préfixe au-. Mêmes couleurs, polices et rayons que le compte client (account.css). */

/* ---------- Fenêtre (modale) ---------- */
.au-modal .au-dialog { max-width: 920px; }
.au-modal--register .au-dialog { max-width: 980px; }
.au-modal .au-content {
    border: 0; border-radius: 20px; overflow: hidden;
    background: var(--az-surface, #FFFFFF); color: var(--az-text-strong, #0F172A);
    font-family: 'Inter', system-ui, sans-serif; box-shadow: 0 24px 64px rgba(15, 23, 42, .28);
}
.au-modal [hidden], .au-page [hidden] { display: none !important; }
.au-modal label, .au-page label, .au-modal .au-label, .au-page .au-label { text-transform: none !important; }
.au-shell { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: 600px; }

.au-aside { background: #000080; color: #FFFFFF; padding: 36px 30px; display: flex; flex-direction: column; gap: 28px; }
.au-aside__brand { display: block; }
.au-aside__brand img { max-width: 170px; max-height: 44px; width: auto; height: auto; object-fit: contain; filter: brightness(0) invert(1); }
.au-aside__head { display: flex; flex-direction: column; gap: 10px; }
.au-aside__title { margin: 0; font: 800 26px/1.25 'Plus Jakarta Sans', sans-serif; color: #FFFFFF; }
.au-aside__lead { margin: 0; font-size: 15px; line-height: 1.5; color: #DCE4FF; }
.au-aside__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; font-size: 14px; line-height: 1.45; }
.au-aside__list li { display: flex; gap: 12px; }
.au-aside__list svg { flex: 0 0 auto; margin-top: 1px; }
.au-aside__foot { margin: auto 0 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: 13px; line-height: 1.5; color: #DCE4FF; }

.au-main { position: relative; padding: 26px 40px 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.au-topbar { display: none; }
.au-close {
    position: absolute; top: 14px; right: 14px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 10px;
    background: transparent; color: var(--az-text-body, #475569); display: flex; align-items: center; justify-content: center;
}
.au-close:hover { background: var(--az-surface-sunken, #F1F5F9); color: var(--az-text-strong, #0F172A); }

.au-tabs { align-self: flex-start; display: flex; padding: 4px; border-radius: 12px; background: var(--az-surface-sunken, #F1F5F9); }
.au-tab {
    height: 38px; padding: 0 18px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 9px;
    background: transparent; color: var(--az-text-body, #475569); font: 600 14px 'Inter', system-ui, sans-serif; text-decoration: none !important; cursor: pointer;
}
.au-tab:hover { color: var(--az-text-strong, #0F172A); }
.au-tab.is-active { background: var(--az-surface, #FFFFFF); color: #000080; font-weight: 700; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); cursor: default; }

.au-intro { display: flex; flex-direction: column; gap: 4px; }
.au-title { margin: 0; font: 800 24px/1.25 'Plus Jakarta Sans', sans-serif; color: var(--az-text-strong, #0F172A); }
.au-lead { margin: 0; font-size: 14px; line-height: 1.5; color: var(--az-text-body, #475569); }

/* ---------- Formulaire ---------- */
.au-form, .au-stack { display: flex; flex-direction: column; gap: 14px; }
.au-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; align-items: start; }
.au-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.au-label, .au-field > label { margin: 0; font-size: 13px; font-weight: 600; color: var(--az-text-strong, #0F172A); text-transform: none; }
.au-label small, .au-optional { font-weight: 400; color: var(--az-text-body, #475569); }
.au-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.au-label-row a { font-size: 13px; }
.au-input, .au-modal .au-input, .au-page .au-input {
    width: 100%; height: 48px; box-sizing: border-box; padding: 0 14px; margin: 0;
    border: 1px solid #CBD5E1; border-radius: 10px; background: var(--az-surface, #FFFFFF);
    font: 500 15px 'Inter', system-ui, sans-serif; color: var(--az-text-strong, #0F172A); box-shadow: none; outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.au-input::placeholder { color: #94A3B8; font-weight: 400; }
.au-input:focus { border-color: #000080; box-shadow: 0 0 0 3px #EAF2FF; }
.au-hint { font-size: 12px; color: var(--az-text-body, #475569); }
.au-error { font-size: 13px; line-height: 1.4; color: #B91C1C; }
.au-error:empty { display: none; }
.au-field.is-invalid .au-hint { display: none; }
.au-error a { color: #B91C1C !important; text-decoration: underline !important; }
.au-field.is-invalid .au-input,
.au-field.is-invalid .au-pass,
.au-field.is-invalid .au-tel,
.au-field.is-invalid .default-captcha-container { border: 1.5px solid #B91C1C; box-shadow: none; }

/* Mot de passe avec bouton Afficher */
.au-pass {
    display: flex; align-items: center; height: 48px; box-sizing: border-box; border: 1px solid #CBD5E1; border-radius: 10px;
    background: var(--az-surface, #FFFFFF); transition: border-color .15s ease, box-shadow .15s ease;
}
.au-pass:focus-within { border-color: #000080; box-shadow: 0 0 0 3px #EAF2FF; }
.au-pass .au-input { flex: 1; min-width: 0; height: 100%; border: 0 !important; box-shadow: none !important; background: transparent; }
.au-eye {
    flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--az-text-body, #475569);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.au-eye:hover { color: #000080; }
.au-eye .au-eye__off { display: none; }
.au-eye[aria-pressed="true"] .au-eye__on { display: none; }
.au-eye[aria-pressed="true"] .au-eye__off { display: block; }

/* Téléphone : indicatif à gauche (intlTelInput), sans drapeau */
.au-tel {
    display: block; height: 48px; box-sizing: border-box; border: 1px solid #CBD5E1; border-radius: 10px; overflow: hidden;
    background: var(--az-surface, #FFFFFF); transition: border-color .15s ease, box-shadow .15s ease;
}
.au-tel:focus-within { border-color: #000080; box-shadow: 0 0 0 3px #EAF2FF; }
.au-tel .iti { display: block; width: 100%; height: 100%; }
.au-tel input[type="tel"] {
    width: 100%; height: 46px; border: 0 !important; outline: none; box-shadow: none !important; background: transparent;
    padding-right: 12px; font: 500 15px 'Inter', system-ui, sans-serif; color: var(--az-text-strong, #0F172A); border-radius: 0;
}
.au-tel .iti__selected-flag {
    padding: 0 10px 0 12px; gap: 6px; background: var(--az-surface-alt, #F8FAFC) !important;
    border-right: 1px solid var(--az-border, #E2E8F0); font-weight: 600; font-size: 15px; color: var(--az-text-strong, #0F172A);
}
.au-tel .iti__selected-flag .iti__flag { display: none; }
.au-tel .iti__selected-dial-code { margin-left: 0; }
.au-tel .iti__arrow {
    width: 14px; height: 14px; margin-left: 0; border: 0; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.au-tel .iti__arrow--up { transform: rotate(180deg); }
.au-tel .iti__country-list { z-index: 20; }

/* Code de sécurité (image) : champ généré par google-recaptcha-init.js */
.au-captcha:empty { display: none; }
.au-captcha .default-captcha-container {
    height: 48px; max-width: none; margin: 0 !important; border: 1px solid #CBD5E1; border-radius: 10px; background: var(--az-surface, #FFFFFF);
}
.au-captcha .default-captcha-container:focus-within { border-color: #000080; box-shadow: 0 0 0 3px #EAF2FF; }
.au-captcha .default-captcha-container input {
    height: 46px; padding: 0 160px 0 14px; background: transparent; font: 500 15px 'Inter', system-ui, sans-serif; color: var(--az-text-strong, #0F172A);
}
.au-captcha .default-captcha-container input::placeholder { color: #94A3B8; font-weight: 400; }
.au-captcha .default-captcha-container .captcha-image-container { top: 4px; right: 4px; inset-inline-end: 4px; height: 38px; border-radius: 8px; background: #E2E8F0; }
.au-captcha .dynamic-default-and-recaptcha-section { margin: 0; }

/* Case à cocher */
.au-check { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 14px; line-height: 1.45; font-weight: 400; color: var(--az-text, #334155); cursor: pointer; }
.au-check input[type="checkbox"] { width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 auto; accent-color: #000080; cursor: pointer; }
.au-check--inline { align-items: center; min-height: 28px; }
.au-check--inline input[type="checkbox"] { margin-top: 0; }
.au-field.is-invalid .au-check input[type="checkbox"] { outline: 2px solid #B91C1C; outline-offset: 1px; }

/* Codes de parrainage / partenaire */
.au-codes { border: 0; }
.au-codes > summary {
    display: inline-flex; align-items: center; gap: 6px; min-height: 36px; list-style: none; cursor: pointer;
    font-size: 14px; font-weight: 600; color: #0366CF;
}
.au-codes > summary::-webkit-details-marker { display: none; }
.au-codes > summary svg { transition: transform .15s ease; }
.au-codes[open] > summary svg { transform: rotate(45deg); }
.au-codes__body { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }

/* Boutons */
.au-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border-radius: 10px;
    font: 600 15px 'Inter', system-ui, sans-serif; text-decoration: none !important; cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.au-btn--primary { height: 50px; border: 0; background: #000080; color: #FFFFFF !important; font-size: 16px; }
.au-btn--primary:hover:not(:disabled) { background: #0376EA; }
.au-btn--primary:disabled { background: var(--az-surface-sunken, #F1F5F9); color: #475569 !important; cursor: not-allowed; }
.au-btn--neutral { height: 46px; border: 1px solid #CBD5E1; background: var(--az-surface, #FFFFFF); color: var(--az-text-strong, #0F172A) !important; font-size: 14px; }
.au-btn--neutral:hover { border-color: #000080; }
.au-btn--neutral img { width: 20px; height: 20px; }
.au-btn:focus-visible, .au-tab:focus-visible, .au-close:focus-visible, .au-eye:focus-visible, .au-link:focus-visible, .au-codes > summary:focus-visible { outline: 2px solid #0376EA; outline-offset: 2px; }

.au-or { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #64748B; }
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--az-border, #E2E8F0); }
.au-social { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.au-social--1 { grid-template-columns: minmax(0, 1fr); }

/* Messages */
.au-alert {
    display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #FEF2F2; border: 1px solid #FECACA;
    color: #7F1D1D; font-size: 14px; line-height: 1.45;
}
.au-alert svg { flex: 0 0 auto; margin-top: 1px; }
.au-alert b { color: #7F1D1D; }
.au-alert a { color: #7F1D1D !important; text-decoration: underline !important; font-weight: 600; }
.au-note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #EAF2FF; font-size: 13px; line-height: 1.45; color: #334155; }
.au-note svg { flex: 0 0 auto; }
.au-note b { color: #0F172A; }

.au-switch, .au-legal { margin: 0; text-align: center; color: var(--az-text-body, #475569); }
.au-switch { font-size: 14px; }
.au-legal { font-size: 12px; line-height: 1.5; }
.au-modal a:not(.au-btn):not(.au-tab), .au-page a:not(.au-btn), .au-link { color: #0366CF; font-weight: 600; text-decoration: none; }
.au-modal a:not(.au-btn):not(.au-tab):hover, .au-page a:not(.au-btn):hover, .au-link:hover { color: #000080; text-decoration: underline; }
.au-link { border: 0; background: none; padding: 0; font-size: inherit; cursor: pointer; }
.au-spacer { margin-top: auto; }

/* Étape « code » de la connexion par SMS */
.au-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #000080; }
.au-sent { margin: 0; font-size: 14px; color: var(--az-text, #334155); }
.au-sent strong { font-weight: 600; white-space: nowrap; }
.au-code { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.au-code-input {
    width: 100%; min-width: 0; height: 52px; padding: 0; text-align: center; border-radius: 10px;
    border: 1px solid #CBD5E1; background: var(--az-surface, #FFFFFF); color: var(--az-text-strong, #0F172A);
    font: 700 22px 'Plus Jakarta Sans', sans-serif; outline: none; caret-color: #000080;
}
.au-code-input.is-filled, .au-code-input:focus { border: 1.5px solid #000080; }
.au-code-input:focus { box-shadow: 0 0 0 3px #EAF2FF; }
.au-code.is-invalid .au-code-input { border-color: #B91C1C; }
.au-resend { margin: 0; font-size: 14px; color: var(--az-text-body, #475569); }
.au-resend b { color: var(--az-text-strong, #0F172A); }

[theme="dark"] .au-modal a:not(.au-btn):not(.au-tab), [theme="dark"] .au-page a:not(.au-btn), [theme="dark"] .au-link { color: var(--az-brand, #8EC1FF); }
[theme="dark"] .au-tab.is-active { color: var(--az-brand, #8EC1FF); }

/* Tablette : fenêtre sans panneau bleu */
@media (max-width: 991.98px) {
    .au-modal .au-dialog, .au-modal--register .au-dialog { max-width: 560px; }
    .au-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .au-aside { display: none; }
}

/* Mobile : plein écran */
@media (max-width: 575.98px) {
    .au-modal .au-dialog, .au-modal--register .au-dialog { max-width: none; }
    .au-modal .au-content { border-radius: 0; box-shadow: none; }
    .au-topbar {
        position: sticky; top: 0; z-index: 3; height: 56px; flex: 0 0 auto; padding: 0 6px;
        display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center;
        background: var(--az-surface, #FFFFFF); border-bottom: 1px solid var(--az-surface-sunken, #F1F5F9);
    }
    .au-topbar img { justify-self: center; max-width: 150px; max-height: 36px; width: auto; height: auto; object-fit: contain; }
    .au-topbar .au-close { position: static; color: var(--az-text-strong, #0F172A); }
    .au-main > .au-close { display: none; }
    .au-main { padding: 18px 20px 20px; }
    .au-tabs { align-self: stretch; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .au-tab { height: 40px; padding: 0 8px; }
    .au-title { font-size: 23px; }
    .au-input, .au-modal .au-input, .au-page .au-input, .au-tel input[type="tel"], .au-captcha .default-captcha-container input { font-size: 16px; }
    .au-btn--primary { height: 52px; }
    .au-btn--neutral { height: 48px; font-size: 15px; }
    .au-social { grid-template-columns: minmax(0, 1fr); }
    .au-check--inline { min-height: 44px; font-size: 15px; }
    .au-grid { gap: 12px 10px; }
    .au-grid > .au-field:nth-child(n+3) { grid-column: 1 / -1; }
}

/* ---------- Pages : mot de passe oublié, code, nouveau mot de passe ---------- */
.au-page-wrap { display: flex; justify-content: center; padding: 40px 16px 56px; }
.au-page {
    width: 100%; max-width: 520px; background: var(--az-surface, #FFFFFF); border: 1px solid var(--az-border, #E2E8F0); border-radius: 20px;
    padding: 32px 40px; display: flex; flex-direction: column; gap: 22px; color: var(--az-text-strong, #0F172A); font-family: 'Inter', system-ui, sans-serif;
}
.au-page .au-title { font-size: 26px; }
.au-page .au-lead { font-size: 15px; }
.au-steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.au-steps li { display: flex; flex-direction: column; gap: 8px; font-size: 12px; font-weight: 600; color: var(--az-text-body, #475569); }
.au-steps li::before { content: ""; height: 4px; border-radius: 2px; background: var(--az-border, #E2E8F0); }
.au-steps li.is-done::before, .au-steps li.is-current::before { background: #000080; }
.au-steps li.is-current { font-weight: 700; color: #000080; }
.au-back { align-self: center; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; }
.au-help { margin: 0; padding-top: 16px; border-top: 1px solid var(--az-surface-sunken, #F1F5F9); font-size: 13px; line-height: 1.5; color: var(--az-text-body, #475569); }
.au-page .otp-field {
    width: 100%; min-width: 0; height: 56px; padding: 0; text-align: center; border-radius: 10px; border: 1px solid #CBD5E1;
    background: var(--az-surface, #FFFFFF); color: var(--az-text-strong, #0F172A); font: 700 22px 'Plus Jakarta Sans', sans-serif; outline: none;
}
.au-page .otp-field:focus { border: 1.5px solid #000080; box-shadow: 0 0 0 3px #EAF2FF; }
.au-page .au-code { display: grid; }
.au-page .au-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px; }
.au-page .au-actions .au-btn--neutral { height: 50px; }
.au-page .au-actions .au-btn--neutral:disabled { color: #94A3B8 !important; cursor: not-allowed; border-color: #E2E8F0; }
@media (max-width: 575.98px) {
    .au-page-wrap { padding: 0; }
    .au-page { border: 0; border-radius: 0; padding: 20px; gap: 20px; }
    .au-page .au-title { font-size: 24px; }
    .au-steps li { font-size: 11px; }
    .au-page .au-actions { grid-template-columns: minmax(0, 1fr); }
}
