.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  gap: 1rem;
}

.nav-logo {
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  flex-shrink: 1;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #5E7969;
}

.nav-auth {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}

.nav-auth > a {
  text-decoration: none;
}

.btn-connexion, .btn-inscription {
  padding: 0.5rem 1rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.9rem;
}

.btn-connexion {
  background-color: transparent;
  border: 1px solid #5E7969;
  color: #5E7969;
}

.btn-inscription {
  background-color: #5E7969;
  color: white;
}

h1 {
  color: black;
  font-family: "Playwrite AU QLD", cursive;
  font-optical-sizing: none;
}

/* ── Avatar rond ─────────────────────────────────────────── */
.nav-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #5E7969;
  color: #ffffff !important;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background 0.2s, transform 0.2s;
}

.nav-avatar:hover {
  background-color: #4a6054;
  transform: scale(1.03);
}

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

/* ── Menu dropdown utilisateur ───────────────────────────── */
.nav-user-menu {
    position: relative;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: #fff;
    border: 1px solid #e4e8ed;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.13);
    z-index: 1100;
    overflow: hidden;
}

.nav-dropdown.open {
    display: block;
    animation: dropdownFadeIn 0.15s ease;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nav-dropdown-user {
    padding: 14px 16px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.nav-dropdown-name {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1a2b3c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-dropdown-role {
    display: inline-block;
    margin-top: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #007B5A;
    background: #edf7f2;
    padding: 1px 7px;
    border-radius: 4px;
}

.nav-dropdown-section {
    padding: 4px 0;
}

.nav-dropdown-label {
    display: block;
    padding: 6px 16px 2px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #b0bec8;
}

.nav-dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 2px 0;
}

.nav-user-menu .nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    font-size: 0.85rem;
    color: #2c3e50 !important;
    text-decoration: none !important;
    transition: background 0.12s;
    cursor: pointer;
}

.nav-user-menu .nav-dropdown-item svg { color: #8a9bb0; flex-shrink: 0; }

.nav-user-menu .nav-dropdown-item:hover {
    background: #f5f7fa;
    color: #1a2b3c !important;
}

.nav-user-menu .nav-dropdown-item:hover svg { color: #007B5A; }

.nav-user-menu .nav-dropdown-item--highlight {
    color: #007B5A !important;
    font-weight: 600;
}

.nav-user-menu .nav-dropdown-item--highlight svg { color: #007B5A; }
.nav-user-menu .nav-dropdown-item--highlight:hover { background: #edf7f2; }

.nav-user-menu .nav-dropdown-item--danger { color: #c0392b !important; }
.nav-user-menu .nav-dropdown-item--danger svg { color: #e0a0a0; }
.nav-user-menu .nav-dropdown-item--danger:hover { background: #fdf0ef; color: #922b21 !important; }

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  flex-shrink: 0;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: #333;
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ── Logo cercle ─────────────────────────────────────────── */
.nav-logo-link {
  text-decoration: none;
  display: inline-block;
}

.nav-logo-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #004d33;
  color: white;
  font-family: 'Playwrite AU QLD', cursive;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: background 0.2s ease;
}

.nav-logo-circle:hover {
  background: #006644;
}

/* ── Responsive 1024px ───────────────────────────────────── */
@media (max-width: 1024px) {
  .main-nav {
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  .btn-connexion, .btn-inscription {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* ── Responsive 768px ────────────────────────────────────── */
@media (max-width: 768px) {
  .main-nav {
    padding: 0 1rem;
    height: 65px;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .nav-logo {
    order: 1;
    flex: 1;
    min-width: 0;
  }

  .nav-logo h1 {
    font-size: 1.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-auth {
    order: 2;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 65px;
    left: 0;
    width: 100%;
    background-color: white;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    gap: 0;
    z-index: 999;
  }

  .nav-links.active {
    display: flex !important;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .btn-connexion, .btn-inscription {
    padding: 0.35rem 0.6rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .nav-welcome {
    display: none;
  }
}

/* ── Responsive 480px ────────────────────────────────────── */
@media (max-width: 480px) {
  .btn-connexion, .btn-inscription {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
  }

  .nav-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }

  .nav-avatar-img {
    width: 34px;
    height: 34px;
  }
}


