/* === RESET et correction hauteur sans scroll === */
html, body {
  margin: 0;
  padding: 0;
  /* overflow: hidden; /* Empêche tout scroll vertical */
  overflow-x: hidden;
  overflow-y: auto;

  height: 100%;
  max-width: 100vw;   /* Empêche la largeur > fenêtre */
  overflow-x: hidden; /* Empêche le scroll horizontal */
}

body {
  font-family: Arial, "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", sans-serif;
  /* background-image: url(https://maevakonnect.fr/src/img/359059.jpg); */
  /* background-image: url(https://zupimages.net/up/25/39/utx0.jpg); */
  background-color: #323339;
  color: #fff;
  display: flex;
  flex-direction: column;
}

/*==== scrollbar ====*/
::-webkit-scrollbar {
  width: 12px; /* Légèrement plus large pour une meilleure visibilité */
  border-radius: 8px; /* Ajoute une petite courbure à la scrollbar */
}

::-webkit-scrollbar-track {
  background: #111;
  border-radius: 8px; /* Arrondi également la track */
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, rgba(251, 0, 255, 1), rgba(0, 218, 222, 1), rgba(251, 0, 255, 1), rgba(0, 218, 222, 1));
  background-size: 400% 400%;
  border-radius: 8px;
  transition: background-position 0.5s ease; /* Transition fluide pour l'animation */
  animation: gradientThumb 3s ease infinite;
  box-shadow: 0 0 10px rgba(251, 0, 255, 0.6), 0 0 10px rgba(0, 218, 222, 0.6); /* Ombre lumineuse pour plus de profondeur */
}

@keyframes gradientThumb {
  0% {
    background-position: 400% 0;
  }
  50% {
    background-position: 0 100%;
  }
  100% {
    background-position: 400% 0;
  }
}

/* === GENERAL === */
main {
  display: flex;
  flex: 1 1 auto;
  overflow: hidden;
  margin-top: 40px; /* égal au top-bar */
  height: calc(100vh - 40px);
  min-width: 0;
}


#content-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

/* === CHANNEL SIDEBAR (LEFT) === */
#channel-sidebar {
  flex: 0 0 240px;
  min-width: 180px; /* Ajouté pour flexibilité */
  max-width: 240px;
  background: #222222b8;
  padding: 1em;
  border-right: 2px solid #333;
  border-radius: 10px;
  color: white;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  min-width: 0;
}

#channel-list-wrapper {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 110px; /* espace pour ne pas que la liste passe sous le champ */
}


#channel-sidebar h3 {
  margin-top: 0;
  margin-bottom: 1em;
  text-align: center;
  color: #00ffff;
}

#channel-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1em 0;
  flex-grow: 1;
  overflow-y: auto;
  padding-bottom: 70px;
  min-width: 0;
}

#channel-list .channel {
  padding: 0.5em;
  border-radius: 5px;
  cursor: pointer;
  color: white;
  transition: 0.2s ease;
}

#channel-list .channel:hover {
  background: linear-gradient(45deg, rgba(251, 0, 255, 1), rgba(0, 218, 222, 1), rgba(251, 0, 255, 1), rgba(0, 218, 222, 1));
  background-size: 400% 400%;
  border-radius: 30px;
  transition: background-position 0.5s ease; /* Transition fluide pour l'animation */
  animation: gradientThumb 10s ease infinite;
  /* box-shadow: 0 0 10px rgba(251, 0, 255, 0.6), 0 0 10px rgba(0, 218, 222, 0.6); /* Ombre lumineuse pour plus de profondeur */
}

#channel-list .channel.selected {
  background: linear-gradient(45deg, rgba(251, 0, 255, 1), rgba(0, 218, 222, 1), rgba(251, 0, 255, 1), rgba(0, 218, 222, 1));
  background-size: 400% 400%;
  border-radius: 30px;
  transition: background-position 0.5s ease; /* Transition fluide pour l'animation */
  animation: gradientThumb 10s ease infinite;
  color: white;
  font-weight: bold;
}

/* === Création Salon Fixé en Bas === */
#create-channel {
  position: absolute;
  bottom: 70px;
  left: 1em;
  right: 1em;
  display: flex;
  gap: 5px;
  border-top: 1px solid #444;
  background: #222222b8;
  padding-top: 5px;
  flex-wrap: nowrap;
  align-items: center;
  box-sizing: border-box;
}

#create-channel input {
  flex: 1;
  min-width: 0;
  padding: 0.5em;
  border: none;
  border-radius: 6px;
  background-color: #121212;
  color: white;
  font-size: 1em;
  box-sizing: border-box;

  /* Désactiver la sélection */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

#create-channel button {
  flex-shrink: 0;
  padding: 0.5em 0.8em;
  border: none;
  border-radius: 6px;
  background-color: #444;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  font-size: 1em;
  white-space: nowrap;
  box-sizing: border-box;
}


#create-channel button:hover {
  background: linear-gradient(
    45deg,
    rgba(251, 0, 255, 1),
    rgba(0, 218, 222, 1),
    rgba(251, 0, 255, 1),
    rgba(0, 218, 222, 1)
  );
  background-size: 400% 400%;
  border-radius: 8px;
  transition: background-position 0.5s ease;
  animation: gradientThumb 10s ease infinite;
  box-shadow: 0 0 10px rgba(251, 0, 255, 0.6),
              0 0 10px rgba(0, 218, 222, 0.6);
  color: #fff;
}

@keyframes gradientThumb {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* === Bouton envoyer chat général === */
#send-button {
  background-color: #444;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: background 0.5s;
}

