/* Global Styles */
body, html {
    color: #415d78;
    background-image: url('bg.png');
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    height: 100%;
}

#main-container {
    height: calc(100vh - 140px); /* Ajustement pour que le contenu principal occupe le reste de la hauteur de la fenêtre */
    position: sticky;
    margin-top: 140px; /* Ajustez selon la hauteur de la bannière */
    z-index: 2; /* Assurez-vous qu'il reste au-dessus du contenu défilant */
    overflow-y: auto;
    background-color: #ffffff00;
    display: flex;
    width: 100%; /* Assurez-vous que le conteneur prend toute la largeur */
    box-sizing: border-box; /* Inclut padding et border dans la hauteur et largeur */
}

/* Profile Popup Styles */
.profile-popup {
    display: none; /* Masque initialement le popup */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 100%;
    overflow-y: auto;
    max-height: 100%;
    z-index: 1000;
}

.profile-popup .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #f44336;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    z-index: 1001;
}

.profile-popup .close-button:hover {
    background-color: #d32f2f;
}

/* Highlight Styles */
.highlight {
    background-color: yellow;
}

/* Pseudonyme Cell Styles */
.pseudonyme-cell {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.pseudonyme-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.25;
}

.pseudonyme-content {
    margin-left: 10px;
    font-size: larger;
    font-weight: bold;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff; /* Couleur du contour (ici noir) */
    position: relative;
}

/* Tooltip Styles */
.tooltip {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    width: 300px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.pseudonyme-cell:hover .tooltip {
    display: block;
}

/* Profile Container Styles */
.profile-container {
    background-color: #7996ad;
    width: 50%;
    max-width: 50%;
    height: 100%;
    max-height: 100%;
    margin: 20px auto;
    padding: 5px;
    border: 1px solid #000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: -2;
}

.profile-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin-right: 10px;
    background-size: cover;
    background-position: center;
}

/* Profile Header Styles */
.profile-header {      
    width: 100%;
    margin: 0px;
    padding: 0px;
    display: flex;
    align-items: center;
}

.profile-avatar {
    width: 45px;
    height: 45px;
    border-radius: 5px;
    border: 1px solid #000;
    background-size: cover;
}

.profile-gavatar {
    width: 240px;
    height: 320px;
    margin-right: 10px;
    border-radius: 5px;
    border: 1px solid #000;
    background-size: cover;
    background-position: center;
    float: left;
}

.profile-info {      
    width: 100%;
    max-width: 100%;
    background-color: #dfe9f1;
    padding-left: 10px;
    margin-left: 10px;
    border-radius: 5px;
}

.profile-info h1 {
    margin: 0;
    font-size: 24px;
}

.profile-info p {
    margin: 0px 0;
}

.profile-section {
    background-color: #dfe9f1;
    padding: 5px;
    border-radius: 5px;
    margin-bottom: 10px;
}

h1 {
    font-size: 18px;

    margin-bottom: 5px;
    margin-top: 0;
}  

h2 {
    font-family: Arial, sans-serif;
    color: #fff;
    font-size: 18px;
    background-color: #415d78;
    padding-left: 10px;
    padding-top: 5px;
    padding-bottom: 5px;
    border-radius: 5px;
    margin-bottom: 5px;
    margin-top: 0;
}

.profile-section p {
    margin: 5px 0;
}

.profile-summary {
    margin: 0px 0px 0px 0px;
    display: inline-block;
}

.profile-summary img {
    border: 1px solid #000;
    float: left;
    margin-right: 5px;
}
.profile-summary p {
    margin: 0px 0;
}

#profilmaj {

    background-color: #ffffff;
    padding: 10px;
    display: flex;
    flex-wrap: nowrap; /* Empêche les divs de sauter à la ligne */
    overflow-x: auto; /* Ajoute une barre de défilement horizontale si le contenu dépasse */
    white-space: nowrap; /* Empêche les éléments de sauter à la ligne */
    gap: 70px; /* Optionnel: ajoute de l'espace entre les éléments */
    margin-bottom: 10px;
}

