/* archive.css — styles partagés entre l'index jeux et la page archives (home.php).
 * Chargé sur is_post_type_archive('jeu') et is_home().
 */

/* ── Barre de filtres (page archives) ── */
.archives-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── Pagination (page archives) ── */
.archives-pagination-wrap { margin-top: 56px; text-align: center; }
.archives-pagination .nav-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  align-items: center;
}
.archives-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm, 8px);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}
.archives-pagination .page-numbers:hover { background: var(--surface); color: var(--text); }
.archives-pagination .page-numbers.current {
  background: var(--primary-container);
  color: var(--primary);
  font-weight: 600;
}
.archives-pagination .page-numbers.dots {
  background: none;
  cursor: default;
  color: var(--text-light);
}
.archives-pagination .prev.page-numbers,
.archives-pagination .next.page-numbers {
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 0 14px;
  color: var(--text-muted);
}

/* ── Playlist rows ── */
/* ── Index playlist rows ── */
.prow { border-top: 1px solid rgba(0,0,0,0.08); }
/* Animation au changement de critère de tri (cf. animateSortSwap dans
   archive-jeu.php) : fondu sortant de toutes les fiches, puis réapparition en
   escalier (transition-delay posé en inline par ligne). */
.prow--fade-out { opacity: 0; transition: opacity 0.2s ease; }
.prow--prep     { opacity: 0; transform: translateY(10px); transition: none; }
.prow--reveal   { opacity: 1; transform: translateY(0); transition: opacity 0.36s ease, transform 0.46s cubic-bezier(0.16, 1, 0.3, 1); }
@media (prefers-reduced-motion: reduce) {
  .prow--fade-out, .prow--prep, .prow--reveal { transition: none; opacity: 1; transform: none; }
}
.prow-btn {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 28px 0;
  display: grid;
  grid-template-columns: 1fr 100px 100px 110px 130px 110px 24px;
  gap: 24px;
  align-items: baseline;
  text-align: left;
}
@media (max-width: 1023px) {
  .prow-btn { grid-template-columns: 1fr 0px 24px; gap: 12px; padding: 22px 0; }
  .prow-meta { display: none; }
}
/* Tag contextuel mobile/tablette : remplace les 5 colonnes desktop par UNE
   seule info, pertinente pour le tri actif (durée ou année — l'alpha n'en
   affiche aucune). Affichage INSTANTANÉ (pas d'animation propre) : c'est le
   fondu de la fiche entière (.prow--reveal) qui le porte. La classe sort-* sur
   #index-list ouvre la colonne du tag. */
