<!-- Modal Create/Edit Resultat Concours -->
<div class="modal-overlay">
    <div class="modal-content" style="max-width: 700px;">
        <div class="modal-header">
            <h2 id="modalTitle">Nouveau Résultat de Concours</h2>
            <button type="button" class="modal-close" onclick="closeModal()">&times;</button>
        </div>
        <div class="modal-body">
            <form id="resultForm">
                <input type="hidden" id="resultId" value="">

                <div class="form-group">
                    <label for="libelle">Libellé <span class="required">*</span></label>
                    <input type="text" id="libelle" name="libelle"
                           placeholder="Ex: EN COURS, ADMIS ORALE" required>
                </div>

                <div class="form-group">
                    <label for="code">Code <span class="required">*</span></label>
                    <input type="text" id="code" name="code"
                           placeholder="Ex: EN_COURS, ADMIS_ORALE" required>
                    <small class="form-text">Code unique en majuscules, sans espaces</small>
                </div>

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

                <div class="form-row">
                    <div class="form-group">
                        <label for="order_preparation_ecrit">Ordre Écrit</label>
                        <input type="number" id="order_preparation_ecrit" name="order_preparation_ecrit"
                               placeholder="Ex: 1, 2, 3..." min="0">
                    </div>
                    <div class="form-group">
                        <label for="badge_preparation_ecrit">Badge Écrit</label>
                        <select id="badge_preparation_ecrit" name="badge_preparation_ecrit">
                            <option value="">Aucun</option>
                            <option value="badge-warning">Warning</option>
                            <option value="badge-success">Success</option>
                            <option value="badge-danger">Danger</option>
                            <option value="badge-info">Info</option>
                            <option value="badge-primary">Primary</option>
                        </select>
                    </div>
                </div>

                <div class="form-row">
                    <div class="form-group">
                        <label for="order_preparation_orale">Ordre Oral</label>
                        <input type="number" id="order_preparation_orale" name="order_preparation_orale"
                               placeholder="Ex: 1, 2, 3..." min="0">
                    </div>
                    <div class="form-group">
                        <label for="badge_preparation_orale">Badge Oral</label>
                        <select id="badge_preparation_orale" name="badge_preparation_orale">
                            <option value="">Aucun</option>
                            <option value="badge-warning">Warning</option>
                            <option value="badge-success">Success</option>
                            <option value="badge-danger">Danger</option>
                            <option value="badge-info">Info</option>
                            <option value="badge-primary">Primary</option>
                        </select>
                    </div>
                </div>

                <div class="form-row">
                    <div class="form-group">
                        <label for="order_resultat_finale">Ordre Final</label>
                        <input type="number" id="order_resultat_finale" name="order_resultat_finale"
                               placeholder="Ex: 1, 2, 3..." min="0">
                    </div>
                    <div class="form-group">
                        <label for="badge_resultat_finale">Badge Final</label>
                        <select id="badge_resultat_finale" name="badge_resultat_finale">
                            <option value="">Aucun</option>
                            <option value="badge-warning">Warning</option>
                            <option value="badge-success">Success</option>
                            <option value="badge-danger">Danger</option>
                            <option value="badge-info">Info</option>
                            <option value="badge-primary">Primary</option>
                        </select>
                    </div>
                </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="saveResult()">
                        <i class="fas fa-save"></i> Enregistrer
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>