/* public/css/favorites.css */
/* ==============================================================================
   AURA STORE — STYLES & MICRO-INTERACTIONS DU BOUTON FAVORI
   ============================================================================== */

/* ─── Bouton Favori Circulaire Glassmorphism ─────────────────────────────── */
.aura-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 15;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: #64748b;
  outline: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.2s ease,
              box-shadow 0.25s ease,
              border-color 0.2s ease,
              color 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto !important;
}

.aura-fav-btn:hover {
  transform: scale(1.14);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.22);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.25);
}

.aura-fav-btn:active {
  transform: scale(0.9);
}

.aura-fav-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35);
}

/* ─── Support Inline (pour fiches de détail produit, vitrine, etc.) ───────── */
.aura-fav-btn.is-inline {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  display: inline-flex !important;
  flex-shrink: 0;
}

/* ─── SVG du Coeur (Inactif / Outline) ────────────────────────────────────── */
.aura-fav-btn svg,
.aura-fav-btn .fav-icon,
.aura-fav-btn .fav-heart-svg {
  width: 20px;
  height: 20px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              stroke 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

/* ─── État Favori Actif (Rempli Rouge Vibrant + Halo) ─────────────────────── */
.aura-fav-btn.favorited,
.aura-fav-btn.is-favorite {
  color: #ef4444 !important;
  background: #ffffff !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.28) !important;
}

.aura-fav-btn.favorited svg,
.aura-fav-btn.favorited .fav-icon,
.aura-fav-btn.favorited .fav-heart-svg,
.aura-fav-btn.is-favorite svg,
.aura-fav-btn.is-favorite .fav-icon,
.aura-fav-btn.is-favorite .fav-heart-svg {
  fill: #ef4444 !important;
  stroke: #ef4444 !important;
  filter: drop-shadow(0 2px 4px rgba(239, 68, 68, 0.4));
}

/* ─── Micro-interaction : AJOUT (Rebond Spring + Shockwave + Particules) ─── */
.aura-fav-btn.anim-add {
  animation: btnAddJump 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.aura-fav-btn.anim-add svg,
.aura-fav-btn.anim-add .fav-icon,
.aura-fav-btn.anim-add .fav-heart-svg {
  animation: heartAddPulse 0.48s cubic-bezier(0.175, 0.885, 0.32, 1.35) forwards;
}

/* Onde de choc circulaire */
.aura-fav-btn.anim-add::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #ef4444;
  opacity: 0;
  pointer-events: none;
  animation: ringBurst 0.55s cubic-bezier(0, 0, 0.2, 1) forwards;
}

/* Éclats de micro-particules scintillantes */
.aura-fav-btn.anim-add::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  pointer-events: none;
  background-image: 
    radial-gradient(circle, #ef4444 2.5px, transparent 2.5px),
    radial-gradient(circle, #f43f5e 2.5px, transparent 2.5px),
    radial-gradient(circle, #fb7185 2px, transparent 2px),
    radial-gradient(circle, #ef4444 2px, transparent 2px);
  background-size: 8px 8px, 8px 8px, 6px 6px, 6px 6px;
  background-position: 8% 8%, 92% 8%, 92% 92%, 8% 92%;
  background-repeat: no-repeat;
  animation: particleBurst 0.5s ease-out forwards;
}

@keyframes btnAddJump {
  0% { transform: scale(1); }
  35% { transform: scale(1.18) translateY(-3px); }
  100% { transform: scale(1); }
}

@keyframes heartAddPulse {
  0% { transform: scale(0.3); opacity: 0.5; }
  45% { transform: scale(1.48); }
  75% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes ringBurst {
  0% { transform: scale(0.65); opacity: 0.95; }
  60% { opacity: 0.4; }
  100% { transform: scale(1.75); opacity: 0; }
}

@keyframes particleBurst {
  0% { transform: scale(0.3); opacity: 1; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* ─── Micro-interaction : RETRAIT (Scale Down doux et propre) ─────────────── */
.aura-fav-btn.anim-remove svg,
.aura-fav-btn.anim-remove .fav-icon,
.aura-fav-btn.anim-remove .fav-heart-svg {
  animation: heartRemoveShrink 0.32s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes heartRemoveShrink {
  0% { transform: scale(1.25); }
  40% { transform: scale(0.72); }
  80% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ─── Micro-élévation subtile de la carte parente (Section 18) ───────────── */
.fav-card-bump {
  animation: cardBumpElevation 0.36s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

@keyframes cardBumpElevation {
  0% { transform: translateY(0); }
  40% { transform: translateY(-4px); box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.16); }
  100% { transform: translateY(0); }
}

/* ─── Bouton Favori Grand Format (Pages de détail) ────────────────────────── */
.aura-fav-btn-large {
  position: static !important;
  width: auto !important;
  height: 48px !important;
  padding: 0 20px !important;
  border-radius: 12px !important;
  gap: 10px !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #334155 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
  display: inline-flex !important;
  align-items: center !important;
}

.aura-fav-btn-large svg,
.aura-fav-btn-large .fav-icon {
  width: 22px !important;
  height: 22px !important;
}

.aura-fav-btn-large.favorited,
.aura-fav-btn-large.is-favorite {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #dc2626 !important;
}

.aura-fav-btn-large:hover {
  transform: translateY(-2px) !important;
  border-color: #f87171 !important;
}

/* ─── Badge compteur dans la Navbar ──────────────────────────────────────── */
.nav-fav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  margin-left: 6px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.nav-fav-badge:empty,
.nav-fav-badge[data-count="0"] {
  display: none;
}

.nav-fav-badge.badge-pop {
  animation: badgePop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badgePop {
  0% { transform: scale(0.6); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ─── Respect de prefers-reduced-motion (Accessibilité) ──────────────────── */
@media (prefers-reduced-motion: reduce) {
  .aura-fav-btn,
  .aura-fav-btn svg,
  .aura-fav-btn .fav-icon,
  .aura-fav-btn.anim-add,
  .aura-fav-btn.anim-add svg,
  .aura-fav-btn.anim-remove svg,
  .aura-fav-btn::before,
  .aura-fav-btn::after,
  .fav-card-bump {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
