/* =========================================================
   Fiche détail jeu
   ========================================================= */

.deck-game-detail-page {
  background: var(--deck-bg-light);
  color: var(--deck-deep);
  padding: 0 0 5rem;
}

.deck-game-detail-back {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

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

.deck-game-detail-back a:hover {
  color: var(--deck-green);
}

/* Layout fiche */
.deck-game-detail-layout {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 5rem;
  align-items: flex-start;
}

/* Colonne image */
.deck-game-detail-visual {
  position: relative;
}

.deck-game-detail-image-box {
  background: var(--deck-white);
  border: 7px solid var(--deck-deep);
  border-radius: 24px;
  aspect-ratio: 3 / 4;
  width: 100%;
  max-width: 500px;
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deck-game-detail-image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

/* Colonne contenu */
.deck-game-detail-content {
  position: relative;
  padding-right: 5rem;
}

.deck-game-detail-title {
  color: var(--deck-deep);
  font-family: var(--deck-font-main);
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 650;
  line-height: 0.95;
  margin: 0 0 0.8rem;
}

.deck-game-detail-type {
  color: var(--deck-muted);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 2rem;
}

/* Pastille rangement */
.deck-game-detail-location {
  position: absolute;
  top: 0.4rem;
  right: 0;
  text-align: center;
}

.deck-game-detail-location span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--deck-accent);
  color: #003333;
  border: 1px solid #003333;
  border-radius: var(--deck-radius-pill);
  min-height: 32px;
  min-width: 72px;
  padding: 0 1.15rem;
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
}

.deck-game-detail-location small {
  display: block;
  margin-top: 0.5rem;
  color: var(--deck-deep);
  font-size: 0.8rem;
  font-weight: 500;
}

/* Pastilles infos */
.deck-game-detail-metas {
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.deck-game-detail-meta {
  text-align: center;
}

.deck-game-detail-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;

  background: var(--deck-dark);
  color: var(--deck-white);
  border: 1px solid var(--deck-dark);
  border-radius: var(--deck-radius-pill);

  min-height: 34px;
  padding: 0 0.85rem;

  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}

/* Toutes les pastilles détail sauf rangement */
.deck-detail-players,
.deck-detail-best,
.deck-detail-time,
.deck-detail-age {
  background: var(--deck-dark);
  color: var(--deck-white);
  border: 1px solid var(--deck-dark);
}

/* =========================================================
   Fiche détail - icônes Material Symbols plus fines
   ========================================================= */

.deck-game-detail-pill::before {
  font-family: "Material Symbols Outlined" !important;
  font-weight: normal !important;
  font-style: normal !important;
  font-size: 1.5rem !important;
  line-height: 1 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 0.95rem;

  background: none !important;
  background-color: transparent !important;

  text-transform: none !important;
  letter-spacing: normal !important;
  word-wrap: normal !important;
  white-space: nowrap !important;
  direction: ltr !important;

  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;

  font-variation-settings:
    "FILL" 0,
    "wght" 300,
    "GRAD" 0,
    "opsz" 24;
}

/* Nombre de joueurs */
.deck-detail-players::before {
  content: "groups";
}

/* Nombre de joueurs idéals */
.deck-detail-best::before {
  content: "star";
}

/* Durée */
.deck-detail-time::before {
  content: "timer";
}

/* Âge */
.deck-detail-age::before {
  content: "candle";
}

/* Libellés sous les pastilles */
.deck-game-detail-meta small {
  display: block;
  margin-top: 0.45rem;
  color: var(--deck-deep);
  font-size: 0.78rem;
  line-height: 1.15;
  font-weight: 500;
}


/* =========================================================
   Fiche détail - description et infos
   ========================================================= */

.deck-game-detail-description {
  color: var(--deck-muted);
  font-size: 1rem;
  line-height: 1.45;
  max-width: 620px;
}

.deck-game-detail-description p {
  margin-bottom: 0.8rem;
}

.deck-game-detail-separator {
  height: 1px;
  background: rgba(0, 51, 51, 0.35);
  margin: 2rem 0;
}

