/* =============================================================
   MODAL COMPONENTS - Composants réutilisables pour toutes les modales
   ============================================================= */

/* =============================================================
   STYLES POUR LES DÉCORATIONS MODERNES
   ============================================================= */

.decorations-container {
  padding: 20px;
}

.decorations-title {
  color: white;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(100, 150, 255, 0.3);
  padding-bottom: 10px;
}

.decorations-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.decoration-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(100, 150, 255, 0.3);
  border-radius: 8px;
  padding: 12px;
  transition: all 0.2s ease;
}

.decoration-row:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(100, 150, 255, 0.5);
  transform: translateY(-1px);
}

.decoration-icon-container {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(100, 150, 255, 0.2);
  border-radius: 8px;
  flex-shrink: 0;
}

.decoration-icon {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
}

.decoration-info {
  flex: 1;
  min-width: 0;
}

.decoration-name {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.decoration-coords {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.decoration-meta {
  margin-bottom: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.decoration-date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.decoration-actions {
  display: flex;
  gap: 8px;
}

.decoration-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.decoration-btn.view-btn {
  background: rgba(102, 126, 234, 0.8);
  color: white;
  border: 1px solid rgba(102, 126, 234, 1);
}

.decoration-btn.view-btn:hover {
  background: rgba(102, 126, 234, 1);
  transform: translateY(-1px);
}

.decoration-btn.delete-btn {
  background: rgba(220, 53, 69, 0.8);
  color: white;
  border: 1px solid rgba(220, 53, 69, 1);
}

.decoration-btn.delete-btn:hover {
  background: rgba(220, 53, 69, 1);
  transform: translateY(-1px);
}

/* Onglet Habitants */
.residents-section {
  margin-bottom: 30px;
}

.residents-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.resident-card {
  background: rgba(40, 40, 60, 0.6);
  border: 2px solid rgba(100, 150, 255, 0.2);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.resident-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.resident-card:hover {
  border-color: rgba(100, 150, 255, 0.5);
  box-shadow: 0 8px 25px rgba(100, 150, 255, 0.2);
  transform: translateY(-3px);
  background: rgba(50, 50, 70, 0.8);
}

.resident-card:hover::before {
  transform: scaleX(1);
}

.resident-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.resident-name {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.resident-actions {
  display: flex;
  gap: 8px;
}

.resident-action-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.resident-edit-btn {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.resident-edit-btn:hover {
  background: rgba(59, 130, 246, 0.3);
  transform: scale(1.1);
}

.resident-delete-btn {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.resident-delete-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: scale(1.1);
}

.resident-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.resident-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid rgba(100, 150, 255, 0.1);
}

.resident-info-item strong {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 80px;
}

.resident-bio {
  margin-top: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(100, 150, 255, 0.1);
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

/* Section ajouter un habitant - style moderne */
.add-resident-form {
  background: rgba(40, 40, 60, 0.4);
  border: 2px dashed rgba(100, 150, 255, 0.3);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s;
  margin-bottom: 20px;
}

.add-resident-form.expanded {
  border-style: solid;
  border-color: rgba(100, 150, 255, 0.5);
  background: rgba(40, 40, 60, 0.8);
  text-align: left;
}

.add-resident-trigger {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(5, 150, 105, 0.3));
  color: #10b981;
  border: 2px solid rgba(16, 185, 129, 0.5);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(10px);
}

.add-resident-trigger:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.5), rgba(5, 150, 105, 0.5));
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.resident-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

/* =============================================================
   STYLES POUR LES CARTES DE RÉSIDENTS SIMPLES  
   ============================================================= */

/* Cartes de résidents simplifiées */
.simple-resident-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(100, 150, 255, 0.3);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.simple-resident-card:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(100, 150, 255, 0.5);
  transform: translateY(-2px);
}

.simple-resident-card .resident-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.simple-resident-card .resident-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  border: 2px solid rgba(100, 150, 255, 0.3);
  border-radius: 6px;
}

.simple-resident-card .resident-info {
  flex: 1;
  min-width: 0;
}

.simple-resident-card .resident-name {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

.simple-resident-card .resident-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.simple-resident-card .resident-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.resident-btn {
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resident-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.resident-btn.primary {
  background: rgba(102, 126, 234, 0.8);
  border-color: rgba(102, 126, 234, 1);
}

.resident-btn.danger {
  background: rgba(220, 53, 69, 0.8);
  border-color: rgba(220, 53, 69, 1);
}

.resident-header-modern {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.resident-avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.resident-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid rgba(100, 150, 255, 0.3);
}

.resident-title-info {
  flex: 1;
  min-width: 0;
}

.resident-name-modern {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.resident-status-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.resident-details-modern {
  margin-bottom: 12px;
}

.resident-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.resident-actions-modern {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.resident-action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.resident-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.resident-action-btn.primary-btn {
  background: rgba(102, 126, 234, 0.8);
  border-color: rgba(102, 126, 234, 1);
}

.resident-action-btn.danger-btn {
  background: rgba(220, 53, 69, 0.8);
  border-color: rgba(220, 53, 69, 1);
}

/* Section pour ajouter un habitant */
.add-resident-section {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 2px dashed rgba(100, 150, 255, 0.5);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.add-resident-section:hover {
  background: rgba(0, 0, 0, 0.6) !important;
  border-color: rgba(100, 150, 255, 0.7);
}

.add-resident-btn {
  background: rgba(40, 167, 69, 0.8) !important;
  color: white !important;
  border: 1px solid rgba(40, 167, 69, 1);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.add-resident-btn:hover {
  background: rgba(40, 167, 69, 1) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* =============================================================
   MODAL DES MAISONS MODERNISÉE - STYLES
   ============================================================= */

/* Cartes d'habitants modernisées */
.modern-resident-card {
  background: rgba(40, 40, 60, 0.8);
  border: 2px solid rgba(100, 150, 255, 0.2);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.modern-resident-card:hover {
  border-color: rgba(100, 150, 255, 0.4);
  box-shadow: 0 8px 25px rgba(100, 150, 255, 0.15);
  transform: translateY(-2px);
}

.resident-header-modern {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(100, 150, 255, 0.2);
}

.resident-avatar {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(60, 60, 80, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(100, 150, 255, 0.3);
  flex-shrink: 0;
}

.resident-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.resident-title-info {
  flex: 1;
  min-width: 0;
}

.resident-name-modern {
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin: 0 0 8px 0;
}

.resident-status-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.resident-details-modern {
  margin-bottom: 16px;
}

.resident-biography {
  background: rgba(60, 60, 80, 0.4);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  border-left: 3px solid rgba(100, 150, 255, 0.4);
}

.resident-actions-modern {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
  font-size: 14px;
}

.form-input,
.form-textarea,
.form-select {
  padding: 10px 12px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
  background: white;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: flex-end;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #f8f9fa;
  color: #666;
  border: 2px solid #e1e5e9;
}

.btn-secondary:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

/* Form row helper */
.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.form-group {
  flex: 1;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

/* =============================================================
   STYLES POUR LA MODAL D'INVENTAIRE
   ============================================================= */

.inventory-modal-header {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(20, 20, 30, 0.95));
  color: white;
  padding: 20px;
  border-radius: 20px 20px 0 0;
  position: relative;
  backdrop-filter: blur(15px);
  border-bottom: 2px solid rgba(100, 150, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.inventory-modal-title {
  font-size: 24px;
  font-weight: bold;
  margin: 0 0 5px 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.inventory-modal-subtitle {
  font-size: 14px;
  margin: 0 0 10px 0;
  opacity: 0.9;
}

.inventory-stats {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.2);
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 500;
}

.stats-icon {
  margin-right: 5px;
}

.inventory-section {
  padding: 0;
}

.inventory-section-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #2c3e50;
  padding: 15px 20px 0 20px;
}

/* Modal inventaire large */
.inventory-modal-large {
  max-width: 1200px !important;
  width: 95%;
}

/* Filtres inventaire */
.inventory-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(100, 150, 255, 0.2);
  /* position et z-index retirés - créaient un stacking context qui bloquait les tooltips */
}

.inventory-filter-btn {
  background: rgba(40, 40, 50, 0.6);
  border: 1px solid rgba(100, 150, 255, 0.3);
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.inventory-filter-btn:hover {
  background: rgba(60, 60, 80, 0.8);
  border-color: rgba(100, 150, 255, 0.5);
  transform: translateY(-1px);
}

.inventory-filter-btn.active {
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.3), rgba(59, 130, 246, 0.3));
  border-color: rgba(100, 150, 255, 0.8);
  color: white;
  box-shadow: 0 0 10px rgba(74, 158, 255, 0.4);
}

.inventory-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 64px);
  gap: 8px;
  padding: 120px 50px 20px 50px;
  max-height: 550px;
  overflow-y: auto;
  overflow-x: visible;
  justify-content: center;
  position: relative;
  margin-top: -100px;
  pointer-events: none;
}

.inventory-section {
  overflow: visible;
}

.house-modal-tab-content {
  overflow: visible;
}

.house-modal-content {
  overflow: visible;
}

/* =============================================================
   MINECRAFT-STYLE INVENTORY SLOTS
   ============================================================= */

.minecraft-slot {
  width: 64px;
  height: 64px;
  background: rgba(20, 20, 25, 0.9);
  border: 2px solid rgba(139, 139, 139, 0.8);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.3),
              inset 2px 0 2px rgba(255, 255, 255, 0.1);
  pointer-events: auto;
}

.minecraft-slot:hover {
  z-index: 999999;
}

.minecraft-slot.usable:hover {
  background: rgba(40, 40, 50, 0.95);
  border-color: rgba(74, 158, 255, 0.9);
  box-shadow: 0 0 12px rgba(74, 158, 255, 0.5),
              inset 0 0 8px rgba(74, 158, 255, 0.2);
  transform: translateY(-2px);
}

.minecraft-slot.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.minecraft-slot.disabled:hover {
  border-color: rgba(139, 139, 139, 0.8);
  background: rgba(20, 20, 25, 0.9);
}

.slot-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.slot-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5));
}

.slot-quantity {
  position: absolute;
  bottom: 4px;
  right: 6px;
  color: white;
  font-size: 14px;
  font-weight: bold;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.8),
               -1px -1px 0 rgba(0, 0, 0, 0.8),
               1px -1px 0 rgba(0, 0, 0, 0.8),
               -1px 1px 0 rgba(0, 0, 0, 0.8);
  pointer-events: none;
  font-family: 'Courier New', monospace;
}

/* Tooltip style Minecraft */
.slot-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  background: rgba(16, 0, 16, 0.95);
  border: 2px solid rgba(80, 0, 255, 0.8);
  border-radius: 4px;
  padding: 10px 12px;
  min-width: 200px;
  max-width: 300px;
  pointer-events: none;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8),
              inset 0 0 20px rgba(80, 0, 255, 0.2);
  white-space: normal;
}

