/* style.css */

/* Réinitialisation de base et police globale */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Prend toute la hauteur de l'écran */
}


/* Le conteneur centré pour notre formulaire */
.container {
    background-color: #ffffff;
    padding: 2rem 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px; /* Largeur maximale du formulaire */

}
 

h2 {
    color: #1c1e21;
    margin-bottom: 1.5rem;
}

h3 {
    color: #1c1e21;
    margin-bottom: 1.5rem;
	text-align: center;
}

/* Style des champs du formulaire */
.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Règle corrigée */
input[type="text"],
input[type="password"],
input[type="email"] { /* MODIFICATION ICI */
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    box-sizing: border-box; /* Assure que le padding n'augmente pas la largeur */
}

input:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

/* Style du bouton */
.btn {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    background-color: #1877f2;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #166fe5;
}

/* Lien pour l'inscription */
.register-link {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.register-link a {
    color: #1877f2;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Message d'erreur */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

/* Ajouter ceci à la fin de votre fichier style.css */

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    text-align: center;
}

.success-message a {
    color: #155724;
    font-weight: bold;
}

/* NOUVEAUX STYLES POUR LES ÉTOILES DE DIFFICULTÉ */
    .difficulty {
        display: flex; /* Aligner "Difficulté :" et les étoiles sur la même ligne */
        align-items: center;
        gap: 0.5rem; /* Espace entre le texte et les étoiles */
    }
    .difficulty-stars {
        font-size: 1.2rem; /* Rendre les étoiles un peu plus grandes */
        line-height: 1; /* Empêcher une hauteur de ligne trop grande */
    }
    .star-empty {
        color: #ccc; /* Couleur grise pour les étoiles vides */
    }
    /* On utilise les classes existantes pour colorer les étoiles pleines ! */
    .difficulty.Facile .star-filled {
        color: #28a745; /* Vert */
    }
    .difficulty.Moyen .star-filled {
        color: #fd7e14; /* Orange */
    }
    .difficulty.Difficile .star-filled {
        color: #dc3545; /* Rouge */
    }

.category-title {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #1877f2;
    color: #1c1e21;
    font-size: 1.5rem;
}

.category-title:first-child {
    margin-top: 1rem;
}

/* Le div qui groupe les quiz d'une même catégorie */
.category-group {
    /* Vous pouvez ajouter un style si vous le souhaitez, comme une bordure */
}

/* Conteneur principal pour organiser la page en colonne */
        .page-wrapper {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 1rem; /* Espace entre le bloc de connexion et le classement */
            width: 100%;
            /*padding: 2rem 1rem;*/
        }
        /* Ajustement du body pour accommoder le page-wrapper */
        body {
            align-items: flex-start; /* On n'aligne plus au centre verticalement */
            padding-top: 1rem;
        }
        /* Conteneur pour le classement */
        .leaderboard-container {
            background-color: #ffffff;
            padding: 2rem 2.5rem;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 400px;
            text-align: left;
        }
        .leaderboard-container h2 {
            text-align: center;
            color: #1c1e21;
            margin-top: 0;
            margin-bottom: 1.5rem;
        }
        /* Liste ordonnée pour le classement */
        .leaderboard-list {
            list-style: none;
            padding-left: 0;
            counter-reset: leaderboard-counter; /* Initialise notre compteur personnalisé */
        }
        .leaderboard-list li {
            counter-increment: leaderboard-counter; /* Incrémente le compteur pour chaque li */
            display: flex;
            align-items: center;
            padding: 0.75rem 0;
            border-bottom: 1px solid #f0f2f5;
        }
        .leaderboard-list li:last-child {
            border-bottom: none;
        }
        /* Style pour le numéro du classement */
        .leaderboard-list li::before {
            content: counter(leaderboard-counter);
            font-weight: bold;
            font-size: 1.2rem;
            color: #1877f2;
            min-width: 2rem; /* Espace pour le numéro */
            text-align: center;
            margin-right: 1rem;
        }
        .player-info {
            flex-grow: 1;
            display: flex;
            justify-content: space-between;
            align-items: baseline;
        }
        .player-name {
            font-weight: 600;
        }
        .player-score {
            font-size: 0.9rem;
            color: #606770;
        }
        .player-score strong {
            color: #333;
        }
		
/* Style de base pour tous les badges de niveau */
.player-level-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.9em;
    font-weight: 500;
    margin-top: 8px;
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
}

/* Couleurs spécifiques pour chaque niveau */
.player-level-badge.level-debutant {
    background-color: #dc3545; /* Rouge */
}
.player-level-badge.level-en-progres {
    background-color: #fd7e14; /* Orange */
}
.player-level-badge.level-bon {
    background-color: #1877f2; /* Bleu */
}
.player-level-badge.level-tres-bon {
    background-color: #28a745; /* Vert */
}
.player-level-badge.level-expert {
    background-image: linear-gradient(45deg, #f09819 0%, #ff512f 100%); /* Dégradé "doré" */
    font-weight: bold;
}
