* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Clair : violet / indigo */
    --auth-bg: #f8f7fc;
    --auth-bg-accent: radial-gradient(
        ellipse 120% 80% at 72% 18%,
        rgba(99, 102, 241, 0.11),
        transparent 58%
    );
    --auth-form-panel: #ffffff;
    --auth-card: #ffffff;
    --auth-border: rgba(99, 102, 241, 0.12);
    --auth-text: #1e1b4b;
    --auth-muted: #64748b;
    --auth-placeholder: #94a3b8;
    --auth-input-bg: #ffffff;
    --auth-input-border: #e2e8f0;
    --auth-focus-ring: rgba(99, 102, 241, 0.22);
    --auth-accent-from: #6366f1;
    --auth-accent-to: #4f46e5;
    --auth-link: #4f46e5;
    --auth-link-hover: #4338ca;
    --auth-error: #dc2626;
    --auth-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 10px 36px rgba(99, 102, 241, 0.07);
    --auth-bg-grid: rgba(99, 102, 241, 0.07);
    --auth-bg-blob-1: rgba(99, 102, 241, 0.38);
    --auth-bg-blob-2: rgba(139, 92, 246, 0.28);
    --auth-bg-blob-3: rgba(14, 165, 233, 0.2);
    --auth-preview-surface: rgba(255, 255, 255, 0.82);
    --auth-preview-border: rgba(99, 102, 241, 0.2);
    --auth-preview-title: #1e1b4b;
    --auth-preview-desc: #64748b;
    --auth-preview-mock: rgba(99, 102, 241, 0.1);
    --auth-preview-mock-line: rgba(30, 27, 75, 0.1);
    --auth-preview-icon-bg: rgba(99, 102, 241, 0.12);
    /* Lueurs (clair = violet) — réutilisées dans les mocks & boutons */
    --auth-primary-glow-sm: rgba(99, 102, 241, 0.1);
    --auth-primary-glow-md: rgba(99, 102, 241, 0.25);
    --auth-primary-glow-lg: rgba(99, 102, 241, 0.35);
    --auth-primary-glow-xl: rgba(99, 102, 241, 0.42);
    --auth-primary-glow-mm: rgba(99, 102, 241, 0.38);
    --auth-primary-glow-border: rgba(99, 102, 241, 0.28);
    --auth-primary-glow-ring: rgba(99, 102, 241, 0.08);
    --auth-folder-from: rgba(99, 102, 241, 0.38);
    --auth-folder-to: rgba(99, 102, 241, 0.14);
    --auth-spoke-fade: rgba(99, 102, 241, 0.16);
    --auth-panel-side: rgba(99, 102, 241, 0.07);
    --auth-form-accent: rgba(99, 102, 241, 0.22);
}

body.auth-page.dark {
    color-scheme: dark;
    /* Sombre : bleu */
    --auth-form-panel: #0f172a;
    --auth-bg: #0b1220;
    --auth-bg-accent: radial-gradient(
        ellipse 100% 70% at 50% -10%,
        rgba(59, 130, 246, 0.15),
        transparent 50%
    );
    --auth-card: #111827;
    --auth-border: #1f2937;
    --auth-text: #e5e7eb;
    --auth-muted: #94a3b8;
    --auth-placeholder: #6b7280;
    --auth-input-bg: #020617;
    --auth-input-border: #1f2937;
    --auth-focus-ring: rgba(59, 130, 246, 0.2);
    --auth-accent-from: #3b82f6;
    --auth-accent-to: #2563eb;
    --auth-link: #93c5fd;
    --auth-link-hover: #bfdbfe;
    --auth-error: #f87171;
    --auth-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 12px 40px rgba(0, 0, 0, 0.35);
    --auth-bg-grid: rgba(59, 130, 246, 0.07);
    --auth-bg-blob-1: rgba(59, 130, 246, 0.45);
    --auth-bg-blob-2: rgba(96, 165, 250, 0.32);
    --auth-bg-blob-3: rgba(34, 211, 238, 0.2);
    --auth-preview-surface: rgba(17, 24, 39, 0.55);
    --auth-preview-border: rgba(59, 130, 246, 0.22);
    --auth-preview-title: #f1f5f9;
    --auth-preview-desc: #94a3b8;
    --auth-preview-mock: rgba(59, 130, 246, 0.15);
    --auth-preview-mock-line: rgba(226, 232, 240, 0.12);
    --auth-preview-icon-bg: rgba(59, 130, 246, 0.18);
    --auth-primary-glow-sm: rgba(59, 130, 246, 0.12);
    --auth-primary-glow-md: rgba(59, 130, 246, 0.25);
    --auth-primary-glow-lg: rgba(59, 130, 246, 0.35);
    --auth-primary-glow-xl: rgba(59, 130, 246, 0.42);
    --auth-primary-glow-mm: rgba(59, 130, 246, 0.38);
    --auth-primary-glow-border: rgba(59, 130, 246, 0.28);
    --auth-primary-glow-ring: rgba(59, 130, 246, 0.1);
    --auth-folder-from: rgba(59, 130, 246, 0.4);
    --auth-folder-to: rgba(59, 130, 246, 0.15);
    --auth-spoke-fade: rgba(59, 130, 246, 0.18);
    --auth-panel-side: rgba(0, 0, 0, 0.32);
    --auth-form-accent: rgba(59, 130, 246, 0.38);
}

