/* Système d'équations linéaires : styles propres à l'outil. */
.o-systeme-equations-modes, .o-systeme-equations-n, .o-systeme-equations-methodes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.o-systeme-equations-modes .btn, .o-systeme-equations-methodes .btn { min-height: 42px; border-radius: 999px; font-weight: 600; }
.o-systeme-equations-n { margin-top: 14px; }
.o-systeme-equations-n > span, .o-systeme-equations-methodes > span { font-size: .88rem; font-weight: 600; color: var(--texte-2); margin-right: 4px; }
.o-systeme-equations-n .btn { min-width: 44px; min-height: 42px; padding-inline: 10px; font-weight: 700; }
.o-systeme-equations-methodes { margin-top: 12px; }
.o-systeme-equations-methodes[hidden] { display: none; }
.atelier .o-systeme-equations [aria-pressed="true"].btn { background: var(--marque); border-color: var(--marque); color: var(--sur-marque); }
.o-systeme-equations-defile { overflow-x: auto; }
.o-systeme-equations-grille { display: flex; flex-direction: column; gap: 10px; width: max-content; margin: 14px auto 4px; }
.o-systeme-equations-ligne { display: flex; align-items: center; gap: 6px; }
.o-systeme-equations-num { min-width: 2em; font: 600 .9rem var(--mono); color: var(--texte-2); }
.o-systeme-equations-ligne input { width: 74px; min-height: 46px; padding-inline: 4px; text-align: center; font: 600 1.15rem var(--mono); color: var(--texte); }
.o-systeme-equations-x { font: 700 1.15rem var(--mono); white-space: nowrap; }
.o-systeme-equations-aide { margin: 10px 0; color: var(--texte-2); font-size: .92rem; }
.o-systeme-equations-champ { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; font-size: .88rem; color: var(--texte-2); }
.o-systeme-equations-champ textarea { min-height: 130px; font: 600 1.15rem/1.5 var(--mono); color: var(--texte); }
.o-systeme-equations input[aria-invalid="true"], .o-systeme-equations textarea[aria-invalid="true"] { border-color: var(--erreur-texte); outline: 1px solid var(--erreur-texte); }
.o-systeme-equations input[type="text"]:focus-visible, .o-systeme-equations textarea:focus-visible { outline: 3px solid var(--marque); outline-offset: 0; }
.o-systeme-equations .o-systeme-equations-erreur { margin: 10px 0 0; color: var(--erreur-texte); font-size: 1rem; }
.o-systeme-equations .o-systeme-equations-erreur:empty { display: none; }

/* Écriture mathématique */
.o-systeme-equations-expr { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3em .4em; max-width: 100%; vertical-align: middle; }
.o-systeme-equations-expr > span { overflow-wrap: anywhere; }
.o-systeme-equations-nb { display: inline-flex; align-items: center; white-space: nowrap; }
.o-systeme-equations-f { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; font-size: .92em; text-align: center; }
.o-systeme-equations-f > span { padding: 0 .2em; }
.o-systeme-equations-f > .o-systeme-equations-den { align-self: stretch; border-top: 2px solid currentColor; }
.o-systeme-equations-op { font-weight: 700; }
.o-systeme-equations-det { display: inline-grid; grid-template-columns: auto auto; gap: 0 .8em; padding: 0 .4em; border-inline: 2px solid currentColor; text-align: center; line-height: 1.3; }

.o-systeme-equations-resultat { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding: 12px 14px; border-radius: var(--rayon-petit); background: var(--ok-fond); color: var(--ok-texte); }
.o-systeme-equations-resultat > span { font-size: .85rem; font-weight: 600; }
.o-systeme-equations-resultat > .o-systeme-equations-mention { font-size: 1rem; }
.o-systeme-equations-resultat > .o-systeme-equations-mention:empty { display: none; }
.o-systeme-equations-resultat output { font: 700 1.4rem/1.4 var(--mono); overflow-wrap: anywhere; }
.o-systeme-equations-resultat dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 18px; margin: 6px 0 0; }
.o-systeme-equations-resultat dl:empty { display: none; }
.o-systeme-equations-resultat dt { font-size: .8rem; font-weight: 600; }
.o-systeme-equations-resultat dd { margin: 2px 0 0; font: 600 1.05rem var(--mono); overflow-wrap: anywhere; }