.deuxcol {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: nowrap;
    padding-top: 10px;
    height: auto;
    box-sizing: border-box; /* Inclut padding et border dans la hauteur et largeur */
}

.deuxcolG {
    flex: 1;
    padding-right: 10px;
    min-width: 0;
    height: auto;
    overflow-y: auto; /* Ajoute une barre de défilement verticale si le contenu dépasse */
}

.deuxcolD {
    width: 30%;
    padding: 0px;
    min-width: 0;
    height: auto;
    overflow-y: auto; /* Ajoute une barre de défilement verticale si le contenu dépasse */
}




/* Close Button Styles */
.close-button {
    position: absolute;
    top: 10px;
    right: 50%;
    padding: 5px 10px;
    background-color: #f44336;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.close-button:hover {
    background-color: #d32f2f;
}

/* Bulle Styles */
#bulle {
    background-color: #ffffff;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 5px;
}

#bulle1 {
    background-color: #b1c6d6;
    padding: 10px;
    border-radius: 5px;
}

#bulle2 {
    display: flex;
    align-items: center; /* Alignement vertical des éléments */
    background-color: #da9191;
    color: #7c4545;
    padding: 10px;
    margin-bottom: 10px;
    margin-top: 10px;
    border-radius: 5px;
}

#bulle3 {
    display: flex;
    align-items: center; /* Alignement vertical des éléments */
    background-color: #a2da91;
    color: #4e7c45;
    padding: 10px;
    margin-bottom: 10px;
    margin-top: 10px;
    border-radius: 5px;
}

/* Sidebar Styles */
#sidebar {
    position: fixed;
    top: 100px; /* Ajustez cette valeur selon la hauteur de votre bannière */
    left: 0;
    width: 100%;
    height: 18px; /* Ajustez la hauteur en fonction de la bannière */
    z-index: 5;
    font-style: bold;
    background-color: #415d78;
    color: #415d78;
    margin: 0px;
    padding: 10px;
    border-bottom: 1px solid black; /* Ajoute une bordure noire de 3px en bas */
}

#sidebar h2 {
    margin: 0px;
    padding: 0px;
}

#sidebar ul {
    font-style: bold;
    justify-content: center; /* Centre horizontalement le contenu si nécessaire */
    list-style: none;
    margin: 0px;
    padding: 0px;
    display: flex;
    flex-wrap: wrap; /* Pour permettre de passer à la ligne suivante si nécessaire */
}

#sidebar ul li {
    margin-top: 0;
}

#sidebar ul li a {
    font-size: small;
    color: #a0bdd4;
    text-decoration: none;
    padding: 5px;
    background-color: #476581; /* Couleur de fond des liens */
    border-radius: 5px;
    transition: background-color 0.3s;
    margin-left: 5px; /* Espace entre les éléments */
}

#sidebar ul li a:hover {
    color: #476581;
    font-style: bold;
    background-color: #a0bdd4; /* Couleur de fond au survol */
}


/* Content Styles */
#content {
    font-size: small;
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
}

/* Table Styles */
#tableMembres, #tablePersonnages {
    width: 100%; /* Utilisation de la largeur complète */
    border-collapse: collapse;
    text-align: left;
}

#tableMembres td.description {
    width: 250px; /* or any width that suits your layout */
    word-wrap: break-word; /* Breaks long words to prevent overflow */
    max-width: 250px; /* Ensures the cell does not grow beyond the width */
}

#tableMembres th, #tableMembres td, 
#tablePersonnages th, #tablePersonnages td {
    padding: 5px; /* Augmentation de l'espacement pour une meilleure lisibilité */
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
}

#tableMembres thead th {
    position: sticky;
    top: 0px; /* Peut être ajusté en fonction d'un padding ou d'une autre structure de l'en-tête */
    background-color: #7996ad;
    color: #ffffff;
    z-index: 1; /* S'assure que l'en-tête reste au-dessus du contenu lors du défilement */
}

#tableMembres thead th, #tablePersonnages thead th {
    background-color: #7996ad;
    color: #ffffff;
    margin: 2px;
    padding : 10px;
    border-radius: 5px;
    cursor: pointer;
}