body.auth-page {
    min-height: 100vh;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--auth-text);
    background-color: var(--auth-bg);
    background-image: var(--auth-bg-accent);
    margin: 0;
    padding: 0;
    position: relative;
    overflow-x: hidden;
    color-scheme: light;
}

/* Split : formulaire à gauche, visuel défilant à droite */
.auth-split {
    display: grid;
    grid-template-columns: minmax(300px, min(44vw, 440px)) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    align-items: stretch;
}

.auth-split__form {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    background: var(--auth-form-panel);
    border-right: 1px solid var(--auth-border);
    box-shadow: inset 3px 0 0 var(--auth-form-accent), 6px 0 40px var(--auth-panel-side);
}

.auth-form-inner {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    padding-top: 2.5rem;
}

.auth-split__visual {
    position: relative;
    z-index: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background: linear-gradient(
        155deg,
        #f8f7fc 0%,
        #f3f2fb 36%,
        #eef2ff 72%,
        #e8ecff 100%
    );
    clip-path: polygon(28px 0, 100% 0, 100% 100%, 0 100%);
}

body.auth-page.dark .auth-split__visual {
    background: linear-gradient(165deg, #0f172a 0%, #0b1220 50%, #111c33 100%);
}

/* Slogan au-dessus des cartes défilantes (login / register) */
.auth-hero {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    max-width: 38rem;
    margin: 0 auto;
    padding: clamp(1.75rem, 5vh, 3rem) clamp(1rem, 4vw, 2rem) 0;
    text-align: center;
    pointer-events: none;
}

.auth-hero__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto clamp(0.85rem, 2vh, 1.15rem);
    padding: 0.42rem 0.95rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #4338ca;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.22);
    border-radius: 999px;
}

body.auth-page.dark .auth-hero__badge {
    color: #c7d2fe;
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(96, 165, 250, 0.28);
}

.auth-hero__title {
    margin: 0;
    font-size: clamp(1.45rem, 2.4vw + 0.85rem, 2.4rem);
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -0.038em;
    color: #1a1f36;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.65),
        0 2px 28px rgba(99, 102, 241, 0.12);
}

body.auth-page.dark .auth-hero__title {
    color: #f8fafc;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.auth-hero__line {
    display: block;
}

.auth-hero__accent {
    background-image: linear-gradient(100deg, #38bdf8 0%, #6366f1 42%, #a855f7 96%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.auth-page.dark .auth-hero__accent {
    background-image: linear-gradient(100deg, #7dd3fc 0%, #818cf8 45%, #d946ef 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@media (max-width: 960px) {
    .auth-split {
        grid-template-columns: 1fr;
    }

    .auth-split__form {
        border-right: none;
        min-height: auto;
        padding-bottom: clamp(1rem, 3vw, 1.5rem);
        box-shadow: none;
    }

    .auth-form-inner {
        padding-top: 3rem;
        padding-bottom: 0;
    }

    .auth-split__visual {
        min-height: min(320px, 42vh);
        clip-path: none;
        border-top: 1px solid var(--auth-border);
    }

    .auth-hero {
        padding-top: 1.35rem;
        max-width: 100%;
    }

    .auth-hero__badge {
        font-size: 0.6rem;
        padding: 0.35rem 0.75rem;
        margin-bottom: 0.65rem;
    }

    .auth-hero__title {
        font-size: clamp(1.1rem, 3.8vw + 0.35rem, 1.45rem);
    }

    .auth-preview {
        padding: clamp(96px, 26vw, 120px) 0 24px;
    }
}

/* Arrière-plan animé (panneau droit uniquement) */
.auth-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.auth-bg__grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
        circle,
        var(--auth-bg-grid) 1px,
        transparent 1px
    );
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, black 20%, transparent 75%);
    opacity: 0.85;
}