.prow-meta-mobile { display: none; }
@media (max-width: 1023px) {
  .prow-meta-mobile {
    display: inline-block;
    font-family: 'Newsreader', serif;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    opacity: 0;
  }
  .prow-meta-mobile.is-visible { opacity: 1; }
  #index-list.sort-duree .prow-btn,
  #index-list.sort-annee .prow-btn { grid-template-columns: 1fr 56px 24px; }
}
.prow-mobile-tags { display: none; }
@media (max-width: 1023px) {
  .prow-mobile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    order: -2;
    grid-column: 1 / -1;
    margin-bottom: 4px;
  }
  .prow-tag {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--surface-dim, #f0efed);
    padding: 3px 9px;
    border-radius: 9999px;
    line-height: 1.3;
    white-space: nowrap;
  }
}
.prow-name {
  font-family: 'Newsreader', serif;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text);
  transition: color 0.2s ease;
}
.prow-btn:hover .prow-name,
.prow.open .prow-name { color: var(--primary); }
.prow-ext {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #28504c;
  background: var(--primary-container);
  padding: 3px 7px;
  border-radius: 9999px;
  margin-left: 8px;
  vertical-align: middle;
  line-height: 1;
}
.prow-meta { color: var(--text-muted); }
.prow-year     { font-family: 'Newsreader', serif; font-style: italic; font-size: 14px; font-variant-numeric: tabular-nums; }
.prow-players  { font-family: 'Newsreader', serif; font-size: 14px; }
.prow-duration { font-family: 'Newsreader', serif; font-size: 14px; font-variant-numeric: tabular-nums; }
.prow-diff     { font-family: 'Newsreader', serif; font-size: 14px; }
.prow-mode     { font-family: 'Newsreader', serif; font-size: 14px; }
.prow-caret {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  color: var(--text-light);
  transition: transform 0.25s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  transform-origin: center center;
  flex-shrink: 0;
}
.prow-btn:hover .prow-caret { color: var(--primary); }
.prow-detail-outer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.prow.open .prow-detail-outer {
  grid-template-rows: 1fr;
}
.prow-detail {
  overflow: hidden;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 56px;
  padding: 0;
  align-items: start;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), padding 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.prow.open .prow-detail {
  overflow: visible;
  padding: 0 0 48px 0;
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 1023px) {
  .prow-detail { grid-template-columns: 1fr; gap: 32px; }
  .prow-image  { order: -1; } /* image au-dessus des infos sur mobile */
}
.prow-desc {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 36px;
}
.prow-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 48px;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 28px;
}
@media (max-width: 767px) {
  .prow-spec-grid { grid-template-columns: 1fr; gap: 16px; }
}
/* spec-detail-grid réutilisé dans l'index (toggle) : sans la marge inférieure de la page jeu */
.prow-spec-detail {
  margin-bottom: 0;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 4px;
  gap: 0 32px;
}
/* Dans l'index, label au-dessus de la valeur (pas en colonne côte à côte) */
.prow-spec-detail .spec-detail-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  padding-bottom: 14px;
  padding-top: 14px;
}
.prow-spec-label {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light);
  margin: 0 0 6px;
}
.prow-spec-value {
  font-family: 'Newsreader', serif;
  font-size: 15px;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
}
.prow-image {
  display: block;
  position: relative;
  aspect-ratio: 9 / 7; /* ratio du slot "index" → background-size crop exact, sans distortion */
  /* Pas de overflow:hidden ici — on laisse .game-image-wrap (seul clip, comme .game-card-image sur la homepage) */
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.32s ease;
}
.prow-image:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px -8px rgba(47, 51, 52, 0.14), 0 4px 12px -4px rgba(47, 51, 52, 0.08);
}
.prow-image .game-image-wrap {
  height: 100% !important;
  border-radius: var(--radius-md); /* radius déplacé ici — un seul niveau de clip, identique à .game-card-image */
}
/* Zoom CSS-driven (identique au mécanisme .game-card:hover → .game-card-image img sur la homepage)
   !important nécessaire pour override les styles inline émis par PHP et par le JS event delegation */
.prow-image .game-image-wrap img,
.prow-image .game-image-wrap .game-image-inner {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.prow-image:hover .card-badge {
  transform: rotate(-3deg) scale(1.05);
}
.prow-image:hover .game-image-wrap img,
.prow-image:hover .game-image-wrap .game-image-inner {
  transform: scale(1.06) !important;
}
.prow-cta {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 36px;
  flex-wrap: wrap;
}
.prow-text-link {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid var(--primary);
  padding-bottom: 2px;
}

/* ══ Index filter/sort bar — Solution A (déclencheurs + popovers, une ligne) ══ */
.sticky-filter-bar--index { margin-bottom: 0; padding-top: 0; border-top: 1px solid rgba(0,0,0,0.06); }
/* neutralise les gradients hérités de .sticky-filter-bar */
.sticky-filter-bar--index::before,
.sticky-filter-bar--index::after { display: none; }

.ifb {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;        /* intérim avant la Solution B : wrap plutôt que débordement */
  row-gap: 8px;
  padding-top: 11px;
  padding-bottom: 11px;
}

/* Déclencheur (Prix ▾, Niveau ▾, Durée ▾, Mode ▾, Trier ▾) */
.ifb-pop { position: relative; flex: none; }
.ifb-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.14);
  background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ifb-trigger:hover { border-color: rgba(0,0,0,0.28); color: var(--text); }
.ifb-trigger.is-active { background: var(--primary-container); color: var(--primary); border-color: transparent; }
.ifb-caret { font-size: 9px; opacity: 0.65; }

/* Popover */
.ifb-popover {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  z-index: 60;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 44px -14px rgba(0,0,0,0.24);
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: ifbPop 0.16s ease both;
}
.ifb-popover--right { left: auto; right: 0; }
.ifb-popover--mode { min-width: 228px; }
.ifb-popover[hidden] { display: none; }
@keyframes ifbPop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.ifb-pop-title {
  font-family: 'Inter', sans-serif;
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-light); margin: 0 0 6px;
}
.ifb-pop-note {
  margin: 9px 0 0;
  font-family: 'Newsreader', serif; font-style: italic; font-size: 11px;
  color: var(--text-light); line-height: 1.5;
}
.ifb-pop-note strong { font-style: normal; color: var(--text-muted); font-weight: 600; }

