/* =============================================
   PAGE CONTAINERS (Elementor post-459 parity)
   ============================================= */
.projets-hero-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 0;
}

.site-header-shell:has(+ .site-main > .projets-hero-container) .rogue-nav-spacer {
  display: none !important;
  height: 0 !important;
}

.projets-rail-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  background-color: var(--e-global-color-2619ceb, #141414);
  position: relative;
  z-index: 999;
}

/* =============================================
   HERO PROJECTS – BASE (.phero)
   ============================================= */
.phero-scroll-wrapper {
  position: relative;
  width: 100%;
}

.phero {
  position: relative;
  width: 100%;
  height: calc(100svh - 50px);
  height: 100svh;
  overflow: hidden;
  font-family: 'jaf-lapture-display', serif;
}

/* --- Background layers --- */
.phero-bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1),
              transform 1s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.04);
  will-change: opacity, transform;
}

.phero-bg-layer.is-active {
  opacity: 1;
  transform: scale(1);
}

/* --- Overlay --- */
.phero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(10, 18, 35, 0.08) 0%,
    rgba(10, 18, 35, 0.38) 100%
  );
  z-index: 2;
}

/* --- Desktop content --- */
.phero-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  padding-bottom: 5.5vh;
  width: 98%;
  left: 50%;
  transform: translateX(-50%);
}

.phero-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.phero-item {
  display: block;
}

.phero-link {
  display: inline-block;
  position: relative;
  font-size: clamp(36px, 5.5vw, 60px);
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: #A19591;
  text-decoration: none;
  transition: color 0.35s ease;
}

.phero-link .phero-year {
  display: none;
}

.phero-link.is-active,
.phero-link:hover {
  color: #ffffff;
}

.phero-link.is-active .phero-year,
.phero-link:hover .phero-year {
  opacity: 1;
}

/* --- Bottom UI: progress bars (desktop & mobile) + mobile titles --- */
.phero-mobile-ui {
  display: flex;
  flex-direction: column;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 98%;
  z-index: 4;
  padding: 0 0 2.2vh;
  pointer-events: none;
}

.phero-mob-title-wrap {
  display: none;
}

/* --- Progress bars (desktop & mobile) --- */
.phero-bars {
  display: flex;
  gap: 6px;
  width: 100%;
}

.phero-bar {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.phero-bar-fill {
  position: absolute;
  inset: 0;
  background: #ffffff;
  border-radius: 2px;
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

.phero-scroll-hint {
  display: none;
}

/* =============================================
   HERO MOBILE – max-width: 768px
   ============================================= */
@media (max-width: 768px) {
  .phero {
    position: relative;
    top: 0;
    height: calc(100vh + 64px);
    height: calc(100svh + 64px);
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    user-select: none;
    -webkit-user-select: none;
  }

  .phero-content {
    display: none;
  }

  .phero-mobile-ui {
    display: flex;
    flex-direction: column;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    transform: none;
    z-index: 4;
    padding: 0 6vw 3.5svh;
    padding: 0 6vw calc(3.5svh + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
  }

  .phero-mob-title-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    margin-bottom: 14px;
    min-height: 52px;
  }

  .phero-mob-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: auto;
    max-width: 100%;
    font-family: 'jaf-lapture-display', serif;
    font-size: clamp(24px, 7.5vw, 36px) !important;
    font-weight: 400;
    line-height: 1.1;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    color: #A19591;
    text-decoration: none;
    display: inline-flex;
    align-items: baseline;
    gap: 0.3em;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(100%);
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.35s ease;
  }

  .phero-mob-title.is-active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    color: #ffffff;
  }

  .phero-mob-title.is-exiting {
    opacity: 0;
    transform: translateY(-40%);
    visibility: visible;
  }

  .phero-mob-title:active {
    color: rgba(255, 255, 255, 0.7);
  }

  .phero-mob-year {
    display: none;
  }

  /* --- Scroll hint --- */
  .phero-scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    bottom: 2svh;
    bottom: calc(2svh + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }

  .phero-scroll-hint.is-hidden {
    opacity: 0;
  }

  .phero-scroll-hint-line {
    width: 1px;
    height: 22px;
    background: #ffffff;
    animation: phero-pulse 1.5s ease-in-out infinite;
  }

  @keyframes phero-pulse {
    0%, 100% { opacity: 0.25; transform: scaleY(0.6); }
    50% { opacity: 0.75; transform: scaleY(1); }
  }
}

@media (max-width: 480px) {
  .phero-mobile-ui {
    padding: 0 5vw 3svh;
    padding: 0 5vw calc(3svh + env(safe-area-inset-bottom, 0px));
  }
}