#send-button:hover {
  background: linear-gradient(
    45deg,
    rgba(251, 0, 255, 1),
    rgba(0, 218, 222, 1),
    rgba(251, 0, 255, 1),
    rgba(0, 218, 222, 1)
  );
  background-size: 400% 400%;
  animation: gradientThumb 10s ease infinite;
  box-shadow: 0 0 10px rgba(251, 0, 255, 0.6),
              0 0 10px rgba(0, 218, 222, 0.6);
  color: #fff;
}

@keyframes gradientThumb {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* === Boutons emoji 🎨 et couleur 🎨 (même style que send-button) === */
#emoji-button,
#color-text {
  background-color: #444;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: background 0.5s, box-shadow 0.5s;
}

/* Effet au survol (identique au bouton envoyer) */
#emoji-button:hover,
#color-text:hover {
  background: linear-gradient(
    45deg,
    rgba(251, 0, 255, 1),
    rgba(0, 218, 222, 1),
    rgba(251, 0, 255, 1),
    rgba(0, 218, 222, 1)
  );
  background-size: 400% 400%;
  animation: gradientThumb 10s ease infinite;
  box-shadow: 0 0 10px rgba(251, 0, 255, 0.6),
              0 0 10px rgba(0, 218, 222, 0.6);
  color: #fff;
}

/* Animation du dégradé (même que pour send-button) */
@keyframes gradientThumb {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#chat-container {
  position: relative;
}

/* === CHAT CONTAINER (CENTER) === */
#chat-container {
  flex: 6 1 auto;
  display: flex;
  flex-direction: column;
  padding: 1em;
  min-width: 0;
}

.chat-messages {
  flex: 1 1 auto;
  min-height: 0; /* Important pour éviter le dépassement */
  overflow-y: auto;
  background: #222222b8;
  padding: 1em;
  border-radius: 10px;
  margin-bottom: 10px;
}

.chat-messages .message {
  margin-bottom: 1em;
  word-wrap: break-word;
  white-space: pre-wrap;
  line-height: 1.4;
  word-break: break-word;
  animation: fadeInUp 0.3s ease;
}

#chat-input {
  display: flex;
  gap: 10px;
  align-items: center;  /* centre verticalement */
  width: 100%;
  box-sizing: border-box;
}

#message-input {
  flex: 1;              /* prend toute la place possible */
  min-width: 0;         /* important en flexbox pour éviter débordement */
  padding: 1em;
  font-size: 1em;
  border-radius: 30px;
  border: none;
  background-color: #121212;
  color: white;
  box-sizing: border-box;
  /* facultatif: pour autoriser la zone texte à grandir verticalement si textarea */
  resize: vertical;
  max-height: 150px;
}

/* Le bouton reste sa taille mais ne rétrécit pas */
#send-button {
  padding: 0.5em 1em;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 5px;
  flex-shrink: 0;
  cursor: pointer;
}

/* Responsive : en petit écran, empile le champ et bouton */
@media (max-width: 600px) {
  #chat-input {
    flex-direction: column;
    gap: 8px;
  }

  #send-button {
    width: 100%;
  }
}


/* === USER LIST (RIGHT SIDEBAR) === */
#user-list {
  flex: 0 0 240px;
  min-width: 180px; /* Ajouté */
  max-width: 240px;
  background: #222222b8;
  padding: 1em;
  border-left: 2px solid #333;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;      /* Prend toute la hauteur disponible */
  overflow-y: auto
}

#users {
  list-style: none;
  padding: 0;
}

#users li {
  /* display: flex; */
  align-items: center;
  justify-content: flex-start;
  gap: 0px;
  /* padding: 4px 6px; */
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.gender-square {
  width: 22px;
  height: 22px;
  flex-shrink: 0; /* empêche de rétrécir */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #000;
  font-weight: bold;
  font-size: 1em;
  background-color: #aaa;
}

.age-span {
  color: #000;
}

/* Ajustement du pseudo pour qu'il accepte 16 caractères sans couper */
.username-span {
  color: #000;
  font-weight: bold;
  font-size: 1.1em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: visible;
  text-overflow: initial;
  flex: 1;
  min-width: 0;
}

#users li.selected {
  background-color: #333;
  border-left: 4px solid #00ffff;
  padding-left: 6px;
  border-radius: 5px;
}

.clickable-username {
  color: #00ffff;
  font-weight: bold;
  cursor: pointer;
}

.clickable-username:hover {
  text-decoration: none;
  color: #ff00ff;
}

/* === MODAL === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000000;
  /* background-image: url(https://maevakonnect.fr/src/img/359059.jpg); */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.5s ease-in-out;
}

.logoutModal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.5s ease-in-out;
  background: rgba(0,0,0,0.6); /* fond semi-transparent */
}


.logoutModal .modal-content {
  background-color: #222;  /* fond */
  color: #fff;
  padding: 20px;
  border-radius: 10px;
  
  width: 90%;       /* largeur relative à l'écran */
  max-width: 400px; /* largeur maximale */
  box-sizing: border-box;
  text-align: center;
}


/* Ancienne modal de connection */

/* .modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1e1e1e;
    padding: 2.5em;
    border-radius: 15px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    /* box-shadow: 0 0 20px rgba(0, 255, 255, 0.3); */
  /*  box-shadow: 0 0 10px rgba(251, 0, 255, 0.6), 0 0 10px rgba(0, 218, 222, 0.6);
    border: 2px solid #444;
    box-sizing: border-box;
    z-index: 1000;
} */

