/* --- 1. CENTRAGE ABSOLU SUR LA PAGE --- */
html, body {
    height: 100%;
    margin: 0;
}

#app-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    background: #f0f2f5;
    font-family: 'Montserrat', sans-serif;
}

/* --- 2. LE CONTENEUR --- */
.auth-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.25);
    position: relative;
    overflow: hidden;
    width: 768px;
    min-height: 520px;
}

/* --- 3. LES FORMULAIRES --- */
.form-container {
    position: absolute;
    top: 0; left: 0; width: 50%; height: 100%;
    transition: all 0.6s ease-in-out;
    z-index: 5;
}

.auth-form {
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 35px;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0; left: 0;
    transition: all 0.6s ease-in-out;
    box-sizing: border-box;
}

#login-form { z-index: 2; opacity: 1; }
#register-form { z-index: 1; opacity: 0; }

.right-panel-active .form-container { transform: translateX(100%); }
.right-panel-active #login-form { opacity: 0; z-index: 1; }
.right-panel-active #register-form { opacity: 1; z-index: 5; }

/* --- 4. OPTIONS ET LIENS --- */
.form-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 15px 0;
    gap: 10px;
}

#forgot-password-link {
    color: #3e33f8 !important;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
}

/* --- 5. LE CAPTCHA (CORRECTION GRILLE) --- */
.captcha-wrapper {
    display: grid;
    grid-template-columns: 1fr auto 60px; /* 3 colonnes fixes */
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    padding: 8px;
    background: #f9f9f9;
    border: 1px dashed #e67e22;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

canvas {
    width: 100%;
    max-width: 190px;
    height: 40px;
    background: #fff;
    border-radius: 4px;
}

.btn-refresh {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    color: #e67e22;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Zone de saisie enfin visible */
#captcha-answer, #captcha-forgot-answer {
    width: 100% !important;
    height: 40px !important;
    text-align: center;
    border: 1px solid #ccc !important;
    border-radius: 5px !important;
    background: #fff !important;
    font-weight: bold;
    padding: 0 !important;
}

/* --- 6. PANNEAU ROUGE (OVERLAY) --- */
.overlay-container {
    position: absolute;
    top: 0; left: 50%; width: 50%; height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.right-panel-active .overlay-container { transform: translateX(-100%); }

.overlay {
    background: linear-gradient(to right, #1a1a1a, #e67e22);
    color: #FFFFFF;
    position: relative;
    left: -100%; height: 100%; width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.right-panel-active .overlay { transform: translateX(50%); }

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0; height: 100%; width: 50%;
}

.overlay-left { transform: translateX(-20%); }
.right-panel-active .overlay-left { transform: translateX(0); }
.overlay-right { right: 0; transform: translateX(0); }
.right-panel-active .overlay-right { transform: translateX(20%); }

/* --- 7. ELEMENTS COMMUNS --- */
button {
    border-radius: 20px;
    border: 1px solid #e67e22;
    background-color: #e67e22;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: bold;
    padding: 10px 35px;
    margin: 5px;
    text-transform: uppercase;
    cursor: pointer;
}

button.ghost { background-color: transparent; border-color: #FFFFFF; }

input:not([type="checkbox"]):not(#captcha-answer):not(#captcha-forgot-answer) {
    background-color: #eee;
    border: none;
    padding: 12px 15px;
    margin: 8px 0;
    width: 100%;
    border-radius: 5px;
}
.btn-cancel {
    background-color: #ccc;
    border-color: #ccc;
    color: black;
}
.btn-cancel:hover {
    background-color: #bbb;
}