.minecraft-slot:hover .slot-tooltip {
  opacity: 1;
  visibility: visible;
}

.tooltip-name {
  color: white;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 6px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.8);
}

.tooltip-description {
  color: rgba(170, 170, 170, 1);
  font-size: 13px;
  margin-bottom: 8px;
  line-height: 1.4;
  font-style: italic;
}

.tooltip-action {
  color: rgba(85, 255, 85, 1);
  font-size: 12px;
  font-weight: 600;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
}

.minecraft-slot.disabled .tooltip-action {
  color: rgba(255, 85, 85, 1);
}

.inventory-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #8899a6;
}

.inventory-empty-icon {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.7;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.inventory-empty-icon .empty-state-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.6;
  filter: grayscale(50%);
}

.inventory-empty-state .empty-state-text {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #2c3e50;
}

.inventory-empty-state .empty-state-subtitle {
  font-size: 14px;
  color: #8899a6;
}

/* =============================================================
   MINECRAFT-STYLE SHOP SLOTS (Prix au lieu de quantité)
   ============================================================= */

.shop-slot {
  pointer-events: auto; /* CRITIQUE : Permet le clic sur les slots */
}

.shop-slot:hover {
  z-index: 999999; /* CRITIQUE : Tooltip au-dessus des filtres */
}