/* Cadre filament laser pour modal */
.modal-content {
    position: fixed; /* ✅ Permet de centrer sur toute la fenêtre */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    background-color: #1e1e24;
    border-radius: 12px;
    padding: 20px;
    max-width: 500px;
    width: 90%; /* optionnel, meilleure adaptation mobile */
    box-shadow: 0 0 12px 4px rgba(148, 0, 211, 0.3);
    overflow: hidden;
    z-index: 1000;
}


/* Filament lumineux animé */
.modal-content::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        rgba(0, 218, 222, 1) 0deg 60deg,
        rgba(251, 0, 255, 1) 60deg 120deg,
        transparent 120deg 360deg
    );
    animation: filament 6s linear infinite;
    z-index: 0;
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0.6;
}

/* Masque intérieur pour cacher l’excès de lumière */
.modal-content::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: #1e1e24; /* Même que le fond pour masquer le filament */
    border-radius: 10px;
    z-index: 1;
}

/* Contenu au-dessus du filament */
.modal-content > * {
    position: relative;
    z-index: 2;
}

/* Animation rotation du filament */
@keyframes filament {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
/* Champs de texte dans la modal */
.modal-content input,
.modal-content select {
    width: 80%; /* Réduit la largeur globale */
    max-width: 280px;
    padding: 10px 12px;
    margin: 6px auto;
    display: block;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: #2a2a33;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease-in-out;
    box-shadow: inset 0 0 5px rgba(251, 0, 255, 0.3);
}

/* Effet laser au focus */
.modal-content input:focus,
.modal-content select:focus {
    border-color: #00dadd;
    box-shadow: 0 0 8px #00dadd, 0 0 12px #fb00ff;
}

/* Labels centrés */
.modal-content label {
    display: block;
    margin-top: 10px;
    color: #ddd;
    font-weight: 500;
    font-size: 14px;
}
/* Uniformisation des champs input et select */
.modal-content input,
.modal-content select {
    width: 80%;
    max-width: 280px;
    padding: 10px 12px;
    margin: 6px auto;
    display: block;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: #2a2a33;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease-in-out;
    box-shadow: inset 0 0 5px rgba(251, 0, 255, 0.3);
}

/* Correction spécifique pour <select> (supprime le style navigateur) */
.modal-content select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, #00dadd, #fb00ff);
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 12px;
    cursor: pointer;
}

/* Effet focus laser */
.modal-content input:focus,
.modal-content select:focus {
    border-color: #00dadd;
    box-shadow: 0 0 8px #00dadd, 0 0 12px #fb00ff;
}

/* Optionnel : pour un triangle plus propre sur le select */
.modal-content select::-ms-expand {
    display: none;
}



.modal-content h2 {
  margin-bottom: 1em;
  font-size: 1.8em;
  color: #00ffff;
}

.modal-content label {
  display: block;
  margin-top: 1em;
  margin-bottom: 0.2em;
  font-size: 1em;
  color: #ccc;
  text-align: left;
}

.modal-content input,
.modal-content select {
  width: 100%;
  padding: 0.8em;
  margin-bottom: 1em;
  border: none;
  border-radius: 8px;
  background-color: #2c2c2c;
  color: white;
  font-size: 1em;
  transition: 0.3s ease;
}

.modal-content input:focus,
.modal-content select:focus {
  outline: none;
  box-shadow: 0 0 10px #00ffff;
  background-color: #353535;
}

.modal-content button {
  background: linear-gradient(to right, #00ffff, #ff00ff);
  color: white;
  border: none;
  padding: 0.8em;
  font-size: 1.1em;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modal-content button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px #00ffff;
}

#modal-error {
  margin-top: 0.5em;
  font-size: 0.9em;
  color: #ff4d4d;
  display: none;
}

.modal-image {
  display: block;
  width: 140px;
  height: 50px;
  object-fit: cover; /* ou contain selon le rendu voulu */
  margin: 0 auto 20px auto;
  border-radius: 10px;
  /* box-shadow: 0 0 15px #00ffff88; */
  box-shadow: 0 0 10px rgba(251, 0, 255, 0.6), 0 0 10px rgba(0, 218, 222, 0.6);
}


/* === RESPONSIVE === */
@media (max-width: 768px) {
  main {
    flex-direction: column;
    height: auto;
  }

  #channel-sidebar,
  #user-list {
    width: 100%;
    max-width: none;
    min-width: 0;
    border: none;
    border-top: 2px solid #333;
    border-radius: 0;
    margin: 0;
  }

  #chat-container {
    flex: none;
    width: 100%;
    padding: 0.5em;
  }

  #create-channel {
    position: static;
    margin-top: 1em;
    background: none;
    flex-wrap: wrap;
    gap: 8px;
  }

  #create-channel button {
    width: 100%;
  }
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: none;
  box-shadow: none;
  border-color: transparent;
}

/* Bande supérieure fixe */
#top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: #111;
  color: #00ffff;
  text-align: center;
  line-height: 40px;
  font-weight: bold;
  font-size: 1em;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
  z-index: 1001;
}
.system-message {
  color: #888;
  font-style: italic;
  margin: 5px 0;
  text-align: center;
}
.username-span.admin,
.message .clickable-username.admin {
  color: red;
  font-weight: bold;
  position: relative;
}

/* Pour l'icône "🔥" */
.username-span.admin::after,
.message .clickable-username.admin::after {
  content: "🔥";
  margin-left: 4px;
  font-size: 0.9em;
  vertical-align: middle;
  color: red;
}

/* Optionnel : curseur pointer quand sur pseudo */
.clickable-username {
  cursor: pointer;
}