/* Option en colonne */
.ifb-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.ifb-opt:hover { background: var(--surface); color: var(--text); }
.ifb-opt.is-active { background: var(--primary-container); color: var(--primary); }
.ifb-check { color: var(--primary); font-size: 12px; opacity: 0; }
.ifb-opt.is-active .ifb-check { opacity: 1; }
.ifb-opt-sep { height: 1px; background: rgba(0,0,0,0.08); margin: 5px 2px; }
/* Option exclusive « Les deux » */
.ifb-opt--both { font-style: italic; border: 1px solid rgba(0,0,0,0.16); }
.ifb-opt--both.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.ifb-opt--both.is-active .ifb-check { color: #fff; }

/* Séparateur vertical */
.ifb-divider { width: 1px; height: 20px; background: rgba(0,0,0,0.1); margin: 0 2px; flex: none; }

/* Bascules (2 joueurs, Extensions, Avec article…) */
.ifb-toggle {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px;
  border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.14);
  background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ifb-toggle:hover { border-color: rgba(0,0,0,0.28); color: var(--text); }
.ifb-toggle.is-active { background: var(--primary-container); color: var(--primary); border-color: var(--primary); }

/* Cluster droite : compteur · tri · effacer */
.ifb-right { margin-left: auto; display: flex; align-items: center; gap: 9px; flex: none; }
.ifb-count {
  font-family: 'Inter', sans-serif; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-light); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.ifb-sort-label { font-weight: 600; }
.ifb-dir {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex: none;
  border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.14);
  background: transparent;
  color: var(--text-muted);
  font-size: 14px; line-height: 1; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.ifb-dir:hover { border-color: rgba(0,0,0,0.28); color: var(--text); }
.ifb-dir.is-flipping { animation: ifbFlip 0.35s cubic-bezier(0.22,1,0.36,1) both; }
@keyframes ifbFlip { 0% { transform: rotateX(0deg); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0deg); } }
.ifb-clear {
  background: none; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 500;
  color: var(--text-light); white-space: nowrap; padding: 6px 2px;
}
.ifb-clear:hover { color: var(--text-muted); }
.ifb-clear[hidden] { display: none; }

/* ══ Home — barre `.ifb` partagée + titre compact en mode sticky ══ */
/* Les pseudo-éléments de .sticky-filter-bar (ombres de scroll)
   restent actifs sur la home — hérités de common.css */
/* La home garde la barre `.ifb` visible sur tablette/mobile (scroll horizontal) */
@media (max-width: 1023px) {
  .sticky-filter-bar--home .ifb {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-left: 20px;
    padding-right: 20px;
  }
  .sticky-filter-bar--home .ifb::-webkit-scrollbar { display: none; }
  .sticky-filter-bar--home .ifb-right { margin-left: auto; }
}
/* Titre de section — fondu progressif piloté par --stuck-progress (0→1) */
.sticky-section-title {
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.015em;
  color: var(--text);
  /* Piloté par le JS via --stuck-progress : 0 = caché, 1 = visible */
  max-height: calc(var(--stuck-progress, 0) * 44px);
  opacity: var(--stuck-progress, 0);
  transform: translateY(calc((1 - var(--stuck-progress, 0)) * -6px));
  padding-top: calc(var(--stuck-progress, 0) * 4px);
  padding-bottom: calc(var(--stuck-progress, 0) * 2px);
  will-change: max-height, opacity, transform;
}
.sticky-title-pill {
  vertical-align: middle; margin-right: 10px; padding: 4px 10px; font-size: 0;
  border: 1px solid rgba(0,0,0,0.08);
}

/* ══ Solution B (≤1023px) — bouton Filtrer + chips + panneau ══ */
.ifb-b { display: none; }
@media (min-width: 1024px) {
  .ifb-b { display: none !important; }
  .ifb-b-scrim, .ifb-b-panel { display: none !important; }
}
@media (max-width: 1023px) {
  .ifb { display: none !important; }
  .ifb-b { display: block; }
}

/* Barre réduite */
.ifb-b-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; flex-wrap: wrap;
}
.ifb-b-pop { position: relative; flex: none; }
.ifb-b-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 9999px;
  background: var(--primary); color: #fff; border: none;
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.ifb-b-badge {
  background: rgba(255,255,255,0.25); border-radius: 9999px;
  padding: 0 7px; font-size: 10px; font-variant-numeric: tabular-nums;
}
.ifb-b-badge[hidden] { display: none; }

