/* ============================================================
   RIALLIN PERFORMANCE — Enhancements
   Couche d'animations additives, posée sur style.css
   ============================================================ */

:root {
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================
   #2 — Cursor glow (desktop uniquement, via JS)
   ========================================================== */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 480px; height: 480px;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
    rgba(232, 101, 45, 0.10) 0%,
    rgba(232, 101, 45, 0.04) 30%,
    transparent 70%);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.6s ease;
  mix-blend-mode: screen;
}
body.cursor-active .cursor-glow { opacity: 1; }

/* ==========================================================
   #3 — Hero Ken Burns (zoom fort)
   ========================================================== */
.hero__bg { will-change: transform; }
.hero__bg-img {
  transform-origin: center center;
  animation: heroZoomStrong 22s ease-in-out infinite alternate;
}
@keyframes heroZoomStrong {
  0%   { transform: scale(1.04) translate3d(0, 0, 0); }
  100% { transform: scale(1.14) translate3d(-1%, -2%, 0); }
}

/* ==========================================================
   #4 — Hero title char-by-char
   ========================================================== */
.hero__title { position: relative; overflow: visible; }
.hero__title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%) rotate(6deg);
  will-change: transform, opacity;
}
.hero__title.is-animated .char {
  animation: charRise 0.9s var(--ease-expo) forwards;
}
@keyframes charRise {
  from { opacity: 0; transform: translateY(110%) rotate(6deg); }
  to   { opacity: 1; transform: translateY(0) rotate(0); }
}

/* ==========================================================
   #6 — Hero dot pulse (très discret)
   ========================================================== */
.hero__dot {
  display: inline-block;
  animation: dotBeat 3s ease-in-out infinite;
  transform-origin: center;
}
@keyframes dotBeat {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

/* ==========================================================
   #9 — Stats : disposition corrigée + compteurs + trait orange
   - gap plus large pour respiration
   - trait plus fin (1.5px), plus court (60%), centré
   - padding-bottom sur le number pour éviter chevauchement avec label
   ========================================================== */
.stats__inner { gap: 3rem; }
.stats__item {
  gap: 0.9rem;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease-expo), transform 1s var(--ease-expo);
}
.stats__item.in-view {
  opacity: 1;
  transform: translateY(0);
}
.stats__number {
  position: relative;
  display: inline-block;
  padding-bottom: 0.65rem;
  transition: transform 0.6s var(--ease-expo);
}
.stats__number::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  height: 1.5px;
  width: 0;
  background: var(--orange);
  transition: width 1s var(--ease-expo) 0.3s;
}
.stats__item.in-view .stats__number::after { width: 55%; }
.stats__item:hover .stats__number { transform: translateY(-3px); }

/* ==========================================================
   #10 — Section titles word-by-word reveal + text-accent underline
   ========================================================== */
.section-title .word,
.cta-section__title .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.section-title .word > span,
.cta-section__title .word > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 0.9s var(--ease-expo);
}
.section-title.revealed .word > span,
.cta-section__title.revealed .word > span {
  transform: translateY(0);
}
.section-title.revealed .word:nth-child(1) > span,
.cta-section__title.revealed .word:nth-child(1) > span { transition-delay: 0.00s; }
.section-title.revealed .word:nth-child(2) > span,
.cta-section__title.revealed .word:nth-child(2) > span { transition-delay: 0.08s; }
.section-title.revealed .word:nth-child(3) > span,
.cta-section__title.revealed .word:nth-child(3) > span { transition-delay: 0.16s; }
.section-title.revealed .word:nth-child(4) > span,
.cta-section__title.revealed .word:nth-child(4) > span { transition-delay: 0.24s; }
.section-title.revealed .word:nth-child(5) > span,
.cta-section__title.revealed .word:nth-child(5) > span { transition-delay: 0.32s; }
.section-title.revealed .word:nth-child(6) > span,
.cta-section__title.revealed .word:nth-child(6) > span { transition-delay: 0.40s; }

/* underline .text-accent qui se dessine avec le titre */
.text-accent {
  position: relative;
  display: inline-block;
}
.text-accent::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0.02em;
  height: 3px;
  width: 0;
  background: var(--orange);
  transition: width 1.1s var(--ease-expo) 0.6s;
}
.section-title.revealed .text-accent::after,
.cta-section__title.revealed .text-accent::after {
  width: 100%;
}

/* ==========================================================
   #11 — Piliers méthode : hover fort (+ numéros masqués)
   ========================================================== */
.pillar__number { display: none; }
.methode__grid { perspective: 1200px; }
.pillar {
  transition: background 0.5s var(--ease-expo),
              transform 0.6s var(--ease-expo),
              box-shadow 0.6s var(--ease-expo);
  transform-style: preserve-3d;
}
.pillar:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
}
.pillar__icon {
  display: inline-flex;
  transition: transform 0.6s var(--ease-back), color 0.4s, opacity 0.4s;
  transform-origin: center;
}
.pillar:hover .pillar__icon {
  transform: translateY(-4px) rotate(-8deg) scale(1.15);
  opacity: 1;
}
.pillar__title {
  transition: transform 0.5s var(--ease-expo);
}
.pillar:hover .pillar__title {
  transform: translateX(4px);
}

