/* ===== COLLECTION ===== */

.page-collection{
  display: flex;
  flex-wrap: wrap !important;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  align-content: flex-start;
  box-sizing: border-box;
}

/* Compteur d'exemplaires */
.owned-count{
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #eee;
  font-weight: bold;
  font-size: 32px;
  min-width: 48px;
  height: 32px;
  padding: 0 8px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border: 1px solid #555;
  box-shadow: 0 2px 4px #000;
}

/* Zoom : pas de compteur */
.zoom .owned-count{
  display: none !important;
}

/* Carte non possédée (miniature) */
.card-unowned{
  filter: grayscale(1) brightness(0.55);
  opacity: 0.75;
}
.card-unowned .owned-count{ display: none; }

/* Zoom toujours en couleurs */
.zoom,
.zoom.card-unowned{
  filter: none !important;
  opacity: 1 !important;
}

/* Case à cocher */
.collection-toggle{
  margin-top: 18px;
  padding: 10px 0;
  border-top: 1px solid #333;
  font-size: 13px;
  color: #ccc;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.collection-toggle input{
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.unobtainable-subfilters{
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  margin: 0 0 8px;
  padding: 4px 0 4px 6px;
  border-left: 1px solid #444;
}
.unobtainable-subfilters.is-open{
  display: flex;
}
.unobtainable-subfilters .collection-toggle{
  margin-top: 0;
  padding: 4px 0;
  border-top: 0;
  font-size: 12px;
}

/* Layout vue collection */
#view-collection.view.active{
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}

#view-collection .main{
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 70px;
  overflow: hidden;
}

#collectionContainer{
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#collectionContainer .gallery-wrapper{
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  max-width: 100%;
}

#collectionContainer .pages{
  flex: 1;
  min-height: 280px;
  overflow: hidden;
  max-width: 100%;
}

/*
 * Signets 1, 2, 3…
 * right = largeur .rightbar (150px si réduit, sinon 180)
 */
#view-collection #collectionContainer .pagination{
  position: fixed;
  bottom: 20px;
  left: 260px;
  right: 150px;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  z-index: 40;
  pointer-events: none;
  background: transparent;
}

#view-collection #collectionContainer .pagination button{
  pointer-events: auto;
  background: #222;
  border: 1px solid #555;
  color: #fff;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
}

#view-collection #collectionContainer .pagination button.active,
#view-collection #collectionContainer .pagination button:hover{
  background: #444;
  border-color: #888;
}