@import url('all.css');

:root {
    --auth-ink: #19191d;
    --auth-muted: #77747a;
    --auth-line: #ebe9ee;
    --auth-pink: #ef4ba6;
    --auth-lilac: #e5dcf2;
    --auth-blue: #4b55d8;
    --auth-yellow: #f7d84d;
    --auth-orange: #f28a43;
}

* {
    box-sizing: border-box;
}

body.auth-body {
    min-width: 320px;
    height: 100vh;
    overflow: hidden;
    background: #e9e2f0;
    color: var(--auth-ink);
}

.auth-shell {
    width: 100%;
    height: 100vh;
    min-height: 0;
    /* padding: clamp(18px, 4vw, 64px); */
    display: grid;
    place-items: center;
    overflow: hidden;
    background: radial-gradient(circle at 8% 14%, rgba(255,255,255,.72), transparent 30%), radial-gradient(circle at 92% 84%, rgba(237,194,236,.55), transparent 34%), #e9e2f0;
}

.auth-frame {
    width: min(1240px, 100%);
    height: 100% !important;
    min-height: 0;
    padding: 20px clamp(20px, 5vw, 64px) 0;
    display: flex;
    flex-direction: column;
    /* border-radius: 38px; */
    background: rgba(255,255,255,.96);
    box-shadow: 0 28px 90px rgba(57,43,75,.14);
    overflow: hidden;
}

.auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.auth-logo-dark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--auth-ink);
    text-decoration: none;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
}

.auth-logo-dark img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.auth-header-link {
    color: var(--auth-muted);
    text-decoration: none;
    font-size: 13px;
}

.auth-header-link:hover {
    color: var(--auth-ink);
}

.auth-stepper {
    --auth-progress: 0%;
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    gap: 50px;
    padding: 19px 32px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 13px 30px rgba(30, 26, 40, .09);
    max-width: max-content;
    margin: 0 auto;
}

.auth-stepper:before, .auth-stepper:after {
    content: '';
    position: absolute;
    left: 58px;
    right: 58px;
    top: 50%;
    height: 3px;
    transform: translateY(-50%);
    border-radius: 99px;
    background: #eeedf0;
    z-index: 0;
}

.auth-stepper:after {
    right: auto;
    width: calc((100% - 116px) * var(--auth-progress));
    background: var(--auth-pink);
    transition: width .35s ease;
}

.auth-step {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.auth-step-bullet {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border: 1px solid #b8b6bc;
    border-radius: 10px;
    background: #fff;
    color: #807e83;
    font-size: 13px;
    font-weight: 700;
    transition: .3s ease;
}

.auth-step.is-active .auth-step-bullet, .auth-step.is-complete .auth-step-bullet {
    border-color: var(--auth-ink);
    background: var(--auth-ink);
    color: #fff;
}

.auth-step.is-complete .auth-step-bullet {
    font-size: 0;
}

.auth-step.is-complete .auth-step-bullet:after {
    content: "\2713";
    font-size: 17px;
}

.auth-step-copy {
    min-width: 0;
}

.auth-step-copy strong, .auth-step-copy small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-step-copy strong {
    font-size: 14px;
}

.auth-step-copy small {
    margin-top: 3px;
    color: #a19fa4;
    font-size: 11px;
}

.auth-step.is-active .auth-step-copy small, .auth-step.is-complete .auth-step-copy small {
    color: var(--auth-muted);
}

.auth-stepper-2 {
    grid-template-columns: repeat(2, 1fr);
}

.auth-stepper-3 {
    grid-template-columns: repeat(3, 1fr);
}

.auth-content {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(280px, .87fr) minmax(360px, 1.13fr);
    align-items: center;
    gap: clamp(40px, 7vw, 110px);
    padding: 20px 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

.auth-copy {
    max-width: 440px;
}

.auth-counter {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 25px;
    color: var(--auth-muted);
    font-size: 13px;
}

.auth-counter button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--auth-ink);
    cursor: pointer;
    font: inherit;
}

.auth-counter button[hidden] {
    display: none;
}

.auth-copy h1 {
    margin: 0 0 9px;
    color: var(--auth-ink);
    font-family: Po01, Georgia, serif;
    font-size: clamp(34px, 4vw, 51px);
    font-weight: 400;
    line-height: .98;
    letter-spacing: -.025em;
}

.auth-copy h1 em {
    color: var(--auth-pink);
    font-style: normal;
}

.auth-copy > p {
    max-width: 380px;
    margin: 0 0 29px;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.7;
}

.auth-form-stack {
    display: grid;
    gap: 16px;
    max-width: 370px;
}

.auth-form-stack .admin-field span {
    color: #353238;
    font-size: 12px;
    font-weight: 600;
}

.auth-form-stack .admin-field input, .auth-form-stack .admin-field select {
    min-height: 48px;
    border-radius: 12px;
    border-color: #dedce2;
    background: #fff;
}

.auth-form-stack .admin-button {
    width: 100%;
    justify-content: center;
    min-height: 50px;
    border-radius: 12px;
}

.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.auth-link {
    color: var(--auth-blue);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-form-error {
    min-height: 0;
    color: #c43f56;
    font-size: 12px;
    line-height: 1.45;
}

.auth-form-note {
    margin: -3px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8f4fb;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.55;
}

.auth-form-stack .admin-totp-box {
    background: #faf7fc;
}

.auth-visual {
    position: relative;
    min-height: 450px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 32px;
    background: linear-gradient(145deg, #f4eff9, #fff8ef);
}

.auth-visual:before {
    content: '';
    position: absolute;
    width: 72%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.92) 0 37%, transparent 38%), linear-gradient(135deg, rgba(240,75,166,.16), rgba(75,85,216,.13));
}

