:root {
    --uwz-bg: #eef3f8;
    --uwz-card: #fff;
    --uwz-text: #1e293b;
    --uwz-muted: #64748b;
    --uwz-blue: #2563eb;
    --uwz-line: #dbe3ee;
}
html[data-theme="odoo_enterprise"] {
    --uwz-bg: #0f172a;
    --uwz-card: #1e293b;
    --uwz-text: #e2e8f0;
    --uwz-muted: #94a3b8;
    --uwz-blue: #3b82f6;
    --uwz-line: #334155;
}
body.uwz-auth {
    margin: 0;
    min-height: 100vh;
    color: var(--uwz-text);
    background: var(--uwz-bg);
    font-family: var(--uz-police, Inter, system-ui, sans-serif);
}
.uwz-halo {
    position: fixed;
    width: 28rem;
    height: 28rem;
    border-radius: 50%;
    filter: blur(40px);
    background: rgba(37, 99, 235, .18);
    pointer-events: none;
}
.uwz-halo.a { top: -8rem; left: -6rem; }
.uwz-halo.b { right: -8rem; bottom: -6rem; background: rgba(14, 165, 233, .16); }
.uwz-top, .uwz-foot, .uwz-grid { position: relative; z-index: 1; }
.uwz-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .85rem 1.25rem;
}
.uwz-brand { display: flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; font-weight: 700; }
.uwz-brand img { width: 36px; height: 36px; }
.uwz-tools { display: flex; gap: .4rem; align-items: center; }
.uwz-tools button, .uwz-tools select {
    border: 1px solid var(--uwz-line);
    background: var(--uwz-card);
    color: var(--uwz-text);
    border-radius: 999px;
    padding: .35rem .7rem;
}
.uwz-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem 2rem;
}
.uwz-grid--seul { grid-template-columns: minmax(0, 560px); justify-content: center; }
.uwz-stepper, .uwz-card {
    background: var(--uwz-card);
    border-radius: 1.25rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
.uwz-stepper { padding: 1.25rem; align-self: start; }
.uwz-step { display: flex; gap: .75rem; padding: .7rem 0; color: var(--uwz-muted); }
.uwz-step.is-on { color: var(--uwz-text); font-weight: 600; }
.uwz-step b {
    width: 1.6rem; height: 1.6rem; border-radius: 50%;
    display: grid; place-items: center;
    background: #dbeafe; color: var(--uwz-blue); flex: none;
}
.uwz-card { padding: 1.75rem; }
.uwz-card h1 { font-size: 1.6rem; margin: .4rem 0; }
.uwz-muted { color: var(--uwz-muted); }
.uwz-field { margin-bottom: .9rem; }
.uwz-field label { display: block; font-size: .85rem; margin-bottom: .3rem; }
.uwz-input {
    display: flex; align-items: center; gap: .5rem;
    border: 1px solid var(--uwz-line); border-radius: .75rem; padding: .55rem .75rem; background: transparent;
}
.uwz-input input, .uwz-input select, .uwz-field textarea, .uwz-field input, .uwz-field select {
    width: 100%; border: 0; background: transparent; color: inherit; outline: none;
}
.uwz-field textarea, .uwz-field > input, .uwz-field > select {
    border: 1px solid var(--uwz-line); border-radius: .75rem; padding: .6rem .75rem;
}
.uwz-btn {
    background: var(--uwz-blue); color: #fff; border: 0; border-radius: .75rem;
    padding: .7rem 1.1rem; font-weight: 600;
}
.uwz-btn.ghost { background: var(--uwz-card); color: var(--uwz-text); border: 1px solid var(--uwz-line); }
.uwz-actions { display: flex; gap: .6rem; margin-top: 1rem; }
.uwz-link { color: var(--uwz-blue); }
.uwz-foot { padding: 0 1.25rem 1.5rem; color: var(--uwz-muted); font-size: .85rem; }
.uwz-acc details { border: 1px solid var(--uwz-line); border-radius: .9rem; padding: .8rem 1rem; margin-bottom: .7rem; }
.uwz-acc summary { cursor: pointer; font-weight: 600; }
.uwz-splash {
    min-height: 70vh; display: grid; place-items: center; text-align: center;
}
.uwz-bar { height: 8px; background: #dbeafe; border-radius: 99px; overflow: hidden; margin-top: 1rem; }
.uwz-bar span { display: block; height: 100%; width: 40%; background: var(--uwz-blue); animation: uwz 1.4s ease infinite; }
@keyframes uwz { 50% { transform: translateX(150%); } }
@media (max-width: 800px) {
    .uwz-grid { grid-template-columns: 1fr; }
}

/* Connexion : panneau de marque + carte, comme la coopérative. */
.uwz-auth-login { background: #eef3f8; }
.uwz-auth-login .uwz-top {
    min-height: 64px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 1px 12px rgba(15, 23, 42, .08);
}
.uwz-auth-login .uwz-top { z-index: 5; }
.uwz-auth-login .uwz-grid {
    box-sizing: border-box;
    width: min(1100px, calc(100% - 2rem));
    max-width: 1100px;
    margin: 1rem auto 0;
    padding: 0 0 1rem;
    grid-template-columns: minmax(260px, 42%) minmax(0, 1fr);
    gap: 1.25rem;
    min-height: calc(100vh - 64px - 7.5rem);
    align-items: stretch;
}
.uwz-auth-login .uwz-stepper {
    display: flex;
    align-self: stretch;
    align-items: center;
    justify-content: center;
    max-width: none;
    padding: 2.5rem 1.5rem;
    border-radius: 1.25rem;
    background: linear-gradient(160deg, #071b3b 0%, #0d47a1 58%, #1565c0 100%);
    color: #fff;
    box-shadow: 0 16px 40px rgba(7, 27, 59, .18);
}
.uwz-login-brand { text-align: center; }
.uwz-login-brand img { width: 140px; height: 140px; object-fit: contain; }
.uwz-login-brand strong { display: block; margin-top: .75rem; font-size: 1.6rem; letter-spacing: .04em; }
.uwz-login-brand p { margin: .35rem 0 0; color: rgba(255, 255, 255, .82); }
.uwz-auth-login .uwz-card {
    width: 100%;
    box-sizing: border-box;
    justify-self: stretch;
    align-self: stretch;
    margin: 0;
    transform: none;
    padding: 2rem 1.75rem 1.5rem;
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}
.uwz-login-heading { margin-bottom: 1.4rem; }
.uwz-auth-login .uwz-card h1 { font-size: 1.7rem; font-weight: 700; margin: 0 0 .35rem; }
.uwz-login-heading p { margin: 0; }
.uwz-auth-login .uwz-field label {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 .35rem;
    overflow: visible;
    clip: auto;
    white-space: normal;
}
.uwz-auth-login .uwz-input {
    padding: .15rem .85rem;
    gap: .75rem;
    border: 1px solid #dbe3ee;
    border-radius: .8rem;
    background: #fff;
    min-height: 48px;
}
.uwz-auth-login .uwz-input i { color: #1d4ed8; font-size: 1.05rem; }
.uwz-auth-login .uwz-input input {
    min-height: 44px;
    padding: .45rem 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    font: inherit;
}
.uwz-eye {
    border: 0;
    background: transparent;
    color: #64748b;
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
}
.uwz-remember {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .2rem 0 1rem;
    font-size: .92rem;
}
.uwz-auth-login .uwz-btn {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    min-height: 48px;
    text-align: center;
    text-decoration: none;
    border-radius: .8rem;
}
.uwz-auth-login .uwz-btn.ghost { background: #fff; }
.uwz-auth-login .uwz-card > p { width: auto; margin: 1rem 0 0; text-align: center; }
.uwz-auth-login .uwz-foot {
    position: static;
    width: min(1100px, calc(100% - 2rem));
    margin: .75rem auto 0;
    padding: 0 0 1.5rem;
    text-align: center;
    color: #475569;
}
html[data-theme="odoo_enterprise"] .uwz-auth-login { background: #0f172a; }
html[data-theme="odoo_enterprise"] .uwz-auth-login .uwz-top { background: #1e293b; }
html[data-theme="odoo_enterprise"] .uwz-auth-login .uwz-card,
html[data-theme="odoo_enterprise"] .uwz-auth-login .uwz-input { background: #1e293b; }
html[data-theme="odoo_enterprise"] .uwz-auth-login .uwz-foot { color: #cbd5e1; }
@media (max-width: 900px) {
    .uwz-auth-login .uwz-grid { grid-template-columns: 1fr; width: min(520px, calc(100% - 1.5rem)); margin-top: 1rem; }
    .uwz-auth-login .uwz-stepper { padding: 1.25rem; }
    .uwz-login-brand img { width: 72px; height: 72px; }
    .uwz-login-brand strong { font-size: 1.2rem; }
    .uwz-auth-login .uwz-card { padding: 1.25rem 1rem 1rem; }
    .uwz-auth-login .uwz-top { padding-inline: .75rem; }
    .uwz-tools select { max-width: 7.5rem; }
}

/* Inscription : étapes à gauche, formulaire lisible à droite. */
.uwz-auth-register { background: #e9eaed; }
.uwz-auth-register .uwz-halo { filter: blur(75px); opacity: .6; }
.uwz-auth-register .uwz-top { min-height: 64px; box-sizing: border-box; background: rgba(255,255,255,.94); box-shadow: 0 1px 12px rgba(15,23,42,.08); }
.uwz-auth-register .uwz-grid {
    box-sizing: border-box;
    width: min(1180px, calc(100% - 3rem));
    max-width: 1180px;
    margin: 1.5rem auto 0;
    padding: 0 0 1.5rem;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 2rem;
    min-height: 0;
    align-items: start;
}
.uwz-auth-register .uwz-stepper { background: transparent; box-shadow: none; border-radius: 0; padding: .35rem 0 0; max-width: none; }
.uwz-auth-register .uwz-step { position: relative; gap: .7rem; align-items: flex-start; padding: .15rem 0 1.15rem; }
.uwz-auth-register .uwz-step span { line-height: 1.35; padding-top: .2rem; }
.uwz-auth-register .uwz-step:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 34px; bottom: 0; width: 2px; background: #9ec5ec; }
.uwz-auth-register .uwz-step b { width: 30px; height: 30px; background: #45a5e0; color: #fff; }
.uwz-auth-register .uwz-step.is-on { color: #147ab7; }
.uwz-auth-register .uwz-card {
    box-sizing: border-box;
    width: 100%;
    justify-self: stretch;
    align-self: start;
    transform: none;
    margin-top: 0;
    padding: 1.5rem 1.5rem 1.25rem;
    max-height: none;
    overflow: visible;
    box-shadow: 0 10px 30px rgba(15,23,42,.08);
}
.uwz-auth-register .uwz-card h1 { margin: 0 0 1.1rem; font-size: 1.45rem; font-weight: 600; }
.uwz-auth-register .uwz-acc details { margin-bottom: .65rem; padding: .9rem 1rem .35rem; border-radius: .7rem; background: rgba(255,255,255,.7); }
.uwz-auth-register .uwz-acc summary { font-size: 1rem; font-weight: 600; }
.uwz-auth-register .uwz-acc details[open] summary { margin-bottom: .85rem; }
.uwz-auth-register .uwz-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .15rem 1rem; }
.uwz-auth-register .uwz-field.is-wide { grid-column: 1 / -1; }
.uwz-auth-register .uwz-field { min-width: 0; }
.uwz-auth-register .uwz-field textarea { min-height: 4.5rem; resize: vertical; }
.uwz-auth-register .uwz-actions { display: flex; gap: .75rem; margin-top: .5rem; }
.uwz-auth-register .uwz-actions > * { flex: 1; text-align: center; text-decoration: none; border-radius: .2rem; }
.uwz-auth-register .uwz-foot {
    box-sizing: border-box;
    position: static;
    width: min(1180px, calc(100% - 3rem));
    margin: .25rem auto 1.5rem;
    left: auto;
    text-align: center;
    padding: 0;
    color: #334155;
}
.uwz-auth-register .uwz-foot div { margin-top: .6rem; }
html[data-theme="odoo_enterprise"] .uwz-auth-register { background: #0f172a; }
html[data-theme="odoo_enterprise"] .uwz-auth-register .uwz-top { background: #1e293b; }
html[data-theme="odoo_enterprise"] .uwz-auth-register .uwz-acc details { background: #1e293b; }
html[data-theme="odoo_enterprise"] .uwz-auth-register .uwz-foot { color: #cbd5e1; }
@media (max-width: 900px) {
    .uwz-auth-register .uwz-grid { grid-template-columns: 1fr; width: min(640px, calc(100% - 1.5rem)); margin-top: 1rem; padding: 0 0 1rem; }
    .uwz-auth-register .uwz-stepper { max-width: none; }
    .uwz-auth-register .uwz-card { margin: 0; transform: none; max-height: none; }
    .uwz-auth-register .uwz-fields { grid-template-columns: 1fr; }
    .uwz-auth-register .uwz-foot { position: static; width: min(640px, calc(100% - 1.5rem)); padding: 0 0 1.5rem; }
}

.uwz-auth-register .uw-phone { display: flex; gap: .5rem; align-items: center; }
.uwz-auth-register .uw-phone span { box-sizing: border-box; flex: 0 0 4.5rem; max-width: 4.5rem; padding: .6rem .75rem; border: 1px solid var(--uwz-line); border-radius: .75rem; background: var(--uwz-card); text-align: center; }
.uwz-auth-register .uwz-field .uw-phone input { box-sizing: border-box; flex: 1; width: auto; min-width: 0; padding: .6rem .75rem; border: 1px solid var(--uwz-line); border-radius: .75rem; background: var(--uwz-card); color: var(--uwz-text); }

/* Pages d'accès à carte seule (mot de passe oublié, réinitialisation, accès suspendu,
   nouveau mot de passe, 2FA...) : même rendu que la carte de connexion. */
.uwz-grid--seul { margin-top: 1rem; }
.uwz-grid--seul .uwz-card { padding: 2rem 1.75rem 1.5rem; background: #fff; }
.uwz-grid--seul .auth-title { font-size: 1.55rem; font-weight: 700; margin: 0 0 .35rem; }
.uwz-grid--seul .auth-subtitle { margin: 0 0 1.4rem; color: var(--uwz-muted); }
.uwz-grid--seul .mb-3 { margin-bottom: .9rem; }
.uwz-grid--seul .mb-4 { margin-bottom: 1.25rem; }
.uwz-grid--seul .auth-form-label { display: block; margin: 0 0 .35rem; font-size: .88rem; font-weight: 600; }
.uwz-grid--seul .auth-input-group {
    display: flex; align-items: center; gap: .75rem; min-height: 48px; padding: .15rem .85rem;
    border: 1px solid #dbe3ee; border-radius: .8rem; background: #fff;
}
.uwz-grid--seul .auth-input-group:focus-within { border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(29, 78, 216, .12); }
.uwz-grid--seul .input-group-text { color: #1d4ed8; font-size: 1.05rem; background: none; border: 0; padding: 0; }
.uwz-grid--seul .form-control {
    flex: 1; min-width: 0; min-height: 44px; padding: .45rem 0; border: 0; outline: none;
    background: transparent; color: inherit; font: inherit;
}
.uwz-grid--seul .invalid-feedback { display: block; margin-top: .3rem; color: #b91c1c; font-size: .85rem; }
.uwz-grid--seul .btn-primary {
    display: block; width: 100%; min-height: 48px; border: 0; border-radius: .8rem;
    background: var(--uwz-blue); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.uwz-grid--seul .btn-link { border: 0; background: none; color: var(--uwz-blue); font: inherit; cursor: pointer; }
.uwz-grid--seul .alert-success { margin-bottom: 1rem; padding: .75rem .9rem; border-radius: .75rem; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.uwz-grid--seul .me-1 { margin-right: .25rem; }
.uwz-grid--seul .me-2 { margin-right: .5rem; }
.uwz-grid--seul .p-0 { padding: 0; }
.uwz-card__pied { margin-top: 1.1rem; text-align: center; font-size: .92rem; }
.uwz-card__pied a { color: var(--uwz-blue); text-decoration: none; }
