<!-- Modal Create/Edit MIME Type -->
<div class="modal-overlay">
    <div class="modal-content" style="max-width: 600px;">
        <div class="modal-header">
            <h2 id="modalTitle">Nouveau Type MIME</h2>
            <button type="button" class="modal-close" onclick="closeModal()">&times;</button>
        </div>
        <div class="modal-body">
            <form id="mimeForm">
                <input type="hidden" id="mimeId" value="">

                <div class="form-group">
                    <label for="libelle">Libellé <span class="required">*</span></label>
                    <input type="text" id="libelle" name="libelle"
                           placeholder="Ex: PDF, JPEG Image, PNG Image..." required>
                </div>

                <div class="form-group">
                    <label for="code">Code <span class="required">*</span></label>
                    <input type="text" id="code" name="code"
                           placeholder="Ex: application/pdf, image/jpeg..." required>
                    <small class="form-text">Code MIME standard (ex: application/pdf, image/jpeg)</small>
                </div>

                <div class="form-group">
                    <label for="badge">Badge <span class="required">*</span></label>
                    <select id="badge" name="badge" required>
                        <option value="">Sélectionner un badge</option>
                        <option value="primary">🔵 Primary</option>
                        <option value="secondary">⚪ Secondary</option>
                        <option value="success">🟢 Success</option>
                        <option value="danger">🔴 Danger</option>
                        <option value="warning">🟡 Warning</option>
                        <option value="info">🔷 Info</option>
                        <option value="dark">⚫ Dark</option>
                    </select>
                    <small class="form-text">Couleur du badge affiché dans le tableau</small>
                </div>

                <div class="form-group">
                    <label for="description">Description</label>
                    <textarea id="description" name="description"
                              rows="4" placeholder="Description détaillée du type MIME..."></textarea>
                </div>

                <div class="form-actions">
                    <button type="button" class="btn btn-secondary" onclick="closeModal()">
                        <i class="fas fa-times"></i> Annuler
                    </button>
                    <button type="button" class="btn btn-primary" onclick="saveMimeType()">
                        <i class="fas fa-save"></i> Enregistrer
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>