/* =========================================================================
   ArtLink — pages d'authentification (connexion, inscription, mot de passe).
   S'appuie sur les tokens de landing.css (couleurs profils, typo, rayons).
   ========================================================================= */

.auth { position: relative; isolation: isolate; overflow: hidden; padding: 56px 0 96px; min-height: calc(100dvh - var(--header-h)); }
.auth__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: stretch; max-width: 1080px; }

/* Panneau de marque (sombre, comme la section « Mise en relation ») */
.auth__aside {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; gap: 28px;
    padding: 44px 40px; border-radius: 28px;
    background: var(--dark-bg); color: var(--dark-text);
    box-shadow: var(--shadow-lg);
}
.auth__aside::before {
    content: ""; position: absolute; inset: auto -30% -40% auto; width: 420px; height: 420px; border-radius: 50%;
    background: var(--grad); filter: blur(90px); opacity: .35; pointer-events: none;
}
.auth__aside > * { position: relative; }
.auth__aside .eyebrow { margin-bottom: 0; }
.auth__aside-title { font: 800 clamp(28px, 3vw, 38px)/1.08 var(--font-display); letter-spacing: -.025em; color: #fff; }
.auth__personas { display: grid; gap: 12px; }
.auth__persona {
    --c: var(--blue);
    display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px;
    background: rgba(255, 255, 255, .05); border: 1px solid var(--dark-line);
}
.auth__persona.is-artist { --c: var(--green); }
.auth__persona.is-public { --c: var(--orange); }
.auth__persona-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--c); color: #fff; flex-shrink: 0; }
.auth__persona strong { display: block; color: #fff; font-size: 15px; }
.auth__persona small { display: block; color: var(--dark-muted); font-size: 13.5px; line-height: 1.4; }
.auth__aside-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; color: var(--dark-muted); font-size: 14px; }
.auth__aside-foot .icon { color: #7FD6B5; }

/* Carte formulaire */
.auth__card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
    padding: 44px clamp(24px, 4vw, 52px); box-shadow: var(--shadow);
    display: flex; flex-direction: column; justify-content: center;
}
.auth__title { font: 800 clamp(30px, 3.2vw, 40px)/1.08 var(--font-display); letter-spacing: -.03em; }
.auth__lead { margin-top: 10px; margin-bottom: 26px; color: var(--muted); font-size: 16px; }
.auth__lead strong { color: var(--ink); }
.auth__switch { margin-top: 22px; text-align: center; font-size: 15px; color: var(--muted); }
.auth__switch a, .auth__legal a { color: var(--violet); font-weight: 600; text-decoration: none; }
.auth__switch a:hover, .auth__legal a:hover { text-decoration: underline; }
.auth__legal { margin-top: 22px; font-size: 13px; color: var(--muted); text-align: center; }
.auth__divider { display: flex; align-items: center; gap: 14px; margin: 26px 0 18px; color: var(--muted); font-size: 14px; }
.auth__divider::before, .auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Formulaires */
.auth-form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field__label { font-weight: 600; font-size: 14px; color: var(--ink-2); }
.field__link { font-size: 14px; font-weight: 600; color: var(--violet); text-decoration: none; }
.field__link:hover { text-decoration: underline; }
.field__hint { color: var(--muted); font-size: 13px; }
.field__control {
    display: flex; align-items: center; gap: 10px;
    padding: 0 14px; min-height: 52px; border-radius: 14px;
    background: var(--paper); border: 1.5px solid var(--line);
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.field__control:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(123, 92, 240, .15); background: var(--surface); }
.field__control .icon { color: var(--muted); }
/* .lp : neutralise le style global des champs du site (landing.css), qui dessinait une 2e bordure dans les champs e-mail/texte */
.field__control input, .lp .field__control input, .lp .field__control input:focus {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; box-shadow: none; border-radius: 0;
    font: 500 16px/1.4 var(--font-body); color: var(--ink); padding: 14px 0;
}
.field__control input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.lp .field__control input:focus-visible { outline: none; }
.field__toggle {
    border: 0; background: var(--tint); color: var(--ink-2); cursor: pointer;
    font: 600 13px/1 var(--font-body); padding: 8px 10px; border-radius: 999px;
}

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
    display: grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px;
    border-radius: 7px; border: 1.5px solid var(--line); background: var(--paper); color: transparent;
    transition: background-color .15s ease, border-color .15s ease;
}
.check__box .icon { width: 14px; height: 14px; }
.check input:checked + .check__box { background: var(--violet); border-color: var(--violet); color: #fff; }
.check input:focus-visible + .check__box { outline: 3px solid var(--violet); outline-offset: 2px; }
.check a { color: var(--violet); font-weight: 600; }

.auth-actions { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-actions .btn--primary { flex: 1; }

.btn.is-loading { opacity: .7; pointer-events: none; }
.btn.is-loading::after {
    content: ""; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent; animation: auth-spin .7s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* Alertes */
.auth-alert {
    display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px;
    padding: 12px 16px; border-radius: 14px; font-size: 15px; font-weight: 500;
}
.auth-alert[hidden] { display: none; }
.auth-alert--error { background: rgba(239, 77, 77, .1); color: #C42F2F; border: 1px solid rgba(239, 77, 77, .25); }
.auth-alert--error a { color: inherit; font-weight: 700; }
.auth-alert--success { background: var(--green-soft); color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 30%, transparent); }
@media (prefers-color-scheme: dark) {
    .auth-alert--error { color: #FF8A8A; }
    .auth-alert--success { color: #7FD6B5; }
}

/* Choix du profil (inscription) */
.profile-picker { display: grid; gap: 12px; margin-bottom: 24px; }
.profile-option {
    --c: var(--orange); --c-soft: var(--orange-soft);
    position: relative; display: flex; align-items: center; gap: 14px; cursor: pointer;
    padding: 16px 18px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.profile-option:hover { transform: translateY(-2px); border-color: var(--c); }
.profile-option.is-artist { --c: var(--green); --c-soft: var(--green-soft); }
.profile-option.is-venue { --c: var(--blue); --c-soft: var(--blue-soft); }
.profile-option input { position: absolute; opacity: 0; }
.profile-option__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--c-soft); color: var(--c); flex-shrink: 0; }
.profile-option__text strong { display: block; font-size: 16px; }
.profile-option__text small { display: block; color: var(--muted); font-size: 14px; line-height: 1.4; }
.profile-option__check {
    margin-left: auto; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
    border: 1.5px solid var(--line); color: transparent; flex-shrink: 0;
}
.profile-option__check .icon { width: 15px; height: 15px; }
.profile-option:has(input:checked) { border-color: var(--c); box-shadow: 0 0 0 4px var(--c-soft); }
.profile-option:has(input:checked) .profile-option__check { background: var(--c); border-color: var(--c); color: #fff; }
.profile-option:has(input:focus-visible) { outline: 3px solid var(--violet); outline-offset: 3px; }

/* Progression */
.auth-progress { display: flex; gap: 8px; margin-bottom: 28px; }
.auth-progress li {
    flex: 1; display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--muted);
    padding-bottom: 10px; border-bottom: 3px solid var(--line);
}
.auth-progress li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--tint); font-size: 12px; }
.auth-progress li.is-active { color: var(--ink); border-image: var(--grad) 1; }
.auth-progress li.is-active span { background: var(--ink); color: var(--paper); }
.auth-progress li.is-done { color: var(--green); border-bottom-color: var(--green); }
.auth-progress li.is-done span { background: var(--green); color: #fff; }

/* Code à 4 chiffres */
.code-input { display: flex; gap: 12px; justify-content: center; }
.code-input input {
    width: 64px; height: 72px; text-align: center; border-radius: 16px;
    border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
    font: 800 30px/1 var(--font-display);
}
.code-input input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(123, 92, 240, .15); }

@media (max-width: 900px) {
    .auth { padding: 24px 0 64px; }
    .auth__grid { grid-template-columns: 1fr; gap: 20px; }
    .auth__aside { order: 2; padding: 28px 24px; }
    .auth__card { padding: 32px 22px; border-radius: 24px; }
}
@media (max-width: 520px) {
    .field-grid { grid-template-columns: 1fr; }
    .code-input input { width: 56px; height: 64px; }
}
