/* header.css : le bandeau <header> commun à toutes les pages (logo différent de celui de l'accueil). */

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2.5rem;
  border-bottom: 1px solid var(--border);
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-header .brand img {
  height: 32px;
  width: auto;
}

.site-header .nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1rem;
}

.site-header .nav-links a {
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  border-radius: 6px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.site-header .nav-links a:hover,
.site-header .nav-links a.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.account-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(227, 36, 43, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: none;
  cursor: pointer;
}

.account-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-menu {
  position: relative;
}

.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 200px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  padding: 0.5rem 0;
  display: none;
  z-index: 20;
}

.account-menu:hover .account-dropdown,
.account-menu:focus-within .account-dropdown {
  display: block;
}

.account-dropdown .user-name {
  padding: 0.4rem 1rem 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-dropdown a,
.account-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  color: var(--white);
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}

.account-dropdown a:hover,
.account-dropdown button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.account-dropdown .danger {
  color: var(--red);
}

@media (max-width: 640px) {
  .site-header .nav-links {
    display: none;
  }
}
