/* ─────────────────────────────────────────
   ANIMATIONS & KEYFRAMES
───────────────────────────────────────── */

/* ─── FADE UP (base state — hidden) ─── */
[data-animate="fade-up"] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

[data-animate="fade-up"].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── WORD REVEAL ─── */
[data-animate="word-reveal"] .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

[data-animate="word-reveal"] .word-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.7s var(--ease-out);
}

[data-animate="word-reveal"].is-visible .word-inner {
  transform: translateY(0);
}

/* ─── STAGGER DELAYS for siblings ─── */
[data-animate]:nth-child(1)  { transition-delay: 0ms; }
[data-animate]:nth-child(2)  { transition-delay: 50ms; }
[data-animate]:nth-child(3)  { transition-delay: 100ms; }
[data-animate]:nth-child(4)  { transition-delay: 150ms; }
[data-animate]:nth-child(5)  { transition-delay: 200ms; }
[data-animate]:nth-child(6)  { transition-delay: 250ms; }
[data-animate]:nth-child(7)  { transition-delay: 300ms; }
[data-animate]:nth-child(8)  { transition-delay: 350ms; }
[data-animate]:nth-child(9)  { transition-delay: 400ms; }
[data-animate]:nth-child(10) { transition-delay: 450ms; }
[data-animate]:nth-child(11) { transition-delay: 500ms; }
[data-animate]:nth-child(12) { transition-delay: 550ms; }
[data-animate]:nth-child(13) { transition-delay: 600ms; }
[data-animate]:nth-child(14) { transition-delay: 650ms; }
[data-animate]:nth-child(15) { transition-delay: 700ms; }

/* ─── GLITCH ─── */
@keyframes glitch-skew {
  0%   { transform: skewX(0deg); }
  10%  { transform: skewX(-1deg); }
  20%  { transform: skewX(0.5deg); }
  30%  { transform: skewX(-0.5deg); }
  40%  { transform: skewX(0deg); }
  100% { transform: skewX(0deg); }
}

@keyframes glitch-clip-1 {
  0%  { clip-path: inset(40% 0 50% 0); transform: translate(-4px, 0); }
  20% { clip-path: inset(90% 0 1% 0);  transform: translate(4px, 0); }
  40% { clip-path: inset(40% 0 43% 0); transform: translate(-2px, 0); }
  60% { clip-path: inset(25% 0 58% 0); transform: translate(2px, 0); }
  80% { clip-path: inset(54% 0 7% 0);  transform: translate(-4px, 0); }
  100%{ clip-path: inset(58% 0 43% 0); transform: translate(0, 0); }
}

@keyframes glitch-clip-2 {
  0%  { clip-path: inset(25% 0 58% 0); transform: translate(4px, 0); }
  20% { clip-path: inset(54% 0 7% 0);  transform: translate(-4px, 0); }
  40% { clip-path: inset(58% 0 43% 0); transform: translate(4px, 0); }
  60% { clip-path: inset(40% 0 50% 0); transform: translate(-2px, 0); }
  80% { clip-path: inset(90% 0 1% 0);  transform: translate(2px, 0); }
  100%{ clip-path: inset(40% 0 43% 0); transform: translate(0, 0); }
}

.hero__name-line.is-glitching {
  animation: glitch-skew 0.4s linear;
}

.hero__name-line.is-glitching::before {
  content: attr(data-glitch);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  color: var(--accent-glow);
  animation: glitch-clip-1 0.4s steps(1) forwards;
}

.hero__name-line.is-glitching::after {
  content: attr(data-glitch);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  color: var(--accent);
  animation: glitch-clip-2 0.4s steps(1) forwards;
}

/* ─── BADGE PULSE ─── */
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(123, 47, 255, 0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(123, 47, 255, 0); }
}

/* ─── SCROLL BOUNCE ─── */
@keyframes scroll-bounce {
  0%, 100% { transform: scaleY(1); transform-origin: top; }
  50%       { transform: scaleY(0.4); transform-origin: top; }
}

/* ─── AVAILABLE DOT PULSE ─── */
@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ─── PAGE ENTRY ─── */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── TIMELINE DRAW ─── */
.histoire__svg-line {
  transition: stroke-dashoffset 1.2s var(--ease-out);
}

/* Barres de compétences supprimées — système de cartes dans competences.css */
