/* Preloader — thème premium (anthracite + or), logo centré */

html:has(#site-preloader) {
  overflow: hidden;
}

/* La bulle WhatsApp (z-index max) passait au-dessus du preloader — masquée jusqu’à disparition du nœud */
html:has(#site-preloader) .whatsapp-bubble {
  visibility: hidden !important;
  pointer-events: none !important;
}

.site-preloader {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 48%, #1a1a1a 100%);
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.site-preloader::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 85% 60% at 50% 38%, rgba(201, 162, 77, 0.16) 0%, transparent 62%);
  pointer-events: none;
}

.site-preloader__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
}

.site-preloader__logo {
  width: auto;
  height: auto;
  max-width: min(90vw, 380px);
  max-height: min(48vh, 220px);
  object-fit: contain;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.55));
  animation: site-preloader-logo 2.4s ease-in-out infinite;
}

@keyframes site-preloader-logo {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.92;
  }
}

.site-preloader__bar-wrap {
  margin-top: 40px;
  width: min(240px, 70vw);
  height: 3px;
  background: rgba(201, 162, 77, 0.22);
  border-radius: 4px;
  overflow: hidden;
}

.site-preloader__bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, #b8943a, #c9a24d, #d4af37, #c9a24d);
  background-size: 200% 100%;
  animation: site-preloader-bar 3s linear forwards, site-preloader-shine 1.8s ease-in-out infinite;
}

@keyframes site-preloader-bar {
  to {
    width: 100%;
  }
}

@keyframes site-preloader-shine {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.site-preloader.site-preloader--done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .site-preloader__logo {
    animation: none;
  }

  .site-preloader__bar {
    animation: site-preloader-bar 3s linear forwards;
  }
}
