
/* Reset CSS général */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease;
}
font {
  justify-content: center;
  display: flex;
}
.notifi {

      font-size: var(--badge-taille-pc);
      color: var(--bg-color);
      position: absolute;
      top: 7px;
      background-color: red;
      width: 18px;
      height: 18px;
      border-radius: 7px;
      align-items: center;
      justify-content: center;
      margin-left: -6px;
      display: flex;
}
.flex-spacer {
  flex: 1;
}
.post-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  /* ou 50% si tu veux un cercle */
  font-size: 20px;
  text-decoration: none;
  box-shadow: 0 4px 10px var(--logo-color);
  transition: background-color 0.3s ease;
}

.post-button:hover {
  background-color: var(--hover-bg);
  /* couleur au hover */
}

.top-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-color);
  padding: 10px 20px;
  box-shadow: 0 2px 4px var(--shadow-color);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}
.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
    flex-shrink: 0;
      /* Ne rétrécit pas */
  /* espace entre logo et texte */
}


.logo-text {
  font-size: 26px;
  color: var(--text-color);
  user-select: none;
  font-weight: bold;
}

/* Navigation centrale avec les icônes principales */
.nav-center {
  display: flex;
  gap: 30px;
    flex: 1;
      /* Prend l'espace restant */
      justify-content: center;
}

/* Style des éléments de navigation */
.nav-item a {
  color: var(--text-color);

  font-size: var(--taille-titre-pc);
  cursor: pointer;
  padding: 8px 40px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  text-decoration: none;

}

/* Lien Voir tous les produits */
a {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}


.nav-item.active::after {
  width: 80%;
  background-color: var(--accent-color);
}
.sub-navbar li.active a {
  color: var(--text-color);
  /* exemple */
}
/* Ligne d'indication sous les éléments de navigation */

/* Ligne d'indication sous les éléments de navigation */
.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--navrigt-primary-bg);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-item:hover::after {
  width: 80%;
}

/* Navigation droite (icônes utilisateur) */
.nav-right {
  display: flex;
  gap: 15px;
        flex-shrink: 0;
          /* Ne rétrécit pas */
}

/* Style des éléments de navigation droite */
.nav-right-item {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-color);
  background-color: var(--bg-color);
}

.user-avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
}

.nav-right-item i {
  color: var(--text-color);
}

/* Effets de survol pour les éléments de droite */
.nav-right-item:hover {
  background-color: var(--hover-bg);
  transform: scale(1.1);
  box-shadow: 0 2px 8px var(--shadow-color);
}


/* Barre latérale gauche */
.left-sidebar {
  position: fixed;
  left: 0;
  top: 60px;
  width: 12%;
  height: calc(100vh - 60px);
  background-color: var(--bg-color);
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 5px var(--shadow-color);
    color: var(--text-color);
}

/* Éléments de la barre latérale */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  color:var(--text-color);
}

.sidebar-item a {
  text-decoration: none;
    color: var(--text-color);

  /* Supprimer la décoration du lien (par défaut, souligné) */

}

.sidebar-item,
.titre-item {
  font-size: var(--taille-text-pc);

}

/* Effets de survol pour les éléments de la barre latérale */
.sidebar-item:hover {
  background-color: var(--hover-bg);
  transform: translateX(5px);
}

/* Active states for sidebar */
.sidebar-item.active {
  background-color: var(--hover-bg);
}

.sidebar-item.active span {
  color: var(--text-color);
}

.sidebar-item.active i {
  transform: scale(1.2);
}

/* Style des icônes de la barre latérale */
.sidebar-item i {
  font-size: var(--taille-icon-pc);
  width: 24px;
  transition: transform 0.3s ease;
  color:var(--text-color);
}

.sidebar-item:hover i {
  transform: scale(1.2);
}



.sidebar-item:hover .titre-item {
  color: var(--text-color);
}

/* Contenu principal */
.main-content {
  margin-left: 15%;
  margin-top: 60px;
  padding: 20px;
  min-height: calc(100vh - 60px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

/* Style des cartes de contenu */
.content-card {
  background: var(--navrigt-primary-bg);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 4px var(--shadow-color);
  transition: transform 0.3s ease;
}

.content-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px var(--shadow-color);
}

/* Personnalisation de la barre de défilement */
.left-sidebar::-webkit-scrollbar {
  width: 8px;
}

.left-sidebar::-webkit-scrollbar-track {
  background: var(--bg-color);
  border-radius: 4px;
}

.left-sidebar::-webkit-scrollbar-thumb {
  background: var(--text-color);
  border-radius: 4px;
}

.left-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--text-color);
}

/* Style des menus déroulants */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background-color: var(--bg-secondary);
  min-width: 200px;
  box-shadow: 0 2px 8px var(--shadow-color);
  border-radius: 8px;
  padding: 8px 0;
  z-index: 1001;
  margin-top: 5px;
}

.dropdown-content.active {
  display: block;
}

/* Éléments du menu déroulant */
.dropdown-item {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dropdown-item:hover {
  background-color: var(--hover-bg);
  color: var(--text-color);
}

.mobile-nav {
  display: none;
  /* rendre invisibles les elements de mobile dans le grands ecrans */
  position: fixed;
  /* fixer ca  et il faut changer la position pour que ca soit en haut*/
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-color);

  padding: 0.01rem 0;
  /* augmenter la hauteur de sont navbar*/
  box-shadow: 0 -2px 5px var(--shadow-color);
  /* ca augmente la taille de sont navbar en hauteur il faut changer */
  z-index: 999;
  /* S'assurer que la navbar reste au-dessus des cartes */

}

