<style>
/* =========================================================
   BPOS LOGIN — PRIVATE DESIGN SYSTEM
   Mobile First / Premium / Independent
   Ne dépend PAS du CSS de l'application principale
========================================================= */


/* =========================================================
   1. FONT
========================================================= */

@font-face {
    font-family: 'NotoSans';
    src: url('../vendors/fonts/NotoSans-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}


/* =========================================================
   2. VARIABLES
========================================================= */

:root {
    --bpos-radius-sm: 0.625rem;
    --bpos-radius: 0.875rem;
    --bpos-radius-lg: 1.25rem;
    --bpos-radius-xl: 1.5rem;

    --bpos-accent: #00c9a7;

    --bpos-brand-green: #197a43;
    --bpos-brand-green-dark: #125d33;
    --bpos-brand-green-light: #2f9b5f;

    --bpos-brand-orange: #e8842b;

    --bpos-pastel-green: #c5e7ce;
    --bpos-pastel-peach: #f0d0aa;

    --bpos-focus: rgba(25, 122, 67, 0.18);

    --bpos-transition-fast: 150ms;
    --bpos-transition: 220ms;
    --bpos-transition-slow: 400ms;
}


/* =========================================================
   3. LIGHT THEME
========================================================= */

[data-theme="light"] {

    --bpos-bg: #f7faf8;
    --bpos-fg: #15231c;

    --bpos-card: rgba(255, 255, 255, 0.94);

    --bpos-primary: #197a43;
    --bpos-primary-hover: #125d33;
    --bpos-primary-fg: #ffffff;

    --bpos-secondary: #eef5f0;
    --bpos-secondary-fg: #1b2b23;

    --bpos-muted: #edf2ef;
    --bpos-muted-fg: #68776f;

    --bpos-accent-bg: #eaf7ef;

    --bpos-input-bg: rgba(255, 255, 255, 0.72);
    --bpos-input-border: #d8e3dc;

    --bpos-destructive: #dc3d3d;
    --bpos-destructive-bg: #fff0f0;

    --bpos-border: rgba(21, 35, 28, 0.09);

    --bpos-shadow:
        0 24px 60px -20px rgba(25, 52, 38, 0.16);

    --bpos-shadow-soft:
        0 8px 24px rgba(25, 52, 38, 0.07);

    --bpos-shadow-glow:
        0 0 28px rgba(25, 122, 67, 0.14);

    --bpos-overlay:
        rgba(247, 250, 248, 0.76);

    --bpos-system-soft:
        rgba(25, 122, 67, 0.10);
}


/* =========================================================
   4. DARK THEME
========================================================= */

[data-theme="dark"] {

    --bpos-bg: #09110d;
    --bpos-fg: #edf5f0;

    --bpos-card: rgba(18, 28, 23, 0.96);

    --bpos-primary: #48b978;
    --bpos-primary-hover: #63ca8d;
    --bpos-primary-fg: #07110b;

    --bpos-secondary: #18231d;
    --bpos-secondary-fg: #e5eee9;

    --bpos-muted: #1c2922;
    --bpos-muted-fg: rgba(237, 245, 240, 0.62);

    --bpos-accent-bg: rgba(72, 185, 120, 0.12);

    --bpos-input-bg: rgba(255, 255, 255, 0.025);
    --bpos-input-border: rgba(255, 255, 255, 0.10);

    --bpos-destructive: #ff6262;
    --bpos-destructive-bg: rgba(255, 98, 98, 0.10);

    --bpos-border: rgba(255, 255, 255, 0.075);

    --bpos-shadow:
        0 30px 90px -30px rgba(0, 0, 0, 0.90);

    --bpos-shadow-soft:
        0 10px 30px rgba(0, 0, 0, 0.28);

    --bpos-shadow-glow:
        0 0 32px rgba(72, 185, 120, 0.17);

    --bpos-overlay:
        rgba(9, 17, 13, 0.78);

    --bpos-system-soft:
        rgba(72, 185, 120, 0.10);
}


/* =========================================================
   5. RESET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
    font-size: 16px;
}

body {
    min-height: 100vh;

    margin: 0;

    font-family:
        'NotoSans',
        'Inter',
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        sans-serif;

    color: var(--bpos-fg);

    background-color: var(--bpos-bg);

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    text-rendering: optimizeLegibility;
}


/* =========================================================
   6. GLOBAL INTERACTION
========================================================= */

button,
input,
textarea,
select {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: none;
}


/* =========================================================
   7. ICON BUTTON
========================================================= */

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    border: 1px solid var(--bpos-border);
    border-radius: var(--bpos-radius-sm);

    background: transparent;
    color: var(--bpos-fg);

    cursor: pointer;

    transition:
        background-color var(--bpos-transition-fast) ease,
        border-color var(--bpos-transition-fast) ease,
        transform var(--bpos-transition-fast) ease;
}

.icon-btn:hover {
    background: var(--bpos-system-soft);
    border-color: rgba(25, 122, 67, 0.22);
}

.icon-btn:active {
    transform: scale(0.96);
}


/* =========================================================
   8. LOGIN WRAPPER
========================================================= */

.bpos-wrapper {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 100vh;
    min-height: 100svh;

    padding: 20px;

    overflow: hidden;

    background:
        radial-gradient(
            70% 55% at 0% 0%,
            var(--bpos-pastel-green) 0%,
            transparent 72%
        ),
        radial-gradient(
            70% 55% at 100% 0%,
            var(--bpos-pastel-peach) 0%,
            transparent 72%
        ),
        var(--bpos-bg);
}


/* Subtile couche de profondeur */

.bpos-wrapper::before {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        radial-gradient(
            circle at 50% 100%,
            rgba(25, 122, 67, 0.06),
            transparent 42%
        );
}


/* =========================================================
   9. CONTAINER
========================================================= */

.bpos-container {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 430px;

    margin: auto;
}


/* =========================================================
   10. PLANS / STEPS
========================================================= */

.bpos-plan {
    display: none;

    opacity: 0;
}

.bpos-plan.active {
    display: block;
    opacity: 1;
}

.bpos-plan.slide-in-left {
    animation:
        bpos-slide-left
        420ms
        cubic-bezier(0.22, 1, 0.36, 1)
        forwards;
}

.bpos-plan.slide-in-right {
    animation:
        bpos-slide-right
        420ms
        cubic-bezier(0.22, 1, 0.36, 1)
        forwards;
}

.bpos-plan.fade-out {
    animation:
        bpos-fade-out
        300ms
        cubic-bezier(0.22, 1, 0.36, 1)
        forwards;
}

.bpos-plan.scale-in {
    animation:
        bpos-scale-in
        360ms
        cubic-bezier(0.22, 1, 0.36, 1)
        forwards;
}


/* =========================================================
   11. CARD
========================================================= */

.bpos-card,
.bpos-loading-screen {
    width: 100%;

    background: var(--bpos-card);

    border: 1px solid var(--bpos-border);
    border-radius: var(--bpos-radius-xl);

    box-shadow: var(--bpos-shadow);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.bpos-card {
    padding: 24px;
}

.bpos-card > * + * {
    margin-top: 1.5rem;
}

.bpos-center {
    text-align: center;
}


/* =========================================================
   12. TYPOGRAPHY
========================================================= */

.bpos-title {
    color: var(--bpos-fg);

    font-size: clamp(1.45rem, 5vw, 1.75rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.bpos-title-sm {
    color: var(--bpos-fg);

    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.25;
}

.bpos-subtitle {
    margin-top: 7px;

    color: var(--bpos-muted-fg);

    font-size: 0.875rem;
    line-height: 1.6;
}

.bpos-subtitle.connexion {
    margin-top: 5px;

    font-size: 0.78rem;
    line-height: 1.5;
    text-align: left;
}

.bpos-form-title {
    margin-top: 1.5rem;
    margin-bottom: 0;

    color: var(--bpos-muted-fg);

    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;

    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
}

.bpos-loading-text {
    color: var(--bpos-muted-fg);

    font-size: 0.875rem;
    line-height: 1.5;

    letter-spacing: 0.02em;
}

.bpos-footer-text {
    color: var(--bpos-muted-fg);

    font-size: 0.8125rem;
    line-height: 1.5;
}


/* =========================================================
   13. CARD HEADER / FOOTER
========================================================= */

.bpos-card-header {
    text-align: center;
}

.bpos-card-header > * + * {
    margin-top: 0.55rem;
}

.bpos-card-footer {
    padding-top: 0.25rem;

    text-align: center;
}


/* =========================================================
   14. LOGO
========================================================= */

.logo {
    position: relative;

    display: inline-block;

    font-family:
        'Inter',
        'NotoSans',
        sans-serif;

    font-size: clamp(1.75rem, 7vw, 2.15rem);
    font-weight: 900;

    line-height: 1;

    letter-spacing: -0.055em;

    color: var(--bpos-brand-green);

    text-align: left;
}

.logo .pos {
    margin-left: -0.70rem;
    color: var(--bpos-brand-orange);
}

.logo .b {
    display: inline-block;

    transform: scaleX(-1);
}

.logo::after {
    content: "";

    position: absolute;

    bottom: -8px;
    left: 10px;

    width: 22px;
    height: 3px;

    border-radius: 999px;

    background: var(--bpos-brand-green);
}


/* =========================================================
   15. LOADING SCREEN
========================================================= */

.bpos-loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 300px;

    padding: 48px 24px;

    gap: 24px;
}


/* =========================================================
   16. SPINNER
========================================================= */

.bpos-spinner {
    width: 40px;
    height: 40px;

    border: 3px solid var(--bpos-muted);
    border-top-color: var(--bpos-primary);

    border-radius: 50%;

    animation: bpos-spin 900ms linear infinite;
}

.bpos-spinner-lg {
    width: 58px;
    height: 58px;

    border-width: 4px;
}


/* =========================================================
   17. FORM
========================================================= */

.bpos-form > * + * {
    margin-top: 14px;
}


/* =========================================================
   18. INPUT GROUP
========================================================= */

.bpos-input-group {
    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;
    min-height: 50px;

    padding: 8px 13px;

    border: 1.5px solid var(--bpos-input-border);
    border-radius: var(--bpos-radius);

    background: var(--bpos-input-bg);

    transition:
        border-color var(--bpos-transition) ease,
        box-shadow var(--bpos-transition) ease,
        background-color var(--bpos-transition) ease;
}

.bpos-input-group:hover {
    border-color: rgba(25, 122, 67, 0.25);
}

.bpos-input-group.focused {
    border-color: var(--bpos-primary);

    background: var(--bpos-card);

    box-shadow: var(--bpos-shadow-glow);
}

.bpos-input-group.has-error {
    border-color: var(--bpos-destructive);
    box-shadow: 0 0 0 3px rgba(220, 61, 61, 0.08);
}


/* =========================================================
   19. INPUT ICON
========================================================= */

.bpos-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 20px;
    min-width: 20px;

    color: var(--bpos-muted-fg);

    transition:
        color var(--bpos-transition-fast) ease,
        transform var(--bpos-transition-fast) ease;
}

.bpos-input-group.focused .bpos-input-icon {
    color: var(--bpos-primary);
    transform: scale(1.04);
}


/* =========================================================
   20. INPUT
========================================================= */

.bpos-input {
    flex: 1;

    width: 100%;
    min-width: 0;
    min-height: 32px;

    border: none;
    outline: none;

    background: transparent;

    color: var(--bpos-fg);

    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.4;
}

.bpos-input::placeholder {
    color: var(--bpos-muted-fg);
    opacity: 0.85;
}


/* =========================================================
   21. ERROR
========================================================= */

.bpos-error {
    min-height: 18px;

    color: var(--bpos-destructive);

    font-size: 0.75rem;
    line-height: 1.4;
}


/* =========================================================
   22. PRIMARY BUTTON
========================================================= */

.bpos-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 50px;

    padding: 12px 16px;

    border: 0;
    border-radius: var(--bpos-radius);

    background:
        linear-gradient(
            135deg,
            var(--bpos-brand-green-light),
            var(--bpos-brand-green)
        );

    color: #fff;

    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;

    line-height: 1;

    letter-spacing: 0.015em;

    cursor: pointer;

    box-shadow:
        0 8px 20px rgba(25, 122, 67, 0.18);

    transition:
        transform var(--bpos-transition-fast) ease,
        box-shadow var(--bpos-transition-fast) ease,
        opacity var(--bpos-transition-fast) ease;
}

.bpos-btn-primary:hover {
    opacity: 0.96;

    box-shadow:
        0 10px 25px rgba(25, 122, 67, 0.24);

    transform: translateY(-1px);
}

.bpos-btn-primary:active {
    transform: translateY(0) scale(0.985);
}


/* =========================================================
   23. SECONDARY BUTTON
========================================================= */

.bpos-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 50px;

    padding: 12px 16px;

    border: 1px solid var(--bpos-border);
    border-radius: var(--bpos-radius);

    background: var(--bpos-secondary);
    color: var(--bpos-secondary-fg);

    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color var(--bpos-transition-fast) ease,
        border-color var(--bpos-transition-fast) ease,
        transform var(--bpos-transition-fast) ease;
}

