:root {
    --brand: #4FE6BE;
    --brand-rgb: 79, 230, 190;
    --brand-bg: #f0fdf9;
    --input-border: #e2e8f0;
    --text-muted: #64748b;
    --input-bg: #f8fafc;
}

.login-page {
    margin: 0;
    color: #051991;
    font-family: "Inter", sans-serif;
    font-weight: 500;
}

.show-password {
    font-weight: 400;
    font-size: 0.82em;
    color: var(--text-muted);
    gap: 6px;
    align-items: center;
    cursor: pointer;
    margin-top: 4px;
}

.show-password input[type=checkbox] {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--brand);
    cursor: pointer;
    flex-shrink: 0;
}

.flex {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.flex.center {
    align-items: center;
}

.main {
    height: 100vh;
    margin: 0;
    padding: 0;
    align-items: stretch;
}

.mire {
    width: 35%;
    background-color: #ffffff;
}

.logo {
    height: 30px;
}

#formLogin .logo-inline {
    display: block;
}

.mobile-submit-btn {
    display: none;
}

label {
    color: var(--text-muted);
    font-size: 0.76em;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

input[type=text],
input[type=email],
input[type=password] {
    font-size: 1em;
    font-family: "Inter", sans-serif;
    width: 100%;
    padding: 13px 16px;
    margin: 6px 0 14px;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1.5px solid var(--input-border);
    background-color: var(--input-bg);
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus {
    border-color: var(--brand);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.15);
}

input[type=text]::placeholder,
input[type=email]::placeholder,
input[type=password]::placeholder {
    color: #cbd5e1;
    font-size: 0.9em;
}

button {
    width: 100%;
    height: 3.6em;
    background-color: #051991;
    border-radius: 12px;
    color: white;
    font-size: 0.95em;
    font-family: "Inter", sans-serif;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-top: 1.5em;
    margin-bottom: .5em;
    cursor: pointer;
    border: 0;
    transition: opacity 0.15s ease;
}

button:hover {
    opacity: 0.9;
}

button:active {
    opacity: 1;
}

button:focus {
    outline: none;
}

#btnEnvoyer {
    background: linear-gradient(135deg, var(--brand) 0%, #36d4aa 100%);
    box-shadow: 0 4px 14px 0 rgba(var(--brand-rgb), 0.35);
    color: #0a2f20;
}

#btnEnvoyer:hover {
    box-shadow: 0 7px 22px 0 rgba(var(--brand-rgb), 0.5);
}

a {
    color: #94a3b8;
    text-decoration: none;
}

.tar {
    width: 100%;
    text-align: right;
    cursor: pointer;
}

.tar a {
    font-size: 0.82em;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    padding-bottom: 1px;
}

.tar a:hover {
    color: var(--brand);
    border-color: var(--brand);
}

.applySelector {
    opacity: .5;
    animation: appear 0.1s;
    width: 25%;
    box-shadow: 0 2px 8px 0 rgba(68, 78, 114, 0.08);
    border-radius: 14px;
    border: 1.5px solid transparent;
    margin: .6em .4em;
    text-align: center;
    padding: .9em .4em;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    color: #051991;
    background-color: #ffffff;
}

.emptySelector {
    width: 25%;
    margin: .6em .4em;
    padding: .9em .4em;
}

.applySelector:hover:not(.disable) {
    opacity: .8;
    border-color: rgba(var(--brand-rgb), 0.5);
    box-shadow: 0 4px 14px 0 rgba(68, 78, 114, 0.1);
    cursor: pointer;
    transform: translateY(-1px);
}

.applySelector.selected:not(.disable) {
    opacity: 1;
    border-color: var(--brand);
    box-shadow: 0 4px 16px 0 rgba(var(--brand-rgb), 0.18);
    cursor: pointer;
    background-color: var(--brand-bg);
}

.applySelector.disable {
    opacity: .18;
    background: var(--input-bg);
    box-shadow: none;
}

