/**
 * MAMOU — pages d'authentification (connexion, inscription, mot de passe).
 * Mêmes jetons que « Atelier » (papier chaud, encre, rouge Mamou), version autonome :
 * ces pages n'embarquent ni AdminLTE ni le thème public.
 */
:root {
    --au-paper: #f5f2ec; --au-surface: #fff; --au-ink: #14110f; --au-ink-2: #4a443e; --au-ink-3: #6f6760;
    --au-line: #e6e0d5; --au-line-2: #d6cec1; --au-brand: #c91417; --au-brand-2: #a81114; --au-brand-soft: #fbebea;
    --au-ok: #26704a; --au-ok-bg: #e4f1e9; --au-bad: #b3261e; --au-bad-bg: #fbe8e5;
    --au-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter Variable", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
    --au-ease: cubic-bezier(.2, .8, .2, 1);
}

body.au {
    margin: 0; min-height: 100dvh; background: var(--au-paper); color: var(--au-ink);
    font-family: var(--au-font); font-size: 16px; line-height: 1.5; letter-spacing: -.006em;
    -webkit-font-smoothing: antialiased;
}
.au a { color: var(--au-brand); text-decoration: none; font-weight: 600; }
.au a:hover { color: var(--au-brand-2); text-decoration: underline; text-underline-offset: 3px; }
.au a:focus-visible, .au button:focus-visible, .au input:focus-visible { outline: 3px solid rgba(201, 20, 23, .35); outline-offset: 2px; }

.au-page { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); }

/* ───── Panneau de marque (masqué sur mobile) ───── */
.au-brand { display: none; }
.au-brand__logo { display: inline-block; }
.au-brand__logo:hover { text-decoration: none; }
.au-brand__logo { align-self: flex-start; background: var(--au-paper); padding: 10px 16px; border-radius: 14px; }
.au-brand__logo img { height: 30px; width: auto; display: block; }

/* ───── Panneau formulaire ───── */
.au-panel {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: max(28px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
    gap: 28px; min-width: 0;
}
.au-panel__logo { display: block; }
.au-panel__logo:hover { text-decoration: none; }
.au-card { width: 100%; max-width: 420px; }
.au-title { font-size: 2rem; line-height: 1.12; font-weight: 700; letter-spacing: -.028em; margin: 0 0 6px; }
.au-sub { color: var(--au-ink-3); margin: 0 0 24px; }
.au-title:not(:has(+ .au-sub)) { margin-bottom: 24px; }

/* Bandeaux */
.au-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: .9375rem; margin-bottom: 18px; }
.au-alert i { margin-top: 2px; flex: none; }
.au-alert ul { margin: 0; padding-left: 1.1em; }
.au-alert--ok { background: var(--au-ok-bg); color: var(--au-ok); }
.au-alert--bad { background: var(--au-bad-bg); color: var(--au-bad); }

/* Champs */
.au-field { margin-bottom: 16px; }
.au-field label { display: block; font-size: .875rem; font-weight: 600; color: var(--au-ink-2); margin-bottom: 6px; }
.au-input { position: relative; display: flex; align-items: center; }
.au-input > i { position: absolute; left: 14px; color: var(--au-ink-3); pointer-events: none; font-size: 1.05rem; }
.au-input input {
    width: 100%; height: 52px; padding: 0 48px 0 44px; font: inherit; font-size: 16px; color: var(--au-ink);
    background: var(--au-surface); border: 1px solid var(--au-line-2); border-radius: 14px;
    transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
.au-input input:hover { border-color: #b9b0a2; }
.au-input input:focus { outline: none; border-color: var(--au-brand); box-shadow: 0 0 0 4px rgba(201, 20, 23, .14); }
.au-input button {
    position: absolute; right: 4px; width: 44px; height: 44px; border: 0; background: none; color: var(--au-ink-3);
    border-radius: 10px; display: grid; place-items: center; cursor: pointer;
}
.au-input button:hover { color: var(--au-ink); }
.au-field.is-invalid input { border-color: var(--au-bad); background: #fffafa; }
.au-field.is-invalid input:focus { box-shadow: 0 0 0 4px rgba(179, 38, 30, .14); }
.au-hint { display: block; color: var(--au-ink-3); font-size: .8125rem; margin-top: 6px; }

.au-row { display: flex; justify-content: flex-end; margin: -4px 0 20px; font-size: .9375rem; }

/* Case à cocher */
.au-check { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 22px; font-size: .9375rem; color: var(--au-ink-2); }
.au-check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--au-brand); }
.au-check.is-invalid { color: var(--au-bad); }

/* Boutons */
.au-btn {
    width: 100%; height: 52px; border: 0; border-radius: 14px; background: var(--au-brand); color: #fff;
    font: inherit; font-size: 1rem; font-weight: 650; cursor: pointer; transition: background .15s, transform .15s var(--au-ease);
}
.au-btn:hover { background: var(--au-brand-2); }
.au-btn:active { transform: scale(.985); }
.au-btn[disabled] { opacity: .7; cursor: progress; }
.au-switch { text-align: center; color: var(--au-ink-3); margin: 22px 0 0; font-size: .9375rem; }

.au-foot { margin: 0; font-size: .8125rem; color: var(--au-ink-3); text-align: center; }
.au-foot a { color: inherit; font-weight: 500; }

/* ───── Bureau : marque à gauche ───── */
@media (min-width: 992px) {
    .au-page { grid-template-columns: minmax(380px, 5fr) minmax(0, 6fr); }
    .au-brand {
        display: flex; flex-direction: column; justify-content: space-between; padding: 44px 52px; position: sticky; top: 0; height: 100dvh;
        color: #f5f2ec; background:
            linear-gradient(180deg, rgba(20, 17, 15, .55), rgba(20, 17, 15, .92)),
            url('/dist/bgauth.png') center/cover no-repeat, #14110f;
        overflow: hidden;
    }
    .au-brand::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--au-brand); }
    .au-brand__kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 600; color: #d9cfc0; margin: 0 0 14px; }
    .au-brand__title { font-size: 2.4rem; line-height: 1.1; font-weight: 700; letter-spacing: -.03em; margin: 0; max-width: 16em; }
    .au-brand__points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: #d9cfc0; font-size: .9375rem; }
    .au-brand__points i { color: #fff; background: var(--au-brand); border-radius: 50%; padding: 2px 3px; margin-right: 8px; font-size: .8rem; }
    .au-panel__logo { display: none; }
    .au-panel { padding: 48px; }
}
@media (max-width: 380px) { .au-title { font-size: 1.75rem; } }
@media (prefers-reduced-motion: reduce) { .au * { transition: none !important; } }
