/* ═══════════════════════════════════════════════════════════════════════════
   AVSD v2 — Catalogue Quetzal (page /catalogue-quetzal/ + bloc d'accès
   de la page Textile personnalisé). Chargée sur ces deux pages seulement.
   Couleurs : uniquement les jetons de v2.css → mode nuit automatique.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── En-tête ─────────────────────────────────────────────────────────────── */
.v2-cq-hero { padding-bottom: clamp(28px, 4vw, 48px); }
.v2-cq-crumb {
  display: flex; gap: 8px; align-items: center;
  font-family: var(--v2-font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--v2-ink-soft); margin-bottom: clamp(24px, 4vw, 44px);
}
.v2-cq-crumb a { color: inherit; text-decoration: none; }
.v2-cq-crumb a:hover { color: var(--v2-ink); }
.v2-cq-hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(24px, 5vw, 72px); align-items: end;
}
.v2-cq-hero-grid > div:first-child { display: grid; gap: 18px; }
.v2-cq-facts {
  display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 1px; margin: 0;
  background: var(--v2-line); border: 1px solid var(--v2-line); border-radius: var(--v2-r); overflow: hidden;
}
.v2-cq-facts > div { background: var(--v2-surface); padding: 16px 18px; }
.v2-cq-facts dt {
  font-family: var(--v2-font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--v2-ink-soft);
}
.v2-cq-facts dd { margin: 4px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; color: var(--v2-ink); }
.v2-cq-facts dd small { font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--v2-ink-soft); }

/* ── Barre de filtres (collante sous l'en-tête) ──────────────────────────── */
.v2-cq-tools {
  position: sticky; top: var(--v2-header); z-index: 20;
  background: var(--v2-header-bg); backdrop-filter: saturate(1.4) blur(10px);
  border-block: 1px solid var(--v2-line);
}
.v2-cq-tools-row { display: flex; align-items: center; gap: 16px; padding-block: 12px; }
.v2-cq-chips { display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.v2-cq-chips::-webkit-scrollbar { display: none; }
body.v2-theme .v2-cq-chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border: 1px solid var(--v2-line); border-radius: var(--v2-pill); background: var(--v2-surface);
  color: var(--v2-ink); font: 600 13px/1 var(--v2-font); cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s;
}
body.v2-theme .v2-cq-chip span { font: 500 11px/1 var(--v2-font-mono); color: var(--v2-ink-soft); }
body.v2-theme .v2-cq-chip:hover { border-color: var(--v2-ink); }
body.v2-theme .v2-cq-chip.is-on { background: var(--v2-ink); border-color: var(--v2-ink); color: var(--v2-on-ink); }
body.v2-theme .v2-cq-chip.is-on span { color: inherit; opacity: .6; }
.v2-cq-search {
  flex: none; display: flex; align-items: center; gap: 8px; height: 36px; width: 240px; padding: 0 14px;
  border: 1px solid var(--v2-line); border-radius: var(--v2-pill); background: var(--v2-surface); color: var(--v2-ink-soft);
}
.v2-cq-search:focus-within { border-color: var(--v2-ink); }
.v2-cq-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--v2-ink);
  font: 400 14px/1 var(--v2-font); padding: 0;
}

/* ── Gammes ──────────────────────────────────────────────────────────────── */
.v2-cq-list { padding-top: clamp(32px, 4vw, 56px); }
.v2-cq-gamme { scroll-margin-top: calc(var(--v2-header) + 80px); }
.v2-cq-gamme + .v2-cq-gamme { margin-top: clamp(48px, 6vw, 80px); }
.v2-cq-gamme[hidden] { display: none; }
.v2-cq-gamme-head {
  display: grid; grid-template-columns: auto 1fr; column-gap: 16px; row-gap: 6px; align-items: baseline;
  padding-bottom: 16px; border-bottom: 2px solid var(--v2-ink);
}
.v2-cq-gamme-num { font: 500 12px/1 var(--v2-font-mono); color: var(--door-ink); letter-spacing: .1em; }
body.v2-theme .v2-cq-gamme-nom { font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; letter-spacing: -.035em; line-height: 1; color: var(--v2-ink); margin: 0; }
body.v2-theme .v2-cq-gamme-intro { grid-column: 2; margin: 0; font-size: 14.5px; color: var(--v2-ink-soft); }

/* ── Tableau ─────────────────────────────────────────────────────────────── */
.v2-cq-table { width: 100%; border-collapse: collapse; }
.v2-cq-table thead th {
  font: 500 10px/1 var(--v2-font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--v2-ink-soft);
  text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--v2-line);
}
.v2-cq-table td { padding: 16px 12px; border-bottom: 1px solid var(--v2-line); vertical-align: middle; color: var(--v2-ink); }
.v2-cq-row { transition: background .2s; }
.v2-cq-row:hover { background: var(--v2-soft); }
.v2-cq-row:target { background: var(--door-soft); }
.v2-cq-row[hidden] { display: none; }

