/* ============================================
   IS COM — Splash Screen Animation
   ============================================ */

.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Les deux panneaux qui s'ouvrent */
.splash-panel {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: #000;
  transition: transform 1s cubic-bezier(0.76, 0, 0.24, 1);
  z-index: 2;
}
.splash-panel--left  { left: 0;  transform-origin: left; }
.splash-panel--right { right: 0; transform-origin: right; }

/* Logo centré */
.splash-logo {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.splash-logo img {
  height: 80px;
  width: auto;
  opacity: 0;
  transform: scale(0.85) translateY(10px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.splash-tagline {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(255,255,255,0);
  transition: color 0.6s ease 0.3s;
}

/* Barre de progression */
.splash-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: #2f69b1;
  z-index: 4;
  transition: width 1.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ÉTATS */

/* 1 — Logo apparaît */
.splash.logo-visible .splash-logo img {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.splash.logo-visible .splash-tagline {
  color: rgba(255,255,255,0.5);
}
.splash.logo-visible .splash-bar {
  width: 100%;
}

/* 2 — Panneaux s'ouvrent */
.splash.open .splash-panel--left  { transform: translateX(-100%); }
.splash.open .splash-panel--right { transform: translateX(100%); }
.splash.open .splash-logo { opacity: 0; transition: opacity 0.4s ease; }

/* 3 — Fondu de sortie */
.splash.fadeout {
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

/* 4 — Splash retiré du DOM */
.splash.done { display: none; }

/* Page cachée au départ */
body.splash-loading {
  overflow: hidden;
}
body.splash-loading > *:not(.splash) {
  opacity: 0;
  transition: opacity 0.5s ease 0.2s;
}
body.splash-done > *:not(.splash) {
  opacity: 1;
}

/* Mobile */
@media (max-width: 600px) {
  .splash-logo img { height: 56px; }
  .splash-tagline { font-size: 11px; letter-spacing: 0.25em; }
}
