/* ============================================================
   Tanahub — écran de lancement (splash)
   Voile noir plein écran, logo qui surgit, nom de la marque, puis
   barre de progression qui se remplit avant de laisser place au site.
   ============================================================ */

.splash {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(720px 420px at 50% 42%, rgba(255, 31, 61, .16), transparent 72%),
    #08080a;
  opacity: 1;
  transition: opacity .42s cubic-bezier(.4, 0, .2, 1);
  /* Filet de sécurité : si le JS ne s'exécute pas, le voile se retire seul. */
  animation: th-splash-auto .5s ease 3.2s forwards;
}

.splash.is-leaving { opacity: 0; pointer-events: none; }

/* Déjà vu dans la session (navigation interne) : pas de splash. */
html.th-splash-seen .splash { display: none; }

.splash-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 20px;
}

.splash-logo {
  width: min(300px, 68vw);
  height: auto;
  object-fit: contain;
  animation: th-splash-pop .55s cubic-bezier(.4, 0, .2, 1) both;
  filter: drop-shadow(0 14px 46px rgba(255, 31, 61, .45));
}

.splash-name {
  color: #d8d8d8;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .34em;
  /* compense le letter-spacing pour rester optiquement centré */
  text-indent: .34em;
  opacity: 0;
  animation: th-splash-up .5s cubic-bezier(.4, 0, .2, 1) .12s both;
}
.splash-name b { color: var(--accent, #ff1f3d); font-weight: 800; }

.splash-bar {
  display: block;
  width: 200px;
  height: 3px;
  margin-top: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: #202024;
}
.splash-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7a0010, var(--accent, #ff1f3d));
  box-shadow: 0 0 14px var(--accent, #ff1f3d);
  animation: th-splash-fill 1.15s cubic-bezier(.4, 0, .2, 1) forwards;
}

@keyframes th-splash-pop {
  0% { opacity: 0; transform: scale(.86); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes th-splash-up {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: none; }
}
@keyframes th-splash-fill {
  0% { width: 0%; }
  100% { width: 100%; }
}
@keyframes th-splash-auto {
  to { opacity: 0; visibility: hidden; pointer-events: none; display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .splash-logo,
  .splash-name,
  .splash-bar > span { animation: none !important; }
  .splash-name { opacity: 1; }
  .splash-bar > span { width: 100%; }
}
