/* ============================
   CLASSEMENT INDIVIDUEL
   ============================ */




/* =========================
   FILTRES - SELECTS STYLÉS
   ========================= */

.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}

.filter-bar select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background: rgba(255, 255, 255, 0.80);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: #000000;

  padding: 10px 14px;
  padding-right: 40px;
  border-radius: 10px;

  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.95rem;

  transition: all 0.2s ease;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.filter-bar select:hover {
  border-color: rgba(212, 175, 55, 0.6);
  background: rgba(197, 197, 197, 0.719);
}

.filter-bar select:focus {
  outline: none;
  border-color: rgba(0, 102, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.25);
}

/* Flèche personnalisée */
.filter-bar select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='16' height='16' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23d4af37' d='M5 7l5 5 5-5H5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .filter-bar {
    gap: 10px;
  }

  .filter-bar select {
    width: 100%;
  }
}



/* =========================
   COLONNES AVEC LES JOUEURS
   ========================= */

.classement-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

/* ----------------------------
   Slots
   ---------------------------- */

.classement-slots {
    background: rgba(26, 31, 58, 0.6);
    border-radius: 14px;
    padding: 25px;
    border: 3px solid rgba(255, 196, 0, 1);
    min-width: 344px;
    max-height: 75vh;
    overflow-x: auto;
}

/* Scrollbar personnalisée */
.classement-slots::-webkit-scrollbar {
    width: 6px;
}

.classement-slots::-webkit-scrollbar-track {
    background: transparent;
}

.classement-slots::-webkit-scrollbar-thumb {
    background: rgba(0, 102, 255, 0.4);
    border-radius: 3px;
}

.classement-slots::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 102, 255, 0.6);
}

.slot {
    position: relative;
    min-height: 60px;
    margin-bottom: 6px;
    border: 2px dashed rgba(212, 175, 55, 0.35);
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding-left: 70px;
    transition: all 0.25s ease;
    gap: 12px;
}

.slot-joueur-dispo {
    margin-bottom: 6px;
}

.slot:hover {
    background: rgba(212, 175, 55, 0.05);
}

.slot-rank {
    position: absolute;
    left: 15px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ffd700, #d4af37);
    color: #1a1f3a;
    border-radius: 50%;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Podium */
.slot[data-position="1"] { border-color: #ffd700; }
.slot[data-position="2"] { border-color: #c0c0c0; }
.slot[data-position="3"] { border-color: #cd7f32; }

.bonus-input {
  margin-left: auto;
}

.bonus-input input {
  width: 70px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* ----------------------------
   Joueurs (draggables)
   ---------------------------- */

.classement-joueurs {
    background: rgba(26, 31, 58, 0.6);
    border-radius: 14px;
    padding: 25px;
    border: 2px dashed rgba(212, 175, 55, 0.2);
}

.joueur {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 270px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05); /* fallback */
    border: 1px solid rgba(255,255,255,0.15);
    cursor: grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* fond couleur équipe avec transparence */
.joueur {
    background: color-mix(in srgb, var(--team-color) 30%, transparent);
    border: 1px solid color-mix(in srgb, var(--team-color) 30%, transparent);
}

.joueur:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.joueur:active {
    cursor: grabbing;
}

/* texte */
.joueur-text {
    display: flex;
    flex-direction: column;
}

.joueur-pseudo {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
}

.joueur-team {
    font-size: 0.9rem;
    color: rgba(230,230,230,0.8);
}

/* avatar */
.joueur-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.35);
}

/* ----------------------------
   Drag states
   ---------------------------- */

.slot.drag-over {
    background: rgba(212, 175, 55, 0.12);
    box-shadow: inset 0 0 0 2px rgba(212, 175, 55, 0.8);
}

.joueur.dragging {
    opacity: 0.35;
    transform: scale(0.95);
}

.slot.filled {
    border-style: solid;
    border-color: rgba(212, 175, 55, 0.8);
    background: rgba(26, 31, 58, 0.9);
}

.slot.invalid {
    border-color: #ff3333;
    background: rgba(255, 51, 51, 0.15);
}

.slot .joueur {
    animation: snapIn 0.25s ease-out;
}

@keyframes snapIn {
    from {
        transform: scale(0.85);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ----------------------------
   Actions (boutons)
   ---------------------------- */

.classement-actions {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

/* Feedback sauvegarde */
#save-status {
    background: rgba(255, 255, 255, 0.08);
    border-left: 4px solid var(--success);
    border-radius: 8px;
    padding: 14px;
    color: #fff;
    font-weight: 600;
    text-align: center;
    display: none;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}