.auth-visual:after {
    content: '';
    position: absolute;
    width: 56%;
    height: 22%;
    bottom: 12%;
    border-radius: 50%;
    background: rgba(39,29,43,.12);
    filter: blur(25px);
}

.auth-visual-art {
    position: relative;
    z-index: 2;
    width: min(260px, 54%);
    max-height: 285px;
    object-fit: contain;
    filter: drop-shadow(0 18px 17px rgba(43,29,55,.14));
}

.auth-visual-orb {
    position: absolute;
    z-index: 1;
    width: 125px;
    height: 125px;
    top: 12%;
    right: 15%;
    border-radius: 44% 56% 62% 38%;
    background: var(--auth-yellow);
    transform: rotate(15deg);
    opacity: .86;
}

.auth-visual-tag {
    position: absolute;
    z-index: 3;
    left: 8%;
    bottom: 8%;
    padding: 11px 14px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 14px;
    background: rgba(255,255,255,.72);
    color: var(--auth-muted);
    font-size: 11px;
    box-shadow: 0 10px 25px rgba(54,44,64,.08);
}

.auth-visual-tag strong {
    display: block;
    margin-top: 2px;
    color: var(--auth-ink);
    font-family: Po01, Georgia, serif;
    font-size: 19px;
    font-weight: 400;
}

.auth-visual[data-visual="verify"] {
    background: linear-gradient(145deg, #eef0ff, #fff7df);
}

.auth-visual[data-visual="password"] {
    background: linear-gradient(145deg, #fff2e7, #fde7f2);
}

.auth-visual[data-visual="security"] {
    background: linear-gradient(145deg, #e9ecff, #f6eafd);
}

.auth-visual[data-visual="login"] {
    background: linear-gradient(145deg, #f3eafa, #fff0e5);
}

.auth-visual[data-visual="forgot"] {
    background: linear-gradient(145deg, #fff3e7, #e9efff);
}

.auth-inline-notice {
    padding: 10px 13px;
    border-radius: 11px;
    background: #fff6d8;
    color: #75602d;
    font-size: 12px;
    line-height: 1.5;
}

.auth-form-stack [hidden], .auth-step-form[hidden] {
    display: none !important;
}

.auth-footer {
    margin-top: 8px;
    text-align: center;
    color: var(--auth-muted);
    font-size: 12px;
}

.auth-footer a {
    color: var(--auth-blue);
    font-weight: 700;
    text-decoration: none;
}

.auth-form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.auth-form-stack .admin-check-option {
    color: var(--auth-muted);
    font-size: 12px;
}

.auth-form-stack .admin-check-option input {
    accent-color: var(--auth-pink);
}

@media (max-width: 880px) {
    .auth-frame {
        height: calc(100vh - clamp(36px, 8vw, 128px));
        border-radius: 26px;
    }

    .auth-content {
        grid-template-columns: 1fr;
        align-content: start;
        gap: 35px;
        padding-top: 48px;
    }

    .auth-copy {
        max-width: none;
    }

    .auth-form-stack {
        max-width: 100%;
    }

    .auth-visual {
        min-height: 300px;
        order: -1;
    }

    .auth-visual-art {
        width: 180px;
        max-height: 200px;
    }

    .auth-step-copy small {
        display: none;
    }
}

@media (max-width: 600px) {
    .auth-shell {
        padding: 0;
    }

    .auth-frame {
        height: 100vh;
        border-radius: 0;
        padding: 18px 17px 0;
    }

    .auth-header {
        margin-bottom: 22px;
    }

    .auth-logo-dark img {
        width: 35px;
        height: 35px;
    }

    .auth-header-link {
        font-size: 12px;
    }

    .auth-stepper {
        gap: 4px;
        padding: 12px 10px;
    }

    .auth-stepper:before, .auth-stepper:after {
        left: 29px;
        right: 29px;
    }

    .auth-step {
        justify-content: center;
    }

    .auth-step-copy {
        display: none;
    }

    .auth-step-bullet {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border-radius: 9px;
    }

    .auth-content {
        min-height: 0;
        padding: 35px 0 32px;
    }

    .auth-visual {
        min-height: 230px;
        border-radius: 22px;
    }

    .auth-visual-orb {
        width: 74px;
        height: 74px;
    }

    .auth-visual-tag {
        left: 5%;
        bottom: 6%;
    }

    .auth-copy h1 {
        font-size: 39px;
    }

    .auth-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-actions .auth-link {
        text-align: center;
    }

    .auth-form-columns {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Sous 880 px, l’illustration n’ajoute plus de hauteur inutile : le parcours
   d’identification reste centré sur le formulaire. */
@media (max-width: 879px) {
    body.auth-body { overflow-y: auto; }
    .auth-shell { min-height: 100vh; height: auto; display: block; }
    .auth-frame { min-height: 100vh; height: auto !important; overflow: visible; }
    .auth-visual { display: none; }
    .auth-content { grid-template-columns: 1fr; min-height: 0; padding: 38px 0 50px; }
    .auth-copy { width: min(100%, 620px); margin: 0 auto; }
    .auth-form-stack { width: 100%; }
}

.admin-text-button .admin-loader { display: none; border-color: currentColor; border-top-color: transparent; vertical-align: middle; }
.admin-text-button.is-loading .admin-loader { display: inline-block; }
.admin-text-button.is-loading .admin-button-label { display: none; }
.admin-button.is-loading .button-label { display: none; }
.auth-form-stack[hidden], .auth-step-form[hidden] { display: none !important; }
.auth-frame [hidden] { display: none !important; }
.auth-method-option { margin: -4px 0 4px; }
.auth-method-link { border: 0; padding: 0; background: transparent; text-align: left; cursor: pointer; }
