/* auth.css (Optimisé) */

/* --- 1. Conteneurs principaux --- */
/* Pas de changement ici, c'est déjà très bien. */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    background-color: var(--body-bg);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--shadow-medium);
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

/* --- 2. Éléments décoratifs --- */
/* Pas de changement, c'est bien isolé. */
.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 130px;
    background: url('../images/header_background_blured3.webp') center/cover no-repeat;
    opacity: 0.5;
    border-bottom: 1px solid var(--border-color);
    z-index: 1;
}

/* --- 3. Contenu et Typographie --- */
.auth-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    padding-bottom: 1rem;
}

.site-title {
    font-size: 2.2rem;
    font-weight: bold;
    letter-spacing: 1px;
    color: var(--white);
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.page-title {
    font-size: 1.5rem;
    color: var(--text-subtle);
    font-weight: normal;
    margin-top: 0;
    margin-bottom: 2.5rem;
}

/* NOUVEAU : Classe spécifique pour le texte d'introduction */
/* Remplace le sélecteur trop spécifique '.auth-container > .auth-content > p' */
.auth-prompt {
    color: var(--text-subtle);
    margin: -1rem auto 1.5rem; /* Ajustement des marges */
    max-width: 320px;
    line-height: 1.5;
}


/* --- 4. Formulaire --- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* OPTIMISATION : Regroupement de tous les inputs du formulaire */
/* On cible les inputs par leur type pour éviter de styliser les 'hidden' ou 'submit'. */
.auth-form input:is([type="text"], [type="email"], [type="password"]) {
    width: 100%;
    padding: 0.85rem 1rem;
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-form input::placeholder {
    color: var(--text-subtle);
    opacity: 0.8;
}

.auth-form input:is([type="text"], [type="email"], [type="password"]):focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(146, 22, 168, 0.25);
}

/* On centre le bouton via la classe du formulaire parent, plus besoin d'un sélecteur dédié */
.auth-form button[type="submit"] {
    margin-top: 0.5rem;
    width: auto;
    text-align: center;
    align-self: center;
}

.message {
    width: 100%;
    padding: 0.8rem 1rem;
    margin-top: 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
}

.message--error {
    background-color: rgba(255, 82, 82, 0.1);
    color: #ff8a8a;
    border: 1px solid rgba(255, 82, 82, 0.2);
}

.message--success {
    background-color: rgba(80, 200, 120, 0.1);
    color: #a4ffc5;
    border: 1px solid rgba(80, 200, 120, 0.2);
}

.auth-links-container {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-link {
    font-size: 0.9rem;
    color: var(--text-subtle);
}

.auth-link a {
    color: var(--purple);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .auth-link a:hover {
        color: #d1aaff;
        text-decoration: underline;
    }
}

@media (max-width: 480px) {
    .auth-content {
        padding: 2rem 1.5rem;
    }
    .site-title {
        font-size: 1.8rem;
    }
    .page-title {
        font-size: 1.3rem;
        margin-bottom: 2rem;
    }
}