/* Chips */
.ifb-b-chips {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  flex: 1; min-width: 0;
}
.ifb-b-right {
  margin-left: auto; display: flex; align-items: center; gap: 9px; flex: none;
}
.ifb-b-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 6px 6px 12px; border-radius: 9999px;
  background: var(--primary-container); color: var(--primary);
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 500;
  white-space: nowrap;
}
.ifb-b-chip-x {
  width: 16px; height: 16px; border: none; border-radius: 50%;
  background: rgba(60,102,99,0.18); color: var(--primary);
  cursor: pointer; font-size: 10px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Scrim mobile */
.ifb-b-scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15,20,20,0.4);
  animation: ifbFade 0.2s ease both;
}
.ifb-b-scrim[hidden] { display: none; }
@keyframes ifbFade { from { opacity: 0; } to { opacity: 1; } }

/* Panneau (tablette : dropdown, mobile : bottom-sheet) */
.ifb-b-panel {
  position: absolute; top: calc(100% + 9px); left: 40px; z-index: 91;
  width: 560px; max-height: 80vh; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 22px 50px -16px rgba(0,0,0,0.26);
  padding: 20px;
  animation: ifbPop 0.16s ease both;
}
.ifb-b-panel[hidden] { display: none; }
.ifb-b-handle { display: none; }

/* Mobile : bottom-sheet */
@media (max-width: 640px) {
  .ifb-b-panel {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0;
    width: auto;
    /* Sommet du sheet maintenu sous le header fixe */
    max-height: calc(100vh - var(--header-h, 62px) - 16px);
    max-height: calc(100dvh - var(--header-h, 62px) - 16px);
    border-radius: 22px 22px 0 0;
    padding: 8px 18px 22px;
    animation: ifbSheet 0.3s cubic-bezier(0.22,1,0.36,1) both;
  }
  .ifb-b-handle {
    display: flex; justify-content: center; padding: 7px 0 12px;
  }
  .ifb-b-handle::after {
    content: ''; width: 38px; height: 4px; border-radius: 9999px;
    background: rgba(0,0,0,0.14);
  }
}
@keyframes ifbSheet { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* En-tête panneau */
.ifb-b-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px;
}
.ifb-b-panel-title {
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 700;
  letter-spacing: -0.01em;
}
.ifb-b-panel-clear {
  background: none; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 500;
  color: var(--primary);
}
.ifb-b-panel-clear[hidden] { display: none; }

/* Titres de section */
.ifb-b-section-title {
  font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-light); margin-bottom: 8px;
}

/* Groupe d'options (tablette : row, mobile : column) */
.ifb-b-group {
  display: flex; flex-wrap: nowrap; gap: 6px; margin-bottom: 16px;
  align-items: center;
}
@media (max-width: 640px) {
  .ifb-b-group { flex-direction: column; gap: 4px; }
  .ifb-b-pill { width: 100%; justify-content: space-between; padding: 11px 12px; }
}

/* Pill (option) */
.ifb-b-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px; border-radius: 9999px; border: none;
  background: transparent; color: var(--text-muted);
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 500;
  white-space: nowrap; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.ifb-b-pill:hover { background: var(--surface); color: var(--text); }
.ifb-b-pill.is-active { background: var(--primary-container); color: var(--primary); }

/* Pill exclusive « Les deux » */
.ifb-b-pill--both {
  font-style: italic;
  border: 1px solid rgba(0,0,0,0.18);
}
.ifb-b-pill--both.is-active {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
}
.ifb-b-mode-sep { width: 1px; height: 16px; background: rgba(0,0,0,0.12); margin: 0 2px; flex: none; }
@media (max-width: 640px) {
  .ifb-b-mode-sep { width: auto; height: 1px; margin: 5px 2px; }
}

/* Bascules (2 joueurs, Extensions) */
.ifb-b-toggles { display: flex; gap: 8px; margin-bottom: 18px; }
.ifb-b-toggle {
  flex: 1; justify-content: center;
  display: inline-flex; align-items: center;
  padding: 7px 13px; border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.14); background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 500;
  white-space: nowrap; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ifb-b-toggle:hover { border-color: rgba(0,0,0,0.28); color: var(--text); }
.ifb-b-toggle.is-active { background: var(--primary-container); color: var(--primary); border-color: var(--primary); }