.applySelector img {
    width: 48%;
    margin-bottom: .4em;
}

.applySelector span {
    display: inline-block;
    width: 100%;
    font-size: 1.1em;
}

.applySelector.selected::before {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 50%;
    height: 2em;
    width: 2em;
    background-image: url(/hub/img/check_circle.svg);
    background-size: contain;
    transform: translate(-50%, 50%) scale(0.75) rotateZ(0deg);
    will-change: transform;
    transition: opacity 0.4s cubic-bezier(0, 0.85, 0.18, 0.99), transform 0.4s cubic-bezier(0, 0.85, 0.18, 0.99);
    z-index: 2;
}

/* ═══════════════════════════════════════════
   DECO — Panneau droit
   Thème: navy sombre, barres vivantes, screenshot flottant
═══════════════════════════════════════════ */

.deco-bg {
    width: 65%;
    position: fixed;
    right: 0;
    height: 100vh;
    background-color: #0C2749;
    transition: background-color 0.8s ease;
    overflow: hidden;
    z-index: 1;
}

.deco-screenshot {
    width: 65%;
    position: fixed;
    right: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    perspective: 900px;
    z-index: 2;
}

.deco {
    width: 65%;
    position: fixed;
    right: 0;
    height: 100vh;
    background-color: transparent;
    overflow: hidden;
    z-index: 3;
}

.visuel-wrapper {
    width: 60%;
}

.deco-screenshot img {
    width: 100%;
    height: 55vh;
    object-fit: contain;
    object-position: center;
    border-radius: 50px;
    display: block;
    transition: opacity 0.22s ease, transform 0.08s linear;
    will-change: transform;
}

.ts__tagline {
    position: fixed;
    bottom: 2em;
    right: 0;
    width: 65%;
    text-align: center;
    z-index: 200;
    font-family: "Inter", sans-serif;
    font-size: 0.72em;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.28);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    pointer-events: none;
}

/* ── Barres de planning : 6 rangées, 2 par rangée ── */