.deck-game-detail-infos {
  color: var(--deck-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.deck-game-detail-infos p {
  margin: 0 0 0.9rem;
}

.deck-game-detail-infos strong {
  color: var(--deck-deep);
}

/* Lien BGG */
.deck-game-detail-infos a {
  color: var(--deck-deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.deck-game-detail-infos a:hover {
  color: var(--deck-green);
}


/* =========================================================
   Responsive fiche jeu
   ========================================================= */

@media (max-width: 921px) {
  .deck-game-detail-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .deck-game-detail-image-box {
    max-width: 420px;
  }

  .deck-game-detail-content {
    padding-right: 0;
  }

  .deck-game-detail-location {
    position: static;
    text-align: left;
    margin-bottom: 1.5rem;
  }

  .deck-game-detail-location small {
    display: inline-block;
    margin-top: 0;
    margin-left: 0.5rem;
  }
}

@media (max-width: 767px) {
  /* Réduit l'espace global */
  .deck-game-detail-page {
    padding-bottom: 3rem;
    overflow-x: hidden;
  }

  .deck-game-detail-back,
  .deck-game-detail-layout {
    width: min(100% - 36px, 1180px);
    padding: 1.2rem 0 1.5rem;
  }

  /* Centre le bloc image et réduit sa largeur */
  .deck-game-detail-visual {
    width: 66%;
    max-width: 300px;
    min-width: 245px;
    margin: 0 auto 2rem;
    position: relative;
  }

  .deck-game-detail-image-box {
    width: 100%;
    max-width: none;
    aspect-ratio: 3 / 4;
    padding: 1.2rem;
    border-width: 5px;
    border-radius: 20px;
    background: var(--deck-white);
  }

  .deck-game-detail-title {
    font-size: 2.6rem;
    font-weight: 650;
  }

  .deck-game-detail-type {
    font-size: 1.15rem;
  }

  .deck-game-detail-metas {
    gap: 0.8rem;
    flex-wrap: wrap;
  }

  .deck-game-detail-pill {
    min-height: 30px;
    padding: 0 0.7rem;
    font-size: 0.9rem;
  }

  .deck-game-detail-pill::before {
  width: 0.82rem;
  height: 0.82rem;
  flex-basis: 0.82rem;
  font-size: 0.82rem !important;
}
}

/* =========================================================
   Ludothèque - mobile compact
   Recherche visible + filtres en 2 colonnes
   ========================================================= */

@media (max-width: 767px) {

  /* Réduit l'espace global du haut */
  .deck-ludo-page {
    padding-top: 1.2rem;
  }

  .deck-ludo-header {
    margin-bottom: 1.7rem;
  }

  .deck-ludo-header h1 {
    font-size: clamp(3.6rem, 18vw, 5.2rem) !important;
    line-height: 0.85 !important;
    margin-bottom: 1.1rem !important;
  }

  .deck-ludo-toolbar {
    margin-bottom: 2rem;
  }

  /* Recherche un peu moins haute */
  .deck-ludo-search {
    margin-bottom: 1.2rem;
  }

  .deck-ludo-search input {
    height: 42px !important;
    font-size: 0.95rem !important;
    padding-left: 2.8rem !important;
  }

  /* Filtres en grille compacte */
  .deck-ludo-filters {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.55rem !important;
    align-items: stretch !important;
  }

  .deck-ludo-filters select,
  .deck-ludo-submit,
  .deck-ludo-reset {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 38px !important;
    padding: 0 0.75rem !important;
    font-size: 0.78rem !important;
    line-height: 1 !important;
    border-radius: 999px !important;
  }

  .deck-ludo-filters select {
    padding-right: 1.8rem !important;
  }

  /* Le bouton filtrer reste bien visible */
  .deck-ludo-submit {
    grid-column: 1 / 2;
    letter-spacing: 0.06em;
  }

  .deck-ludo-reset {
    grid-column: 2 / 3;
  }
}

/* =========================================================
   Fiche détail jeu - décor feuilles autour de la carte
   ========================================================= */

.deck-game-detail-visual {
  position: relative;
  z-index: 1;
}

/* La carte reste au-dessus des feuilles */
.deck-game-detail-image-box {
  position: relative;
  z-index: 2;
}

/* Feuille en haut à droite */
.deck-game-detail-visual::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -90px;
  width: 260px;
  height: 260px;

  background-image: url("/wp-content/uploads/2026/05/feuille-verte.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;

  transform: rotate(155deg);
  z-index: 1;
  pointer-events: none;
}

/* Feuille en bas à gauche */
.deck-game-detail-visual::after {
  content: "";
  position: absolute;
  bottom: -75px;
  left: -85px;
  width: 260px;
  height: 260px;

  background-image: url("/wp-content/uploads/2026/05/feuille-verte.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;

  transform: rotate(-28deg);
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 921px) {
  .deck-game-detail-visual::before {
    top: -60px;
    right: -45px;
    width: 200px;
    height: 200px;
  }

  .deck-game-detail-visual::after {
    bottom: -55px;
    left: -45px;
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 767px) {
  .deck-game-detail-visual::before {
    top: -42px;
    right: -44px;
    width: 115px;
    height: 115px;
    transform: rotate(155deg);
    z-index: 1;
  }

  /* Feuille bas gauche */
  .deck-game-detail-visual::after {
    bottom: -38px;
    left: -42px;
    width: 115px;
    height: 115px;
    transform: rotate(-28deg);
    z-index: 1;
  }

  /* La carte reste au-dessus */
  .deck-game-detail-image-box {
    position: relative;
    z-index: 2;
  }
}
