/* ===================================
   Fox4Work - Login Page Styles
   =================================== */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html.html_connection {
    font-size: 62.5%; /* 1rem = 10px */
}

/* CSS Variables */
:root {
    --primary-navy: #1e3865;
    --primary-opacity-30: rgba(30, 56, 101, 0.3);
    --primary-opacity-20: rgba(30, 56, 101, 0.2);
    --primary-opacity-10: rgba(30, 56, 101, 0.1);
    --primary-blue: #2c5f8d;
    --background-light-blue: #f5faff;
    --accent-orange: #f08231;
    --light-bg: #e8f1f8;
    --white: #ffffff;
    --text-primary: #1e3865;
    --text-secondary: #6b7280;
    --border-radius: 16px;
    --shadow-main: 5px 10px 15px rgba(30, 58, 95, 0.2);
}

    body.page-connexion {
        font-family: "Inter", sans-serif;
        font-optical-sizing: auto;
        background: linear-gradient(135deg, #f5faff 0%, rgb(195, 216, 237) 100%);
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        position: relative;
        overflow: hidden;
        font-size: 1.35rem;
        min-width: 0;
    }

/* Main content wrapper */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ===================================
   Orbital Animations
   =================================== */

.orbit-animation {
    position: absolute;
    pointer-events: none;
    opacity: 0.4;
    z-index: 0;
    overflow: visible;
}

.orbit-animation svg {
    overflow: visible;
}

.orbit-animation-1 {
    top: -150px;
    left: -200px;
    width: 600px;
    height: 600px;
}

.orbit-animation-2 {
    top: -100px;
    right: 0;
    width: 650px;
    height: 650px;
}

.orbit-animation-3 {
    bottom: -80px;
    left: -150px;
    width: 580px;
    height: 580px;
}

.orbit-animation-4 {
    bottom: -100px;
    right: 200px;
    width: 700px;
    height: 700px;
}

/* Animations CSS pour les orbites */
@keyframes rotate-orbit-1 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotate-planet-1 {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes rotate-orbit-2 {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes rotate-planet-2 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotate-orbit-3 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotate-planet-3 {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes rotate-orbit-4 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotate-planet-4 {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

.orbit-1-circle {
    animation: rotate-orbit-1 50s linear infinite;
    transform-origin: 0px 600px;
}

.planet-1-circle {
    animation: rotate-planet-1 28s linear infinite;
    transform-origin: 0px 600px;
}

.orbit-2-circle {
    animation: rotate-orbit-2 55s linear infinite;
    transform-origin: 650px 0px;
}

.planet-2-circle {
    animation: rotate-planet-2 32s linear infinite;
    transform-origin: 650px 0px;
}

.orbit-3-circle {
    animation: rotate-orbit-3 45s linear infinite;
    transform-origin: 0px 0px;
}

.planet-3-circle {
    animation: rotate-planet-3 40s linear infinite;
    transform-origin: 0px 0px;
}

.orbit-4-circle {
    animation: rotate-orbit-4 60s linear infinite;
    transform-origin: 700px 700px;
}

.planet-4-circle {
    animation: rotate-planet-4 50s linear infinite;
    transform-origin: 700px 700px;
}

/* ===================================
   Layout
   =================================== */

.container {
    width: 100%;
    max-width: 1200px;
    z-index: 1;
}

.main-content {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-main);
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    overflow: hidden;
    position: relative;
    height: 700px;
}

/* ===================================
   Left Side - Illustration
   =================================== */

.illustration-side {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-blue) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 55% 100%, 0 100%);
    max-height: 700px;
}

.logo-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    justify-content: center;
}

.logo {
    width: 140px;
    height: 65.55px;
}

.illustration-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.illustration-container img {
    width: 101%;
    height: 101%;
    object-fit: cover;
    object-position: left center;
    transition: opacity 0.3s ease;
}

.illustration-container img.support-illustration {
    width: 50%;
    height: auto;
    position: absolute;
    left: 11%;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 0.3s ease;
}

.illustration-container img.newuser-illustration {
    width: 20%;
    height: auto;
    position: absolute;
    left: 28%;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 0.3s ease;
}

/* ===================================
   Right Side - Content Area
   =================================== */

.content-side {
    padding: 0 10rem 0 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.support-link {
    position: absolute;
    top: 2rem;
    right: 2.6rem;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-opacity-30);
    font-size: 1.2rem;
    text-decoration: none;
    transition: color 0.3s;
}

.support-link:hover,
.support-link--mobile:focus {
    color: var(--accent-orange);
}

.support-link--mobile {
    display: none;
}

.support-icon {
    width: 16px;
    height: 16.05px;
    position: relative;
    top: 0.4px;
}

.content-header {
    text-align: center;
    margin-bottom: 1.8rem;
}

.content-header h1 {
    font-size: 3.4rem;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 2.4rem;
    text-shadow: 3px 3px 0 #d4e3f4;
}

.content-header .support-subtitle {
    width: 250px;
    margin: 0 auto;
    color: var(--text-primary);
    line-height: 1.4;
}

.content-header .newuser-subtitle {
    padding: 0 5%;
    color: var(--text-primary);
    line-height: 1.4;
}

.system-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.system-label {
    font-size: 1.2rem;
    color: var(--primary-opacity-30);
}

.system-value {
    font-size: 1.4rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ===================================
   Form Elements
   =================================== */

.form-group {
    margin-bottom: 1.6rem;
    position: relative;
}

/* Field error state */
.form-group.has-error .form-input,
.form-group.has-error .form-select {
    border-color: #ef4444;
    background: #fef2f2;
}

.form-group.has-error .form-input:focus,
.form-group.has-error .form-select:focus {
    border-color: #dc2626;
}

/* Field error icon */
.field-error-icon {
    position: absolute;
    left: -3.4rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.4rem;
    height: 2.4rem;
    padding: 0.4rem;
    color: #ef4444;
    background: #fee2e2;
    border-radius: 50%;
    display: none;
    pointer-events: none;
    animation: errorShake 0.4s ease;
}

.form-group.has-error .field-error-icon {
    display: block;
}

@keyframes errorShake {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    25% { transform: translateY(-50%) translateX(-5px); }
    75% { transform: translateY(-50%) translateX(5px); }
}

.form-label {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-label .required {
    color: var(--accent-orange);
}

.form-input,
.form-select {
    width: 100%;
    padding: 1.5rem 2rem;
    border: 1px solid var(--primary-opacity-10);
    border-radius: 5px;
    font-size: 1.3rem;
    transition: all 0.3s;
    background: var(--background-light-blue);
    font-family: "Inter", sans-serif;
    color: var(--primary-navy);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border: 1px solid var(--primary-opacity-20);
}

.form-input::placeholder {
    color: var(--primary-opacity-30);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6.75 3.75'%3E%3Cpolyline points='6.38 .38 3.38 3.38 .38 .38' fill='none' stroke='rgba(30, 56, 101, 0.3)' stroke-linecap='round' stroke-linejoin='round' stroke-width='.75'/%3E%3C/svg%3E");
    background-size: 13px auto;
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
    color: var(--primary-opacity-30);
}

.form-select.has-value {
    color: var(--primary-navy);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6.75 3.75'%3E%3Cpolyline points='6.38 .38 3.38 3.38 .38 .38' fill='none' stroke='%231e3865' stroke-linecap='round' stroke-linejoin='round' stroke-width='.75'/%3E%3C/svg%3E");
}

.form-select option {
    color: var(--primary-navy);
}

.form-select option:first-child {
    color: var(--primary-opacity-30);
}

/* Input reset button */
.input-reset-btn {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.8rem;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--primary-opacity-30);
    transition: all 0.2s;
    font-size: 1.1rem;
    font-weight: 500;
    font-family: "Inter", sans-serif;
}

.input-reset-btn:hover {
    color: var(--accent-orange);
}

.form-group:has(.form-input:not(:placeholder-shown)) .input-reset-btn {
    display: flex;
}

.submit-btn {
    display: block;
    width: fit-content;
    padding: 1.4rem 5rem;
    background: var(--primary-navy);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin: 2.4rem auto 0;
}

.submit-btn:hover {
    transform: translateY(-2px);
    color: var(--accent-orange);
    box-shadow: 4px 4px 0 var(--accent-orange);
}

.submit-btn:active {
    transform: translateY(0);
}

/* ===================================
   Status Bar
   =================================== */

.status-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    margin-top: 4rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    color: var(--primary-opacity-30);
}

.status-item:not(:last-child)::after {
    content: '';
    display: inline-block;
    width: 1px;
    height: 10px;
    background: var(--primary-opacity-30);
    margin-left: 5px;
}

.status-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.status-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: default;
}

