/* Connexion : un seul parcours, une hiérarchie lisible, même palette que River. */
#authScreen { min-height:100dvh; padding:36px 20px; background:#0b0708; }
#authScreen .auth-card { width:min(448px,100%); max-width:448px; padding:32px; border:1px solid #35191f; border-radius:16px; background:#170d0f; box-shadow:0 20px 70px #0005; }
#authScreen .auth-brand { display:flex; justify-content:center; align-items:center; gap:8px; margin:0 0 22px; color:#f6efec; font-size:34px; line-height:1; font-weight:850; letter-spacing:-1.8px; }
#authScreen .auth-brand>svg { width:25px; height:29px; color:#e74953; }
#authScreen .auth-brand-dot { color:#e74953; }
#authScreen .auth-page-heading { text-align:center; margin:0 0 22px; }
#authScreen .auth-page-heading h1 { margin:0 0 8px; color:#f6efec; font-size:27px; font-weight:720; line-height:1.25; letter-spacing:-.6px; }
#authScreen .auth-page-heading p { margin:0; color:#c6babc; font-size:14px; line-height:1.5; }
#authScreen .online-providers { display:grid; grid-template-columns:repeat(var(--providers,3),minmax(0,1fr)); gap:8px; margin:0 0 4px; }
#authScreen .provider-button { display:grid; grid-template-columns:22px minmax(0,1fr) auto; gap:10px; align-items:center; width:100%; min-height:46px; margin:0; padding:11px 14px; border:1px solid #492d2f; border-radius:8px; background:#201314; color:#f6efec; font-size:13px; font-weight:600; }
#authScreen .provider-button>svg { width:21px; height:21px; }
#authScreen .provider-button>span { text-align:center; }
#authScreen .provider-button:enabled:hover { background:#26171a; border-color:#984f5b; }
#authScreen .online-email-divider,#authScreen .auth-guest-divider { display:flex; align-items:center; gap:13px; margin:20px 0; color:#ab9b9c; font-size:12px; }
#authScreen .online-email-divider::before,#authScreen .online-email-divider::after,#authScreen .auth-guest-divider::before,#authScreen .auth-guest-divider::after { content:''; flex:1; height:1px; background:#35191f; }
#authScreen .auth-tabs,#authScreen .online-auth-tabs { display:flex; gap:4px; width:100%; margin:0 0 18px; padding:4px; background:#120b0b; border:1px solid #321f20; border-radius:8px; }
#authScreen .auth-tabs>button,#authScreen .online-auth-tabs>button { flex:1; min-width:0; min-height:44px; margin:0; padding:8px 10px; color:#bcaeb0; border:0; border-radius:5px; background:transparent; font-size:13px; font-weight:600; }
#authScreen .auth-tabs>button.selected,#authScreen .online-auth-tabs>button.selected { background:#2c1b1e; color:#f7dce0; box-shadow:inset 0 0 0 1px #6a3d45; }
#authScreen #authForm,#authScreen #onlineAuthForm { display:grid; gap:16px; margin:0; }
#authScreen label { margin:0; color:#d5cbcd; font-size:12px; line-height:1.45; }
#authScreen input:not([type=file]) { min-height:46px; padding:12px 13px; color:#f6efec; background:#120a0c; border-color:#492c2f; border-radius:7px; font-size:14px; }
#authScreen input::placeholder { color:#9a8788; }
#authScreen input:focus { border-color:#e74953; outline:2px solid #e7495322; }
#authScreen .auth-field { display:grid; gap:7px; min-width:0; }
#authScreen .auth-password-label { display:flex; justify-content:space-between; align-items:center; gap:12px; }
#authScreen .auth-password-label .text-btn { padding:0; color:#d2a4ac; font-size:12px; }
#authScreen .auth-password-control { position:relative; min-width:0; }
#authScreen .auth-password-control input { padding-right:48px; }
#authScreen .auth-password-toggle { position:absolute; inset:3px 3px 3px auto; display:grid; place-items:center; width:40px; padding:8px; color:#b19fa2; border:0; border-radius:5px; background:transparent; }
#authScreen .auth-password-toggle:hover { color:#f6efec; background:#2c1b1d; }
#authScreen .auth-password-toggle svg { width:19px; height:19px; }
#authScreen #authSubmit,#authScreen #onlineAuthSubmit { width:100%; min-height:46px; margin:2px 0 0; padding:11px 15px; background:transparent; border:1px solid var(--accent-solid); border-radius:7px; color:#ffcdd2; font-size:14px; font-weight:700; }
#authScreen #authSubmit:hover:enabled,#authScreen #onlineAuthSubmit:hover:enabled { background:#251719; border-color:#e74953; }
#authScreen .inline-error:empty,#authScreen .online-auth-message:empty { display:none; }
#authScreen .inline-error { margin:0; font-size:12px; line-height:1.6; }
#authScreen .online-auth-message { margin:14px 0 0; color:#b8e6ce; font-size:12px; line-height:1.6; }
#authScreen .online-auth-message.error { color:#ff8992; }
#authScreen .online-email-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:9px 15px; margin-top:15px; }
#authScreen .online-email-actions button { margin:0; padding:0; color:#cab3b7; font-size:12px; }
#authScreen .local-account-details { margin:18px 0 0; padding:16px 0 0; border-top:1px solid #35191f; }
#authScreen .local-account-details>summary { color:#b1a1a3; cursor:pointer; font-size:12px; text-align:center; list-style-position:inside; }
#authScreen .local-account-details[open]>summary { margin-bottom:18px; }
#authScreen .local-account-details.is-local-primary { margin:0; padding:0; border:0; }
#authScreen .local-account-details.is-local-primary>summary { display:none; }
#authScreen .auth-photo-disclosure>summary { color:#b1a1a3; cursor:pointer; font-size:12px; min-height:44px; display:flex; align-items:center; gap:6px; }
#authScreen .auth-photo-disclosure>summary span { color:#8d7678; }
#authScreen .auth-photo-disclosure[open]>summary { margin-bottom:12px; }
#authScreen .auth-photo-disclosure input[type=file] { margin-top:3px; background:#120a0c; font-size:12px; }
#authScreen .auth-guest { margin:0; }
#authScreen .auth-guest-button { display:flex; justify-content:center; align-items:center; gap:12px; min-height:48px; width:100%; margin:0; padding:11px 16px; color:#fff; border:1px solid var(--accent-solid); border-radius:7px; background:var(--accent-solid); font-size:14px; font-weight:700; }
@media(hover:hover){ #authScreen .auth-guest-button:hover { background:var(--accent-solid-hover); border-color:var(--accent-solid-hover); } }
#authScreen .auth-guest-button svg { width:18px; height:18px; }
#authScreen .auth-guest-note { margin:10px 0 0; color:#b4a5a6; font-size:12px; line-height:1.5; text-align:center; }
#authScreen .auth-guest-divider { margin:22px 0 18px; }
#authScreen .local-auth-limit { margin:15px 0 0; color:#ab9b9c; font-size:12px; line-height:1.6; text-align:center; }
@media(max-width:500px){
 #authScreen { padding:24px 16px; }
 #authScreen .auth-card { padding:26px 22px; border-radius:12px; }
 #authScreen .auth-brand { margin-bottom:20px; font-size:32px; }
 #authScreen .auth-page-heading { margin-bottom:22px; }
 #authScreen .auth-page-heading h1 { font-size:25px; }
 #authScreen .provider-button { padding-inline:12px; gap:9px; font-size:12px; }
}
@media(max-width:360px){#authScreen .auth-card{padding-inline:18px;}#authScreen .provider-button{grid-template-columns:20px minmax(0,1fr);}}
#authScreen .provider-primary { grid-template-columns:21px auto; justify-content:center; gap:3px 9px; min-height:58px; padding:9px 12px; }
#authScreen .provider-primary>span { font-size:12px; }
@media(max-width:500px){#authScreen .provider-primary{padding:8px;gap:3px 7px;min-height:56px;}#authScreen .provider-primary>span{font-size:12px;}}
.online-account-dialog { width:min(620px,calc(100vw - 28px)); max-height:90dvh; overflow:auto; padding:24px; background:var(--panel); color:var(--ink); border:1px solid var(--border); border-radius:14px; }
.online-account-dialog::backdrop { background:#000b; }
.online-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.online-dialog-head h2 { margin:0; font-size:21px; }
.online-account-dialog p { color:var(--muted); font-size:12px; line-height:1.7; }
.online-account-dialog form { display:grid; gap:16px; }
.online-account-dialog label { margin:0; min-width:0; }
.online-account-dialog input:not([type=checkbox]),.online-account-dialog select { min-height:44px; }
.online-dialog-actions { display:flex; justify-content:flex-end; gap:10px; }
.security-section { margin-top:22px; padding-top:20px; border-top:1px solid var(--border); }
.security-section h3 { margin:0 0 10px; font-size:15px; }
.security-factor { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:15px 0; font-size:12px; }
.security-check { display:flex; align-items:center; gap:10px; flex-direction:row; font-size:12px; }
.security-check input { width:18px; height:18px; min-width:18px; accent-color:#ed5262; margin:0; }
.mfa-qr { display:block; width:190px; max-width:100%; height:auto; margin:15px auto; padding:10px; background:white; border-radius:8px; }
[data-mfa-secret] { display:block; overflow-wrap:anywhere; padding:12px; color:var(--ink); user-select:all; }
[data-factor-form] { margin-top:16px; }
@media(max-width:650px){.online-account-dialog{padding:18px;}.online-dialog-head h2{font-size:19px;}.online-dialog-actions{flex-wrap:wrap;}.online-dialog-actions>button{flex:1;}.auth-card{padding:24px 20px;}.security-factor{align-items:flex-start;}}

/* Trois modes principaux (Google, Apple, Téléphone) : resserrés sur petit écran. */
@media(max-width:500px){#authScreen .online-providers{gap:6px;}#authScreen .provider-primary{grid-template-columns:18px auto;padding:8px 5px;gap:3px 5px;}#authScreen .provider-primary>svg{width:18px;height:18px;}#authScreen .provider-primary>span{font-size:12px;}}

/* Liens légaux : cibles tactiles confortables, discrets. */
#authScreen .auth-legal { display:flex; justify-content:center; gap:4px; margin:4px 0 0; font-size:12px; }
#authScreen .auth-legal a { color:#bdaeb1; padding:12px 10px; min-height:44px; text-underline-offset:3px; }
#authScreen .auth-legal a:hover { color:#f6efec; }
#authScreen .auth-guest-divider[hidden],#authScreen .auth-guest[hidden] { display:none; }
