/* ============================================
   2HANDS - Animations & Effets Modernes
   Style Apple / Stripe
   ============================================ */

/* ==================== SCROLL SMOOTH & PARALLAX ==================== */
html {
  scroll-behavior: smooth;
}

/* Effet parallax sur le hero */
#accueil img {
  transform: scale(1.1);
  transition: transform 0.3s ease-out;
}

/* ==================== NAVBAR MODERNE ==================== */
#navbar {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

header.scrolled {
  background-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(0);
}

/* Animation des liens navbar */
.nav-link {
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #e63946;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}

.nav-link:hover::before {
  width: 100%;
}

/* ==================== BOUTONS HERO MODERNES ==================== */
#accueil a[href="#menu"],
#accueil a[href^="tel:"] {
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#accueil a[href="#menu"]:hover,
#accueil a[href^="tel:"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(190, 81, 73, 0.3);
}

/* Effet ripple sur les boutons */
#accueil a[href="#menu"]::after,
#accueil a[href^="tel:"]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

#accueil a[href="#menu"]:active::after,
#accueil a[href^="tel:"]:active::after {
  width: 300px;
  height: 300px;
}

/* ==================== FADE IN ANIMATIONS ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Appliquer les animations au scroll */
.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.fade-in-left {
  animation: fadeInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.fade-in-right {
  animation: fadeInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.scale-in {
  animation: scaleIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

/* Délais pour effet cascade */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ==================== CARTES MENU MODERNES ==================== */
/* NOTE: On ne touche PAS aux .acc-card pour ne pas casser l'accordéon mobile */
/* Les transitions sont gérées par votre script.js */

/* Hover uniquement sur desktop et uniquement sur les cartes fermées */
@media (min-width: 768px) {
  .acc-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
  }
  
  .acc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(190, 81, 73, 0.2);
  }
}

.acc-trigger {
  transition: background 0.2s ease;
}

.acc-trigger:hover {
  background: linear-gradient(to right, rgba(252, 246, 234, 0.9), rgba(255, 255, 255, 0.9));
}

/* NE PAS TOUCHER à .acc-panel - géré par votre JS */

/* ==================== IMAGES AVEC EFFET HOVER ==================== */
section img {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

section img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Images grille "Notre histoire" */
#about .grid img {
  position: relative;
  overflow: hidden;
}

#about .grid img::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(190, 81, 73, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#about .grid img:hover::after {
  opacity: 1;
}

/* ==================== GALERIE MODERNE ==================== */
.gallery-slide {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.gallery-slide:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.gallery-slide img {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-slide:hover img {
  transform: scale(1.05);
}

/* Boutons gallery avec effet glass */
.gallery-prev,
.gallery-next {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.9) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-prev:hover,
.gallery-next:hover {
  background-color: rgba(255, 255, 255, 1) !important;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* ==================== TÉMOIGNAGES AVEC EFFET CARTE ==================== */
#avis .bg-white {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

#avis .bg-white:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
  border-color: rgba(190, 81, 73, 0.2);
}

/* Animation étoiles */
#avis .text-yellow-400 i {
  transition: transform 0.2s ease;
}

#avis .bg-white:hover .text-yellow-400 i {
  transform: scale(1.2);
}

/* ==================== SECTION ÉVÉNEMENTIEL ==================== */
#events img {
  filter: grayscale(0%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#events img:hover {
  filter: grayscale(0%);
  transform: scale(1.08) rotate(1deg);
}

/* ==================== FORMULAIRE DE CONTACT ==================== */
input:not([type="hidden"]),
textarea,
select {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus:not([type="hidden"]),
textarea:focus,
select:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(190, 81, 73, 0.15);
  border-color: #e63946 !important;
}

/* Bouton submit avec effet moderne */
button[type="submit"] {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(190, 81, 73, 0.3);
}

button[type="submit"]::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button[type="submit"]:active::before {
  width: 300px;
  height: 300px;
}

/* ==================== ICÔNES RÉSEAUX SOCIAUX ==================== */
#contact a[aria-label*="Facebook"],
#contact a[aria-label*="Instagram"],
#contact a[aria-label*="Uber"] {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

#contact a[aria-label*="Facebook"]:hover,
#contact a[aria-label*="Instagram"]:hover,
#contact a[aria-label*="Uber"]:hover {
  transform: translateY(-4px) rotate(5deg);
  box-shadow: 0 8px 16px rgba(190, 81, 73, 0.3);
}

/* ==================== FOOTER LIENS ==================== */
footer a {
  position: relative;
  transition: all 0.3s ease;
}

footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #e63946;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

footer a:hover::after {
  width: 100%;
}

/* ==================== LOADING ANIMATION ==================== */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==================== SCROLL PROGRESS BAR ==================== */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(to right, #e63946, var(--color-darkred));
  z-index: 9999;
  transition: width 0.1s ease-out;
}

/* ==================== GLASS MORPHISM EFFECTS ==================== */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ==================== TITRES AVEC UNDERLINE ANIMÉ ==================== */
section h2 {
  position: relative;
  display: inline-block;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: #e63946;
  border-radius: 2px;
}

/* Animation au scroll pour les titres */
@keyframes slideInUnderline {
  from {
    width: 0;
  }
  to {
    width: 80px;
  }
}

/* ==================== RESPONSIVE ANIMATIONS ==================== */
@media (max-width: 768px) {
  /* Désactiver certaines animations lourdes sur mobile */
  #accueil img {
    transform: none;
  }
  
  .acc-card:hover {
    transform: none;
  }
  
  section img:hover {
    transform: scale(1.02);
  }
}

/* ==================== PREFERS REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==================== SMOOTH SCROLL SNAP ==================== */
@media (min-width: 768px) {
  /* Optionnel: snap scroll entre sections */
  /* 
  body {
    scroll-snap-type: y proximity;
  }
  
  section {
    scroll-snap-align: start;
  }
  */
}

/* ==================== EFFETS DE PARTICULES AU SURVOL ==================== */
.sparkle {
  position: relative;
}

.sparkle::before {
  content: '✨';
  position: absolute;
  top: -10px;
  right: -10px;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sparkle:hover::before {
  opacity: 1;
  transform: scale(1);
}

/* ==================== MENU PILL AVEC GRADIENT ANIMÉ ==================== */
.menu-pill {
  position: relative;
  background: linear-gradient(135deg, #e63946 0%, var(--color-darkred) 100%);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ==================== CURSOR CUSTOM (optionnel) ==================== */
@media (hover: hover) and (pointer: fine) {
  a, button {
    cursor: pointer;
  }
}