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

                <div class="form-group">
                    <label for="libelle">Libellé <span class="required">*</span></label>
                    <input type="text" id="libelle" name="libelle"
                           placeholder="Ex: Demande de stage" required>
                </div>

                <div class="form-group">
                    <label for="code">Code <span class="required">*</span></label>
                    <input type="text" id="code" name="code"
                           placeholder="Ex: STG" required>
                    <small class="form-text">Code unique identifiant le type de document (3 lettres recommandées)</small>
                </div>

                <div class="form-group">
                    <label for="description">Description</label>
                    <textarea id="description" name="description"
                              rows="3" placeholder="Description du type de document..."></textarea>
                </div>

                <div class="form-group">
                    <label for="template_document">Template</label>
                    <input type="text" id="template_document" name="template_document"
                           placeholder="Ex: Template_stage.pdf">
                    <small class="form-text">Nom du fichier template associé</small>
                </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="saveTypeDocument()">
                        <i class="fas fa-save"></i> Enregistrer
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>