/* LabExao — labo ExAO virtuel — Licence AGPLv3 */
:root {
  --fond: #eef2f6;
  --carte: #ffffff;
  --bord: #dfe6ec;
  --texte: #1f2a36;
  --doux: #66727f;
  --accent: #2f6fde;
  --accent-clair: #e7efff;
  --rec: #e0413a;
  --ok: #1f9d6b;
  --rayon: 14px;
  --ombre: 0 1px 2px rgba(25, 40, 60, .06), 0 4px 16px rgba(25, 40, 60, .06);
  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--police); color: var(--texte); background: var(--fond);
  font-size: 15px; line-height: 1.4; -webkit-tap-highlight-color: transparent;
}
button, select, input, textarea { font: inherit; color: inherit; }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--doux); margin: 0 0 8px; font-weight: 650; }
[hidden] { display: none !important; }

/* ---------- entête ---------- */
.entete {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px 20px; background: var(--carte); border-bottom: 1px solid var(--bord);
  position: sticky; top: 0; z-index: 20;
}
.marque { display: flex; align-items: center; gap: 10px; }
.logo { width: 38px; height: 38px; }
.marque h1 { font-size: 20px; margin: 0; letter-spacing: -.01em; }
.marque p { margin: 0; font-size: 12px; color: var(--doux); }
.choix-activite { display: flex; align-items: center; gap: 8px; margin-left: 12px; }
.choix-activite span { font-size: 13px; color: var(--doux); }
.choix-activite select { min-width: 280px; }
.actions-entete { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- disposition ---------- */
.disposition {
  display: grid; grid-template-columns: minmax(400px, 5fr) 7fr; gap: 16px;
  padding: 16px; max-width: 1700px; margin: 0 auto;
}
.colonne { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); }
@media (max-width: 1050px) { .disposition { grid-template-columns: 1fr; } .choix-activite select { min-width: 0; } }

