diff --git a/modules/printvault/assets/printvault.js b/modules/printvault/assets/printvault.js
index ab4530e..1ff68ba 100644
--- a/modules/printvault/assets/printvault.js
+++ b/modules/printvault/assets/printvault.js
@@ -128,7 +128,7 @@ function cardHtml(m) {
: icon;
const dims = m.dim_x > 0 ? `${Math.round(m.dim_x)}×${Math.round(m.dim_y)}×${Math.round(m.dim_z)}mm` : '';
const gcInfo = m.gcode_time || '';
- return `
-
Type${escHtml(m.file_type.toUpperCase())}
-
Catégorie${escHtml(m.category)}
-
Taille${escHtml(fmtSize(m.file_size))}
-
Ajouté le${escHtml(fmtDate(m.created_at))}
- ${m.dim_x > 0 ? `
Dimensions${Math.round(m.dim_x)}×${Math.round(m.dim_y)}×${Math.round(m.dim_z)} mm${m.volume > 0 ? ' · '+m.volume+' cm³' : ''}
` : ''}
- ${isGcode && m.gcode_time ? `
Temps${escHtml(m.gcode_time)}
` : ''}
- ${isGcode && m.gcode_filament ? `
Filament${escHtml(m.gcode_filament)}
` : ''}
- ${isGcode && m.gcode_nozzle ? `
Buse${escHtml(m.gcode_nozzle)}
` : ''}
- ${isGcode && m.gcode_bed ? `
Plateau${escHtml(m.gcode_bed)}
` : ''}
-
`;
-
- const btn3d = document.getElementById('pv-detail-3d-btn');
- if (canView) {
- btn3d.style.display = '';
- btn3d.onclick = () => window.open(`/printvault-viewer.php?id=${id}`, '_blank', 'width=1200,height=800');
- } else {
- btn3d.style.display = 'none';
- }
-
- document.getElementById('pv-detail-dl-btn').href = `${API}?action=file&id=${id}`;
- document.getElementById('pv-detail-edit-btn').onclick = () => openEdit(m);
- document.getElementById('pv-detail-del-btn').onclick = () => deleteModel(id, m.name);
- document.getElementById('pv-detail-modal').classList.add('show');
-}
-
-async function deleteModel(id, name) {
- if (!confirm(`Supprimer "${name}" ?`)) return;
- try {
- await api('models', 'DELETE', null, '&id='+id);
- document.getElementById('pv-detail-modal').classList.remove('show');
- toast('Modèle supprimé');
- allModels = allModels.filter(m => m.id !== id);
- renderSidebar(); renderModels();
- } catch(e) { toast(e.message, 'error'); }
-}
-
-// ─── Edit ─────────────────────────────────────────────────────────────────────
-function openEdit(m) {
- document.getElementById('pv-detail-modal').classList.remove('show');
- document.getElementById('pv-edit-id').value = m.id;
- document.getElementById('pv-edit-name').value = m.name;
- document.getElementById('pv-edit-desc').value = m.description || '';
- document.getElementById('pv-edit-tags').value = m.tags || '';
- const sel = document.getElementById('pv-edit-cat');
- sel.innerHTML = categories.map(c => `