/* ══════════════════════════════════════════════════════════════
   QUATRE V2 — TRAVAUX (maquette 22:276)
   Cover sticky rouge + grille 2 colonnes décalées (réf. loloagency)
   ═════════════════════════════════════════════════════════════ */

/* ── Cover : image projet random en fond, contenu en bas à gauche.
   Fond NOIR : quand l'image s'estompe au scroll, on fond vers le noir
   (pas vers le rouge). ── */
.hero--travaux {
  background-color: var(--night);
  align-items: flex-end;
  justify-content: flex-start;
  padding: var(--nav-h) var(--pad-x) clamp(40px, 7vh, 88px);
}

.tvx-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--night);
}

.tvx-hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tvx-hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 30%, rgba(0, 0, 0, 0.6) 100%);
}

.tvx-cover {
  position: relative;
  z-index: 2;
  width: min(var(--wide-w), 100%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tvx-title {
  font-size: var(--display-size);
  line-height: var(--display-lh);
}

.tvx-sub {
  font-size: var(--lead-size);
  line-height: var(--lead-lh);
  max-width: 24ch;
}

.tvx-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tvx-filter {
  padding: 10px 20px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: var(--white);
  font-size: 14px;
  line-height: 16px;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.tvx-filter:hover {
  border-color: var(--white);
}

.tvx-filter.is-active {
  background-color: var(--white);
  border-color: var(--white);
  color: var(--black);
}

/* ── Barre de filtres dockée (apparaît au scroll, sous la nav) ── */
.tvx-dock {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 90; /* sous la nav */
  display: flex;
  justify-content: center;
  padding: 12px var(--pad-x);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out);
}

.tvx-dock.is-docked {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.tvx-dock-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border-radius: 9999px;
  background-color: rgba(20, 20, 20, 0.6);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* ── Grille ── */
.tvx-body {
  background: linear-gradient(180deg, rgba(26, 26, 26, 0) 0%, var(--night) 26%);
  padding: 20vh 0 var(--section-gap);
  min-height: 100vh;
}

/* Mode scroll infini (activé par travaux.js sur desktop pointeur fin) :
   la section devient un viewport épinglé, les colonnes sont déplacées
   en transform — seule la colonne survolée défile. */
body.tvx-infinite .tvx-body {
  height: 100vh;
  height: 100svh;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

body.tvx-infinite .tvx-cols {
  height: 100%;
  padding-top: 12vh;
}

body.tvx-infinite .tvx-col {
  will-change: transform;
}

.container-wide {
  width: min(1440px, calc(100% - 2 * var(--pad-x)));
  margin-inline: auto;
}

.tvx-cols {
  display: flex;
  align-items: flex-start;
  gap: var(--gutter);
}

.tvx-col {
  width: calc(50% - var(--gutter) / 2);
  display: flex;
  flex-direction: column;
  gap: var(--gutter);
  transition: width 0.7s var(--ease-out);
}

.tvx-col--right {
  margin-top: clamp(120px, 16vw, 280px);
}

/* La colonne survolée s'élargit, l'autre se resserre (réf. loloagency) */
@media (hover: hover) {
  .tvx-cols:has(.tvx-col--left:hover) .tvx-col--left,
  .tvx-cols:has(.tvx-col--right:hover) .tvx-col--right {
    width: calc(57% - var(--gutter) / 2);
  }

  .tvx-cols:has(.tvx-col--left:hover) .tvx-col--right,
  .tvx-cols:has(.tvx-col--right:hover) .tvx-col--left {
    width: calc(43% - var(--gutter) / 2);
  }
}

/* ── Cards : image seule par défaut, détail au hover ── */
.cs-card {
  position: relative;
  display: block;
  width: 100%;
  border-radius: var(--radius-tile);
  overflow: hidden;
  background-color: var(--night);
  cursor: pointer;
  /* coins arrondis garantis malgré la parallaxe composited du media
     (bug Chrome radius + overflow + transform enfant) */
  transform: translateZ(0);
  isolation: isolate;
}

.cs-card.is-hidden {
  display: none;
}

.cs-card-media {
  position: absolute;
  inset: 0;
}

.cs-card-media .plx-media {
  transition: transform 0.2s linear;
}

.cs-card-info {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(20px, 2.3vw, 40px);
  background-color: rgba(0, 0, 0, 0.35);
  color: var(--white);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.cs-card:hover .cs-card-info,
.cs-card:focus-visible .cs-card-info {
  opacity: 1;
}

.cs-card .pill-btn {
  pointer-events: none;
}

@media (max-width: 860px) {
  .tvx-cols {
    flex-direction: column;
    gap: var(--gutter);
  }

  .tvx-col,
  .tvx-cols:has(.tvx-col--left:hover) .tvx-col--left,
  .tvx-cols:has(.tvx-col--right:hover) .tvx-col--right {
    width: 100%;
  }

  .tvx-col--right {
    margin-top: 0;
  }

  .tvx-body {
    padding-top: 12vh;
  }

  /* Tactile : le détail est toujours visible */
  .cs-card-info {
    opacity: 1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.55));
  }
}
