/* ============================================
   JUNSPRO - USER MENU PREMIUM
   ============================================ */

/* Container du dropdown */
.header-area .more-option .item {
  position: relative;
  z-index: 100000;
}

/* S'assurer que le container reste au-dessus de tout sur services/explore */
.services-page-premium .header-area .more-option .item,
.explore-page-premium .header-area .more-option .item {
  position: relative !important;
  z-index: 100000 !important;
}

/* Bouton utilisateur */
.header-area .more-option .item .user-menu-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3), 0 2px 4px rgba(0, 0, 0, 0.08);
  position: relative;
}

/* Masquer la flèche Bootstrap */
.header-area .more-option .item .user-menu-btn::after {
  display: none !important;
}

.header-area .more-option .item .user-menu-btn:hover {
  background: linear-gradient(135deg, #5B52F0 0%, #8B5CF6 100%) !important;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.header-area .more-option .item .user-menu-btn:focus,
.header-area .more-option .item .user-menu-btn:active,
.header-area .more-option .item .user-menu-btn.show {
  outline: 2px solid rgba(124, 58, 237, 0.4) !important;
  outline-offset: 2px;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-area .more-option .item .user-menu-btn svg {
  width: 22px;
  height: 22px;
  stroke: white !important;
  stroke-width: 1.5;
  fill: none !important;
  flex-shrink: 0;
}

.header-area .more-option .item .user-menu-btn img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Menu déroulant premium */
.header-area .more-option .item .dropdown-menu.user-menu-premium {
  right: 0 !important;
  left: auto !important;
  min-width: 220px;
  max-width: 240px;
  margin-top: 10px;
  padding: 6px;
  background: #FFFFFF !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
  position: absolute !important;
  z-index: 99999 !important;
  transform: none !important;
  top: 100% !important;
  /* Laisser Bootstrap gérer display avec la classe .show */
}

/* Forcer le z-index sur les pages services et explore */
body:has(.services-page-premium) .header-area .more-option .item .dropdown-menu.user-menu-premium,
body:has(.explore-page-premium) .header-area .more-option .item .dropdown-menu.user-menu-premium {
  z-index: 99999 !important;
}

/* Alternative pour navigateurs sans support :has() */
.services-page-premium ~ * .header-area .more-option .item .dropdown-menu.user-menu-premium,
.explore-page-premium ~ * .header-area .more-option .item .dropdown-menu.user-menu-premium {
  z-index: 99999 !important;
}

/* Flèche vers le haut (triangle) - Alignée avec le bouton */
.header-area .more-option .item .dropdown-menu.user-menu-premium::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #FFFFFF;
  filter: drop-shadow(0 -2px 4px rgba(15, 23, 42, 0.1));
  z-index: 1;
}

/* Ombre de la flèche pour fusionner avec le menu */
.header-area .more-option .item .dropdown-menu.user-menu-premium::after {
  content: '';
  position: absolute;
  top: -9px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 9px solid rgba(15, 23, 42, 0.08);
  z-index: 0;
}

/* Items du menu */
.header-area .more-option .item .dropdown-menu.user-menu-premium .dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  margin: 2px 4px;
  color: #111827 !important;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  width: calc(100% - 8px);
  text-align: left;
  border-radius: 10px;
  cursor: pointer;
}

.header-area .more-option .item .dropdown-menu.user-menu-premium .dropdown-item:hover,
.header-area .more-option .item .dropdown-menu.user-menu-premium .dropdown-item:focus {
  background: #F5F3FF !important;
  color: #0F172A !important;
  outline: none;
}

.header-area .more-option .item .dropdown-menu.user-menu-premium .dropdown-item:active {
  background: #EDE9FE !important;
  color: #4338CA !important;
}

/* Icônes des items */
.header-area .more-option .item .dropdown-menu.user-menu-premium .dropdown-item .menu-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  color: #111827;
}

.header-area .more-option .item .dropdown-menu.user-menu-premium .dropdown-item:hover .menu-icon,
.header-area .more-option .item .dropdown-menu.user-menu-premium .dropdown-item:focus .menu-icon {
  color: #0F172A;
}

/* Texte des items */
.header-area .more-option .item .dropdown-menu.user-menu-premium .dropdown-item span {
  flex: 1;
  line-height: 1.4;
}

/* Séparateur optionnel */
.header-area .more-option .item .dropdown-menu.user-menu-premium .dropdown-divider {
  margin: 4px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
  .header-area .more-option .item .dropdown-menu.user-menu-premium {
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    min-width: 200px;
    max-width: 200px;
    top: 100% !important;
  }

  .header-area .more-option .item .dropdown-menu.user-menu-premium::before,
  .header-area .more-option .item .dropdown-menu.user-menu-premium::after {
    right: 20px;
    left: auto;
    transform: none;
  }

  .header-area .more-option .item .dropdown-menu.user-menu-premium .dropdown-item {
    min-height: 44px;
    padding: 12px 18px;
  }
}

@media (max-width: 480px) {
  .header-area .more-option .item .dropdown-menu.user-menu-premium {
    min-width: 180px;
    max-width: 180px;
  }
}