.bpos-btn-secondary:hover {
    background: var(--bpos-muted);
    border-color: rgba(25, 122, 67, 0.16);
}

.bpos-btn-secondary:active {
    transform: scale(0.985);
}


/* =========================================================
   24. BUTTON ROW
========================================================= */

.bpos-btn-row {
    display: flex;
    flex-direction: column;

    gap: 10px;
}


/* =========================================================
   25. LINK BUTTON
========================================================= */

.bpos-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 32px;

    margin-top: 4px;
    padding: 4px;

    border: none;

    background: transparent;
    color: var(--bpos-primary);

    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        opacity var(--bpos-transition-fast) ease,
        color var(--bpos-transition-fast) ease;
}

.bpos-link:hover {
    opacity: 0.78;
}

.bpos-link:active {
    transform: scale(0.98);
}


/* =========================================================
   26. STEP INDICATOR
========================================================= */

.bpos-steps {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;
}

.bpos-step-dot {
    height: 5px;

    border-radius: 999px;

    transition:
        width var(--bpos-transition-slow) ease,
        background-color var(--bpos-transition-slow) ease;
}

.bpos-step-dot.active {
    width: 30px;
    background: var(--bpos-primary);
}

.bpos-step-dot.inactive {
    width: 9px;
    background: var(--bpos-muted);
}


