Mise à jour du fonctionnement de l'exercice TD Nuisibles
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
justify-content: center;
|
||||
padding: 2rem;
|
||||
padding-top: calc(70px + 2rem);
|
||||
padding-bottom: calc(52px + 2rem);
|
||||
opacity: 0;
|
||||
transition: opacity 0.4s ease;
|
||||
overflow-y: auto;
|
||||
@@ -51,31 +52,59 @@
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
/* BOTTOM BAR */
|
||||
.bottom-bar {
|
||||
position: fixed;
|
||||
bottom: 0; left: 0; right: 0;
|
||||
height: 52px;
|
||||
background: rgba(250, 238, 218, 0.98);
|
||||
border-top: 2px solid var(--amber);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 20px;
|
||||
z-index: 100;
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
/* SLIDE NAV */
|
||||
.slide-counter {
|
||||
position: fixed;
|
||||
bottom: 20px; right: 20px;
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
z-index: 100;
|
||||
font-family: 'Syne', sans-serif;
|
||||
font-weight: 600;
|
||||
color: var(--amber-dark);
|
||||
}
|
||||
|
||||
/* BACK BUTTON */
|
||||
.back-btn {
|
||||
position: fixed;
|
||||
bottom: 20px; left: 20px;
|
||||
background: none;
|
||||
border: 0.5px solid var(--border);
|
||||
border: 0.5px solid var(--amber);
|
||||
border-radius: 20px;
|
||||
padding: 6px 16px;
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
color: var(--amber-dark);
|
||||
cursor: pointer;
|
||||
z-index: 100;
|
||||
transition: all 0.2s;
|
||||
font-family: 'DM Sans', sans-serif;
|
||||
}
|
||||
.back-btn:hover { background: rgba(0,0,0,0.05); }
|
||||
.back-btn:hover { background: rgba(186,117,23,0.08); }
|
||||
|
||||
/* FORMATEUR SELECTOR */
|
||||
.formateur-btn {
|
||||
font-family: 'Syne', sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
padding: 10px 24px;
|
||||
border-radius: 30px;
|
||||
border: 1.5px solid var(--border);
|
||||
background: white;
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
flex: 1;
|
||||
}
|
||||
.formateur-btn:hover { border-color: var(--amber); color: var(--amber); }
|
||||
.formateur-btn.selected { background: var(--amber-light); border-color: var(--amber); color: var(--amber-dark); font-weight: 700; }
|
||||
|
||||
/* CARDS & BUTTONS */
|
||||
.btn {
|
||||
@@ -577,7 +606,7 @@
|
||||
/* SCROLLABLE AREA */
|
||||
.scroll-area {
|
||||
overflow-y: auto;
|
||||
max-height: calc(100vh - 180px);
|
||||
max-height: calc(100vh - 232px);
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -618,11 +647,11 @@
|
||||
<!-- Phase badge -->
|
||||
<div class="phase-badge" id="phaseBadge" style="display:none"></div>
|
||||
|
||||
<!-- Slide counter -->
|
||||
<div class="slide-counter" id="slideCounter"></div>
|
||||
|
||||
<!-- Back button -->
|
||||
<button class="back-btn" id="backBtn" onclick="goBack()" style="display:none">← Retour</button>
|
||||
<!-- Bottom bar -->
|
||||
<div class="bottom-bar" id="bottomBar" style="display:none;">
|
||||
<button class="back-btn" id="backBtn" onclick="goBack()" style="display:none;">← Retour</button>
|
||||
<div class="slide-counter" id="slideCounter"></div>
|
||||
</div>
|
||||
|
||||
<!-- Modal overlay -->
|
||||
<div class="modal-overlay" id="modalOverlay" onclick="closeModal(event)">
|
||||
@@ -650,6 +679,13 @@
|
||||
<label for="inputDate">Date de la session</label>
|
||||
<input type="date" id="inputDate">
|
||||
</div>
|
||||
<div class="id-field">
|
||||
<label>Formateur de la session</label>
|
||||
<div style="display:flex;gap:10px;margin-top:2px;">
|
||||
<button type="button" class="formateur-btn" id="btnNathan" onclick="selectFormateur('Nathan')">Nathan</button>
|
||||
<button type="button" class="formateur-btn" id="btnGauthier" onclick="selectFormateur('Gauthier')">Gauthier</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="idError" style="color:var(--coral);font-size:13px;margin-bottom:0.5rem;display:none;">Merci de renseigner au moins le nom du groupe.</div>
|
||||
<button class="btn btn-teal" onclick="confirmIdentite()">Continuer →</button>
|
||||
@@ -1103,10 +1139,8 @@
|
||||
</div>
|
||||
<div class="submit-zone">
|
||||
<div style="display:flex;gap:10px;justify-content:center;flex-wrap:wrap;">
|
||||
<button class="btn btn-teal" onclick="envoyerReponses()" id="btnEnvoyer">📤 Envoyer mes réponses au formateur</button>
|
||||
<button class="btn btn-outline btn-teal" onclick="exporterPDF()">⬇ Télécharger en PDF</button>
|
||||
<button class="btn btn-teal" onclick="exporterPDF()">⬇ Télécharger en PDF</button>
|
||||
</div>
|
||||
<div class="submit-status" id="submitStatus"></div>
|
||||
</div>
|
||||
<div style="display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:0.75rem;">
|
||||
<a href="https://biocid-anses.fr" target="_blank" class="btn btn-outline btn-teal" style="font-size:13px;padding:10px 20px;">biocid-anses.fr ↗</a>
|
||||
@@ -1121,7 +1155,7 @@ let history = [];
|
||||
const totalSlides = 13;
|
||||
|
||||
const selectedCase = { key: '', icon: '', title: '', desc: '' };
|
||||
const stagiaire = { nom: '', date: '' };
|
||||
const stagiaire = { nom: '', date: '', formateur: '' };
|
||||
|
||||
const hints = {
|
||||
prevention: {
|
||||
@@ -1233,6 +1267,9 @@ function updateUI() {
|
||||
const counter = document.getElementById('slideCounter');
|
||||
counter.textContent = currentSlide === 0 ? '' : currentSlide + ' / ' + totalSlides;
|
||||
|
||||
const bottomBar = document.getElementById('bottomBar');
|
||||
if (bottomBar) bottomBar.style.display = currentSlide === 0 ? 'none' : 'flex';
|
||||
|
||||
const backBtn = document.getElementById('backBtn');
|
||||
backBtn.style.display = history.length > 0 ? 'block' : 'none';
|
||||
|
||||
@@ -1316,6 +1353,13 @@ document.addEventListener('keydown', e => {
|
||||
if (e.key === 'Escape') closeModal();
|
||||
});
|
||||
|
||||
/* ======================== FORMATEUR ======================== */
|
||||
function selectFormateur(nom) {
|
||||
stagiaire.formateur = nom;
|
||||
document.querySelectorAll('.formateur-btn').forEach(b => b.classList.remove('selected'));
|
||||
document.getElementById('btn' + nom).classList.add('selected');
|
||||
}
|
||||
|
||||
/* ======================== IDENTIFICATION ======================== */
|
||||
function confirmIdentite() {
|
||||
const nom = document.getElementById('inputNom').value.trim();
|
||||
@@ -1366,6 +1410,7 @@ function collecterReponses() {
|
||||
return {
|
||||
nom: stagiaire.nom,
|
||||
date_session: stagiaire.date,
|
||||
formateur: stagiaire.formateur || '',
|
||||
cas_choisi: selectedCase.title || '',
|
||||
cas_cle: selectedCase.key || '',
|
||||
reponses: reponses,
|
||||
@@ -1455,6 +1500,7 @@ function exporterPDF() {
|
||||
<h1>TP Nuisibles — Certibiocide 2025</h1>
|
||||
<p class="meta"><strong>Groupe / Stagiaire :</strong> ${escapeHtml(data.nom)}</p>
|
||||
<p class="meta"><strong>Date de session :</strong> ${escapeHtml(data.date_session)}</p>
|
||||
<p class="meta"><strong>Formateur :</strong> ${escapeHtml(data.formateur)}</p>
|
||||
<p class="meta"><strong>Cas pratique :</strong> ${escapeHtml(data.cas_choisi)}</p>
|
||||
<h2>Réponses TP1 & TP2</h2>
|
||||
${lignes}
|
||||
|
||||
Reference in New Issue
Block a user