/*
 * JT-156 — page /login seulement (liée par $jt_css_extra).
 * Le shell (theme-base, theme-shell-sidebar, theme-ios-app) n’est pas étendu.
 */

body:has(.jt-login-hub) {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    overflow-x: hidden;
    background-color: #0d1117;
    background-image:
        linear-gradient(rgba(8, 12, 24, 0.62), rgba(8, 12, 24, 0.62)),
        url('../assets/img/background_joute.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

body:has(.jt-login-hub) .container {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    margin: 0;
    background: transparent;
    padding: 1.5rem 1.25rem 1.25rem;
}

body:has(.jt-login-hub) .jt-footer {
    background: transparent;
    text-align: center;
}

.jt-login-hub.login-page {
    display: block;
    width: 100%;
    min-height: 0;
}

.jt-login-hub .login-container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 0;
}

.jt-login-hub .login-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 1.75rem 1.5rem 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.jt-login-hub-brand {
    text-align: center;
    margin-bottom: 1.25rem;
}

.jt-login-hub-logo {
    display: block;
    width: 100%;
    max-width: 280px;
    height: auto;
    margin: 0 auto 0.65rem;
}

.jt-login-hub-chapter {
    display: flex;
    justify-content: center;
    margin: 0 0 0.5rem;
}

.jt-login-hub-chapter span {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border: 1px solid rgba(0, 188, 212, 0.4);
    border-radius: 999px;
    background: rgba(0, 188, 212, 0.12);
    color: #7ee8fa;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.jt-login-hub-sub {
    margin: 0.35rem 0 0;
    color: #8b949e;
    font-size: 0.875rem;
    line-height: 1.4;
}

.jt-login-hub .form-group {
    margin-bottom: 0.65rem;
}

.jt-login-hub .form-group label {
    margin-bottom: 0.35rem;
    color: #8b949e;
    font-size: 0.8rem;
    font-weight: 500;
}

.jt-login-hub .form-group input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #30363d;
    border-radius: 8px;
    background-color: #0d1117;
    background-image: none;
    color: #e6edf3;
    font-size: 1rem;
}

.jt-login-hub .form-group input:focus {
    outline: none;
    border-color: #00bcd4;
    box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.25);
}

.jt-login-hub .btn-primary {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    background: #00bcd4;
    color: #0d1117;
    font-size: 1rem;
    font-weight: 600;
    transform: none;
}

.jt-login-hub .btn-primary:hover {
    background: #26c6da;
    color: #0d1117;
    transform: none;
}

.jt-login-hub .jt-auth-footer-link {
    margin: 0.75rem 0 0;
    text-align: center;
    font-size: 0.8125rem;
}

.jt-login-hub .jt-auth-footer-link a {
    color: #8b949e;
    text-decoration: none;
}

.jt-login-hub .jt-auth-footer-link a:hover {
    color: #00b8d4;
    text-decoration: underline;
}

.jt-login-hub-event {
    margin: 1rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.jt-login-hub-event a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    text-decoration: none;
}

.jt-login-hub-event a:hover {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
}

.jt-login-hub .jt-alert {
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.45;
    text-align: left;
    overflow-wrap: anywhere;
}

.jt-login-hub .jt-alert-error {
    background: rgba(248, 81, 73, 0.15);
    border: 1px solid #f85149;
    color: #ffa198;
}

.jt-login-hub .jt-alert-success {
    background: rgba(46, 160, 67, 0.15);
    border: 1px solid #3fb950;
    color: #7ee787;
}

@media (max-width: 959px) {
    body:has(.jt-login-hub) {
        background-image: none;
    }

    body:has(.jt-login-hub) .container {
        padding: 1rem;
        align-items: flex-start;
    }

    .jt-login-hub .login-card {
        padding: 1.35rem 1rem 1.15rem;
    }
}

.jt-body--ios-app:has(.jt-login-hub) .container {
    padding-left: calc(1rem + env(safe-area-inset-left, 0px));
    padding-right: calc(1rem + env(safe-area-inset-right, 0px));
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}
