/* ============================================
   ALGORIS IT — SPLASH — Premium grid
   ============================================ */

.splash {
  position: fixed;
  inset: 0;
  z-index: var(--z-splash);
  background: #050508;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  transition: opacity 1.1s cubic-bezier(0.4, 0, 0.2, 1),
              transform 1.1s cubic-bezier(0.4, 0, 0.2, 1);
  animation: splashAutoHide 1.1s cubic-bezier(0.4, 0, 0.2, 1) 2.4s forwards;
}

@keyframes splashAutoHide {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.04); visibility: hidden; pointer-events: none; }
}

.splash.splash--hidden {
  opacity: 0;
  transform: scale(1.04);
  visibility: hidden;
  pointer-events: none;
  animation: none;
}

/* Canvas grille fond */
.splash__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Contenu centré */
.splash__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
  animation: splashContentIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes splashContentIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Lettres — apparaissent ensemble, effet pulse */
.splash__letters {
  display: flex;
  align-items: baseline;
  gap: 0;
}

.splash__letter {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #F9FAFB;
  text-transform: uppercase;
  display: inline-block;
  /* Pulse subtil — le requin respire */
  animation: letterPulse 3.5s ease-in-out 1s infinite;
}

.splash__letter--accent {
  color: #3B82F6;
  text-shadow: 0 0 40px rgba(59,130,246,0.4);
  animation: letterPulseAccent 3.5s ease-in-out 1s infinite;
}

.splash__letter--space {
  width: 0.35em;
  animation: none;
}

@keyframes letterPulse {
  0%, 100% { opacity: 1;    text-shadow: none; }
  50%       { opacity: 0.82; text-shadow: 0 0 60px rgba(249,250,251,0.08); }
}

@keyframes letterPulseAccent {
  0%, 100% { opacity: 1;    text-shadow: 0 0 40px rgba(59,130,246,0.4); }
  50%       { opacity: 0.85; text-shadow: 0 0 80px rgba(59,130,246,0.65); }
}

/* Barre bleue dessous */
.splash__bar {
  height: 1px;
  background: linear-gradient(to right, transparent, #3B82F6, transparent);
  width: 0;
  animation: splashBar 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.9s forwards;
}

@keyframes splashBar {
  from { width: 0;     opacity: 0; }
  to   { width: 280px; opacity: 1; }
}



/* ─── SITE FADE-IN — index uniquement ─── */

body.page-index > header.navbar,
body.page-index > main,
body.page-index > footer {
  animation: siteFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 2.6s both;
}

@keyframes siteFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ─── SCROLL REVEAL ─── */
/* État initial défini dans global.css (.reveal) */
/* ─── SCROLL REVEAL ─── */
/* JS ajoute .visible — fallback CSS si JS ne tourne pas */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  /* Fallback : visible après 1.5s même sans JS */
  animation: revealFallback 0.75s ease 1.5s both;
}

@keyframes revealFallback {
  to { opacity: 1; transform: translateY(0); }
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  animation: none; /* JS a pris le relais */
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }


/* ─── HERO — Animations d'entrée ─── */

.hero__label {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.8s both;
}

.hero__title-line {
  display: block;
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero__title-line:nth-child(1) { animation-delay: 1.9s; }
.hero__title-line:nth-child(2) { animation-delay: 2.0s; }
.hero__title-line:nth-child(3) { animation-delay: 2.1s; }

.hero__subtitle {
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 2.2s both;
}

.hero__actions {
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 2.35s both;
}

.hero__scroll {
  animation: fadeIn 1s ease 2.8s both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ─── HERO — Scroll indicator ─── */

.hero__scroll-line {
  display: block;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  margin: 0 auto;
  animation: scrollPulse 2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollPulse {
  0%   { opacity: 0; transform: scaleY(0); }
  40%  { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1) translateY(20px); }
}


/* ─── HERO BG — Grid géométrique ─── */

.hero__bg-grid {
  animation: gridFadeIn 1.5s ease 1s both;
}

@keyframes gridFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ─── COUNTER — Stats ─── */
/* Les chiffres comptent via JS, l'effet visuel est CSS */

.stat-item__number {
  display: inline-block;
  transition: transform 0.1s ease;
}

.stat-item__number.counting {
  animation: countPop 0.08s ease;
}

@keyframes countPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}


/* ─── SERVICE CARD — Bordure animée au hover ─── */

.service-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 2px 0 0 2px;
}

.service-card:hover::before {
  transform: scaleY(1);
}


/* ─── NAVBAR — Slide depuis le haut ─── */

.navbar {
  animation: navbarSlide 0.7s cubic-bezier(0.16, 1, 0.3, 1) 1.6s both;
}

@keyframes navbarSlide {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ─── CARTE DE VISITE 3D — Glare ─── */

.business-card__glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.06) 0%,
    transparent 50%,
    rgba(59,130,246,0.04) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.business-card:hover .business-card__glare {
  opacity: 1;
}


/* ─── WHY CARD — Icône hover ─── */

.why-card__icon svg {
  transition: stroke var(--transition-base),
              transform var(--transition-base);
}

.why-card:hover .why-card__icon svg {
  stroke: var(--accent);
  transform: scale(1.1);
}


/* ─── BOUTONS — Ripple subtil ─── */

.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.06);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:active::after {
  opacity: 1;
}


/* ─── FORM INPUT — Focus line ─── */

.form__input::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.form__input:focus-within::after {
  width: 100%;
}


/* ─── THEME TOGGLE — Rotation ─── */

.theme-toggle {
  transition: transform var(--transition-base);
}

.theme-toggle:hover {
  transform: rotate(20deg);
}