/* ================= Studio Reel : camera + import video ================= */

.reel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.reel-actions .btn {
  flex: 1 1 200px;
  justify-content: center;
}

.reel-hint {
  width: 100%;
  margin: 2px 0 0;
  font-size: 0.85rem;
}

input[data-reel-import-input] {
  display: none;
}

.reel-studio {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 8, 16, 0.85);
  backdrop-filter: blur(6px);
}

.reel-studio-dialog {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(420px, 100%);
  max-height: calc(100dvh - 32px);
  padding: 16px;
  border-radius: 20px;
  background: #14141e;
  color: #f5f5fa;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.reel-studio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reel-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 9 / 16;
  max-height: 60dvh;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
}

.reel-live,
.reel-take {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.reel-take {
  object-fit: contain;
  background: #000;
}

.reel-timer {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}

.reel-rec-dot {
  position: absolute;
  top: 14px;
  right: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff3b5c;
  animation: reel-blink 1s infinite;
}

@keyframes reel-blink {
  50% { opacity: 0.2; }
}

.reel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reel-record-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  cursor: pointer;
}

.reel-record-core {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ff3b5c;
  transition: border-radius 0.2s ease, transform 0.2s ease;
}

.reel-record-core.is-recording {
  border-radius: 10px;
  transform: scale(0.8);
}

.reel-review {
  justify-content: center;
}

/* Mobile : le studio occupe presque tout l'ecran */
@media (max-width: 640px) {
  .reel-studio {
    padding: 8px;
    align-items: stretch;
  }

  .reel-studio-dialog {
    width: 100%;
    max-height: none;
    border-radius: 16px;
  }

  .reel-stage {
    max-height: 58dvh;
  }
}