/* Tri segmenté */
.ifb-b-seg {
  display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9999px;
  overflow: hidden;
}
.ifb-b-seg-opt {
  padding: 6px 13px; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
  white-space: nowrap;
  background: transparent; color: var(--text-muted);
  transition: background 0.12s ease, color 0.12s ease;
}
.ifb-b-seg-opt:not(.is-active):hover { background: var(--surface-low); color: var(--text); }
.ifb-b-seg-opt.is-active { background: var(--primary); color: #fff; }

/* Tri compact (dropdown) — mobile uniquement */
.ifb-b-sortpop { position: relative; flex: none; display: none; }
.ifb-b-sort-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.14); background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 500;
  white-space: nowrap; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ifb-b-sort-trigger:hover { border-color: rgba(0,0,0,0.28); color: var(--text); }
.ifb-b-sort-label { font-weight: 600; }
.ifb-b-sort-menu {
  position: absolute; top: calc(100% + 9px); right: 0; z-index: 60;
  min-width: 160px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 44px -14px rgba(0,0,0,0.24);
  padding: 13px; display: flex; flex-direction: column; gap: 3px;
  animation: ifbPop 0.16s ease both;
}
.ifb-b-sort-menu[hidden] { display: none; }
.ifb-b-sort-opt {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 9px 12px; border: none; border-radius: 8px;
  background: transparent; color: var(--text-muted);
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  text-align: left; cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.ifb-b-sort-opt:hover { background: var(--surface); color: var(--text); }
.ifb-b-sort-opt.is-active { background: var(--primary-container); color: var(--primary); }

/* Bascule tablette/mobile du cluster tri */
@media (max-width: 640px) {
  #b-count { display: none; }
  .ifb-b-seg { display: none; }
  .ifb-b-sortpop { display: block; }
}

/* Bouton « Voir N résultats » */
.ifb-b-submit {
  display: block; width: 100%;
  padding: 13px; border-radius: 9999px; border: none;
  background: var(--primary); color: #fff;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer;
}

/* ── Archive subtitle ── */
.archive-subtitle {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-size: 19px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 560px;
}

/* ── Archive hero ── */
/* Padding horizontal délégué à .px-page — on ne définit ici que le vertical */
.archive-hero { padding-top: 108px; padding-bottom: 80px; }
@media (max-width: 767px) { .archive-hero { padding-top: 72px; padding-bottom: 48px; } }
.archive-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.archive-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(42px, 6vw, 80px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--text);
}
.archive-title em {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-weight: 400;
  display: inline-block;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 9' preserveAspectRatio='none'%3E%3Cpath d='M2 6.5C24 2.5 56 2 88 4.5c12 1 22 1.5 30 .5' fill='none' stroke='%23e8853c' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left 96%/100% 0.16em;
  padding-bottom: 0.1em;
}
.archive-count {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ── Alphabetical index ── */
.index-letter-group + .index-letter-group { margin-top: 0; }
.index-letter-sep {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  padding: 36px 0 8px;
  line-height: 1;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  margin-bottom: 0;
}
.index-letter-group.is-first-visible .index-letter-sep { padding-top: 8px; }

/* ════════════════════════════════════════════════════════════════════════════
   SINGLE COLLECTION — Hero, Note, Vitrine, CTA
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Hero ── */
.coll-hero { padding-top: 48px; padding-bottom: 56px; }
.coll-hero-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 24px;
}
.coll-hero-grid {
  display: grid; grid-template-columns: 1fr 0.92fr;
  gap: 56px; align-items: center; margin-top: 40px;
}
/* Colonne carte « à jouer » + crédit photo */
.coll-hero-card { display: flex; flex-direction: column; }
/* Ombre atténuée (mais conservée) + bordure — même bordure que .collection-card
   dans l'archive des collections. */
.coll-hero-card .ttdl-card {
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px -18px rgba(47, 51, 52, 0.32);
}
.coll-hero-credit {
  font-family: 'Inter', sans-serif; font-size: 12px;
  color: var(--text-light); line-height: 1.4;
  margin: 14px 0 0; text-align: center;
}
.coll-hero-credit a {
  color: var(--text-muted); text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.18);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.coll-hero-credit a:hover { color: var(--primary); border-color: var(--primary); }
.coll-hero-title {
  font-family: 'Newsreader', serif; font-weight: 500;
  font-size: clamp(2.8rem, 5.5vw, 4.6rem);
  letter-spacing: -0.025em; color: var(--text);
  margin: 0 0 28px; line-height: 1.05;
}
.coll-hero-desc {
  font-family: 'Newsreader', serif; font-style: italic;
  font-size: 19px; color: var(--text-muted); line-height: 1.65; margin: 0;
}
/* Stats en ligne horizontale (mise en forme du template) */
.coll-hero-stats {
  display: flex; gap: 44px;
  margin-top: 32px; padding-top: 26px;
  border-top: 1px solid rgba(0,0,0,0.1);
}
.coll-stat-label {
  font-family: 'Inter', sans-serif; font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-light); margin: 0 0 8px;
}
.coll-stat-value {
  font-family: 'Newsreader', serif; font-size: 22px;
  color: var(--text); margin: 0; line-height: 1;
}