.mobile-nav-menu {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  list-style: none;
  padding: 0.5rem;
  margin: 0;
  overflow-x: auto;
  /* Ajoute un défilement horizontal si besoin */
  white-space: nowrap;
  /* Empêche les éléments de se casser en ligne */
  width: 100%;
}


.mobile-nav-item {
  position: relative;
  text-align: center;
}


.mobile-nav-item a {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  font-size: 0.9rem !important;
}

.mobile-nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background-color: var(--navrigt-primary-bg);
  transition: width 0.3s ease;
}

.mobile-nav-item:hover::after {
  width: 100%;
  /* Ligne s'étend au survol */
}

.mobile-nav-item a i {
  font-size: 18px;
  /* Augmenter la taille des icônes sans affecter la taille de la navbar */
  color: var(--text-color);

  /* Ajouter un léger espace entre l'icône et le texte */
}

.mobile-list {
  display: none;
}

/* Conteneur global de la sous-navbar */
.sub-navbar-container {
  position: fixed;
  /* Fixe la sous-navbar en haut */
  top: 60px;
  left: 0;
  width: 100%;
  /* S'étend sur toute la largeur */
  background: var(--bg-color);
  z-index: 1000;
  /* Reste au-dessus des autres éléments */
  overflow-x: auto;
  /* Active le défilement horizontal */
  overflow-y: hidden;
  /* Désactive le défilement vertical pour éviter des barres inutiles */
  -webkit-overflow-scrolling: touch;
  /* Défilement fluide sur iOS */
}


/* Cache la barre de défilement sur Chrome */
.sub-navbar-container::-webkit-scrollbar {
  display: none;
}

/* Liste des éléments */
.sub-navbar ul {
  display: inline-flex;
  list-style: none;
  margin: 0;
  padding: 7px;
  white-space: nowrap;
  /* Assure que tous les éléments restent sur une seule ligne */
}

.sub-navbar li {
  margin: -7px;
}

/* Style des liens */
.sub-navbar a {
  color: var(--text-color);
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 20px;
  background:var(--navrigt-primary-bg);
  transition: all 0.3s;
  font-size: var(--taille-text-pc);
  margin: 0 6px;
}

/* Effet hover */
.sub-navbar a:hover {
  background: var(--navrigt-primary-bg);
  transform: scale(1.05);
}

#search-input {
  border: 1px solid var(--navrigt-primary-bg);
  border-radius: 5px;
  padding: 10px 10px;
  cursor: pointer;
  height: 35px;
  width: 300px;
}

#search-input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.user-avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
}


/* Update media queries */
@media screen and (max-width: 768px) {
  /* Style des éléments de navigation */
    .nav-item a {
  
      font-size: var(--taille-titre-mo);
     
  
    }
        .sidebar-item,
        .titre-item {
          font-size: var(--taille-titre-mo);
    
        }
  #search-input {
    display: none;
  }
    .sidebar-item i {
      font-size: var(--taille-icon-mo);
   
    }
/* Style des liens */
.sub-navbar a {
  
  font-size: var(--taille-text-mo);
}
  
    .logo-container {
      flex-shrink: 1;
      min-width: 0;
    }
  
    .nav-right {
      flex-shrink: 0;
    }

  .left-sidebar {
    display: none;
    /* Hide sidebar on mobile */
  }

  .main-content {
    margin-left: 0;
    /* Remove margin since sidebar is hidden */
    margin-bottom: 60px;
    /* Add margin for mobile nav */
  }

  .mobile-nav {
    display: flex;
    /* Show mobile nav */
  }

  .nav-center {
    display: none;
    /* Hide central navigation */
  }

  .top-navbar {
    padding: 10px 15px;
    justify-content: space-between;
  }

  .nav-right {
    gap: 10px;
  }

  .mobile-list {
    display: block;
    margin-top: 0;
    z-index: 99;

  }



  /* Conteneur global de la sous-navbar */
  .sub-navbar-container {
    position: fixed;
    /* Fixe la sous-navbar en haut */
    top: 60px;
    left: 0;
    width: 100%;
    /* S'étend sur toute la largeur */
    background: var(--bg-color);
    z-index: 1000;
    /* Reste au-dessus des autres éléments */
    overflow-x: auto;
    /* Active le défilement horizontal */
    overflow-y: hidden;
    /* Désactive le défilement vertical pour éviter des barres inutiles */
    -webkit-overflow-scrolling: touch;
    display: block;
    /* Défilement fluide sur iOS */
  }


  /* Cache la barre de défilement sur Chrome */
  .sub-navbar-container::-webkit-scrollbar {
    display: none;
  }

  /* Liste des éléments */
  .sub-navbar ul {
    display: inline-flex;
    list-style: none;
    margin: 0;
    white-space: nowrap;
    /* Assure que tous les éléments restent sur une seule ligne */
  }

  .sub-navbar li {
    margin: -7px;
  }

  /* Style des liens */
  .sub-navbar a {
    color: var(--text-color);
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 20px;
    background: var(--navrigt-primary-bg);
    transition: all 0.3s;
    font-size: var(--taille-text-mo);
    margin: 0 6px;
  }

  /* Effet hover */
  .sub-navbar a:hover {
    background: var(--navrigt-primary-bg);
    transform: scale(1.05);
  }
    .logo-text {
      font-size: 24px !important;
     
    }

}

