@import url('brand.css');

.auth-body { min-height: 100vh; background: var(--bg-soft); }
.auth-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; min-height: 100vh; }

/* Aside visuel */
.auth-aside {
    background: var(--grad-cta); color: #fff; padding: 44px;
    display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-aside::before {
    content: ''; position: absolute; width: 380px; height: 380px; right: -120px; bottom: -120px;
    background: rgba(255,255,255,.12); border-radius: 50%;
}
.auth-aside .brand { font-size: 24px; position: relative; }
.aside-content { position: relative; max-width: 380px; }
.aside-content h2 { font-size: 34px; line-height: 1.2; margin-bottom: 14px; }
.aside-content p { opacity: .92; font-size: 17px; margin-bottom: 26px; }
.aside-list { list-style: none; }
.aside-list li { padding: 9px 0; font-weight: 600; font-size: 16px; opacity: .96; }
.aside-foot { position: relative; font-size: 13px; opacity: .8; }

/* Formulaires */
.auth-main { padding: 32px 44px; display: flex; flex-direction: column; }
.auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.back-link { color: var(--muted); font-weight: 600; font-size: 14px; }
.back-link:hover { color: var(--violet-700); }
.lang-select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    border: 1.5px solid var(--border); border-radius: 999px;
    padding: 9px 34px 9px 34px; font-family: var(--font); font-weight: 700; font-size: 14px; color: var(--ink);
    background-color: #fff;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237C3AED' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.6 2.7 2.6 15.3 0 18M12 3c-2.6 2.7-2.6 15.3 0 18'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237C3AED' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: left 12px center, right 12px center;
    cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.lang-select:hover { border-color: var(--violet-400); }
.lang-select:focus { outline: none; border-color: var(--violet-400); box-shadow: 0 0 0 3px rgba(124,58,237,.15); }
[dir="rtl"] .lang-select { background-position: right 12px center, left 12px center; }

.auth-card {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 34px; max-width: 460px; width: 100%; margin: auto;
}
.tabs { display: flex; background: var(--violet-050); border-radius: 999px; padding: 5px; margin-bottom: 24px; }
.tab {
    flex: 1; border: 0; background: transparent; padding: 11px; border-radius: 999px;
    font-family: var(--font); font-weight: 700; font-size: 15px; color: var(--muted); cursor: pointer; transition: .2s;
}
.tab.active { background: #fff; color: var(--violet-700); box-shadow: var(--shadow-sm); }

.auth-form h1 { font-size: 26px; margin-bottom: 22px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-form .field { margin-bottom: 16px; }
.auth-form label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.auth-form input {
    width: 100%; padding: 13px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-family: var(--font); font-size: 15px; color: var(--ink); background: var(--bg-soft);
}
.auth-form input:focus { outline: 2px solid var(--violet-400); background: #fff; }

.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.role {
    border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 13px; text-align: center;
    font-weight: 700; font-size: 14px; cursor: pointer; transition: .2s; color: var(--muted);
}
.role.active { border-color: var(--violet-400); background: var(--violet-050); color: var(--violet-700); }
.role input { display: none; }

.pro-note {
    background: var(--yellow-100); color: #7a5b00; border-radius: var(--radius-sm);
    padding: 10px 14px; font-size: 13px; font-weight: 600; margin: 4px 0 16px;
}
.terms { color: var(--muted); font-size: 12.5px; text-align: center; margin-top: 14px; }

.form-msg { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.form-msg.error { background: #fdecea; color: #c0392b; }
.form-msg.success { background: #e6f7f1; color: #0E7C5A; }

@media (max-width: 880px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-main { padding: 24px; }
}
[dir="rtl"] .back-link { transform: scaleX(-1); display: inline-block; }
