/* ====================================================================
   FOCAL POINT PICKER — composant admin (focal-picker.js)
   ==================================================================== */
.fp-root {
  display: block;
  font-family: var(--body, system-ui, sans-serif);
}
.fp-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 720px) {
  .fp-wrap { grid-template-columns: 1fr; }
}

.fp-source-pane {
  min-width: 0;
}
.fp-source {
  position: relative;
  width: 100%;
  height: 480px;
  max-height: 480px;
  background: #0a0a0a;
  border: 1px solid var(--line, rgba(255,255,255,0.12));
  border-radius: 6px;
  overflow: hidden;
  cursor: crosshair;
  user-select: none;
  outline: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Empêche l'inertie de scroll sur trackpad de bouger la page pendant le zoom */
  touch-action: none;
}
.fp-source:focus { box-shadow: 0 0 0 2px var(--accent, #3B82F6); }
.fp-source--grabbing { cursor: grabbing; }

.fp-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.fp-overlay {
  position: absolute;
  background: rgba(0, 0, 0, 0.4);
  pointer-events: none;
  transition: none;
  z-index: 2;
}

/* Cadre matérialisant la fenêtre visible après crop + zoom */
.fp-crop-frame {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.85),
    0 0 0 2px rgba(59, 130, 246, 0.6);
  background: transparent;
}

.fp-marker {
  position: absolute;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  margin-top: -12px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow:
    inset 0 0 0 1px #3B82F6,
    0 1px 3px rgba(0, 0, 0, 0.6),
    0 0 0 8px rgba(59, 130, 246, 0);
  background: transparent;
  pointer-events: none;
  z-index: 5;
  animation: fp-pulse 2.2s ease-in-out infinite;
}
.fp-marker::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
}
@keyframes fp-pulse {
  0%, 100% { box-shadow: inset 0 0 0 1px #3B82F6, 0 1px 3px rgba(0,0,0,0.6), 0 0 0 0 rgba(59, 130, 246, 0.5); }
  50%      { box-shadow: inset 0 0 0 1px #3B82F6, 0 1px 3px rgba(0,0,0,0.6), 0 0 0 6px rgba(59, 130, 246, 0); }
}

.fp-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.fp-zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line-str, rgba(255,255,255,0.32));
  border-radius: 4px;
}
.fp-zoom-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink, #eeeae0);
  width: 22px; height: 22px;
  line-height: 1;
  border-radius: 3px;
  cursor: pointer;
  font-size: 16px;
  font-family: var(--mono, monospace);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.fp-zoom-btn:hover { background: rgba(255,255,255,0.08); color: var(--accent, #3B82F6); }
.fp-zoom-label {
  min-width: 44px;
  text-align: center;
  font-family: var(--mono, monospace);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink, #eeeae0);
}
.fp-reset {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line-str, rgba(255,255,255,0.32));
  border-radius: 4px;
  color: var(--ink, #eeeae0);
  padding: 6px 14px;
  font-family: var(--mono, monospace);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.fp-reset:hover { border-color: var(--accent, #3B82F6); color: var(--accent, #3B82F6); }
.fp-coord {
  font-family: var(--mono, monospace);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-soft, #a8a59c);
  flex: 1 0 auto;
  text-align: right;
}

.fp-previews {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.fp-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fp-preview-label {
  font-family: var(--mono, monospace);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft, #a8a59c);
}
.fp-preview-wrap--primary .fp-preview-label::before {
  content: "● ";
  color: var(--accent, #3B82F6);
}
.fp-preview {
  width: 100%;
  max-width: 100%;
  background-color: #0a0a0a;
  border: 1px solid var(--line, rgba(255,255,255,0.12));
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.fp-preview__inner {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  transform: scale(1);
  transform-origin: 50% 50%;
  will-change: transform, background-position;
}
.fp-preview__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
