/* ============================================================
   SYSTÈME DE CROP D'IMAGE - BASE COMMUNE RÉUTILISABLE
   ============================================================ */

.image-crop-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.image-crop-modal.active {
  display: flex;
}

.image-crop-box {
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 900px;
  width: 95%;
}

.image-crop-box h3 {
  margin: 0 0 20px 0;
  font-size: 1.5em;
  color: #333;
}

.image-crop-area {
  position: relative;
  background: #f0f0f0;
  margin: 0 auto 20px;
  overflow: hidden;
  border-radius: 8px;
}

.image-crop-image {
  position: absolute;
  top: 0;
  left: 0;
  cursor: grab;
  user-select: none;
  transition: none;
  transform-origin: top left;
}

.image-crop-image:active {
  cursor: grabbing;
}

.image-crop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.image-crop-shape {
  position: absolute;
  border: 3px solid white;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.image-zoom-control {
  margin: 20px 0;
}

.image-zoom-control label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
}

.image-zoom-slider {
  width: 100%;
  height: 6px;
  background: #ddd;
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.image-zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #007AFF;
  border-radius: 50%;
  cursor: pointer;
}

.image-zoom-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #007AFF;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.image-crop-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.image-crop-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease;
}

.image-crop-btn-cancel {
  background: #f0f0f0;
  color: #333;
}

.image-crop-btn-apply {
  background: #007AFF;
  color: white;
}

.image-crop-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 900px) {
  .image-crop-box {
    width: 95%;
    padding: 20px;
  }
  
  .image-crop-area {
    max-width: 100% !important;
    height: auto !important;
  }
  
  .image-crop-actions {
    flex-direction: column;
  }
  
  .image-crop-btn {
    width: 100%;
  }
}
