/* === 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);
  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: 110px;
  left: 1em;
  right: 1em;
  display: flex;
  gap: 5px;
  border-top: 1px solid #444;
  background: #222222b8;
  padding-top: 10px;
  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%; }
}



/* === 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;
}

.modal-content {
  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);
  border: 2px solid #444;
  animation: popIn 0.4s ease;
}

.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: 50px;
  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;
}


/* === 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 5px;
  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: 320px;
  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: 100%;        /* prend toute la largeur possible */
  max-width: 640px;   /* ne dépasse pas 640px */
  aspect-ratio: 16 / 9;
  margin: 10px 0 10px 10px;
  background-color: #222;
  border: 3px solid #888;
  border-radius: 6px;
  box-sizing: border-box;
  overflow: hidden;
}

.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-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 */
}












