/* ==========================================================
   By Anaïs — page Vidéos (catalogue filtrable)
   ========================================================== */

.vx {
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(64px, 8vw, 110px);
}

/* ---------- En-tête ---------- */
.vx-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 48px); }
.vx-title {
  margin: 0 0 28px;
  font-size: clamp(44px, 7vw, 92px);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: var(--wine);
}
.vx-title em {
  display: block;
  text-transform: none;
  letter-spacing: 0;
  font-size: .72em;
  color: var(--wine-soft);
  margin: .05em 0 0 1.2em;
  transform: rotate(-3deg);
  transform-origin: left;
}
.vx-intro { margin: 0; font-size: clamp(16px, 1.4vw, 18px); max-width: 34em; }

/* ---------- Panneau de filtres ---------- */
.vx-filters {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px 28px;
  align-items: center;
  padding: clamp(20px, 3vw, 30px) clamp(20px, 3vw, 34px);
  background: #fffaf6;
  border-radius: 20px;
  box-shadow: 0 18px 40px -28px rgba(74, 1, 31, .45);
}
.vx-group { display: contents; }
.vx-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--wine-soft);
  white-space: nowrap;
}
.vx-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.vx-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 18px;
  border: 1.5px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--wine);
  font-size: 14px; font-weight: 500;
  transition: background .2s, color .2s, border-color .2s;
}
.vx-chip:hover:not(:disabled) { border-color: var(--wine); }
.vx-chip.is-on { background: var(--wine); border-color: var(--wine); color: var(--cream); }
.vx-chip:disabled { opacity: .35; cursor: default; }
.vx-n {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(106, 2, 45, .08);
  font-size: 11px; font-weight: 600;
  text-align: center;
}
.vx-chip.is-on .vx-n { background: rgba(251, 233, 223, .2); }

/* Liste déroulante des marques */
.vx-brand { position: relative; justify-self: start; min-width: min(320px, 100%); }
.vx-brand-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%;
  padding: 10px 18px;
  border: 1.5px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--wine);
  font-size: 14px; font-weight: 500;
  text-align: left;
}
.vx-brand-btn:hover { border-color: var(--wine); }
.vx-brand-btn.is-on { background: var(--wine); border-color: var(--wine); color: var(--cream); }
.vx-brand-btn svg { width: 12px; flex: none; transition: transform .2s; }
.vx-brand-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.vx-brand-pop {
  position: absolute; z-index: 20;
  top: calc(100% + 8px); left: 0;
  width: max(100%, 300px);
  padding: 10px;
  background: #fffaf6;
  border-radius: 16px;
  box-shadow: 0 24px 50px -16px rgba(74, 1, 31, .45);
}
.vx-brand-search {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
  font: inherit; font-size: 14px;
  outline: none;
}
.vx-brand-search:focus { border-color: var(--wine); }
.vx-brand-list {
  list-style: none;
  margin: 8px 0 0; padding: 0;
  max-height: 300px;
  overflow-y: auto;
}
.vx-brand-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--wine);
  cursor: pointer;
  outline: none;
}
.vx-brand-list li:hover, .vx-brand-list li:focus { background: rgba(106, 2, 45, .07); }
.vx-brand-list li.is-on { background: var(--wine); color: var(--cream); }
.vx-brand-list li.is-on .vx-n { background: rgba(251, 233, 223, .2); }
.vx-brand-list li.is-empty { opacity: .4; cursor: default; }
.vx-brand-list li.is-empty:hover { background: none; }
.vx-brand-list .vx-brand-none { cursor: default; opacity: .6; }

/* ---------- Barre résultat ---------- */
.vx-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 28px 0 22px;
}
.vx-count { margin: 0; font-weight: 600; color: var(--wine); }
.vx-reset {
  border: 0; background: none; padding: 4px 0;
  color: var(--wine-soft);
  font-size: 14px; font-weight: 500;
  border-bottom: 1.5px solid currentColor;
}
.vx-reset:hover { color: var(--wine); }
.vx-demo-note {
  margin: -8px 0 22px;
  padding: 10px 16px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  font-size: 13px;
  color: var(--wine-soft);
}

/* ---------- Grille ---------- */
.vx-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 26px);
}
.vx-card {
  display: block;
  padding: 0; border: 0; background: none;
  color: inherit; text-align: left;
  animation: vx-in .45s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: var(--d, 0ms);
}
@keyframes vx-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.vx-frame {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  background: var(--wine-deep);
  box-shadow: 0 16px 30px -22px rgba(74, 1, 31, .6);
  transition: transform .3s ease, box-shadow .3s ease;
}
.vx-card:hover .vx-frame, .vx-card:focus-visible .vx-frame {
  transform: translateY(-4px) rotate(-.6deg);
  box-shadow: 0 26px 40px -24px rgba(74, 1, 31, .7);
}
.vx-card:focus-visible { outline: none; }
.vx-card:focus-visible .vx-frame { outline: 3px solid var(--wine); outline-offset: 3px; }

.vx-poster, .vx-preview {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.vx-preview { opacity: 0; transition: opacity .3s; }
.vx-card:hover .vx-preview { opacity: 1; }

/* Visuel provisoire : logo de la marque sur trame */
.vx-ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(rgba(251, 233, 223, .16) 1.2px, transparent 1.6px) 0 0 / 10px 10px,
    radial-gradient(ellipse at 50% 35%, var(--wine-soft), var(--wine-deep) 75%);
}
.vx-ph img { width: 62%; max-height: 22%; object-fit: contain; opacity: .9; }