/* =============================================
   HORIZONTAL STICKY RAIL (.premium-hs)
   ============================================= */
.premium-hs-section {
  --phs-bg: #111111;
  --phs-text: #ffffff;
  --phs-slogan: #A19591;
  --phs-placeholder: #222222;
  --phs-project-width: 50vw;
  --phs-gap: 1vw;
  color: var(--phs-text);
  width: 100%;
  position: relative;
}

.premium-hs-sticky {
  position: sticky;
  top: 3%;
  height: 100vh;
  width: 98%;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.premium-hs-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.5rem;
}

.premium-hs-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  box-sizing: border-box;
  z-index: 20;
}

.premium-hs-title {
  font-size: 60px;
  font-family: 'jaf-lapture-display', serif;
  margin: 0;
  font-weight: 400;
  line-height: 0.85;
  text-transform: uppercase;
  color: var(--phs-text);
}

.premium-hs-controls {
  display: flex;
  align-items: flex-end;
}

.premium-hs-btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border: 1px solid var(--phs-text);
  border-radius: 50px;
  color: var(--phs-text);
  text-decoration: none !important;
  font-size: 16px;
  font-family: 'jaf-lapture-display', serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1;
  transition: all 0.3s ease;
}

.premium-hs-btn:hover {
  background-color: var(--phs-text);
  color: var(--phs-bg);
}

.premium-hs-track-wrap {
  width: 100%;
  overflow: visible;
}

.premium-hs-track {
  display: flex;
  gap: var(--phs-gap);
  width: max-content;
  will-change: transform;
  position: relative;
  z-index: 15;
}

.premium-hs-item {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: var(--phs-project-width);
  flex-shrink: 0;
  position: relative;
}

.premium-hs-global-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}

.premium-hs-image-wrapper {
  width: 100%;
  min-height: 55vh;
  background-color: var(--phs-placeholder);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  display: block;
}

.premium-hs-image-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

@media (hover: hover) {
  .premium-hs-item:hover .premium-hs-image-bg {
    transform: scale(1.05);
  }
}

.premium-hs-overlay-text {
  font-size: clamp(2rem, 5vw, 5rem);
  color: rgba(255, 255, 255, 0.08);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 100%;
  pointer-events: none;
  z-index: 2;
}

.premium-hs-meta {
  display: flex;
  flex-direction: column;
}

.premium-hs-name {
  font-size: 24px;
  text-transform: uppercase;
  margin-bottom: 0rem;
  font-weight: 600;
  color: #fff;
  font-family: 'jaf-lapture-display', serif;
  text-decoration: none;
}

.premium-hs-desc {
  color: var(--phs-slogan);
  font-size: 24px;
  font-family: 'jaf-lapture-display', serif;
  margin-top: 0rem;
}

.phs-image-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  width: 35px;
  height: 35px;
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.15s ease;
  will-change: transform, opacity, left, top;
}

.phs-image-cursor.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.phs-image-cursor img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

@media (hover: hover) {
  .premium-hs-item[data-cursor-image]:hover {
    cursor: none;
  }

  .premium-hs-item[data-cursor-image]:hover .premium-hs-global-link {
    cursor: none;
  }
}

@media (max-width: 768px) {
  .premium-hs-section {
    height: auto !important;
    padding: 4rem 0 0 0;
    width: 100vw;
  }

  .premium-hs-sticky {
    position: relative;
    top: auto;
    height: auto;
    width: 100%;
    overflow: visible;
    display: block;
  }

  .premium-hs-inner {
    gap: 4rem;
  }

  .premium-hs-header {
    padding: 0 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .premium-hs-title {
    font-size: 32px;
    line-height: 1;
  }

  .premium-hs-track-wrap {
    width: 100%;
    overflow: visible;
  }

  .premium-hs-track {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 4rem;
    padding: 0 10px;
    transform: none !important;
    will-change: auto;
  }

  .premium-hs-item {
    width: 100%;
    gap: 1rem;
  }

  .premium-hs-image-wrapper {
    min-height: 260px;
    border-radius: 6px;
  }

  .premium-hs-name {
    font-size: 20px;
  }

  .premium-hs-desc {
    font-size: 18px;
  }

  .phs-image-cursor {
    display: none !important;
  }
}

@media (min-width: 480px) and (max-width: 768px) {
  .premium-hs-track {
    grid-template-columns: 1fr 1fr;
    gap: 3vw;
  }

  .premium-hs-image-wrapper {
    min-height: 220px;
  }
}
