/* ============================================
   CHEZ IYA – main.css
   Styles complémentaires & animations
   ============================================ */

/* ============================================
   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); }
}

@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,197,24,0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(245,197,24,0); }
}

.animate-fade-up {
  animation: fadeInUp 0.7s ease both;
}

.animate-fade-left {
  animation: fadeInLeft 0.7s ease both;
}

.animate-fade-right {
  animation: fadeInRight 0.7s ease both;
}

.animate-scale {
  animation: scaleIn 0.5s ease both;
}

/* Délais d'animation */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ============================================
   LOADER / PRELOADER
   ============================================ */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--purple-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white);
}

.loader-logo span {
  color: var(--gold);
}

.loader-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(245,197,24,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   MENU NAVIGATION – ÉTAT ACTIF
   ============================================ */
.site-header .site-nav a.active {
  background: rgba(245,197,24,0.15);
  color: var(--gold);
}

/* Burger animé */
.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   SECTION PROMO BANNER
   ============================================ */
.promo-banner {
  background: var(--gold);
  color: var(--purple-dark);
  text-align: center;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1001;
}

.promo-banner a {
  color: var(--purple-dark);
  text-decoration: underline;
  margin-left: 8px;
}

/* ============================================
   MENU FILTRAGE ANIMÉ
   ============================================ */
.menu-card {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.menu-card.hidden {
  display: none;
}

.menu-card.fade-out {
  opacity: 0;
  transform: scale(0.95);
}

/* ============================================
   FORMULAIRE – ÉTATS
   ============================================ */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.form-group input.success,
.form-group select.success,
.form-group textarea.success {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}

.form-message-success {
  background: #ECFDF5;
  border: 1px solid #6EE7B7;
  color: #065F46;
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-message-error {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Bouton chargement */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn-loading::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   GALERIE – LIGHTBOX SIMPLE
   ============================================ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox-overlay.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-inner img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: var(--gold);
  color: var(--purple-dark);
}

.lightbox-caption {
  text-align: center;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  margin-top: 12px;
  font-family: 'Playfair Display', serif;
}

/* ============================================
   STICKY CTA BAR (mobile)
   ============================================ */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 990;
  background: var(--purple-dark);
  border-top: 2px solid var(--gold);
  padding: 10px 16px;
  gap: 10px;
}

@media (max-width: 768px) {
  .sticky-cta {
    display: flex;
  }

  .sticky-cta a {
    flex: 1;
    text-align: center;
    padding: 11px 12px;
    font-size: 0.82rem;
  }

  /* Espace pour la sticky bar */
  body {
    padding-bottom: 64px;
  }

  .whatsapp-float {
    bottom: 80px;
  }

  .back-to-top {
    bottom: 148px;
  }
}

/* ============================================
   SCROLL REVEAL (intersection observer)
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================
   CARDS PLATS – VEDETTE
   ============================================ */
.menu-card.vedette {
  border: 2px solid var(--gold);
  position: relative;
}

.menu-card.vedette::before {
  content: '⭐ Vedette';
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--gold);
  color: var(--purple-dark);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  z-index: 2;
}

/* ============================================
   WORDPRESS – CLASSES STANDARDS
   ============================================ */
.wp-block-image img {
  border-radius: var(--radius-md);
}

.wp-block-quote {
  border-left: 4px solid var(--gold);
  padding-left: 20px;
  font-style: italic;
  color: var(--gray);
}

.aligncenter {
  display: block;
  margin: 0 auto;
}

.alignright { float: right; margin-left: 20px; }
.alignleft  { float: left;  margin-right: 20px; }

.entry-content p     { margin-bottom: 1.2em; }
.entry-content h2    { font-family: 'Playfair Display', serif; color: var(--purple-dark); margin: 1.5em 0 0.5em; }
.entry-content h3    { font-family: 'Playfair Display', serif; color: var(--purple-main); margin: 1.2em 0 0.4em; }
.entry-content ul    { list-style: disc; padding-left: 1.5em; margin-bottom: 1.2em; }
.entry-content ol    { list-style: decimal; padding-left: 1.5em; margin-bottom: 1.2em; }
.entry-content a     { color: var(--purple-main); text-decoration: underline; }
.entry-content a:hover { color: var(--gold-dark); }

/* ============================================
   PAGINATION
   ============================================ */
.nav-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.nav-links a,
.nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--purple-main);
  transition: var(--transition);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links .current {
  background: var(--purple-main);
  border-color: var(--purple-main);
  color: var(--white);
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-light); }
::-webkit-scrollbar-thumb { background: var(--purple-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple-main); }

/* ============================================
   SÉLECTION TEXTE
   ============================================ */
::selection {
  background: var(--gold);
  color: var(--purple-dark);
}