.status-icon-wrapper {
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid var(--primary-opacity-10);
    background-color: var(--background-light-blue);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.status-icon {
    width: 1.4rem;
    height: 1.4rem;
    flex-shrink: 0;
}

.status-icon.success {
    color: #10b981;
}

.status-icon.error {
    color: #ef4444;
}

/* ===================================
   Error Message
   =================================== */

.error-message {
    margin-bottom: 1.6rem;
    padding: 1.4rem 3rem;
    background: #fee2e2;
    border-radius: 6px;
    display: none;
}

.error-message.show {
    display: block;
    animation: slideIn 0.3s ease;
}

.error-text {
    font-size: 1.2rem;
    color: #991b1b;
    line-height: 1.4;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   Footer
   =================================== */

.copyright-link {
    color: var(--primary-opacity-30);
    font-size: 1.2rem;
    margin-top: 1rem;
    padding-left: 1rem;
}

.copyright-link a {
    position: relative;
    color: currentColor;
    text-decoration: none;
    transition: opacity 0.3s;
}

.copyright-link a:hover {
    color: var(--accent-orange);
}

.open-new-tab-icon {
    position: relative;
    right: -3px;
    top: -3px;
    width: 9px;
}

.underline-laser {
    position: relative;
    display: inline-block;
    text-decoration: none;
}

.underline-laser::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 1px;
    background-color: currentColor;
    width: 0;
    transform-origin: left;
    transition: none;
    animation: none;
}

.underline-laser:hover::after {
    animation: laser-underline .8s ease-in-out forwards;
}

@keyframes laser-underline {
    0% {
        width:0
    }
    50% {
        width:100%;
        left:0;
        transform:scaleX(1)
    }
    100% {
        width:100%;
        left:100%;
        transform:scaleX(0)
    }
}

.system-footer {
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 0 2rem;
    width: 100%;
    padding: 1.4rem 3rem 1.5rem;
    font-size: 1.2rem;
    text-align: center;
    background-color: var(--primary-navy);
    color: var(--white);
    flex-shrink: 0;
}

.system-footer-group {
    display: flex;
    gap: 0 2rem;
}

.system-footer-group:first-of-type,
.system-footer-group:last-of-type {
    width: 300px;
}

.system-footer-group:first-of-type {
    justify-content: flex-start;
}

.system-footer-group:last-of-type {
    justify-content: flex-end;
}

.system-footer-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0 0.3rem;
}

