/* Réinitialisation de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

html {
    width: 100%;
    height: 100%;
}

body {
    background-color: #121212;
    color: #e0e0e0;
    padding: 20px;
    width: 100%;
    height: 100%;
}

#view {
    width: 100%;
    height: 100%;
}

/*Style de la page de Login*/
#loginContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #1e1e1e;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    width: 450px;
    height: 450px;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#loginContainer h1 {
    margin-bottom: 35px; /* Increased spacing */
    color: #bb86fc;
    font-size: 2.3rem; /* Bigger title */
}

#loginContainer input {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    background: #333;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 1.1em; /* Bigger text inside input */
}

#loginContainer button {
    width: 100%;
    padding: 15px; /* Bigger text */
    background-color: #0000ff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px; /* Smaller spacing */
    margin-bottom: 10px; /* Smaller spacing */
    font-size: 1.2rem;
    font-weight: bold;
}

#loginContainer button:hover {
    background-color: #1e90ff;
}

#loginContainer p {
    font-size: 0.9em; /* Smaller text
    margin-top: 10px; /* Smaller spacing */
    color: #e0e0e0; /* Lighter text */
    text-align: center;
}

#loginContainer a {
    color: #bb86fc;
    text-decoration: none;
}

#loginContainer a:hover {
    text-decoration: underline;
}

/*Style de la page de Sign-In*/
#signInContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #1e1e1e;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    width: 450px;
    height: auto;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#signInContainer h2 {
    margin-bottom: 35px;
    color: #bb86fc;
    font-size: 2.3rem;
}

#usernameInput,
#passwordInput,
#teamSelect {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    background: #333;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 1.1em;
}

#teamSelect {
    margin: 0px;
}

#btnCreateUser {
    height: 50px; /* Match the height of the input and select */
    width: 100%;
    padding: 0 15px; /* Adjust padding for better alignment */
    background-color: #0000ff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
}

#btnCreateUser:hover {
    background-color: #1e90ff;
}

#teamSelectionZone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
    margin-bottom: 30px;
}

#btnCreateTeam {
    height: 50px; /* Match the height of the input and select */
    padding: 0 15px; /* Adjust padding for better alignment */
    background-color: #0000ff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1.2rem;
    font-weight: bold;
}

#btnCreateTeam:hover {
    background-color: #1e90ff;
}

#loginLink a {
    color: #bb86fc;
    text-decoration: none;
    margin-left: 5px; /* Remove space between links */
}

#loginLink a:hover {
    text-decoration: underline;
}

/*Style de la page administrateur*/
#adminPanel {
    width: 100%;
    height: 100%;
    margin: auto;
    background: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-areas:
        "deconnexion deconnexion"
        "gestionMatchs gestionReclamations";
    gap: 20px;
    align-items: start;
}

/* Déconnexion en haut à gauche */
#adminPanel a {
    grid-area: deconnexion;
    text-decoration: none;
    color: #bb86fc;
    font-weight: bold;
    margin-bottom: 15px;
    display: block;
}

h1 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

/* Layout principal */
#gestionMatchs {
    grid-area: gestionMatchs;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-right: 1px solid #333;
}

#creationMatch,
#modificationMatch {
    background: #2c2c2c;
    padding: 10px;
    margin-right: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* Conteneur principal */
#nouveauMatch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 20px;
}

/* Style pour la date */
.datePicker {
    flex: 1;
    min-width: 100px;
    max-width: 150px;
    padding: 10px;
    font-size: 1rem;
    background: #333;
    color: #e0e0e0;
    border: 1px solid #444;
}

#c_joueur1,
#c_joueur2 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#lstJoueursEquipe1,
#lstJoueursEquipe2 {
    background: #1e1e1e;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    color: #e0e0e0;
}

/* Style pour le sélecteur d'équipe */
.c_equipePicker {
    width: 200px;
    padding: 10px;
    font-size: 1rem;
    margin-bottom: 10px;
    background: #333;
    color: #e0e0e0;
    border: 1px solid #444;
}

