/* auth.css */

/* --- Panneau d'authentification central --- */
.auth-panel {
    position: relative; /* Pour positionner le bouton retour */
    background-color: rgba(30, 20, 10, 0.85); /* Fond sombre semi-transparent */
    border: 2px solid #5a4a3a; /* Bordure stylisée */
    border-radius: 8px;
    padding: 30px 40px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 20; /* Pour qu'il soit au-dessus du fond */
    width: 400px; /* Largeur du panneau */
    max-width: 90%; /* S'adapte mieux sur petits écrans */
    text-align: center;
    color: #e0d0b0; /* Couleur de texte général */
}

/* --- Bouton Retour --- */
.back-button {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 25; /* Au-dessus du panneau */
}

.back-button img {
    width: 40px; /* Taille de l'icône de retour */
    height: auto;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.5)); /* Petite ombre pour le faire ressortir */
    transition: transform 0.2s ease-in-out;
}

.back-button:hover img {
    transform: scale(1.1);
}

/* --- Onglets (Se connecter / S'inscrire) --- */
.auth-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    gap: 10px;
}

.tab-button {
    background-color: #4a3a2a; /* Couleur de fond des onglets inactifs */
    color: #c0b0a0;
    border: 1px solid #6a5a4a;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.1em;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.tab-button:hover {
    background-color: #5a4a3a;
    color: #e0d0b0;
}

.tab-button.active {
    background-color: #7a6a5a; /* Couleur de fond de l'onglet actif */
    color: #fff;
    border-color: #9a8a7a;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

/* --- Formulaires --- */
.auth-form {
    display: none; /* Cache les formulaires par défaut */
    flex-direction: column;
    gap: 15px;
}

.auth-form.active {
    display: flex; /* Affiche le formulaire actif */
}

.form-title {
    font-family: 'Cinzel Decorative', serif;
    color: #f0e0c0;
    font-size: 2em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 3px rgba(0,0,0,0.6);
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #e0d0b0;
    font-size: 0.95em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: calc(100% - 20px); /* Prend toute la largeur moins le padding */
    padding: 10px;
    border: 1px solid #7a6a5a;
    background-color: #3a2a1a;
    color: #f0e0c0;
    border-radius: 4px;
    font-family: Arial, sans-serif; /* Police lisible pour les inputs */
    font-size: 1em;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: #a09080;
    box-shadow: 0 0 8px rgba(160, 144, 128, 0.4);
}

.submit-button {
    background-color: #d4af37; /* Couleur or/dorée pour le bouton de soumission */
    color: #3a2a1a;
    border: none;
    border-radius: 5px;
    padding: 12px 25px;
    margin-top: 20px;
    cursor: pointer;
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.2em;
    text-transform: uppercase;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.submit-button:hover {
    background-color: #e8c052;
    transform: translateY(-2px);
}