/* ─── LOADER ─────────────────────────────────────────────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #FAFAF7;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .55s cubic-bezier(.25,.46,.45,.94),
              visibility .55s cubic-bezier(.25,.46,.45,.94);
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__inner {
  width: min(80vw, 600px);
  text-align: center;
}

.loader__svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Stroke style commun */
.loader__line-left,
.loader__line-right,
.loader__balloon,
.loader__string {
  fill: none;
  stroke: #2A2520;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.loader__knot {
  fill: #2A2520;
  stroke: none;
  opacity: 0;
}

/* ─── ANIMATIONS ─────────────────────────────────────────────────────────── */

/* Ligne gauche : longueur 395 */
.loader__line-left {
  stroke-dasharray: 395;
  stroke-dashoffset: 395;
  animation: loader-draw .55s ease forwards;
  animation-delay: .1s;
}

/* Ballon (cercle r=32) : périmètre ≈ 201 */
.loader__balloon {
  stroke-dasharray: 202;
  stroke-dashoffset: 202;
  animation: loader-draw .75s ease forwards;
  animation-delay: .5s;
}

/* Ficelle */
.loader__string {
  stroke-dasharray: 4;
  stroke-dashoffset: 4;
  animation: loader-draw .15s ease forwards;
  animation-delay: 1.18s;
}

/* Nœud */
.loader__knot {
  animation: loader-fade-in .15s ease forwards;
  animation-delay: 1.18s;
}

/* Ligne droite : longueur 435 */
.loader__line-right {
  stroke-dasharray: 435;
  stroke-dashoffset: 435;
  animation: loader-draw .5s ease forwards;
  animation-delay: 1.28s;
}

/* Texte */
.loader__text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.1rem, 2.8vw, 1.5rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: .05em;
  color: #2A2520;
  margin-top: 28px;
  opacity: 0;
  animation: loader-fade-in .7s ease forwards;
  animation-delay: 1.5s;
}

@keyframes loader-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes loader-fade-in {
  to { opacity: 1; }
}
