/* ══════════════════════════════════════════════════
   MOBILE CANVAS — Scopé sous .cf-mobile uniquement
   Aucun impact sur le desktop
   ══════════════════════════════════════════════════ */

/* ── Masquer les éléments desktop du canvas ── */
.cf-mobile #cvFloatingBar,
.cf-mobile #cvTextMiniToolbar,
.cf-mobile #cvBottomSheet,
.cf-mobile #cvRotationWheel,
.cf-mobile #cvTrashBtn,
.cf-mobile .editor-toolbar,
.cf-mobile .overlay-panel,
.cf-mobile #propPanel,
.cf-mobile #propTimingPanel,
.cf-mobile #cvTimeline,
.cf-mobile #slideNavBar {
  display: none !important;
}

/* ── Visual editor plein écran ── */
.cf-mobile .visual-editor.mc-fullscreen {
  position: fixed !important;
  inset: 0;
  z-index: 1000;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  display: flex !important;
  flex-direction: column;
  background: #000;
}
.cf-mobile .mc-fullscreen .visual-editor-header {
  display: none;
}
.cf-mobile .mc-fullscreen .visual-editor-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.cf-mobile .mc-fullscreen .editor-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 0;
}
.cf-mobile .mc-fullscreen .canvas-layout {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.cf-mobile .mc-fullscreen .canvas-container {
  margin: 0 auto;
}

/* ── Bouton fermer (X) ── */
#mcCloseBtn {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1010;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

/* ── Toolbar fixe en bas ── */
#mcToolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1010;
  height: 56px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(15,15,15,0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.mc-tool-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #aaa;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: color .15s;
  font-family: 'Syne', sans-serif;
}
.mc-tool-btn span {
  font-size: 9px;
  font-weight: 600;
}
.mc-tool-btn.active {
  color: #2B7FFF;
}

/* ── Panel slide-up ── */
#mcPanel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1020;
  max-height: 55vh;
  background: rgba(20,20,20,0.96);
  backdrop-filter: blur(12px);
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
#mcPanel.open {
  transform: translateY(0);
}
.mc-panel-handle {
  width: 36px;
  height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
  margin: 8px auto 4px;
}
.mc-panel-header {
  display: flex;
  align-items: center;
  padding: 6px 16px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mc-panel-title {
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.mc-panel-close {
  background: none;
  border: none;
  color: #888;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.mc-panel-body {
  padding: 10px 14px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(55vh - 60px);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

/* ── Mini barre texte mobile ── */
#mcMiniBar {
  position: absolute;
  z-index: 1005;
  display: none;
  align-items: center;
  gap: 4px;
  background: rgba(20,20,20,0.92);
  border-radius: 24px;
  padding: 4px 8px;
  border: 0.5px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}
#mcMiniBar.visible {
  display: flex;
}
.mc-mini-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.08);
  color: #ddd;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.mc-mini-btn:active {
  background: rgba(43,127,255,0.25);
  color: #2B7FFF;
}

/* ── Context menu (long-press) ── */
#mcContextMenu {
  position: absolute;
  z-index: 1015;
  display: none;
  background: rgba(25,25,25,0.96);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 4px 0;
  min-width: 160px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.mc-ctx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #ccc;
  font-size: 14px;
  font-family: 'Syne', sans-serif;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.mc-ctx-item:active {
  background: rgba(43,127,255,0.12);
  color: #2B7FFF;
}
.mc-ctx-item.danger {
  color: #f87171;
}
