/**
 * Styles pour la barre d'administration
 * Barre séparée qui apparaît uniquement quand l'utilisateur est connecté
 */

/* Barre d'administration */
.admin-bar {
  background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
  color: white;
  padding: 0.75rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 70px; /* Position sous la navbar principale */
  z-index: 998;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.admin-bar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 768px) {
  .admin-bar-container {
    padding: 0 1rem;
    flex-direction: column;
    align-items: flex-start;
  }
}

.admin-bar-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95);
}

.admin-bar-icon {
  font-size: 1.1rem;
}

.admin-bar-icon-svg {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  flex-shrink: 0;
  stroke: currentColor;
}

.admin-bar-list {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .admin-bar-list {
    width: 100%;
    justify-content: flex-start;
    gap: 0.25rem;
  }
}

.admin-bar-item {
  display: flex;
  align-items: center;
}

.admin-bar-item a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.admin-bar-item a:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
}

.admin-bar-item a.active {
  background-color: rgba(255, 255, 255, 0.25);
  color: white;
  font-weight: 600;
}

.admin-bar-icon-small {
  font-size: 1rem;
  line-height: 1;
}

.admin-bar-badge {
  background-color: rgba(255, 255, 255, 0.25);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 12px;
  margin-left: 0.25rem;
}

.admin-bar-item-right {
  margin-left: auto;
}

@media (max-width: 768px) {
  .admin-bar-item-right {
    margin-left: 0;
  }
}

.admin-bar-logout {
  opacity: 0.85;
}

.admin-bar-logout:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.2);
}

/* Styles pour la navbar principale */
.navbar-item-user {
  margin-left: auto;
}

/* Bouton Connexion — état déconnecté */
.navbar-login-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.25rem;
  background: #0066cc;
  color: #fff;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  min-height: 38px;
  transition: background 150ms ease, box-shadow 150ms ease;
  white-space: nowrap;
}

.navbar-login-link:hover {
  background: #0052a3;
  box-shadow: 0 2px 8px rgba(0,102,204,0.35);
  color: #fff;
}

/* Avatar utilisateur connecté */
.navbar-user-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1rem 0.45rem 0.55rem;
  background: #f5f5f5;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  text-decoration: none;
  min-height: 38px;
  transition: background 150ms ease, border-color 150ms ease;
  white-space: nowrap;
}

.navbar-user-link:hover {
  background: #000;
  border-color: #000;
}

.navbar-user-link:hover .navbar-user-name {
  color: #fff;
}

.navbar-user-link:hover .navbar-user-avatar {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.navbar-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 150ms ease;
}

.navbar-user-avatar svg {
  width: 14px;
  height: 14px;
}

.navbar-user-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  color: #000;
  transition: color 150ms ease;
}

@media (max-width: 768px) {
  .navbar-item-user {
    margin-left: 0;
  }
  
  .admin-bar-list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }
  
  .admin-bar-item a {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }
}