/* =========================================================
   27. RESULT SCREENS
========================================================= */

.bpos-result > * + * {
    margin-top: 14px;
}

.bpos-processing {
    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 42px 0;
}

.bpos-processing > * + * {
    margin-top: 22px;
}

.bpos-result {
    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 32px 0;
}


/* =========================================================
   28. SUCCESS / ERROR ICON
========================================================= */

.bpos-success-icon,
.bpos-error-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 76px;
    height: 76px;

    border-radius: 50%;
}

.bpos-success-icon {
    background: var(--bpos-accent-bg);
}

.bpos-error-icon {
    background: var(--bpos-destructive-bg);
}


/* =========================================================
   29. CHECK ANIMATION
========================================================= */

.bpos-check-path {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;

    animation:
        bpos-check
        600ms
        ease
        forwards
        200ms;
}


/* =========================================================
   30. FULL SCREEN LOADING
========================================================= */

#loading-overlay {
    position: fixed;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    padding: 24px;

    background: var(--bpos-overlay);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    z-index: 9999;
}


/* =========================================================
   31. FULL SCREEN SPINNER
========================================================= */

.spinner {
    width: 54px;
    height: 54px;

    border: 4px solid var(--bpos-muted);
    border-top-color: var(--bpos-primary);

    border-radius: 50%;

    animation:
        bpos-login-spin
        850ms
        linear
        infinite;
}


