.auth-layout {
    width: min(460px, 92%);
    margin: auto;
    padding: 3.2rem;
    border-radius: 1.6rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(145deg, rgba(65, 65, 253, 0.25), rgba(255, 62, 194, 0.18));
    box-shadow: 0 1.4rem 3.2rem rgba(0, 0, 0, 0.35);
}

.auth-layout h1 {
    margin-bottom: 2rem;
    font-size: 2.4rem;
}

.auth-form {
    display: grid;
    gap: 1.3rem;
}

.auth-form label {
    font-size: 1.4rem;
    font-weight: 500;
}

.auth-form input {
    width: 100%;
    padding: 1rem 1.2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text);
}

.auth-form button {
    margin-top: 0.8rem;
    padding: 1rem 2rem;
    border: 1.5px solid var(--rose-primaire);
    border-radius: 1rem;
    font-weight: 700;
    color: var(--text);
    background: var(--bleu-fond);
    box-shadow: var(--rose-primaire) 0px 4px 15px;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}

.auth-form button:hover {
    background: var(--rose-primaire);
    color: var(--bleu-fond);
    transform: translateY(-2px);
}

.auth-message {
    margin-bottom: 1.2rem;
    padding: 1rem 1.2rem;
    border-radius: 0.8rem;
    font-size: 1.4rem;
}

.auth-error {
    background: rgba(255, 62, 194, 0.15);
    border: 1px solid var(--rose-primaire);
}

.auth-success {
    background: rgba(65, 65, 253, 0.2);
    border: 1px solid var(--bleu-fond);
}

/* 🎀 Conteneur pour afficher la mascotte à côté du message d'erreur 🎀 */
.error-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    max-width: 100%;
}

/* 🎀 Le message d'erreur prend tout l'espace disponible 🎀 */
.error-container .auth-message {
    flex: 1;
    margin-bottom: 0;
    min-width: 0;
}

/* 🎀 Style de la mascotte dans le message d'erreur - très petite 🎀 */
.error-mascotte {
    width: 10rem;
    height:10rem;
    min-width: 10rem;
    min-height: 10rem;
    max-width: 10rem;
    max-height: 10rem;
    object-fit: contain;
    flex-shrink: 0;
}

.auth-text {
    margin-top: 1.4rem;
    font-size: 1.4rem;
}

.auth-text a {
    color: var(--rose-secondaire);
}

.auth-back {
    margin-top: 1.6rem;
    display: inline-block;
    color: var(--text);
}

@media (max-width: 780px) {
    .auth-layout {
        width: min(94%, 52rem);
        padding: 2.2rem 1.6rem;
        border-radius: 1.2rem;
    }

    .auth-layout h1 {
        font-size: 2rem;
    }

    .auth-message {
        font-size: 1.3rem;
    }

    .error-container {
        align-items: flex-start;
    }

    .error-mascotte {
        width: 4rem;
        height: 4rem;
        min-width: 4rem;
        min-height: 4rem;
        max-width: 4rem;
        max-height: 4rem;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    nav {
        width: 100%;
        justify-content: space-between;
    }

    nav ul {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .auth-layout {
        width: 94%;
        padding: 1.8rem 1.2rem;
    }

    .auth-form {
        gap: 1rem;
    }

    .auth-form input,
    .auth-form button {
        padding: 0.9rem 1rem;
    }

    .auth-message {
        padding: 0.8rem 1rem;
    }

    .error-container {
        gap: 0.6rem;
    }

    .error-mascotte {
        width: 3rem;
        height: 3rem;
        min-width: 3rem;
        min-height: 3rem;
        max-width: 3rem;
        max-height: 3rem;
    }
}