.system-footer-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -10.5px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 12px;
    background: var(--white);
}

.system-footer-group:last-of-type .system-footer-item:not(:last-child)::after,
.system-footer-group:first-of-type .system-footer-item:not(:last-child)::after {
    right: -11.5px;
}

.system-footer-label {
    display: flex;
    gap: 0 0.6rem;
    align-items: center;
}

.system-footer-value {
    font-weight: 500;
}

/* ===================================
   Tabs System
   =================================== */
.tab-content { display: none; }
.tab-content.active { display: flex; /* ou block selon ton layout */ flex-direction: column; }

/* ===================================
   Support Tab Styles
   =================================== */

.support-link,
.support-link--mobile {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.support-contact-list {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    width: 240px;
    margin: 0 auto 2.4rem;
}

.support-contact-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.support-icon-wrapper {
    width: 4.6rem;
    height: 4.6rem;
    border-radius: 50%;
    border: 1px solid var(--primary-opacity-10);
    background: var(--background-light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.support-contact-icon {
    width: 100%;
    height: auto;
    color: var(--primary-navy);
    border-radius: 50%;
}

.support-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.support-contact-label {
    font-size: 1rem;
    color: var(--primary-opacity-30);
}

.support-contact-value {
    color: var(--text-primary);
    font-weight: 500;
}

.support-notice {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.6rem;
    background: rgba(240, 130, 49, 0.08);
    border-radius: 5px;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.support-notice-icon {
    flex-shrink: 0;
    width: 2.4rem;
    height: 2.4rem;
    color: var(--accent-orange);
}

.support-notice-icon svg {
    width: 100%;
    height: 100%;
}

.support-notice-text {
    color: var(--accent-orange);
    line-height: 1.5;
}

.support-info-items {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.4rem;
}

.support-info-items .support-info-item:first-child {
    flex: 0.8;
}

.support-info-items .support-info-item:last-child {
    flex: 1.2;
}

.support-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.4rem 1.6rem;
    background: var(--background-light-blue);
    border-radius: 5px;
    font-size: 1.2rem;
}

.support-info-label {
    color: var(--primary-opacity-30);
}

.support-info-value {
    color: var(--primary-navy);
}

.back-to-login-btn {
    display: block;
    width: fit-content;
    background: transparent;
    color: var(--primary-opacity-30);
    border: none;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0 auto;
    font-family: inherit;
}

.back-to-login-btn:hover {
    color: var(--accent-orange);
}

#content-side-newuser .back-to-login-btn {
    margin-top: 2.4rem;
}

/* ===================================
   Responsive Styles
   =================================== */

@media (max-height: 960px) {
    .main-content {
        height: 600px;
    }

    .illustration-container img.support-illustration {
        width: 44%;
        left: 13%;
    }
}

@media (max-width: 1330px) {
    .main-content,
    .container {
        max-width: 90%;
    }

    .main-content {
        grid-template-columns: 1fr 1fr;
        margin: 0 auto;
    }
}

@media (max-width: 1100px) {
    .main-content {
        grid-template-columns: 0.9fr 1.1fr;
    }
}

@media (max-width: 1000px), (min-width: 1001px) and (orientation: portrait) {

    body { overflow: auto; }

    .main-content,
    .container { width: 500px; max-width: inherit; }

    body.page-connexion { overflow: auto; }

    .content-side { padding: 8rem 7rem; }

    .orbit-animation { display: none; }

    main { padding: 5rem 0 7rem; }

    .illustration-container { flex: inherit; display: initial; height: 100%; }

    .main-content { grid-template-columns: none; height: auto; display: flex; flex-direction: column; }

    .copyright-link { text-align: center; font-weight: 500; }

    .support-info-items { flex-direction: column; }

    .illustration-side { clip-path: none; height: 300px; max-height: 300px; }

    .illustration-container img { width: 150%; height: 110%; }

    .illustration-container img.support-illustration { width: 40%; height: auto; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }

    .system-footer { flex-direction: column; align-items: center; gap: 1rem; }

    .system-footer .system-footer-group:last-of-type { margin-top: 2rem; }

    .illustration-container img.newuser-illustration { left: 50%; transform: translate(-50%, -50%); }

    .content-header .newuser-subtitle { padding: 0; }

    .system-footer-group:first-of-type,
    .system-footer-group:last-of-type,
    .system-footer-group { justify-content: center; width: 100%; }
}

    @media (max-width: 700px) {
        main { background-size: cover; background-position: initial; }
    }

    @media (max-width: 580px) {
        .main-content,
        .container { width: 100%; }

        main { padding: 2.6rem 0 4rem; }

        .content-side { padding: 2.4rem 3rem; }

        .copyright-link { padding: 0px 15%; line-height: 1.5; }

        .logo { width: 100px; height: 46.75px; }

        .logo-header { margin-bottom: 12px; }

        .support-link { display: none; }

        .support-link--mobile { position: absolute; top: 1rem; right: 5%; display: flex; align-items: center; gap: 4px; color: var(--primary-opacity-30); font-size: 1rem; text-decoration: none; transition: color 0.3s; }

        .support-icon { width: 14px; height: 14.05px; }

        .illustration-side { height: 180px; max-height: 180px; }

        .content-header h1 { font-size: 2rem; }

        .content-header h1 { margin-bottom: 1.6rem; }

        .system-label { font-size: 1rem; }

        .system-value { font-size: 1.2rem; }

        .form-select { padding: 1.3rem 1.4rem; font-size: 1.1rem; }

        .form-input { padding: 1.3rem 5.8rem 1.3rem 1.4rem; font-size: 1.1rem; }

        .form-group { margin-bottom: 1rem; }

        .submit-btn { padding: 1.2rem 4rem; font-size: 1.05rem; margin-top: 2rem; }

        .form-select { background-size: 10px auto; }

        .copyright-link { font-size: 0.9rem; padding: 0; }

        .open-new-tab-icon { right: -2px; top: -4px; width: 6px; }

        .status-item { gap: 3px; font-size: 0.9rem; }

        .status-icon-wrapper { width: 1.4rem; height: 1.4rem; }

        .status-icon { width: 1.2rem; height: 1.2rem; }

        .status-bar { gap: 0.8rem; margin-top: 3rem; }

        .status-item:first-child::after { margin-left: 5.5px; }

        .status-item:nth-child(2)::after { margin-left: 6.25px; }

        .status-item:nth-child(3)::after { margin-left: 7px; }

        .status-item:last-of-type { position: relative; left: -1px; }

        .system-footer { gap: 0.5rem; padding: 1.4rem 0 1.5rem; font-size: 1rem; }

        .system-footer .system-footer-group:last-of-type { margin-top: 1rem; }

        .system-footer-item:not(:last-child)::after { height: 10px; }

        .content-header .support-subtitle,
        .content-header .newuser-subtitle { font-size: 1.1rem; line-height: 1.5; }

        .support-contact-label { font-size: 0.9rem; }

        .support-contact-value { font-size: 1.2rem; }

        .support-contact-info { gap: 0.3rem; }

        .support-icon-wrapper { width: 4rem; height: 4rem; }

        .support-notice-text { font-size: 1.1rem; }

        .support-info-item { padding: 1.3rem 1.5rem; font-size: 1.1rem; }

        .back-to-login-btn { font-size: 1rem; }

        .support-info-items { margin-bottom: 2rem; }

        .illustration-container img.newuser-illustration { width: 16%; }

        .content-header .newuser-subtitle { padding: 0; }

        #content-side-newuser .back-to-login-btn { margin-top: 2rem; }
    }