/* ---------- contrôles ---------- */
.btn {
  border: 1px solid var(--bord); background: #f7f9fb; border-radius: 10px; padding: 8px 14px;
  cursor: pointer; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap;
}
.btn:hover:not(:disabled) { background: #eef2f6; border-color: #cdd6de; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-fantome { background: transparent; border-color: transparent; }
.btn-fantome:hover { background: #f0f3f6 !important; }
.btn-rond { width: 38px; height: 38px; padding: 0; border-radius: 50%; font-weight: 700; }
.btn-petit { padding: 6px 10px; font-size: 13.5px; }
.btn-petit.actif { background: var(--accent-clair); border-color: #b9cdf6; color: #1d4fb0; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-accent:hover:not(:disabled) { background: #245ec4 !important; border-color: #245ec4 !important; }
.btn-rec { background: var(--rec); border-color: var(--rec); color: #fff; font-weight: 650; padding: 10px 18px; }
.btn-rec:hover:not(:disabled) { background: #c8342e !important; border-color: #c8342e !important; }
.btn-stop { background: #2a3440; border-color: #2a3440; color: #fff; font-weight: 600; padding: 10px 16px; }
.btn-stop:hover { background: #1b232c !important; }

select, input[type=text], input[type=number], textarea {
  border: 1px solid var(--bord); border-radius: 9px; padding: 7px 10px; background: #fff;
}
select:focus, input:focus, textarea:focus, .btn:focus-visible, [tabindex]:focus-visible { outline: 3px solid #b9cdf6; outline-offset: 1px; }
.champ { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--doux); }
.champ select, .champ input { color: var(--texte); }
.ligne { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ligne.fin { justify-content: flex-end; margin-top: 16px; }
.espace { flex: 1; }

.segmente { display: inline-flex; background: #f0f3f6; border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmente button {
  border: 0; background: transparent; padding: 6px 11px; border-radius: 8px; cursor: pointer; font-size: 13.5px; color: #3c4855;
  display: inline-flex; align-items: center; gap: 6px;
}
.segmente button:hover { background: #e5eaef; }
.segmente button.actif { background: #fff; color: var(--texte); font-weight: 600; box-shadow: 0 1px 3px rgba(20, 35, 55, .15); }
.segmente i { width: 11px; height: 11px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0, 0, 0, .2); }

.interrupteur { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.interrupteur input { position: absolute; opacity: 0; pointer-events: none; }
.interrupteur span { width: 42px; height: 24px; border-radius: 12px; background: #cfd7de; position: relative; transition: background .2s; flex: none; }
.interrupteur span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s; }
.interrupteur input:checked + span { background: var(--ok); }
.interrupteur input:checked + span::after { transform: translateX(18px); }
.interrupteur input:focus-visible + span { outline: 3px solid #b9cdf6; }

input[type=range] { accent-color: var(--accent); width: 140px; }
.champ-curseur { margin: 10px 0 8px; display: flex; flex-wrap: wrap; }
.champ-curseur output { font-weight: 600; color: var(--texte); min-width: 3em; }

/* ---------- consignes ---------- */
.consignes { padding: 4px 16px 12px; border-left: 4px solid var(--accent); }
.consignes summary { cursor: pointer; font-weight: 700; padding: 10px 0 6px; }
.probleme { margin: 4px 0 10px; font-style: italic; color: #34414f; background: #f5f8fc; padding: 8px 12px; border-radius: 8px; }
.etapes { margin: 0; padding: 0; list-style: none; counter-reset: e; }
.etapes li { display: flex; gap: 10px; padding: 5px 0; font-size: 14px; align-items: flex-start; }
.etapes .coche {
  flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c6d0d9; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fff; margin-top: -1px; transition: all .25s;
}
.etapes li.fait { color: var(--doux); }
.etapes li.fait .coche { background: var(--ok); border-color: var(--ok); }

/* ---------- paillasse ---------- */
.carte-paillasse { overflow: hidden; }
.paillasse svg { display: block; width: 100%; height: auto; }
.conseil { margin: 0; padding: 10px 16px; font-size: 14px; border-top: 1px solid var(--bord); background: #fafcfd; color: #3a4654; }
.conseil.rec { color: #b42d27; background: #fff6f5; }

.svg-paillasse [data-action] { cursor: pointer; }
.svg-paillasse [data-action]:focus { outline: none; }
.svg-paillasse [data-action]:hover { filter: brightness(1.06); }
.sonde { transition: transform .45s cubic-bezier(.3, .8, .3, 1); }
.sonde:hover rect:nth-of-type(5) { filter: brightness(1.4); }
.etiquette-sonde { font: 600 11px var(--police); fill: #3c4855; }
.sonde.branchee .etiquette-sonde { opacity: 0; }
.console-titre { font: 700 10px var(--police); letter-spacing: .14em; fill: #9fb0c2; }
.lcd { font: 600 16px ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; fill: #7dffb0; }
.lcd-label { font: 600 12px var(--police); fill: #cfd8e2; }
.lcd-unite { font: 10px var(--police); fill: #8696a6; }
.lcd-petit { font: 600 11.5px ui-monospace, Menlo, Consolas, monospace; fill: #7dffb0; }
.legende-bas { font: 600 11px var(--police); fill: #4f5d6b; letter-spacing: .02em; }
.etiquette-flacon { font: 700 9.5px var(--police); fill: #33404d; }
.micro { font: 9px var(--police); fill: #8492a0; }
.txt-vide { font: 600 13px var(--police); fill: #7b8a99; }
#cables { transition: opacity .3s; }
.flacon .halo { fill: none; stroke: var(--accent); stroke-width: 2.5; opacity: 0; transition: opacity .2s; }
.flacon.choisi .halo { opacity: 1; }
.svg-paillasse.acquisition #led-acq { fill: #ff4b42; animation: clignote 1s steps(2) infinite; }
@keyframes clignote { 50% { opacity: .2; } }

#particules circle { fill: rgba(80, 60, 20, .35); opacity: 0; }
#particules.visibles circle { opacity: 1; }
#particules.chlorelles circle { fill: rgba(20, 70, 10, .45); }
.svg-paillasse.agitation #particules circle { animation: tourbillon 3s ease-in-out infinite alternate; }
@keyframes tourbillon { from { transform: translateX(-8px); } to { transform: translateX(8px); } }
#barreau { transform-box: fill-box; transform-origin: center; }
.svg-paillasse.agitation #barreau { animation: barreau .35s linear infinite; }
@keyframes barreau { 0% { transform: scaleX(1); } 25% { transform: scaleX(.15); } 50% { transform: scaleX(1); } 75% { transform: scaleX(.15); } }
.svg-paillasse.agitation #surface { animation: vague 1.2s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes vague { from { transform: scaleY(1); } to { transform: scaleY(2.4); } }
#faisceau { transition: opacity .4s, fill .3s; mix-blend-mode: multiply; }
#seringue.injecte { animation: seringue 3.6s ease-in-out; }
#seringue.injecte #piston { animation: piston 3.6s ease-in-out; }
#seringue.injecte #seringue-liquide { animation: vidange 3.6s ease-in-out; transform-box: fill-box; transform-origin: bottom; }
@keyframes seringue { 0% { opacity: 0; transform: translateY(-40px); } 14% { opacity: 1; transform: translateY(0); } 86% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-40px); } }
@keyframes piston { 0%, 22% { transform: translateY(0); } 74%, 100% { transform: translateY(36px); } }
@keyframes vidange { 0%, 22% { transform: scaleY(1); } 74%, 100% { transform: scaleY(.05); } }
.goutte { animation: goutte 2s ease-out forwards; opacity: 0; }
@keyframes goutte { 0% { opacity: .9; transform: translateY(0); } 100% { opacity: 0; transform: translateY(60px); } }

/* ---------- réglages ---------- */
.reglages { padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.bloc-deux { display: grid; grid-template-columns: 1fr 1.6fr; gap: 16px; }
@media (max-width: 520px) { .bloc-deux { grid-template-columns: 1fr; } }
.cartes-materiel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.materiel {
  display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 11px; border-radius: 11px;
  border: 1.5px solid var(--bord); background: #fff; cursor: pointer; font-size: 13.5px; transition: all .15s;
}
.materiel:hover:not(:disabled) { border-color: #b9cdf6; background: #f8fbff; }
.materiel.actif { border-color: var(--accent); background: var(--accent-clair); font-weight: 600; }
.materiel:disabled { opacity: .45; cursor: not-allowed; }
.pastille-mat { width: 22px; height: 22px; border-radius: 6px; background: var(--c); border: 1px solid rgba(0, 0, 0, .15); flex: none; }
.ligne-injection { gap: 8px; }
.clignote { animation: flash 1.2s ease 2; border-radius: 10px; }
@keyframes flash { 50% { box-shadow: 0 0 0 4px #b9cdf6; background: #f3f7ff; } }

/* ---------- acquisition ---------- */
.barre-acq { padding: 12px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.champs-acq { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.pilotage { display: flex; align-items: center; gap: 10px; }
.chrono { font: 700 22px ui-monospace, Menlo, Consolas, monospace; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; width: 132px; }
.chrono small { font-size: 13px; color: var(--doux); font-weight: 500; }
.progression { width: 100%; height: 4px; background: #e6ebf0; border-radius: 2px; overflow: hidden; }
.progression div { height: 100%; background: var(--rec); width: 0; transition: width .2s linear; }
body.en-acquisition .chrono span { color: var(--rec); }

/* ---------- graphique ---------- */
.carte-graphe { padding: 12px 14px 12px; }
.outils { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.champ-pente { display: none; }
.champ-pente.visible { display: inline-flex; }
.astuce { margin: 8px 2px 6px; font-size: 12.5px; color: var(--doux); min-height: 1.4em; }
.zone-graphe { position: relative; }
#graphe { display: block; width: 100%; height: clamp(320px, 54vh, 600px); touch-action: none; border-radius: 10px; }
#graphe[data-outil=pente], #graphe[data-outil=zoom] { cursor: col-resize; }
#graphe[data-outil=note] { cursor: copy; }
#graphe[data-outil=lecture], #graphe:not([data-outil]) { cursor: crosshair; }
.saisie-note { position: absolute; width: 250px; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); border-color: #d9b44a !important; background: #fffbe6 !important; }
.filtres-graphe { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--bord); }
.grandeurs, .essais { display: flex; gap: 6px; flex-wrap: wrap; }
.grandeurs:not(:empty)::after { content: ""; width: 1px; background: var(--bord); margin: 0 4px; }
.puce-g {
  border: 1.5px solid var(--bord); background: #fff; border-radius: 20px; padding: 5px 12px; cursor: pointer;
  font-size: 13px; display: inline-flex; align-items: center; gap: 7px; color: var(--doux);
}
.puce-g i { width: 14px; height: 3px; border-radius: 2px; background: #c3ccd5; }
.puce-g.actif { border-color: var(--c); color: var(--texte); font-weight: 600; }
.puce-g.actif i { background: var(--c); }
.essai {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 20px; cursor: pointer;
  border: 1.5px solid var(--bord); font-size: 13px; background: #fff; color: var(--doux); user-select: none;
}
.essai i { width: 10px; height: 10px; border-radius: 50%; background: #c3ccd5; }
.essai.actif { border-color: var(--c); color: var(--texte); background: color-mix(in srgb, var(--c) 7%, #fff); }
.essai.actif i { background: conic-gradient(var(--c) 0 34%, var(--c2) 34% 67%, var(--c3) 67% 100%); }
.essai.actif i.neutre { background: #3a4654; }
.essai.rec .nom::after { content: " ●"; color: var(--rec); animation: clignote 1s steps(2) infinite; }
.essai button { border: 0; background: transparent; cursor: pointer; width: 24px; height: 24px; border-radius: 50%; color: var(--doux); padding: 0; }
.essai button:hover { background: #e9eef3; color: var(--texte); }

/* ---------- onglets ---------- */
.onglets { overflow: hidden; }
.barre-onglets { display: flex; border-bottom: 1px solid var(--bord); background: #fafcfd; overflow-x: auto; }
.barre-onglets button {
  border: 0; background: transparent; padding: 12px 16px; cursor: pointer; font-size: 14px; color: var(--doux);
  border-bottom: 2.5px solid transparent; white-space: nowrap;
}
.barre-onglets button.actif { color: var(--texte); font-weight: 650; border-bottom-color: var(--accent); }
.pastille { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: #e6ebf0; font-size: 12px; text-align: center; margin-left: 4px; }
.panneau { padding: 14px 16px; }
.vide { color: var(--doux); font-size: 14px; padding: 6px 0; }
.tableau { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tableau th { text-align: left; font-size: 12px; color: var(--doux); font-weight: 650; padding: 6px 8px; border-bottom: 1.5px solid var(--bord); position: sticky; top: 0; background: #fff; }
.tableau td { padding: 6px 8px; border-bottom: 1px solid #eef2f5; vertical-align: top; }
.tableau td.valeur { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tableau .suppr { border: 0; background: transparent; cursor: pointer; color: var(--doux); font-size: 16px; border-radius: 50%; width: 26px; height: 26px; }
.tableau .suppr:hover { background: #fde8e7; color: var(--rec); }
.rond { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.defile { max-height: 320px; overflow: auto; margin-top: 10px; border: 1px solid var(--bord); border-radius: 10px; }
#tableau-valeurs td { font-variant-numeric: tabular-nums; }
.questions { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.question > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.question textarea { width: 100%; resize: vertical; min-height: 64px; line-height: 1.45; }

/* ---------- toasts & dialogues ---------- */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; align-items: center; pointer-events: none; }
.toast { background: #24303c; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); animation: entree .25s ease; max-width: 90vw; }
.toast.alerte { background: #b8461f; }
.toast.sort { opacity: 0; transform: translateY(8px); transition: all .4s; }
@keyframes entree { from { opacity: 0; transform: translateY(10px); } }
.dialogue { border: 0; border-radius: 16px; padding: 22px 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); max-width: min(520px, 92vw); }
.dialogue-large { max-width: min(680px, 92vw); }
.dialogue::backdrop { background: rgba(20, 30, 40, .35); backdrop-filter: blur(2px); }
.dialogue h2 { margin: 0 0 14px; font-size: 19px; }
.echelle { border: 1px solid var(--bord); border-radius: 10px; margin: 0 0 10px; padding: 8px 12px 12px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.echelle legend { font-weight: 650; font-size: 14px; padding: 0 4px; }
.echelle input[type=number] { width: 90px; }
.aide { padding-left: 20px; line-height: 1.55; }
.aide li { margin-bottom: 6px; }
.petit { font-size: 13px; color: var(--doux); }

/* ---------- impression ---------- */
.impression { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; }
  body > *:not(.impression) { display: none !important; }
  .impression { display: block; font-size: 11.5pt; }
  .impression header { border-bottom: 2px solid #222; margin-bottom: 8px; }
  .impression h1 { font-size: 17pt; margin: 0 0 4px; }
  .impression h2 { font-size: 12.5pt; margin: 14px 0 6px; }
  .impression header p { margin: 2px 0; }
  .impression img { width: 100%; border: 1px solid #ccc; margin-top: 6px; }
  .impression .rep { break-inside: avoid; margin-bottom: 8px; }
  .impression .q { font-weight: 700; margin-bottom: 2px; }
  .impression .vide { color: #999; }
  .impression table { font-size: 10pt; }
  .impression footer { margin-top: 16px; font-size: 9pt; color: #777; }
}
#question-saisie { width: 100%; margin-top: 4px; }
#question-txt { margin: 0 0 10px; font-size: 15px; }
.ralenti-badge { font: 600 11px var(--police); color: #b05a12; background: #fff1e3; border-radius: 6px; padding: 1px 6px; margin-left: 6px; }

/* ================= 0.2 : modes professeur / élève ================= */
body.mode-eleve .seulement-prof, body.mode-eleve .nav-prof { display: none !important; }
body:not(.mode-eleve) .seulement-eleve { display: none !important; }
.titre-seance { display: flex; flex-direction: column; margin-left: 12px; line-height: 1.2; }
.titre-seance span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--doux); }
.titre-seance b { font-size: 16px; }
.nav-prof { display: flex; gap: 4px; background: #f0f3f6; padding: 3px; border-radius: 11px; }
.nav-prof button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; cursor: pointer; font-size: 14px; color: #3c4855; white-space: nowrap; }
.nav-prof button:hover { background: #e5eaef; }
.nav-prof button.actif { background: #fff; color: var(--texte); font-weight: 650; box-shadow: 0 1px 3px rgba(20, 35, 55, .15); }
body[data-vue=preparer] .choix-activite, body[data-vue=corriger] .choix-activite,
body[data-vue=preparer] #btn-ouvrir, body[data-vue=corriger] #btn-ouvrir,
body[data-vue=preparer] #btn-enregistrer, body[data-vue=corriger] #btn-enregistrer,
body[data-vue=preparer] #btn-nouvelle, body[data-vue=corriger] #btn-nouvelle { display: none; }

.vue-page { padding: 16px; }
.page { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.page-carte { padding: 18px 22px; }
.page-carte h2 { margin: 0 0 6px; font-size: 20px; }
.page-carte h3 { margin: 22px 0 10px; }
.grille-prep { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; margin-top: 12px; }
@media (max-width: 760px) { .grille-prep { grid-template-columns: 1fr; } }
.champ-bloc { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--doux); }
.champ-bloc select, .champ-bloc textarea { color: var(--texte); width: 100%; }
.cases { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 8px; font-size: 14px; align-items: center; }
.case { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.case input { width: 17px; height: 17px; accent-color: var(--accent); }
.t-questions td { vertical-align: middle; }
.t-questions td:first-child { width: 30px; }
.t-questions input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.t-questions input[type=number] { width: 70px; }
.t-questions select { max-width: 230px; font-size: 13px; }
.t-questions tr.off td:not(:first-child) { opacity: .4; }
.type-q { display: block; color: var(--doux); font-size: 12px; margin-top: 2px; }
.lien-cree { margin-top: 14px; padding: 14px 16px; background: #eefaf3; border: 1px solid #b5e3c8; border-radius: 12px; }
.lien-cree textarea { width: 100%; font: 12.5px ui-monospace, Menlo, Consolas, monospace; margin: 6px 0 10px; }
.actions-seance { white-space: nowrap; }
code { font: 600 13px ui-monospace, Menlo, Consolas, monospace; background: #f0f3f6; padding: 1px 6px; border-radius: 5px; }

.depot { margin: 12px 0; border: 2px dashed #c6d0d9; border-radius: 12px; padding: 18px; text-align: center; color: var(--doux); font-size: 14px; transition: all .15s; }
.depot.survol { border-color: var(--accent); background: var(--accent-clair); color: var(--accent); }
.defile-large { overflow-x: auto; margin: 10px 0; }
.t-copies td, .t-copies th { white-space: nowrap; }
.t-copies tr.ouverte td { background: #f3f7ff; }
.niv { text-align: center; font-weight: 700; border-radius: 6px; }
.t-copies tr td.niv-4 { color: #fff; background: #1f9d55; } .t-copies tr td.niv-3 { color: #fff; background: #7cb342; }
.t-copies tr td.niv-2 { color: #5c3d00; background: #ffd166; } .t-copies tr td.niv-1 { color: #fff; background: #e0533d; }
.a-corriger { color: #b05a12; font-weight: 600; }
.alerte-txt { color: #b8461f; font-weight: 600; }
.detail-copie .redac { border-top: 1px solid var(--bord); padding: 12px 0; }
.detail-copie .q { margin: 0 0 6px; }
.rep-eleve { background: #f6f8fa; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; white-space: normal; line-height: 1.5; }
.detail-copie input[type=number] { width: 70px; }
.verdict-ok { color: #1f7a45; font-weight: 700; white-space: nowrap; } .verdict-demi { color: #b05a12; font-weight: 700; white-space: nowrap; } .verdict-ko { color: #c0392b; font-weight: 700; white-space: nowrap; }

/* compte rendu élève */
.partie { border: 1px solid var(--bord); border-radius: 12px; padding: 12px 16px 14px; }
.partie h3 { display: flex; align-items: baseline; gap: 8px; color: var(--texte); font-size: 13px; }
.sur { font-weight: 700; color: var(--accent); }
.bareme { margin: 0; font-size: 13.5px; color: var(--doux); }
.q-auto { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-bottom: 1px solid #eef2f5; }
.q-auto:last-of-type { border-bottom: 0; }
.q-auto > span { font-weight: 600; font-size: 14px; }
.q-auto select { max-width: 100%; align-self: flex-start; }
.pts { font-style: normal; font-weight: 500; color: var(--doux); font-size: 12.5px; }
.champ-nombre { display: inline-flex; align-items: center; gap: 8px; }
.champ-nombre input { width: 110px; }
.aide-q { color: var(--doux); font-size: 12px; }
.correction-q { font-size: 13px; color: #3c4855; }
.verdict { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 13px; margin-right: 4px; }
.verdict.ok { background: var(--ok); } .verdict.demi { background: #d98a0b; } .verdict.ko { background: var(--rec); }
.note-a { margin-top: 10px; padding: 10px 14px; border-radius: 10px; background: #eefaf3; color: #1f6f45; font-size: 15px; }
.note-a.cachee { background: #f3f5f8; color: #3c4855; font-size: 14px; }
.partie-rendu { background: #fffaf3; border-color: #f3dcc0; }
.code-note { font: 700 15px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; }
.pastille.note { background: var(--accent-clair); color: var(--accent); font-weight: 700; }
.consigne-prof { margin: 4px 0 10px; padding: 8px 12px; border-radius: 8px; background: #fff7e6; border-left: 3px solid #d98a0b; font-size: 14px; }
.erreur-lien { max-width: 560px; margin: 12vh auto; padding: 28px; background: #fff; border-radius: 16px; box-shadow: var(--ombre); text-align: center; font-family: var(--police); }

/* 0.2.5 : collège */
.svg-paillasse.milieu-air #barreau { display: none; }
#bulles-photo circle { fill: #ffffff; fill-opacity: .85; stroke: #9cc7d8; stroke-width: .5; opacity: 0; }
.svg-paillasse.photo #bulles-photo circle { animation: bulle-photo 4s linear infinite; }
@keyframes bulle-photo { 0% { opacity: 0; transform: translateY(0); } 10% { opacity: .9; } 85% { opacity: .9; } 100% { opacity: 0; transform: translateY(-48px); } }

/* 0.3.0 : 1re spécialité — vitesses initiales */
.vf-grille { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 10px; }
#vf-table td { white-space: nowrap; }
.vf-grille .defile { margin-top: 0; }
#vf-canvas { width: 100%; height: 340px; border: 1px solid var(--bord); border-radius: 10px; }
.vf-x { width: 80px; }
#vf-table tr.off td:not(:first-child) { opacity: .4; }
#vf-table input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); }

/* 0.4.0 : labo libre du professeur — matériel rangé par niveau */
#materiels.groupes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.groupe-mat { border: 1px solid var(--bord); border-radius: 11px; padding: 0 10px; background: #fbfcfd; }
.groupe-mat[open] { padding-bottom: 10px; }
.groupe-mat summary { cursor: pointer; padding: 9px 2px; font-weight: 650; font-size: 13.5px; color: #3c4855; }
.groupe-mat summary small { font-weight: 500; color: var(--doux); background: #eef2f5; border-radius: 10px; padding: 0 7px; margin-left: 4px; }
.groupe-mat .cartes-materiel { margin-bottom: 0; }
#volumes { flex-wrap: wrap; }
.interrupteur.inactif { opacity: .45; cursor: not-allowed; }
.svg-paillasse.milieu-air #agitateur { cursor: not-allowed; opacity: .75; }

/* 0.5.1 : webapp */
.reprendre { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--bord); border-radius: 14px; padding: 10px 12px 10px 16px; box-shadow: 0 10px 30px rgba(20, 35, 55, .2); max-width: 94vw; }
@media (display-mode: standalone) { .entete { padding-top: max(10px, env(safe-area-inset-top)); } }

/* 0.6.0 : protocole conçu par l'élève */
.protocole-eleve { padding: 4px 16px 14px; border-left: 4px solid #d98a0b; }
.protocole-eleve summary { cursor: pointer; font-weight: 700; padding: 10px 0 6px; display: flex; align-items: baseline; gap: 8px; }
.protocole-eleve .etat-proto { margin-left: auto; font-weight: 600; font-size: 13px; color: var(--doux); }
.cases-p { display: flex; flex-direction: column; gap: 4px; }
.cases-p .case input { width: 17px; height: 17px; accent-color: var(--accent); }
.cases-p .case.attendu { color: #1f7a45; font-weight: 600; }
.cases-p .case.en-trop { color: #c0392b; text-decoration: line-through; }
.verrou { position: relative; pointer-events: none; user-select: none; }
.verrou > * { opacity: .38; filter: grayscale(.5); }
.carte-paillasse.verrou::after { content: "🔒 Concevez d'abord votre protocole"; position: absolute; inset: 0; display: grid; place-items: center;
  font: 600 16px var(--police); color: #8a4b08; background: rgba(255, 248, 235, .55); border-radius: var(--rayon); }
.cache-etapes { color: var(--doux); font-style: italic; }
.essais-multi { color: #b05a12; }

/* 0.6.1 : correction — navigation, graphique de la copie */
.nav-copies { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: sticky; top: 64px; z-index: 5;
  background: #fff; padding: 8px 0 10px; margin: -6px 0 8px; border-bottom: 1px solid var(--bord); }
.nav-copies select { max-width: 280px; }
.total-copie { font-size: 15px; font-weight: 500; color: var(--doux); margin-left: 12px; }
.total-copie b { color: var(--texte); }
.graphe-copie { display: block; width: 100%; height: 340px; border: 1px solid var(--bord); border-radius: 10px; touch-action: none; }
.grille-protocole { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 10px; }
@media (max-width: 860px) { .grille-protocole { grid-template-columns: 1fr; } }
.grille-protocole h4 { margin: 6px 0; font-size: 13px; color: #3c4855; }
.etapes-copie { list-style: none; padding: 0; margin: 0; font-size: 13.5px; }
.etapes-copie li { display: flex; gap: 8px; padding: 3px 0; color: #9a3b2e; }
.etapes-copie li.fait { color: #1f6f45; }
.etapes-copie li span { font-weight: 800; width: 16px; flex: none; }
.liste-essais { margin: 0; padding-left: 18px; font-size: 13px; color: #3c4855; }
.btn-mini { padding: 3px 9px; font-size: 13px; border-radius: 8px; }
.raccourcis-points { display: inline-flex; gap: 4px; flex-wrap: wrap; margin-left: 10px; vertical-align: middle; }
.detail-copie input[data-pb].saisi { border-color: #8fd1aa; background: #f2fbf5; }
.astuce-clavier { background: #f5f8fc; padding: 6px 10px; border-radius: 8px; }
