/* SELF DRIVE — Présentation commune des pages de connexion et d'inscription. */
.auth-layout { display: flex; flex-direction: column; min-height: 100svh; background: #f5f9fa; }
.auth-layout > .brand-strip,
.auth-layout > .navbar { flex-shrink: 0; }
.auth-layout > #main-content { display: flex; flex: 1; flex-direction: column; }
.auth-layout .auth-page { display: flex; flex: 1; align-items: center; }
.auth-footer { display: flex; flex-shrink: 0; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; padding: 8px clamp(20px, 4vw, 64px); border-top: 1px solid #e2ecef; background: #f5f9fa; color: #5b737d; font-size: .6875rem; line-height: 1.6; }
.auth-footer p { margin: 0; }
.auth-footer a { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; color: #087892; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.auth-footer a:focus-visible { outline: 3px solid #0d93b4; outline-offset: 3px; border-radius: 2px; }

.auth-page {
    --auth-ink: #103845;
    --auth-muted: #5b737d;
    --auth-action: #087892;
    --auth-line: #dce8eb;
    --auth-min-height: clamp(520px, calc(100svh - var(--navbar-height, 88px) - 72px), 620px);
    padding: 16px clamp(20px, 4vw, 64px);
    background: radial-gradient(ellipse at 8% 0, #e3f7fb, transparent 48%), #f5f9fa;
    color: var(--auth-ink);
}
.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr);
    width: min(1240px, 100%);
    min-height: var(--auth-min-height);
    margin-inline: auto;
    overflow: hidden;
    border: 1px solid var(--auth-line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 64px rgb(16 56 69 / 7%);
}
.auth-story {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    overflow: hidden;
    padding: 28px clamp(24px, 3vw, 40px);
    background: radial-gradient(ellipse at 90% 55%, rgb(13 147 180 / 30%), transparent 65%),
        linear-gradient(150deg, var(--auth-story-start, #103845), var(--auth-story-end, #0b566a));
    color: #ffffff;
}
.auth-story::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: -200px;
    right: -230px;
    width: 540px;
    aspect-ratio: 1;
    border: 1px solid rgb(156 236 251 / 12%);
    border-radius: 50%;
    box-shadow: 0 0 0 58px rgb(156 236 251 / 4%);
    pointer-events: none;
}
.auth-story-visual { position: relative; display: grid; align-items: center; min-height: 160px; margin: 12px -16px; }
.auth-story-visual::after { content: ''; position: absolute; right: 10%; bottom: 8%; left: 10%; height: 20px; border-radius: 50%; background: rgb(0 0 0 / 22%); filter: blur(14px); pointer-events: none; }
.auth-story-visual img { position: relative; z-index: 1; display: block; width: 100%; max-height: 200px; object-fit: contain; filter: drop-shadow(0 18px 16px rgb(0 0 0 / 18%)); }
.auth-story-orbit { position: absolute; inset: 15% -8%; border: 1px solid rgb(156 236 251 / 18%); border-radius: 50%; transform: rotate(-18deg); }
.auth-story-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid rgb(207 250 254 / 17%); color: #c5dce4; font-size: .6875rem; line-height: 1.5; }
.auth-story-mark { color: #ffffff; font-size: .875rem; font-weight: 700; letter-spacing: -.035em; white-space: nowrap; }
.auth-story-mark > span { color: #9cecfb; }
.auth-form-panel { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 20px clamp(24px, 3vw, 48px); }
.auth-form-content { width: 100%; max-width: 420px; }
.auth-back { display: inline-flex; align-items: center; gap: 8px; min-height: 24px; margin-bottom: 10px; color: var(--auth-muted); font-size: .75rem; text-decoration: none; transition: color .2s ease; }
.auth-back svg { width: 17px; height: 17px; }
.auth-back:hover { color: var(--auth-action); }
.auth-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; margin-bottom: 14px; border: 1px solid #e4edef; border-radius: 11px; background: #f2f7f8; }
.auth-switch a { display: grid; place-items: center; min-height: 36px; padding: 6px 12px; border: 1px solid transparent; border-radius: 7px; color: var(--auth-muted); font-size: .8125rem; font-weight: 500; text-decoration: none; transition: color .2s ease, background .2s ease; }
.auth-switch a[aria-current="page"] { border-color: #d3e8ed; background: #ffffff; color: var(--auth-action); box-shadow: 0 2px 6px rgb(16 56 69 / 4%); }
.auth-switch a:hover { color: var(--auth-action); }
.auth-eyebrow { display: block; margin-bottom: 6px; color: var(--auth-action); font-size: .6875rem; font-weight: 600; letter-spacing: .11em; line-height: 1.4; text-transform: uppercase; }
.auth-heading { min-height: 108px; }
.auth-heading h1 { margin: 0; color: var(--auth-ink); font-size: clamp(24px, 2.2vw, 30px); font-weight: 600; letter-spacing: -.045em; line-height: 1.2; }
.auth-heading > p { margin: 6px 0 0; color: var(--auth-muted); font-size: .8125rem; line-height: 1.6; }
.auth-form { display: flex; flex-direction: column; gap: 10px; min-height: 324px; margin-top: 14px; }
.auth-field { min-width: 0; }
.auth-field label { display: block; margin-bottom: 5px; color: var(--auth-ink); font-size: .75rem; font-weight: 500; line-height: 1.5; }
.auth-input-wrap { position: relative; }
.auth-field-icon { position: absolute; top: 50%; left: 15px; width: 19px; height: 19px; color: #76939e; transform: translateY(-50%); pointer-events: none; }
.auth-field input { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 9px 16px 9px 45px; border: 1px solid #ccdde3; border-radius: 9px; background: #ffffff; color: var(--auth-ink); font-family: inherit; font-size: .875rem; line-height: 1.5; transition: border-color .2s ease, box-shadow .2s ease; }
.auth-field input::placeholder { color: #78909a; opacity: 1; }
.auth-field input:focus { outline: none; border-color: #0d93b4; box-shadow: 0 0 0 3px rgb(13 147 180 / 12%); }
.auth-password-wrap input { padding-right: 48px; }
.auth-password-toggle { position: absolute; top: 50%; right: 5px; display: grid; place-items: center; width: 42px; height: 42px; padding: 10px; border: 0; border-radius: 6px; background: transparent; color: #67838e; transform: translateY(-50%); cursor: pointer; }
.auth-password-toggle:hover { background: #eef7f9; color: var(--auth-action); }
.auth-password-toggle svg { width: 21px; height: 21px; }
.auth-eye-slash { display: none; }
.auth-password-toggle[aria-pressed="true"] .auth-eye-slash { display: block; }
.auth-field-hint { margin: 6px 0 0; color: var(--auth-muted); font-size: .6875rem; line-height: 1.5; }
.auth-phone-prefix { position: absolute; top: 50%; left: 12px; display: inline-flex; align-items: center; gap: 7px; padding-right: 11px; border-right: 1px solid #dce8eb; color: #244c5b; font-size: .75rem; line-height: 1.5; transform: translateY(-50%); pointer-events: none; }
.auth-phone-country { padding: 2px 4px; border-radius: 3px; background: #eef7f9; color: #087892; font-size: .625rem; font-weight: 600; }
.auth-phone-wrap input { padding-left: 94px; font-variant-numeric: tabular-nums; }
.auth-phone-wrap input[aria-invalid="true"] { border-color: #bd4b3a; }
.auth-phone-wrap input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgb(189 75 58 / 12%); }
.auth-phone-feedback.is-error { color: #ad3d2e; }
.auth-submit { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 46px; margin-top: auto; padding: 10px 19px; border: 1px solid transparent; border-radius: 9px; background: linear-gradient(115deg, #0d93b4, #087892); color: #ffffff; font-family: inherit; font-size: .875rem; font-weight: 600; line-height: 1.5; text-align: left; cursor: pointer; transition: box-shadow .2s ease, background .2s ease; }
.auth-submit svg { flex-shrink: 0; width: 21px; height: 21px; }
.auth-submit:hover { background: #087892; box-shadow: 0 6px 18px rgb(13 147 180 / 17%); }
.auth-field input.auth-confirmation { padding-left: 14px; }
.auth-alternative { margin: 12px 0 0; color: var(--auth-muted); font-size: .75rem; line-height: 1.7; text-align: center; }
.auth-alternative a { color: var(--auth-action); font-weight: 600; text-underline-offset: 4px; }
.auth-form-bottom { display: none; }
.auth-form-bottom > span { flex: 1; height: 1px; background: #e2ecef; }
.auth-form-bottom p { margin: 0; color: #718a94; font-size: .6875rem; line-height: 1.6; }
.auth-page :is(a, button):focus-visible { outline: 3px solid #0d93b4; outline-offset: 4px; }
.auth-page [hidden] { display: none !important; }

@media (max-width: 1050px) {
    .auth-story { padding: 26px; }
    .auth-form-panel { padding-inline: 28px; }
}
@media (max-width: 800px) {
    .auth-page { padding: 12px 20px; }
    .auth-shell { grid-template-columns: minmax(0, 1fr); max-width: 560px; min-height: 0; border-radius: 18px; }
    .auth-story, .auth-back { display: none; }
    .auth-form-panel { padding: 18px 26px; }
    .auth-heading { min-height: 86px; }
    .auth-heading > p { display: none; }
}
@media (max-width: 480px) {
    .auth-footer { justify-content: center; gap: 2px 14px; padding-inline: 16px; text-align: center; }
    .auth-page { padding: 12px 16px; }
    .auth-form-panel { padding: 16px 20px; }
    .auth-switch { margin-bottom: 12px; }
    .auth-heading h1 { font-size: 26px; }
    .auth-field input { font-size: 16px; }
}
@media (min-width: 801px) and (max-height: 760px) {
    .auth-page { --auth-min-height: clamp(480px, calc(100svh - var(--navbar-height, 88px) - 64px), 600px); padding-block: 10px; }
    .auth-back { display: none; }
    .auth-form-panel { padding-block: 16px; }
}
@media (min-width: 801px) and (max-height: 700px) {
    .auth-page { padding-block: 8px; }
    .auth-heading { min-height: 64px; }
    .auth-heading > p { display: none; }
    .auth-form { min-height: 300px; margin-top: 12px; }
    #auth-password-hint { display: none; }
    .auth-form-panel { padding-block: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-page *, .auth-page *::before, .auth-page *::after { transition: none !important; }
}
