:root {
    --auth-bg: #080808;
    --auth-card: rgba(20, 20, 20, 0.88);
    --auth-card-strong: #151515;
    --auth-orange: #f97316;
    --auth-orange-soft: #fb923c;
    --auth-text: #fffaf5;
    --auth-dim: #aaa5a1;
    --auth-muted: #716d69;
    --auth-line: rgba(255, 255, 255, 0.08);
    --auth-radius: 28px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body.auth-page {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    overflow-x: hidden;
    color: var(--auth-text);
    background:
        radial-gradient(circle at 12% 15%, rgba(249, 115, 22, 0.16), transparent 31rem),
        radial-gradient(circle at 88% 76%, rgba(124, 58, 237, 0.1), transparent 30rem),
        var(--auth-bg);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    color-scheme: dark;
}

body.auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.24;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
}

a {
    color: inherit;
}

.auth-header {
    width: min(1180px, calc(100% - 48px));
    min-height: 92px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.auth-logo {
    display: inline-flex;
    width: 158px;
}

.auth-logo img {
    width: 100%;
    height: auto;
    display: block;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--auth-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.25s ease;
}

.auth-back:hover {
    color: #fff;
    border-color: rgba(249, 115, 22, 0.45);
    transform: translateY(-2px);
}

.auth-back svg {
    width: 16px;
    height: 16px;
}

.auth-main {
    width: min(1080px, calc(100% - 48px));
    min-height: calc(100svh - 160px);
    margin: 0 auto;
    padding: 48px 0 76px;
    display: grid;
    grid-template-columns: minmax(0, 560px);
    align-items: start;
    justify-content: center;
}

.auth-intro {
    max-width: 480px;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
    color: var(--auth-orange-soft);
    font-size: 13px;
    font-weight: 700;
}

.auth-eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.1);
}

.auth-intro h1 {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(42px, 5.2vw, 68px);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.055em;
    text-wrap: balance;
}

.auth-intro h1 span {
    display: block;
    color: var(--auth-orange);
}

.auth-lead {
    max-width: 430px;
    margin: 24px 0 0;
    color: var(--auth-dim);
    font-size: 16px;
    line-height: 1.7;
}

.benefit-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    margin-top: 34px;
}

.benefit-item {
    min-height: 78px;
    padding: 13px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid var(--auth-line);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.025);
}

.benefit-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 12px;
    background: rgba(249, 115, 22, 0.09);
    color: var(--auth-orange-soft);
}

.benefit-icon svg {
    width: 19px;
    height: 19px;
}

.benefit-copy strong,
.benefit-copy span {
    display: block;
}

.benefit-copy strong {
    font-size: 12px;
    font-weight: 800;
}

.benefit-copy span {
    margin-top: 2px;
    color: var(--auth-muted);
    font-size: 10px;
    font-weight: 600;
}

.auth-panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    justify-self: stretch;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--auth-radius);
    background: var(--auth-card);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.55), 0 0 70px rgba(249, 115, 22, 0.06);
    backdrop-filter: blur(26px);
}

.auth-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(251, 146, 60, 0.85), transparent);
}

.auth-panel-head {
    padding: 27px 30px 23px;
    border-bottom: 1px solid var(--auth-line);
}

.auth-step-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.auth-step-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 700;
}

.auth-step-count {
    color: var(--auth-orange-soft);
    font-size: 12px;
    font-weight: 800;
}

.auth-progress {
    height: 5px;
    margin-top: 13px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.auth-progress span {
    display: block;
    width: 50%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--auth-orange), #fbbf24);
    box-shadow: 0 0 18px rgba(249, 115, 22, 0.45);
}

.auth-panel-title {
    margin: 21px 0 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.auth-panel-copy {
    margin: 8px 0 0;
    color: var(--auth-dim);
    font-size: 13px;
}

.auth-panel-head-simple {
    padding-block: 25px;
}

.auth-panel-head-simple .auth-panel-title {
    margin-top: 0;
}

.auth-benefits {
    padding: 18px 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    border-bottom: 1px solid var(--auth-line);
}

.auth-benefit {
    min-width: 0;
    padding: 13px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--auth-line);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.025);
    text-align: center;
}

.auth-benefit-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(249, 115, 22, 0.22);
    border-radius: 11px;
    background: rgba(249, 115, 22, 0.09);
    color: var(--auth-orange-soft);
}

.auth-benefit-icon svg {
    width: 18px;
    height: 18px;
}

.auth-benefit strong {
    overflow-wrap: anywhere;
    color: rgba(255, 255, 255, 0.84);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
}

.partner-host {
    min-height: 250px;
    padding: 24px 30px 27px;
    position: relative;
}

.form-loading {
    min-height: 200px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 13px;
    color: var(--auth-muted);
    font-size: 12px;
    text-align: center;
}

.is-ready > .form-loading {
    display: none;
}

.loading-ring {
    width: 31px;
    height: 31px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--auth-orange);
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

.partner-mount,
#mister,
#login {
    width: 100%;
    min-height: 1px;
}

