/* —— Accueil · Aperçu Work (3 projets) —— */
.work-preview {
  position: relative;
  z-index: 50;
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
  background: #050505;
  overflow: hidden;
  isolation: isolate;
  pointer-events: auto;
}

.work-preview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
}

.work-preview__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem) clamp(1.25rem, 3vw, 2rem) !important;
  margin: 0 auto;
  max-width: 1200px;
}

.work-preview__label {
  margin: 0 0 0.25rem;
  font-family: Barlow, sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.work-preview__title {
  margin: 0;
  font-family: Barlow, sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff !important;
}

.work-preview__all {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  pointer-events: auto !important;
  cursor: pointer;
  touch-action: manipulation;
  font-family: Barlow, sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55) !important;
  text-decoration: none;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.work-preview__all:hover {
  color: #fff !important;
  border-color: rgba(220, 38, 38, 0.6);
}

/* Bande de cartes */
.work-preview__strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.65rem, 1.2vw, 1rem);
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  max-width: 1200px;
  margin: 0 auto;
}

.work-preview__item {
  margin: 0;
  min-width: 0;
}

.work-preview__link {
  display: block;
  position: relative;
  z-index: 2;
  text-decoration: none;
  color: inherit;
  border-radius: 0.35rem;
  outline: none;
  cursor: pointer;
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.work-preview__link:focus-visible .work-preview__frame {
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.55);
}

.work-preview__frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0.35rem;
  background: #111;
  transform: translateZ(0);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-preview__link:hover .work-preview__frame,
.work-preview__item.is-active .work-preview__frame {
  transform: scale(0.985);
}

.work-preview__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #0a0a0a;
}

.work-preview__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem 1rem 1.1rem;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 35%,
    rgba(0, 0, 0, 0.55) 70%,
    rgba(0, 0, 0, 0.92) 100%
  );
  pointer-events: none;
}

.work-preview__index {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  font-family: Barlow, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.35);
}

.work-preview__tag {
  margin: 0 0 0.35rem;
  font-family: Barlow, sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.work-preview__name {
  margin: 0;
  padding-left: 0;
  font-family: Barlow, sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #fff !important;
  transition: padding-left 0.3s ease;
}

.work-preview__link:hover .work-preview__name,
.work-preview__item.is-active .work-preview__name {
  padding-left: 0.65rem;
}

.work-preview__copy {
  position: relative;
}

.work-preview__copy::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 0;
  height: 2px;
  background: #dc2626;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-preview__link:hover .work-preview__copy::before,
.work-preview__item.is-active .work-preview__copy::before {
  width: 1.75rem;
}

.work-preview__hint {
  display: none;
  margin: 0.85rem 0 0;
  text-align: center;
  font-family: Barlow, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
}

.work-preview__foot {
  display: flex;
  justify-content: center;
  padding: clamp(1.5rem, 3vw, 2rem) clamp(1.25rem, 4vw, 2.5rem) 0;
}

.work-preview__cta {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  pointer-events: auto !important;
  cursor: pointer;
  touch-action: manipulation;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85) !important;
  font-family: Barlow, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.work-preview__cta::after {
  content: "→";
  color: #dc2626;
  transition: transform 0.25s ease;
}

.work-preview__cta:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: #fff !important;
}

.work-preview__cta:hover::after {
  transform: translateX(3px);
}

/* Desktop : carte centrale légèrement plus haute */
@media screen and (min-width: 900px) {
  .work-preview__strip {
    grid-template-columns: 1fr 1.12fr 1fr;
    align-items: end;
    gap: 1rem;
  }

  .work-preview__item:nth-child(2) .work-preview__frame {
    aspect-ratio: 3 / 4.15;
  }

  .work-preview__item:nth-child(1) .work-preview__frame,
  .work-preview__item:nth-child(3) .work-preview__frame {
    aspect-ratio: 3 / 3.55;
    opacity: 0.92;
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .work-preview__item:nth-child(1):hover .work-preview__frame,
  .work-preview__item:nth-child(3):hover .work-preview__frame,
  .work-preview__item:nth-child(1).is-active .work-preview__frame,
  .work-preview__item:nth-child(3).is-active .work-preview__frame {
    opacity: 1;
  }
}

/* Mobile — filmstrip horizontal */
@media screen and (max-width: 767px) {
  .work-preview {
    padding-top: 2rem;
    padding-bottom: 1.5rem;
  }

  .work-preview__head {
    padding-bottom: 1rem !important;
  }

  .work-preview__strip {
    display: flex;
    gap: 0.85rem;
    padding: 0 1.25rem;
    max-width: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x;
  }

  .work-preview__strip::-webkit-scrollbar {
    display: none;
  }

  .work-preview__item {
    flex: 0 0 min(78vw, 300px);
    scroll-snap-align: center;
  }

  .work-preview__frame {
    aspect-ratio: 9 / 14;
  }

  .work-preview__hint {
    display: block;
  }

  .work-preview__foot {
    padding-top: 1.25rem;
  }

  .work-preview__cta {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-preview__frame,
  .work-preview__name,
  .work-preview__cta::after {
    transition: none;
  }
}