/* ── Note curatoriale ── */
.coll-note {
  background: var(--surface); border-radius: var(--radius-md);
  padding: 48px 56px;
  display: grid; grid-template-columns: 180px 1fr; gap: 48px; align-items: start;
}
.coll-note-eyebrow {
  font-family: 'Inter', sans-serif; font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary); margin: 0 0 14px;
}
.coll-note-sub {
  font-family: 'Newsreader', serif; font-style: italic;
  font-size: 13px; color: var(--text-light); margin: 0; line-height: 1.5;
}
.coll-note-body {
  font-family: 'Newsreader', serif; font-size: 17px;
  color: var(--text); line-height: 1.75;
}
.coll-note-body p { margin: 0 0 16px; }
.coll-note-body p:last-child { margin-bottom: 0; }

/* ── Barre de navigation segments ── */
.coll-shelf-nav {
  display: flex; align-items: center; gap: 24px; margin-bottom: 28px;
  scroll-margin-top: calc(var(--header-h, 64px) + 16px);
}
.coll-nav-label {
  font-family: 'Inter', sans-serif; font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--primary); margin: 0; white-space: nowrap;
}
.coll-nav-hint {
  font-family: 'Newsreader', serif; font-style: italic;
  font-size: 12px; color: var(--text-light); margin: 0; white-space: nowrap;
}
.coll-segs {
  flex: 1; display: flex; gap: 4px; align-items: center;
}
.coll-seg {
  flex: 1; background: none; border: none; cursor: pointer;
  padding: 8px 0; position: relative;
}
.coll-seg-bar {
  height: 2px;
  background: rgba(0,0,0,0.12);
  transition: background 0.3s ease;
}
.coll-seg.is-active .coll-seg-bar { background: var(--primary); }
.coll-seg-num {
  position: absolute; top: 14px; left: 0;
  font-family: 'Newsreader', serif; font-style: italic;
  font-size: 11px; color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* ── Corps de la vitrine (deux colonnes) ── */
.coll-shelf-body {
  display: grid; grid-template-columns: 1.5fr 1fr;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: var(--radius-md);
  min-height: 580px; position: relative; overflow: hidden;
}
.coll-ambient {
  position: absolute; inset: 0; pointer-events: none;
  transition: background 0.8s ease;
}

/* ── Panneau vedette (gauche) ── */
.coll-featured {
  padding: 48px 48px 36px 40px;
  border-right: 1px solid rgba(0,0,0,0.1);
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
}
@keyframes collFeatIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes collImgIn {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: scale(1); }
}
.coll-feat-inner { display: flex; flex-direction: column; flex: 1; }
.coll-feat-inner.is-entering { animation: collFeatIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
.coll-feat-img {
  border-radius: var(--radius-md); overflow: hidden;
  aspect-ratio: 3 / 2; width: 100%;
  margin-bottom: 28px; flex-shrink: 0;
  animation: collImgIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* game-image-wrap occupe tout l'espace du conteneur */
.coll-feat-img .game-image-wrap { height: 100%; }
.coll-feat-meta {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Inter', sans-serif; font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-light); margin: 0 0 14px;
}
.coll-dot { color: var(--text-light); }
.coll-feat-title {
  font-family: 'Newsreader', serif; font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.025em; color: var(--text);
  margin: 0 0 18px; line-height: 0.98;
}
.coll-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.coll-tag {
  font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 9999px;
  background: var(--primary-container); color: var(--primary);
}
.coll-feat-note {
  font-family: 'Newsreader', serif; font-style: italic;
  font-size: 17px; color: var(--text); line-height: 1.6;
  margin: 0 0 20px; padding-left: 16px;
  border-left: 2px solid var(--primary);
}
.coll-feat-resume {
  font-family: 'Newsreader', serif; font-size: 14px;
  color: var(--text-muted); line-height: 1.7; margin: 0 0 6px;
}
.coll-feat-stats {
  display: grid; grid-template-columns: repeat(3, auto);
  gap: 28px; margin-bottom: 28px;
}
.coll-feat-stats-label {
  font-family: 'Inter', sans-serif; font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-light); margin: 0 0 6px;
}
.coll-feat-stats-value {
  font-family: 'Newsreader', serif; font-size: 13px;
  color: var(--text); margin: 0; line-height: 1.3;
}
.coll-feat-footer {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; flex-wrap: wrap;
  padding-top: 20px; border-top: 1px solid rgba(0,0,0,0.1);
  margin-bottom: 18px;
}
.coll-feat-price-label {
  font-family: 'Inter', sans-serif; font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-light); margin: 0 0 4px;
}
.coll-feat-price {
  font-family: 'Newsreader', serif; font-size: 22px;
  color: var(--text); margin: 0; font-variant-numeric: tabular-nums;
}
.coll-feat-ctas { display: flex; gap: 12px; align-items: center; }
.coll-article-link { align-self: flex-start; margin-bottom: 20px; }
.coll-feat-link {
  font-family: 'Inter', sans-serif; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.coll-feat-link:hover { color: var(--primary); }
/* .coll-feat-buy — remplacé par .btn.btn-primary.btn-sm */
.coll-next-btn {
  background: none; border: none; border-top: 1px solid rgba(0,0,0,0.06);
  cursor: pointer; padding: 14px 0 0; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: auto;
}
.coll-next-label {
  font-family: 'Inter', sans-serif; font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-light); margin: 0 0 4px;
}
.coll-next-title {
  font-family: 'Newsreader', serif; font-style: italic;
  font-size: 15px; color: var(--text); margin: 0;
}
.coll-next-arrow { font-size: 14px; color: var(--primary); }

