/* ═══════════════════════════════════════════════════════════════
   BONUS HUNT MANAGER - CSS MODULE
   Préfixe: .bh- pour éviter les conflits
   ═══════════════════════════════════════════════════════════════ */

.bh-module {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ─────────────────────────────────────────────────────────────
   HEADER STATISTIQUES
   ───────────────────────────────────────────────────────────── */

.bh-stats-header {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.bh-stat-card {
  background: rgba(30, 30, 30, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.bh-stat-card:hover {
  border-color: rgba(0, 231, 1, 0.3);
  transform: translateY(-2px);
}

.bh-stat-card--highlight {
  border-color: rgba(0, 231, 1, 0.2);
  background: rgba(0, 231, 1, 0.05);
}

.bh-stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #888;
  margin-bottom: 12px;
}

.bh-stat-value {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  font-family: 'Share Tech Mono', monospace;
}

.bh-stat-value--gold {
  color: #FFD700;
}

.bh-stat-value.positive {
  color: #00E701;
}

.bh-stat-value.negative {
  color: #ff4444;
}

/* ─────────────────────────────────────────────────────────────
   FORMULAIRE D'AJOUT
   ───────────────────────────────────────────────────────────── */

.bh-add-form {
  background: rgba(30, 30, 30, 0.8);
  border: 2px solid rgba(0, 231, 1, 0.2);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 40px;
}

.bh-section-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #00E701;
  margin-bottom: 20px;
}

.bh-form-row {
  display: grid;
  grid-template-columns: 1fr 200px auto;
  gap: 20px;
  align-items: end;
}

.bh-input-wrapper {
  position: relative;
}

.bh-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #00E701;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.bh-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
}

.bh-input:focus {
  outline: none;
  border-color: #00E701;
  background: rgba(0, 0, 0, 0.6);
}

.bh-input::placeholder {
  color: #666;
}

/* Autocomplétion */
.bh-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 2px solid #00E701;
  border-radius: 8px;
  margin-top: 4px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 10px 30px rgba(0, 231, 1, 0.2);
}

.bh-autocomplete.active {
  display: block;
}

.bh-autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.bh-autocomplete-item:hover,
.bh-autocomplete-item.selected {
  background: rgba(0, 231, 1, 0.1);
  color: #00E701;
}

.bh-autocomplete-item:last-child {
  border-bottom: none;
}

.bh-autocomplete-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.bh-autocomplete-provider {
  font-size: 11px;
  color: #888;
}

/* Scrollbar personnalisée */
.bh-autocomplete::-webkit-scrollbar {
  width: 8px;
}

.bh-autocomplete::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.bh-autocomplete::-webkit-scrollbar-thumb {
  background: rgba(0, 231, 1, 0.3);
  border-radius: 4px;
}

.bh-autocomplete::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 231, 1, 0.5);
}

/* Boutons */
.bh-btn {
  background: linear-gradient(135deg, #00E701, #00b800);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.bh-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 231, 1, 0.4);
}

.bh-btn:active {
  transform: translateY(0);
}

.bh-btn--add span {
  font-size: 18px;
  margin-right: 4px;
}

.bh-btn--clear {
  background: rgba(255, 68, 68, 0.2);
  color: #ff4444;
  border: 2px solid rgba(255, 68, 68, 0.3);
  padding: 8px 16px;
  font-size: 12px;
}

.bh-btn--clear:hover {
  background: rgba(255, 68, 68, 0.3);
  border-color: #ff4444;
}

/* ─────────────────────────────────────────────────────────────
   TABLEAU DE CHASSE
   ───────────────────────────────────────────────────────────── */

.bh-hunt-table {
  background: rgba(30, 30, 30, 0.8);
  border: 2px solid rgba(0, 231, 1, 0.2);
  border-radius: 12px;
  padding: 30px;
}

.bh-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.bh-table-header .bh-section-title {
  margin-bottom: 0;
}

#bh-count {
  color: #888;
  font-weight: 400;
}

.bh-table-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.bh-table-head {
  display: grid;
  grid-template-columns: 60px 1fr 120px 120px 100px 60px;
  gap: 16px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 2px solid rgba(0, 231, 1, 0.2);
}

.bh-th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #00E701;
  text-align: left;
}

.bh-th--bet,
.bh-th--win,
.bh-th--multi {
  text-align: center;
}

.bh-th--actions {
  text-align: center;
}

.bh-table-body {
  min-height: 200px;
}

.bh-table-row {
  display: grid;
  grid-template-columns: 60px 1fr 120px 120px 100px 60px;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  align-items: center;
  transition: all 0.2s ease;
}

.bh-table-row:hover {
  background: rgba(0, 231, 1, 0.05);
}

.bh-table-row:last-child {
  border-bottom: none;
}

.bh-cell {
  color: #fff;
}

.bh-cell--index {
  font-weight: 700;
  color: #00E701;
  font-size: 16px;
}

.bh-cell--name {
  font-weight: 600;
}

.bh-cell--bet,
.bh-cell--multi {
  text-align: center;
  font-family: 'Share Tech Mono', monospace;
}

.bh-cell--win {
  text-align: center;
}

.bh-cell--win input {
  width: 100%;
  background: rgba(0, 231, 1, 0.1);
  border: 1px solid rgba(0, 231, 1, 0.3);
  border-radius: 6px;
  padding: 8px;
  color: #00E701;
  font-weight: 700;
  text-align: center;
  font-family: 'Share Tech Mono', monospace;
}

.bh-cell--win input:focus {
  outline: none;
  border-color: #00E701;
  background: rgba(0, 231, 1, 0.15);
}

.bh-cell--multi {
  font-weight: 700;
  color: #FFD700;
}

.bh-cell--actions {
  text-align: center;
}

.bh-btn-delete {
  background: rgba(255, 68, 68, 0.2);
  border: 1px solid rgba(255, 68, 68, 0.3);
  color: #ff4444;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bh-btn-delete:hover {
  background: rgba(255, 68, 68, 0.3);
  border-color: #ff4444;
  transform: scale(1.1);
}

/* État vide */
.bh-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.bh-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.bh-empty-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.bh-empty-hint {
  font-size: 14px;
  color: #555;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .bh-form-row {
    grid-template-columns: 1fr;
  }
  
  .bh-table-head,
  .bh-table-row {
    grid-template-columns: 40px 1fr 80px 80px 70px 40px;
    gap: 8px;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .bh-stats-header {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .bh-stat-value {
    font-size: 24px;
  }
  
  .bh-table-head {
    display: none;
  }
  
  .bh-table-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 12px;
    border-radius: 8px;
  }
  
  .bh-cell::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    color: #00E701;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 1px;
  }
  
  .bh-cell {
    text-align: left !important;
  }
}