.shop-slot .slot-price {
  position: absolute;
  bottom: 4px;
  right: 6px;
  color: #FFD700;
  font-size: 13px;
  font-weight: bold;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.8),
               -1px -1px 0 rgba(0, 0, 0, 0.8),
               1px -1px 0 rgba(0, 0, 0, 0.8),
               -1px 1px 0 rgba(0, 0, 0, 0.8);
  pointer-events: none;
  font-family: 'Courier New', monospace;
}

.shop-slot.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.shop-slot.disabled:hover {
  border-color: rgba(220, 53, 69, 0.8);
  background: rgba(40, 20, 20, 0.95);
  box-shadow: 0 0 12px rgba(220, 53, 69, 0.3),
              inset 0 0 8px rgba(220, 53, 69, 0.2);
}

.shop-slot .tooltip-price {
  color: rgba(255, 215, 0, 1);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
}

.shop-slot.disabled .tooltip-action {
  color: rgba(255, 85, 85, 1);
}

/* Grilles boutique — gere par shop-manager.js inline */

.shop-section {
  overflow: visible;
}

/* Filtres boutique */
.shop-filter-btn {
  background: rgba(40, 40, 50, 0.6);
  border: 1px solid rgba(100, 150, 255, 0.3);
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.shop-filter-btn:hover {
  background: rgba(60, 60, 80, 0.8);
  border-color: rgba(100, 150, 255, 0.5);
  transform: translateY(-1px);
}

.shop-filter-btn.active {
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.3), rgba(59, 130, 246, 0.3));
  border-color: rgba(100, 150, 255, 0.8);
  color: white;
  box-shadow: 0 0 10px rgba(74, 158, 255, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .resident-form-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .resident-info {
    grid-template-columns: 1fr;
  }
  
  .decoration-row {
    flex-direction: column;
    text-align: center;
  }
  
  .decoration-actions {
    width: 100%;
  }
  
  .inventory-items-grid {
    grid-template-columns: 1fr;
  }
}