.o-systeme-equations-graphe { margin: 12px 0 0; padding: 10px; border: 1px solid var(--bord); border-radius: var(--rayon-petit); background: var(--surface); }
.o-systeme-equations-graphe figcaption { margin-bottom: 6px; font-size: .88rem; font-weight: 600; color: var(--texte-2); }
.o-systeme-equations-graphe [data-graphe] { width: 100%; }
.o-systeme-equations-svg { display: block; max-width: 100%; height: auto; margin-inline: auto; font: 12px var(--police); }
.o-systeme-equations-grille line { stroke: var(--bord); stroke-width: 1; }
.o-systeme-equations-etiq text { fill: var(--texte-2); }
.o-systeme-equations-axes line { stroke: var(--texte-2); stroke-width: 1.5; }
.o-systeme-equations-droite { stroke-width: 3; stroke-linecap: round; }
.o-systeme-equations-point { fill: var(--erreur-texte); stroke: var(--surface); stroke-width: 2; }
.o-systeme-equations-lib { fill: var(--texte); font-weight: 700; font-size: 13px; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
/* Couleurs des droites : objets volontairement colorés. */
.o-systeme-equations { --se-c0: var(--marque); --se-c1: #e8590c; --se-c2: #2f9e44; --se-c3: #ae3ec9; --se-c4: #c2255c; }
line.o-systeme-equations-c0 { stroke: var(--se-c0); } line.o-systeme-equations-c1 { stroke: var(--se-c1); }
line.o-systeme-equations-c2 { stroke: var(--se-c2); } line.o-systeme-equations-c3 { stroke: var(--se-c3); }
line.o-systeme-equations-c4 { stroke: var(--se-c4); }
.o-systeme-equations-legende { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 0; padding: 0; list-style: none; font: 600 .95rem var(--mono); }
.o-systeme-equations-legende li { display: flex; align-items: center; gap: 8px; }
.o-systeme-equations-legende li::before { content: ""; width: 22px; height: 4px; border-radius: 2px; background: var(--se-c0); }
.o-systeme-equations-legende li.o-systeme-equations-c1::before { background: var(--se-c1); }
.o-systeme-equations-legende li.o-systeme-equations-c2::before { background: var(--se-c2); }
.o-systeme-equations-legende li.o-systeme-equations-c3::before { background: var(--se-c3); }
.o-systeme-equations-legende li.o-systeme-equations-c4::before { background: var(--se-c4); }
.o-systeme-equations-note { margin: 6px 0 0; font-size: .95rem; }
.o-systeme-equations-note:empty { display: none; }

.o-systeme-equations-calcul { margin-top: 12px; padding: 12px 14px; border-radius: var(--rayon-petit); background: var(--surface-2); }
.o-systeme-equations-calcul > strong { display: block; margin-bottom: 6px; font-size: .88rem; font-weight: 600; color: var(--texte-2); }
.o-systeme-equations-calcul ol, .o-systeme-equations-calcul ul { margin: 0; padding-left: 1.5em; }
.o-systeme-equations-calcul ul { list-style: none; padding-left: 0; }
.o-systeme-equations-calcul li { margin-bottom: 10px; }
.o-systeme-equations-calcul li p { margin: 0 0 4px; font-size: .95rem; }
.o-systeme-equations-calcul li .o-systeme-equations-expr { display: flex; margin: 2px 0 6px; font: 600 1.05rem/1.4 var(--mono); }
.o-systeme-equations-calcul .o-systeme-equations-note { margin: 0 0 8px; }
.o-systeme-equations-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; }
.o-systeme-equations-actions .btn-outline { min-height: 42px; }
.o-systeme-equations .o-systeme-equations-prive { display: block; margin-top: 16px; }
@media (max-width: 640px) {
  .o-systeme-equations-modes .btn, .o-systeme-equations-methodes .btn { flex: 1 1 auto; padding-inline: 12px; }
  .o-systeme-equations-ligne input { width: 58px; font-size: 1.05rem; }
  .o-systeme-equations-x { font-size: 1.05rem; }
  .o-systeme-equations-num { min-width: 1.6em; }
  .o-systeme-equations-resultat output { font-size: 1.15rem; }
  .o-systeme-equations-resultat dl { grid-template-columns: 1fr; }
}