/* Optionnel : espace entre l'âge et le pseudo */
.user-item .gender-square {
    display: inline-block;
    width: 20px;
    height: 18px;
    line-height: 19px;
    text-align: center;
    border-radius: 3px;
    color: white;
    font-weight: bold;
    margin-right: 8px;
    font-size: 14px;
    user-select: none;
}

/* Conteneur utilisateur */
.user-item {
  display: flex;
  align-items: center;
  gap: 8px;
  /* Optionnel pour que le texte ne dépasse pas */
  min-width: 0;
}

/* Zone icône rôle (admin/modo), largeur fixe */
.user-item .role-icon {
  width: 24px;  /* largeur fixe, à ajuster */
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Icône admin/mode centrée dans le conteneur */
.user-item .role-icon img,
.user-item .role-icon svg {
  max-width: 20px;
  max-height: 18px;
  display: inline-block;
  margin-right: 5px;
  vertical-align: middle; /* ou -2px si tu veux descendre un peu */
}


/* Carré âge, largeur fixe */
.user-item .age-square {
  width: 22px;  /* même largeur que ton .gender-square ? */
  height: 22px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
  background-color: #aaa;
  color: #000;
  font-weight: bold;
  font-size: 1em;
}

/* Pseudo, commence toujours après âge */
.user-item .username-span {
  flex: 1;
  min-width: 0; /* Permet de shrink */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #000;
  font-weight: bold;
}


/* Texte laser */
.texte-laser {
  font-size: 15px;
  font-weight: bold;
  background: linear-gradient(45deg, rgba(0, 218, 222, 1), rgba(251, 0, 255, 1), rgba(0, 218, 222, 1), rgba(251, 0, 255, 1), rgba(251, 0, 255, 1));
  background-size: 400% 400%;
  background-clip: text;              /* ✅ ajout standard */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: laserTexteMenu 2s linear infinite;
}


@keyframes laserTexteMenu {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 100%;
  }
  100% {
    background-position: 0% 0%;
  }
}

/* Fin texte laser */

/* Empêche le retour à la ligne entre le nom d'utilisateur et les icônes */
.username-span {
  display: inline-flex;
  align-items: center;
  gap: 4px; /* petit espace entre nom et icône */
  white-space: nowrap; /* empêche de passer à la ligne */
}

/* Icône admin */
.admin-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Icône modo */
.modo-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  flex-shrink: 0;
}
@media (max-width: 400px) {
  .admin-icon,
  .modo-icon {
    width: 12px;
    height: 12px;
    font-size: 12px;
  }
}

#user-list {
  display: flex;
  flex-direction: column;
}

#user-list .texte-laser {
  flex: 0 0 auto;
  margin-bottom: 0px; /* ou 0 */
  text-align: center;
  white-space: nowrap;
  width: 100%;
  user-select: none;
}


.control-button {
  background-color: #444;
  color: white;
  border: none;
  padding: 6px 10px;
  margin: 0 0px;
  border-radius: 5px;
  cursor: pointer;
}

.control-button:hover {
  background-color: #666;
}

#emoji-picker {
  display: none; /* caché par défaut */
  position: absolute;
  bottom: 70px;
  left: 10px;
  background: #222; /* fond sombre */
  border: 1px solid #444;
  border-radius: 12px;
  padding: 12px;
  z-index: 1000;
  max-width: 292px;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 8px 16px rgba(0,0,0,0.6);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* Style des emojis */
#emoji-picker .emoji {
  font-size: 26px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background-color 0.3s, transform 0.2s;
  user-select: none;
}

#emoji-picker .emoji:hover {
  background-color: #555;
  transform: scale(1.3);
}
.modal[style*="display: flex"] ~ #top-bar {
  display: none !important;
}
.modal[style*="display: flex"] ~ #top-bar,
.modal[style*="display: flex"] ~ #user-list,
.modal[style*="display: flex"] ~ #chat-container {
  display: none !important;
}


.user-item .clickable-username {
  pointer-events: auto; /* Autorise le clic uniquement ici */
  cursor: pointer;
}

/* Responsive : ajuste automatiquement la taille en dessous de 500px */
.youtube-wrapper {
  width: 64%;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  margin: 10px 0 10px 10px;
  background-color: #121212;
  border: 2px solid #007bff; /* identique aux fichiers */
  border-radius: 8px;        /* identique aux .media-hover */
  box-sizing: border-box;
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

.youtube-wrapper:hover {
  box-shadow: 0 0 10px #007bff, 0 0 10px #007bff;
  border-color: #007bff;
  z-index: 10;
}



.youtube-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 4px;
  display: block;
} 

#content-container {
  display: flex;
  flex-direction: row;
  flex: 1 1 auto;
  overflow: hidden;
  min-width: 0;
  height: 100%;
  padding-top: 40px; /* Ajout pour laisser la place à la top-bar */
  box-sizing: border-box;
}

#channel-sidebar,
#user-list {
  height: calc(100vh - 40px); /* Hauteur sans la top bar */
  margin-top: 15px;           
}

.sprite-button {
  width: 24px;
  height: 24px;
  /* background: url('https://chat-app-91ml.onrender.com/icon/starbis.gif') no-repeat top center; */
  background: url('/icon/starbis.gif') no-repeat top center;
  background-size: 24px 48px;
  border: none;
  cursor: pointer;
  display: inline-block;
  padding: 0;
  position: relative;
  left: -8px; /* décale vers la gauche */
}

.sprite-button:hover {
  background-position: 0 -24px;
}

