/* Evotic Edge — Caméra vidéo Vibes (Lot 3). Overlay fullscreen, chargé à la
   demande (bouton "Vidéo" de l'éditeur). */

.vc-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
}

.vc-close, .vc-flip, .vc-torch {
  position: absolute;
  z-index: 10;
  width: 42px; height: 42px;
  border: 0; border-radius: 50%;
  background: rgba(0,0,0,.45);
  color: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.vc-close { top: calc(12px + env(safe-area-inset-top,0px)); left: 12px; }
.vc-flip  { top: calc(12px + env(safe-area-inset-top,0px)); right: 12px; }
.vc-torch { top: calc(64px + env(safe-area-inset-top,0px)); right: 12px; }
.vc-torch.on { background: #F5B027; color: #000; }

.vc-timer-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px; z-index: 9;
  background: rgba(255,255,255,.18);
}
.vc-timer-bar-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #6750A4, #FF2D55);
  transition: width .1s linear;
}
/* Chrono = badge rouge "enregistrement", sous la barre du haut, visible UNIQUEMENT
   pendant l'enregistrement (sinon il chevauchait le bouton "Ajouter un son"). */
.vc-timer {
  position: absolute;
  top: calc(58px + env(safe-area-inset-top,0px));
  left: 50%; transform: translateX(-50%);
  z-index: 8;
  display: none;
  background: rgba(255,45,85,.92);
  padding: 4px 13px; border-radius: 999px;
  color: #fff; font: 800 13px/1 var(--font, system-ui);
  pointer-events: none;
}
.vc-root.vc-recording .vc-timer { display: block; }

