/* Animations 3D pour les boutons du menu Create */

/* FORCE LE MENU À RESTER EN BAS DE L'ÉCRAN - v2.0 */
[data-create-menu="container"] {
  position: fixed !important;
  bottom: 20px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
  animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999 !important;
}

/* Mobile - positionné plus bas pour éviter la tab bar */
@media (max-width: 768px) {
  [data-create-menu="container"] {
    bottom: 85px !important;
    width: 92% !important;
    max-width: 92% !important;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Styles pour les boutons */
[data-menu-item] {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  will-change: transform;
}

/* Effet de brillance animé */
[data-menu-item]::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: translateX(-100%) translateY(-100%) rotate(45deg);
  transition: transform 0.6s;
}

[data-menu-item]:hover::before {
  transform: translateX(100%) translateY(100%) rotate(45deg);
}

/* Effets 3D au hover ET au toucher mobile */
[data-menu-item]:hover,
[data-menu-item]:active {
  transform: translateY(-8px) scale(1.05) !important;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.6),
    0 0 0 2px rgba(255, 255, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

[data-menu-item]:active {
  transform: translateY(-6px) scale(1.03) !important;
  transition-duration: 0.15s !important;
}

/* Effets spécifiques par type - Hover ET Touch */
[data-menu-item="video"]:hover,
[data-menu-item="video"]:active {
  box-shadow:
    0 25px 70px rgba(33, 150, 243, 0.8),
    0 0 60px rgba(33, 150, 243, 0.5),
    0 0 0 3px rgba(255, 255, 255, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.4) !important;
}

[data-menu-item="image"]:hover,
[data-menu-item="image"]:active {
  box-shadow:
    0 25px 70px rgba(122, 73, 194, 0.8),
    0 0 60px rgba(122, 73, 194, 0.5),
    0 0 0 3px rgba(255, 255, 255, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.4) !important;
}

[data-menu-item="upscale"]:hover,
[data-menu-item="upscale"]:active {
  box-shadow:
    0 25px 70px rgba(255, 152, 0, 0.8),
    0 0 60px rgba(255, 152, 0, 0.5),
    0 0 0 3px rgba(255, 255, 255, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.4) !important;
}

[data-menu-item="edit"]:hover,
[data-menu-item="edit"]:active {
  box-shadow:
    0 25px 70px rgba(0, 191, 165, 0.8),
    0 0 60px rgba(0, 191, 165, 0.5),
    0 0 0 3px rgba(255, 255, 255, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.4) !important;
}

[data-menu-item="lipsync"]:hover,
[data-menu-item="lipsync"]:active {
  box-shadow:
    0 25px 70px rgba(233, 30, 99, 0.8),
    0 0 60px rgba(233, 30, 99, 0.5),
    0 0 0 3px rgba(255, 255, 255, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.4) !important;
}

/* Animation de l'icône au hover ET touch */
[data-menu-item]:hover svg,
[data-menu-item]:active svg {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation du texte au hover ET touch */
[data-menu-item]:hover [data-menu-text],
[data-menu-item]:active [data-menu-text] {
  transform: translateY(-2px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile - Animations au TOUCH aussi */
@media (max-width: 768px) {
  [data-menu-item]:hover,
  [data-menu-item]:active {
    transform: translateY(-6px) scale(1.04) !important;
  }

  [data-menu-item]:hover svg,
  [data-menu-item]:active svg {
    transform: scale(1.08) rotate(4deg);
  }

  /* Touch feedback immédiat */
  [data-menu-item]:active {
    transform: translateY(-4px) scale(1.02) !important;
    transition-duration: 0.1s !important;
  }
}

/* Animation de pulsation subtile */
@keyframes subtlePulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

[data-menu-item]::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
}

[data-menu-item]:hover::after {
  opacity: 1;
  animation: subtlePulse 2s ease-in-out infinite;
}