/* ── Tracklist (droite) ── */
.coll-tracklist { padding: 40px 40px 40px 40px; position: relative; z-index: 1; }
.coll-track-header {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px;
}
.coll-track-header-label {
  font-family: 'Inter', sans-serif; font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-light); margin: 0;
}
.coll-track-header-hint {
  font-family: 'Newsreader', serif; font-style: italic;
  font-size: 11px; color: var(--text-light); margin: 0;
}
.coll-track-list { display: flex; flex-direction: column; }
.coll-track-row {
  background: none; border: none; cursor: pointer;
  padding: 14px 16px 14px 0; text-align: left;
  display: grid; grid-template-columns: 28px 1fr 40px;
  gap: 12px; align-items: center;
  border-top: 1px solid rgba(0,0,0,0.06);
  position: relative; transition: padding 0.3s ease;
}
.coll-track-row.is-active { padding-top: 20px; padding-bottom: 20px; }
.coll-track-row:hover:not(.is-active) { background: rgba(0,0,0,0.02); }
.coll-track-liseré {
  position: absolute; left: -40px; top: 0; bottom: 0; width: 3px;
  background: transparent; transition: background 0.25s ease;
}
.coll-track-row.is-active .coll-track-liseré { background: var(--primary); }
.coll-track-num {
  display: inline-flex; align-items: center; justify-content: flex-start; min-width: 28px;
}
.coll-track-num em {
  font-family: 'Newsreader', serif; font-style: italic;
  font-size: 14px; color: var(--text-light); font-variant-numeric: tabular-nums;
  transition: color 0.2s ease;
}
.coll-track-row:hover .coll-track-num em { color: var(--primary); }
@keyframes collDotPulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%     { transform: scale(1.6); opacity: 0.4; }
}
.coll-track-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); animation: collDotPulse 1.8s ease-in-out infinite;
}
.coll-track-body { min-width: 0; }
.coll-track-name {
  display: block; font-size: 13px; color: var(--text-muted);
  font-family: 'Inter', sans-serif; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 5px; transition: all 0.25s ease;
}
.coll-track-row.is-active .coll-track-name {
  font-family: 'Newsreader', serif; font-size: 19px;
  color: var(--text); letter-spacing: -0.01em;
}
.coll-track-row:hover:not(.is-active) .coll-track-name { color: var(--primary); }
.coll-track-bar {
  height: 2px; background: rgba(0,0,0,0.07); border-radius: 1px; overflow: hidden;
}
.coll-track-fill { display: block; height: 100%; background: var(--primary); opacity: 0.4; }
.coll-track-row.is-active .coll-track-fill { opacity: 1; }
.coll-track-dur {
  font-family: 'Newsreader', serif; font-size: 12px;
  color: var(--text-light); white-space: nowrap;
}

