/* ==========================================================================
   VARIABLES & CONFIGURATION GLOBALE
   ========================================================================== */
:root {
    --bg-main: #faf8f5;
    --bg-dark: #111111;
    --text-main: #1e1e1e;
    --text-muted: #626262;
    --accent-color: #2ed573;
    --accent-hover: #26b962;
    --border-subtle: rgba(0, 0, 0, 0.08);
    --transition-subtle: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Empêche le scroll sur toute la page */
    height: 100vh;
}

/* ==========================================================================
   CONTENEUR PRINCIPAL DE SÉPARATION (SPLIT SCREEN)
   ========================================================================== */
.auth-container {
    display: flex;
    height: 100vh;
    width: 100%;
    background-color: #ffffff;
    overflow: hidden;
}

/* --- Côté Formulaire --- */
.auth-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 8%;
    max-width: 650px;
    background-color: #ffffff;
    height: 100vh;
    overflow-y: auto; /* Permet le scroll interne uniquement si l'écran est minuscule */
}

/* --- Côté Image d'illustration --- */
.auth-image-side {
    flex: 1.2;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px;
}

@media screen and (max-width: 1024px) {
    .auth-image-side {
        display: none; /* Cache l'image sur tablette et mobile */
    }
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

.image-quote {
    position: relative;
    z-index: 2;
    color: #ffffff;
    max-width: 500px;
}

.image-quote h2 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.image-quote p {
    font-size: 15px;
    opacity: 0.8;
}

/* ==========================================================================
   ÉLÉMENTS DU FORMULAIRE & TYPOGRAPHIE
   ========================================================================== */
.auth-header {
    margin-bottom: 32px;
}

.auth-header .logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 24px;
}

.auth-header .logo a {
    text-decoration: none;
    color: var(--bg-dark);
}

.auth-header .logo span {
    color: var(--accent-color);
}

.auth-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--bg-dark);
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 15px;
}

/* --- Formulaire et Inputs --- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 16px;
}

@media screen and (max-width: 480px) {
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--bg-dark);
}

.input-wrapper {
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: var(--transition-subtle);
}

.input-wrapper input {
    padding-left: 44px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--bg-dark);
    background-color: #ffffff;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

/* --- Bouton d'action et Checkbox --- */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-checkmark {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 18px;
    width: 18px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    transition: var(--transition-subtle);
}

.checkbox-container:hover input ~ .checkbox-checkmark {
    border-color: var(--text-muted);
}

.checkbox-container input:checked ~ .checkbox-checkmark {
    background-color: var(--bg-dark);
    border-color: var(--bg-dark);
}

.checkbox-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkbox-checkmark:after {
    display: block;
}

.btn-auth-submit {
    background-color: var(--bg-dark);
    color: #ffffff;
    border: none;
    padding: 16px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-subtle);
    width: 100%;
}

.btn-auth-submit:hover {
    opacity: 0.9;
}

/* --- Alertes d'erreur / succès --- */
.auth-alert {
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background-color: #ffeef0;
    color: #f83b5a;
}

.alert-success {
    background-color: #e6f9ed;
    color: #2ed573;
}

.alert-success a {
    color: #1b9e50;
    text-decoration: underline;
    font-weight: 700;
}

/* --- Pied de page du formulaire --- */
.auth-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--bg-dark);
    font-weight: 700;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}