/* ============================================================
   vault-editor-20260725.css — recadrage / coupe d'un média du Vault.
   Peau PARQUET (dozka) : tokens EXACTS de parquet-vault-20260717.css,
   aucune valeur inventée.
     panel #090909 · elevated #0c0c0c · sunken #050505
     lignes #1a1a1a / #262626 · ink #fafafa · muted #a3a3a3 · faint #525252
     bleu #0a84ff chirurgical (marqueurs seulement) · 2px partout
     FLAT : zéro dégradé, zéro glow, zéro verre, zéro pilule.
   ============================================================ */

/* ── bouton sur la vignette (n'existe que dans le Vault ADMIN) ── */
.tg-vault-cell { position: relative; }
.ve-btn {
  position: absolute; top: 4px; right: 4px; z-index: 3;
  width: 26px; height: 26px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: #050505; color: #a3a3a3;
  border: 1px solid #262626; border-radius: 2px;
  cursor: pointer; opacity: 0; transition: opacity .12s linear;
}
.tg-vault-cell:hover .ve-btn { opacity: 1; }
.ve-btn:hover { color: #fafafa; border-color: #525252; }
@media (hover: none) { .ve-btn { opacity: .9; } }   /* tactile : pas de survol -> toujours visible */

/* ── plein écran ─────────────────────────────────────────────── */
#vedit {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; flex-direction: column;
  background: #131313; color: #fafafa;
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
}
#vedit * { border-radius: 2px; box-sizing: border-box; }

#vedit .ve-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid #1a1a1a;
}
#vedit .ve-title {
  font-size: 11.5px; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase; color: #fafafa;
}
#vedit .ve-sub { font-size: 11px; color: #525252; margin-left: auto; }
#vedit .ve-x {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: #525252; cursor: pointer;
}
#vedit .ve-x:hover { background: #0c0c0c; color: #fafafa; }

/* ── scène : l'image + le cadre ─────────────────────────────── */
#vedit .ve-stage {
  flex: 1; min-height: 0; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: #050505; overflow: hidden; padding: 12px;
  touch-action: none;                     /* le doigt déplace le cadre, pas la page */
}
#vedit .ve-wrap { position: relative; line-height: 0; }
#vedit .ve-img { max-width: 100%; max-height: 100%; display: block; user-select: none; -webkit-user-drag: none; }

#vedit .ve-shade { position: absolute; inset: 0; pointer-events: none; }
#vedit .ve-shade i { position: absolute; background: rgba(5,5,5,.72); display: block; }

#vedit .ve-crop {
  position: absolute; border: 1px solid #fafafa; cursor: move;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6);
}
#vedit .ve-crop::before,
#vedit .ve-crop::after {                  /* repères tiers, ligne de 1px, aucun effet */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-repeat: no-repeat;
}
#vedit .ve-crop::before {
  background-image: linear-gradient(#ffffff26 1px, transparent 1px), linear-gradient(#ffffff26 1px, transparent 1px);
  background-size: 100% 33.33%, 100% 66.66%;
}
#vedit .ve-crop::after {
  background-image: linear-gradient(90deg, #ffffff26 1px, transparent 1px), linear-gradient(90deg, #ffffff26 1px, transparent 1px);
  background-size: 33.33% 100%, 66.66% 100%;
}
#vedit .ve-h {
  position: absolute; width: 18px; height: 18px; background: #fafafa;
  border: 1px solid #050505;
}
#vedit .ve-h[data-c="nw"] { left: -9px;  top: -9px;    cursor: nwse-resize; }
#vedit .ve-h[data-c="ne"] { right: -9px; top: -9px;    cursor: nesw-resize; }
#vedit .ve-h[data-c="sw"] { left: -9px;  bottom: -9px; cursor: nesw-resize; }
#vedit .ve-h[data-c="se"] { right: -9px; bottom: -9px; cursor: nwse-resize; }

/* ── pied : coupe vidéo + actions ───────────────────────────── */
#vedit .ve-foot { border-top: 1px solid #1a1a1a; background: #090909; }
#vedit .ve-trim { padding: 12px 14px 4px; }
#vedit .ve-strip {
  position: relative; height: 56px; background: #050505 center/cover no-repeat;
  border: 1px solid #1a1a1a; touch-action: none; user-select: none;
}
#vedit .ve-strip img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
#vedit .ve-cut { position: absolute; top: 0; bottom: 0; background: rgba(5,5,5,.78); pointer-events: none; }
#vedit .ve-gr {
  position: absolute; top: -1px; bottom: -1px; width: 10px; margin-left: -5px;
  background: #fafafa; cursor: ew-resize; touch-action: none;
}
#vedit .ve-gr::after {
  content: ""; position: absolute; left: 4px; top: 50%; width: 2px; height: 16px;
  margin-top: -8px; background: #050505;
}
#vedit .ve-times {
  display: flex; justify-content: space-between; padding: 6px 2px 0;
  font-size: 11px; color: #a3a3a3; font-variant-numeric: tabular-nums;
}
#vedit .ve-times b { color: #fafafa; font-weight: 600; }

#vedit .ve-actions {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
#vedit .ve-hint { font-size: 11px; color: #525252; margin-right: auto; }
#vedit .ve-a {
  padding: 9px 16px; font-size: 12px; font-weight: 600; font-family: inherit;
  background: #0c0c0c; color: #fafafa; border: 1px solid #262626; cursor: pointer;
}
#vedit .ve-a:hover { border-color: #525252; }
#vedit .ve-a.pri { background: #fafafa; color: #050505; border-color: #fafafa; }   /* sélection = blanc inversé */
#vedit .ve-a.pri:hover { background: #ffffff; }
#vedit .ve-a[disabled] { opacity: .4; cursor: default; }
#vedit .ve-a.gh { background: transparent; border-color: #1a1a1a; color: #a3a3a3; }

/* ── état / progression ─────────────────────────────────────── */
#vedit .ve-state {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(5,5,5,.9); padding: 24px; text-align: center;
}
#vedit .ve-state p { margin: 0; font-size: 12px; color: #a3a3a3; }
#vedit .ve-state .ve-step { color: #fafafa; font-size: 12.5px; font-weight: 600; }
#vedit .ve-bar { width: min(360px, 80vw); height: 2px; background: #1a1a1a; }
#vedit .ve-bar i { display: block; height: 100%; width: 0; background: #0a84ff; transition: width .3s linear; }
#vedit .ve-err { color: #f79009; font-size: 12px; max-width: 420px; }

/* ── mobile : la scène prend la place, le pied reste atteignable ── */
@media (max-width: 640px) {
  #vedit .ve-stage { padding: 6px; }
  #vedit .ve-actions { flex-wrap: wrap; }
  #vedit .ve-hint { width: 100%; margin: 0 0 4px; }
  #vedit .ve-a { flex: 1; text-align: center; }
}