.auth-bg__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    opacity: 0.85;
    will-change: transform;
}

.auth-bg__blob--1 {
    width: min(55vw, 480px);
    height: min(55vw, 480px);
    top: -12%;
    left: -8%;
    background: var(--auth-bg-blob-1);
    animation: auth-blob-a 22s ease-in-out infinite;
}

.auth-bg__blob--2 {
    width: min(45vw, 400px);
    height: min(45vw, 400px);
    bottom: -5%;
    right: -10%;
    background: var(--auth-bg-blob-2);
    animation: auth-blob-b 26s ease-in-out infinite;
}

.auth-bg__blob--3 {
    width: min(38vw, 320px);
    height: min(38vw, 320px);
    top: 38%;
    left: 50%;
    background: var(--auth-bg-blob-3);
    animation: auth-blob-c 20s ease-in-out infinite;
}

@keyframes auth-blob-a {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    40% {
        transform: translate(8%, 12%) scale(1.08);
    }
    70% {
        transform: translate(3%, -6%) scale(0.94);
    }
}

@keyframes auth-blob-b {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    45% {
        transform: translate(-10%, -8%) scale(1.06);
    }
    75% {
        transform: translate(-4%, 6%) scale(0.97);
    }
}

@keyframes auth-blob-c {
    0%,
    100% {
        transform: translate(-50%, 0) scale(1);
    }
    50% {
        transform: translate(-50%, -5%) scale(1.12);
    }
}

/* Aperçu défilant des fonctionnalités (bandeaux infinis) */
.auth-preview {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(14px, 3vh, 28px);
    padding: clamp(150px, 22vh, 220px) 0 48px 12px;
    -webkit-mask-image: linear-gradient(
        90deg,
        hsla(0, 0%, 0%, 0) 0%,
        hsla(0, 0%, 0%, 0.88) 12%,
        #000 24%
    );
    mask-image: linear-gradient(
        90deg,
        hsla(0, 0%, 0%, 0) 0%,
        hsla(0, 0%, 0%, 0.88) 12%,
        #000 24%
    );
}

.auth-preview__row {
    overflow: hidden;
    width: 100%;
}

.auth-preview__track {
    display: flex;
    width: max-content;
    gap: 14px;
    will-change: transform;
    animation: auth-marquee 70s linear infinite;
}

.auth-preview__track.auth-preview__track--reverse {
    animation: auth-marquee-rev 88s linear infinite;
    animation-delay: -22s;
}

@keyframes auth-marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@keyframes auth-marquee-rev {
    from {
        transform: translateX(-50%);
    }
    to {
        transform: translateX(0);
    }
}

.auth-preview-card {
    flex: 0 0 auto;
    width: 228px;
    padding: 12px 12px 10px;
    border-radius: 14px;
    border: 1px solid var(--auth-preview-border);
    background: var(--auth-preview-surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 14px 44px var(--auth-primary-glow-sm);
}

body.auth-page.dark .auth-preview-card {
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        0 12px 36px rgba(0, 0, 0, 0.35);
}

.auth-preview-card__head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.auth-preview-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--auth-preview-icon-bg);
    color: var(--auth-accent-from);
    flex-shrink: 0;
}

.auth-preview-card__icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.25;
}

.auth-preview-card__title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--auth-preview-title);
    line-height: 1.25;
}

.auth-preview-card__desc {
    font-size: 11px;
    color: var(--auth-preview-desc);
    margin-top: 2px;
    line-height: 1.3;
}

.auth-preview-card__mock {
    border-radius: 10px;
    background: var(--auth-preview-mock);
    padding: 8px;
    min-height: 52px;
}

/* Miniatures : tableau de bord */
.auth-mock-kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.auth-mock-kpi {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 4px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--auth-accent-from);
    background: rgba(255, 255, 255, 0.55);
}

body.auth-page.dark .auth-mock-kpi {
    background: rgba(15, 23, 42, 0.6);
}

.auth-mock-kpi--soft {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.85;
}

/* Mes tâches */
.auth-mock-task-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.auth-mock-task-row:last-child {
    margin-bottom: 0;
}

.auth-mock-cb {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    border: 1.5px solid var(--auth-accent-from);
    flex-shrink: 0;
    opacity: 0.7;
}

