/* Formulaire unique de connexion et inscription, page ou fenêtre intégrée. */

:where(.shell, .auth-conteneur) .form-side { display: flex; flex-direction: column; padding: var(--palette-espacement-cabinet) var(--palette-espacement-components-3); background: var(--bg); min-width: 0; }
:where(.shell, .auth-conteneur) .top-bar { display: flex; justify-content: flex-end; align-items: center; gap: var(--palette-espacement-cabinet-conversation-5); font-size: var(--palette-typographie-cabinet-conversation-3); color: var(--muted); }
:where(.shell, .auth-conteneur) .top-bar .switch { color: var(--ink-2); }
:where(.shell, .auth-conteneur) .top-bar a.link { color: var(--accent); font-weight: 600; }
:where(.shell, .auth-conteneur) .top-bar a.link:hover { color: var(--accent-hover); text-decoration: underline; }
:where(.shell, .auth-conteneur) .form-wrap { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: clamp(var(--palette-espacement-cabinet-conversation), 7vh, var(--palette-espacement-changer-psychologue)) 0 var(--palette-espacement-cabinet); }
:where(.shell, .auth-conteneur) .auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--palette-rayon-composants); padding: var(--palette-espacement-invitation-4); box-shadow: var(--shadow-card); }
:where(.shell, .auth-conteneur) .auth-card h1 { font-size: var(--palette-typographie-invitation-3); letter-spacing: var(--palette-typographie-layout-2); margin: 0 0 var(--palette-espacement-cabinet-conversation-11); font-weight: 700; color: var(--ink); }
:where(.shell, .auth-conteneur) .auth-card .sub { color: var(--muted); font-size: var(--palette-typographie-cabinet-conversation-2); margin: 0 0 var(--palette-espacement-composants-2); }
:where(.shell, .auth-conteneur) .seg { display: inline-flex; gap: var(--palette-espacement-cabinet-2); padding: var(--palette-espacement-cabinet-2); background: var(--surface-2); border-radius: var(--palette-rayon-cabinet-conversation-3); border: 1px solid var(--line); margin-bottom: var(--palette-espacement-cabinet-conversation); width: 100%; }
:where(.shell, .auth-conteneur) .seg button { flex: 1; padding: var(--palette-espacement-cabinet-conversation-11) var(--palette-espacement-cabinet-conversation-7); border-radius: var(--palette-rayon-cabinet-conversation-2); font-size: var(--palette-typographie-components); font-weight: 600; color: var(--muted); background: transparent; cursor: pointer; transition: all .15s; }
:where(.shell, .auth-conteneur) .seg button:hover { color: var(--ink-2); }
:where(.shell, .auth-conteneur) .seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px var(--palette-ombre-index-2); }
:where(.shell, .auth-conteneur) .field-group { display: flex; flex-direction: column; gap: var(--palette-espacement-cabinet-conversation-3); margin-bottom: var(--palette-espacement-cabinet-conversation-5); }
:where(.shell, .auth-conteneur) .field-group label { font-size: var(--palette-typographie-components-2); font-weight: 600; color: var(--ink-2); }
:where(.shell, .auth-conteneur) .label-row { display: flex; justify-content: space-between; align-items: baseline; }
:where(.shell, .auth-conteneur) .label-row .forgot { font-size: var(--palette-typographie-cabinet-conversation-4); color: var(--accent); font-weight: 600; cursor: pointer; }
:where(.shell, .auth-conteneur) .label-row .forgot:hover { color: var(--accent-hover); text-decoration: underline; }
:where(.shell, .auth-conteneur) .in-wrap { position: relative; display: flex; align-items: center; }
:where(.shell, .auth-conteneur) .in-wrap .lead { position: absolute; left: 14px; color: var(--muted-2); display: inline-flex; pointer-events: none; }
:where(.shell, .auth-conteneur) .in-wrap .trail { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); padding: var(--palette-espacement-cabinet-conversation-3); border-radius: var(--palette-rayon-conversation); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; background: none; border: 0; -webkit-appearance: none; appearance: none; }
:where(.shell, .auth-conteneur) .in-wrap .trail:hover { color: var(--ink-2); background: var(--surface-2); }
:where(.shell, .auth-conteneur) input.txt { width: 100%; height: 44px; padding: 0 var(--palette-espacement-cabinet-conversation-5) 0 var(--palette-espacement-index); border: 1px solid var(--line-strong); border-radius: var(--palette-rayon-components); background: var(--surface); font-size: var(--palette-typographie-cabinet-conversation-2); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
:where(.shell, .auth-conteneur) input.txt::placeholder { color: var(--muted-2); }
:where(.shell, .auth-conteneur) input.txt:hover { border-color: var(--adaptation-bordure-muted-2, var(--muted-2)); }
:where(.shell, .auth-conteneur) input.txt:focus { border-color: var(--adaptation-bordure-action-accent, var(--accent)); box-shadow: 0 0 0 4px var(--accent-softer); }
:where(.shell, .auth-conteneur) input.txt.with-trail { padding-right: var(--palette-espacement-conversation-6); }
:where(.shell, .auth-conteneur) .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--palette-espacement-cabinet-conversation-7); }

