/* =========================================================
   Deck Bar - Jeux préférés du staff
   CSS nettoyé

   Shortcodes couverts :
   - [deckbar_staff_favorites]      : ancien affichage complet interactif
   - [deckbar_staff_random_cards]   : vignettes aléatoires compactes sur la page Jeux
   - [deckbar_staff_page]           : page complète "Coups de cœur du staff"

   Dépendances :
   - variables globales Deck Bar : --deck-dark, --deck-deep, --deck-green, etc.
   - cartes ludothèque : .deck-game-card, .deck-game-image, .deck-game-title, etc.
   ========================================================= */


/* =========================================================
   1. Shortcode complet historique : [deckbar_staff_favorites]
   Affichage interactif staff + tags + jeu actif
   ========================================================= */

.dsf-wrapper {
  width: min(1140px, calc(100% - 40px));
  margin: 3rem auto 4rem;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  color: var(--deck-deep);
  font-family: var(--deck-font-main, Arial, Helvetica, sans-serif);
}

.dsf-wrapper > * {
  max-width: none !important;
}

/* Bandeau titre + choix du membre du staff */
.dsf-staff-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem !important;
  padding: 1rem 1.25rem;
  background: var(--deck-dark);
  color: var(--deck-white);
  border-radius: 24px;
}

.dsf-title-prefix {
  margin: 0 !important;
  color: var(--deck-white);
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  line-height: 1.1;
}