.vc-stage {
  flex: 1;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.vc-preview-video, .vc-replay {
  width: 100%; height: 100%;
  object-fit: cover;   /* 9:16 plein écran (modèle TikTok) — WYSIWYG avec l'enregistrement */
  background: #000;
}
/* Auto-embellissement live (luminosité + couleurs + denoise/lissage) — modèle TikTok.
   ⚠️ DOIT rester identique au AUTO_ENHANCE de vibes-camera.js (sinon WYSIWYG cassé).
   PAS sur .vc-replay : l'enregistrement a déjà l'enhance « cuit » dans le canvas. */
.vc-preview-video {
  filter: brightness(1.1) contrast(1.05) saturate(1.12) blur(0.5px);
}

.vc-error {
  color: #fff; text-align: center; padding: 24px; font-size: 15px; line-height: 1.5;
}

.vc-caption-row { position: absolute; left: 0; right: 0; bottom: 14px; padding: 0 16px; }
.vc-caption {
  width: 100%; box-sizing: border-box;
  border: 0; border-radius: 14px;
  padding: 12px 14px;
  font: 600 15px var(--font, system-ui);
  background: rgba(0,0,0,.55); color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.vc-caption::placeholder { color: rgba(255,255,255,.6); }

.vc-controls {
  position: relative;
  padding: 12px 16px calc(24px + env(safe-area-inset-bottom,0px));
  display: flex; flex-direction: column; align-items: center;
  gap: 9px;
  background: #000;
}
.vc-hint {
  text-align: center; color: rgba(255,255,255,.6);
  font: 600 12px var(--font, system-ui);
}

/* Bouton obturateur (hold). */
.vc-shutter {
  width: 74px; height: 74px;
  border-radius: 50%;
  border: 5px solid rgba(255,255,255,.85);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
.vc-shutter-dot {
  width: 56px; height: 56px; border-radius: 50%;
  background: #FF2D55;
  transition: transform .18s ease, border-radius .18s ease;
}
.vc-root.vc-recording .vc-shutter { border-color: #FF2D55; }
.vc-root.vc-recording .vc-shutter-dot {
  transform: scale(.55);
  border-radius: 8px;
}

.vc-done, .vc-redo, .vc-publish, .vc-save-draft {
  border: 0; border-radius: 24px;
  font: 800 15px var(--font, system-ui);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.vc-save-draft { padding: 13px 20px; background: rgba(255,255,255,.16); color: #fff; }
.vc-save-draft:disabled { opacity: .6; }
.vc-done {
  position: absolute; right: 28px; bottom: calc(33px + env(safe-area-inset-bottom,0px));
  width: 56px; height: 56px; border-radius: 50%; justify-content: center;
  background: #18B566; color: #fff; font-size: 20px;
}
.vc-redo { padding: 13px 20px; background: rgba(255,255,255,.16); color: #fff; }
.vc-publish { padding: 13px 22px; background: var(--brand, #6750A4); color: #fff; }
.vc-publish:disabled { opacity: .6; }

/* Lot 4 — canvas filtré (au-dessus du <video> source caché). */
.vc-gl-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;   /* aligné sur l'aperçu/enregistrement 9:16 cover */
}
.vc-stage.vc-filtering .vc-preview-video { visibility: hidden; }

.vc-filter-row {
  position: absolute; left: 0; right: 0;
  bottom: calc(150px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: 10px; overflow-x: auto;
  padding: 8px 16px; z-index: 7;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.vc-filter-row::-webkit-scrollbar { display: none; }
.vc-filter-chip {
  flex: 0 0 auto;
  border: 2px solid transparent; border-radius: 18px;
  padding: 7px 14px;
  background: rgba(0,0,0,.5); color: #fff;
  font: 700 13px var(--font, system-ui);
  cursor: pointer; white-space: nowrap;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.vc-filter-chip.active { border-color: #fff; background: rgba(255,255,255,.2); }
.vc-filter-btn {
  position: absolute;
  top: calc(116px + env(safe-area-inset-top,0px)); right: 12px; z-index: 10;
  width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; font-size: 17px;
  display: none; align-items: center; justify-content: center; cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.vc-filter-btn.available { display: flex; }
.vc-filter-btn.on { background: #fff; color: #111; }

/* Lot AR — overlay 3D (au-dessus du <video>/canvas filtre, taps traversants). */
.vc-ar-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;   /* aligné sur l'aperçu/enregistrement 9:16 cover */
  pointer-events: none;
  z-index: 3;
}
.vc-ar-btn {
  position: absolute;
  top: calc(168px + env(safe-area-inset-top,0px)); right: 12px; z-index: 10;
  width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; font-size: 17px;
  display: none; align-items: center; justify-content: center; cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.vc-ar-btn.available { display: flex; }
.vc-ar-btn.on { background: #fff; color: #111; }
.vc-ar-btn.loading { opacity: .6; pointer-events: none; }
.vc-ar-btn.loading i { animation: vc-spin .9s linear infinite; }
@keyframes vc-spin { to { transform: rotate(360deg); } }
/* Reel circulaire de masques (style Snapchat) — emoji en cercle + petit nom. */
.vc-ar-credit {
  position: absolute; left: 0; right: 0; bottom: 150px; text-align: center;
  font-size: 11px; color: rgba(255,255,255,.85); text-shadow: 0 1px 2px rgba(0,0,0,.6);
  z-index: 6; pointer-events: none; padding: 0 16px;
}
.vc-ar-row {
  position: absolute; left: 0; right: 0;
  bottom: calc(150px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: 12px; overflow-x: auto;
  padding: 4px 16px; z-index: 8;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  align-items: flex-end;
}
.vc-ar-row::-webkit-scrollbar { display: none; }
.vc-ar-chip {
  flex: 0 0 auto; border: 0; background: transparent; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.vc-ar-circle {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 25px; line-height: 1;
  background: rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.3);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .15s ease, border-color .15s ease;
}
.vc-ar-chip.active .vc-ar-circle {
  border-color: #fff; transform: scale(1.14);
  box-shadow: 0 0 0 3px rgba(255,255,255,.35), 0 2px 10px rgba(0,0,0,.4);
}
.vc-ar-name {
  font: 700 10px var(--font, system-ui); color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.7); max-width: 62px; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