/* Pour désactiver les focus/outline si tu veux */
.sprite-button {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.sprite-button:focus,
.sprite-button:active {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Nouveau bouton fermeture, classe différente */
.close-sprite-button {
  width: 24px;
  height: 24px;
  background: url('https://chat-app-91ml.onrender.com/icon/croix.gif') no-repeat center center;
  background-size: contain;
  border: none;
  cursor: pointer;
  display: inline-block;
  padding: 0;
  position: relative;
  left: 0; /* enlever décalage pour éviter hors écran */
  user-select: none;
}
.close-sprite-button:hover {
  filter: brightness(1.2); /* effet léger au hover */
}

/* Désactivation des focus/outline */
.close-sprite-button {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.close-sprite-button:focus,
.close-sprite-button:active {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}


/* MP */

/* Conteneur général des fenêtres privées */
#private-chat-container {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Pour ne pas bloquer les clics en arrière-plan */
  z-index: 10000;
}

/* Fenêtre privée */
.private-chat-window {
  position: absolute; /* ✅ Indispensable pour gérer le z-index */
  z-index: 1000;       /* z-index initial */
  pointer-events: auto;

  border: 2px solid #8e44ad;
  border-radius: 10px;
  box-shadow: 0 0 10px #8e44ad;
  color: #d6a8ff;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  user-select: none;

  max-height: 300px;
  width: 504px;
}


/* Header de la fenêtre privée */
.private-chat-header {
  background: #121212;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 1.1em;
  color: white;
  user-select: none;
  cursor: move;
  border-radius: 6px;
  border-top: 1px solid #5e1aff;
}

/* Bouton fermer */
.private-chat-header button {
  margin-left: auto;
  background: none;
  border: none;
  color: #f55;
  font-size: 20px;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}


.private-chat-header button:hover {
  color: #ff8888;
}

.private-chat-window.minimized {
  height: auto !important;
  max-height: none !important;
  overflow: hidden;
  resize: none;
}

.private-chat-window.minimized .private-chat-body,
.private-chat-window.minimized .private-chat-input {
  display: none !important;
}

.private-chat-body,
.private-chat-input {
  transition: all 0.2s ease;
}


/* Corps de la fenêtre (zone des messages) */
.private-chat-body {
  flex: 1;
  padding: 10px;
  overflow-y: auto; /* Barre de défilement verticale */
  background: #242461fa;
  font-size: 0.9em;
  line-height: 1.3;
  color: #ddd;

  white-space: pre-wrap;      /* Retours à la ligne automatiques */
  word-wrap: break-word;      /* Coupe les mots trop longs */
  overflow-wrap: break-word;  /* Support moderne pour word-wrap */
}

/* Barre d’entrée message */
.private-chat-input {
  display: flex;
  padding: 8px;
  background: #000;
  border-top: 1px solid #5e1aff;
  border-radius: 6px;
}

.private-chat-input input[type="text"],
.private-chat-input input {
  flex: 1;
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  font-size: 1em;
  outline: none;
  color: #111;
}

.private-chat-input button {
  margin-left: 8px;
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: #6a00d1;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.private-chat-input button:hover {
  background: #8f00ff;
}

.private-message {
  display: flex;
  align-items: center;
  margin: 4px 0;
  font-size: 0.95em;
  line-height: 1.4;
}

.private-message .username {
  font-weight: bold;
  margin-right: 6px;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.private-message .message-text {
  word-break: break-word;
  flex: 1;
}

.private-message .timestamp {
  margin-left: 8px;
  color: #aaa;
  font-size: 0.95em;
  font-style: italic;
  white-space: nowrap;
}


/* Bouton démarrer webcam */
/* Style spécifique pour le bouton start-webcam-btn */
#start-webcam-btn {
  width: 24px;
  height: 24px;
  background: url('/icon/camzy.gif') no-repeat top center;
  background-size: 24px 48px;
  border: none;
  cursor: pointer;
  display: inline-block;
  padding: 0;
  position: relative;
  left: -8px;
  outline: none !important;
  box-shadow: none !important;
}

#start-webcam-btn:hover {
  background-position: 0 -24px;
}

#start-webcam-btn:focus,
#start-webcam-btn:active {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}



 .webcam-icon {
  position: absolute;
  top: -6px;    /* place l'icône un peu au-dessus mais visible */
  left: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
  z-index: 10;
}
.webcam-icon.admin {
  top: 0px;
  left: 0px;
}

.webcam-icon.modo {
  top: 0px;
  left: 0px;
}

.webcam-icon.user {
  top: -8px;
  left: 0;
}

.wiizz-cooldown-banner {
  animation: slideDown 0.3s ease;
  background-color: #ffc107;
  color: black;
  font-weight: bold;
  padding: 6px;
  text-align: center;
  border-bottom: 2px solid #222;
  position: absolute;
  top: 0;
  left: 0;
  right: 0; /* prend toute la largeur */
  z-index: 999;
}


@keyframes slideDown {
  from { top: -50px; opacity: 0; }
  to { top: 0; opacity: 1; }
}




.wizz-icon {
  height: 25px;
  width: 44px;
  vertical-align: middle;
  margin-right: 4px;
  animation: pulseWizz 1s ease;
}

.moderation-context-menu {
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.confirm-box {
  background: #222;
  color: #fff;
  border: 1px solid #555;
  border-radius: 8px;
  padding: 20px;
  width: 300px;
  max-width: 80%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.2s ease;
}

.confirm-message {
  font-size: 16px;
  margin-bottom: 20px;
  text-align: center;
}

.confirm-buttons {
  display: flex;
  justify-content: space-around;
}

.confirm-buttons button {
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  background: #444;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

.confirm-buttons button:hover {
  background: #666;
}

.room-banned {
  opacity: 0.4;
  cursor: not-allowed;
}


.badge-icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 3px;
}
.badge-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}


.username-span[data-gender="Homme"][data-role="user"]:not([data-roomrole="owner"]):not([data-roomrole="mod"]) {
  color: dodgerblue;
}
.username-span[data-gender="Femme"][data-role="user"]:not([data-roomrole="owner"]):not([data-roomrole="mod"]) {
  color: #f0f;
}

.username-span[data-gender="Trans"][data-role="user"]:not([data-roomrole="owner"]):not([data-roomrole="mod"]) {
  color: #ee82ee;
}
.username-span {
  transition: color 0.2s;
  cursor: pointer;
}

.username-span[data-role="admin"] {
  color: red;
}

.username-span[data-role="modo"] {
  color: limegreen;
}

.username-span[data-roomrole="owner"] {
  color: #a020f0;
}

.username-span[data-roomrole="mod"] {
  color: #cc66ff;
}

.username-span[data-gender="Homme"]:not([data-role]):not([data-roomrole="owner"]):not([data-roomrole="mod"]) {
  color: dodgerblue;
}

.username-span[data-gender="Femme"]:not([data-role]):not([data-roomrole="owner"]):not([data-roomrole="mod"]) {
  color: #f0f;
}

.username-span[data-gender="Trans"]:not([data-role]):not([data-roomrole="owner"]):not([data-roomrole="mod"]) {
  color: #ee82ee;
}

/* 💫 Hover */
/* Animation au survol */
.username-span:hover {
  background-image: linear-gradient(
    90deg,
    #00dede,
    #fb00ff,
    #00dede
  );
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: textGradientHover 2.5s linear infinite;
}

/* Animation dégradé */
@keyframes textGradientHover {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

.texte-laser-italique {
  font-size: 15px;
  font-weight: bold;
  font-style: italic;
  font-family: Arial, "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", sans-serif; /* 💯 même police */
  background: linear-gradient(45deg, rgba(0, 218, 222, 1), rgba(251, 0, 255, 1), rgba(0, 218, 222, 1), rgba(251, 0, 255, 1), rgba(251, 0, 255, 1));
  background-size: 400% 400%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: laserTexteMenu 2s linear infinite;
  line-height: 1.2; /* 💡 pour égaliser avec les autres */
}


audio {
  width: 100%;
  max-width: 400px;
  background-color: #212529;
  border: 2px solid #007bff;
  border-radius: 10px;
  padding: 6px;
  margin-top: 6px;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.2);
}

/* Personnalisation WebKit (Chrome, Edge, Brave, etc.) */
audio::-webkit-media-controls-panel {
  background: linear-gradient(270deg, #00dade, #fb00ff, #00dade, #fb00ff);
  background-size: 800% 800%;
  animation: audioGradientFlow 5s ease infinite;
  border-radius: 8px;
}

/* Barre de volume */
audio::-webkit-media-controls-volume-slider {
  background-color: #fff;
}

/* Boutons lecture / pause */
audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-pause-button {
  background-color: #fff;
  border-radius: 50%;
}

/* Hover effet autour du lecteur */
audio:hover {
  border-color: #00bfff;
  box-shadow: 0 0 15px rgba(0, 191, 255, 0.5);
}

@keyframes audioGradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 🎨 Hover visuel sans zoom pour images, vidéos, audio */
.media-hover {
  cursor: pointer;
  display: inline-block;
  border: 2px solid #007bff;
  border-radius: 8px;
  padding: 4px;
  background-color: #121212;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.media-hover:hover {
  box-shadow: 0 0 10px #00ffff, 0 0 10px #ff00ff;
  border-color: #ff00ff;
  z-index: 10;
}



/* Règlement */
.reglement-link {
  color: grey;
  text-decoration: none;
  font-size: 11px;
  display: inline-block;
  margin-right: 23px;  
  vertical-align: middle; 
}

.reglement-link:hover {
  color: #ff0000 !important;
}



/* Cacher sur les écrans mobiles (max 768px) */
@media (max-width: 768px) {
  #emoji-picker,
  #color-picker {  /* conteneur pour la couleur */
    position: fixed !important;
    bottom: 60px; /* juste au-dessus de la barre mobile */
    left: 10px;
    z-index: 2000; /* au-dessus des overlays */
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}


#send-button {
  cursor: pointer;
  margin-left: 5px;
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: white;
}















/* Affichage Mobile */

@media (max-width: 768px) {
  /* 📱 Conteneur principal mobile */
  #content-container {
    flex-direction: column !important;
    height: auto !important;
    overflow: hidden !important;
  }

  /* 📚 Sections principales en overlay (cachées par défaut) */
  #channel-sidebar,
  #chat-container,
  #user-list {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    height: auto !important;
    padding: 0.5em !important;
    display: block !important;
    z-index: 1;
    transition: opacity 0.3s ease;
  }

  /* ✅ Section visible (active) */
  #channel-sidebar.active,
  #chat-container.active,
  #user-list.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
    z-index: 2;
  }

  /* 🧵 Hauteur chat responsive */
  #chat-container {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100vh - 96px);
    padding-bottom: 120px !important; /* espace pour input + onglets */
  }

  .chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
  }

  /* 💬 Barre de message */
  #message-input-container {
    position: fixed;
    bottom: 48px;
    left: 0;
    right: 0;
    background: #111;
    padding: 8px 10px;
    z-index: 999;
    border-top: 1px solid #444;
  }

  #chat-input {
    display: flex;
    gap: 6px;
    align-items: center;
  }

  #chat-input input[type="text"] {
    flex: 1;
    padding: 8px;
    font-size: 14px;
    border-radius: 30px;
    border: 1px solid #555;
    background-color: #222;
    color: #fff;
  }

  #chat-input button {
    padding: 8px;
    border-radius: 6px;
    border: none;
    background-color: #0ff;
    color: #000;
    font-weight: bold;
    cursor: pointer;
  }

  /* 📱 Onglets fixes en bas */
  #mobile-tabs {
    display: flex !important;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background-color: #111;
    border-top: 1px solid #444;
    z-index: 9999;
  }

  #mobile-tabs button {
    flex: 1;
    padding: 10px 0;
    background: none;
    color: white;
    border: none;
    font-size: 14px;
  }

  #mobile-tabs button.active {
    color: #0ff;
    font-weight: bold;
  }

  main {
    margin-bottom: 48px;
  }
}
/* Mobile : affichage selon l'onglet actif */
@media (max-width: 768px) {
  #chat-container,
  #channel-sidebar,
  #user-list {
    display: none;
  }

  #chat-container.active,
  #channel-sidebar.active,
  #user-list.active {
    display: block;
  }

  #mobile-tabs {
    display: flex;
    justify-content: space-around;
    background: #111;
    color: #fff;
    padding: 5px 0;
    border-top: 1px solid #333;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
  }

  #mobile-tabs button {
    background: none;
    border: none;
    color: #888;
    font-weight: bold;
    font-size: 14px;
  }

  #mobile-tabs button.active {
    color: #00ffff;
  }

  #top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
  }

  body {
    overflow: hidden; /* évite la barre de scroll verticale */
  }
}