.ts__vector {
    display: inline-block;
    height: .8em;
    border-radius: 1em;
    position: absolute;
    min-width: 2em;
    z-index: 10;
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    will-change: clip-path, opacity;
    animation: barAppear 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes barAppear {
    from { opacity: 0; clip-path: inset(0 100% 0 0); }
    to   { opacity: 0.7; clip-path: inset(0 0% 0 0); }
}

/* Rangée 1 — top 7% */
.ts__vector-6  { background-color: #50e6be; width: 38% !important; left: 6%  !important; top: 7%  !important; animation-delay: 0.12s; animation-duration: 0.35s; }
.ts__vector-5  { background-color: #8250dc; width: 16% !important; left: 64% !important; top: 7%  !important; animation-delay: 1.87s; animation-duration: 0.65s; }

/* Rangée 2 — top 13% */
.ts__vector-8  { background-color: #fabe46; width: 20% !important; left: 28% !important; top: 13% !important; animation-delay: 2.31s; animation-duration: 0.28s; }
.ts__vector-2  { background-color: #ff645a; width: 36% !important; left: 54% !important; top: 13% !important; animation-delay: 0.63s; animation-duration: 0.72s; }

/* Rangée 3 — top 19% */
.ts__vector-11 { background-color: #50e6be; width: 28% !important; left: 9%  !important; top: 19% !important; animation-delay: 0.38s; animation-duration: 0.50s; }
.ts__vector-9  { background-color: #8250dc; width: 20% !important; left: 68% !important; top: 19% !important; animation-delay: 1.15s; animation-duration: 0.32s; }

/* Rangée 4 — top 74% */
.ts__vector-12 { background-color: #ff645a; width: 34% !important; left: 5%  !important; top: 74% !important; animation-delay: 0.91s; animation-duration: 0.60s; }
.ts__vector-10 { background-color: #FF3C6E; width: 18% !important; left: 60% !important; top: 74% !important; animation-delay: 2.54s; animation-duration: 0.38s; }

/* Rangée 5 — top 80% */
.ts__vector-7  { background-color: #fabe46; width: 26% !important; left: 22% !important; top: 80% !important; animation-delay: 1.72s; animation-duration: 0.45s; }
.ts__vector-4  { background-color: #8250dc; width: 30% !important; left: 58% !important; top: 80% !important; animation-delay: 0.27s; animation-duration: 0.78s; }

/* Rangée 6 — top 86% */
.ts__vector-3  { background-color: #fabe46; width: 20% !important; left: 8%  !important; top: 86% !important; animation-delay: 2.08s; animation-duration: 0.55s; }
.ts__vector-1  { background-color: #8250dc; width: 36% !important; left: 40% !important; top: 86% !important; animation-delay: 1.44s; animation-duration: 0.40s; }

select {
    display: inline-block;
    cursor: pointer;
    padding: 10px 35px 10px 15px;
    outline: 0;
    background: #fff;
    color: #666;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid #C8C8C8;
    border-radius: 5px;
    font-weight: 500;
}

.mire select:after {
    content: "";
    position: absolute;
    z-index: 2;
    right: 8px;
    top: 50%;
    margin-top: -3px;
    height: 0;
    width: 0;
    border-top: 6px solid #f99300;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    pointer-events: none;
}

.message {
    padding: 10px 16px;
    background-color: #edfdf8;
    border: 1px solid rgba(var(--brand-rgb), 0.4);
    margin-top: 12px;
    margin-bottom: 4px;
    border-radius: 10px;
    text-align: center;
    color: #0d6650;
    font-size: 0.9em;
    font-weight: 500;
}

.message.error {
    background-color: #fef2f2;
    border: 1px solid rgba(220, 53, 69, 0.25);
    color: #b91c1c;
}

.connexion-header {
    align-items: center;
}

h1 {
    color: #0f172a;
    font-size: 1.9em;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: .4em;
    margin-bottom: .2em;
}

h2 {
    color: #051991;
}

@media (max-width: 1000px) {
    .deco,
    .deco-bg,
    .deco-screenshot {
        display: none;
    }

    .mire {
        width: 100%;
        max-height: none;
    }

    /* translate3d on .card_face creates a containing block that traps position:fixed children.
       Removing it on the front face lets the button be truly fixed to the viewport. */
    .card {
        transform-style: flat;
    }

    .card_face.card_front {
        -webkit-transform: none;
        transform: none;
        padding-top: 1em;
    }

    .connexion-header h1 {
        margin-top: 0.3em;
    }

    #formLogin {
        padding-bottom: 5em;
    }

    #formLogin > button[autofocus] {
        display: none;
    }

    .mobile-submit-btn {
        display: block;
        position: fixed;
        bottom: 1em;
        left: 5%;
        right: 5%;
        width: 90%;
        z-index: 100;
    }
}

@media (max-width: 400px) {
    #formLogin .logo-inline {
        display: none;
    }
}

.card {
    transform-style: preserve-3d;
    transition: transform .75s;
    background: #ccc;
}

.card.is-flipped {
    transform: rotateY(180deg);
}

.card_face {
    width: calc(100% - 10%);
    padding: 2em 5%;
    position: absolute;
    backface-visibility: hidden;
    color: white;
    -webkit-perspective: 0;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    visibility: visible;
}

.card_back {
    width: calc(100% - 10%);
    height: calc(100vh - 4em);
    background: #fff;
    transform: rotateY(180deg);
    z-index: 99;
}

.off {
    display: none;
}

/* 2FA Page Styles */
.two-fa-container {
    height: calc(100dvh - 8em);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.two-fa-container form {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.code-input-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

input.code-digit {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    border: 2px solid var(--input-border);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
    background-color: var(--input-bg);
}

.code-digit:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.15);
    background-color: #ffffff;
}

.code-digit.filled {
    border-color: var(--brand);
    background-color: var(--brand-bg);
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 14px;
}