.auth-mock-cb--done {
    background: linear-gradient(
        135deg,
        var(--auth-accent-from),
        var(--auth-accent-to)
    );
    border-color: transparent;
    opacity: 1;
    box-shadow: 0 1px 4px var(--auth-primary-glow-lg);
}

.auth-mock-line {
    flex: 1;
    height: 5px;
    border-radius: 3px;
    background: var(--auth-preview-mock-line);
}

.auth-mock-line--short {
    max-width: 65%;
}

/* Notes */
.auth-preview-card__mock--notes {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 52px;
}

.auth-mock-note {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

body.auth-page.dark .auth-mock-note {
    background: rgba(15, 23, 42, 0.5);
}

.auth-mock-note--active {
    box-shadow: 0 0 0 1px var(--auth-primary-glow-border);
}

.auth-mock-note__bar {
    width: 3px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--auth-accent-from), var(--auth-accent-to));
    border-radius: 2px 0 0 2px;
}

.auth-mock-note__lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 5px 7px 5px 5px;
    justify-content: center;
    min-width: 0;
}

.auth-mock-note__lines span {
    display: block;
    height: 4px;
    border-radius: 2px;
    background: var(--auth-preview-mock-line);
}

.auth-mock-note__lines span:first-child {
    width: 100%;
}

.auth-mock-note__lines span:last-child:not(:only-child) {
    width: 68%;
}

/* Projets */
.auth-preview-card__mock--projects {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
}

.auth-mock-folder {
    width: 32px;
    height: 26px;
    border-radius: 6px 6px 4px 4px;
    background: linear-gradient(180deg, var(--auth-folder-from), var(--auth-folder-to));
    border: 1px solid var(--auth-preview-border);
    flex-shrink: 0;
}

.auth-mock-proj-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.auth-mock-proj-bars span {
    display: block;
    height: 5px;
    border-radius: 3px;
    background: var(--auth-preview-mock-line);
}

.auth-mock-proj-bars span:nth-child(1) {
    width: 100%;
}
.auth-mock-proj-bars span:nth-child(2) {
    width: 72%;
}
.auth-mock-proj-bars span:nth-child(3) {
    width: 88%;
}

/* Calendrier */
.auth-mock-cal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.auth-mock-cal-d {
    aspect-ratio: 1;
    border-radius: 5px;
    background: var(--auth-preview-mock-line);
    opacity: 0.55;
}

.auth-mock-cal-d--dot {
    position: relative;
    opacity: 1;
    background: rgba(255, 255, 255, 0.35);
}

.auth-mock-cal-d--dot::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--auth-accent-from);
    box-shadow: 0 0 0 2px var(--auth-primary-glow-md);
}

body.auth-page.dark .auth-mock-cal-d--dot {
    background: rgba(15, 23, 42, 0.5);
}

/* Carte mentale (aperçu login) */
.auth-preview-card__mock--mindmap {
    min-height: 52px;
}

.auth-mock-mm {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 2px 0;
}

.auth-mock-mm-root {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: linear-gradient(
        135deg,
        var(--auth-accent-from),
        var(--auth-accent-to)
    );
    box-shadow: 0 4px 14px var(--auth-primary-glow-mm);
}

.auth-mock-mm-spoke {
    width: 2px;
    height: 8px;
    border-radius: 2px;
    background: linear-gradient(
        180deg,
        var(--auth-accent-from),
        var(--auth-spoke-fade)
    );
}

.auth-mock-mm-leaves {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.auth-mock-mm-leaves span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--auth-preview-mock-line);
    border: 1px solid var(--auth-primary-glow-border);
    box-shadow: 0 0 0 2px var(--auth-primary-glow-ring);
}

/* Équipe */
.auth-preview-card__mock--team {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 52px;
}

.auth-mock-av {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(
        145deg,
        var(--auth-accent-from),
        var(--auth-accent-to)
    );
    opacity: 0.85;
    box-shadow: 0 2px 6px var(--auth-primary-glow-lg);
}

/* Ajout rapide */
.auth-preview-card__mock--quick {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 52px;
}

.auth-mock-inp {
    flex: 1;
    height: 10px;
    border-radius: 5px;
    background: var(--auth-preview-mock-line);
    animation: auth-mock-shimmer 2.8s ease-in-out infinite;
}

.auth-mock-go {
    width: 22px;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(
        90deg,
        var(--auth-accent-from),
        var(--auth-accent-to)
    );
    flex-shrink: 0;
    opacity: 0.9;
}