@media (max-width: 768px) {
  #chat-input {
    position: fixed;
    bottom: 48px; /* juste au-dessus de la barre mobile */
    left: 0;
    right: 0;
    background: #111;
    padding: 6px 8px;
    z-index: 999;
    border-top: 1px solid #444;
  }

  #chat-container {
    padding-bottom: 120px !important;
  }
}
/* 🖥️ Masquer les onglets mobiles sur PC */
#mobile-tabs {
  display: none !important;
}

/* 📱 Réactiver les onglets sur mobile */
@media (max-width: 768px) {
  #mobile-tabs {
    display: flex !important;
  }
}
@media (max-width: 768px) {
  #channel-sidebar {
    order: 2; /* pour l'afficher après chat si en flex column */
  }

  main {
    display: flex;
    flex-direction: column;
  }
}

#chat-input {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: #222222b8;
  border-top: 1px solid #444;
  border-radius: 10px;
}

#chat-input input[type="text"] {
  flex: 1;
  padding: 8px;
  font-size: 14px;
  border-radius: 30px;
  border: 1px solid #555;
  background-color: #222;
  color: #fff;
}

#chat-input button {
  font-size: 20px;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 6px;
}



  #chat-input button {
    font-size: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
  }

.input-buttons {
  display: flex;
  gap: 4px;
}
@media (max-width: 768px) {
  #chat-input {
    flex-direction: row-reverse;
  }
}
#channel-list-wrapper {
  max-height: calc(100vh - 150px); /* Ajuste selon ta mise en page */
  overflow-y: auto;
  padding-right: 6px; /* optionnel : pour laisser de la place à la scrollbar */
}
/* 🌐 Liste des salons scrollable */
#channel-list-wrapper {
  max-height: calc(100vh - 180px); /* hauteur ajustée */
  overflow-y: auto;
  padding-right: 6px;
}

