/* ========================================
   ORA SHEL TORAH - ANIMATIONS SPÉCIFIQUES
   ======================================== */

/* Particules flottantes */
.particle {
  position: absolute;
  background: var(--color-gold);
  border-radius: 50%;
  pointer-events: none;
  animation: floatUp linear infinite;
  box-shadow: 0 0 10px rgba(237, 162, 52, 0.5);
}

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Animation de chute des boîtes */
.game-box {
  opacity: 0;
  transform: translateY(-100vh);
}

.game-box.fall-animation {
  animation: boxFall 0.8s ease-out forwards;
}

@keyframes boxFall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 0;
  }
  60% {
    transform: translateY(20px) rotate(360deg);
  }
  80% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0) rotate(360deg);
    opacity: 1;
  }
}

/* Aura pulsante des boîtes */
.box-glow {
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { 
    opacity: 0.5; 
    transform: scale(1); 
  }
  50% { 
    opacity: 0.8; 
    transform: scale(1.1); 
  }
}

/* Animation d'apparition des sections */
.section-fade-in {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}

.section-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animation des cartes produit */
.product-card {
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Animation des boutons */
.btn-primary, .btn-secondary, .btn-add-to-cart {
  position: relative;
  overflow: hidden;
}

.btn-primary::before, .btn-secondary::before, .btn-add-to-cart::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before, .btn-secondary:hover::before, .btn-add-to-cart:hover::before {
  left: 100%;
}

/* Animation du panier */
.cart-sidebar {
  transition: right 0.3s ease-in-out;
}

.cart-item {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Animation des modales */
.modal-hero {
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(10px);
  }
}

.modal-content {
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(50px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Animation des témoignages */
.testimonial-card {
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* Animation des statistiques */
.stat-number {
  animation: countUp 2s ease-out;
}

@keyframes countUp {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Animation de chargement */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-off-white);
  border-top: 4px solid var(--color-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Animation de pulsation pour les éléments importants */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Animation de rebond pour les notifications */
.bounce-in {
  animation: bounceIn 0.5s ease-out;
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Animation de glissement pour les éléments de liste */
.slide-in-left {
  animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-in-right {
  animation: slideInRight 0.5s ease-out;
}

/* Animation de rotation pour les icônes */
.rotate {
  animation: rotate 2s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Animation de fade pour les transitions de contenu */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-out {
  animation: fadeOut 0.5s ease-out;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Animation de zoom pour les images */
.zoom-in {
  transition: transform 0.3s ease;
}

.zoom-in:hover {
  transform: scale(1.1);
}

/* Animation de shake pour les erreurs */
.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* Animation de typewriter pour les textes */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--color-gold);
  white-space: nowrap;
  animation: typewriter 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: var(--color-gold);
  }
}

/* Animation de parallaxe pour les éléments de fond */
.parallax {
  transform: translateZ(0);
  will-change: transform;
}

/* Animation de gradient pour les boutons spéciaux */
.gradient-animation {
  background: linear-gradient(-45deg, var(--color-gold), var(--color-gold-light), var(--color-gold), var(--color-gold-light));
  background-size: 400% 400%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Animation de flottement pour les éléments décoratifs */
.float {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Animation de glissement pour les modales */
.modal-slide-up {
  animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Animation de révélation pour les éléments cachés */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animation de chargement avec points */
.loading-dots {
  display: inline-block;
}

.loading-dots::after {
  content: '';
  animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
  0%, 20% {
    content: '';
  }
  40% {
    content: '.';
  }
  60% {
    content: '..';
  }
  80%, 100% {
    content: '...';
  }
}

/* Animation de rotation 3D pour les cartes */
.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.card-3d:hover {
  transform: rotateY(180deg);
}

.card-3d .card-front,
.card-3d .card-back {
  position: absolute;
  backface-visibility: hidden;
}

.card-3d .card-back {
  transform: rotateY(180deg);
}

/* Animation de vague pour les éléments de navigation */
.wave {
  animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(5deg);
  }
  75% {
    transform: rotate(-5deg);
  }
}

/* Animation de pulsation pour les éléments d'alerte */
.alert-pulse {
  animation: alertPulse 1s ease-in-out infinite;
}

@keyframes alertPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
  }
}

/* Animation de glissement pour les éléments de menu */
.menu-slide {
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.menu-slide.open {
  transform: translateX(0);
}

/* Animation de zoom pour les images de produits */
.product-zoom {
  transition: transform 0.3s ease;
  overflow: hidden;
}

.product-zoom:hover img {
  transform: scale(1.1);
}

/* Animation de rotation pour les icônes de chargement */
.spinner {
  animation: spinner 1s linear infinite;
}

@keyframes spinner {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Animation de rebond pour les éléments d'interface */
.bounce {
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Animation de glissement pour les éléments de liste */
.list-item {
  animation: listItemSlide 0.3s ease-out;
}

@keyframes listItemSlide {
  from {
    transform: translateX(-50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Animation de révélation progressive */
.stagger-reveal > * {
  opacity: 0;
  transform: translateY(30px);
  animation: staggerReveal 0.6s ease forwards;
}

.stagger-reveal > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-reveal > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-reveal > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-reveal > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-reveal > *:nth-child(5) { animation-delay: 0.5s; }

@keyframes staggerReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