.v2-cq-c-img { width: 96px; padding-left: 0 !important; }
.v2-cq-c-ref { width: 128px; }
.v2-cq-c-coupe { width: 130px; font-size: 13.5px; }
.v2-cq-c-prix { width: 120px; text-align: right !important; white-space: nowrap; }
.v2-cq-c-cta { width: 120px; text-align: right !important; padding-right: 0 !important; }

body.v2-theme .v2-cq-thumb {
  position: relative; display: grid; place-items: center; width: 84px; height: 84px; padding: 0; margin: 0;
  border: 0; border-radius: var(--v2-r-sm); overflow: hidden; background: var(--v2-soft); cursor: zoom-in;
}
body.v2-theme .v2-cq-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
body.v2-theme .v2-cq-thumb:hover img { transform: scale(1.06); }
.v2-cq-thumb-n {
  position: absolute; right: 5px; bottom: 5px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--v2-pill);
  background: rgba(0,0,0,.66); color: #fff; font: 500 10px/20px var(--v2-font-mono); text-align: center;
}
body.v2-theme .v2-cq-thumb--vide {
  cursor: default; background: var(--door-soft); color: var(--door-ink);
  font: 500 11px/1.2 var(--v2-font-mono); letter-spacing: .06em; text-align: center; padding: 6px;
}

body.v2-theme .v2-cq-nom { margin: 0 0 4px; font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; color: var(--v2-ink); }
.v2-cq-badge {
  display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 3px 8px; border-radius: var(--v2-pill);
  background: var(--door-soft); color: var(--door-ink);
  font: 500 9.5px/1.2 var(--v2-font-mono); letter-spacing: .1em; text-transform: uppercase;
}
body.v2-theme .v2-cq-desc { margin: 0; font-size: 14px; color: var(--v2-ink-2); }
body.v2-theme .v2-cq-detail { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--v2-ink-soft); max-width: 560px; }
.v2-cq-c-ref code {
  font: 500 12.5px/1 var(--v2-font-mono); background: none; padding: 0; color: var(--v2-ink); white-space: nowrap;
}
.v2-cq-na { color: var(--v2-ink-soft); }
.v2-cq-c-prix b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.v2-cq-c-prix small { font-size: 11.5px; color: var(--v2-ink-soft); }

.v2-cq-cta {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--v2-pill);
  border: 1px solid var(--v2-ink); color: var(--v2-ink); text-decoration: none;
  font: 600 13px/1 var(--v2-font); white-space: nowrap; transition: background .2s, color .2s, border-color .2s;
}
.v2-cq-cta:hover { background: var(--v2-ink); color: var(--v2-on-ink); }
.v2-cq-cta.is-sim { background: var(--door); border-color: var(--door); color: var(--door-on); }
.v2-cq-cta.is-sim:hover { background: var(--v2-ink); border-color: var(--v2-ink); color: var(--v2-on-ink); }

body.v2-theme .v2-cq-vide { padding: 40px 0; text-align: center; color: var(--v2-ink-soft); }
body.v2-theme .v2-cq-vide button { background: none; border: 0; cursor: pointer; color: var(--v2-ink); font: inherit; }
body.v2-theme .v2-cq-note { margin-top: 32px; max-width: 760px; font-size: 13px; line-height: 1.6; color: var(--v2-ink-soft); }