/* Le formulaire partenaire reste dans la direction visuelle du site. */
#mister *,
#login * {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
    box-sizing: border-box !important;
}

#mister form,
#login form,
#mister .ptprelinker-register-form,
#login .ptprelinker-login-form {
    width: 100% !important;
    margin: 0 !important;
    color: var(--auth-text) !important;
    background: transparent !important;
}

#mister label,
#login label {
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

#mister input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
#login input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
#mister select,
#login select {
    width: 100% !important;
    min-height: 50px !important;
    margin-bottom: 12px !important;
    padding: 0 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 13px !important;
    outline: 0 !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: #fff !important;
    font-size: 14px !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, background 0.2s ease !important;
}

#mister input:focus,
#login input:focus,
#mister select:focus,
#login select:focus {
    border-color: rgba(249, 115, 22, 0.68) !important;
    background: rgba(249, 115, 22, 0.05) !important;
}

#mister input[type="submit"],
#login input[type="submit"],
#mister button,
#login button,
#mister .ptprelinker-button,
#login .ptprelinker-button {
    width: 100% !important;
    min-height: 52px !important;
    margin-top: 8px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, var(--auth-orange), #ea580c) !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    text-transform: none !important;
    cursor: pointer !important;
    box-shadow: 0 16px 34px rgba(249, 115, 22, 0.22) !important;
}

#mister a,
#login a {
    color: var(--auth-orange-soft) !important;
}

#mister label.ptprelinker-label-checkbox::before,
#login label.ptprelinker-label-checkbox::before {
    border-color: rgba(255, 255, 255, 0.3) !important;
}

#mister input.ptprelinker-input-checkbox:checked + label.ptprelinker-label-checkbox::before,
#login input.ptprelinker-input-checkbox:checked + label.ptprelinker-label-checkbox::before {
    border-color: var(--auth-orange) !important;
    background-color: var(--auth-orange) !important;
}

.auth-trust {
    padding: 15px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 19px;
    border-top: 1px solid var(--auth-line);
    color: var(--auth-muted);
    font-size: 10px;
    font-weight: 700;
}

.auth-trust span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-trust svg {
    width: 13px;
    height: 13px;
    color: var(--auth-orange-soft);
}

.auth-switch {
    margin: 20px 0 0;
    color: var(--auth-muted);
    font-size: 12px;
    text-align: center;
}

.auth-switch a {
    color: #fff;
    font-weight: 800;
    text-decoration-color: rgba(249, 115, 22, 0.7);
    text-underline-offset: 4px;
}

.auth-footer {
    width: min(1080px, calc(100% - 48px));
    margin: -36px auto 0;
    padding: 0 0 30px;
    color: rgba(255, 255, 255, 0.28);
    font-size: 10px;
    text-align: center;
}

.login-page .auth-main {
    grid-template-columns: minmax(0, 520px);
}

.login-page .auth-progress span {
    width: 100%;
}

@media (max-width: 840px) {
    .auth-header {
        width: min(100% - 32px, 680px);
        min-height: 76px;
    }

    .auth-logo {
        width: 132px;
    }

    .auth-back {
        min-height: 39px;
        padding: 0 13px;
        font-size: 11px;
    }

    .auth-main,
    .login-page .auth-main {
        width: min(100% - 32px, 600px);
        min-height: auto;
        padding: 42px 0 72px;
        grid-template-columns: 1fr;
    }

    .auth-intro {
        max-width: none;
        text-align: center;
    }

    .auth-intro h1 {
        font-size: clamp(40px, 11vw, 60px);
    }

    .auth-lead {
        margin-inline: auto;
    }

    .benefit-list {
        max-width: 520px;
        margin-inline: auto;
    }

    .auth-panel {
        max-width: none;
        justify-self: stretch;
    }

    .auth-footer {
        width: calc(100% - 32px);
        margin-top: -32px;
    }
}

@media (max-width: 520px) {
    .auth-main,
    .login-page .auth-main {
        padding-top: 28px;
    }

    .auth-back span {
        display: none;
    }

    .auth-back {
        width: 40px;
        padding: 0;
    }

    .auth-eyebrow {
        margin-bottom: 15px;
    }

    .auth-lead {
        margin-top: 18px;
        font-size: 14px;
    }

    .benefit-list {
        gap: 8px;
        margin-top: 26px;
    }

    .benefit-item {
        min-height: 72px;
        padding: 10px;
        gap: 9px;
    }

    .benefit-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .benefit-copy strong {
        font-size: 10.5px;
    }

    .benefit-copy span {
        font-size: 8.5px;
    }

    .auth-panel {
        border-radius: 22px;
    }

    .auth-panel-head,
    .partner-host {
        padding-left: 20px;
        padding-right: 20px;
    }

    .auth-benefits {
        padding-inline: 14px;
        gap: 7px;
    }

    .auth-benefit {
        padding-inline: 5px;
    }

    .auth-benefit strong {
        font-size: 9.5px;
    }

    .auth-trust {
        gap: 10px;
        padding-inline: 14px;
        font-size: 8.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
