/* Structure globale */
.yvu-wrapper {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #eaeaea;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .04);
}

.yvu-face {
  margin-bottom: 16px;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .05);
}

.yvu-face.face-A { border: 2px solid rgba(59,130,246,.3); box-shadow: 0 0 0 4px rgba(59,130,246,.08) inset; }
.yvu-face.face-B { border: 2px solid rgba(34,197,94,.3); box-shadow: 0 0 0 4px rgba(34,197,94,.08) inset; }
.yvu-face.face-C { border: 2px solid rgba(249,115,22,.3); box-shadow: 0 0 0 4px rgba(249,115,22,.08) inset; }
.yvu-face.face-D { border: 2px solid rgba(236,72,153,.3); box-shadow: 0 0 0 4px rgba(236,72,153,.08) inset; }

.yvu-face-header { font-weight: 700; margin-bottom: 8px; }

/* Liste et ligne */
.yvu-list { display: flex; flex-direction: column; gap: 8px; }

.yvu-row {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) 32px; /* clé : minmax(0,1fr) */
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px;
  cursor: grab;
}

.yvu-row.dragging { opacity: .7; border-style: dashed; }

.yvu-badge {
  background: #111827;
  color: #fff;
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
  font-weight: 700;
}

/* Zone texte */
.yvu-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0; /* clé absolue pour l’ellipsis */
}

.yvu-meta strong {
  flex: 1;          /* prend toute la place libre */
  min-width: 0;     /* permet de rétrécir */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
  font-size: 14px;
  color: #111;
}

.yvu-meta small {
  flex-shrink: 0;
  opacity: .7;
  font-size: 13px;
  color: #555;
}

/* Supprimer */
.yvu-remove {
  border: 0;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  opacity: .7;
  transition: opacity .2s ease;
}
.yvu-remove:hover { opacity: 1; }

/* Progression */
.yvu-progress {
  height: 6px;
  border-radius: 999px;
  background: #f1f5f9;
  margin-top: 6px;
  grid-column: 1 / -1;
}
.yvu-progress-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg,#60a5fa,#34d399);
}

/* Alerte */
.yvu-face-alert {
  font-weight: 600;
  color: #ef4444;
  margin-bottom: 4px;
  animation: yvu-blink 1.4s infinite;
}
@keyframes yvu-blink {
  0%,100%{opacity:1}
  50%{opacity:.5}
}

/* Responsive */
@media (max-width:600px){
  .yvu-row{
    grid-template-columns:36px minmax(0,1fr) 28px;
    padding:6px;
  }
  .yvu-meta strong{font-size:13px}
}
/* ==============================
   BARRE DE PROGRESSION PAR FACE
   ============================== */
.yvu-face-totalbar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  margin-top: 12px;
  margin-bottom: 4px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
  display: block;
}

.yvu-face-totalfill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.6s ease, background 0.4s ease;
  background: #22c55e;
}

.yvu-face-totalfill.full {
  animation: yvu-blink-fill 1.2s infinite;
}

@keyframes yvu-blink-fill {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.yvu-face-usage {
  font-size: 13px;
  font-weight: 500;
  color: #444;
  text-align: right;
  margin-top: 4px;
  display: block;
}