/* Style pour le sélecteur des joueurs (équipes) */
.c_joueursEquipe {
    width: 200px;
    height: 120px;
    font-size: 1rem;
    margin-top: 10px;
    background: #333;
    color: #e0e0e0;
    border: 1px solid #444;
}

/* Style pour la div des joueurs */
.joueurMatch {
    width: 150px;
    text-align: center;
}

/* Style pour les inputs des points */
.inputPoints {
    width: 60px;
    padding: 8px;
    font-size: 1rem;
    text-align: center;
    background: #333;
    color: #e0e0e0;
    border: 1px solid #444;
}

/* Style du bouton "Ajouter" */
#btnAjoutMatch {
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #0000ff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#btnAjoutMatch:hover {
    background-color: #1e90ff;
}

hr {
    width: 100%;
    border: none;
    border-top: 1px solid #333;
    margin: 10px 0;
}

/* Conteneur principal */
#modificationMatch {
    background-color: #2c2c2c;
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    margin: 0 auto;
}

/* Titre */
#modificationMatch {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrage horizontal des éléments */
    background-color: #2c2c2c;
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    margin: 0 auto;
}

/* Conteneur pour les selects de filtrage et de match */
#m_match {
    display: flex;
    justify-content: center; /* Centre horizontalement tous les éléments */
    align-items: center; /* Centre verticalement les éléments (si besoin) */
    padding: 20px;
    border-radius: 8px;
    width: 100%; /* La largeur de votre conteneur */
    gap: 30px;
}

/* Style du filtre des matchs */
#filtreMatchPicker {
    flex: 1;
    background-color: #444;
    color: #fff;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #555;
    border-radius: 5px;
}

/* Style pour le select des matchs */
#matchSelect {
    flex: 2;
    background-color: #444;
    min-width: 150px;
    color: #fff;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #555;
    border-radius: 5px;
    height: 250px;
}

#matchSelect option {
    width: 100%;
    height: 50px;
    align-content: center;
    overflow-wrap: break-word;
}

/* Conteneur des infos du match */
#matchInfos {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre horizontalement les infos du match */
    background-color: #444;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #555;
    width: 100%;
    max-width: 550px;
    height: auto;
    gap: 15px; /* Ajout d'un peu d'espace entre les éléments à l'intérieur de #matchInfos */
}

/* Réduction de la taille des champs de points et des joueurs */
#matchInfos input[type="number"],
#matchInfos select {
    font-size: 14px; /* Réduire la taille du texte dans les champs */
    padding: 5px 10px; /* Espacement interne réduit */
    margin: 5px 0; /* Marge pour espacer les éléments */
}

/* Réduction de l'espacement entre le joueur, les points et le séparateur "-" */
#matchInfos div {
    display: flex;
    justify-content: space-between; /* Espace entre les éléments */
    align-items: center; /* Centrer verticalement les éléments */
    width: 100%;
    gap: 10px; /* Espacement plus réduit entre le joueur, les points et le séparateur */
}

/* Date du match */
#matchInfos .datePicker {
    background-color: #444;
    color: #fff;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #555;
    border-radius: 5px;
    width: 100%;
    margin-bottom: 20px;
}

#joueur_equipe1,
#joueur_equipe2 {
    width: 150px;
    text-align: center;
    background-color: #444;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
}

#m_input_points1,
#m_input_points2 {
    width: 60px;
    padding: 8px;
    font-size: 1rem;
    text-align: center;
    background-color: #444;
    color: #fff;
    border: 1px solid #555;
    border-radius: 5px;
}

/* Boutons Enregistrer et Supprimer */
#matchInfos > div:last-child {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

/* Ajustement des boutons spécifiques */
#btnEnregistrerMatch,
#btnSupprimerMatch {
    font-size: 14px; /* Réduit la taille des boutons */
    padding: 8px 16px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer; /* Change le curseur pour indiquer que c'est cliquable */
}

