/**
 * animations.css — MY PRESTIGE
 *
 * Responsabilité : Animations (@keyframes), transitions, effets de révélation,
 * classes de délai .d1–.d5, responsive design (@media).
 *
 * Règle : aucune couleur en dur, tout via variables :root
 */

/* ═══════════════════════════════════════════════════════════
   @KEYFRAMES — Toutes les animations
   ═══════════════════════════════════════════════════════════ */

/* Hero logo glow */
@keyframes lgw {
  from {
    filter: drop-shadow(0 0 12px rgba(232, 223, 160, 0.1));
  }
  to {
    filter: drop-shadow(0 0 40px rgba(232, 223, 160, 0.3));
  }
}

/* Hero zoom */
@keyframes hzm {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.07);
  }
}

/* Hero lines shimmer */
@keyframes shi {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.9;
  }
}

/* Fade up (reveal on scroll) */
@keyframes fu {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll indicator pulse */
@keyframes sp {
  0%,
  100% {
    width: 36px;
  }
  50% {
    width: 54px;
  }
}

/* Compass touch hint pulse */
@keyframes cphpulse {
  0%,
  100% {
    border-color: rgba(232, 223, 160, 0.2);
  }
  50% {
    border-color: rgba(232, 223, 160, 0.6);
  }
}

/* FAB pulse */
@keyframes fp {
  0%,
  100% {
    box-shadow: 0 6px 28px rgba(232, 223, 160, 0.26);
  }
  50% {
    box-shadow: 0 6px 46px rgba(232, 223, 160, 0.44);
  }
}

/* ═══════════════════════════════════════════════════════════
   REVEAL ON SCROLL — Intersection Observer classes
   ═══════════════════════════════════════════════════════════ */

/* Base reveal element (opacity + translateY) */
.rv {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Visible state (when in viewport) */
.rv.vs {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveal delays */
.d1 {
  transition-delay: 0.1s;
}

.d2 {
  transition-delay: 0.2s;
}

.d3 {
  transition-delay: 0.34s;
}

.d4 {
  transition-delay: 0.48s;
}

.d5 {
  transition-delay: 0.62s;
}

/* ═══════════════════════════════════════════════════════════
   SPLIT TEXT — Character-by-character reveal
   ═══════════════════════════════════════════════════════════ */
.split-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s, transform 0.5s;
}

.split-char.vs {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════
   APPLIQUÉES — Hero animations
   ═══════════════════════════════════════════════════════════ */

.hero-img {
  animation: hzm 20s ease-in-out infinite alternate;
}

.hero-ey {
  opacity: 0;
  animation: fu 1s 0.5s forwards;
}

.hero-lg {
  opacity: 0;
  animation: fu 1.2s 0.7s forwards;
}

.hero-tagline {
  opacity: 0;
  animation: fu 1s 1s forwards;
}

.hero-act {
  opacity: 0;
  animation: fu 1s 1.3s forwards;
}

.wish-wrap {
  opacity: 0;
  animation: fu 1s 1.6s forwards;
}

/* ═══════════════════════════════════════════════════════════
   APPLIQUÉES — Compass touch hint
   ═══════════════════════════════════════════════════════════ */
.cph-icon {
  animation: cphpulse 2.5s ease-in-out infinite;
  will-change: transform;
}

/* ═══════════════════════════════════════════════════════════
   APPLIQUÉES — FAB pulse
   ═══════════════════════════════════════════════════════════ */
.fab {
  animation: fp 3s ease-in-out infinite;
  will-change: transform;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE DESIGN — Tablet (1100px and below)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .sec,
  .about,
  .srv,
  .dst,
  .ct {
    padding: 96px 44px;
  }

  .about-g,
  .cp-lay {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .cp-w {
    order: -1;
  }

  .ct-g {
    grid-template-columns: 1fr;
  }

  .ft {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .dest-g {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .dc:first-child {
    grid-row: auto;
  }

  .dc:first-child .dc-nm {
    font-size: 32px;
  }

  .modal-box {
    grid-template-columns: 1fr;
  }

  .modal-img-c {
    min-height: 260px;
  }

  .vb-ct {
    padding: 0 44px;
  }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE DESIGN — Mobile (768px and below)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hero-lg {
    width: clamp(200px, 62vw, 320px);
  }

  .hero-act {
    gap: 18px;
  }

  .wish-wrap {
    max-width: 100%;
  }

  .sec,
  .about,
  .srv,
  .dst,
  .ct {
    padding: 76px 18px;
  }

  .vb-ct {
    padding: 72px 18px;
  }

  .dest-g {
    grid-template-columns: 1fr;
  }

  .ft {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  footer {
    padding: 56px 18px 32px;
  }

  .ff-row {
    grid-template-columns: 1fr;
  }

  .fab {
    bottom: 18px;
    right: 18px;
    width: 48px;
    height: 48px;
    font-size: 16px;
  }

  .alac {
    padding: 20px 18px;
  }

  .ct-col {
    padding: 32px 20px;
  }

  .ct-nav {
    flex-direction: column;
    gap: 0;
  }

  .ct-btn {
    padding: 16px 16px;
    font-size: 16px;
  }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE DESIGN — Small phone (480px and below)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .dest-g {
    grid-template-columns: 1fr;
  }

  .hero-ey::after {
    display: none;
  }

  .modal-box {
    max-height: 100vh;
  }
}

/* ═══════════════════════════════════════════════════════════
   ACCESSIBILITY — Focus & interaction states
   ═══════════════════════════════════════════════════════════ */

/* Visible focus outline for interactive elements */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: 2px;
}

/* Remove outline for mouse users */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
  outline: none;
}

/* ═══════════════════════════════════════════════════════════
   DARK MODE PREFERENCE (optional, future-proofing)
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
