:root {
    --background-dark: #1a1a1a;
    --background-darker: #141414;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent-color: #646cff;
    --search-background: hsl(0, 0%, 16%);
    --button-background: #333333;
    --notification-color: #3498db;
  }

  body {
    background-color: black;
    color: var(--text-primary);
    margin: 0;
    font-family: arial, sans-serif;
  }

  .container {
    height: 100vh;
    width: 100%;
    margin: 0 auto;
    padding: 0px;
    max-width: 800px;
  }

  .main-header {
    position: fixed;
    width: 100%;
    height: 60px;
    background-color: black;
    top: 0;
    z-index: 99;
}

.main-header-content {
    max-width: 800px;
    height: 100%;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
}

.logo {
    height: 55px;
    width: auto;
    margin-bottom: 0rem!important;
}

  /* Discussions Section */

    /* display: flex;
    justify-content: space-between; /* Permet de pousser le bouton "..." à droite
    align-items: center;
    width: 100%;
    padding: 0; */

  .discussions-section {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    margin-top: 50px;
  }

  .discussions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* Prend toute la largeur */
    padding: 0; /* Supprime le padding précédent */
  }


  .discussions-header h2 {
    margin-left: 0; /* Réinitialise la marge précédente */
  }

  .more-button {
    background-color: var(--button-background);
    color: var(--text-secondary);
    border: none;
    border-radius: 50%;
    width: 25px; /* Increased width */
    height: 25px; /* Increased height */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.2s, color 0.2s;
    margin-right: 0px;
  }



  .more-button:hover {
    background-color: var(--search-background);
    color: var(--text-primary);
  }

  .search-bar {
    background-color: var(--search-background);
    border-radius: 20px;
    padding: 10px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 20px; /* Ajoute un peu de padding pour l'espace sur les côtés */
    margin-inline: 0;
  }

  .search-icon {
    color: var(--text-secondary);
    min-width: 20px;
    margin-inline-start: 20px;
  }


  .search-bar input {
    background: none;
    border: none;
    color: var(--text-primary);
    margin-left: 10px;
    width: 100%;
    outline: none;
  }

  .search-bar input::placeholder {
    color: var(--text-secondary);
  }

  .filter-btn {
    padding: 0.5rem 2rem;
    border-radius: 25px;
    border: 1px solid #fff;
    background: transparent;
    color: white;
    cursor: pointer;
    white-space: nowrap;
  }

  .filter-btn.active {
    background-color: white; /* Changed to a grey color */
    color: black;
  }


  .filter-buttons {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    padding: 0 10px;
    width: 100%;
    overflow-x: auto; /* Espace pour éviter que le contenu ne soit coupé */
}

/* Cache la barre de défilement sur Chrome/Safari */
.filter-buttons::-webkit-scrollbar {
    display: none;
}

/* Ajustement des boutons pour qu'ils restent sur une ligne */
.filter-buttons button {
    flex-shrink: 0; /* Empêche les boutons de se rétrécir */
}

.filter-buttons a {
    flex-shrink: 0; /* Empêche les liens de se rétrécir */
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
}

  /* Messages Section */

  .message-container {
      min-height: 100vh;
  }

  .message-box {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid var(--background-darker);
    width: 100%;
    box-sizing: border-box;
  }

  .message-box:hover {
    background-color: var(--search-background);
    color: var(--text-primary);
  }

  /* Avatar Container and Select Button */
  .avatar-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 15px;
  }

  .select-button {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--button-background);
    border: 2px solid var(--background-dark);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s;
    order: -1; /* Place the button before the avatar */
  }

  .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--button-background);
  }

  .message-box:hover .select-button,
  .select-button.show {
    opacity: 1;
  }

  .select-button.show {
    background-color: var(--accent-color);
  }

  .check-icon {
    color: var(--text-primary);
  }

  .message-content {
    flex-grow: 1;
  }

  .message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
  }

  .message-header h3 {
    margin: 0;
    color: var(--text-primary);
  }

  .time-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    margin-inline-end: 20px;
  }

  .time {
    color: var(--text-secondary);
    font-size: 0.9em;
  }

  .time-container:has(.notification-dot.show) .time {
    color: red;
  }

  .notification-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: red;
    display: none;
  }

  .notification-dot.show {
    display: block;
  }

  .preview {
    color: var(--text-secondary);
    margin: 0;
    text-align: left;
  }


.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 800px;
  background: black;
  display: flex;
  justify-content: space-around;
  padding: 0.4rem;
  z-index: 1;
}

.nav-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: black;
  display: flex;
  justify-content: center;
  align-items: center; /* Ajout de cette ligne */
  width: 100%;
  z-index: 1;
  margin: 0 auto; /* Ajout de cette ligne */
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-light);
  opacity: 1;
}

.nav-item.active {
  opacity: 1;
}

.nav-item img {
  width: 50px;
  height: 50px;
}

.nav-item .addItem {
  width: 90px;
  height: 90px;
  margin-top: -35px;
}

a { text-decoration: none; color: white; }

.verified-badge {
  width: 15px;
  height: 15px;
  position: absolute;
  margin-left: 5px;
  margin-top: 7px;
}

.highlight {
  background-color: rgba(255, 203, 0, 0.3);
  border-radius: 2px;
}





.message-header h3 {
  margin: 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #4CAF50;  /* Une couleur verte pour indiquer le statut en ligne */
  border-radius: 50%;
  flex-shrink: 0;
}

.verified-badge {
  width: 15px;
  height: 15px;
  position: static;  /* Supprimé le position: absolute */
  margin: 0;         /* Réinitialisation des marges */
  flex-shrink: 0;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Pour Firefox */
input[type="number"] {
    -moz-appearance: textfield;
}

/* Styles pour la pagination - à ajouter dans votre fichier CSS */
.pagination-controls {
  width: 100%;
  margin: 20px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 80px; /* Espace pour éviter que la pagination soit cachée par la navbar */
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: all 0.2s ease;
}

.page-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.page-link.active {
  background-color: red; /* Couleur du thème Wifans */
  color: white;
}

.page-link.prev, .page-link.next,
.page-link.first, .page-link.last {
  font-size: 18px;
}

.page-info {
  font-size: 14px;
  color: #777;
}

/* Version mobile */
@media (max-width: 768px) {
  .pagination {
      gap: 3px;
  }

  .page-link {
      width: 32px;
      height: 32px;
      font-size: 14px;
  }
}