/* Couleur de fond pour "Enregistrer" */
#btnEnregistrerMatch {
    background-color: #4caf50; /* Vert */
}

/* Couleur de fond pour "Supprimer" */
#btnSupprimerMatch {
    background-color: #f44336; /* Rouge */
}

/* Effet hover pour les deux boutons */
#btnEnregistrerMatch:hover {
    background-color: #66bb6a; /* Vert clair lors du survol */
    cursor: pointer; /* Change le curseur en pointer */
}

#btnSupprimerMatch:hover {
    background-color: #ef5350; /* Rouge clair lors du survol */
    cursor: pointer; /* Change le curseur en pointer */
}

/* Notifications */
#gestionReclamations {
    grid-area: gestionReclamations;
    height: 100%;
    background: #2c2c2c;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    align-self: start;
}

#Reclamations {
    height: 80%;
    overflow-y: auto;
    border: 1px solid #444;
    padding: 10px;
    border-radius: 5px;
    background: #1e1e1e;
    overflow-y: scroll;
}

.reclamation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border: 2px solid #333;
}

.messageReclamation {
    flex-grow: 1;
    margin: 0 10px;
    background: #333;
    padding: 5px 10px;
    max-height: 75px;
    border-radius: 5px;
    overflow-y: scroll;
}

.btnValidation {
    background: #218838;
    margin-left: 5px;
    padding: 5px 10px;
    border-radius: 5px;
}

.btnValidation:hover {
    background: #1e7e34;
    cursor: pointer;
}

.btnRefus {
    background: #a94442;
    margin-left: 5px;
    padding: 5px 10px;
    border-radius: 5px;
}

.btnRefus:hover {
    background: #8a2c2b;
    cursor: pointer;
}

/*Style de la page du User*/
#userPanel {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    margin: 20px auto;
}

/* Lien Déconnexion */
#userPanel a {
    align-self: flex-start;
    color: #bb86fc;
    text-decoration: none;
    margin-bottom: 20px;
}

#userPanel a:hover {
    text-decoration: underline;
}

/* Panel contenant les infos joueur et la section réclamation */
#panel {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    gap: 40px;
}

/* Section Infos Joueur */
#infosJoueur {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Panel des matchs */
#panelMatchs {
    background-color: #2c2c2c;
    padding: 20px;
    border-radius: 8px;
}

#panelMatchs h1 {
    margin-bottom: 15px;
    text-align: center; /* Center the title */
}

#panelMatchs > div {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center; /* Center the select and matchInfos horizontally */
}

#matchJoueurSelect {
    background-color: #1e1e1e; /* Darker select */
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 10px;
}

/* Section Stats */
#stats {
    background-color: #2c2c2c;
    padding: 20px;
    border-radius: 8px;
}

#stats h1 {
    text-align: center; /* Center the title */
    margin-bottom: 20px; /* Add space between the title and the text */
}

#stats > div {
    display: flex;
    justify-content: space-around;
    gap: 20px; /* Reduce the gap between the two sections */
}

#statsJoueur,
#statsEquipe {
    flex: 1;
    background-color: #3a3a3a;
    padding: 15px;
    border-radius: 8px;
    min-width: 265px;
    max-width: 300px; /* Make the sections less wide */
}

/* Section Réclamations */
#reclamation_joueur {
    width: 300px;
    padding: 20px;
    background-color: #2c2c2c;
    border-radius: 8px;
}

#reclamation_joueur h1 {
    text-align: center; /* Center the title */
}

#txtMessage {
    width: 100%;
    height: 100px;
    background-color: #3a3a3a;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
}

#btnEnvoyerReclamation {
    width: 100%;
    padding: 10px;
    background-color: #008000;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

#btnEnvoyerReclamation:hover {
    background-color: #00b300;
}
