/* ==========================================================================
   S-SUITE - Menu Unifié (Haut Droite)
   Permet de centraliser : Astuces, Installer PWA, Fiche Infos, Téléchargement
   Gain d'espace majeur pour l'affichage des titres et la fluidité sur tablette
   ========================================================================== */

.ssuite-menu-wrapper {
  position: relative;
  display: inline-block;
  z-index: 500;
}

.ssuite-menu-btn {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  padding: 7px 14px !important;
  border-radius: 20px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  transition: all 0.2s ease !important;
  user-select: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  text-decoration: none !important;
  font-family: inherit !important;
}

.ssuite-menu-btn:hover,
.ssuite-menu-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.34) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.ssuite-menu-btn .menu-arrow {
  font-size: 10px;
  transition: transform 0.2s ease;
  opacity: 0.85;
}

.ssuite-menu-btn[aria-expanded="true"] .menu-arrow {
  transform: rotate(180deg);
}

/* Panneau Popover du Menu */
.ssuite-menu-popover {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  max-width: 340px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #cbd5e1;
  padding: 8px;
  z-index: 10000;
  flex-direction: column;
  gap: 3px;
}

.ssuite-menu-popover.is-open {
  display: flex !important;
  animation: ssuiteMenuFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ssuiteMenuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* En-tête du menu */
.ssuite-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: 12px;
  margin-bottom: 4px;
}

.ssuite-menu-header strong {
  font-size: 13.5px;
  color: #0f172a;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ssuite-menu-header small {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

/* Éléments du menu */
.ssuite-menu-item {
  background: transparent;
  border: none;
  border-radius: 12px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  text-decoration: none !important;
  color: #1e293b !important;
  font-family: inherit;
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.ssuite-menu-item:hover,
.ssuite-menu-item:focus {
  background: #f8fafc;
  color: #0f172a !important;
  transform: translateX(2px);
}

.ssuite-menu-item:hover .ssuite-menu-icon {
  transform: scale(1.12);
}

.ssuite-menu-icon {
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.ssuite-menu-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.ssuite-menu-text {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.ssuite-menu-text strong {
  font-size: 13px;
  color: #1e293b;
  font-weight: 700;
  line-height: 1.3;
}

.ssuite-menu-text small {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
  margin-top: 1px;
}

/* Badges spécifiques */
.ssuite-menu-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  flex-shrink: 0;
}

.ssuite-menu-item-pwa:hover .ssuite-menu-badge {
  background: #2563eb;
  color: white;
}

/* Séparateur */
.ssuite-menu-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 5px 6px;
}

/* Adaptation mobile pour petits écrans */
@media (max-width: 480px) {
  .ssuite-menu-popover {
    position: fixed !important;
    top: 62px !important;
    left: 10px !important;
    right: 10px !important;
    max-width: none !important;
    min-width: auto !important;
  }
}
