/* ===================== COURS ===================== */
.ariane { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.ariane a { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
.ariane a:hover, .ariane a:focus { color: var(--info); text-decoration-color: currentColor; }
.cours-tete { margin-bottom: 20px; }
.cours-tete h1 { font-size: 2rem; }
.cours-resume { color: var(--muted); max-width: 70ch; margin: 0; }
.cours-corps { display: grid; grid-template-columns: 230px 1fr; gap: 26px; align-items: start; }
.sommaire { position: sticky; top: 16px; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px 16px; font-size: .86rem; }
.sommaire-titre { margin: 0 0 6px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--accent-fonce); }
.sommaire ol { margin: 0 0 12px; padding-left: 18px; }
.sommaire li { margin: 3px 0; }
.sommaire a { color: var(--encre); text-decoration: none; }
.sommaire a:hover { color: var(--accent-fonce); text-decoration: underline; }
.imprimer { width: 100%; text-align: center; }
.cours { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 8px 32px 28px; box-shadow: var(--ombre); font-size: 1.02rem; line-height: 1.65; max-width: 860px; }
.cours section { padding: 22px 0; border-bottom: 1px solid var(--bord); scroll-margin-top: 16px; }
.cours section:last-of-type { border-bottom: 0; }
.cours h2 { font-size: 1.35rem; margin: 0 0 12px; padding-left: 12px; border-left: 5px solid var(--accent); }
.cours h3 { font-size: 1.05rem; margin: 0 0 6px; }
.cours p { margin: 0 0 10px; }
.cours ul, .cours ol { margin: 0 0 10px; padding-left: 22px; }
.cours li { margin: 3px 0; }
.cours code { font-size: 1em; background: #fff4d6; color: var(--nuit); font-weight: 700; }
b.plus, .plus { color: #dc2626; } b.moins, .moins { color: #2563eb; }
.bloc-objectifs { background: #f8fafc; margin: 0 -32px; padding: 18px 32px !important; border-radius: var(--rayon) var(--rayon) 0 0; }
.coche { list-style: none; padding-left: 0 !important; }
.coche li { padding-left: 28px; position: relative; }
.coche li::before { content: "\2610"; position: absolute; left: 4px; color: var(--accent-fonce); }
.bloc-retenir { background: #fffbea; margin: 0 -32px; padding: 18px 32px !important; }

/* Encarts */
.encart { border-radius: 10px; padding: 12px 16px; margin: 12px 0; border: 1px solid; }
.encart p:last-child, .encart ul:last-child { margin-bottom: 0; }
.encart.retenir { background: #fffbea; border-color: #f5d97a; }
.encart.retenir::before, .encart.attention::before, .encart.danger::before { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.encart.retenir::before { content: "\1F4CC  À retenir"; color: var(--accent-fonce); }
.encart.attention { background: #fff4e5; border-color: #fdba74; }
.encart.attention::before { content: "\26A0  Attention"; color: #c2410c; }
.encart.danger { background: #fdecea; border-color: #f5a3a3; }
.encart.danger::before { content: "\26A1  Danger"; color: var(--erreur); }
.encart.ok { background: #eaf7ef; border-color: #b8e2c8; }
.encart.non { background: #fdecea; border-color: #f5c6c2; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.complement { background: #eef2ff; border-left: 4px solid #6366f1; padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: .95rem; }
.carte-grandeur { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 8px; background: var(--nuit); color: #fff; border-radius: 10px; padding: 12px 16px; margin: 0 0 14px; align-items: center; }
.carte-grandeur > div { display: flex; flex-direction: column; }
.gd-nom { font-size: 1.15rem; font-weight: 800; color: var(--accent); }
.gd-lab { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #aab4c4; }
.gd-val { font-size: 1.15rem; font-weight: 700; }
.tableau-cours { margin: 10px 0 14px; }
.tableau-cours th { background: #f4f5f7; }
details.bio, .exos details { border: 1px solid var(--bord); border-radius: 8px; padding: 8px 12px; margin: 8px 0; background: #fafbfc; }
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 6px; color: var(--accent-fonce); }
.exos { padding-left: 0 !important; counter-reset: exo; list-style: none; }
.exos > li { counter-increment: exo; position: relative; padding-left: 36px; }
.exos > li::before { content: counter(exo); position: absolute; left: 0; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--nuit); font-weight: 800; display: grid; place-items: center; font-size: .85rem; }
.exos details p { margin: 0; color: #1f5f3a; }
.cours-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn-suiv { width: auto; margin: 0; }

/* Figures et SVG */
.fig { margin: 14px 0; background: #fafbfc; border: 1px solid var(--bord); border-radius: 10px; padding: 12px; }
.fig svg { width: 100%; height: auto; max-height: 340px; display: block; }
.fig-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: center; }
.fig figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 8px; }
.fig .leg { font: 12px system-ui, sans-serif; fill: #334155; }
.fig .leg.gras { font-weight: 700; }
.fig .leg.plus { fill: #dc2626; } .fig .leg.moins { fill: #2563eb; }
.fig .signe { font: 700 9px system-ui, sans-serif; fill: #fff; }
.fig .signe-gen { font: 700 13px system-ui, sans-serif; fill: var(--encre); }
.fig .app-lettre { font: 800 18px system-ui, sans-serif; fill: #fff; }
.fig .orbite { fill: none; stroke: #94a3b8; stroke-width: 1.2; stroke-dasharray: 4 3; }
.fig .proton { fill: #ef4444; } .fig .neutron { fill: #64748b; } .fig .electron { fill: #2563eb; } .fig .trou { fill: #ef4444; }
.fig .fil { fill: #fde7c8; stroke: #d97706; stroke-width: 2; }
.fig .atome { fill: #f59e0b; opacity: .85; }
.fig .fleche-gris { stroke: #64748b; stroke-width: 2; } .fig .m-gris { fill: #64748b; }
.fig .fleche-rouge { stroke: #dc2626; stroke-width: 2.5; } .fig .m-rouge { fill: #dc2626; } .fig .m-bleu { fill: #2563eb; }
.fig .pile-corps { fill: #e2e8f0; stroke: #475569; stroke-width: 2; }
.fig .electrode-moins { fill: #bfdbfe; } .fig .electrode-plus { fill: #fecaca; }
.fig .eau { fill: #bfdbfe; } .fig .cuve { fill: none; stroke: #475569; stroke-width: 2; }
.fig .tuyau { fill: none; stroke: #475569; stroke-width: 8; stroke-linecap: round; }
.fig .cote { stroke: #64748b; stroke-width: 1.5; }
.fig .conducteur { fill: none; stroke: #1b2230; stroke-width: 3; }
.fig .fond { fill: #fafbfc; } .fig .fond-l { stroke: #fafbfc; stroke-width: 4; }
.fig .gen-long { stroke: #1b2230; stroke-width: 3; } .fig .gen-court { stroke: #1b2230; stroke-width: 5; }
.fig .borne { fill: #fff; stroke: #1b2230; stroke-width: 2; }
.fig .contact { stroke: #1b2230; stroke-width: 3; }
.fig .lampe { fill: #fff7d6; stroke: #1b2230; stroke-width: 3; } .fig .lampe-x { stroke: #1b2230; stroke-width: 3; }
.fig .appareil { fill: #1e40af; stroke: #1e3a8a; }
.seuils { font-size: 1.15rem; text-align: center; margin: 8px 0; }
.seuils span { font-size: 1.6rem; font-weight: 900; color: var(--erreur); }

/* Sommaire des cours */
/* Couleur de chaque matière : une classe « mat-<clé> » pose --mat (traits, textes) et --mat-pale (fonds) */
.mat-technologie { --mat: #d97706; --mat-pale: #fef3c7; --mat-fond: #fffbeb; }
.mat-protections { --mat: #dc2626; --mat-pale: #fee2e2; --mat-fond: #fef5f5; }
.mat-dessin      { --mat: #2563eb; --mat-pale: #dbeafe; --mat-fond: #f5f8ff; }
.mat-mecanique   { --mat: #7c3aed; --mat-pale: #ede9fe; --mat-fond: #faf8ff; }
.mat-geometrie   { --mat: #0d9488; --mat-pale: #ccfbf1; --mat-fond: #f0fdfa; }
.mat-mathematiques { --mat: #0d9488; --mat-pale: #ccfbf1; --mat-fond: #f0fdfa; }
.mat-defaut      { --mat: #64748b; --mat-pale: #e2e8f0; --mat-fond: #f8fafc; }
/* une matière en bandeau : liseré à gauche, titre et icône à sa couleur */
.matiere[class*="mat-"] { border-left: 6px solid var(--mat, var(--bord)); }
.matiere[class*="mat-"] .matiere-tete h2 { color: var(--mat); }
.matiere[class*="mat-"] .matiere-icone { background: var(--mat-pale); border-radius: 12px; padding: 4px 8px; }
/* une pastille de matière : la lettre dans la couleur, sur fond pâle */
.mat-pastille { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 6px;
  background: var(--mat-pale); color: var(--mat); font-size: .72rem; font-weight: 800; letter-spacing: -.02em; }

.matiere { margin-bottom: 18px; }
.matiere-tete { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.matiere-icone { font-size: 2rem; }
.matiere-tete > div { flex: 1; }
.chapitres { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.chapitres li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--bord); border-radius: 10px; }
.chapitres li.dispo { background: #fffdf5; border-color: #f5d97a; }
.chapitres li.a-venir { opacity: .6; }
.chapitres .num { flex: 0 0 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--nuit); color: var(--accent); }
.chapitres .chap-titre { font-weight: 700; font-size: 1.02rem; color: var(--encre); }
.chapitres .chap-titre:hover { color: var(--accent-fonce); }
.chapitres p { margin: 2px 0 0; }

@media (max-width: 900px) {
  .cours-corps { grid-template-columns: 1fr; }
  .sommaire { position: static; }
  .fig-2col, .deux-colonnes { grid-template-columns: 1fr; }
  .carte-grandeur { grid-template-columns: 1fr 1fr; }
  .cours { padding: 8px 18px 22px; }
  .bloc-objectifs, .bloc-retenir { margin: 0 -18px; padding-left: 18px !important; padding-right: 18px !important; }
}
@media print {
  .barre, .pied, .sommaire, .cours-nav, .flash, .ariane { display: none !important; }
  body { background: #fff; }
  .page { max-width: none; padding: 0; }
  .cours-corps { display: block; }
  .cours { border: 0; box-shadow: none; padding: 0; max-width: none; font-size: 11pt; }
  .fig, details { break-inside: avoid; }
  .exos details > *:not(summary) { display: none; }
}

/* ===================== PARCOURS PAS À PAS ===================== */
.etapes { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.etapes li a, .etapes li span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 800; font-size: .9rem; text-decoration: none; border: 2px solid var(--bord); color: var(--muted); background: #fff; }
.etapes li.acquis a, .etapes li.acquis span { background: var(--ok); border-color: var(--ok); color: #fff; }
.etapes li.encours a, .etapes li.encours span { background: var(--accent); border-color: var(--accent); color: var(--nuit); box-shadow: 0 0 0 4px rgba(245,179,1,.25); }
.etapes-legende { color: var(--muted); font-size: .85rem; margin: 0 0 16px; }
.notion-carte { max-width: 820px; }
.notion-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.notion-tete h2 { font-size: 1.5rem; margin: 2px 0 0; }
.badge-niveau { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.niveau-0 { background: #eef1f5; color: var(--muted); }
.niveau-1 { background: #eaf0fe; color: #1e40af; }
.niveau-2 { background: #fff4d6; color: var(--accent-fonce); }
.notion-corps { font-size: 1.08rem; line-height: 1.65; }
.notion-corps .fig { margin: 10px 0 14px; }
.notion-corps .fig svg { max-height: 260px; }
.notion-texte p { margin: 0 0 10px; }
.notion-texte ul { margin: 0 0 10px; padding-left: 22px; }
.notion-texte .mini { background: #fffbea; border: 1px solid #f5d97a; border-radius: 8px; padding: 8px 12px; font-size: 1rem; }
.notion-texte .carte-grandeur { grid-template-columns: 1.3fr 1fr 1fr; margin: 10px 0; }
.qcm { margin-top: 18px; border-top: 2px dashed var(--bord); padding-top: 14px; }
.qcm h3 { margin: 0 0 10px; font-size: 1.1rem; }
.qcm .question { border: 1px solid var(--bord); border-radius: 10px; padding: 10px 14px; margin: 0 0 10px; background: #fafbfc; }
.qcm legend { font-weight: 700; padding: 0 6px; }
.qcm .choix { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; font-weight: 500; cursor: pointer; margin: 0; }
.qcm .choix:hover { background: #fff4d6; }
.qcm .choix input { width: auto; margin: 0; accent-color: var(--accent-fonce); transform: scale(1.25); }
.qcm .btn-plein { max-width: 320px; }
.resultat { max-width: 820px; }
.resultat h2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.resultat .score { font-size: 1rem; background: #eef1f5; border-radius: 999px; padding: 3px 12px; }
.resultat-ok { border-color: #b8e2c8; } .resultat-ko { border-color: #f5c6c2; }
.corrections { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.corrections li { border-radius: 10px; padding: 10px 14px; border: 1px solid; }
.corrections li.juste { background: #eaf7ef; border-color: #b8e2c8; }
.corrections li.faux { background: #fdecea; border-color: #f5c6c2; }
.corrections .question { font-weight: 700; margin: 0 0 4px; }
.corrections p { margin: 0 0 4px; }
.corrections .explication { color: #334155; font-style: italic; }
.suite { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--bord); }
.suite .btn { width: auto; }
.parcours-fin h2 { font-size: 1.6rem; }
.centre { text-align: center; margin-top: 16px; }
.inline { display: inline; }
button.lien { background: none; border: 0; padding: 0; color: var(--info); text-decoration: underline; cursor: pointer; font: inherit; }
/* tests de fin de chapitre : pastilles de note, verrou, analyse */
.tests-chiffres { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.tp { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 24px; padding: 0 7px; border-radius: 6px; font-size: .8rem; font-weight: 700; border: 1px solid transparent; }
.tp-ok { background: #dcfce7; color: #166534; border-color: #86efac; }
.tp-ko { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.tp-rien { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.tp-dispense { background: #eef6ff; color: #1d4ed8; border-color: #bfdbfe; }
.tp-refaire { background: #fff4d6; color: #92400e; border-color: #fcd34d; }
.tab-tests tr.tl-ok > td { background: #f8fefa; } .tab-tests tr.tl-ko > td { background: #fff7f7; }
.tab-tests tr.tl-rien > td { background: #fafbfc; } .tab-tests tr.tl-dispense > td { background: #f6faff; }
.tab-classe-tests td.cel-dv { text-align: center; }
.tab-analyse td { vertical-align: top; }
.case-verrou { display: flex; align-items: center; gap: 6px; }
.case-verrou input { width: 20px; height: 20px; }
.chapitres li.chap-ferme { opacity: .95; }
.chapitres li.chap-ferme .chap-titre { color: var(--muted); }
.btn-verrou { background: #fee2e2 !important; border-color: #fca5a5 !important; color: #b91c1c !important; }
.btn-verrou:hover { background: #fecaca !important; }
/* réponses des élèves : un essai, question par question */
.essai { border: 1px solid var(--bord); border-left-width: 4px; border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.essai-ok { border-left-color: #16a34a; background: #f8fefa; } .essai-ko { border-left-color: #dc2626; background: #fffafa; }
.essai-tete { margin: 0 0 8px; font-size: .88rem; }
.tab-reponses td { vertical-align: top; }
.tab-reponses tr.rep-ok > td { background: #f6fef9; } .tab-reponses tr.rep-ko > td { background: #fff5f5; } .tab-reponses tr.rep-partiel > td { background: #fffbeb; }
.rep-choix { display: inline-block; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--bord); background: #fff; font-size: .86rem; margin: 1px 0; }
.rep-choix b { margin-right: 4px; color: var(--muted); }
.rep-choix-ok { background: #dcfce7; border-color: #86efac; } .rep-choix-ok b { color: #166534; }
.rep-choix-ko { background: #fee2e2; border-color: #fca5a5; } .rep-choix-ko b { color: #b91c1c; }
.rep-choix-vraie { background: #eef6ff; border-color: #bfdbfe; } .rep-choix-vraie b { color: #1d4ed8; }
.lien-reponses { display: inline-block; margin-bottom: 3px; font-size: .78rem; white-space: nowrap; }
.cel-dv-lien { text-decoration: none; }
/* devoirs : chiffres, tableau de la classe, pastilles d'état */
.devoirs-chiffres { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.dch { font-size: .85rem; padding: 4px 11px; border-radius: 999px; background: #f1f5f9; border: 1px solid var(--bord); }
.dch-ok { background: #dcfce7; border-color: #86efac; } .dch-reste { background: #fff4d6; border-color: #fcd34d; }
.dch-retard { background: #fee2e2; border-color: #fca5a5; }
.tab-devoirs tr.dv-fait > td { background: #f6fef9; } .tab-devoirs tr.dv-retard > td { background: #fff7f7; }
.form-devoir { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.form-devoir label { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; }
.form-devoir label.large { flex: 1 1 260px; } .form-devoir label.large input { width: 100%; }
.form-devoir .btn { width: auto; }
.table-large { overflow-x: auto; }
.tab-classe-devoirs th.col-dv { max-width: 130px; font-weight: 600; font-size: .78rem; vertical-align: bottom; }
.tab-classe-devoirs .dv-tete { display: inline-block; line-height: 1.15; }
.tab-classe-devoirs td.cel-dv { text-align: center; }
.tab-classe-devoirs tr.ligne-moi > td { background: #eef6ff; box-shadow: inset 2px 0 0 var(--info, #2563eb); }
.dvp { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 24px; padding: 0 6px; border-radius: 6px; font-size: .78rem; font-weight: 700; border: 1px solid transparent; }
.dvp-ok { background: #dcfce7; color: #166534; border-color: #86efac; }
.dvp-encours { background: #fff4d6; color: #92400e; border-color: #fcd34d; }
.dvp-rien { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.dvp-retard { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.barre-progression.mini { height: 6px; margin: 3px 0; max-width: 150px; }
.barre-progression { height: 10px; border-radius: 999px; background: #eef1f5; overflow: hidden; margin: 6px 0; }
.barre-progression > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--ok)); border-radius: 999px; transition: width .3s; }
.mes-parcours { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.mes-parcours li { border: 1px solid var(--bord); border-radius: 10px; padding: 10px 14px; }
.mp-titre { font-weight: 700; }
.mp-ligne { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mp-ligne .btn { width: auto; margin: 0; }
.rouge { color: var(--erreur); }
.chap-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.chap-actions .btn { width: auto; margin: 0; }
.parcours-mini { text-decoration: none; }
.gras { font-weight: 700; }
@media print { .etapes, .qcm, .suite { display: none !important; } }

/* ===================== ANIMATIONS INTERACTIVES ===================== */
.anim { background: #f8fafc; border: 2px solid #c7d2fe; border-radius: 12px; padding: 12px 14px; margin: 10px 0 14px; }
.anim-titre { display: flex; flex-direction: column; margin-bottom: 8px; }
.anim-titre strong { color: #3730a3; font-size: 1rem; }
.anim-titre span { color: var(--muted); font-size: .85rem; }
.anim-svg { width: 100%; height: auto; max-height: 300px; display: block; background: #fff; border-radius: 8px; }
.anim-clic { cursor: pointer; }
.anim-canvas { width: 100%; height: auto; display: block; border-radius: 8px; touch-action: none; cursor: crosshair; }
.anim-leg { font: 12px system-ui, sans-serif; fill: #334155; } .anim-gras { font-weight: 700; } .anim-signe { font: 700 8px system-ui, sans-serif; fill: #fff; }
.anim-btn { width: auto; margin-top: 10px; }
.anim-ligne { margin-top: 8px; font-size: .95rem; }
.anim-resultat { margin-top: 8px; font-size: 1.15rem; background: #fffbea; border: 1px solid #f5d97a; border-radius: 8px; padding: 8px 12px; }
.anim-resultat .anim-note { display: block; margin-top: 5px; font-size: .82rem; line-height: 1.45; color: #6b7280; font-weight: 400; }
.anim-curseur { display: block; margin: 10px 0 0; font-weight: 600; }
.anim-case { display: block; margin: 8px 0 0; font-weight: 600; }
.anim-case input { display: inline-block; width: auto; margin: 0 8px 0 0; vertical-align: middle; }
.anim-curseur input[type=range] { display: block; width: 100%; margin: 4px 0 0; accent-color: var(--accent-fonce); }
.anim-curseur output { color: #3730a3; }
.anim-grille { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.anim-grille .btn { width: auto; margin: 0; }
.anim-jauge { height: 22px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.anim-jauge-rempli { height: 100%; width: 0; transition: width .15s, background .3s; }
.anim-video { position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: #000 center / cover no-repeat; border-radius: 8px; overflow: hidden; }
.anim-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.anim-play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; border: 0; background: rgba(220,38,38,.92); color: #fff; font-size: 2rem; cursor: pointer; box-shadow: 0 4px 20px rgba(0,0,0,.4); }
.anim-play:hover { transform: scale(1.08); }
@media print { .anim { display: none !important; } }

.anim-curseur select { display: block; width: 100%; margin-top: 4px; padding: 6px 8px; font: inherit; border: 1px solid var(--bord); border-radius: 8px; }
.anim-grille .anim-curseur { flex: 1 1 140px; margin: 0; }

.anim-vat .btn { width: auto; text-align: left; }
.anim-vat .btn:disabled { opacity: 1; cursor: default; }

.badge-niveau-classe { background: #0f766e !important; text-transform: none !important; letter-spacing: 0 !important; }
.formule { font-size: 1.1rem; margin: 8px 0; }
.badge-maison { background: #b45309 !important; text-transform: none !important; letter-spacing: 0 !important; }
.badge-pro { display: inline-block; background: #4c1d95; color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.etapes li.pro a, .etapes li.pro span { border-style: dashed; border-color: #7c3aed; }
.etapes li.pro.acquis a, .etapes li.pro.acquis span { background: #7c3aed; border-color: #7c3aed; border-style: solid; }
.etapes li.pro.encours a, .etapes li.pro.encours span { box-shadow: 0 0 0 4px rgba(124,58,237,.25); }

/* images du cours dans les fiches */
.fiche-images { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 14px; justify-content: center; }
.fiche-image { margin: 0; flex: 1 1 260px; max-width: 100%; text-align: center; background: #fff; border: 1px solid var(--bord); border-radius: 10px; padding: 8px; }
.fiche-images.n1 .fiche-image { flex-basis: 100%; }
.fiche-image img { max-width: 100%; max-height: 320px; height: auto; object-fit: contain; }
.fiche-image figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }

/* jeux de dessin : symboles et plan de position */
.anim-noms .btn { width: auto; text-align: left; font-size: .9rem; }
.anim-noms .btn.ok { background: #dcfce7; border-color: #16a34a; color: #166534; opacity: 1; }
.anim-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; width: auto; padding: 4px 8px; }
.anim-chip.actif { border-color: #f59e0b; background: #fef3c7; }
.anim-chip span { font-size: .75rem; max-width: 110px; white-space: normal; line-height: 1.1; }

/* planning de l'année */
.planning { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 16px; }
.planning-mois { margin: 0; } .planning-mois.actuel { border: 2px solid var(--accent-fonce); }
.planning-mois h2 { font-size: 1.15rem; margin: 0 0 4px; }
.planning-liste { padding-left: 18px; margin: 8px 0; } .planning-liste li { margin: 4px 0; }
.planning-eval { background: #fffbea; border: 1px solid #f5d97a; border-radius: 8px; padding: 6px 10px; font-size: .9rem; margin: 6px 0 0; }

.anim-unif-ligne { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; border-radius: 8px; margin: 4px 0; font-size: .92rem; }
.anim-unif-ligne select { width: auto; padding: 4px 6px; font: inherit; border: 1px solid var(--bord); border-radius: 6px; }

.lightbox { position: fixed; inset: 0; background: rgba(15,23,42,.92); z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: zoom-out; padding: 16px; }
.lightbox img { width: min(96vw, 1100px); height: auto; max-height: 88vh; object-fit: contain; background: #fff; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox-cap { color: #fff; margin-top: 10px; font-size: .95rem; text-align: center; } .lightbox-cap span { opacity: .6; }

/* fiche complète générée depuis le parcours */
.fiche-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; } .fiche-actions .btn { width: auto; margin: 0; }
.fiche-mode-emploi { background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 10px; padding: 10px 14px; font-size: .95rem; }
.fiche-notion { border-top: 2px solid var(--bord); padding-top: 14px; margin-top: 22px; }
.fiche-notion h2 { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; }
.fiche-num { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-fonce); color: #fff; font-size: .95rem; flex-shrink: 0; }
.fiche-notion.pro h2 .fiche-num { background: #7c3aed; }
.fiche-sous { font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
.fiche-simple { background: #f8fafc; border-left: 4px solid #c7d2fe; padding: 6px 14px; margin: 10px 0; border-radius: 0 8px 8px 0; }
.fiche-phrase { font-style: italic; }
.fiche-ecran { font-size: .85rem; color: var(--muted); }
.fiche-choix { list-style: none; padding-left: 8px; margin: 4px 0; } .fiche-choix li { margin: 2px 0; }
.fiche .exos details { margin: 4px 0 10px; } .fiche .exos summary { cursor: pointer; color: var(--accent-fonce); font-weight: 600; }
/* visionneuse / annotation des photos des travaux sur papier (assets/papier-annot.js) */
.annot-vignette { position: relative; display: inline-block; cursor: zoom-in; line-height: 0; } .annot-vignette img { display: block; }
.annot-vignette .annot-svg, .annot-wrap svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.annot-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, .94); display: flex; flex-direction: column; } .annot-overlay[hidden] { display: none; }
.annot-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; background: #0f172a; color: #fff; } .annot-bar .btn { width: auto; margin: 0; } .annot-info { font-size: .85rem; color: #cbd5e1; margin-left: 4px; }
.annot-stage { flex: 1; position: relative; overflow: hidden; touch-action: none; cursor: grab; } .annot-wrap { position: absolute; left: 0; top: 0; transform-origin: 0 0; } .annot-wrap img { display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; max-width: none; }
/* animation redressement : les trois phases restent affichées, la phase en cours est surlignée (texte stable, lisible) */
.anim-phases { display: grid; gap: 4px; } .anim-phase { padding: 4px 8px; border-radius: 6px; opacity: .45; border-left: 4px solid transparent; transition: opacity .2s; } .anim-phase.actif { opacity: 1; background: #fff; border-left-color: var(--accent); }
/* galerie des 47 pièces (mecanique-06) */
.galerie-pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.piece-carte { background: #fff; border: 1px solid var(--bord); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.piece-carte .btn { width: auto; margin: 0; }
.piece-vignette { margin: 0; text-align: center; } .piece-vignette img { width: 100%; height: auto; border-radius: 6px; background: #fff; } .piece-vignette figcaption { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.fiche .fiche-images { margin: 6px 0 12px; } .fiche .fiche-image img { max-height: 240px; }
@media print { .fiche-ecran, .fiche-actions, .fiche-mode-emploi { display: none !important; } .fiche-notion h2, .fiche-sous { break-after: avoid; } }

/* glossaire : mots techniques en bleu + bulle de définition */
.choix-vocab { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.choix-vocab input { width: auto; margin: 0; accent-color: #ea580c; }
.choix-vocab span { font-size: .85rem; color: #9a3412; font-weight: 600; }
/* --- aide au vocabulaire francais : ORANGE. Le bleu est pris par le glossaire technique,
   et le vert est celui du conducteur de protection : on ne s'en sert pas ici. --- */
.terme-fr { color: #c2410c; border-bottom: 2px dotted #ea580c; cursor: help; font-weight: 600; }
.terme-fr:hover, .terme-fr:focus { background: #ffedd5; outline: none; border-radius: 3px; }
.fr-bulle { position: absolute; z-index: 901; width: 280px; background: #fff; color: #1b2230; border: 2px solid #ea580c; border-radius: 12px; padding: 12px 14px 10px; box-shadow: 0 10px 30px rgba(15,23,42,.22); }
.fr-bulle .fr-pic { display: block; width: 72px; height: 72px; margin: 0 auto 6px; }
.fr-bulle .fr-mot { display: block; text-align: center; font-weight: 800; color: #9a3412; font-size: 1.08rem; margin-bottom: 5px; }
.fr-bulle .fr-simple { font-size: .98rem; line-height: 1.4; }
.fr-bulle .fr-ex { display: block; margin-top: 7px; padding-top: 7px; border-top: 1px solid #fed7aa; color: #57534e; font-size: .84rem; font-style: italic; }
.fr-bulle .fr-x { position: absolute; top: 2px; right: 9px; color: #a8a29e; cursor: pointer; font-size: 1.25rem; line-height: 1; }
@media print { .terme-fr { color: #000; border-bottom: 0; font-weight: 600; } .fr-bulle { display: none; } }
.terme { color: #1d4ed8; border-bottom: 1px dotted #1d4ed8; cursor: help; }
.terme:hover, .terme:focus { background: #dbeafe; outline: none; border-radius: 3px; }
.glos-bulle { position: absolute; z-index: 900; background: #1e293b; color: #fff; border-radius: 10px; padding: 12px 30px 12px 14px; font-size: .92rem; line-height: 1.45; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.glos-bulle b { color: #93c5fd; display: block; margin-bottom: 4px; font-size: 1.02rem; }
.glos-bulle .glos-ex { color: #cbd5e1; font-style: italic; margin-top: 6px; }
.glos-bulle a { color: #93c5fd; font-size: .8rem; display: inline-block; margin-top: 6px; }
.glos-bulle .glos-fermer { position: absolute; top: 4px; right: 10px; color: #94a3b8; cursor: pointer; font-size: 1.2rem; line-height: 1; }
.glos-filtre { flex: 1 1 240px; padding: 8px 12px; border: 1px solid var(--bord); border-radius: 8px; font: inherit; }
.glossaire .glos-lettre { font-size: 1.4rem; color: #1d4ed8; border-bottom: 2px solid #dbeafe; margin: 24px 0 8px; padding-bottom: 2px; }
.glos-entree { padding: 6px 0 8px; border-bottom: 1px dashed #e2e8f0; }
.glos-entree h3 { margin: 0 0 2px; font-size: 1.05rem; color: #1d4ed8; }
.glos-entree p { margin: 2px 0; }
.glos-ex { color: var(--muted, #64748b); font-style: italic; }
.glos-vide { color: var(--muted, #64748b); font-style: italic; }
@media print { .terme { color: #000; border-bottom: 0; font-weight: 600; } .glos-bulle, .glos-filtre { display: none; } .glos-entree { break-inside: avoid; } }
/* --- Motion sur les fiches (20/09) : retour tactile des réponses, sans survol (téléphone) --- */
.qcm .choix { transition: background .25s ease, transform .25s cubic-bezier(.22,1,.36,1); -webkit-tap-highlight-color: transparent; }
.qcm .choix:active { transform: scale(.98); background: #fff4d6; }
.qcm .choix:has(input:checked) { background: #fff4d6; box-shadow: inset 3px 0 0 var(--accent); animation: choix-coche .4s cubic-bezier(.2,1.4,.4,1); }
@keyframes choix-coche { 0% { transform: scale(1); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }
.resultat-ok h2 .score b, .pile-encart .pile-texte b { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .qcm .choix:has(input:checked) { animation: none; } }

/* ═══ 🩹 Remédiation : modules courts de rattrapage (conversions d'unités…) ═══ */
:root { --rem: #0d9488; --rem-pale: #ccfbf1; --rem-fond: #f0fdfa; }

/* L'appel : en haut des cours quand l'élève est bloqué, et dans son espace */
.bandeau-remediation { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 14px 16px; text-decoration: none;
  color: var(--encre); background: linear-gradient(100deg, #fff7ed, #fff); border: 2px solid #f59e0b; border-radius: 14px;
  box-shadow: 0 10px 24px -16px rgba(245,158,11,.8); }
.bandeau-remediation:hover { border-color: #d97706; background: linear-gradient(100deg, #ffedd5, #fff); }
.bandeau-remediation .br-ico { font-size: 2rem; flex: none; }
.bandeau-remediation .br-go { margin-left: auto; flex: none; font-weight: 800; color: #b45309; white-space: nowrap; }
.carte-remediation { border-left: 6px solid var(--rem); }

.rem-onglets { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 16px; }
.rem-onglets a { padding: 7px 14px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .9rem;
  color: var(--encre); background: var(--carte); border: 1px solid var(--bord); }
.rem-onglets a:hover { border-color: var(--rem); color: var(--rem); }
.rem-onglets a.on { background: var(--rem); border-color: var(--rem); color: #fff; }

.rem-pourquoi { border-left: 6px solid #f59e0b; background: #fffbeb; }
.rem-liste { margin: 8px 0 0; padding-left: 18px; }
.rem-liste li { margin-bottom: 8px; line-height: 1.45; }
.rem-faux { color: var(--erreur); }
.rem-vrai { color: var(--ok); }

.rem-sommaire { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.rem-sommaire a { font-size: .84rem; padding: 5px 11px; border-radius: 8px; text-decoration: none;
  background: var(--rem-fond); color: var(--rem); border: 1px solid var(--rem-pale); }
.rem-sommaire a:hover { background: var(--rem-pale); }
.rem-etape { border-top: 4px solid var(--rem); }
.rem-etape > h2 { display: flex; align-items: center; gap: 10px; }
.rem-num { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--rem); color: #fff; font-size: .95rem; font-weight: 800; }
.rem-etape .mini { background: var(--rem-fond); border-left: 4px solid var(--rem); padding: 9px 12px; border-radius: 0 8px 8px 0; }

/* L'escalier des unités : une marche par préfixe, × 1 000 entre chacune */
.rem-echelle { display: flex; align-items: stretch; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.rem-marche { flex: 1 1 110px; display: grid; gap: 2px; place-content: center; text-align: center; padding: 12px 8px;
  border-radius: 12px; border: 2px solid var(--bord); background: var(--carte); }
.rem-marche .rem-p { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.rem-marche .rem-n { font-size: .78rem; color: var(--muted); }
.rem-marche .rem-v { font-size: .76rem; font-weight: 700; }
.rem-haut { border-color: #7c3aed; background: #faf8ff; } .rem-haut .rem-p { color: #7c3aed; }
.rem-base { border-color: var(--rem); background: var(--rem-fond); } .rem-base .rem-p { color: var(--rem); }
.rem-bas  { border-color: #2563eb; background: #f5f8ff; } .rem-bas .rem-p { color: #2563eb; }
.rem-x { align-self: center; font-size: .74rem; font-weight: 800; color: var(--muted); white-space: nowrap; }

/* Les deux sens, côte à côte */
.rem-regle { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 14px 0; }
.rem-sens { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--bord); }
.rem-sens code { font-size: 1rem; background: transparent; padding: 0; font-weight: 700; }
.rem-sens-bas { border-color: #2563eb; background: #f5f8ff; } .rem-sens-bas code { color: #2563eb; }
.rem-sens-haut { border-color: #7c3aed; background: #faf8ff; } .rem-sens-haut code { color: #7c3aed; }

.rem-ex { margin: 12px 0; padding: 10px 14px; border-radius: 10px; background: #f7f9fb; border: 1px solid var(--bord); }
.rem-ex p { margin: 5px 0; }
.rem-ex code { background: #fff; font-size: .95rem; font-weight: 700; }
.rem-piege { background: #fef5f5; border-color: #f3c3bd; }

/* Le tableau des longueurs et les tableaux du métier */
.rem-tableau { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .92rem; }
.rem-tableau th, .rem-tableau td { border: 1px solid var(--bord); padding: 8px 10px; text-align: center; }
.rem-tableau th { background: #eef2f7; font-size: .9rem; }
.rem-tableau .rem-u { background: var(--rem-pale); color: var(--rem); font-weight: 800; }
.rem-tableau .rem-fleches { background: var(--carte); font-size: .78rem; color: var(--muted); font-weight: 600; }
.rem-chiffres td { font-size: 1.2rem; font-weight: 800; background: #fffbeb; }
.rem-lecture { text-align: center; margin: -6px 0 14px; font-size: .92rem; }
.rem-metier td:first-child, .rem-metier th:first-child { text-align: left; }
.rem-metier td:last-child { text-align: left; color: var(--muted); font-size: .88rem; }

/* Les exercices */
.rem-serie, .rem-correction { margin: 14px 0; padding-left: 26px; }
.rem-serie li, .rem-correction li { margin-bottom: 11px; }
.rem-decor { display: block; font-size: .84rem; color: var(--muted); margin-bottom: 2px; }
.rem-calc { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 1.05rem; }
.rem-calc input { width: 130px; padding: 7px 10px; font-size: 1rem; font-weight: 700; text-align: right;
  border: 2px solid var(--bord); border-radius: 9px; }
.rem-calc input:focus { outline: none; border-color: var(--rem); background: var(--rem-fond); }
.rem-calc .rem-u { font-weight: 800; color: var(--rem); background: none; }
.rem-correction li { display: grid; gap: 2px; }
.rem-l-ok { color: var(--encre); }
.rem-ecrit { font-weight: 800; }
.rem-l-ko .rem-ecrit { color: var(--erreur); text-decoration: line-through; }
.rem-verdict { font-size: .9rem; font-weight: 700; }
.rem-aide { font-size: .85rem; color: var(--muted); }
.rem-score { text-align: center; }
.rem-score h2 { font-size: 2.4rem; margin: 4px 0 8px; }
.rem-ok { border-top: 5px solid var(--ok); } .rem-ok h2 { color: var(--ok); }
.rem-ko { border-top: 5px solid #f59e0b; } .rem-ko h2 { color: #b45309; }

/* Réglages du professeur */
.rem-interrupteur { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 11px;
  background: #f7f9fb; border: 1px solid var(--bord); margin-bottom: 10px; cursor: pointer; }
.rem-interrupteur input { margin-top: 3px; transform: scale(1.35); accent-color: var(--rem); }
.rem-reglage .ligne { gap: 16px; align-items: center; flex-wrap: wrap; }
tr.ligne-alerte > td { background: #fff6f4; }

@media (max-width: 640px) {
  .rem-echelle { flex-direction: column; } .rem-x { text-align: center; }
  .bandeau-remediation { flex-wrap: wrap; } .bandeau-remediation .br-go { margin-left: 0; }
}

/* Les animations du module de remédiation : même grammaire que les autres cours (instrument, curseur, verdict) */
.page-remediation .anim { background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; padding: 12px 14px; margin: 16px 0; }
.page-remediation .anim-curseur output { color: #0f766e; font-weight: 800; }
.page-remediation .anim-curseur input[type=range] { accent-color: #0d9488; }
.page-remediation .anim-resultat { background: var(--rem-fond); border-color: #99f6e4; }

/* le panneau de sortie : un gros symbole à gauche, la lecture à droite */
.rem-anim-sortie { display: flex; align-items: center; gap: 16px; margin: 10px 0 0; padding: 12px 14px;
  border-radius: 12px; background: linear-gradient(100deg, var(--rem-fond), var(--carte)); border: 1px solid #99f6e4; }
.rem-gros { font-size: 2.6rem; line-height: 1; min-width: 56px; text-align: center; color: var(--rem); font-weight: 800; }
.rem-sortie-txt { font-size: .95rem; line-height: 1.4; }
.rem-sortie-txt strong { font-size: 1.05rem; }
.rem-eq { font-size: 1.05rem; }

/* le convertisseur : l'égalité en grand, puis le saut de la virgule */
.rem-ecran { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 12px 0 6px;
  padding: 14px; border-radius: 12px; background: #0f172a; color: #fff; font-size: 1.35rem; }
.rem-e-de { color: #fcd34d; } .rem-e-vers { color: #5eead4; } .rem-e-eg { color: #94a3b8; font-size: 1.6rem; }
.rem-ecran b { font-weight: 800; }
.rem-virgule { text-align: center; font-size: .95rem; margin-bottom: 6px; }
.rem-saut { letter-spacing: .25em; color: var(--rem); font-weight: 800; }

/* le cube : les trois lectures côte à côte */
.rem-trois { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 10px 0 0; }
.rem-t3 { display: grid; gap: 2px; text-align: center; padding: 10px; border-radius: 10px; background: var(--rem-fond); border: 1px solid #99f6e4; }
.rem-t3 span { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.rem-t3 strong { font-size: 1.2rem; color: var(--rem); }
.rem-t3 em { font-size: .84rem; color: var(--muted); font-style: normal; }

/* le tableau complet des préfixes */
.rem-prefixes td:first-child { font-size: 1.1rem; }
.rem-prefixes td, .rem-prefixes th { text-align: left; }
.rem-prefixes td:nth-child(3), .rem-prefixes td:nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; }
.rem-p-haut { background: #faf8ff; } .rem-p-bas { background: #f5f8ff; } .rem-p-base { background: var(--rem-pale); }
.rem-p-fort td { font-weight: 600; }
.rem-p-fort td:first-child { box-shadow: inset 3px 0 0 var(--rem); }

/* Pictogrammes des grandeurs : un seul dessin, réutilisé partout (planche <symbol> + <use>) */
.pi-planche { position: absolute; width: 0; height: 0; overflow: hidden; }
.pi { width: 1.15em; height: 1.15em; vertical-align: -.22em; flex: none; margin-right: .35em;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--rem); }
.pi-gros { width: 1.9rem; height: 1.9rem; margin: 0; stroke-width: 1.5; }
.pi-mini { width: .95em; height: .95em; }
.rem-tableau .pi { color: var(--muted); }
.rem-tableau td:first-child .pi { color: var(--rem); }
.rem-calc .pi { color: var(--rem); margin-right: .15em; }
.rem-l-ko .pi { color: var(--erreur); }

/* les fiches de repères : un pictogramme, une valeur, ce que c'est */
.pi-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 12px 0 6px; }
.pi-carte { display: grid; justify-items: center; gap: 3px; text-align: center; padding: 12px 8px; border-radius: 12px;
  background: var(--rem-fond); border: 1px solid #99f6e4; }
.pi-carte strong { font-size: 1.1rem; color: var(--rem); }
.pi-carte span { font-size: .78rem; color: var(--muted); line-height: 1.3; }

/* l'animation des repères : la liste des étalons, celui qui tombe juste est mis en avant */
.rem-etalons { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 10px 0 0; }
.rem-et { display: grid; justify-items: center; gap: 2px; padding: 9px 6px; border-radius: 10px;
  background: #f7f9fb; border: 1px solid var(--bord); opacity: .5; }
.rem-et-on { opacity: 1; background: var(--rem-fond); border-color: var(--rem); }
.rem-et strong { font-size: 1.25rem; color: var(--encre); }
.rem-et-on strong { color: var(--rem); }
.rem-et span { font-size: .74rem; color: var(--muted); text-align: center; line-height: 1.25; }

/* Les sous-modules : trois cartes, jamais neuf étapes alignées */
.rem-parties { display: grid; gap: 10px; margin: 14px 0; }
.rem-partie { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; text-decoration: none;
  color: var(--encre); background: var(--carte); border: 2px solid var(--bord); }
.rem-partie:hover { border-color: var(--rem); background: var(--rem-fond); }
.rem-pa-num { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
  background: var(--rem-pale); color: var(--rem); font-size: 1.2rem; font-weight: 800; }
.rem-pa-txt { display: grid; gap: 2px; }
.rem-pa-txt strong { font-size: 1.02rem; }
.rem-pa-txt small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.rem-pa-nb { font-size: .74rem !important; text-transform: uppercase; letter-spacing: .05em; }
.rem-partie-ok { border-color: #99f6e4; background: var(--rem-fond); }
.rem-partie-ok .rem-pa-num { background: var(--rem); color: #fff; }

/* le fil des parties, en haut d'un sous-module */
.rem-fil-parties { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 0 0 12px; }
.rem-fil-parties a { display: inline-grid; place-items: center; min-width: 38px; height: 32px; padding: 0 9px;
  border-radius: 9px; text-decoration: none; font-weight: 700; font-size: .88rem;
  color: var(--muted); background: var(--carte); border: 1px solid var(--bord); }
.rem-fil-parties a.fait { color: var(--rem); border-color: #99f6e4; background: var(--rem-fond); }
.rem-fil-parties a.on { color: #fff; background: var(--rem); border-color: var(--rem); }
.rem-fil-parties span { font-size: .86rem; }

/* Les étiquettes qu'on touche dans les animations : chacune à la couleur de sa famille */
.rem-manip { display: grid; gap: 4px; margin: 12px 0 2px; }
.rem-manip-lab { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-top: 6px; }
.rem-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rem-chip { display: inline-flex; align-items: center; gap: 2px; padding: 6px 11px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: .88rem; font-weight: 700; color: var(--c, var(--encre)); background: var(--carte);
  border: 2px solid var(--bord); transition: background .12s, border-color .12s, color .12s; }
.rem-chip .pi { color: var(--c, var(--rem)); }
.rem-chip i { font-style: normal; font-weight: 500; opacity: .7; font-size: .8em; margin-left: 3px; }
.rem-chip:hover { border-color: var(--c, var(--rem)); }
.rem-chip.on { background: var(--c, var(--rem)); border-color: var(--c, var(--rem)); color: #fff; }
.rem-chip.on .pi, .rem-chip.on i { color: #fff; }
.rem-chips-pref .rem-chip { min-width: 42px; justify-content: center; font-size: 1rem; }
.rem-ecran { border-left: 6px solid var(--c, var(--rem)); }
.rem-anim-sortie { background: linear-gradient(100deg, var(--cp, var(--rem-fond)), var(--carte)); border-color: var(--c, #99f6e4); }
.rem-anim-sortie .rem-gros { color: var(--c, var(--rem)); }
.rem-t3 { background: color-mix(in srgb, var(--c, var(--rem)) 10%, #fff); border-color: color-mix(in srgb, var(--c, var(--rem)) 35%, #fff); }
.rem-t3 strong { color: var(--c, var(--rem)); }
.rem-t3 span .pi { color: var(--c, var(--rem)); }
.rem-et-on { border-color: var(--c, var(--rem)); background: color-mix(in srgb, var(--c, var(--rem)) 10%, #fff); }
.rem-et-on strong, .rem-et-on .pi { color: var(--c, var(--rem)); }

/* Les tableaux prennent vie : on passe de ligne en ligne, les cases se retournent */
.rem-tbl-barre { margin: 12px 0 -4px; }
.rem-tableau tr { transition: background .18s; }
.rem-tableau tr:not(:first-child):hover { cursor: pointer; }
.rem-tableau tr:not(:first-child):hover td { background: var(--rem-fond); }
.rem-tableau tr.on td { background: var(--rem-pale); }
.rem-tableau tr.on td:first-child { box-shadow: inset 4px 0 0 var(--rem); }
.rem-tableau tr.rem-p-haut.on td { background: #ede9fe; }
.rem-tableau tr.rem-p-haut.on td:first-child { box-shadow: inset 4px 0 0 #7c3aed; }
.rem-tableau tr.rem-p-bas.on td { background: #dbeafe; }
.rem-tableau tr.rem-p-bas.on td:first-child { box-shadow: inset 4px 0 0 #2563eb; }
.rem-tableau td .cel { display: inline-block; }
@keyframes rem-flip { 0% { transform: rotateX(0deg); } 45% { transform: rotateX(90deg); opacity: .2; } 100% { transform: rotateX(0deg); } }
.rem-tableau tr.flip td .cel { animation: rem-flip .5s ease both; }
.rem-tableau tr.flip td:nth-child(2) .cel { animation-delay: .08s; }
.rem-tableau tr.flip td:nth-child(3) .cel { animation-delay: .16s; }
.rem-tableau tr.flip td:nth-child(4) .cel { animation-delay: .24s; }
.rem-tableau tr.flip td:nth-child(5) .cel { animation-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .rem-tableau tr.flip td .cel { animation: none; } }

/* Le calcul d'un kWh, étape par étape, chacune à sa couleur */
.rem-etapes-calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px; margin: 12px 0 0; }
.rem-et-calc { display: grid; gap: 2px; text-align: center; padding: 10px 8px; border-radius: 11px;
  background: color-mix(in srgb, var(--c) 9%, #fff); border: 1px solid color-mix(in srgb, var(--c) 35%, #fff); }
.rem-et-calc span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rem-et-calc strong { font-size: 1.25rem; color: var(--c); }
.rem-et-calc em { font-size: .78rem; color: var(--muted); font-style: normal; }

/* Les jeux du module des formules : des cartes à cliquer, un plateau, un score */
.rem-jeu-consigne { display: flex; align-items: center; gap: 10px; margin: 12px 0 10px; padding: 12px 14px;
  border-radius: 12px; background: #f8fafc; border: 1px solid var(--bord); font-size: 1.02rem; }
.rem-jeu-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 9px; margin-bottom: 10px; }
.rem-jeu-carte { display: grid; justify-items: center; gap: 2px; padding: 13px 8px; border-radius: 13px; cursor: pointer;
  font: inherit; color: var(--encre); background: var(--carte); border: 2px solid var(--bord); transition: transform .12s, border-color .12s, background .12s; }
.rem-jeu-carte .pi { color: var(--c); }
.rem-jeu-carte strong { font-size: 1.5rem; color: var(--c); line-height: 1; }
.rem-jeu-carte span { font-size: .76rem; color: var(--muted); }
.rem-jeu-carte:hover { border-color: var(--c); transform: translateY(-2px); }
.rem-jeu-carte.ok { background: #dcfce7; border-color: var(--ok); }
.rem-jeu-carte.ko { background: #fee2e2; border-color: var(--erreur); }
.rem-chip.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.rem-chip.ko { background: var(--erreur); border-color: var(--erreur); color: #fff; }
.rem-chip-large { font-family: ui-monospace, Consolas, monospace; font-size: .98rem; padding: 9px 15px; }

/* le plateau de construction d'une formule */
.rem-plateau { display: flex; justify-content: center; margin: 12px 0; }
.rem-fraction { display: flex; align-items: center; gap: 14px; }
.rem-fr-cherche { display: flex; align-items: center; gap: 6px; font-size: 1.5rem; font-weight: 800; }
.rem-fr-cherche .pi { color: var(--rem); }
.rem-fr-col { display: grid; gap: 4px; justify-items: center; }
.rem-fr-trait { width: 100%; min-width: 120px; height: 3px; background: var(--encre); border-radius: 2px; position: relative;
  text-align: center; font-weight: 800; color: var(--encre); }
.rem-fr-trait:not(:empty) { background: transparent; height: auto; font-size: 1.3rem; }
.rem-case-formule { display: grid; place-items: center; gap: 1px; min-width: 104px; min-height: 64px; padding: 7px 12px;
  border-radius: 12px; border: 2px dashed var(--bord); background: #f8fafc; cursor: pointer; }
.rem-case-formule.pleine { border-style: solid; border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); }
.rem-case-formule.pleine strong { font-size: 1.4rem; color: var(--c); line-height: 1; }
.rem-case-formule .pi { color: var(--c); }
.rem-case-vide { font-size: .78rem; color: var(--muted); }
.rem-persos td:first-child { min-width: 170px; }
.rem-formules td { font-family: ui-monospace, Consolas, monospace; }
.rem-formules td:first-child { font-family: inherit; }

/* 🎮 Le Tetris des formules : la grille, le moteur à décharger */
.tet-scene { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; justify-content: center; margin: 12px 0 8px; }
.tet-grille { display: grid; grid-template-columns: repeat(6, 44px); grid-auto-rows: 44px; gap: 3px;
  padding: 6px; background: #eef2f7; border: 2px solid var(--bord); border-radius: 12px; }
.tet-case { display: grid; place-items: center; gap: 0; border-radius: 8px; background: #fff; }
.tet-case.pleine { background: color-mix(in srgb, var(--c) 16%, #fff); box-shadow: inset 0 0 0 2px var(--c); }
.tet-case.pleine .pi { color: var(--c); width: 1em; height: 1em; margin: 0; }
.tet-case.pleine strong { font-size: .92rem; color: var(--c); line-height: 1; }
.tet-case.active { animation: tet-pulse .5s ease infinite alternate; }
@keyframes tet-pulse { to { box-shadow: inset 0 0 0 3px var(--c), 0 0 10px -2px var(--c); } }
.tet-pop { animation: tet-pop .45s ease; }
@keyframes tet-pop { 0% { transform: scale(1); background: #fff7ed; } 50% { transform: scale(1.25); background: #fde68a; } 100% { transform: scale(1); } }
.tet-cote { display: grid; gap: 4px; justify-items: center; min-width: 120px; }
.tet-lab { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.tet-moteur { width: 90px; height: 150px; }
.tet-suivant { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 10px;
  background: color-mix(in srgb, var(--c, #94a3b8) 14%, #fff); box-shadow: inset 0 0 0 2px var(--c, #cbd5e1); }
.tet-suivant .pi { color: var(--c); margin: 0; }
.tet-suivant strong { font-size: .95rem; color: var(--c); }
.tet-aide { display: grid; gap: 3px; margin-top: 6px; }
.tet-aide span { display: flex; align-items: center; gap: 3px; font-size: .82rem; font-weight: 700;
  padding: 4px 7px; border-radius: 7px; background: #f8fafc; border: 1px solid var(--bord); color: var(--muted); }
.tet-aide .pi { color: var(--rem); width: .95em; height: .95em; margin-right: 1px; }
.tet-banniere { height: 0; overflow: hidden; text-align: center; transition: height .2s; }
.tet-banniere.on { height: 54px; }
.tet-banniere strong { display: block; font-size: 1.3rem; color: var(--ok); }
.tet-banniere span { font-size: .8rem; color: var(--muted); }
.tet-barre { display: flex; gap: 7px; justify-content: center; margin: 6px 0 2px; flex-wrap: wrap; }
.tet-barre .btn { min-width: 52px; font-size: 1.05rem; }

/* Le quatrième bouton du fil : l'accès direct aux jeux */
.rem-fil-parties a.fil-jeu { color: #b45309; border-color: #fcd34d; background: #fffbeb; }
.rem-fil-parties a.fil-jeu.on { color: #fff; background: #d97706; border-color: #d97706; }
.rem-jeu > h2 .rem-num { background: #d97706; }
.rem-jeu { border-top-color: #d97706; }

/* Les exercices posés comme une vraie question : l'énoncé, puis la case de réponse */
.rem-consigne { background: var(--rem-fond); border: 1px solid #99f6e4; border-radius: 10px;
  padding: 10px 13px; margin: 8px 0 14px; font-size: .92rem; line-height: 1.5; }
.rem-consigne code { background: #fff; }
.rem-enonce { display: flex; align-items: flex-start; gap: 7px; font-size: 1.02rem; line-height: 1.45; margin-bottom: 6px; }
.rem-enonce .pi { color: var(--rem); margin-top: .2em; }
.rem-calc-rep { margin-left: 1.9em; }
.rem-rep-lab { font-size: .86rem; color: var(--muted); font-weight: 600; }
.rem-serie > li, .rem-correction > li { padding-bottom: 4px; }

/* Le menu d'unités à côté de la case : une réponse, c'est un nombre ET une unité */
.rem-sel-unite { padding: 7px 9px; font: inherit; font-size: .95rem; font-weight: 700; color: var(--rem);
  background: #fff; border: 2px solid var(--bord); border-radius: 9px; cursor: pointer; }
.rem-sel-unite:focus { outline: none; border-color: var(--rem); background: var(--rem-fond); }
.rem-sel-unite:invalid { color: var(--muted); font-weight: 500; }
.rem-verdict.rem-presque { color: var(--accent-fonce); }

/* ═══════════ Chapitre « Histoire de l'électricité » ═══════════ */

/* deux portraits côte à côte, qui passent l'un sous l'autre sur téléphone */
.deux-images { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; }
.deux-images .fiche-image { margin: 0; }
@media (max-width: 560px) { .deux-images { grid-template-columns: 1fr; } }

/* les lignes clés de la frise : celles qui expliquent ce qu'on câble aujourd'hui */
.tableau tr.ligne-cle > td { background: #fffaed; }
.tableau tr.ligne-cle > td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* le « 👉 » de fin de section : ce qu'il faut emporter */
.encadre {
  background: var(--fond); border-left: 4px solid var(--accent);
  border-radius: 0 var(--rayon) var(--rayon) 0;
  padding: 12px 16px; margin: 16px 0;
}


/* ================= Mon parcours (cours/mon-parcours.php) — ajouté 2026-10-04 ================= */
/* Toutes les classes sont préfixées .mp pour ne rien percuter du reste du site.
   Les couleurs de matière viennent des classes mat-<cle> déjà définies plus haut (--mat, --mat-pale, --mat-fond). */
.mp{--ok:#15803d}
.mp .mp-intro{color:var(--muted);max-width:70ch}

/* commutateur Tableau / Liste */
.mp-switch{display:flex;align-items:center;gap:12px;margin:16px 0 20px;flex-wrap:wrap}
.mp-switch .lbl{font-weight:800;font-size:.76rem;color:var(--muted);text-transform:uppercase;letter-spacing:.07em}
.mp-seg{display:inline-flex;background:#e9edf2;border-radius:999px;padding:4px;gap:3px}
.mp-seg button{border:0;background:transparent;color:var(--muted);font:inherit;font-weight:800;padding:9px 18px;border-radius:999px;cursor:pointer}
.mp-seg button[aria-pressed="true"]{background:#fff;color:var(--encre);box-shadow:0 1px 3px rgba(16,25,43,.18)}

/* sélecteur « aller à » */
.mp-jump{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 20px}
.mp-jump label{font-weight:800;font-size:.84rem}
.mp-jump select{flex:1;min-width:220px;font:inherit;font-weight:600;padding:11px 12px;border-radius:11px;border:1px solid var(--bord);background:#fff;color:var(--encre);cursor:pointer}
.mp-jump select:focus{outline:2px solid var(--accent);outline-offset:1px}

/* devoirs du professeur */
.mp-devbox{margin:0 0 22px}
.mp-devbox h2{display:flex;align-items:center;gap:9px;font-size:1.1rem;margin:0 0 11px}
.mp-devbox h2 .pill{font-size:.72rem;font-weight:800;background:var(--accent);color:var(--nuit);border-radius:999px;padding:2px 9px}
.mp-dev{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;background:var(--carte);border:1px solid var(--bord);border-left:5px solid var(--dv,#64748b);border-radius:14px;padding:14px 16px;margin-bottom:10px}
.mp-dev .di{width:42px;height:42px;flex:0 0 42px;border-radius:12px;display:grid;place-items:center;font-size:1.3rem;background:var(--mat-pale,#eef1f5)}
.mp-dev .dmid{min-width:0}
.mp-dev .dt{font-weight:800}
.mp-dev .dchip{font-size:.7rem;font-weight:800;border-radius:999px;padding:3px 10px;white-space:nowrap;background:color-mix(in srgb,var(--dv) 15%,#fff);color:var(--dv)}
.mp-dev .meta{font-size:.8rem;color:var(--muted);margin-top:3px}
.mp-dev .mot{margin-top:9px;background:var(--mat-fond,#f8fafc);border-left:3px solid var(--mat-pale,#e2e8f0);border-radius:0 10px 10px 0;padding:9px 12px;font-size:.9rem}
.mp-dev .mot .sig{display:block;margin-top:5px;font-size:.76rem;color:var(--muted);font-weight:700}
.mp-dev .dact{background:var(--dv,#64748b);color:#fff;font-weight:800;text-decoration:none;padding:10px 15px;border-radius:11px;white-space:nowrap;font-size:.82rem}
.mp-dev.fait{opacity:.85}

/* bandeau « Reprendre » */
.mp-reprendre{display:flex;flex-wrap:wrap;align-items:center;gap:14px;background:var(--nuit);color:#fff;border-radius:14px;padding:16px 18px;margin:0 0 18px}
.mp-reprendre .lbl{font-size:.72rem;text-transform:uppercase;letter-spacing:.1em;color:#aab4c4;font-weight:700}
.mp-reprendre .ch{font-weight:800;font-size:1.05rem}
.mp-reprendre .ch small{display:block;font-weight:600;color:#cdd4de;font-size:.82rem;margin-top:2px}
.mp-reprendre a{margin-left:auto;background:var(--accent);color:var(--nuit);font-weight:800;text-decoration:none;padding:11px 18px;border-radius:10px;white-space:nowrap}

/* compteurs */
.mp-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:18px}
.mp-stat{background:var(--carte);border:1px solid var(--bord);border-radius:12px;padding:12px 14px;text-align:center}
.mp-stat b{display:block;font-size:1.5rem;line-height:1.1;font-variant-numeric:tabular-nums}
.mp-stat span{font-size:.74rem;color:var(--muted);font-weight:700}
.mp-stat.sd b{color:var(--ok)} .mp-stat.sw b{color:var(--accent-fonce)} .mp-stat.sl b{color:var(--muted)}

/* carte de module (Tableau et Liste) */
.mp-mod{background:var(--carte);border:1px solid var(--bord);border-radius:14px;margin-bottom:14px;overflow:hidden}
.mp-modh{display:flex;align-items:center;gap:12px;padding:13px 16px;background:var(--mat-fond,#f8fafc);border-bottom:1px solid var(--bord)}
.mp-modh .ico{width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;background:var(--mat-pale);color:var(--mat);border-radius:11px;font-size:1.25rem}
.mp-modh h2{margin:0;font-size:1.06rem;color:var(--mat);flex:1;min-width:0}
.mp-modh .frac{font-weight:800;font-size:.9rem;color:var(--mat);font-variant-numeric:tabular-nums;white-space:nowrap}
.mp-prog{padding:12px 16px 4px}
.mp-bar{position:relative;height:22px;border-radius:999px;background:var(--mat-pale);overflow:hidden;box-shadow:inset 0 0 0 1px rgba(16,25,43,.05)}
.mp-bar>i{position:absolute;top:0;left:0;bottom:0;min-width:2.9em;background:var(--mat);border-radius:999px;display:flex;align-items:center;justify-content:flex-end;padding-right:10px;color:#fff;font-weight:800;font-size:.72rem;font-variant-numeric:tabular-nums}

/* lignes du Tableau */
.mp-row{display:grid;grid-template-columns:30px 1fr auto 16px;gap:12px;align-items:center;padding:11px 16px;border-top:1px solid #eef1f4;text-decoration:none;color:var(--encre)}
.mp-mod .mp-row:first-of-type{border-top:0}
a.mp-row:hover{background:var(--mat-fond)}
.mp-rn{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;font-weight:800;font-size:.85rem;background:var(--mat-pale);color:var(--mat);font-variant-numeric:tabular-nums}
.mp-rt{min-width:0}
.mp-rt .ti{font-weight:700;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.mp-chip{font-size:.72rem;font-weight:800;border-radius:999px;padding:2px 9px;white-space:nowrap}
.mp-chip.done{background:#eaf7ef;color:var(--ok)}
.mp-chip.wip{background:#fff3d6;color:var(--accent-fonce)}
.mp-chip.todo{background:#eef1f5;color:var(--muted)}
.mp-chip.lock{background:#f1f3f6;color:var(--muted)}
.mp-chip.refaire{background:#fdecea;color:var(--erreur)}
.mp-chip.bloque{background:#fdecea;color:var(--erreur)}
.mp-rt .act{font-size:.8rem;color:var(--muted);margin-top:2px}
.mp-rd{font-size:.74rem;color:var(--muted);white-space:nowrap}
.mp-go{color:var(--mat);font-weight:900;font-size:1.1rem;text-align:center}
.mp-row.islock{color:var(--muted);cursor:default}
.mp-row.islock .mp-rn{background:#f1f3f6;color:var(--muted);border:1.5px dashed var(--bord)}
.mp-row.islock .mp-go{color:transparent}
.mp-row.isdone .mp-rn{background:var(--ok);color:#fff}
.mp-row.cible{animation:mpflash 1.6s ease}
@keyframes mpflash{0%,40%{background:#fff7d6}100%{background:transparent}}

/* items de la Liste */
.mp-li{display:grid;grid-template-columns:auto 1fr;gap:14px;align-items:start;padding:14px 16px;border-top:1px solid #eef1f4}
.mp-mod .mp-li:first-of-type{border-top:0}
.mp-li .n{width:34px;height:34px;flex:0 0 34px;border-radius:11px;display:grid;place-items:center;font-weight:800;background:var(--mat);color:#fff}
.mp-li.islock .n{background:transparent;color:var(--muted);border:1.5px dashed var(--bord)}
.mp-li .bd{min-width:0}
.mp-li .tr{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.mp-li .t{font-weight:800;font-size:1.02rem}
.mp-li .dur{font-size:.72rem;font-weight:700;color:var(--muted);background:#f1f3f6;border-radius:999px;padding:2px 9px;white-space:nowrap}
.mp-li .rs{color:var(--muted);font-size:.9rem;margin:5px 0 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.mp-li .ax{display:flex;gap:8px;flex-wrap:wrap;margin-top:11px;align-items:center}
.mp-done{font-size:.8rem;font-weight:800;color:var(--ok)}

/* barre d'outils de la Liste */
.mp-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}

/* récap « une case par chapitre » */
.mp-recap{margin-top:22px;border-top:1px solid var(--bord);padding-top:18px}
.mp-recap h2{font-size:1.1rem;margin:0 0 4px}
.mp-recap .sub{font-size:.86rem;color:var(--muted);margin:0 0 12px}
.mp-rleg{font-size:.78rem;color:var(--muted);display:flex;flex-wrap:wrap;gap:16px;margin:0 0 18px}
.mp-rleg span{display:inline-flex;align-items:center;gap:7px}
.mp-rleg i{width:18px;height:18px;border-radius:5px;border:1.5px solid #cbd5e1;background:#fff;display:inline-block}
.mp-rleg i.ok{background:#64748b;border-color:#64748b}
.mp-rleg i.wip{background:linear-gradient(90deg,#cbd5e1 50%,#fff 50%)}
.mp-rleg i.lk{border-style:dashed}
.mp-rrow{display:grid;grid-template-columns:168px 1fr;gap:14px;align-items:center;margin-bottom:12px}
.mp-rrow .rlab{display:flex;align-items:center;gap:9px;font-weight:800;color:var(--mat);font-size:.9rem;min-width:0}
.mp-rrow .rlab .ri{width:28px;height:28px;flex:0 0 28px;border-radius:9px;display:grid;place-items:center;background:var(--mat-pale);color:var(--mat)}
.mp-tuiles{display:flex;flex-wrap:wrap;gap:6px}
.mp-tuile{position:relative;width:32px;height:32px;border-radius:9px;border:1.6px solid var(--mat-pale);background:#fff;overflow:hidden;display:grid;place-items:center;font-size:.74rem;font-weight:800;color:var(--muted);text-decoration:none}
.mp-tuile .fill{position:absolute;top:0;left:0;bottom:0;background:color-mix(in srgb,var(--mat) 24%,#fff);z-index:0}
.mp-tuile>b{position:relative;z-index:1}
.mp-tuile.ok{background:var(--mat);border-color:var(--mat);color:#fff}
.mp-tuile.lock{border-style:dashed}
.mp-tuile.lock::after{content:"🔒";position:absolute;font-size:.58rem;bottom:0;right:1px;z-index:2}
a.mp-tuile:hover{outline:2px solid var(--mat);outline-offset:1px}

@media (max-width:640px){
  .mp-stats{grid-template-columns:repeat(2,1fr)}
  .mp-row{grid-template-columns:30px 1fr 16px}
  .mp-rd{display:none}
  .mp-li{grid-template-columns:1fr}
  .mp-rrow{grid-template-columns:1fr}
  .mp-dev{grid-template-columns:auto 1fr}
  .mp-dev .dact{grid-column:1/-1;text-align:center}
}

/* ---- Lecture des consignes (07/10/2026) : négations surlignées, astuces de lecture, module « Lire une consigne » ---- */
mark.neg-lecture { background: #fde68a; color: #7c2d12; font-weight: 700; padding: 0 2px; border-radius: 3px; }
.lecture-astuce { margin: 6px 0 0; padding: 7px 10px; border-left: 4px solid #f59e0b; background: #fffbeb; border-radius: 6px; font-size: .93rem; }
.lecture-vite { margin: 12px 0; }
.rem-decor-consigne { font-size: 1.05rem; color: var(--texte, #1b2230); font-weight: 600; background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.rem-choix { margin: 4px 0 8px 1.6em; padding: 0; }
.rem-choix li { margin: 3px 0; padding: 4px 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; }
.rem-etapes-liste li { margin: 8px 0; }
.comp-signaux { display: grid; gap: 10px; }
.comp-signal { border: 1px solid #fde68a; background: #fffbeb; border-radius: 10px; padding: 10px 12px; }
.comp-signal h3 { margin: 0 0 4px; font-size: 1rem; }
.comp-piege { font-size: .9rem; border-bottom: 1px dashed #e2e8f0; padding: 6px 0; }
.comp-jauge { display: inline-block; min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Séries d'exercices des cours (07/10/2026) : la solution reste repliée, l'élève cherche d'abord ---- */
details.solution { margin: 4px 0 14px; border: 1px dashed #5eead4; border-radius: 8px; padding: 6px 10px; background: #f0fdfa; }
details.solution summary { cursor: pointer; font-weight: 600; color: #0f766e; }
details.solution[open] summary { margin-bottom: 4px; }
details.solution p { margin: 4px 0; }