/* =========================================================
   32. ANIMATIONS
========================================================= */

@keyframes bpos-fade-out {

    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-14px);
    }
}


@keyframes bpos-slide-left {

    from {
        opacity: 0;
        transform: translateX(45px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}


@keyframes bpos-slide-right {

    from {
        opacity: 0;
        transform: translateX(-45px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}


@keyframes bpos-scale-in {

    from {
        opacity: 0;
        transform: scale(0.94);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


@keyframes bpos-spin {

    to {
        transform: rotate(360deg);
    }
}


@keyframes bpos-login-spin {

    to {
        transform: rotate(360deg);
    }
}


@keyframes bpos-check {

    to {
        stroke-dashoffset: 0;
    }
}


@keyframes bpos-logo-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.035);
        opacity: 0.88;
    }
}


.bpos-logo-pulse {
    animation:
        bpos-logo-pulse
        2.4s
        ease-in-out
        infinite;
}


/* =========================================================
   33. TABLET
========================================================= */

@media (min-width: 600px) {

    .bpos-wrapper {
        padding: 32px;
    }

    .bpos-card {
        padding: 30px;
    }

    .bpos-btn-row {
        flex-direction: row;
    }

    .bpos-btn-row > * {
        flex: 1;
    }
}


/* =========================================================
   34. DESKTOP
========================================================= */

@media (min-width: 900px) {

    .bpos-wrapper {
        padding: 40px;
    }

    .bpos-container {
        max-width: 440px;
    }

    .bpos-card {
        padding: 32px;
    }

    .bpos-title {
        font-size: 1.75rem;
    }
}


/* =========================================================
   35. LARGE DESKTOP
========================================================= */

@media (min-width: 1200px) {

    .bpos-container {
        max-width: 450px;
    }

    .bpos-card {
        padding: 34px;
    }
}


/* =========================================================
   36. DARK MODE REFINEMENTS
========================================================= */

[data-theme="dark"] .bpos-wrapper {
    background:
        radial-gradient(
            70% 55% at 0% 0%,
            rgba(38, 105, 66, 0.28) 0%,
            transparent 72%
        ),
        radial-gradient(
            70% 55% at 100% 0%,
            rgba(150, 90, 35, 0.18) 0%,
            transparent 72%
        ),
        var(--bpos-bg);
}

[data-theme="dark"] .bpos-card,
[data-theme="dark"] .bpos-loading-screen {
    border-color: rgba(255, 255, 255, 0.075);
}

[data-theme="dark"] .bpos-input-group.focused {
    background: rgba(72, 185, 120, 0.035);
}

[data-theme="dark"] .bpos-btn-primary {
    color: var(--bpos-primary-fg);

    box-shadow:
        0 8px 24px rgba(72, 185, 120, 0.16);
}


/* =========================================================
   37. SMALL PHONES
========================================================= */

@media (max-width: 380px) {

    .bpos-wrapper {
        padding: 12px;
    }

    .bpos-card {
        padding: 20px 16px;
        border-radius: var(--bpos-radius-lg);
    }

    .bpos-title {
        font-size: 1.35rem;
    }

    .bpos-subtitle {
        font-size: 0.8125rem;
    }

    .bpos-input-group {
        min-height: 48px;
        padding: 7px 11px;
    }

    .bpos-btn-primary,
    .bpos-btn-secondary {
        min-height: 48px;
    }
}


/* =========================================================
   38. REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
    }

    .bpos-plan,
    .bpos-spinner,
    .spinner,
    .bpos-check-path,
    .bpos-logo-pulse {
        animation: none !important;
    }

    .bpos-input-group,
    .bpos-btn-primary,
    .bpos-btn-secondary,
    .bpos-link,
    .icon-btn,
    .bpos-step-dot {
        transition: none !important;
    }
}
</style>