
/* Dropdown Menu Button */
.dropdown-menu-btn {
  position: fixed;
  top: 70px;
  left: 20px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  width: auto;
  max-width: 150px;
}

.dropdown-menu-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.dropdown-menu-btn.active {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.menu-icon {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 20px;
}

.menu-icon span {
  width: 100%;
  height: 2px;
  background: white;
  border-radius: 1px;
  transition: all 0.3s ease;
}

.dropdown-menu-btn.active .menu-icon span:first-child {
  transform: rotate(45deg) translate(6px, 6px);
}

.dropdown-menu-btn.active .menu-icon span:nth-child(2) {
  opacity: 0;
}

.dropdown-menu-btn.active .menu-icon span:third-child {
  transform: rotate(-45deg) translate(6px, -6px);
}

.menu-text {
  font-size: 0.9rem;
}

/* Dropdown Menu Container */
.dropdown-menu-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 998;
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.dropdown-menu-container.show {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 130px 20px 20px 20px;
}

.dropdown-menu-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  width: 350px;
  max-width: 350px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  color: white;
}

/* Menu Header */
.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  position: sticky;
  top: 0;
  background: inherit;
  border-radius: 20px 20px 0 0;
  z-index: 10;
}

.menu-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
}

.close-menu-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.5rem;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-menu-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Menu Sections */
.menu-sections {
  padding: 1rem 0;
}

.menu-section {
  margin-bottom: 1.5rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-icon {
  font-size: 1.2rem;
}

.section-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Menu Items */
.menu-items {
  padding: 0.5rem 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 2rem;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  position: relative;
  font-size: 0.95rem;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
  padding-left: 2.5rem;
}

.menu-item.current-page {
  background: rgba(255, 255, 255, 0.2);
  border-left: 4px solid white;
  font-weight: bold;
}

.menu-item.current-page::before {
  content: '●';
  position: absolute;
  left: 1rem;
  color: #4ade80;
  font-size: 0.8rem;
}

.item-icon {
  font-size: 1.1rem;
  min-width: 20px;
  text-align: center;
}

.item-text {
  flex: 1;
  text-align: left;
}

/* Notification Badge dans le menu */
.menu-item .notification-badge {
  background: #ff4757;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-left: auto;
}

/* Menu Footer */
.menu-footer {
  padding: 1.5rem 2rem;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.1);
  border-radius: 0 0 20px 20px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.user-name {
  font-weight: bold;
  font-size: 1.1rem;
}

.user-level {
  font-size: 0.9rem;
  opacity: 0.8;
}

.user-xp {
  font-size: 0.8rem;
  opacity: 0.7;
  color: #4ade80;
  font-weight: 500;
}

/* Animations */
@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-menu-container.show .dropdown-menu-content {
  animation: slideInFromTop 0.3s ease-out;
}

.menu-item {
  opacity: 0;
  animation: fadeInUp 0.3s ease-out forwards;
}

.menu-item:nth-child(1) { animation-delay: 0.1s; }
.menu-item:nth-child(2) { animation-delay: 0.15s; }
.menu-item:nth-child(3) { animation-delay: 0.2s; }
.menu-item:nth-child(4) { animation-delay: 0.25s; }
.menu-item:nth-child(5) { animation-delay: 0.3s; }
.menu-item:nth-child(6) { animation-delay: 0.35s; }
.menu-item:nth-child(7) { animation-delay: 0.4s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .dropdown-menu-btn {
    top: 65px;
    left: 15px;
    padding: 0.6rem 0.8rem;
  }

  .menu-text {
    display: none;
  }

  .dropdown-menu-container.show {
    padding: 120px 15px 15px 15px;
  }

  .dropdown-menu-content {
    width: 300px;
    max-width: 300px;
  }

  .menu-header {
    padding: 1rem 1.5rem;
  }

  .section-header {
    padding: 0.6rem 1.5rem;
  }

  .menu-item {
    padding: 0.6rem 1.5rem;
  }

  .menu-item:hover {
    padding-left: 2rem;
  }

  .menu-footer {
    padding: 1rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .dropdown-menu-btn {
    top: 60px;
    left: 10px;
    padding: 0.5rem;
  }

  .dropdown-menu-container.show {
    padding: 110px 10px 10px 10px;
  }

  .dropdown-menu-content {
    width: 280px;
    max-width: 280px;
  }

  .menu-header h3 {
    font-size: 1.3rem;
  }
}

/* Scrollbar personnalisé pour le menu */
.dropdown-menu-content::-webkit-scrollbar {
  width: 6px;
}

.dropdown-menu-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.dropdown-menu-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.dropdown-menu-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* États spéciaux */
.menu-item:active {
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(3px);
}

.menu-item:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* Effet de survol sur les sections */
.section-header:hover {
  background: rgba(255, 255, 255, 0.15);
}