#tableMembres thead th a, #tablePersonnages thead th a {
    color: #ffffff;
    text-decoration: none;
}

#tableMembres thead th a:hover, #tablePersonnages thead th a:hover {
    text-decoration: underline;
}

#tableMembres td a {
    font-size: small;
    color: #476581 !important;
}

#tableMembres td a:hover {
    font-size: small;
    color: #476581 !important;
    text-decoration: none;
}

#tableMembres tbody td, #tablePersonnages tbody td {
    background-color: #ffffff;
    color: #415d78;
}

#tableMembres tbody tr:nth-child(even) td, 
#tablePersonnages tbody tr:nth-child(even) td {
    background-color: #dfe9f1;
}

.pagination {
    display: flex;
    justify-content: right;
    float:right;
    margin-top: 10px;
    margin-bottom: 10px;
}

.pagination a {
    background-color: #fff !important;
    margin: 2px;
    padding: 2px;
    text-decoration: none;
    color: #415d78 !important; /* Utilisation de !important pour surcharger les autres styles */
    border-radius: 5px;
}

.pagination a.active {
    background-color: #415d78 !important;
    color: white !important;
    border: 1px solid #000 !important;
}

.pagination a:hover:not(.active) {
    color: white !important;
    background-color: #7996ad !important;
}


/* Form Styles */
form {
    margin-bottom: 20px;
}

input[type="text"], button {
    padding: 10px;
    background-color: #ffffff; /* Utilisez la couleur d'en-tête des tableaux */
    border: 1px solid #000000; /* Bordure subtile */
}

button {
    background-color: #7996ad; /* Utilisez la couleur d'en-tête des tableaux */
    color: white;
    cursor: pointer; /* Curseur main pour le bouton */
}

button:hover {
    background-color: #7996ad; /* Assombrir au survol */
}

/* Profiles Container Styles */
#profiles-container {
    display: flex;          /* Active Flexbox */
    flex-wrap: wrap;        /* Permet aux éléments de passer à la ligne suivante si nécessaire */
    justify-content: flex-start; /* Alignement horizontal au début du conteneur */
    align-items: stretch;   /* Étire les éléments pour qu'ils aient la même hauteur */
    gap: 20px;              /* Espace entre les éléments */
}

.profile-result {
    font-size: small;
    flex: 0 0 300px;        /* Chaque div prendra une base de 300px et grandira si possible */
    background-color: #7996ad;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);  /* Optionnel: ajoute de l'ombre pour le style */
}

.profile-result .profile-content {
    background-color: #7995add8;
    position: relative;
    padding: 20px;
    padding-left: 75px; /* Décalage pour le texte pour ne pas superposer l'image */
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.profile-header .small-avatar {
    width: 50px;
    height: 50px;
    border: 1px solid #000; /* Bordure noire de 1px */
    border-radius: 5px;     /* Rayon de la bordure de 1px */
    margin-right: 250px;
    position: absolute; /* Position absolue pour le petit avatar */
    top: 10px;
    left: 10px;
}

.profile-header .clan-avatar {
    width: 50px;
    height: 50px;
    border: 1px solid #000; /* Bordure noire de 1px */
    border-radius: 5px;     /* Rayon de la bordure de 1px */
    margin-right: 250px;
    position: absolute; /* Position absolue pour le petit avatar */
    bottom: 10px;
    left: 10px;
}

.profile-header h2 {
    font-size: 18px;
    color: #415d78; /* Couleur du texte pour le pseudonyme */
    margin: 0;
}

.profile-header .pseudo {
    color: #415d78;
}

.profile-header .id {
    color: #2a3b52; /* Couleur différente pour l'ID */
}

.profile-result p {
    background-color: #ffffff7e; /* Fond clair pour le texte */
    margin: 5px 0;
    padding: 5px;
}

.profile-result p:nth-child(odd) {
    background-color: #dfe9f185; /* Fond alterné pour les lignes */
}

/* Grid Styles */
#grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    text-align: left;
    margin-right: 30%; /* ajustez selon la largeur de votre sidebar des commentaires */
}