.dsf-staff-selector {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dsf-staff-btn {
  background: transparent !important;
  color: var(--deck-white) !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  border-radius: 999px;
  padding: 0.45rem 0.9rem !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  cursor: pointer;
}

.dsf-staff-btn.dsf-active {
  background: var(--deck-accent) !important;
  color: var(--deck-dark) !important;
  border-color: var(--deck-accent) !important;
}

.dsf-staff-btn.dsf-active::after {
  display: none !important;
}

/* Panneaux staff */
.dsf-panel {
  display: none;
}

.dsf-panel.dsf-active {
  display: block;
}

/* Carte globale du shortcode complet */
.dsf-columns {
  display: grid !important;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 1.2rem !important;
  align-items: start !important;
  padding: 1rem;
  background: var(--deck-white);
  border: 2px solid var(--deck-grey-light);
  border-radius: 24px;
  box-shadow:
    0 2px 0 rgba(0, 51, 51, 0.10),
    inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

/* Photo staff */
.dsf-photo-col {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex: initial !important;
}

.dsf-photo-img,
.dsf-photo-placeholder {
  width: 90px !important;
  height: 90px !important;
  border-radius: 50%;
  object-fit: cover;
  background: var(--deck-white);
  border: 3px solid var(--deck-accent);
  color: var(--deck-deep);
  font-size: 2rem !important;
  font-weight: 900;
}

.dsf-games-col {
  min-width: 0;
}

/* Tags de sélection des jeux */
.dsf-tags {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.5rem !important;
  margin: 0 0 0.8rem !important;
}

.dsf-tag-btn {
  min-height: 32px;
  padding: 0 0.85rem !important;
  background: var(--deck-green) !important;
  color: var(--deck-white) !important;
  border: 1px solid var(--deck-deep) !important;
  border-radius: 999px !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  cursor: pointer;
}

.dsf-tag-btn.dsf-active {
  background: var(--deck-accent) !important;
  color: var(--deck-deep) !important;
  border-color: var(--deck-deep) !important;
}

/* Jeu actif */
.dsf-games {
  position: relative;
}

.dsf-game {
  display: none;
}

.dsf-game.dsf-active {
  display: grid !important;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  grid-template-areas:
    "image title button"
    "image meta button"
    "image tagline button";
  align-items: center;
  gap: 0.35rem 1rem;
}

.dsf-game-header {
  display: contents !important;
}

.dsf-game-box {
  grid-area: image;
  width: 130px !important;
  height: 130px !important;
  margin: 0 !important;
  padding: 0.5rem;
  background: var(--deck-white);
  border: 2px solid var(--deck-grey-light) !important;
  border-radius: 18px !important;
  overflow: hidden;
}

.dsf-game-box a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.dsf-game-box img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

.dsf-game-title-block {
  grid-area: title;
  display: block !important;
}

.dsf-game-quote {
  display: none !important;
}

.dsf-game-title {
  margin: 0 !important;
  color: var(--deck-deep) !important;
  font-size: 1.65rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.dsf-game-meta {
  grid-area: meta;
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.45rem !important;
  margin: 0 !important;
}

.dsf-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 26px;
  padding: 0 0.6rem;
  background: var(--deck-dark);
  color: var(--deck-white);
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1;
}

.dsf-meta-icon {
  font-size: 0.85rem !important;
  line-height: 1;
}

.dsf-meta-text {
  font-size: 0.78rem !important;
  font-weight: 700;
}

.dsf-tagline {
  grid-area: tagline;
  margin: 0 !important;
  color: var(--deck-green);
  font-size: 1rem !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

.dsf-description {
  display: none !important;
}

.dsf-button {
  grid-area: button;
  align-self: center;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 1.1rem !important;
  background: var(--deck-accent) !important;
  color: var(--deck-dark) !important;
  border: 2px solid var(--deck-green) !important;
  border-radius: 999px !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  white-space: nowrap;
}

.dsf-button:hover {
  background: var(--deck-accent-hover) !important;
  color: var(--deck-dark) !important;
  transform: translateY(-2px);
}


/* =========================================================
   2. Shortcode compact : [deckbar_staff_random_cards]
   Vignettes aléatoires utilisées sur la page Jeux
   ========================================================= */

.dsf-random-section {
  width: min(1140px, calc(100% - 40px));
  margin: 3rem auto 3rem;
}

.dsf-random-grid {
  display: grid;
  align-items: stretch;
  gap: 1.2rem !important;
}

.dsf-random-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dsf-random-grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dsf-random-card-link {
  display: block;
  height: 100%;
  color: inherit !important;
  text-decoration: none !important;
}

.dsf-random-card-link:hover {
  color: inherit !important;
  text-decoration: none !important;
}

/* Mini carte staff : image + titre uniquement */
.dsf-random-card {
  height: 100%;
  min-height: 0 !important;
  padding: 8px !important;
  border-radius: 16px !important;
  justify-content: flex-start !important;
}

/* Bandeau "Recommandé par" */
.dsf-random-card .deck-game-referent,
.dsf-random-referent {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 7px !important;
  margin-bottom: 6px !important;
  font-size: 0.62rem !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

.dsf-random-staff-img,
.dsf-random-staff-initial {
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px !important;
  border-radius: 50%;
}

.dsf-random-staff-img {
  object-fit: cover;
  display: block;
}

.dsf-random-staff-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--deck-dark);
  color: var(--deck-white);
  font-size: 0.72rem;
  font-weight: 900;
}

/* Image du jeu, volontairement compacte pour réduire la hauteur */
.dsf-random-card .deck-game-image {
  height: 85px !important;
  max-height: 85px !important;
  margin-bottom: 8px !important;
}

.dsf-random-card .deck-game-image img {
  max-width: 100% !important;
  max-height: 85px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Titre limité à 2 lignes */
.dsf-random-card .deck-game-title {
  margin: 0 !important;
  color: var(--deck-deep) !important;
  font-size: 1rem !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
  min-height: 2.1rem !important;
  max-height: 2.1rem !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Les infos inutiles sont masquées dans cette version compacte */
.dsf-random-section .deck-game-type,
.dsf-random-section .deck-game-meta {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Bouton vers la page complète */
.dsf-random-more {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.2rem !important;
}

.dsf-random-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 42px;
  padding: 0 1.6rem;
  background: var(--deck-green);
  color: var(--deck-white) !important;
  border: 3px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--deck-radius-pill);
  font-family: var(--deck-font-main);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 2px 0 rgba(0, 51, 51, 0.18);
  transition: transform 0.18s ease, background 0.18s ease;
}

.dsf-random-button:hover {
  background: var(--deck-dark);
  color: var(--deck-white) !important;
  transform: translateY(-2px);
}

.dsf-random-button-arrow {
  font-size: 1.8rem;
  line-height: 1;
  transform: translateY(-1px);
}


/* =========================================================
   3. Page complète : [deckbar_staff_page]
   Page dédiée "Les coups de cœur du staff"
   ========================================================= */

.dsf-page {
  background: var(--deck-bg-light);
  color: var(--deck-deep);
  padding: 1.5rem 0 5rem;
  overflow: hidden;
}

.dsf-page-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.dsf-page-back {
  margin-bottom: 2rem;
}

.dsf-page-back a {
  color: var(--deck-deep);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.dsf-page-back a:hover {
  color: var(--deck-green);
}

.dsf-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.dsf-page-title {
  color: var(--deck-deep);
  font-family: var(--deck-font-main);
  font-size: clamp(3rem, 5vw, 4.6rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.05em;
  margin: 0;
}

/* Menu déroulant de sélection du staff */
.dsf-staff-dropdown {
  position: relative;
  width: 190px;
  flex: 0 0 190px;
  z-index: 20;
}

.dsf-staff-dropdown summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 56px;
  padding: 0.5rem 0.8rem;
  background: var(--deck-white);
  color: var(--deck-deep);
  border: 1.5px solid var(--deck-deep);
  border-radius: 22px;
  font-weight: 700;
}

.dsf-staff-dropdown summary::-webkit-details-marker {
  display: none;
}

.dsf-staff-dropdown summary img,
.dsf-staff-dropdown-item img,
.dsf-staff-dropdown-initial {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
}

.dsf-staff-dropdown summary img,
.dsf-staff-dropdown-item img {
  object-fit: cover;
}

.dsf-staff-dropdown-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--deck-dark);
  color: var(--deck-white);
  font-weight: 900;
}

.dsf-staff-dropdown-arrow {
  margin-left: auto;
  font-size: 1.4rem;
  line-height: 1;
}

.dsf-staff-dropdown[open] .dsf-staff-dropdown-arrow {
  transform: rotate(180deg);
}

.dsf-staff-dropdown-list {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  padding: 0.6rem 0;
  background: var(--deck-white);
  border: 1px solid rgba(0, 51, 51, 0.22);
  border-radius: 0 0 22px 22px;
  box-shadow: 0 12px 25px rgba(0, 51, 51, 0.12);
}

.dsf-staff-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.45rem 0.8rem;
  color: var(--deck-deep) !important;
  text-decoration: none !important;
  font-weight: 600;
}

.dsf-staff-dropdown-item:hover {
  background: rgba(1, 255, 46, 0.12);
}

/* Grille de jeux de la page complète */
.dsf-page-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.dsf-page-card {
  height: 100%;
}

.dsf-page-empty {
  color: var(--deck-deep);
  font-weight: 600;
}


/* =========================================================
   4. Responsive
   ========================================================= */

@media (max-width: 1024px) {
  .dsf-random-grid-4,
  .dsf-random-grid-5,
  .dsf-page-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  /* Shortcode complet historique */
  .dsf-wrapper {
    width: min(100% - 28px, 1140px);
    margin: 2rem auto 3rem;
  }

  .dsf-staff-bar {
    align-items: flex-start !important;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }

  .dsf-title-prefix {
    font-size: 1.15rem !important;
  }

  .dsf-staff-selector {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .dsf-staff-btn {
    flex: 0 0 auto;
    font-size: 0.85rem !important;
  }

  .dsf-columns {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 0.8rem !important;
    padding: 0.8rem;
  }

  .dsf-photo-col {
    float: none !important;
    margin: 0 !important;
  }

  .dsf-photo-img,
  .dsf-photo-placeholder {
    width: 58px !important;
    height: 58px !important;
    font-size: 1.3rem !important;
  }

  .dsf-tags {
    gap: 0.35rem !important;
    margin-bottom: 0.7rem !important;
  }

  .dsf-tag-btn {
    min-height: 28px;
    padding: 0 0.65rem !important;
    font-size: 0.7rem !important;
  }

  .dsf-game.dsf-active {
    grid-template-columns: 82px minmax(0, 1fr);
    grid-template-areas:
      "image title"
      "image meta"
      "tagline tagline"
      "button button";
    gap: 0.45rem 0.75rem;
  }

  .dsf-game-box {
    width: 82px !important;
    height: 82px !important;
    padding: 0.35rem;
    border-radius: 14px !important;
  }

  .dsf-game-title {
    font-size: 1.2rem !important;
  }

  .dsf-game-meta {
    gap: 0.3rem !important;
  }

  .dsf-meta-item {
    min-height: 23px;
    padding: 0 0.45rem;
    font-size: 0.68rem;
  }

  .dsf-meta-text {
    font-size: 0.68rem !important;
  }

  .dsf-tagline {
    font-size: 0.9rem !important;
  }

  .dsf-button {
    width: 100%;
    min-height: 36px;
    margin-top: 0.2rem !important;
    font-size: 0.78rem !important;
  }

  /* Vignettes aléatoires compactes */
  .dsf-random-section {
    width: min(100% - 28px, 1140px);
    margin: 2rem auto 2.5rem;
  }

  .dsf-random-grid-4,
  .dsf-random-grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem !important;
  }

  @media (max-width: 767px) {
  .dsf-random-grid {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    scroll-behavior: smooth !important;
    gap: 1rem !important;
    padding: 0.2rem 0.2rem 0.8rem !important;
  }

  .dsf-random-card-link {
    flex: 0 0 calc((100% - 1rem) / 2) !important;
    max-width: calc((100% - 1rem) / 2) !important;
    scroll-snap-align: start !important;
    display: block !important;
  }
}

  .dsf-random-card .deck-game-referent,
  .dsf-random-referent {
    font-size: 0.6rem !important;
  }

  .dsf-random-more {
    display: flex !important;
    justify-content: center !important;
    margin-top: 1.4rem !important;
  }

  .dsf-random-button {
    width: 100%;
    min-height: 40px;
    padding: 0 1rem;
    font-size: 0.9rem;
  }

  /* Page complète staff */
  .dsf-page {
    padding: 1.2rem 0 4rem;
  }

  .dsf-page-inner {
    width: min(100% - 28px, 1180px);
  }

  .dsf-page-header {
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
  }

  .dsf-page-title {
    font-size: clamp(2.8rem, 14vw, 4rem);
  }

  .dsf-staff-dropdown {
    width: 100%;
    flex: none;
  }

  .dsf-staff-dropdown-list {
    position: static;
    margin-top: 0.5rem;
  }

  .dsf-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

/* =========================================================
   CORRECTION FINALE - Carrousel staff page Jeux
   À placer en toute fin de fichier
   ========================================================= */

.dsf-random-carousel {
  position: relative !important;
  width: min(1140px, calc(100% - 40px)) !important;
  max-width: 1140px !important;
  margin: 3rem auto 3rem !important;
  padding: 0 3.4rem !important;
  box-sizing: border-box !important;
}

.dsf-random-carousel .dsf-random-track,
.dsf-random-carousel .dsf-random-grid {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: stretch !important;
  gap: 1.2rem !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x mandatory !important;
  scroll-behavior: smooth !important;
  padding: 0.25rem 0 0.85rem !important;
  scrollbar-width: none !important;
}

.dsf-random-carousel .dsf-random-track::-webkit-scrollbar,
.dsf-random-carousel .dsf-random-grid::-webkit-scrollbar {
  display: none !important;
}

/* PC : 4 cartes visibles, le reste dans le carrousel */
.dsf-random-carousel .dsf-random-card-link {
  display: block !important;
  flex: 0 0 calc((100% - 3.6rem) / 4) !important;
  width: calc((100% - 3.6rem) / 4) !important;
  min-width: calc((100% - 3.6rem) / 4) !important;
  max-width: calc((100% - 3.6rem) / 4) !important;
  scroll-snap-align: start !important;
}

.dsf-random-carousel .dsf-random-card {
  height: 100% !important;
}

/* Une seule paire de flèches, placée sur les côtés du carrousel */
.dsf-random-carousel > .dsf-random-nav {
  position: absolute !important;
  top: 45% !important;
  z-index: 20 !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 999px !important;
  background: var(--deck-green) !important;
  color: var(--deck-white) !important;
  font-size: 2.15rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transform: translateY(-50%) !important;
  box-shadow: 0 8px 18px rgba(0, 51, 51, 0.18) !important;
}

.dsf-random-carousel > .dsf-random-nav:hover {
  background: var(--deck-dark) !important;
}

.dsf-random-carousel > .dsf-random-nav.is-disabled {
  opacity: 0.35 !important;
  cursor: default !important;
}

.dsf-random-carousel > .dsf-random-nav-prev {
  left: 0 !important;
}

.dsf-random-carousel > .dsf-random-nav-next {
  right: 0 !important;
}

.dsf-random-carousel .dsf-random-more {
  display: flex !important;
  justify-content: flex-end !important;
  margin-top: 1.2rem !important;
}

/* Tablette : 3 cartes visibles */
@media (max-width: 1024px) {
  .dsf-random-carousel .dsf-random-card-link {
    flex-basis: calc((100% - 2.4rem) / 3) !important;
    width: calc((100% - 2.4rem) / 3) !important;
    min-width: calc((100% - 2.4rem) / 3) !important;
    max-width: calc((100% - 2.4rem) / 3) !important;
  }
}

/* Mobile : 2 cartes visibles, les autres accessibles au swipe/flèches */
@media (max-width: 767px) {
  .dsf-random-carousel {
    width: min(100% - 28px, 1140px) !important;
    padding: 0 2.35rem !important;
    margin: 2rem auto 2.5rem !important;
  }

  .dsf-random-carousel .dsf-random-track,
  .dsf-random-carousel .dsf-random-grid {
    gap: 1rem !important;
  }

  .dsf-random-carousel .dsf-random-card-link {
    display: block !important;
    flex: 0 0 calc((100% - 1rem) / 2) !important;
    width: calc((100% - 1rem) / 2) !important;
    min-width: calc((100% - 1rem) / 2) !important;
    max-width: calc((100% - 1rem) / 2) !important;
  }

  .dsf-random-carousel > .dsf-random-nav {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    font-size: 1.75rem !important;
  }

  .dsf-random-carousel > .dsf-random-nav-prev {
    left: 0 !important;
  }

  .dsf-random-carousel > .dsf-random-nav-next {
    right: 0 !important;
  }

  .dsf-random-carousel .dsf-random-more {
    justify-content: center !important;
  }

  .dsf-random-carousel .dsf-random-button {
    width: 100% !important;
  }
}

/* =========================================================
   Page Jeux du staff - correction affichage complet
   À placer en toute fin de deckbar-staff-favorites.css
   ========================================================= */

/* Cache le titre WordPress/Astra uniquement si la page contient le shortcode staff */
body:has(.dsf-page) .entry-header,
body:has(.dsf-page) .entry-title {
  display: none !important;
}

/* Supprime les contraintes Astra autour de cette page */
body:has(.dsf-page) .site-content .ast-container,
body:has(.dsf-page) .entry-content {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Page */
.dsf-page {
  background: var(--deck-bg-light) !important;
  color: var(--deck-deep) !important;
  padding: 3rem 0 5rem !important;
}

.dsf-page-inner {
  width: min(1140px, calc(100% - 40px)) !important;
  margin: 0 auto !important;
}

/* Lien retour */
.dsf-page-back {
  margin: 0 0 1.8rem !important;
}

.dsf-page-back a {
  color: var(--deck-deep) !important;
  font-family: var(--deck-font-ui, Arial, sans-serif) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.dsf-page-back a:hover {
  color: var(--deck-green) !important;
}

/* Header page */
.dsf-page-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 2rem !important;
  margin-bottom: 2.8rem !important;
}

.dsf-page-title {
  color: var(--deck-deep) !important;
  font-family: var(--deck-font-heading, Arial, sans-serif) !important;
  font-size: clamp(3rem, 5.5vw, 4.8rem) !important;
  font-weight: 800 !important;
  line-height: 0.95 !important;
  letter-spacing: -0.055em !important;
  margin: 0 !important;
}

/* Sélecteur staff */
.dsf-staff-dropdown {
  width: 210px !important;
  flex: 0 0 210px !important;
}

.dsf-staff-dropdown summary {
  min-height: 48px !important;
  border-radius: 999px !important;
  background: var(--deck-white) !important;
  border: 1.5px solid var(--deck-deep) !important;
  color: var(--deck-deep) !important;
  font-family: var(--deck-font-ui, Arial, sans-serif) !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
}

/* Grille */
.dsf-page-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 2rem !important;
  align-items: stretch !important;
}

/* Reprise du style carte ludothèque sur cette page */
.dsf-page-grid .deck-game-card-link {
  display: block !important;
  height: 100% !important;
  color: inherit !important;
  text-decoration: none !important;
}

.dsf-page-grid .deck-game-card {
  position: relative !important;
  height: 100% !important;
  background: var(--deck-white) !important;
  border: 2px solid var(--deck-grey-light) !important;
  border-radius: 22px !important;
  padding: 14px 14px 12px !important;
  text-align: center !important;
  overflow: hidden !important;
  box-shadow:
    0 2px 0 rgba(0, 51, 51, 0.10),
    inset 0 0 0 1px rgba(255, 255, 255, 0.75) !important;
  display: flex !important;
  flex-direction: column !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease !important;
}

.dsf-page-grid .deck-game-card:hover {
  transform: translateY(-3px) !important;
  border-color: rgba(0, 51, 51, 0.35) !important;
  box-shadow:
    0 8px 18px rgba(0, 51, 51, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.75) !important;
}

/* Images */
.dsf-page-grid .deck-game-image {
  height: 190px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 12px !important;
}

.dsf-page-grid .deck-game-image img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
}

/* Titres */
.dsf-page-grid .deck-game-title {
  color: var(--deck-deep) !important;
  font-family: var(--deck-font-heading, Arial, sans-serif) !important;
  font-size: 1.35rem !important;
  font-weight: 850 !important;
  line-height: 1.05 !important;
  margin: 0 !important;
  min-height: 2.8rem !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  text-decoration: none !important;
}

.dsf-page-grid .deck-game-title a,
.dsf-page-grid a .deck-game-title {
  color: var(--deck-deep) !important;
  text-decoration: none !important;
}

.dsf-page-grid .deck-game-title a:hover,
.dsf-page-grid a:hover .deck-game-title {
  color: var(--deck-green) !important;
}

/* Type de jeu */
.dsf-page-grid .deck-game-type {
  color: var(--deck-muted) !important;
  font-size: 0.9rem !important;
  margin: 0.25rem 0 0.85rem !important;
  min-height: 1.3rem !important;
  text-decoration: none !important;
}

/* Métas / pastilles */
.dsf-page-grid .deck-game-meta {
  display: flex !important;
  justify-content: center !important;
  gap: 0.45rem !important;
  flex-wrap: wrap !important;
  margin-top: auto !important;
  padding-top: 0.75rem !important;
}

.dsf-page-grid .deck-meta-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  min-height: 28px !important;
  padding: 0 0.65rem !important;
  border-radius: var(--deck-radius-pill) !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}

