/* =============================== */
/*      UPLOAD & PREVIEW           */
/* =============================== */

/* Grille d'uploads */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 10px 0 22px;
}

.upload-label-image {
  cursor: pointer;
  display: inline-block;
}

/* Placeholder pour upload */
.upload-placeholder {
  width: 100%;
  max-width: 260px;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaf7ff;
  border: 2px dashed var(--color-primary, #0ea5e9);
  border-radius: 12px;
  color: var(--color-primary, #0ea5e9);
  font-size: 2.2rem;
  font-weight: 800;
  transition: background-color .2s ease, transform .2s ease;
}

.upload-placeholder:hover {
  background: #dff3ff;
  transform: scale(1.02);
}

/* Wrapper de preview */
.image-preview-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 10px;
}

/* Images actuelles et nouvelles */
.image-current,
.image-preview-new {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-current p,
.image-preview-new p {
  font-weight: 700;
  margin: 0 0 6px;
  color: #334155;
}

/* Images de preview */
.image-current img,
.image-preview-new img,
.preview-upload-image {
  width: 100%;
  max-width: 260px;
  max-height: 170px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--border, #e6edf5);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.image-current img:hover,
.image-preview-new img:hover,
.preview-upload-image:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0,0,0,.14);
}

/* Bouton de suppression */
.delete-button {
  margin-top: 10px;
  padding: 10px 14px;
  font-size: .92rem;
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  transition: background-color .2s ease;
}

.delete-button:hover {
  background: #c82333;
}

/* Responsive */
@media (max-width: 950px) {
  .upload-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .upload-placeholder,
  .image-current img,
  .image-preview-new img,
  .preview-upload-image {
    transition: none;
  }
  
  .upload-placeholder:hover {
    transform: none;
  }
}