.grid-item {
    position: relative;
    margin: 0px;
    cursor: pointer;
}

.grid-item img {   
    border: 1px solid #000; /* Bordure noire de 1px */
    width: 36px;
    height: 36px;
    vertical-align: bottom; /* Aligner l'image en bas pour éviter l'espace sous l'image */
}

.grid-item:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Tooltip Styles */

.tooltip {
    visibility: hidden;
    position: absolute;
    width: 200px;
    background-color: #7996ad;
    color: white;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    z-index: 100;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    transition: visibility 0.2s, opacity 0.2s ease-in-out;
}

.tooltip2 {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #7996ad;
    border: 1px solid #000;
    border-radius: 5px;
    padding: 10px;
    z-index: 2000;
    white-space: normal;
    width: 400px; /* Définir une largeur pour la tooltip */
    word-wrap: break-word; /* Permettre la rupture des mots longs */
    word-break: break-all; /* Permettre la rupture des mots longs */
}

.tooltip img {
    width: 36px;
    height: 36px;
}

.tooltip-text {
    margin-top: 5px;
}

.tooltip2 img {
    display: block;
    float: left;
    margin: 10px;
}

.tooltip2-text {
    text-align: center;
    word-wrap: break-word; /* Breaks long words to prevent overflow */
}

/* Comments List Styles */
#comments-list {
    position: fixed;
    right: 0;
    top: 0;
    width: 20%;
    height: 100%;
    overflow-y: auto;
    background: #dfe9f1;
    padding: 20px;
}

.comment-item {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

/* Avatar Styles */
.avatar {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.avatar:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Banner Styles */
#banner  {
    position: fixed;
    top: 0;
    z-index: 10; /* Assurez-vous qu'elle reste au-dessus des autres éléments */
    height: 100px;
    width: 100%;
    background-image: url('banniere2.png'), url('banniere.png');
    background-repeat: no-repeat, no-repeat;
    background-position: left center, right center;
    background-color: #7996ad; /* Couleur de fond entre les images ou si les images ne couvrent pas toute la div */
    display: flex; /* Utilise flexbox pour faciliter le centrage */
    align-items: center; /* Centre verticalement le contenu à l'intérieur de la bannière */
    justify-content: center; /* Centre horizontalement le contenu si nécessaire */
    border-bottom: 1px solid black; /* Ajoute une bordure noire de 3px en bas */
}

#banner img {
    height: 75px; /* Assure que le logo a une hauteur de 100px */
    width: auto; /* La largeur est ajustée automatiquement */
    margin-left: 0; /* Aucune marge à gauche */
}

/* Avatar Group Styles */
.avatar-group {
    margin-bottom: 20px;
}

.avatar-group h3 {
    margin-top: 0;
}

.avatar-group label {
    cursor: pointer;
    margin-right: 10px;
}

.avatar-group label img {
    border: 2px solid transparent;
}

.avatar-group label img:hover,
.avatar-group label input[type="radio"]:checked + img {
    border-color: blue;
}

/* Avatar Selection Styles */
.avatar-selection {
    background-color: #a0bdd4; /* Couleur de fond entre les images ou si les images ne couvrent pas toute la div */
    display: flex;
    align-items: center;
    text-align: center;
    padding: 10px;
    margin-bottom: 20px;
    margin-right: 25%;
    border-radius: 5px;
}

.avatar-selection textarea {
    flex-grow: 1;  /* Permet au textarea de prendre tout l'espace disponible */
    margin: 0 10px; /* Ajoute un peu de marge des deux côtés pour éviter que le texte touche directement les bords */
    border: 1px solid #000; /* Optionnel: définit une bordure pour le textarea */
    resize: none; /* Empêche le redimensionnement du textarea */
}

.avatar-selection select {
    margin-right: 10px;
}

/* Timer Styles */
#timer {
    font-size: larger;
    font-weight: bold; /* Ajoute du gras au texte */
    margin-left: 10px; /* Ajoute un peu d'espace entre le texte et le timer */
}