/* ── CTA Footer ── */
.coll-footer-cta {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
  padding: 40px 48px; border-radius: var(--radius-md);
  background: var(--surface);
}
.coll-footer-cta-eyebrow {
  font-family: 'Inter', sans-serif; font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-light); margin: 0 0 8px;
}
.coll-footer-cta-title {
  font-family: 'Newsreader', serif; font-size: 22px;
  color: var(--text); margin: 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .coll-hero-grid    { grid-template-columns: 1fr; gap: 36px; }
  .coll-hero-card    { max-width: 420px; }
  .coll-hero-stats   { flex-wrap: wrap; gap: 28px; }
  .coll-note         { grid-template-columns: 1fr; gap: 20px; padding: 32px 28px; }
  .coll-shelf-body   { grid-template-columns: 1fr; }
  .coll-featured     { border-right: none; border-bottom: 1px solid rgba(0,0,0,0.1); padding: 32px 24px; }
  .coll-tracklist    { padding: 32px 24px; }
  .coll-track-liseré { display: none; }
  .coll-footer-cta   { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
  .coll-nav-hint     { display: none; }
}
@media (max-width: 600px) {
  .coll-hero         { padding-top: 40px; padding-bottom: 36px; }
  .coll-hero-title   { font-size: 2.2rem; }
  .coll-hero-stats   { gap: 16px; }
  .coll-feat-title   { font-size: 2rem; }
  .coll-feat-stats   { grid-template-columns: repeat(2, auto); gap: 20px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   ACCORDÉON MOBILE — single-collection ≤ 768px
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Header ── */
.coll-acc-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
}
.coll-acc-header-label {
  font-family: 'Inter', sans-serif; font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-light); margin: 0;
}
.coll-acc-header-hint {
  font-family: 'Newsreader', serif; font-style: italic;
  font-size: 11px; color: var(--text-light); margin: 0;
}

/* ── Liste ── */
.coll-acc-list { display: flex; flex-direction: column; }

/* ── Item ── */
.coll-acc-item {
  border-top: 1px solid rgba(0,0,0,0.07);
  /* Compense le header fixe lors du scrollIntoView */
  scroll-margin-top: calc(var(--header-h, 64px) + 8px);
}
.coll-acc-item:last-child { border-bottom: 1px solid rgba(0,0,0,0.07); }

/* ── Toggle (header cliquable) ── */
.coll-acc-toggle {
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 16px 0; text-align: left;
  display: grid; grid-template-columns: 28px 1fr auto;
  gap: 12px; align-items: center;
}
.coll-acc-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); animation: collDotPulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
.coll-acc-num em {
  font-family: 'Newsreader', serif; font-style: italic;
  font-size: 14px; color: var(--text-light); font-variant-numeric: tabular-nums;
}
.coll-acc-name {
  font-family: 'Newsreader', serif; font-size: 16px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.2s ease;
}
.coll-acc-item.is-open .coll-acc-name {
  font-size: 19px; color: var(--text); letter-spacing: -0.01em;
}
.coll-acc-toggle:hover .coll-acc-name { color: var(--primary); }
.coll-acc-item.is-open .coll-acc-toggle:hover .coll-acc-name { color: var(--text); }
.coll-acc-dur {
  font-family: 'Newsreader', serif; font-size: 12px;
  color: var(--text-light); white-space: nowrap; flex-shrink: 0;
}

/* ── Corps dépliable ── */
.coll-acc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.coll-acc-item.is-open .coll-acc-body {
  grid-template-rows: 1fr;
}
/* Enfant unique requis par le trick grid-template-rows 0fr → 1fr */
.coll-acc-body-wrap {
  min-height: 0;
  overflow: hidden;
}
/* Le popup affilié est position:absolute — on lève le clip quand il est ouvert */
.coll-acc-body-wrap:has(.affilie-details[open]) { overflow: visible; }

/* ── Contenu du corps ── */
.coll-acc-img {
  aspect-ratio: 3 / 2; overflow: hidden;
  border-radius: var(--radius-md); margin-bottom: 20px;
}
.coll-acc-img .game-image-wrap { height: 100%; }
.coll-acc-inner {
  display: flex; flex-direction: column; gap: 14px;
  padding-bottom: 24px;
}
.coll-acc-title {
  font-family: 'Newsreader', serif; font-weight: 500;
  font-size: 24px; letter-spacing: -0.02em; line-height: 1.1;
  color: var(--text); margin: 0;
}
.coll-acc-stats { grid-template-columns: repeat(3, 1fr) !important; }
.coll-acc-footer {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  padding-top: 16px; border-top: 1px solid rgba(0,0,0,0.08);
}
.coll-acc-price { flex-shrink: 0; }
.coll-acc-ctas { display: flex; }
.coll-acc-ctas .btn { justify-content: center; flex: 1; }
