/* ==========================================================================
   TERRAIN 3D CLIENT-SIDE CONTROLS & STYLES (PLAN DE FERME)
   ========================================================================== */

.floating-3d-panel {
  position: absolute;
  top: 70px;
  right: 16px;
  width: 320px;
  max-width: calc(100vw - 32px);
  z-index: 105;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  overflow: hidden;
  animation: fadeDown3D 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
}

@keyframes fadeDown3D {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.floating-3d-header {
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.floating-3d-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
}

.pulse-dot-3d {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
  animation: pulse3D 1.6s infinite;
}

@keyframes pulse3D {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

.floating-3d-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 700;
  color: #4f46e5;
  background: #eef2ff;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #c7d2fe;
}

.btn-3d-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-3d-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

.floating-3d-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

.floating-3d-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.floating-3d-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #1e293b;
}

.floating-3d-sublabel {
  font-size: 0.68rem;
  color: #64748b;
}

.floating-3d-slider-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slider-3d {
  width: 100%;
  accent-color: #6366f1;
  cursor: pointer;
}

.slider-ticks-3d {
  display: flex;
  justify-content: space-between;
  font-size: 0.64rem;
  color: #94a3b8;
  font-family: var(--font-mono, monospace);
  padding: 0 2px;
}

.floating-3d-presets {
  display: flex;
  gap: 4px;
}

.btn-preset-3d, .btn-pitch-preset {
  flex: 1;
  padding: 5px 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.btn-preset-3d:hover, .btn-pitch-preset:hover {
  border-color: #6366f1;
  color: #6366f1;
}

.btn-preset-3d.active, .btn-pitch-preset.active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.floating-3d-actions {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.btn-3d-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
  color: #1e293b;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-3d-action:hover {
  background: #ffffff;
  border-color: #6366f1;
  color: #4f46e5;
}

.btn-3d-action.active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.btn-3d-action.active svg {
  stroke: #ffffff;
}

.floating-3d-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 0.68rem;
  color: #475569;
  line-height: 1.35;
}

.btn-3d-mode.active {
  background: #4f46e5 !important;
  color: #ffffff !important;
  border-color: #4338ca !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.btn-3d-mode.active svg {
  stroke: #ffffff !important;
}

.popup-parcel-3d-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 4px;
}

.popup-parcel-3d-btn:hover {
  background: #4338ca;
  color: #ffffff;
  border-color: #4338ca;
}

.orbit-spinning {
  animation: spinOrbit 3s linear infinite;
}

@keyframes spinOrbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   DECOUPAGE 3D PARCELLE & EXPORT GEOTIFF
   ========================================================================== */

.floating-3d-parcel-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3.5px solid #4f46e5;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.floating-3d-parcel-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.floating-3d-parcel-meta {
  font-size: 0.68rem;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.floating-3d-parcel-stat {
  font-weight: 600;
  color: #1e293b;
}

.banner-3d-prompt {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  background: #1e1b4b;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(30, 27, 75, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: bannerFadeIn 0.25s ease;
  pointer-events: auto;
}

@keyframes bannerFadeIn {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.banner-3d-prompt button {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.banner-3d-prompt button:hover {
  color: #ffffff;
}

.btn-popup-parcel-action {
  transition: all 0.15s ease;
}

.btn-popup-parcel-action:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