.vx-ref-tag, .vx-type-tag {
  position: absolute;
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  color: var(--cream);
}
.vx-ref-tag { top: 12px; left: 14px; opacity: .75; }
.vx-type-tag {
  bottom: 12px; left: 12px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(251, 233, 223, .92);
  color: var(--wine);
  text-transform: uppercase;
  font-size: 10px;
}
.vx-frame .play { opacity: 0; transition: opacity .25s, scale .2s; }
.vx-card:hover .vx-frame .play, .vx-card:focus-visible .vx-frame .play { opacity: 1; }
@media (hover: none) { .vx-frame .play { opacity: 1; } }

.vx-cap { display: block; padding-top: 12px; font-size: 13px; color: var(--wine-soft); }
.vx-cap b { display: block; font-size: 16px; font-weight: 700; color: var(--wine); }

/* ---------- Aucun résultat ---------- */
.vx-empty { text-align: center; padding: 60px 0 20px; }
.vx-empty-title { font-size: clamp(20px, 2.4vw, 28px); font-weight: 600; color: var(--wine); margin: 0 0 24px; }
.vx-empty .btn { border: 0; }

/* ---------- Lecteur plein écran ---------- */
body.no-scroll { overflow: hidden; }
.vx-modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  padding: 24px;
  background: rgba(58, 1, 24, .94);
  backdrop-filter: blur(6px);
  animation: vx-fade .25s ease;
}
.vx-modal[hidden] { display: none; }
@keyframes vx-fade { from { opacity: 0; } }
.vx-stage {
  grid-column: 2;
  display: flex; align-items: center; justify-content: center; gap: clamp(20px, 4vw, 48px);
  height: 100%;
  min-height: 0;
}
.vx-player {
  height: min(86vh, 820px);
  aspect-ratio: 9 / 16;
  max-width: 100%;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
}
.vx-player video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.vx-ph-big { gap: 0; }
.vx-ph-big img { max-height: 16%; }
.vx-ph-big p {
  position: absolute; bottom: 12%; left: 0; right: 0;
  margin: 0; text-align: center;
  font-family: var(--script); font-size: 30px; color: var(--cream);
}
.vx-info { color: var(--cream); width: 220px; }
.vx-ref { margin: 0 0 18px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .6; }
.vx-info-logo { max-width: 180px; max-height: 60px; margin-bottom: 18px; }
.vx-info-brand { margin: 0 0 6px; font-size: 26px; font-weight: 800; line-height: 1.1; color: var(--cream); }
.vx-info-tags { margin: 0; opacity: .8; }

.vx-close, .vx-nav {
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(251, 233, 223, .12);
  color: var(--cream);
  line-height: 1;
  transition: background .2s;
}
.vx-close:hover, .vx-nav:hover { background: rgba(251, 233, 223, .25); }
.vx-close { position: absolute; top: 20px; right: 20px; width: 48px; height: 48px; font-size: 30px; z-index: 2; }
.vx-nav { width: 56px; height: 56px; font-size: 34px; padding-bottom: 4px; }
.vx-prev { grid-column: 1; }
.vx-next { grid-column: 3; }
.vx-nav[hidden] { visibility: hidden; display: grid; }

/* ---------- Responsive ---------- */
@media (min-width: 1280px) {
  .vx-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .vx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .vx-filters { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .vx-group { display: block; }
  .vx-group + .vx-group { margin-top: 10px; }
  .vx-label { margin-bottom: 10px; }
  /* puces sur une ligne qui défile */
  .vx-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 0 20px 4px; scrollbar-width: none; }
  .vx-chips::-webkit-scrollbar { display: none; }
  .vx-chip { flex: none; }
  .vx-brand { width: 100%; min-width: 0; }
  .vx-brand-pop { width: 100%; }
  .vx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .vx-modal { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; padding: 16px; gap: 14px; }
  .vx-stage { grid-column: 1 / -1; flex-direction: column; gap: 12px; }
  .vx-player { height: auto; width: min(100%, calc((100vh - 220px) * 9 / 16)); }
  .vx-info { width: 100%; text-align: center; }
  .vx-info-logo, .vx-ref { display: none; }
  .vx-info-brand { font-size: 20px; }
  .vx-prev { grid-column: 1; grid-row: 2; justify-self: end; }
  .vx-next { grid-column: 2; grid-row: 2; justify-self: start; }
  .vx-close { top: 10px; right: 10px; }
}

.vx-chip:focus-visible, .vx-brand-btn:focus-visible, .vx-reset:focus-visible,
.vx-close:focus-visible, .vx-nav:focus-visible {
  outline: 3px solid var(--wine-soft);
  outline-offset: 2px;
}

.vx-ph-name {
  padding: 0 12%;
  text-align: center;
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--cream);
}
.vx-info-logo[hidden] { display: none; }
.vx-info-title { margin: 0 0 10px; font-size: 16px; line-height: 1.4; }
.vx-cap span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Photos (ex. Lacoste) */
.vx-player.is-photo { aspect-ratio: auto; height: auto; max-height: min(86vh, 820px); width: auto; max-width: min(100%, 640px); background: none; }
.vx-player.is-photo img { display: block; max-width: 100%; max-height: min(86vh, 820px); object-fit: contain; }
@media (max-width: 760px) { .vx-player.is-photo { width: 100%; } }
.vx-card { align-self: start; }