:where(.shell, .auth-conteneur) .pwd-meter { margin-top: var(--palette-espacement-cabinet-conversation-11); display: flex; flex-direction: column; gap: var(--palette-espacement-cabinet-conversation-3); }
:where(.shell, .auth-conteneur) .pwd-bars { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--palette-espacement-cabinet-2); }
:where(.shell, .auth-conteneur) .pwd-bars span { height: 4px; border-radius: var(--palette-rayon-home); background: var(--line); }
:where(.shell, .auth-conteneur) .pwd-bars span.on-1 { background: var(--adaptation-fond-danger-danger, var(--danger)); }
:where(.shell, .auth-conteneur) .pwd-bars span.on-2 { background: var(--adaptation-fond-danger-warning, var(--warning)); }
:where(.shell, .auth-conteneur) .pwd-bars span.on-3 { background: var(--palette-fond-avertissement-index); }
:where(.shell, .auth-conteneur) .pwd-bars span.on-4 { background: var(--adaptation-fond-succes-success, var(--success)); }
:where(.shell, .auth-conteneur) .pwd-hint { font-size: var(--palette-typographie-components-4); color: var(--muted); display: flex; justify-content: space-between; gap: var(--palette-espacement-cabinet-conversation-11); }
:where(.shell, .auth-conteneur) .pwd-hint b { font-weight: 600; color: var(--ink-2); }

:where(.shell, .auth-conteneur) .check-row { display: flex; align-items: flex-start; gap: var(--palette-espacement-cabinet-conversation-6); margin: var(--palette-espacement-cabinet-conversation-5) 0; font-size: var(--palette-typographie-cabinet-conversation-3); color: var(--ink-2); }
:where(.shell, .auth-conteneur) .check-row input[type=checkbox] { appearance: none; width: 18px; height: 18px; border: 1.5px solid var(--line-strong); border-radius: var(--palette-rayon-conversation-2); background: var(--surface); cursor: pointer; flex: 0 0 18px; margin-top: var(--palette-espacement-conversation); position: relative; }
:where(.shell, .auth-conteneur) .check-row input:checked { background: var(--adaptation-fond-action-accent, var(--accent)); border-color: var(--adaptation-bordure-action-accent, var(--accent)); }
:where(.shell, .auth-conteneur) .check-row input:checked::after { content: ""; position: absolute; left: 4px; top: 1px; width: 6px; height: 11px; border: solid var(--palette-bordure-composants-8); border-width: 0 2px 2px 0; transform: rotate(45deg); }
:where(.shell, .auth-conteneur) .check-row label { cursor: pointer; line-height: 1.45; }
:where(.shell, .auth-conteneur) .check-row a { color: var(--accent); font-weight: 600; }

