.deck-section{
  margin-top:0;
  border-top:1px solid #333;
  padding-top:0;
}
.deck-section h2{
  font-size:17px;
  margin-bottom:16px;
  color:#bbb;
}
.deck-layout{
  display:flex;
  gap:40px;
  align-items:flex-start;
}

/* Colonne gauche : rangée de persos + icônes en dessous */
.deck-characters{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:12px;
  min-width:200px;
  border-right:1px solid #333;
  padding-right:30px;
}
.deck-characters-row{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  gap:8px;
  align-items:flex-start;
}

/* Others + pagination */
.deck-others{
  flex:1;
  display:flex;
  align-items:flex-start;
  min-width:0;
}
.deck-others-layout{
  display:flex;
  flex-direction:row;
  align-items:flex-start;
  gap:12px;
  width:100%;
}
.deck-others-page{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  max-width:900px;
  flex:1;
}
.deck-others-pagination{
  display:flex;
  flex-direction:column;
  gap:8px;
  flex-shrink:0;
  padding-top:4px;
}
.deck-others-pagination button{
  background:#222;
  border:1px solid #555;
  color:#fff;
  padding:8px 12px;
  cursor:pointer;
  border-radius:4px;
  font-size:14px;
  min-width:36px;
}
.deck-others-pagination button.active,
.deck-others-pagination button:hover{
  background:#444;
  border-color:#888;
}

.deck-card{
  transform:scale(0.8) !important;
  transform-origin:top left;
  margin-right:-20px;
  margin-bottom:-10px;
}
.deck-count{
  position:absolute;
  bottom:4px;
  left:50%;
  transform:translateX(-50%);
  color:#111;
  font-weight:bold;
  font-size:16px;
  width:28px;
  height:28px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:10;
  box-shadow:0 2px 5px #000;
  border:2px solid rgba(0,0,0,0.25);
}
.deck-count.count-1{background:#4caf50}
.deck-count.count-2{background:#ffeb3b}
.deck-count.count-3{background:#ff9800}

.card-invalid::after{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(180,0,0,0.45);
  z-index:20;
  pointer-events:none;
  border-radius:10px;
}

.deck-summary-icons{
  margin-top:8px;
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
}
.deck-summary-icons img{
  object-fit:contain;
  filter:drop-shadow(0 2px 4px #000);
}

.deck-checklist{
  margin-top:60px;
  padding:12px;
  background:#222;
  border-radius:6px;
  font-size:13px;
  line-height:1.6;
}
.deck-checklist div{display:flex;justify-content:space-between}
.deck-checklist .bad{color:#e74c3c;font-weight:bold}
.deck-checklist .good{color:#2ecc71}

#btnResetDeck{
  width:100%;
  margin-top:0;
  padding:10px;
  background:#b56a12;
  border:1px solid #e8a227;
  color:#fff8e8;
  border-radius:5px;
  cursor:pointer;
  font-size:14px;
}
#btnResetDeck:hover{
  background:#d07d18;
  border-color:#f0c84a;
  color:#fff;
}
#btnSaveDeck:disabled{opacity:0.4;cursor:not-allowed}

#btnDeleteDeck{
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background: #4a1010;
  border: 1px solid #a33;
  color: #ffb0b0;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.3px;
}
#btnDeleteDeck:hover{
  background: #6a1818;
  border-color: #c44;
  color: #fff;
}

.deck-saved-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.88);
  z-index:280;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.deck-saved-box{
  background:#1a1a1a;
  border:1px solid #555;
  border-radius:12px;
  padding:28px 32px;
  max-width:min(460px,94vw);
  text-align:center;
  color:#eee;
}
.deck-saved-box h2{
  font-size:22px;
  margin:0 0 10px;
  color:#f0d78c;
}
.deck-saved-box p{
  margin:0 0 12px;
  color:#ccc;
  font-size:15px;
  line-height:1.4;
}
#deckSavedName{
  color:#f0d78c;
  font-weight:bold;
}
.deck-saved-btns{
  display:flex;
  gap:12px;
  justify-content:center;
  margin-top:18px;
}
.deck-saved-btns button{
  min-width:90px;
  padding:10px 22px;
  border-radius:6px;
  cursor:pointer;
  font-size:15px;
  font-family:Georgia,serif;
}
#btnDeckSavedNo{
  background:transparent;
  border:1px solid #555;
  color:#ccc;
}
#btnDeckSavedNo:hover{
  border-color:#888;
  color:#fff;
}
#btnDeckSavedYes{
  background:#2a2218;
  border:1px solid #c9a227;
  color:#f0d78c;
}
#btnDeckSavedYes:hover{
  background:#3a3218;
  border-color:#e8c84a;
}

/* Deck : haut = zoom, bas = ajouter/retirer */
.deck-split-card {
  position: relative;
}
.card-hit-zoom,
.card-hit-use {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 20;
}
.card-hit-zoom {
  top: 0;
  height: 50%;
  background: transparent;
  cursor: zoom-in;
}
.card-hit-use {
  bottom: 0;
  height: 50%;
  background: rgba(0, 0, 0, 0.38);
  cursor: pointer;
}
.card-hit-use:hover {
  background: rgba(255, 230, 140, 0.42);
}
.deck-split-card:hover {
  outline: 2px solid rgba(232, 208, 138, 0.85);
  outline-offset: 2px;
}
.card-hit-zoom,
.card-hit-use {
  border: 0;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}