/* ═══════════════════════════════════════════════════
   KLUUB PRODUCTION — ANIMATIONS & TRANSITIONS
   ═══════════════════════════════════════════════════ */

/* ─── Keyframes ────────────────────────────────────── */

@keyframes scrollPulse {
  0%   { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50%  { opacity: 1; transform: scaleY(1); transform-origin: top; }
  100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes heroReveal {
  0%   { opacity: 0; transform: translateY(20px) skewY(.5deg); }
  100% { opacity: 1; transform: translateY(0) skewY(0); }
}

/* ─── Hero entrance ────────────────────────────────── */

.hero-eyebrow {
  animation: fadeIn .8s ease forwards;
  animation-delay: .2s;
  opacity: 0;
}

.hero-title .title-line:nth-child(1) {
  animation: heroReveal .9s cubic-bezier(.25,.46,.45,.94) forwards;
  animation-delay: .4s;
  opacity: 0;
}

.hero-title .title-line:nth-child(2) {
  animation: heroReveal .9s cubic-bezier(.25,.46,.45,.94) forwards;
  animation-delay: .6s;
  opacity: 0;
}

.hero-title .title-line:nth-child(3) {
  animation: heroReveal .9s cubic-bezier(.25,.46,.45,.94) forwards;
  animation-delay: .8s;
  opacity: 0;
}

.hero-sub {
  animation: fadeIn .8s ease forwards;
  animation-delay: 1s;
  opacity: 0;
}

.hero-btn {
  animation: fadeUp .7s ease forwards;
  animation-delay: 1.2s;
  opacity: 0;
}

.hero-scroll-hint {
  animation: fadeIn 1s ease forwards;
  animation-delay: 1.8s;
  opacity: 0;
}

/* ─── Scroll-reveal (Intersection Observer) ────────── */

.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .75s cubic-bezier(.25,.46,.45,.94),
              transform .75s cubic-bezier(.25,.46,.45,.94);
}

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

/* Décalages */
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }
.delay-3 { transition-delay: .36s; }
.delay-4 { transition-delay: .48s; }

/* ─── Service card hover accent ────────────────────── */

.service-icon svg {
  transition: transform .35s cubic-bezier(.25,.46,.45,.94);
}

.service-card:hover .service-icon svg {
  transform: scale(1.1) rotate(-4deg);
}

/* ─── Portfolio image zoom effect ──────────────────── */

.portfolio-item {
  transition: box-shadow .4s ease;
}

.portfolio-item:hover {
  box-shadow: 0 0 0 1px rgba(201,169,110,.3);
}

/* ─── Formation badge rotation ─────────────────────── */

.formation-badge {
  animation: none;
  transition: transform .4s ease;
}

.formation-badge:hover {
  transform: scale(1.08) rotate(5deg);
}

/* ─── Nav link active state ────────────────────────── */

.main-nav a.active {
  color: var(--clr-accent);
}

.main-nav a.active::after {
  right: 0;
}

/* ─── Submit button pulse ──────────────────────────── */

@keyframes btnGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,169,110,.4); }
  50%       { box-shadow: 0 0 0 8px rgba(201,169,110,.0); }
}

.submit-btn:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 3px;
}

/* ─── Header slide-down ────────────────────────────── */

.site-header {
  animation: fadeIn .6s ease forwards;
}

/* ─── Scroll line hero ─────────────────────────────── */

@keyframes scrollDrop {
  0%   { height: 0; opacity: 1; }
  60%  { height: 60px; opacity: 1; }
  100% { height: 60px; opacity: 0; transform: translateY(20px); }
}

.scroll-line {
  animation: scrollDrop 2.2s ease-in-out infinite;
}

/* ─── Form focus ring ──────────────────────────────── */

.form-group input:focus,
.form-group textarea:focus {
  box-shadow: 0 0 0 2px rgba(201,169,110,.12);
}

/* ─── Reduced motion ───────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}