:where(.shell, .auth-conteneur) .btn-block-auth { width: 100%; height: 46px; background: var(--adaptation-fond-action-accent, var(--accent)); color: var(--palette-texte-inverse-components); border: 0; border-radius: var(--palette-rayon-cabinet-conversation-3); font-size: var(--palette-typographie-composants-14); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--palette-espacement-cabinet-conversation-11); transition: background .15s, transform .05s; margin-top: var(--palette-espacement-cabinet-conversation-3); }
:where(.shell, .auth-conteneur) .btn-block-auth:hover { background: var(--adaptation-fond-action-accent-hover, var(--accent-hover)); }
:where(.shell, .auth-conteneur) .btn-block-auth:active { transform: translateY(1px); }
:where(.shell, .auth-conteneur) .btn-block-auth:disabled { opacity: 0.5; cursor: not-allowed; }

:where(.shell, .auth-conteneur) .legal { font-size: var(--palette-typographie-components-4); color: var(--muted); margin-top: var(--palette-espacement-composants-3); text-align: center; line-height: 1.5; }
:where(.shell, .auth-conteneur) .legal a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }

:where(.shell, .auth-conteneur) .back-link { display: inline-flex; align-items: center; gap: var(--palette-espacement-cabinet-conversation-3); font-size: var(--palette-typographie-cabinet-conversation-3); color: var(--muted); font-weight: 500; margin-bottom: var(--palette-espacement-cabinet-conversation-8); cursor: pointer; padding: var(--palette-espacement-cabinet-conversation-3) var(--palette-espacement-cabinet-conversation-6); border-radius: var(--palette-rayon-cabinet-2); margin-left: var(--palette-espacement-conversation-5); }
:where(.shell, .auth-conteneur) .back-link:hover { color: var(--ink-2); background: var(--surface-2); }

:where(.shell, .auth-conteneur) .sent-state { text-align: center; padding: var(--palette-espacement-cabinet-conversation-11) 0 var(--palette-espacement-cabinet-conversation-3); }
:where(.shell, .auth-conteneur) .sent-icon { width: 64px; height: 64px; border-radius: var(--palette-rayon-composants-2); background: var(--success-soft); color: var(--palette-texte-succes-components); display: inline-flex; align-items: center; justify-content: center; margin-bottom: var(--palette-espacement-cabinet-conversation-8); }
:where(.shell, .auth-conteneur) .mail-tag { display: inline-flex; align-items: center; gap: var(--palette-espacement-cabinet-conversation-11); padding: var(--palette-espacement-cabinet-conversation-11) var(--palette-espacement-cabinet-conversation-5); border-radius: var(--palette-rayon-cabinet-conversation-4); background: var(--surface-2); border: 1px solid var(--line); font-size: var(--palette-typographie-components); font-weight: 600; color: var(--ink-2); margin: var(--palette-espacement-cabinet-conversation-3) 0 var(--palette-espacement-composants-3); }
:where(.shell, .auth-conteneur) .resend { font-size: var(--palette-typographie-components-2); color: var(--muted); margin-top: var(--palette-espacement-cabinet-conversation-5); }
:where(.shell, .auth-conteneur) .resend a { color: var(--accent); font-weight: 600; cursor: pointer; }

:where(.shell, .auth-conteneur) .error-box { padding: var(--palette-espacement-cabinet-conversation-6) var(--palette-espacement-cabinet-conversation-7); background: var(--palette-surface-danger-index); color: var(--palette-texte-danger-changer-psychologue-2); border-radius: var(--palette-rayon-cabinet-conversation-4); font-size: var(--palette-typographie-cabinet-conversation-3); margin-bottom: var(--palette-espacement-cabinet-conversation-6); border: 1px solid var(--palette-bordure-changer-psychologue); display: none; }
:where(.shell, .auth-conteneur) .error-box.show { display: block; }

:where(.shell, .auth-conteneur) .form-foot { padding-top: var(--palette-espacement-cabinet-conversation-10); font-size: var(--palette-typographie-components-4); color: var(--muted); text-align: center; }
:where(.shell, .auth-conteneur) .form-foot a { color: var(--muted); }

:where(.shell, .auth-conteneur) .view { display: none; }
:where(.shell, .auth-conteneur) .view.active { display: block; }
:where(.shell, .auth-conteneur) .form-logo-mobile { display: none; }