/* 👥 Liste des utilisateurs scrollable */
#user-list {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#user-list ul#users {
  flex: 1;
  overflow-y: auto;
  max-height: calc(100vh - 160px); /* Ajuste selon boutons */
  padding-right: 6px;
}

/* 💬 Messages du chat scrollables */
.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  max-height: calc(100vh - 180px); /* hauteur = écran - top bar - input */
  padding-right: 6px;
}
@media (max-width: 768px) {
  html, body {
    overflow: hidden !important;
    height: 100% !important;
  }

  main {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  #channel-sidebar,
  #chat-container,
  #user-list {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: rgba(30, 30, 30, 0.85); /* fond gris opaque */
  }

  #channel-list-wrapper,
  .chat-messages,
  #users {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-right: 6px;
    padding-bottom: 12px;
  }

  #create-channel {
    flex-shrink: 0;
    padding: 10px;
    border-top: 1px solid #444;
    background-color: rgba(20, 20, 20, 0.8);
  }
}
@media (max-width: 768px) {
  #channel-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: rgba(30, 30, 30, 0.85);
  }

  #channel-list-wrapper {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px;
    margin-bottom: 80px; /* espace pour ne pas que la liste touche "Créer" */
  }

  #create-channel {
    position: fixed;
    bottom: 48px; /* juste au-dessus des boutons onglets */
    left: 0;
    width: 100%;
    padding: 8px 12px;
    background-color: rgba(20, 20, 20, 0.95);
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.4);
    z-index: 999;
  }

  #create-channel input,
  #create-channel button {
    width: 100%;
    margin-bottom: 6px;
  }
}
#mobile-tabs,
#top-bar {
  display: none;
}
/* Cache top-bar et mobile-tabs quand la modale est visible */
#myModal:has(~ #top-bar),
#myModal:has(~ #mobile-tabs) {
  display: block; /* Empêche leur affichage forcé */
}

