/**
 * Styles pour les pages d'authentification
 * Login, Register, Forgot Password, Reset Password
 */

/* Container principal split en deux */
.auth-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ===== PARTIE GAUCHE - VISUEL ===== */

/* Partie gauche avec le gradient bleu (50%) */
.auth-visual {
    position: relative;
    width: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Conteneur du logo */
.auth-visual__content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Le SVG prend toute la largeur disponible */
.auth-visual__content svg {
    width: 100%;
    height: auto;
    max-height: 100vh;
    display: block;
}

/* ===== PARTIE DROITE - FORMULAIRE ===== */

/* Partie droite avec le formulaire (50%) */
.auth-form-container {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    padding: var(--spacing-2xl);
}

.auth-form {
    width: 100%;
    max-width: 450px;
}

/* Titre principal - 40px */
.auth-form__title {
    font-family: var(--font-secondary);
    font-size: 40px;
    font-weight: var(--font-weight-regular);
    color: var(--color-black);
    margin-bottom: var(--spacing-sm);
    line-height: var(--line-height-tight);
}

/* Pour mettre "sam²" en font-weight normal */
.auth-form__title strong {
    font-weight: var(--font-weight-light);
}

/* Sous-titre - 18px */
.auth-form__subtitle {
    font-family: var(--font-primary);
    font-size: 18px;
    color: var(--color-gray-dark);
    margin-bottom: var(--spacing-2xl);
    line-height: var(--line-height-normal);
}

/* ===== ALERTES / MESSAGES FLASH ===== */

.auth-form__alert {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
}

.auth-form__alert--error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.auth-form__alert--success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ===== FORMULAIRE ===== */

.auth-form__form {
    width: 100%;
}

/* Groupe de champ */
.auth-form__group {
    margin-bottom: var(--spacing-lg);
}

/* Label (caché car on utilise les placeholders) */
.auth-form__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Input - Utilise le composant .input */
.auth-form__input {
    /* Le composant .input gère les styles de base */
}

/* Helper text - Utilise le composant .input-help */
.auth-form__help {
    /* Le composant .input-help gère les styles de base */
}

/* ===== OPTIONS (Remember me + Forgot password) ===== */

.auth-form__options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-xl);
}

/* Checkbox remember me */
.auth-form__checkbox {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.auth-form__checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-black);
}

/* Checkbox label - 18px */
.auth-form__checkbox label {
    font-family: var(--font-primary);
    font-size: 18px;
    color: var(--color-black);
    cursor: pointer;
    user-select: none;
    margin: 0;
}

/* ===== BOUTON ===== */

/* ===== LIEN RETOUR ACCUEIL ===== */

.auth-form__back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    color: var(--color-gray-dark);
    text-decoration: none;
    margin-bottom: var(--spacing-lg);
    transition: color 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form__back-link:hover {
    color: var(--color-primary);
}

.auth-form__back-link svg {
    width: 16px;
    height: 16px;
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form__back-link:hover svg {
    transform: translateX(-2px);
}

/* ===== LIENS (Footer) ===== */

/* Container pour les liens d'authentification */
.auth-form__links {
    margin-top: var(--spacing-xl);
    text-align: center;
}

/* ===== RESPONSIVE ===== */

/* Tablette et mobile - Layout vertical */
@media (max-width: 968px) {
    .auth-container {
        flex-direction: column;
    }

    .auth-visual,
    .auth-form-container {
        width: 100%;
    }

    /* Logo en haut sur mobile/tablette */
    .auth-visual {
        min-height: 250px;
        max-height: 30vh;
    }

    .auth-visual__content {
        padding: var(--spacing-md);
    }

    .auth-visual__content svg {
        width: 80%;
        max-height: 25vh;
    }

    /* Formulaire adapté */
    .auth-form-container {
        padding: var(--spacing-xl) var(--spacing-lg);
        min-height: 70vh;
    }

    .auth-form {
        max-width: 500px;
    }

    .auth-form__title {
        font-size: 32px;
    }

    .auth-form__subtitle {
        font-size: 16px;
    }
}

/* Mobile uniquement */
@media (max-width: 640px) {
    /* Logo encore plus petit sur petit mobile */
    .auth-visual {
        min-height: 200px;
        max-height: 25vh;
    }

    .auth-visual__content svg {
        width: 70%;
        max-height: 20vh;
    }

    /* Formulaire mobile */
    .auth-form-container {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .auth-form__title {
        font-size: 28px;
    }

    .auth-form__subtitle {
        font-size: 14px;
        margin-bottom: var(--spacing-lg);
    }

    /* Inputs et boutons adaptés */
    .auth-form__group {
        margin-bottom: var(--spacing-md);
    }

    .auth-form__input {
        font-size: 16px;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .auth-form__button {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: 16px;
    }

    /* Options en colonne sur mobile */
    .auth-form__options {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-lg);
    }

    .auth-form__checkbox label,
    .auth-form__link,
    .auth-form__links {
        font-size: 14px;
    }

    .auth-form__links {
        margin-top: var(--spacing-lg);
    }
}
