/* ==========================================================================
   Epsylon Box — VIDEO TOOLS
   Styles partagés par tous les outils /outils/video-xxx/ et /outils/video/
   ========================================================================== */

/* === DROPZONE (réutilise celle des PDF, alias) === */
.vid-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  background: var(--bg2);
  transition: all .2s;
  position: relative;
}
.vid-drop:hover, .vid-drop.drag-over {
  border-color: var(--accent);
  background: var(--glow);
}
.vid-drop .icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}
.vid-drop .hint {
  color: var(--text2);
  font-size: .88rem;
  margin-top: 6px;
}
.vid-drop .btn {
  margin-top: 14px;
  pointer-events: none;
}

/* === VIDEO FILE CARD === */
.vid-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 14px;
}
.vid-file .vid-thumb {
  width: 64px; height: 42px;
  background: var(--bg3);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  overflow: hidden;
}
.vid-file .vid-thumb video { width: 100%; height: 100%; object-fit: cover; }
.vid-file .vid-info { flex: 1; min-width: 0; }
.vid-file .vid-name {
  font-weight: 600;
  color: var(--text);
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vid-file .vid-meta {
  font-size: .75rem;
  color: var(--text2);
  margin-top: 2px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.vid-file .vid-meta span { display: inline-flex; align-items: center; gap: 4px; }
.vid-file .vid-actions { display: flex; gap: 4px; flex-shrink: 0; }
.vid-file .vid-btn {
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  border-radius: 6px;
  cursor: pointer;
  font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
}
.vid-file .vid-btn:hover { border-color: var(--accent3); color: var(--accent3); }

/* === LOADING OVERLAY (FFmpeg en cours de chargement) === */
.vid-loading {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  color: var(--text2);
  display: none;
}
.vid-loading.show { display: block; }
.vid-loading .loading-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.vid-loading .loading-title {
  font-weight: 600;
  color: var(--text);
}
.vid-loading .loading-title .spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: vid-spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes vid-spin { to { transform: rotate(360deg); } }
.vid-loading .bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.vid-loading .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .25s;
  width: 0;
}

/* === OPTIONS PANEL (idem PDF) === */
.vid-options {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg2);
  border-radius: var(--radius-sm);
}
.vid-options .row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.vid-options .row + .row { margin-top: 10px; }
.vid-options label {
  font-size: .85rem;
  color: var(--text2);
  font-weight: 600;
}
.vid-options input[type="text"],
.vid-options input[type="number"],
.vid-options select {
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: .9rem;
  font-family: 'DM Sans', sans-serif;
}
.vid-options input[type="range"] { flex: 1; min-width: 140px; }
.vid-options input:focus, .vid-options select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--glow);
}

/* === PRIVACY BADGE (reuse) === */
.vid-privacy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0,255,136,0.08);
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: 20px;
  color: #00cc66;
  font-size: .75rem;
  font-weight: 600;
  margin-bottom: 16px;
}
[data-theme="light"] .vid-privacy { color: #008844; background: rgba(0,150,60,0.08); border-color: rgba(0,150,60,0.2); }

/* === VIDEO PREVIEW === */
.vid-preview {
  width: 100%;
  max-height: 400px;
  border-radius: var(--radius-sm);
  background: #000;
  margin-top: 16px;
}

/* === RESULT BOX (après traitement) === */
.vid-result {
  margin-top: 16px;
  padding: 16px;
  background: rgba(0,255,136,0.08);
  border: 1px solid rgba(0,255,136,0.3);
  border-radius: var(--radius-sm);
  font-size: .9rem;
}

/* === HUB PAGE (identique PDF) === */
.vid-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.vid-hub-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: all .2s;
}
.vid-hub-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.08);
}
.vid-hub-card .ico {
  width: 44px; height: 44px;
  background: var(--glow);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.vid-hub-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
}
.vid-hub-card p {
  color: var(--text2);
  font-size: .82rem;
  line-height: 1.4;
}

/* === WARNING BOX pour mobile === */
.vid-warning {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255, 180, 0, 0.08);
  border: 1px solid rgba(255, 180, 0, 0.3);
  border-radius: var(--radius-sm);
  color: #e6a000;
  font-size: .82rem;
  line-height: 1.5;
}
[data-theme="light"] .vid-warning { color: #aa7700; background: rgba(255, 180, 0, 0.08); }
