/* ═══════════════════════════════════════════════════════════════
   LA FIRMA GROS — animations.css  |  Keyframes & Effects
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Typewriter ─────────────────────────────────────────────── */
.typewriter {
  overflow: hidden;
  border-right: 3px solid var(--rouge);
  white-space: nowrap;
  animation:
    typing 2.5s steps(12, end) forwards,
    blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes blink-caret {
  50% { border-color: transparent; }
}

/* ── 2. Float / Lévitation produits ───────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%       { transform: translateY(-16px) rotate(2deg); }
  66%       { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

@keyframes float-delayed {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-20px) rotate(-3deg); }
}

.float       { animation: float       3.5s ease-in-out infinite; }
.float-slow  { animation: float-slow  4.5s ease-in-out infinite; }
.float-delay { animation: float-delayed 5s ease-in-out infinite 1s; }

/* ── 3. Fade & Slide entrée ────────────────────────────────────── */
@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 fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* Classes pour Intersection Observer */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

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

/* Délais échelonnés pour stagger */
.reveal:nth-child(1)  { transition-delay: 0s; }
.reveal:nth-child(2)  { transition-delay: 0.08s; }
.reveal:nth-child(3)  { transition-delay: 0.16s; }
.reveal:nth-child(4)  { transition-delay: 0.24s; }
.reveal:nth-child(5)  { transition-delay: 0.32s; }
.reveal:nth-child(6)  { transition-delay: 0.40s; }
.reveal:nth-child(7)  { transition-delay: 0.48s; }
.reveal:nth-child(8)  { transition-delay: 0.56s; }

/* ── 4. Hero animations ────────────────────────────────────────── */
.hero__title-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.7s var(--ease-out) forwards;
}

.hero__title-word:nth-child(1) { animation-delay: 0.1s; }
.hero__title-word:nth-child(2) { animation-delay: 0.3s; }
.hero__title-word:nth-child(3) { animation-delay: 0.5s; }

.hero__cta-wrap {
  opacity: 0;
  animation: fadeInUp 0.7s var(--ease-out) 0.7s forwards;
}

.hero__stats {
  opacity: 0;
  animation: fadeInUp 0.7s var(--ease-out) 1s forwards;
}

.hero__visual {
  opacity: 0;
  animation: fadeInRight 0.9s var(--ease-out) 0.4s forwards;
}

/* ── 5. Grain texture overlay ──────────────────────────────────── */
.grain-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}

/* ── 6. Shimmer (skeleton) ─────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 37%, #f0f0f0 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

/* ── 7. Pulse ──────────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}

@keyframes pulse-ring {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(200,16,46,0.5); }
  70%  { transform: scale(1);    box-shadow: 0 0 0 12px rgba(200,16,46,0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(200,16,46,0); }
}

.pulse { animation: pulse 2s ease-in-out infinite; }
.pulse-ring { animation: pulse-ring 2s infinite; }

/* ── 8. Particles hero (CSS only) ──────────────────────────────── */
.hero__particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(200, 16, 46, 0.4);
  animation: particle-float linear infinite;
}

@keyframes particle-float {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

.particle:nth-child(1)  { left:  5%; animation-duration: 8s;  animation-delay: 0s;   width: 3px;  height: 3px; }
.particle:nth-child(2)  { left: 12%; animation-duration: 11s; animation-delay: 2s;   width: 5px;  height: 5px; }
.particle:nth-child(3)  { left: 20%; animation-duration: 7s;  animation-delay: 4s;   background: rgba(255,255,255,0.15); }
.particle:nth-child(4)  { left: 30%; animation-duration: 13s; animation-delay: 1s;   width: 2px;  height: 2px; }
.particle:nth-child(5)  { left: 42%; animation-duration: 9s;  animation-delay: 3s;   width: 4px;  height: 4px; background: rgba(255,255,255,0.1); }
.particle:nth-child(6)  { left: 55%; animation-duration: 10s; animation-delay: 0.5s; }
.particle:nth-child(7)  { left: 65%; animation-duration: 8s;  animation-delay: 5s;   width: 3px;  height: 3px; }
.particle:nth-child(8)  { left: 75%; animation-duration: 12s; animation-delay: 2.5s; background: rgba(200,16,46,0.3); }
.particle:nth-child(9)  { left: 85%; animation-duration: 6s;  animation-delay: 1.5s; width: 2px;  height: 2px; }
.particle:nth-child(10) { left: 93%; animation-duration: 9s;  animation-delay: 3.5s; }

/* ── 9. Counter animation ──────────────────────────────────────── */
.counter {
  display: inline-block;
  transition: var(--trans);
}

/* ── 10. Gradient animé ────────────────────────────────────────── */
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.gradient-animated {
  background: linear-gradient(-45deg, var(--rouge), var(--rouge-sombre), #FF6B6B, var(--rouge));
  background-size: 400% 400%;
  animation: gradient-shift 6s ease infinite;
}

/* ── 11. Hover underline ───────────────────────────────────────── */
.hover-underline {
  position: relative;
}

.hover-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--rouge);
  transition: width 0.3s var(--ease);
}

.hover-underline:hover::after { width: 100%; }

/* ── 12. Page load ─────────────────────────────────────────────── */
.page-enter {
  animation: fadeIn 0.4s var(--ease-out) both;
}

/* ── 13. Spinner loader ────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(200,16,46,0.15);
  border-top-color: var(--rouge);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* ── 14. Scroll indicator ──────────────────────────────────────── */
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0) scaleY(1); opacity: 1; }
  50%       { transform: translateY(6px) scaleY(0.7); opacity: 0.5; }
}

.scroll-indicator {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-indicator::before {
  content: '';
  width: 4px;
  height: 8px;
  background: var(--rouge);
  border-radius: 2px;
  animation: scroll-bounce 1.5s ease-in-out infinite;
}