/* pillar reveal custom (plus marqué) */
.pillar[data-reveal] {
  transform: translateY(40px) scale(0.98);
}
.pillar[data-reveal].revealed {
  transform: translateY(0) scale(1);
}

/* ==========================================================
   #12 — Galerie : fondus latéraux + pause au hover + zoom
   ========================================================== */
.gallery { position: relative; }
.gallery::before,
.gallery::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 180px;
  pointer-events: none;
  z-index: 2;
}
.gallery::before {
  left: 0;
  background: linear-gradient(to right,
    var(--dark-deep) 0%,
    var(--dark-deep) 20%,
    transparent 100%);
}
.gallery::after {
  right: 0;
  background: linear-gradient(to left,
    var(--dark-deep) 0%,
    var(--dark-deep) 20%,
    transparent 100%);
}
@media (max-width: 768px) {
  .gallery::before,
  .gallery::after { display: none; }
}
.gallery:hover .gallery__track {
  animation-play-state: paused;
}
.gallery__item {
  position: relative;
  transition: transform 0.5s var(--ease-expo);
}
.gallery__item img {
  transition: transform 0.9s var(--ease-expo), filter 0.6s;
  filter: grayscale(30%) contrast(1.05) brightness(0.92);
}
.gallery__item:hover {
  z-index: 3;
  transform: scale(1.02);
}
.gallery__item:hover img {
  transform: scale(1.12);
  filter: grayscale(0%) contrast(1.08) saturate(1.1) brightness(1);
}
.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(15, 27, 51, 0.65) 100%);
  opacity: 0;
  transition: opacity 0.5s var(--ease-expo);
  pointer-events: none;
}
.gallery__item:hover::after { opacity: 1; }

/* ==========================================================
   #13 — Pricing : tilt 3D + shine radial + badge pulse
   ========================================================== */
.pricing-card {
  transform-style: preserve-3d;
  will-change: transform;
  transition: background 0.5s var(--ease-expo),
              box-shadow 0.5s var(--ease-expo);
}
.pricing-card:hover {
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
}
.pricing-card__shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.09) 0%,
    transparent 40%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.pricing-card:hover .pricing-card__shine { opacity: 1; }

.pricing-card__badge {
  animation: badgePulse 2.4s var(--ease-expo) infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 101, 45, 0.55); }
  50%      { box-shadow: 0 0 0 14px rgba(232, 101, 45, 0); }
}

.pricing-card__amount {
  display: inline-block;
  transition: transform 0.5s var(--ease-back);
}
.pricing-card:hover .pricing-card__amount {
  transform: scale(1.06);
}

.pricing-card__features li {
  transition: transform 0.4s var(--ease-expo);
}
.pricing-card:hover .pricing-card__features li {
  transform: translateX(3px);
}

/* ==========================================================
   #14 — Boutons : sweep lumineux + lift sur primary
   ========================================================== */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    transparent 35%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease-expo);
  z-index: -1;
  pointer-events: none;
}
.btn:hover::before { transform: translateX(120%); }

.btn--primary {
  transition: transform 0.4s var(--ease-back),
              box-shadow 0.4s,
              background 0.3s;
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(232, 101, 45, 0.6);
}

.btn svg { transition: transform 0.4s var(--ease-back); }
.btn:hover svg { transform: translateX(4px); }

/* ==========================================================
   #15 — Nav CTA shine + lift (le blur existe déjà dans style.css)
   ========================================================== */
.nav__cta {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-back),
              box-shadow 0.3s,
              background 0.3s;
}
.nav__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px rgba(232, 101, 45, 0.5);
}
.nav__cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    transparent 35%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease-expo);
}
.nav__cta:hover::before { transform: translateX(120%); }

/* ==========================================================
   #17 — FAQ / Accordéon : easing plus marqué sur l'icône
   (le +→× et la couleur orange existent déjà dans style.css)
   ========================================================== */
.accordion-icon,
.faq-icon {
  transition: transform 0.5s var(--ease-back),
              color 0.3s,
              opacity 0.3s;
}

/* ==========================================================
   #18 — WhatsApp float : pulse discret (1 anneau fin)
   ========================================================== */
.wa-float.visible::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid #25D366;
  animation: waPulseSoft 2.6s ease-out infinite;
  pointer-events: none;
}
@keyframes waPulseSoft {
  0%   { transform: scale(1);   opacity: 0.5; }
  100% { transform: scale(1.5); opacity: 0;   }
}

/* ==========================================================
   Reduce motion
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .gallery__track { animation: none !important; }
}