/* ── Visionneuse ─────────────────────────────────────────────────────────── */
.v2-cq-lb { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; }
.v2-cq-lb::backdrop { background: rgba(10,10,10,.86); }
.v2-cq-lb-in { position: fixed; inset: 0; display: grid; place-items: center; padding: 64px 72px; }
.v2-cq-lb-fig { margin: 0; max-width: min(1000px, 100%); max-height: 100%; }
.v2-cq-lb-fig img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: var(--v2-r-sm); background: #fff; }
body.v2-theme .v2-cq-lb-titre { position: absolute; top: 20px; left: 24px; margin: 0; color: #fff; font-weight: 700; font-size: 15px; }
body.v2-theme .v2-cq-lb-n { position: absolute; bottom: 20px; left: 0; right: 0; margin: 0; text-align: center; color: rgba(255,255,255,.7); font: 500 12px/1 var(--v2-font-mono); }
body.v2-theme .v2-cq-lb-x, body.v2-theme .v2-cq-lb-nav {
  position: absolute; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
}
body.v2-theme .v2-cq-lb-x:hover, body.v2-theme .v2-cq-lb-nav:hover { background: #fff; color: #111; }
body.v2-theme .v2-cq-lb-x { top: 14px; right: 16px; }
body.v2-theme .v2-cq-lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
body.v2-theme .v2-cq-lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
body.v2-theme .v2-cq-lb-nav[hidden] { display: none; }
body.v2-theme .v2-cq-lb-illus {
  position: absolute; bottom: 44px; left: 0; right: 0; margin: 0; text-align: center;
  color: rgba(255,255,255,.85); font-size: 12.5px;
}
body.v2-theme .v2-cq-lb-illus[hidden] { display: none; }

/* ── Bloc d'accès (page Textile personnalisé) ────────────────────────────── */
.v2-cq-access {
  margin-top: clamp(32px, 4vw, 56px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: clamp(24px, 4vw, 48px); border-radius: var(--v2-r-lg); background: var(--door-grad-soft);
  border: 1px solid var(--v2-hair);
}
.v2-cq-access-body { display: grid; gap: 14px; }
body.v2-theme .v2-cq-access-title { margin: 0; font-size: clamp(26px, 3vw, 40px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; color: var(--v2-ink); }
body.v2-theme .v2-cq-access-title em { font-style: italic; font-weight: 700; }
body.v2-theme .v2-cq-access-text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--v2-ink-soft); max-width: 460px; }
body.v2-theme .v2-cq-access-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--v2-hair); }
body.v2-theme .v2-cq-access-list li { border-bottom: 1px solid var(--v2-hair); }
body.v2-theme .v2-cq-access-list a {
  display: grid; grid-template-columns: 1fr auto 96px 20px; gap: 14px; align-items: baseline; padding: 14px 4px;
  color: var(--v2-ink); text-decoration: none; transition: padding .25s ease, background .25s ease;
}
body.v2-theme .v2-cq-access-list a:hover { padding-inline: 12px 0; background: var(--v2-glass); }
.v2-cq-access-nom { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.v2-cq-access-n { font: 500 11px/1 var(--v2-font-mono); color: var(--v2-ink-soft); }
.v2-cq-access-prix { font-size: 14px; font-weight: 600; text-align: right; white-space: nowrap; }
.v2-cq-access-go { text-align: right; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .v2-cq-table td.v2-cq-c-coupe, .v2-cq-table th.v2-cq-c-coupe { display: none; }
  body.v2-theme .v2-cq-detail { display: none; }
  .v2-cq-access { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .v2-cq-hero-grid { grid-template-columns: 1fr; }
  .v2-cq-facts { grid-template-columns: repeat(4, 1fr); }
  .v2-cq-facts > div { padding: 12px; }
  .v2-cq-facts dd { font-size: 20px; }
}
@media (max-width: 720px) {
  .v2-cq-tools-row { flex-direction: column; align-items: stretch; gap: 10px; padding-block: 10px; }
  .v2-cq-search { width: auto; }
  .v2-cq-facts { grid-template-columns: repeat(2, 1fr); }

  /* Le tableau devient une liste de cartes : visuel à gauche, texte à droite. */
  .v2-cq-table thead { display: none; }
  .v2-cq-table, .v2-cq-table tbody { display: block; }
  .v2-cq-row {
    display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; column-gap: 14px; row-gap: 6px;
    padding: 16px 0; border-bottom: 1px solid var(--v2-line);
  }
  .v2-cq-table td { display: block; padding: 0 !important; border: 0; width: auto !important; text-align: left !important; }
  .v2-cq-c-img { grid-row: 1 / span 3; }
  .v2-cq-c-nom { grid-column: 2 / 4; }
  .v2-cq-c-ref { grid-column: 2; grid-row: 2; align-self: center; }
  .v2-cq-c-prix { grid-column: 3; grid-row: 2; text-align: right !important; }
  .v2-cq-c-cta { grid-column: 2 / 4; grid-row: 3; }
  .v2-cq-table td.v2-cq-c-coupe, .v2-cq-table th.v2-cq-c-coupe { display: none; }
  body.v2-theme .v2-cq-thumb { width: 76px; height: 76px; }
  .v2-cq-c-prix b { display: inline; font-size: 16px; }
  .v2-cq-c-prix small { display: block; }
  .v2-cq-cta { height: 32px; }
  body.v2-theme .v2-cq-gamme-intro { grid-column: 1 / -1; }

  body.v2-theme .v2-cq-access-list a { grid-template-columns: minmax(0, 1fr) auto 16px; gap: 10px; }
  body.v2-theme .v2-cq-access-n { display: none; }
  .v2-cq-lb-in { padding: 64px 12px; }
  body.v2-theme .v2-cq-lb-prev { left: 6px; } body.v2-theme .v2-cq-lb-next { right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  body.v2-theme .v2-cq-thumb img, body.v2-theme .v2-cq-access-list a, .v2-cq-row { transition: none; }
}