@keyframes auth-mock-shimmer {
    0%,
    100% {
        opacity: 0.55;
    }
    50% {
        opacity: 1;
    }
}

@media (max-width: 900px) {
    .auth-preview-card {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .auth-preview {
        opacity: 0.92;
        gap: 10px;
    }

    .auth-preview-card {
        width: 176px;
        padding: 10px 8px 8px;
    }

    .auth-preview-card__title {
        font-size: 12px;
    }

    .auth-preview-card__desc {
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-bg__blob {
        animation: none !important;
    }

    .auth-preview__track,
    .auth-preview__track--reverse {
        animation: none !important;
        transform: translateX(-8%);
    }

    .auth-mock-inp {
        animation: none !important;
        opacity: 0.75;
    }
}

.auth-theme-toggle {
    position: absolute;
    top: clamp(0.85rem, 2.5vw, 1.25rem);
    right: clamp(0.85rem, 2.5vw, 1.25rem);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--auth-border);
    background: var(--auth-card);
    color: var(--auth-text);
    cursor: pointer;
    box-shadow: var(--auth-shadow);
    transition: transform 0.15s ease, border-color 0.2s ease;
    z-index: 5;
}

.auth-theme-toggle:hover {
    transform: translateY(-1px);
}

.auth-theme-toggle:focus-visible {
    outline: 2px solid var(--auth-accent-from);
    outline-offset: 2px;
}

.auth-theme-toggle svg {
    width: 20px;
    height: 20px;
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 0 8px;
    box-shadow: none;
}

body.auth-page.dark .auth-container {
    background: transparent;
    box-shadow: none;
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.auth-brand .logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--auth-accent-from), var(--auth-accent-to));
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 8px 22px var(--auth-primary-glow-lg);
}

.auth-brand .logo-text {
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.auth-container h1 {
    font-size: clamp(1.35rem, 2.8vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    text-align: left;
    margin-bottom: 28px;
    color: var(--auth-text);
    line-height: 1.25;
}

.auth-container form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--auth-muted);
    margin-bottom: 6px;
}

.auth-container input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--auth-input-border);
    background: var(--auth-input-bg);
    color: var(--auth-text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-container input::placeholder {
    color: var(--auth-placeholder);
    opacity: 1;
}

/* Autofill navigateur : garder fond clair + texte lisible en mode connexion clair */
.auth-container input:-webkit-autofill,
.auth-container input:-webkit-autofill:hover,
.auth-container input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--auth-text);
    box-shadow: 0 0 0 1000px var(--auth-input-bg) inset;
    transition: background-color 99999s ease-out;
}

body.auth-page.dark .auth-container input:-webkit-autofill,
body.auth-page.dark .auth-container input:-webkit-autofill:hover,
body.auth-page.dark .auth-container input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--auth-text);
    box-shadow: 0 0 0 1000px var(--auth-input-bg) inset;
}

.auth-container input:focus {
    border-color: var(--auth-accent-from);
    box-shadow: 0 0 0 3px var(--auth-focus-ring);
}

.auth-container button[type="submit"] {
    width: 100%;
    padding: 13px 16px;
    margin-top: 8px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(
        135deg,
        var(--auth-accent-from),
        var(--auth-accent-to)
    );
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 20px var(--auth-primary-glow-lg);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-container button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px var(--auth-primary-glow-xl);
}

.auth-container button[type="submit"]:active {
    transform: translateY(0);
}

.auth-container button[type="submit"]:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 6px 20px var(--auth-primary-glow-lg), 0 0 0 1px rgba(255, 255, 255, 0.35);
}

body.auth-page.dark .auth-container button[type="submit"]:focus-visible {
    outline-color: #93c5fd;
}

.error {
    margin-top: 14px;
    color: var(--auth-error);
    font-size: 14px;
    min-height: 20px;
    text-align: left;
}

.link {
    margin-top: 22px;
    font-size: 14px;
    color: var(--auth-muted);
    text-align: left;
    line-height: 1.5;
}

.link a {
    color: var(--auth-link);
    text-decoration: none;
    font-weight: 600;
}

.link a:hover {
    color: var(--auth-link-hover);
    text-decoration: underline;
}

.link a:focus-visible {
    outline: 2px solid var(--auth-accent-from);
    outline-offset: 3px;
    border-radius: 4px;
}

@media (max-width: 480px) {
    .auth-container {
        padding: 28px 22px 26px;
    }

    .auth-container h1 {
        font-size: 20px;
    }
}