@media (max-width: 900px) {
  :where(.shell, .auth-conteneur) .form-logo-mobile {
    display: flex;
    justify-content: center;
    padding: var(--palette-espacement-cabinet-conversation-8) var(--palette-espacement-cabinet-conversation) var(--palette-espacement-cabinet-conversation-6);  /* compact mais pas tassé (ajusté 15/06) */
    text-decoration: none;
  }
  :where(.shell, .auth-conteneur) .form-logo-mobile img {
    height: 32px;
    width: auto;
    display: block;
  }
  :where(.shell, .auth-conteneur) .form-side .top-bar { display: none; }
  :where(.shell, .auth-conteneur) .form-wrap { padding-top: var(--palette-espacement-cabinet-conversation-3); padding-bottom: var(--palette-espacement-cabinet-conversation-3); }
  :where(.shell, .auth-conteneur) .auth-card { padding: var(--palette-espacement-cabinet-conversation) var(--palette-espacement-cabinet-conversation-10); }
  :where(.shell, .auth-conteneur) .auth-card .sub { margin-bottom: var(--palette-espacement-cabinet-conversation-8); }
  :where(.shell, .auth-conteneur) .seg { margin-bottom: var(--palette-espacement-cabinet-conversation-8); }
  :where(.shell, .auth-conteneur) .form-side { padding-top: var(--palette-espacement-cabinet-conversation-5); padding-bottom: var(--palette-espacement-cabinet-conversation-11); }
}
@media (max-width: 600px) {
  :where(.shell, .auth-conteneur) .row-2 { grid-template-columns: 1fr; gap: 0; }
}
:where(.shell, .auth-conteneur) .su-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--palette-espacement-cabinet-conversation-5); min-height: 30px; }
:where(.shell, .auth-conteneur) .su-back { display: inline-flex; align-items: center; gap: var(--palette-espacement-cabinet-conversation-3); font-size: var(--palette-typographie-cabinet-conversation-3); color: var(--muted); font-weight: 600; cursor: pointer; padding: var(--palette-espacement-cabinet-conversation-3) var(--palette-espacement-cabinet-conversation-6); border-radius: var(--palette-rayon-cabinet-2); margin-left: var(--palette-espacement-conversation-5); background: none; border: 0; -webkit-appearance: none; appearance: none; font-family: inherit; }
:where(.shell, .auth-conteneur) .su-back:hover { color: var(--ink-2); background: var(--surface-2); }
:where(.shell, .auth-conteneur) .su-back[hidden] { display: none; }
:where(.shell, .auth-conteneur) .su-count { font-size: var(--palette-typographie-cabinet-conversation-4); font-weight: 600; color: var(--muted); letter-spacing: var(--palette-typographie-components-5); }
:where(.shell, .auth-conteneur) .su-progress { display: flex; gap: var(--palette-espacement-cabinet-conversation-9); margin-bottom: var(--palette-espacement-composants-2); }
:where(.shell, .auth-conteneur) .su-progress .seg { flex: 1; height: 5px; border-radius: var(--palette-rayon-home); background: var(--line); overflow: hidden; transition: background .3s ease; }
:where(.shell, .auth-conteneur) .su-progress .seg .fill { display: block; height: 100%; width: 0; border-radius: var(--palette-rayon-home); background: var(--adaptation-fond-action-accent, var(--accent)); transition: width .35s cubic-bezier(.4,0,.2,1); }
:where(.shell, .auth-conteneur) .su-progress .seg.done .fill { width: 100%; }
:where(.shell, .auth-conteneur) .su-progress .seg.current .fill { width: 100%; }
:where(.shell, .auth-conteneur) .su-step { display: none; }
:where(.shell, .auth-conteneur) .su-step.active { display: block; animation: suIn .28s cubic-bezier(.4,0,.2,1); }
@keyframes suIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
:where(.shell, .auth-conteneur) .su-step h1 { font-size: var(--palette-typographie-composants-15); letter-spacing: var(--palette-typographie-layout-2); margin: 0 0 var(--palette-espacement-components); font-weight: 700; color: var(--ink); }
:where(.shell, .auth-conteneur) .su-step .sub { color: var(--muted); font-size: var(--palette-typographie-cabinet-conversation-2); line-height: 1.5; margin: 0 0 var(--palette-espacement-composants-3); }
:where(.shell, .auth-conteneur) .su-step .sub b { color: var(--ink); font-weight: 600; }
:where(.shell, .auth-conteneur) .su-code { width: 100%; height: 58px; text-align: center; font-size: var(--palette-typographie-invitation-3); font-weight: 700; letter-spacing: var(--palette-typographie-cabinet-conversation-4); border: 1.5px solid var(--line-strong); border-radius: var(--palette-rayon-composants-3); background: var(--surface); color: var(--ink); padding: 0 var(--palette-espacement-cabinet-conversation-5) 0 var(--palette-espacement-cabinet-conversation); box-sizing: border-box; outline: none; transition: border-color .15s, box-shadow .15s; font-family: var(--palette-police-monospace-index); }
:where(.shell, .auth-conteneur) .su-code:focus { border-color: var(--adaptation-bordure-action-accent, var(--accent)); box-shadow: 0 0 0 3px var(--accent-softer); }
:where(.shell, .auth-conteneur) .su-code.error { border-color: var(--adaptation-bordure-danger-danger, var(--danger)); }
:where(.shell, .auth-conteneur) .su-resend { display: flex; align-items: center; justify-content: space-between; gap: var(--palette-espacement-cabinet-conversation-7); margin-top: var(--palette-espacement-cabinet-conversation-2); flex-wrap: wrap; font-size: var(--palette-typographie-components-2); color: var(--muted); }
:where(.shell, .auth-conteneur) .su-resend a { color: var(--accent); font-weight: 600; cursor: pointer; }
:where(.shell, .auth-conteneur) .su-resend a[aria-disabled="true"] { color: var(--muted); cursor: not-allowed; pointer-events: none; }
:where(.shell, .auth-conteneur) .su-info { display: none; padding: var(--palette-espacement-cabinet-conversation-6) var(--palette-espacement-cabinet-conversation-7); background: var(--warning-soft); color: var(--palette-texte-avertissement-index); border: 1px solid var(--palette-bordure-index); border-radius: var(--palette-rayon-cabinet-conversation-4); font-size: var(--palette-typographie-cabinet-conversation-3); margin-bottom: var(--palette-espacement-cabinet-conversation-7); line-height: 1.45; }
:where(.shell, .auth-conteneur) .su-info.show { display: block; }
:where(.shell, .auth-conteneur) .su-final { text-align: center; padding: var(--palette-espacement-cabinet-conversation-11) 0 var(--palette-espacement-cabinet-2); }
:where(.shell, .auth-conteneur) .su-final .orb { width: 72px; height: 72px; border-radius: var(--palette-rayon-composants-2); display: inline-flex; align-items: center; justify-content: center; margin-bottom: var(--palette-espacement-cabinet-conversation-8); }
:where(.shell, .auth-conteneur) .su-final .orb.ok { background: var(--success-soft); color: var(--palette-texte-succes-components); }
:where(.shell, .auth-conteneur) .su-final h1 { font-size: var(--palette-typographie-conversation-5); margin-bottom: var(--palette-espacement-cabinet-conversation-11); }
:where(.shell, .auth-conteneur) .su-final .lead { color: var(--muted); font-size: var(--palette-typographie-cabinet-conversation-2); line-height: 1.55; margin: 0 0 var(--palette-espacement-cabinet-2); }
:where(.shell, .auth-conteneur) .su-boot { display: flex; align-items: center; justify-content: center; padding: var(--palette-espacement-components-3) 0; color: var(--muted); }
:where(.shell, .auth-conteneur) .su-boot .sp { width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--adaptation-bordure-action-accent, var(--accent)); border-radius: var(--palette-rayon-composants-2); animation: suSpin .7s linear infinite; }
@keyframes suSpin { to { transform: rotate(360deg); } }