/* =======================================================
   Com'Inspir — Animations assets
   Date : 2026-04-17
   Auteur : Logan + Claude
   ======================================================= */

/* ================ CURSEUR CUSTOM ================ */
@media (hover: hover) and (pointer: fine) {
  body.anim-cursor-on { cursor: none; }
  body.anim-cursor-on a,
  body.anim-cursor-on button,
  body.anim-cursor-on [role="button"],
  body.anim-cursor-on input,
  body.anim-cursor-on textarea,
  body.anim-cursor-on select,
  body.anim-cursor-on label { cursor: none; }

  .anim-cursor-blob {
    position: fixed; width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(214, 69, 7, 0.35);
    border: 2px solid #D64507;
    pointer-events: none; z-index: 99998;
    transition: width .3s ease, height .3s ease, background-color .3s ease;
    transform: translate(-50%, -50%);
    left: 0; top: 0;
    will-change: transform, left, top;
  }
  .anim-cursor-blob.hover {
    width: 60px; height: 60px;
    background: rgba(214, 69, 7, 0.55);
  }

  .anim-cursor-dot {
    position: fixed; width: 4px; height: 4px;
    border-radius: 50%; background: #D64507;
    pointer-events: none; z-index: 99999;
    transform: translate(-50%, -50%);
    left: 0; top: 0;
    will-change: left, top;
  }
}

/* ================ SCRAMBLE TEXT ================ */
.anim-scramble {
  font-variant-ligatures: none;
}

/* ================ LIQUID FILL BUTTON ================ */
/* Approche simple et bulletproof : background-color + box-shadow transition.
   Ne nécessite pas de pseudo-element (évite les conflits avec Webflow button-link).
   Le fill suit naturellement la forme du bouton (border-radius hérité). */

.anim-liquid {
  transition: background-color .45s ease, color .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.anim-liquid .button {
  transition: background-color .45s ease, color .35s ease, box-shadow .35s ease, border-color .35s ease;
}

/* Cas 1 : bouton simple sans .button imbriqué */
.anim-liquid:not(:has(.button)):hover,
.anim-liquid:not(:has(.button)):focus-visible {
  background-color: #D64507 !important;
  color: #fff !important;
  border-color: #D64507 !important;
  box-shadow: 0 6px 22px rgba(214, 69, 7, 0.28);
}

/* Cas 2 : bouton Webflow imbriqué — cible le .button intérieur */
.anim-liquid:hover .button,
.anim-liquid:focus-visible .button {
  background-color: #D64507 !important;
  color: #fff !important;
  box-shadow: 0 6px 22px rgba(214, 69, 7, 0.28);
}
.anim-liquid:hover .button *,
.anim-liquid:focus-visible .button * {
  color: #fff !important;
}

/* ================ MESH GRADIENT (login/register) ================ */
.anim-mesh-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(214, 69, 7, 0.45), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(255, 107, 44, 0.35), transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(139, 0, 0, 0.3), transparent 55%);
  filter: blur(60px);
  animation: anim-mesh-move 12s ease-in-out infinite;
}
@keyframes anim-mesh-move {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.3) rotate(180deg); }
}

/* ================ BEFORE / AFTER SLIDER ================ */
.anim-compare {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 620px;
  border-radius: 16px;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  background: #111;
  margin: 0 auto;
}
.anim-compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  pointer-events: none;
  display: block;
}
.anim-compare .anim-after-wrap {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 50%);
}
.anim-compare-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 3px;
  background: #fff;
  cursor: ew-resize;
  z-index: 3;
  transform: translateX(-50%);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}
.anim-compare-handle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  background: #fff;
  color: #D64507;
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.anim-compare-handle::after {
  content: '⇔';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #D64507;
  font-size: 22px;
  font-weight: 700;
  z-index: 1;
}
.anim-compare-label {
  position: absolute;
  top: 16px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2;
  pointer-events: none;
}
.anim-compare-label.left { left: 16px; }
.anim-compare-label.right { right: 16px; }

/* ================ WORK CARDS HOVER (zoom + blur uniforme) ================ */
.work-thumbnail-image-block {
  overflow: hidden;
}
.work-thumbnail-image {
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), filter .4s ease;
  will-change: transform, filter;
}
.work-link-block:hover .work-thumbnail-image,
.work-collection-item:hover .work-thumbnail-image {
  transform: scale(1.06);
  filter: blur(2px) brightness(.9);
}

/* ================ REDUCED MOTION ================ */
@media (prefers-reduced-motion: reduce) {
  .anim-mesh-bg { animation: none; }
  .anim-liquid::before { transition: none; }
  .anim-cursor-blob { transition: none; }
}
