<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Simulateur du BFI</title>
    <link href="style.css" rel="stylesheet" type="text/css">
    <script src="calcul.js"></script>
</head>
<body onload="update()">
    <header>
        <a href="/">&larr; Retour vers le portail des simulations</a>
        <h1>Simulateur du BFI</h1>
    </header>
    <div class="resultat">
        <div>
            <span id="total-points"></span>
            <p>Points</p>
        </div>
        <div>
            <span id="total-coef"></span>
            <p>Coefficients</p>
        </div>
        <div>
            <span id="note-finale"></span>/20
            <p>Note finale</p>
        </div>
        <div>
            <span id="decision-jury"></span>
            <p>Décision</p>
        </div>
        <div>
            <span id="points-manquants"></span>
            <p>Points jusqu'à la<br>décision supérieure</p>
        </div>
    </div>
    <main>
        <div class="info">
        Information&nbsp;: Si le nombre de points jusqu'à la décision supérieure est faible (c'est-à-dire moins de 10 points environ),
            le jury peut vous les accorder sous réserve que votre livret scolaire soit bon (assiduité, bon comportement).
        </div>
        <div class="info">
            Information&nbsp;: Pour les notes empruntées au livret scolaire (i.e. moyenne de l'année),
            il faut arrondir la note au dixième à l'excès&nbsp;: par exemple, pour une moyenne annuelle de 16,54,
            il faut arrondir à 16,6.
        </div>

        <form onchange="update()" id="calculateur">
            <fieldset>
                <legend>Contrôle continu</legend>

                <table>
                    <tr>
                        <th rowspan="2">Matière</th>
                        <th colspan="3">Première</th>
                        <th colspan="3">Terminale</th>
                    </tr>
                    <tr>
                        <th>Coef.</th>
                        <th>Note</th>
                        <th>Points</th>
                        <th>Coef.</th>
                        <th>Note</th>
                        <th>Points</th>
                    </tr>
                    <tr>
                        <td>Enseignement moral et civique</td>
                        <td>1</td>
                        <td>
                            <label for="note-emc-1re">Note d'EMC de première</label>
                            <input type="number" name="note-emc-1re"
                                   id="note-emc-1re" class="note" min="0" max="20" step=".1" required>
                        </td>
                        <td>
                            <span id="points-emc-1re"></span>
                        </td>
                        <td>1</td>
                        <td>
                            <label for="note-emc-tle">Note d'EMC de terminale</label>
                            <input type="number" name="note-emc-tle"
                                   id="note-emc-tle" class="note" min="0" max="20" step=".1" required>
                        </td>
                        <td>
                            <span id="points-emc-tle"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Langue vivante B</td>
                        <td>3</td>
                        <td>
                            <label for="note-lvb-1re">Note de LVB de première</label>
                            <input type="number" name="note-lvb-1re"
                                   id="note-lvb-1re" class="note" min="0" max="20" step=".1" required>
                        </td>
                        <td>
                            <span id="points-lvb-1re"></span>
                        </td>
                        <td>3</td>
                        <td>
                            <label for="note-lvb-tle">Note de LVB de terminale</label>
                            <input type="number" name="note-lvb-tle"
                                   id="note-lvb-tle" class="note" min="0" max="20" step=".1" required>
                        </td>
                        <td>
                            <span id="points-lvb-tle"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Enseignement scientifique</td>
                        <td>3</td>
                        <td>
                            <label for="note-es-1re">Note d'enseignement scientifique de première</label>
                            <input type="number" name="note-es-1re"
                                   id="note-es-1re" class="note" min="0" max="20" step=".1" required>
                        </td>
                        <td>
                            <span id="points-es-1re"></span>
                        </td>
                        <td>3</td>
                        <td>
                            <label for="note-es-tle">Note d'enseignement scientifique de terminale</label>
                            <input type="number" name="note-es-1re"
                                   id="note-es-tle" class="note" min="0" max="20" step=".1" required>
                        </td>
                        <td>
                            <span id="points-es-tle"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Éducation physique et sportive</td>
                        <td colspan="3" class="null"></td>
                        <td>6</td>
                        <td>
                            <label for="note-eps-tle">Note d'EPS</label>
                            <input type="number" name="note-eps-tle"
                                   id="note-eps-tle" class="note" min="0" max="20" step="1" required>
                        </td>
                        <td>
                            <span id="points-eps-tle"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Spécialité 3 abandonnée</td>
                        <td>8</td>
                        <td>
                            <label for="note-spe3-1re">Note de spécialité abandonnée en classe de première</label>
                            <input type="number" name="note-spe3-1re"
                                   id="note-spe3-1re" class="note" min="0" max="20" step=".1" required>
                        </td>
                        <td>
                            <span id="points-spe3-1re"></span>
                        </td>
                        <td colspan="3" class="null"></td>
                    </tr>
                    <tr class="total">
                        <td>Totaux</td>
                        <td colspan="3">Total des coefficients&nbsp;: 28</td>
                        <td colspan="3">Total des points&nbsp;: <span id="total-points-CC">0</span></td>
                    </tr>
                </table>
            </fieldset>
            <fieldset>
                <legend>Épreuves terminales</legend>

                Remarque&nbsp;: Seules ces épreuves peuvent faire l'objet d'un éventuel rattrapage.

                <table>
                    <tr>
                        <th rowspan="2">Matière</th>
                        <th rowspan="2">Coef.</th>
                        <th colspan="2">1<sup>er</sup> groupe</th>
                    </tr>
                    <tr>
                        <th>Note</th>
                        <th>Points</th>
                    </tr>
                    <tr>
                        <td>Français écrit</td>
                        <td>5</td>
                        <td>
                            <label for="note-fr-ecrit">Note de français oral</label>
                            <input type="number" name="note-fr-ecrit"
                                   id="note-fr-ecrit" class="note" min="0" max="20" step="1" required>
                        </td>
                        <td>
                            <span id="points-fr-ecrit"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Français oral</td>
                        <td>5</td>
                        <td>
                            <label for="note-fr-oral">Note de français oral</label>
                            <input type="number" name="note-fr-oral"
                                   id="note-fr-oral" class="note" min="0" max="20" step="1" required>
                        </td>
                        <td>
                            <span id="points-fr-oral"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Philosophie</td>
                        <td>8</td>
                        <td>
                            <label for="note-philo">Note de philosophie</label>
                            <input type="number" name="note-philo"
                                   id="note-philo" class="note" min="0" max="20" step="1" required>
                        </td>
                        <td>
                            <span id="points-philo"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Épreuve orale terminale (Grand oral)</td>
                        <td>10</td>
                        <td>
                            <label for="note-go">Note du Grand Oral</label>
                            <input type="number" name="note-go"
                                   id="note-go" class="note" min="0" max="20" step="1" required>
                        </td>
                        <td>
                            <span id="points-go"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Spécialité 1</td>
                        <td>16</td>
                        <td>
                            <label for="note-spe1">Note de français oral</label>
                            <input type="number" name="note-spe1"
                                   id="note-spe1" class="note" min="0" max="20" step="1" required>
                        </td>
                        <td>
                            <span id="points-spe1"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Spécialité 2</td>
                        <td>16</td>
                        <td>
                            <label for="note-spe2">Note de français oral</label>
                            <input type="number" name="note-spe2"
                                   id="note-spe2" class="note" min="0" max="20" step="1" required>
                        </td>
                        <td>
                            <span id="points-spe2"></span>
                        </td>
                    </tr>
                    <tr class="total">
                        <td>Totaux</td>
                        <td>60</td>
                        <td></td>
                        <td><span id="total-points-terminal"></span></td>
                    </tr>
                </table>
            </fieldset>
            <fieldset>
                <legend>Épreuves spécifiques du BFI</legend>
                <table>
                    <tr>
                        <th rowspan="2">Matière</th>
                        <th rowspan="2">Coef.</th>
                        <th colspan="2">Terminale</th>
                    </tr>
                    <tr>
                        <th>Note</th>
                        <th>Points</th>
                    </tr>
                    <tr>
                        <td>Approfondissement culturel et linguistique - écrit</td>
                        <td>10</td>
                        <td>
                            <label for="note-acl-ecrit">Note d'approfondissement culturel et linguistique écrit</label>
                            <input type="number" name="note-acl-ecrit"
                                   id="note-acl-ecrit" class="note" min="0" max="20" step="1" required>
                        </td>
                        <td>
                            <span id="points-acl-ecrit"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Approfondissement culturel et linguistique - oral</td>
                        <td>10</td>
                        <td>
                            <label for="note-acl-oral">Note d'approfondissement culturel et linguistique oral</label>
                            <input type="number" name="note-acl-oral"
                                   id="note-acl-oral" class="note" min="0" max="20" step="1" required>
                        </td>
                        <td>
                            <span id="points-acl-oral"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Histoire-géographie en langue de section - écrit</td>
                        <td>10</td>
                        <td>
                            <label for="note-hg-ecrit">Note d'histoire-géographie en langue de section - écrit</label>
                            <input type="number" name="note-hg-ecrit"
                                   id="note-hg-ecrit" class="note" min="0" max="20" step="1" required>
                        </td>
                        <td>
                            <span id="points-hg-ecrit"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Histoire-géographie en langue de section - oral</td>
                        <td>10</td>
                        <td>
                            <label for="note-hg-oral">Note d'histoire-géographie en langue de section - oral</label>
                            <input type="number" name="note-hg-oral"
                                   id="note-hg-oral" class="note" min="0" max="20" step="1" required>
                        </td>
                        <td>
                            <span id="points-hg-oral"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Connaissance du monde</td>
                        <td>20</td>
                        <td>
                            <label for="note-cdm">Note de connaissance du monde</label>
                            <input type="number" name="note-cdm"
                                   id="note-cdm" class="note" min="0" max="20" step="1" required>
                        </td>
                        <td>
                            <span id="points-cdm"></span>
                        </td>
                    </tr>
                    <tr class="total">
                        <td>Totaux</td>
                        <td>60</td>
                        <td></td>
                        <td><span id="total-points-specifique"></span></td>
                    </tr>
                </table>
            </fieldset>
            <fieldset>
                <legend>Option(s)</legend>
                <table>
                    <tr>
                        <th rowspan="2">Matière</th>
                        <th colspan="4">Première</th>
                        <th colspan="4">Terminale</th>
                    </tr>
                    <tr>
                        <th>?</th>
                        <th>Coef.</th>
                        <th>Note</th>
                        <th>Points</th>
                        <th>?</th>
                        <th>Coef.</th>
                        <th>Note</th>
                        <th>Points</th>
                    </tr>
                    <tr>
                        <td>Langues et cultures de l'Antiquité</td>
                        <td><input type="checkbox" name="check-lca-1re" id="check-lca-1re"></td>
                        <td id="coef-lca-1re">2</td>
                        <td>
                            <label for="note-lca-1re">Note de langues et cultures de l'Antiquité - première</label>
                            <input type="number" name="note-lca-1re"
                                   id="note-lca-1re" class="note" min="0" max="20" step=".1">
                        </td>
                        <td>
                            <span id="points-lca-1re"></span>
                        </td>
                        <td><input type="checkbox" name="check-lca-tle" id="check-lca-tle"></td>
                        <td id="coef-lca-tle">2</td>
                        <td>
                            <label for="note-lca-tle">Note d'option suivie au cours du cycle terminal - terminale</label>
                            <input type="number" name="note-lca-tle"
                                   id="note-lca-tle" class="note" min="0" max="20" step=".1">
                        </td>
                        <td>
                            <span id="points-lca-tle"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Option suivie au cours du cycle terminal (ex: Arts/LV3)</td>
                        <td><input type="checkbox" name="check-opt1-1re" id="check-opt1-1re"></td>
                        <td id="coef-opt1-1re">2</td>
                        <td>
                            <label for="note-opt1-1re">Note d'option suivie au cours du cycle terminal - première</label>
                            <input type="number" name="note-opt1-1re"
                                   id="note-opt1-1re" class="note" min="0" max="20" step=".1">
                        </td>
                        <td>
                            <span id="points-opt1-1re"></span>
                        </td>
                        <td><input type="checkbox" name="check-opt1-tle" id="check-opt1-tle"></td>
                        <td id="coef-opt1-tle">2</td>
                        <td>
                            <label for="note-opt1-tle">Note d'option suivie au cours du cycle terminal - terminale</label>
                            <input type="number" name="note-opt1-tle"
                                   id="note-opt1-tle" class="note" min="0" max="20" step=".1">
                        </td>
                        <td>
                            <span id="points-opt1-tle"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Option suivie uniquement en classe de Terminale (ex: Maths/DGEMC)</td>
                        <td colspan="4" class="null"></td>
                        <td><input type="checkbox" name="check-opt2" id="check-opt2"></td>
                        <td id="coef-opt2">2</td>
                        <td>
                            <label for="note-opt2">Note d'option suivie uniquement en classe de Terminale</label>
                            <input type="number" name="note-opt2"
                                   id="note-opt2" class="note" min="0" max="20" step=".1">
                        </td>
                        <td>
                            <span id="points-opt2"></span>
                        </td>
                    </tr>
                    <tr class="total">
                        <td>Totaux</td>
                        <td colspan="4">Total des coefficients : <span id="total-coef-options">-</span></td>
                        <td colspan="4">Total des points : <span id="total-points-options">-</span></td>
                    </tr>
                </table>
            </fieldset>
        </form>
    </main>

    <footer>
        &copy; Valentin Moguérou 2023 - Licence GNU AGPL v3 - <a href="https://git.kaz.bzh/valentin/simulation.wikibac.fr" target="_blank">Code source</a>
    </footer>
</body>
</html>