.dsf-page-grid .deck-meta-location {
  background: var(--deck-accent) !important;
  color: var(--deck-deep) !important;
  border: 1px solid var(--deck-deep) !important;
  font-weight: 900 !important;
}

.dsf-page-grid .deck-meta-players,
.dsf-page-grid .deck-meta-time {
  background: var(--deck-dark) !important;
  color: var(--deck-white) !important;
  border: 1px solid var(--deck-dark) !important;
}

/* Icônes Material Symbols */
.dsf-page-grid .deck-meta-icon {
  font-family: "Material Symbols Outlined" !important;
  font-weight: normal !important;
  font-style: normal !important;
  font-size: 1.1rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 0.9rem !important;
  height: 0.9rem !important;
  flex: 0 0 0.9rem !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  white-space: nowrap !important;
  direction: ltr !important;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings:
    "FILL" 0,
    "wght" 300,
    "GRAD" 0,
    "opsz" 24;
}

/* Responsive */
@media (max-width: 1024px) {
  .dsf-page-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  .dsf-page {
    padding: 2rem 0 4rem !important;
  }

  .dsf-page-inner {
    width: min(100% - 28px, 1140px) !important;
  }

  .dsf-page-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1.2rem !important;
    margin-bottom: 2rem !important;
  }

  .dsf-page-title {
    font-size: clamp(2.8rem, 14vw, 4rem) !important;
  }

  .dsf-staff-dropdown {
    width: 100% !important;
    flex: none !important;
  }

  .dsf-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem !important;
  }

  .dsf-page-grid .deck-game-image {
    height: 130px !important;
  }

  .dsf-page-grid .deck-game-title {
    font-size: 1rem !important;
    min-height: 2.2rem !important;
  }

  .dsf-page-grid .deck-game-type {
    font-size: 0.78rem !important;
  }

  .dsf-page-grid .deck-meta-pill {
    min-height: 24px !important;
    padding: 0 0.5rem !important;
    font-size: 0.68rem !important;
  }
}