/* =====================================================================
   SALUTATIONS - la phrase au-dessus du pseudo change de style
   ---------------------------------------------------------------------
   Une classe par style (js/salutations.js). Chaque lettre est un
   <span class="l"> avec son rang --i, pour décaler les animations.
   ===================================================================== */

.accueil-salut { min-height: 1.7em; }

.salut-anime {
  display: inline-block;
  white-space: pre;
  transition: opacity 0.35s ease, transform 0.35s ease, filter 0.35s ease;
}

.salut-anime.sortie { opacity: 0; transform: translateY(-8px); filter: blur(3px); }
.salut-anime .l { display: inline-block; }

/* Machine à écrire et terminal : curseur qui clignote */
.salut-caret {
  display: inline-block;
  width: 0.55ch;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.15em;
  background: var(--accent);
  animation: clignote 1s steps(1) infinite;
}

.salut-terminal,
.salut-decodage {
  font-family: ui-monospace, "Cascadia Code", "Courier New", monospace;
  letter-spacing: 0.03em;
}

.salut-terminal { color: var(--accent); }
.salut-decodage { color: var(--accent-2); }

/* Vague : les lettres montent en rebondissant */
.salut-vague .l {
  animation: salut-vague 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) both;
  animation-delay: calc(var(--i) * 35ms);
}

@keyframes salut-vague {
  from { opacity: 0; transform: translateY(0.9em) rotate(10deg); }
}

/* Étoiles : chaque lettre s'allume avec un halo */
.salut-etoiles .l {
  animation: salut-etoile 0.9s ease-out both;
  animation-delay: calc(var(--i) * 45ms);
}

@keyframes salut-etoile {
  0% { opacity: 0; transform: scale(1.8); filter: blur(6px); }
  60% { opacity: 1; filter: blur(0); text-shadow: 0 0 14px var(--accent); }
  100% { text-shadow: none; }
}

/* Néon : l'enseigne grésille avant de s'allumer */
.salut-neon {
  color: var(--accent);
  font-weight: 600;
  text-shadow: 0 0 6px color-mix(in srgb, var(--accent) 70%, transparent), 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
  animation: salut-neon 1.4s linear both;
}

@keyframes salut-neon {
  0% { opacity: 0; }
  8% { opacity: 0.9; }
  10% { opacity: 0.1; }
  18% { opacity: 1; }
  20% { opacity: 0.2; }
  26%, 100% { opacity: 1; }
}

/* Radio : les lettres arrivent dans le désordre, en grésillant */
.salut-radio .l {
  animation: salut-radio 0.5s steps(3) both;
  animation-delay: calc(var(--hasard, 0) * 700ms);
}

@keyframes salut-radio {
  0% { opacity: 0; transform: translateX(-3px); }
  50% { opacity: 0.5; transform: translateX(2px); }
  100% { opacity: 1; transform: none; }
}