body.modal-open #top-bar,
body.modal-open #mobile-tabs {
  display: none !important;
}
@media (max-width: 480px) {
  .modal-content {
    padding: 1.2em;
    border-radius: 12px;
    max-width: 95vw;
    width: 95vw;
    box-sizing: border-box; /* ✅ pour éviter tout débordement */
  }

  .modal-content h2 {
    font-size: 1.4em;
  }

  .modal-content label {
    font-size: 0.9em;
  }

  .modal-content input,
  .modal-content select {
    font-size: 0.95em;
    padding: 0.7em;
    width: 100%;              /* ✅ important pour mobile */
    box-sizing: border-box;   /* ✅ évite les scrolls latéraux */
  }

  .modal-content button {
    font-size: 1em;
    padding: 0.7em;
    width: 100%;              /* ✅ mieux sur petit écran */
    box-sizing: border-box;
  }

  .modal-image {
    width: 40px;
    height: 40px;
    margin-bottom: 15px;
  }
}
@media (max-width: 768px) {
  .private-chat-window {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2000;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background-color: #111 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .private-chat-header {
    padding: 10px;
    font-weight: bold;
    background: #222;
    color: #fff;
    flex-shrink: 0;
  }

  .private-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
  }

  .private-input-container {
    flex-shrink: 0;
    display: flex;
    padding: 10px;
    background: #222;
  }

  .private-input-container input {
    flex: 1;
    margin-right: 10px;
  }

  .private-input-container button {
    flex-shrink: 0;
  }
}
@media (max-width: 768px) {
  .private-chat-window.minimized {
    height: auto !important;
    max-height: 50px !important;
    overflow: hidden !important;
    bottom: auto !important;
  }

  .private-chat-window.minimized .messages,
  .private-chat-window.minimized .input-area {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .private-chat-window {
    position: fixed !important;
    top: 55px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: calc(100vh - 115px) !important;
    max-height: calc(100vh - 115px) !important;
    transform: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 9999 !important;
    display: flex;
    flex-direction: column;
  }

  .private-chat-window .window-header {
    font-size: 1em;
    padding: 10px;
    flex-shrink: 0;
  }

  .private-chat-window .messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
  }

  .private-chat-window .input-area {
    flex-shrink: 0;
    padding: 10px;
    background: #111;
    border-top: 1px solid #333;
  }

  .private-chat-window .input-area input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    font-size: 1em;
    border-radius: 6px;
    border: none;
  }
}



/* Espacement entre les boutons */
#confirmModal .modal-buttons {
  display: flex;
  justify-content: center;
  gap: 12px; /* espace entre les boutons */
  margin-top: 20px;
}

#confirmModal .modal-buttons button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  background: linear-gradient(to right, #00ffff, #ff00ff);
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

#confirmModal .modal-buttons button:hover {
  opacity: 0.9;
}



/* 📱 Affichage mobile amélioré pour la palette d'émojis */
@media (max-width: 600px) {
  #emoji-picker {
    position: absolute !important;
    bottom: 120px !important;  
    left: 10px;
    right: 10px;
    z-index: 9999;
    max-height: 240px;
    overflow-y: auto;
    background: #222;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(255, 0, 255, 0.3);
    padding: 10px;
  }
}

@media (max-width: 600px) {
  #top-bar h2 {
    font-size: 15px;
    max-width: 50vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #top-bar .texte-laser {
    flex: 1;
    min-width: 0;
  }

  #top-bar {
    gap: 6px;
  }
}




/* Modal conditions */
.modal {
  display: none;
}
.modal.show {
  display: flex !important;
}


/* === Menu bas à droite === */
#menu-bottom {
position: absolute;
    bottom: 23px;
    right: 0em;
    display: flex
;
    gap: 11px;
    border-top: 1px solid #444;
    background: #222222b8;
    padding-top: 5px;
    padding-left: 5px;
    padding-right: 10px;
    flex-wrap: nowrap;
    align-items: center;
    box-sizing: border-box;
    height: 40px;
}

/* Boutons du menu */
#menu-bottom .menu-button {
  flex-shrink: 0;          /* ne rétrécit pas */
  padding: 0.5em 0.8em;
  border: none;
  border-radius: 6px;
  background-color: #444;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  font-size: 1em;
  white-space: nowrap;
  box-sizing: border-box;
}

/* Hover animé identique à #create-channel */
#menu-bottom .menu-button:hover {
  background: linear-gradient(
    45deg,
    rgba(251, 0, 255, 1),
    rgba(0, 218, 222, 1),
    rgba(251, 0, 255, 1),
    rgba(0, 218, 222, 1)
  );
  background-size: 400% 400%;
  border-radius: 8px;
  transition: background-position 0.5s ease;
  animation: gradientThumb 10s ease infinite;
  box-shadow: 0 0 10px rgba(251, 0, 255, 0.6),
              0 0 10px rgba(0, 218, 222, 0.6);
  color: #fff;
}

/* Animation gradient bouton */
@keyframes gradientThumb {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


.modal-filament {
  position: relative;
  background-color: #1e1e24;
  border-radius: 12px;
  padding: 20px;
  width: 80%;
  max-width: 600px;
  max-height: 80vh;
  margin: auto;
  box-shadow: 0 0 12px 4px rgba(148, 0, 211, 0.3);
  overflow: hidden;
  z-index: 0;
}

/* Filament lumineux animé */
.modal-filament::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: conic-gradient(
    from 0deg,
    rgba(0, 218, 222, 1) 0deg 60deg,
    rgba(251, 0, 255, 1) 60deg 120deg,
    transparent 120deg 360deg
  );
  animation: filament 6s linear infinite;
  z-index: 0;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.6;
}

/* Masque intérieur */
.modal-filament::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background: #1e1e24;
  border-radius: 10px;
  z-index: 1;
}

/* Contenu au-dessus du filament */
.modal-filament > * {
  position: relative;
  z-index: 2;
}

/* Animation rotation */
@keyframes filament {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
