/* ==========================================================================
   PAGE PRELOADER
   ========================================================================== */
.page-loader {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-loader.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-container {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-image-frame {
  width: 108px;
  height: 108px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 20px rgba(15, 0, 0, 0.06);
}

.loader-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Faisceau animé autour de l'image carrée */
.loader-svg-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.loader-svg-beam rect {
  width: 114px;
  height: 114px;
  x: 3px;
  y: 3px;
  rx: 14px;
  ry: 14px;
  fill: none;
  stroke: #C4493A;
  stroke-width: 5px;
  stroke-linecap: round;
  /* Périmètre rectangle arrondi ≈ 430px */
  stroke-dasharray: 110 320;
  stroke-dashoffset: 0;
  animation: runBeam 1.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

@keyframes runBeam {
  0% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -430;
  }
}