:root {
  --fond: #f3efe6;
  --surface: #fffdf8;
  --surface-2: #ebe5d8;
  --bord: #d6cfbf;
  --texte: #23201b;
  --texte-2: #6b6458;
  --accent: #c8322a;      /* rouge Thomson */
  --accent-texte: #fff;
  --bleu: #2c5d9c;
  --vert: #2f7d4a;
  --ambre: #b7791f;
  --touche: #2a2826;
  --touche-texte: #f1ece2;
  --touche-speciale: #4a4541;
  --ombre: 0 1px 2px rgb(0 0 0 / .08), 0 4px 14px rgb(0 0 0 / .06);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #171614; --surface: #211f1c; --surface-2: #2b2925; --bord: #3a3732;
    --texte: #ece6da; --texte-2: #a29a8c; --accent: #e0483e; --bleu: #6d9be0; --vert: #5fb57c; --ambre: #e0a64a;
    --touche: #0f0e0d; --touche-speciale: #34302c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #171614; --surface: #211f1c; --surface-2: #2b2925; --bord: #3a3732;
  --texte: #ece6da; --texte-2: #a29a8c; --accent: #e0483e; --bleu: #6d9be0; --vert: #5fb57c; --ambre: #e0a64a;
  --touche: #0f0e0d; --touche-speciale: #34302c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--fond); color: var(--texte);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex; flex-direction: column;
}
button, select, input, textarea { font: inherit; color: inherit; }
button {
  background: var(--surface); border: 1px solid var(--bord); border-radius: 6px;
  padding: 5px 11px; cursor: pointer;
}
button:hover { border-color: var(--texte-2); }
button[aria-pressed="true"], .segment button.actif { background: var(--texte); color: var(--fond); border-color: var(--texte); }
button.principal { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); font-weight: 600; }
button.danger:hover { color: var(--accent); border-color: var(--accent); }
select, input[type="number"], textarea {
  background: var(--surface); border: 1px solid var(--bord); border-radius: 6px; padding: 4px 8px;
}
:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }

/* ------------------------------------------------------------ barre */
.barre {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--bord);
}
.marque { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .02em; }
.logo {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px;
  background: var(--accent); color: #fff; font-size: 12px; letter-spacing: 0;
}
.avis { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: color-mix(in srgb, var(--ambre) 18%, var(--surface)); border-bottom: 1px solid var(--bord); font-size: 13px; }
.avis[hidden] { display: none; }
.avis span { flex: 1; }
.pastille { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--bord); }
.pastille.ok { background: var(--vert); }
.pastille.ko { background: var(--accent); }
.pastille.actif { background: var(--ambre); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ambre) 25%, transparent); }
.onglets, .cfg-onglets { display: flex; gap: 4px; }
.onglets button, .cfg-onglets button { border: none; background: none; padding: 6px 12px; border-radius: 6px; color: var(--texte-2); }
.onglets button.actif, .cfg-onglets button.actif { background: var(--surface-2); color: var(--texte); font-weight: 600; }
.outils { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.segment { display: inline-flex; }
.segment button { border-radius: 0; }
.segment button:first-child { border-radius: 6px 0 0 6px; }
.segment button:last-child { border-radius: 0 6px 6px 0; border-left: none; }

/* ------------------------------------------------------------ mise en page */
.corps { flex: 1; display: flex; min-height: 0; }
main { flex: 1; overflow: auto; padding: 20px; min-width: 0; scrollbar-gutter: stable; }
.entete-vue h1 { font-size: 18px; margin: 0 0 4px; }
.aide { color: var(--texte-2); margin: 0 0 16px; max-width: 70ch; }
.vide { text-align: center; padding: 60px 0; color: var(--texte-2); }

/* ------------------------------------------------------------ salle */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.carte {
  background: var(--surface); border: 1px solid var(--bord); border-radius: 10px; overflow: hidden;
  box-shadow: var(--ombre); cursor: pointer; transition: transform .1s, border-color .1s;
}
.carte:hover { border-color: var(--texte-2); }
.carte.choisie { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.vignette { position: relative; background: #000; aspect-ratio: 336 / 259; container-type: inline-size; }
/* Réduite (moins de 336 points de large), l'image est lissée : en « pixelated », des colonnes de
   points sauteraient et des caractères paraîtraient tronqués. À 336 et plus, points nets. */
.vignette canvas { width: 100%; height: 100%; display: block; image-rendering: auto; }
@container (min-width: 336px) { .vignette canvas { image-rendering: pixelated; } }
.sans-ecran { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #8a8378; font-size: 12px; }
.carte-pied { display: flex; align-items: center; gap: 8px; padding: 8px 10px 2px; }
.numero { font-weight: 700; }
.origine { color: var(--texte-2); font-size: 12px; flex: 1; }
.carte-actions { display: flex; gap: 6px; padding: 6px 10px 10px; }
.carte-actions button { flex: 1; padding: 3px 6px; font-size: 12px; }

/* ------------------------------------------------------------ écrans */
/* --cadre-l : largeur de l'écran calculée par ajusterEcrans() pour que tout tienne en hauteur. */
/* Ligne des barres d'outils partagée (subgrid) : les écrans commencent à la même hauteur ; chaque
   emplacement a sa propre taille d'écran (--cadre-l), selon que son clavier est affiché ou non. */
.emplacements { display: grid; column-gap: 16px; grid-template-rows: auto auto; }
/* Un écran : le cadre a au moins la largeur de l'écran, et s'élargit (dans la page) jusqu'à la
   largeur de sa barre d'outils sur une ligne, pour que l'état du poste reste visible ; l'écran,
   lui, garde sa largeur (--cadre-l), centré. */
.emplacements.un { grid-template-columns: minmax(min(100%, max(calc(var(--cadre-l, 978px) + var(--console-l, 0px) + 22px), 820px)), max-content); justify-content: center; }
.emplacements.deux { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .emplacements.deux { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 16px; }
  .emplacements.deux .emplacement { display: block; grid-row: auto; }
}
.emplacement {
  background: var(--surface); border: 1px solid var(--bord); border-radius: 10px; padding: 10px;
  box-shadow: var(--ombre);
  display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; align-content: start;
}
.emplacement.focus { border-color: var(--bleu); box-shadow: 0 0 0 2px color-mix(in srgb, var(--bleu) 45%, transparent); }
.emp-barre { display: flex; gap: 6px; align-items: center; align-content: start; flex-wrap: wrap; margin-bottom: 8px; }
.emp-barre button { padding: 3px 9px; font-size: 13px; }
/* L'état (« en ligne », « en dialogue avec le central »…) prend la place libre sans jamais faire
   passer les boutons à la ligne : sinon la barre changerait de hauteur et l'écran de taille. */
.emp-etat { color: var(--texte-2); font-size: 12px; flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-barre .espace { display: none; }
/* Un écran : place fixe pour l'état (le cadre ne bouge pas quand le texte change). */
/* Elle ne rétrécit que si la page est trop étroite : les boutons ne passent pas à la ligne (la barre
   garderait sinon une autre hauteur selon la machine, et l'écran une autre taille). */
.emplacements.un .emp-etat { flex: 1 1 4em; width: 14em; min-width: 4em; }
.espace { flex: 1; }
.ecran-cadre { position: relative; background: #000; border-radius: 6px; overflow: hidden; aspect-ratio: 336 / 259;
  width: min(100%, var(--cadre-l, 100%)); margin: 0 auto; }
.ecran { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.ecran.crayon { cursor: crosshair; }
.ecran-message { position: absolute; inset: 0; display: grid; place-items: center; color: #9d968a; text-align: center; padding: 20px; }

/* ------------------------------------------------------------ clavier virtuel */
.clavier-virtuel {
  /* Repère de 622 x 232 (clavier du MO5) ; tailles de texte proportionnelles à la largeur. */
  position: relative; aspect-ratio: 622 / 232; margin: 10px auto 0; border-radius: 8px;
  width: max(86%, min(100%, 500px));
  background: #3b3b38; container-type: inline-size; user-select: none; touch-action: manipulation;
}
.clavier-virtuel[hidden] { display: none; }
.clavier-virtuel > * { position: absolute; }
.touche {
  border: none; border-radius: .9cqw; padding: .5cqw .55cqw; margin: 0;
  background: #8b8b80; color: #fff; font: 600 2.6cqw/1 system-ui, sans-serif;
  box-shadow: inset 0 -.5cqw 0 rgb(0 0 0 / .32), inset 0 .25cqw 0 rgb(255 255 255 / .18);
  display: flex; flex-direction: column; justify-content: space-between; align-items: stretch;
  overflow: hidden; text-align: left; cursor: pointer;
}
.touche .haut { display: flex; justify-content: space-between; align-items: baseline; gap: .4cqw; }
.touche .principal { font-size: 2.9cqw; }
.touche .principal.mot { font-size: 1.5cqw; letter-spacing: -.02em; }
.touche .maj-car { color: #f3e15a; font-size: 2.3cqw; }
.touche .mot-cle { font-size: .95cqw; font-weight: 500; letter-spacing: -.03em; white-space: nowrap; color: #111; }
.touche.maj { background: #f5e800; box-shadow: inset 0 -.5cqw 0 rgb(0 0 0 / .2); }
.touche.basic { background: #111; color: #fff; justify-content: center; align-items: center; font-size: 1.9cqw; outline: .2cqw solid #777; outline-offset: -.4cqw; }
.touche.espace { background: #8b8b80; }
.touche.entree { justify-content: center; }
.touche.enfoncee, .touche:active { transform: translateY(.2cqw); box-shadow: inset 0 -.15cqw 0 rgb(0 0 0 / .32); filter: brightness(.85); }
.touche.verrou { outline: .45cqw solid var(--ambre); outline-offset: .1cqw; }
.clavier-virtuel .accent {
  border: .2cqw solid #ddd; color: #fff; display: grid; place-items: center; font: 600 1.8cqw/1 system-ui, sans-serif;
}
/* Clavier mécanique (MO5 ROM 1.1 « mécanique » et 2.1) : boîtier brun-gris, touches grises,
   touches de fonction gris-bleu, ENTREE bleu nuit, mots-clés BASIC en noir. */
.clavier-virtuel.mecanique { background: #3d3935; }
/* Même bord biseauté que les touches du MO5 NR (repère de 622 : épaisseurs ramenées à la même échelle). */
.mecanique .touche { background: #a9a79f; color: #fff; border-radius: .18cqw; text-shadow: 0 0 .25cqw rgb(0 0 0 / .45);
  padding: .1cqw .25cqw; border-style: solid; border-width: .64cqw 1.13cqw 1.05cqw .64cqw;
  border-color: rgb(255 255 255 / .5) rgb(0 0 0 / .17) rgb(0 0 0 / .34) rgb(255 255 255 / .2);
  box-shadow: 0 0 0 .08cqw rgb(0 0 0 / .45); }
.mecanique .touche.enfoncee, .mecanique .touche:active { box-shadow: 0 0 0 .08cqw rgb(0 0 0 / .45); }
/* ↑ et ↓ : côtés plats (sans biseau), capuchon en relief au milieu, de la largeur d'une touche. */
.mecanique .touche.plat-cotes { border: none; padding: 0; background: #6b7280; flex-direction: row; justify-content: center; align-items: stretch; }
.mecanique .touche.plat-cotes .capuchon { width: 46%; align-self: stretch; box-sizing: border-box;   /* relief sur toute la hauteur de la touche */
  display: flex; flex-direction: column;
  justify-content: space-between; align-items: center; text-align: center; padding: .1cqw .25cqw;
  background-color: #6b7280; border-radius: .18cqw; border-style: solid; border-width: .64cqw 1.13cqw 1.05cqw .64cqw;
  border-color: rgb(255 255 255 / .5) rgb(0 0 0 / .17) rgb(0 0 0 / .34) rgb(255 255 255 / .2);
  box-shadow: 0 0 0 .08cqw rgb(0 0 0 / .45); }
.mecanique .touche.plat-cotes .capuchon .haut { justify-content: center; }
.mecanique .touche .fleche-merge { width: 3.3cqw; height: 1.95cqw; display: block; margin-top: .22cqw; filter: drop-shadow(0 0 .2cqw rgb(0 0 0 / .45)); }
.mecanique .touche .mot-cle { color: #1d1d1d; text-shadow: none; opacity: 1; font-size: .86cqw; letter-spacing: -.08em; }
.mecanique .touche .principal:not(.mot) { font-size: 2.5cqw; }
.mecanique .touche .maj-car { font-size: 1.8cqw; }
/* Caractères jaunes calés en haut à droite de la touche (comme sur la machine), et non sur la ligne
   de base du caractère principal ; - et + gardent la place des chiffres. */
.mecanique .touche .haut { align-items: flex-start; }
.mecanique .touche .maj-car { line-height: 1; margin-top: -.1cqw; }
.mecanique .touche .principal.signe { position: relative; top: -.55cqw; }
.mecanique .touche .principal.signe.ponctuation { top: -1cqw; }   /* point à hauteur de la pointe de < et > */
.mecanique .touche .haut { gap: .2cqw; }
.mecanique .touche .maj-car { color: #ffe066; }
.mecanique .touche.sombre { background: #6b7280; }
.mecanique .touche.entree { background: #34384d; justify-content: center; align-items: center; }
.mecanique .touche.entree .haut { justify-content: center; }
.mecanique .touche.centre { align-items: center; text-align: center; }
.mecanique .touche.centre .haut { justify-content: center; }
.mecanique .touche.maj { background: #6b7280; display: flex; align-items: center; justify-content: center; }
.mecanique .touche.maj::after { content: ""; width: 1.7cqw; height: 1.45cqw; position: relative; top: -.2cqw; background: #f5c800; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.mecanique .touche.basic { background: #b4b2aa; color: #111; outline: none; text-shadow: none; font-size: 1.5cqw; font-weight: 600; letter-spacing: -.02em; }   /* même police et même taille que ENTREE */
.mecanique .touche.espace { background: #c8c6be; }
.clavier-virtuel.mecanique .accent { border: none; display: flex; align-items: center; white-space: nowrap; font-size: 2cqw; }
.clavier-virtuel.mecanique .accent::before { content: "╱"; color: #ddd; margin-right: .3cqw; }
/* MO5 NR (clavier du MO6) : boîtier beige, touches crème à inscriptions noires et mots-clés bleus,
   touches de fonction gris foncé, SHIFT et BASIC encadrés, bandeau mauve des accents. Repère de
   740 x 222 : textes un peu plus petits. */
.clavier-virtuel.nr { background: #d6d1c4; }
/* Bord biseauté de toutes les touches, comme ENTER : quatre biseaux en trapèze (bordures de
   couleurs différentes posées sur la couleur de la touche), éclairés en haut et à gauche, dans
   l'ombre à droite et en bas, autour d'une face plate légèrement dégradée. */
.nr .touche { background-color: #efebdf; color: #1a1a1a; border-radius: .15cqw; padding: .05cqw .2cqw; font-size: 2cqw;
  border-style: solid; border-width: .54cqw .95cqw .88cqw .54cqw;
  border-color: rgb(255 255 255 / .55) rgb(0 0 0 / .07) rgb(0 0 0 / .14) rgb(255 255 255 / .3);   /* bords clairs, comme le MO6 */
  background-image: linear-gradient(rgb(255 255 255 / .1), rgb(0 0 0 / .02));   /* face à peine dégradée, comme le MO6 */
  background-clip: border-box;   /* couleur sous les bords : le fond noir ne transparaît pas */
  box-shadow: 0 0 0 .07cqw rgb(0 0 0 / .4); }
.nr .touche.enfoncee, .nr .touche:active { box-shadow: 0 0 0 .07cqw rgb(0 0 0 / .4); }
.nr .touche .principal { font-size: 1.85cqw; }
.nr .touche .principal.mot { font-size: 1.15cqw; }
.nr .touche .maj-car { color: #1a1a1a; font-size: 1.5cqw; }
.nr .touche .mot-cle { color: #2563b8; font-size: .76cqw; line-height: 1; letter-spacing: -.07em; }
/* Toutes les inscriptions sont noires (sauf SHIFT et BASIC, en blanc sur leur cadre de couleur). */
/* Touches grises : gris plus clair, biseaux plus doux (un biseau blanc franc sur du gris foncé
   paraissait délavé). */
.nr .touche.sombre { background-color: #9a9993; color: #111; text-shadow: none; }
/* MO5 NR : biseaux réglés sur ceux de la touche ENTER : haut nettement éclairé, gauche, droite et
   bas à peine ombrés et proches entre eux, pour que les onglets des coins ne dessinent pas de
   triangles contrastés. */
.nr:not(.mo6) .touche:not(.entree-l) { border-color: rgb(255 255 255 / .5) rgb(0 0 0 / .03) rgb(0 0 0 / .09) rgb(0 0 0 / .05); border-radius: .05cqw;
  background-image: none; }
.nr:not(.mo6) .touche.sombre, .nr:not(.mo6) .touche.gris { border-color: rgb(255 255 255 / .35) rgb(0 0 0 / .04) rgb(0 0 0 / .12) rgb(0 0 0 / .07); }
.nr .touche.sombre .mot-cle, .nr .touche.gris .mot-cle { color: #1b4ea6; }
.nr .touche.gris { background-color: #9a9993; }
.nr .touche .fleche-merge { width: 2.4cqw; height: 1.4cqw; color: #2a2a2a; display: block; }
/* ENTER en L renversé : forme et relief dessinés en SVG ; la découpe limite le clic au L. */
.nr .touche.entree-l { background: none; box-shadow: none; padding: 0; border: none; border-radius: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 22.6% 100%, 22.6% 52.8%, 0 52.8%); }
.nr .touche.entree-l .forme { position: absolute; inset: 0; width: 100%; height: 100%; }
.nr .touche.entree-l .texte { position: absolute; left: 30%; right: 13%; top: 62%; text-align: center;
  font: 500 1cqw/1 system-ui, sans-serif; letter-spacing: .04em; color: #111; }
.nr .touche.entree-l.enfoncee, .nr .touche.entree-l:active { box-shadow: none; }
.nr .touche.centre { align-items: center; text-align: center; }
.nr .touche.centre .haut { justify-content: center; }
.nr .touche.maj, .nr .touche.basic { background-color: #efebdf; outline: none; display: flex; align-items: flex-start; justify-content: flex-start; }
.nr .touche.centre .principal { font-size: 1.5cqw; }
.nr .touche .cadre { font: 600 1.2cqw/1 system-ui, sans-serif; padding: .45cqw 1cqw; border-radius: .3cqw; margin-top: .3cqw; }
.nr .touche.maj .cadre { color: #fff; background: #1d6f8c; width: 60%; }
.nr .touche.basic .cadre { color: #fff; background: #2f66c5; width: 75%; }
.nr .touche.espace { background-color: #efebdf; }
.clavier-virtuel.nr .bandeau { background: #cfcbea; border: .12cqw solid #a8a3cf; }
.clavier-virtuel.nr .accent { border: none; color: #444; font-size: 1.7cqw; }
/* Fond noir sous les touches jointives (MO5 NR, MO5 mécanique) : un trait noir les sépare. */
.clavier-virtuel .fond-touche { background: #1e1e1c; }
/* MO6 (photo du clavier) : touches jointives sur fond noir, biseautées comme celles du MO5 NR ;
   caractères verts (avec MAJ, la touche MAJ porte un triangle vert), mots-clés bleus, ENT toute jaune
   (biseaux compris), BASIC à triangle bleu, voyant rouge du SHIFT LOCK centré en bas, bandeau
   sombre des touches de fonction prolongé par une rainure ; touches larges à côtés plats. */
.clavier-virtuel.mo6 { background: #ddd8cb; }
.clavier-virtuel.mo6 .bandeau-fonctions { background: #2b2b29; border-radius: .25cqw; }
.clavier-virtuel.mo6 .rainure { background: #e4dfd2; box-shadow: inset 0 .25cqw .3cqw rgb(0 0 0 / .35), inset 0 -.1cqw 0 rgb(255 255 255 / .5); }
.clavier-virtuel.mo6 .fond-touches { background: #1e1e1c; border-radius: .25cqw; }
/* Ombrage plus clair que celui du MO5 NR (touches crème sous un éclairage diffus, comme la photo). */
/* Biseaux réglés comme ceux du MO5 NR (sur la touche ENTER) : haut éclairé, autres côtés à peine
   ombrés et proches entre eux, sans triangles aux coins. */
.mo6 .touche { border-color: rgb(255 255 255 / .5) rgb(0 0 0 / .03) rgb(0 0 0 / .09) rgb(0 0 0 / .05);
  background-image: none; background-clip: border-box; border-radius: .05cqw; }
.mo6 .touche .maj-car { color: #2c8a3c; font-size: 1.25cqw; }
.mo6 .touche .principal { font-size: 1.65cqw; }
.mo6 .touche .principal.mot { font-size: 1.05cqw; }
.mo6 .touche .mot-cle { font-size: .66cqw; align-self: center; text-align: center; }   /* mot-clé centré (photo) */
.mo6 .touche.ins { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.mo6 .touche.ins .nom { font: 600 1.05cqw/1 system-ui, sans-serif; margin-bottom: .35cqw; }
.mo6 .touche.plat-cotes.raz .capuchon { align-items: center; justify-content: center; gap: .2cqw; }
.mo6 .touche.sombre, .mo6 .touche.gris { background-color: #efebdf; }
.mo6 .touche.jaune { background-color: #f7d708; align-items: center; justify-content: center;
  border-color: #fff27a #f0cd05 #e2bf00 #ecc904;
  background-image: none; }
.mo6 .touche.jaune .haut { justify-content: center; }
.mo6 .touche.jaune .principal { font-size: 1.15cqw; }
.mo6 .touche .triangle-vert { width: 1.7cqw; height: 1.45cqw; background: #2c9a3e; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.mo6 .touche.basic .triangle { width: 1.5cqw; height: 1.3cqw; background: #2f5fc8; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.mo6 .touche.basic .nom { color: #2f5fc8; font: 600 .75cqw/1 system-ui, sans-serif; margin-top: .65cqw; }
.mo6 .touche.verrou-maj { overflow: visible; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.mo6 .touche.verrou-maj .nom { font: 600 .9cqw/1.05 system-ui, sans-serif; }
/* Voyant encastré dans la tranche avant (bord bas) : vu en biais, donc écrasé et en trapèze. */
.mo6 .touche.verrou-maj .voyant-rouge {
  position: absolute; left: 50%; bottom: -.74cqw; width: 1.3cqw; height: .55cqw; border-radius: .08cqw;
  background: linear-gradient(#f0463c, #c41d16 60%, #8f120d);
  transform: translateX(-50%) perspective(3cqw) rotateX(42deg); transform-origin: 50% 100%;
  box-shadow: inset 0 .05cqw .05cqw rgb(255 255 255 / .35), 0 0 0 .05cqw rgb(0 0 0 / .25);
}
.mo6 .touche.raz { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mo6 .touche.raz .nom { color: #2c8a3c; font: 600 1cqw/1 system-ui, sans-serif; }
.mo6 .touche.raz .fleche { width: 1.75cqw; height: 1.3cqw; display: block; color: #1a1a1a; margin-top: .25cqw; }
.mo6 .touche.eff { display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding-block: .45cqw .4cqw; }
.mo6 .touche.eff .vert { color: #2c8a3c; font: 600 1.05cqw/1 system-ui, sans-serif; }
.mo6 .touche.eff .nom { font: 600 1.05cqw/1 system-ui, sans-serif; }
.mo6 .touche.fonction { flex-direction: row; align-items: center; justify-content: space-between; padding: 0 .5cqw; border-width: .3cqw .5cqw .45cqw .3cqw; }
.mo6 .touche.fonction .vert { color: #2c8a3c; font: 600 1cqw/1 system-ui, sans-serif; }
.mo6 .touche.fonction .nom { font: 600 1cqw/1 system-ui, sans-serif; }
/* Touche large à côtés plats : la case est plate (sans biseau), le capuchon en relief. */
.mo6 .touche.plat-cotes { border: none; padding: 0; background: #e3dfd3; box-shadow: 0 0 0 .07cqw rgb(0 0 0 / .4); }
.mo6 .touche.plat-cotes .capuchon { position: absolute; top: 0; bottom: 0; box-sizing: border-box; display: flex; flex-direction: column;
  justify-content: space-between; align-items: stretch; padding: .05cqw .2cqw; background-color: #efebdf;
  border-style: solid; border-width: .54cqw .95cqw .88cqw .54cqw; border-radius: .05cqw;
  border-color: rgb(255 255 255 / .5) rgb(0 0 0 / .03) rgb(0 0 0 / .09) rgb(0 0 0 / .05);
  box-shadow: 0 0 0 .07cqw rgb(0 0 0 / .4); }
.mo6 .touche.plat-cotes.centre .capuchon, .mo6 .touche.plat-cotes.maj .capuchon, .mo6 .touche.plat-cotes.basic .capuchon { align-items: center; text-align: center; }
.mo6 .touche.plat-cotes.maj .capuchon, .mo6 .touche.plat-cotes.basic .capuchon { justify-content: center; gap: .25cqw; }
.mo6 .touche.plat-cotes.centre .capuchon .haut { justify-content: center; }
.init-prog {
  background: none; border: none; padding: 0; color: #ddd; font: 600 1.3cqw/1 system-ui, sans-serif;
  display: flex; align-items: center; gap: 1.2cqw; cursor: pointer; text-align: left;
}
.init-prog .voyant { width: 2.6cqw; height: 1.6cqw; background: #fff; border-radius: .2cqw; flex: none; }
.init-prog:hover { color: #fff; }

/* ------------------------------------------------------------ panneau réseau */
.reseau {
  width: min(460px, 42vw); border-left: 1px solid var(--bord); background: var(--surface);
  display: flex; flex-direction: column; min-height: 0;
}
@media (max-width: 760px) { .corps { flex-direction: column; } .reseau { width: auto; height: 45vh; border-left: none; border-top: 1px solid var(--bord); } }
.reseau-entete { padding: 10px 12px; border-bottom: 1px solid var(--bord); }
.reseau-entete h2 { font-size: 14px; margin: 0 0 8px; }
.reseau-filtres { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.reseau-filtres button, .reseau-filtres select { padding: 2px 8px; font-size: 12px; }
.journal { list-style: none; margin: 0; padding: 4px 0; overflow: auto; flex: 1; font: 12px/1.4 var(--mono); }
.journal li { display: grid; grid-template-columns: 64px 34px 22px 1fr; gap: 6px; padding: 2px 12px; border-bottom: 1px solid color-mix(in srgb, var(--bord) 45%, transparent); }
.journal li .h { color: var(--texte-2); }
.journal li .p { font-weight: 700; }
.journal li .d { overflow-wrap: anywhere; }
.journal li .d b { font-weight: 700; }
.journal li .d i { font-style: normal; color: var(--texte-2); }
.journal li.poste .s { color: var(--bleu); }
.journal li.central .s { color: var(--accent); }
.journal li.ligne { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.journal li.echec .d { color: var(--accent); }
.journal li.pont { box-shadow: inset 3px 0 0 var(--vert); }
.journal li .via { display: inline-block; padding: 0 5px; border-radius: 4px; background: color-mix(in srgb, var(--vert) 20%, transparent); color: var(--vert); font-weight: 700; }

/* ------------------------------------------------------------ dialogues */
dialog { border: 1px solid var(--bord); border-radius: 12px; background: var(--surface); color: var(--texte); padding: 20px; width: min(460px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgb(0 0 0 / .25); }
dialog::backdrop { background: rgb(0 0 0 / .35); }
dialog h2 { margin: 0 0 14px; font-size: 17px; }
dialog label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 13px; color: var(--texte-2); }
dialog label select, dialog label input { color: var(--texte); }
dialog details { margin-bottom: 12px; font-size: 13px; }
dialog summary { cursor: pointer; margin-bottom: 8px; color: var(--bleu); }
dialog textarea { width: 100%; font-family: var(--mono); }
.boutons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.erreur { color: var(--accent); font-size: 13px; }

/* ------------------------------------------------------------ imprimante */
.pastille-nombre { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
dialog.large { width: min(1000px, calc(100vw - 32px)); height: min(700px, calc(100vh - 48px)); padding: 0; }
dialog.large[open] { display: flex; flex-direction: column; }
.imp-entete { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--bord); }
.imp-entete h2 { margin: 0; }
.imp-entete .aide { margin: 0; }
.imp-corps { flex: 1; display: grid; grid-template-columns: minmax(200px, 280px) 1fr; min-height: 0; }
@media (max-width: 700px) { .imp-corps { grid-template-columns: 1fr; grid-template-rows: 35% 1fr; } }
.imp-liste { list-style: none; margin: 0; padding: 6px; overflow: auto; border-right: 1px solid var(--bord); }
.imp-liste li { padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.imp-liste li:hover { background: var(--surface-2); }
.imp-liste li.choisi { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.imp-liste li b { display: block; }
.imp-liste li span { color: var(--texte-2); font-size: 12px; }
.imp-liste li.attente { cursor: default; color: var(--texte-2); font-style: italic; }
.imp-apercu { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.imp-outils { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--bord); font-size: 13px; }
.papier {
  flex: 1; margin: 0; overflow: auto; padding: 18px 28px; font: 13px/1.6 var(--mono); color: #222;
  background: repeating-linear-gradient(#fdfdf6 0 3.2em, #e6f1e3 3.2em 6.4em); white-space: pre;
}
.papier .aide { color: #777; white-space: normal; }
.titre-impression { white-space: pre; color: #333; }
.titre-impression .double span { display: inline-block; transform: scaleX(2); transform-origin: 0 0; }
.titre-impression .saut-page, .papier .separation { border-top: 1px dashed #b9b9a8; margin: 6px 0 10px; }
.papier .separation { font: 11px var(--sans, sans-serif); color: #888; padding-top: 2px; white-space: normal; }
.papier canvas.recopie { display: block; width: 100%; max-width: 640px; image-rendering: pixelated; margin: 0 auto; }

/* ------------------------------------------------------------ central */
#dialogue-central select[size] { width: 100%; font-family: var(--mono); }
.postes-diffusion { border: 1px solid var(--bord); border-radius: 8px; margin: 0 0 12px; padding: 8px 12px; }
.postes-diffusion legend { font-size: 13px; color: var(--texte-2); padding: 0 4px; }
#diffusion-postes { display: flex; flex-wrap: wrap; gap: 6px 14px; }
#diffusion-postes label { flex-direction: row; align-items: center; gap: 6px; margin: 0; color: var(--texte); }
.boutons .espace { flex: 1; }

/* ------------------------------------------------------------ connexion et utilisateur */
.connexion { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: var(--fond); padding: 16px; }
.connexion[hidden] { display: none; }
.connexion-carte {
  width: min(420px, 100%); background: var(--surface); border: 1px solid var(--bord); border-radius: 14px;
  box-shadow: var(--ombre); padding: 24px; display: flex; flex-direction: column; gap: 12px;
}
.connexion-carte h1 { font-size: 20px; margin: 6px 0 0; }
.connexion-carte label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--texte-2); }
.connexion-carte input { font: inherit; padding: 8px 10px; border: 1px solid var(--bord); border-radius: 8px; background: var(--fond); color: var(--texte); }
.connexion-carte .label[hidden], .connexion-carte label[hidden] { display: none; }
.connexion-carte .aide { margin: 0; font-size: 13px; }
.connexion-carte .boutons { margin: 4px 0 0; }
.segment.roles, .segment.types-poste { display: flex; }
.segment.roles button, .segment.types-poste button { flex: 1; }
.erreur { color: var(--accent); margin: 0; font-size: 13px; }
.utilisateur { display: flex; align-items: center; gap: 8px; margin-left: 6px; padding-left: 12px; border-left: 1px solid var(--bord); }
.utilisateur[hidden] { display: none; }
.pseudo-moi { font-size: 13px; font-weight: 600; white-space: nowrap; }
.pseudo-moi .role { font-weight: 500; color: var(--texte-2); margin-left: 4px; }
.pseudo { font-size: 12px; font-weight: 600; color: var(--bleu); }
.carte.reel-attente .vignette { background: #1c1b19; }
body.eleve [data-enseignant] { display: none !important; }
.types-poste { margin-bottom: 4px; }
#dialogue-nouveau .roms[hidden], #dialogue-nouveau .roms label[hidden], #dialogue-nouveau .champ-numero[hidden] { display: none; }

/* ------------------------------------------------------------ configuration */
.cfg { display: flex; flex-direction: column; height: 100%; margin: 0; }
.cfg .imp-entete .espace { flex: 1; }
.cfg-corps { flex: 1; overflow: auto; padding: 16px 18px; }
.cfg-pied { margin: 0; padding: 10px 18px; border-top: 1px solid var(--bord); align-items: center; }
.cfg-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 16px; }
.cfg-cadre { border: 1px solid var(--bord); border-radius: 8px; margin: 0 0 14px; padding: 8px 12px 10px; }
.cfg-cadre legend { font-size: 13px; color: var(--texte-2); padding: 0 4px; }
.cfg-cadre .aide { margin: 6px 0 0; font-size: 12px; }
.cfg-ligne { display: flex; flex-wrap: wrap; gap: 6px 22px; }
dialog label.case { flex-direction: row; align-items: center; gap: 6px; margin: 0; color: var(--texte); }
.cfg-disques { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.cfg-disques label { margin: 0; }
.cfg-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cfg-table th { text-align: left; font-weight: 600; color: var(--texte-2); padding: 4px 6px; border-bottom: 1px solid var(--bord); }
.cfg-table td { padding: 5px 6px; border-bottom: 1px solid var(--bord); vertical-align: middle; }
.cfg-table td.sig { font: 11px/1.35 var(--mono); }
.cfg-table td.sig .ascii { color: var(--texte-2); }
.cfg-table input[type="text"] { width: 100%; min-width: 7em; font-family: var(--mono); background: var(--surface); border: 1px solid var(--bord); border-radius: 6px; padding: 3px 6px; }
.cfg-table input.libelle { min-width: 16em; }
.cfg-table select { padding: 3px 4px; }
.cfg-table button { padding: 2px 8px; }
.cfg-menu { margin-bottom: 18px; }
.cfg-menu h3 { font-size: 14px; margin: 0 0 6px; }
#cfg-inconnues { margin-top: 14px; font-size: 13px; }
#cfg-inconnues h3 { font-size: 14px; margin: 0 0 6px; }
#cfg-message.erreur { color: var(--accent); }

/* ------------------------------------------------------------ plateforme : logiciel courant */
.lien-catalogue {
  display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 2px;
  border-radius: 6px; color: var(--texte-2); text-decoration: none; font-size: 20px; line-height: 1;
}
.lien-catalogue:hover { background: var(--surface-2); color: var(--texte); }
.barre .marque { min-width: 0; }
.barre .marque:has(.nom-logiciel:not([hidden])) .marque-texte { display: none; }
.barre .nom-logiciel { max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connexion-logiciel { margin: 4px 0 0; font-weight: 600; color: var(--accent); }

/* ------------------------------------------------------------ plateforme : page générale */
.page-logiciels { flex: 1; overflow: auto; scrollbar-gutter: stable; }
.cat-contenu { max-width: 1180px; margin: 0 auto; padding: 20px 16px 48px; }
.cat-outils { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 18px; }
.cat-outils input[type=search] {
  flex: 1 1 240px; min-width: 0; padding: 8px 12px; border: 1px solid var(--bord); border-radius: 8px; background: var(--surface);
}
.cat-outils .segment button { padding: 6px 12px; }
.cat-info { color: var(--texte-2); margin: 0 0 18px; font-size: 13px; }
.cat-info code { font-family: var(--mono); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.cat-groupe { margin: 0 0 26px; }
.cat-groupe > h2 {
  font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-2);
  margin: 0 0 10px; display: flex; gap: 8px; align-items: baseline;
}
.cat-groupe > h2 .n { font-weight: 400; letter-spacing: 0; text-transform: none; }
.cat-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cat-carte {
  display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--bord); border-radius: 10px;
  background: var(--surface); color: inherit; text-decoration: none; box-shadow: var(--ombre); min-width: 0;
}
a.cat-carte:hover { border-color: var(--accent); }
a.cat-carte:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cat-carte.indisponible { opacity: .55; box-shadow: none; }
.cat-icone {
  aspect-ratio: 4 / 3; width: 100%; border-radius: 6px; background: #000; object-fit: cover; image-rendering: pixelated;
  display: grid; place-items: center; color: #8a8478; font: 700 22px var(--mono);
}
.cat-titre { font-weight: 650; line-height: 1.25; }
.cat-meta { color: var(--texte-2); font-size: 12px; }
.cat-etat { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.cat-etat span { padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--texte-2); }
.cat-etat .actif { background: color-mix(in srgb, var(--vert) 18%, transparent); color: var(--vert); }
.cat-vide { color: var(--texte-2); padding: 40px 0; text-align: center; }

/* ------------------------------------------------------------ plateforme : administration */
.adm { display: flex; flex-direction: column; gap: 18px; }
.adm-bloc { background: var(--surface); border: 1px solid var(--bord); border-radius: 12px; padding: 16px 18px; box-shadow: var(--ombre); min-width: 0; }
.adm-bloc h2 { margin: 0 0 8px; font-size: 16px; display: flex; gap: 8px; align-items: baseline; }
.adm-bloc h2 .n { color: var(--texte-2); font-weight: 400; font-size: 13px; }
.adm-bloc .cat-info { margin-bottom: 10px; }
.adm-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 14px; }
.adm-grille label, .adm-depot, .adm-ligne label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--texte-2); min-width: 0; }
.adm-grille .large { grid-column: 1 / -1; }
.adm-grille .boutons { margin: 0; }
.adm-grille input, .adm-grille select, #filtre {
  padding: 7px 10px; border: 1px solid var(--bord); border-radius: 6px; background: var(--fond); color: var(--texte); min-width: 0;
}
.adm-depot { max-width: 420px; }
#filtre { width: min(320px, 100%); margin-bottom: 10px; }
.adm-fichiers { font: 12px/1.6 var(--mono); color: var(--texte-2); margin: 0 0 10px; word-break: break-word; }
.adm-fichiers b { font-family: system-ui, sans-serif; color: var(--texte); font-weight: 600; }
.adm-ligne { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; margin-bottom: 10px; }
.adm-ligne label { margin: 0; }
.adm-table-defil { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th { text-align: left; font-weight: 600; color: var(--texte-2); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--bord); white-space: nowrap; }
.adm-table td { padding: 7px 8px; border-bottom: 1px solid var(--surface-2); vertical-align: middle; }
.adm-table tr:last-child td { border-bottom: none; }
.adm-table .titre { display: flex; gap: 10px; align-items: center; min-width: 220px; }
.adm-table .titre img, .adm-table .titre .sans { width: 48px; height: 36px; border-radius: 4px; object-fit: cover; image-rendering: pixelated; background: #000; flex: none; }
.adm-table .slug { color: var(--texte-2); font: 11px var(--mono); }
.adm-table .mo5 { font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.adm-table .col-active { width: 1%; white-space: nowrap; text-align: center; }
.adm-table th.col-active label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.adm-table input[type=checkbox] { width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: var(--accent, currentColor); }
.adm-table tr.inactif td:not(.col-active):not(.actions) { opacity: .45; }
.adm-table .masque { color: var(--texte-2); font-size: 12px; font-style: italic; }
.adm-table .actions { text-align: right; white-space: nowrap; }
.adm-table .indispo { color: var(--accent); font-size: 12px; }
.avis-adm { position: fixed; top: 64px; right: 16px; left: auto; z-index: 40; max-width: min(520px, calc(100vw - 32px)); box-shadow: var(--ombre); margin: 0; padding: 10px 14px; border-radius: 8px; background: color-mix(in srgb, var(--vert) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--vert) 35%, transparent); }
.avis-adm.ko { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
body.occupe { cursor: progress; }

/* ------------------------------------------------------------ plateforme : fiche d'un logiciel */
.fiche { display: flex; flex-direction: column; gap: 22px; }
.fiche-tete { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.fiche-icone { width: 216px; aspect-ratio: 4 / 3; object-fit: cover; image-rendering: pixelated; border-radius: 8px; background: #000; box-shadow: var(--ombre); }
.fiche-infos { flex: 1 1 320px; min-width: 0; }
.fiche-infos h1 { margin: 0 0 10px; font-size: 26px; line-height: 1.2; }
.fiche-dl { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0 0 12px; }
.fiche-dl div { display: flex; gap: 6px; }
.fiche-dl dt { color: var(--texte-2); }
.fiche-dl dd { margin: 0; font-weight: 600; }
.fiche-description { margin: 0 0 14px; max-width: 70ch; }
.fiche-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
a.bouton {
  display: inline-block; padding: 8px 16px; border-radius: 6px; text-decoration: none; border: 1px solid var(--bord);
  background: var(--surface); color: var(--texte);
}
a.bouton.principal { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); font-weight: 600; }
a.bouton[hidden] { display: none; }
.fiche-lecteurs { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.fiche-disquette { background: var(--surface); border: 1px solid var(--bord); border-radius: 10px; padding: 8px 12px; flex: 0 1 380px; min-width: 0; }
.fiche-disquette summary { display: flex; gap: 10px; align-items: center; cursor: pointer; list-style: none; }
.fiche-disquette summary::-webkit-details-marker { display: none; }
.fiche-disquette .n { color: var(--texte-2); font-size: 12px; margin-left: auto; }
.fiche-disquette p { margin: 8px 0 2px; }
.disquette {
  width: 26px; height: 26px; border-radius: 3px; background: #2b2b2b; position: relative; flex: none;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12);
}
.disquette::before { content: ""; position: absolute; left: 6px; right: 6px; top: 2px; height: 8px; background: #c9c9c9; border-radius: 1px; }
.disquette::after { content: ""; position: absolute; left: 9px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: #9a9a9a; }
.fiche-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.fiche-vignette {
  padding: 4px; border: 1px solid var(--bord); border-radius: 6px; background: var(--surface); cursor: zoom-in; display: block;
}
.fiche-vignette:hover { border-color: var(--accent); }
.fiche-vignette img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; image-rendering: pixelated; background: #000; }
.loupe {
  position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .85); display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px;
}
.loupe[hidden] { display: none; }
.loupe img { width: min(960px, calc(100vw - 140px)); height: auto; max-height: calc(100vh - 80px); object-fit: contain; image-rendering: pixelated; cursor: zoom-out; min-width: 0; }
.loupe-nav { background: rgb(255 255 255 / .12); color: #fff; border: none; font-size: 30px; width: 44px; height: 64px; border-radius: 8px; flex: none; }
.loupe-legende { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #ddd; font-size: 13px; }
@media (max-width: 600px) { .fiche-icone { width: 100%; } .loupe-nav { width: 34px; } }
.adm-repli > summary { cursor: pointer; list-style: none; }
.adm-repli > summary::-webkit-details-marker { display: none; }
.adm-repli > summary h2 { display: inline-flex; margin: 0; }
.adm-repli > summary h2::before { content: "+"; color: var(--accent); font-weight: 700; margin-right: 6px; }
.adm-repli[open] > summary h2::before { content: "−"; }
.adm-repli[open] > summary { margin-bottom: 8px; }
.adm-grille textarea, #form-logiciel textarea {
  padding: 7px 10px; border: 1px solid var(--bord); border-radius: 6px; background: var(--fond); color: var(--texte);
  font: inherit; resize: vertical; min-width: 0; width: 100%; box-sizing: border-box;
}
.fiche-description { white-space: pre-line; }
a.fiche-doc { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
a.fiche-doc:hover { border-color: var(--accent); }
a.fiche-doc .n { color: var(--texte-2); font-size: 12px; margin-left: auto; }
.doc-pdf {
  width: 22px; height: 28px; flex: none; border-radius: 2px 7px 2px 2px; background: #fff; border: 1px solid #c9c9c9;
  display: grid; place-items: end center; padding-bottom: 3px; box-sizing: border-box;
  font: 700 7px/1 system-ui, sans-serif; color: #fff; position: relative;
}
.doc-pdf::after { content: "PDF"; position: absolute; left: -3px; right: -3px; bottom: 5px; background: var(--accent); border-radius: 2px; text-align: center; padding: 1px 0; }

.adm-sous-titre { font-size: 14px; margin: 14px 0 6px; padding-top: 10px; border-top: 1px solid var(--bord); }
.adm-depot-ligne { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 8px; }
.adm-depot-ligne label { flex: 1 1 240px; min-width: 0; }
#erreur-logiciel.ok { color: var(--vert); }

/* Touches verrouillées (MAJ, CNT, BASIC enfoncées au premier clic, relâchées après la touche
   suivante) : même repère sur tous les claviers, y compris là où la touche n'a pas de contour
   (SHIFT et BASIC du MO5 NR et du MO6). En fin de feuille pour l'emporter. */
/* Voyant du SHIFT LOCK éteint (minuscules) : rouge sombre, sans reflet. */
.mo6 .touche.verrou-maj .voyant-rouge.eteint { background: linear-gradient(#5a2622, #3e1714 60%, #2a0f0d); box-shadow: inset 0 .05cqw .05cqw rgb(255 255 255 / .12), 0 0 0 .05cqw rgb(0 0 0 / .25); }
.clavier-virtuel .touche.verrou { outline: .45cqw solid var(--ambre); outline-offset: .1cqw; }

/* TO8D : clavier du MO6, pavé numérique gris à droite, voyants verts en haut à droite. */
.mo6.to8d .touche.pave { background-color: #c4c1b9; }
.mo6.to8d .touche.pave .principal { font-size: 1.4cqw; font-weight: 500; }
.mo6.to8d .touche.pave .principal.mot { font-size: .95cqw; }
.mo6.to8d .touche.pave[data-code="38"] .principal { position: relative; top: 1.1cqw; font-weight: 700; }
.clavier-virtuel .voyant-to8 { position: absolute; background: #3a3a36; border-radius: .2cqw; box-shadow: inset 0 0 0 .05cqw rgb(0 0 0 / .4); }
.mo6.to8d .touche.verrou-maj .nom { font-size: .8cqw; }

/* TO8D (photo) : arête du capot, rainures prolongeant le bandeau des touches de fonction, cache en
   plastique transparent fumé sous F1-F5 (bout gauche arrondi), logos sous les voyants, caractères
   centrés (vert au-dessus du noir), petit triangle vert de MAJ dans le haut de la touche. */
.clavier-virtuel .ligne-to8 { position: absolute; background: linear-gradient(#a59e8b, #a59e8b 50%, #faf8f2 50%); }
.clavier-virtuel .cache-to8 { position: absolute; border-radius: 0 .15cqw .15cqw 0;
  /* bout gauche en creux (échancrure arrondie vers la droite), avec son arête sombre */
  -webkit-mask: radial-gradient(circle at -.6cqw 50%, transparent 1.15cqw, #000 1.17cqw);
  mask: radial-gradient(circle at -.6cqw 50%, transparent 1.15cqw, #000 1.17cqw);
  background:
    radial-gradient(circle at -.6cqw 50%, transparent 1.15cqw, rgb(70 80 85 / .6) 1.17cqw, rgb(70 80 85 / .6) 1.25cqw, transparent 1.3cqw),
    linear-gradient(115deg, transparent 9%, rgb(255 255 255 / .7) 9.3%, rgb(255 255 255 / .7) 11%, transparent 11.3%, transparent 12.5%, rgb(255 255 255 / .5) 12.8%, rgb(255 255 255 / .5) 13.4%, transparent 13.7%, transparent 61%, rgb(255 255 255 / .45) 61.3%, rgb(255 255 255 / .45) 63%, transparent 63.3%),
    linear-gradient(rgb(255 255 255 / .8), rgb(225 238 240 / .3) 22%, rgb(190 210 215 / .22) 65%, rgb(110 130 135 / .35));
  box-shadow: inset 0 .1cqw 0 rgb(255 255 255 / .9), inset 0 -.12cqw 0 rgb(70 80 85 / .55), inset -.1cqw 0 0 rgb(70 80 85 / .4),
    0 .15cqw .25cqw rgb(0 0 0 / .18); }
.clavier-virtuel .logo-to8 { position: absolute; display: flex; justify-content: center; align-items: center; }
.clavier-virtuel .logo-to8 svg { height: 100%; width: auto; }
.mo6.to8d .touche.centre-to8 .haut, .mo6.to8d .touche.centre-to8 .capuchon .haut { flex-direction: column-reverse; align-items: center; justify-content: center; gap: .15cqw; width: 100%; margin-top: .2cqw; }
.mo6.to8d .touche.centre-to8 .principal { font-size: 1.5cqw; line-height: 1; }
.mo6.to8d .touche.centre-to8 .haut:has(.maj-car) .principal { font-size: 1.2cqw; }
.mo6.to8d .touche.centre-to8 .maj-car { font-size: 1.2cqw; line-height: 1; }
.mo6.to8d .touche .triangle-vert { width: 1.05cqw; height: .9cqw; position: relative; top: -.9cqw; }
/* TO8D : deux caractères superposés dans des lignes de hauteur fixe, pour que vert et noir soient
   à la même hauteur (ligne de base commune) sur toutes les touches d'une rangée. */
.mo6.to8d .touche.centre-to8 .haut:has(.maj-car) { gap: .2cqw; }
.mo6.to8d .touche.centre-to8 .haut:has(.maj-car) > span { display: block; height: 1.2cqw; line-height: 1.2cqw; text-align: center; }
/* TO8D, TO9+ : étiquettes des touches de fonction sous la languette (papier clair, séparées par un trait sombre,
   barrées d'un trait montant de gauche à droite). */
.clavier-virtuel .etiquette-to8 { position: absolute; box-sizing: border-box; background: #f3f1ea;
  border-left: .15cqw solid #3d3b35; }
.clavier-virtuel .etiquette-to8.premiere { border-left: none; }
.clavier-virtuel .etiquette-to8 svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.clavier-virtuel .etiquette-to8 line { stroke: #4a4842; stroke-width: 1.2px; }
/* TO9+ : bande en creux (ombre portée sous l'arête du haut, bord bas éclairé), touches de fonction
   dans un simple joint sombre. */
/* palier intermédiaire : plus haut que le cadre du clavier, plus bas que la bande du haut */
.clavier-virtuel .creux-to9 { position: absolute; background: linear-gradient(#cfc9bc, #e2ded3 14%, #e6e2d8 30%, #e9e5dc);
  box-shadow: 0 -.18cqw 0 #fdfcf8, inset 0 .12cqw 0 #8f897b; }   /* pas d'ombre sur les côtés : palier, pas creux */
.clavier-virtuel .dessus-to9 { position: absolute; background: linear-gradient(#f1eee6, #f6f4ee);
  box-shadow: -.12cqw 0 .15cqw rgb(0 0 0 / .15), .12cqw 0 .15cqw rgb(0 0 0 / .15); }
.clavier-virtuel .listel-to9 { position: absolute;   /* même aspect que l'arête du haut : liseré clair, trait sombre, ombre */
  background: linear-gradient(#fdfcf8 0 55%, #8f897b 55% 100%); box-shadow: 0 .3cqw .4cqw rgb(0 0 0 / .22); }
.clavier-virtuel.mo6 .bandeau-fonctions.fin { background: #5d5950; border-radius: .15cqw; }

/* TO7/70 (photo) : boîtier et touches noirs, caractères blancs (MAJ en jaune au-dessus), touches de
   fonction grises, ENTREE jaune, MAJ marquées d'un point jaune, accents gris au-dessus de 6 à 0,
   voyant « min » près d'ACC. */
.clavier-virtuel.to770 { background: linear-gradient(#262626, #1b1b1b); }
.to770 .touche { border-radius: .55cqw; padding: 0; justify-content: center; align-items: center; text-align: center;
  color: #f4f4f2; background: linear-gradient(#3c3c3b, #2a2a29 55%, #222221);
  box-shadow: inset 0 .12cqw 0 rgb(255 255 255 / .16), inset 0 -.35cqw 0 rgb(0 0 0 / .45), 0 0 0 .12cqw #0c0c0c; }
.to770 .touche .haut { flex-direction: column-reverse; align-items: center; justify-content: center; gap: .1cqw; width: 100%; }
.to770 .touche .principal { font: 500 1.75cqw/1 "DIN Alternate", "Bahnschrift", system-ui, sans-serif; }
.to770 .touche .haut:has(.maj-car) .principal { font-size: 1.5cqw; }
.to770 .touche .maj-car { color: #f2cf1d; font: 500 1.4cqw/1 system-ui, sans-serif; }
.to770 .touche.mot-to7 .principal { font-size: 1.05cqw; letter-spacing: 0; }
.to770 .touche.gris { background: linear-gradient(#b4b4b1, #9a9a97 60%, #8c8c89); color: #fff; text-shadow: 0 0 .15cqw rgb(0 0 0 / .35); }
.to770 .touche.entree { background: linear-gradient(#ffe03a, #f6cb00 60%, #e8bd00); color: #fff; }
.to770 .touche.entree .principal { font-size: 1.15cqw; text-shadow: 0 0 .15cqw rgb(0 0 0 / .25); }
.to770 .touche.maj { background: linear-gradient(#3c3c3b, #2a2a29 55%, #222221); }
.to770 .touche .point-jaune { width: .9cqw; height: .9cqw; border-radius: 50%; background: #f2cf1d; }
.to770 .touche.espace { background: linear-gradient(#3c3c3b, #2a2a29 55%, #222221); }
.to770 .touche[data-code="49"] .principal { font-size: 2.6cqw; }
.clavier-virtuel .accent-to7 { color: #9a9a96; font: 500 1.5cqw/1 system-ui, sans-serif; display: grid; place-items: center; }
.clavier-virtuel .libelle-min { color: #cfcfcb; font: 500 1.1cqw/1 system-ui, sans-serif; display: grid; place-items: center; }
.clavier-virtuel .voyant-min { border-radius: 50%; background: radial-gradient(circle at 40% 35%, #4a1612, #2a0b09 70%);
  box-shadow: inset 0 .05cqw .1cqw rgb(0 0 0 / .6), 0 0 0 .1cqw #0c0c0c; }
.clavier-virtuel .voyant-min.allume { background: radial-gradient(circle at 40% 35%, #ff8a70, #e2261b 55%, #9e130d); box-shadow: 0 0 .5cqw rgb(255 60 40 / .7); }
/* TO7/70 : touches à deux caractères, le jaune calé en haut de la touche (même hauteur sur toute la
   rangée), le blanc en dessous. */
.to770 .touche:has(.maj-car) { justify-content: flex-start; }
.to770 .touche .haut:has(.maj-car) { justify-content: flex-start; gap: .25cqw; margin-top: .45cqw; }
.to770 .touche .haut:has(.maj-car) > span { display: block; height: 1.5cqw; line-height: 1.5cqw; }
/* TO7 (photo) : touches plates gris foncé à rebord clair (clavier à membrane), touches de fonction
   gris clair à texte sombre, ENTREE jaune à texte sombre. */
.clavier-virtuel.to7 { background: linear-gradient(#2e2f2d, #222321); }
.to7 .touche { border-radius: .35cqw; background: linear-gradient(#64645f, #56564f); color: #f2f2ee;
  box-shadow: inset 0 0 0 .22cqw #8e8e86, inset 0 0 0 .32cqw #3b3b37, 0 .12cqw .2cqw rgb(0 0 0 / .6); }
.to7 .touche.gris { background: linear-gradient(#e4e4e1, #cfcfcb); color: #3a3a37; text-shadow: none;
  box-shadow: inset 0 0 0 .22cqw #f4f4f1, inset 0 0 0 .32cqw #9c9c96, 0 .12cqw .2cqw rgb(0 0 0 / .6); }
.to7 .touche.entree { background: linear-gradient(#f6e33c, #e9d21f); color: #2a2a26;
  box-shadow: inset 0 0 0 .22cqw #fbef8a, inset 0 0 0 .32cqw #a99a17, 0 .12cqw .2cqw rgb(0 0 0 / .6); }
.to7 .touche.entree .principal { text-shadow: none; }
.to7 .touche.maj, .to7 .touche.espace { background: linear-gradient(#64645f, #56564f); }
.to770 .touche .fleche-merge { width: 3.3cqw; height: 2.75cqw; display: block; }

/* ------------------------------------------------------------ console du banc de test (MO5 N) */
/* Reconstitution : tôle beige émaillée, plaque gravée, voyants, afficheur fluorescent, clavier
   numérique, imprimante à ruban. Objet physique : mêmes couleurs dans les deux thèmes. */
.ecran-ligne { display: flex; justify-content: center; align-items: stretch; column-gap: 12px; }
.ecran-ligne > .ecran-cadre { margin: 0; flex: 0 1 auto; align-self: flex-start; }
.console-banc {
  --tole: #d6cfbf; --tole-ombre: #a89f8b; --encre: #26231e;
  /* Hauteur de l'écran (contain : son contenu ne grandit pas la ligne) ; défile s'il déborde. */
  flex: 0 0 560px; contain: size; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-height: 0; overflow: auto;
  padding: 10px 11px 11px; border-radius: 7px; color: var(--encre);
  background: linear-gradient(180deg, #e2dccd, var(--tole) 40%, #cbc3b1);
  box-shadow: inset 0 0 0 1px #f3efe5, inset 0 -3px 0 var(--tole-ombre), 0 1px 0 #8e8572, 0 4px 10px rgb(0 0 0 / .18);
  font: 600 10px/1.2 system-ui, sans-serif; letter-spacing: .04em; user-select: none;
}
.console-banc[hidden] { display: none; }
.cb-plaque { display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 3px;
  background: linear-gradient(#2c2a26, #191814); color: #e9e3d3; box-shadow: inset 0 1px 0 #48443c, 0 1px 0 #f3efe5; }
.cb-titre { font-size: 11px; letter-spacing: .18em; }
.cb-modele { margin-left: auto; margin-right: auto; padding: 1px 6px; border: 1px solid #e9e3d3; border-radius: 2px; font-size: 11px; letter-spacing: .12em; }
.cb-titre { margin-right: auto; }
.cb-vis { width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 35%, #d9d4c8, #77715f 70%); box-shadow: 0 0 0 1px #0007; position: relative; }
.cb-vis::after { content: ''; position: absolute; left: 1px; right: 1px; top: 3px; height: 1px; background: #4a4537; transform: rotate(35deg); }
.cb-voyants { display: flex; justify-content: space-between; padding: 0 4px; }
.cb-voyant { display: flex; align-items: center; gap: 5px; font-size: 9px; letter-spacing: .1em; }
.cb-voyant i, .cb-lampe i { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1.5px #5d574a, inset 0 1px 2px #0008; background: #4a463c; }
.cb-voyant.vert.allume i { background: radial-gradient(circle at 40% 35%, #d8ffd0, #39d24a 55%, #1d7a27); box-shadow: 0 0 0 1.5px #5d574a, 0 0 6px #4cff5c; }
.cb-voyant.ambre.allume i { background: radial-gradient(circle at 40% 35%, #fff2c4, #ffb21f 55%, #a76300); box-shadow: 0 0 0 1.5px #5d574a, 0 0 6px #ffb21f; }
.cb-voyant.rouge.allume i { background: radial-gradient(circle at 40% 35%, #ffd2c8, #ff3b24 55%, #9a1608); box-shadow: 0 0 0 1.5px #5d574a, 0 0 6px #ff3b24; }
.cb-afficheur { padding: 7px 9px; border-radius: 4px; background: #08110f;
  box-shadow: inset 0 0 0 2px #2b2924, inset 0 2px 6px #000, 0 1px 0 #f3efe5;
  font: 400 13px/1.3 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .08em;
  color: #6ff5cf; text-shadow: 0 0 4px #37e0b0aa; }
.cb-ligne { white-space: pre; overflow: hidden; min-height: 1.3em; }
.cb-milieu { display: grid; grid-template-columns: 1fr 104px; gap: 9px; }
.cb-colonne { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cb-lampes { display: grid; gap: 1px; padding: 5px 6px; border-radius: 3px; background: #ece7db; box-shadow: inset 0 0 0 1px #b9b09c; }
.cb-lampe { display: flex; align-items: center; gap: 5px; border: 0; background: none; padding: 1px 2px; margin: 0; border-radius: 2px;
  font: inherit; font-size: 9px; color: var(--encre); text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; }
.cb-lampe:hover { background: #0000000d; }
.cb-lampe b { font-variant-numeric: tabular-nums; }
.cb-lampe span { overflow: hidden; text-overflow: ellipsis; }
.cb-lampe i { width: 8px; height: 8px; }
.cb-lampe.bon i { background: radial-gradient(circle at 40% 35%, #d8ffd0, #39d24a 55%, #1d7a27); box-shadow: 0 0 0 1.5px #5d574a, 0 0 5px #4cff5c; }
.cb-lampe.defaut i { background: radial-gradient(circle at 40% 35%, #ffd2c8, #ff3b24 55%, #9a1608); box-shadow: 0 0 0 1.5px #5d574a, 0 0 5px #ff3b24; }
.cb-lampe.encours i { animation: cb-clignote .5s steps(2, jump-none) infinite alternate;
  background: radial-gradient(circle at 40% 35%, #fff2c4, #ffb21f 55%, #a76300); box-shadow: 0 0 0 1.5px #5d574a, 0 0 5px #ffb21f; }
@keyframes cb-clignote { from { opacity: 1; } to { opacity: .25; } }
.cb-tous, .cb-touche { border: 0; margin: 0; font: inherit; cursor: pointer; border-radius: 3px; color: var(--encre);
  background: linear-gradient(#f6f3ea, #ddd6c6); box-shadow: inset 0 -2px 0 #b3aa96, 0 1px 0 #8e8572, 0 2px 3px #0003; }
.cb-tous:active, .cb-touche:active { transform: translateY(1px); box-shadow: inset 0 -1px 0 #b3aa96, 0 0 0 #8e8572, 0 1px 1px #0003; }
.cb-tous { padding: 6px 4px; font-size: 10px; letter-spacing: .1em;
  background: linear-gradient(#5f9a62, #3f7643); color: #f2f7ee; box-shadow: inset 0 -2px 0 #2b552e, 0 1px 0 #8e8572, 0 2px 3px #0003; }
.cb-clavier { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; align-content: start; }
.cb-touche { aspect-ratio: 1; font-size: 13px; padding: 0; }
.cb-touche.eff, .cb-touche.envoi { font-size: 7.5px; letter-spacing: .02em; }
.cb-touche.envoi { background: linear-gradient(#c8463a, #a3342a); color: #fff3ee; box-shadow: inset 0 -2px 0 #6f1f18, 0 1px 0 #8e8572, 0 2px 3px #0003; }
.cb-touche.eff { background: linear-gradient(#e8c75a, #cfa936); box-shadow: inset 0 -2px 0 #94741c, 0 1px 0 #8e8572, 0 2px 3px #0003; }
.cb-ruban ol { list-style: none; margin: 0 10px; padding: 4px 8px; min-height: 100%; box-sizing: border-box;
  background: repeating-linear-gradient(#fbf9f1 0 15px, #f2efe4 15px 16px);
  font: 500 11px/16px ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0; color: #2d2a80; }
.cb-ruban li { white-space: pre-wrap; }
.cb-ruban li.commande { color: #5a5650; }
.cb-ruban li.defaut { color: #b3261e; }
/* Appareils de mesure du banc */
.cb-mesures { display: grid; grid-template-columns: 118px 1fr; gap: 8px; align-items: stretch; }
.cb-galva { position: relative; border-radius: 4px; padding: 3px 4px 4px; background: linear-gradient(#f7f3e6, #e9e2cf);
  box-shadow: inset 0 0 0 1px #8f8672, inset 0 2px 4px #0003, 0 1px 0 #f3efe5; display: flex; flex-direction: column; align-items: center; }
.cb-galva svg { width: 100%; height: auto; display: block; overflow: visible; }
.cb-galva .arc { fill: none; stroke: #26231e; stroke-width: 1; }
.cb-galva .graduation { stroke: #26231e; stroke-width: .8; }
.cb-galva .chiffre { font: 600 7px system-ui, sans-serif; fill: #26231e; text-anchor: middle; }
.cb-galva .aiguille { stroke: #b3261e; stroke-width: 1.4; stroke-linecap: round; transform-origin: 60px 62px; transform: rotate(-50deg); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.cb-galva .axe { fill: #26231e; }
.cb-galva-nom { font-size: 8px; letter-spacing: .12em; margin-top: -2px; }
.cb-galva-valeur { position: absolute; right: 6px; top: 4px; font: 600 9px ui-monospace, Consolas, monospace; letter-spacing: 0; }
.cb-temoins { display: flex; flex-direction: column; justify-content: space-between; gap: 3px; padding: 4px 6px; border-radius: 3px; background: #ece7db; box-shadow: inset 0 0 0 1px #b9b09c; }
.cb-temoin { display: grid; grid-template-columns: 9px 1fr; column-gap: 5px; align-items: center; font-size: 8.5px; }
.cb-temoin i { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1.5px #5d574a, inset 0 1px 2px #0008; background: #4a463c; }
.cb-temoin.allume i { background: radial-gradient(circle at 40% 35%, #fff2c4, #ffb21f 55%, #a76300); box-shadow: 0 0 0 1.5px #5d574a, 0 0 5px #ffb21f; }
.cb-temoin em { grid-column: 2; font: 500 9px ui-monospace, Consolas, monospace; font-style: normal; letter-spacing: 0; color: #5a5650; }
/* Sonde vidéo, fréquencemètre, chronomètre, crayon du banc, analyseur de ligne, bouchons */
.cb-mesures2 { display: grid; grid-template-columns: 1fr 104px; gap: 8px; }
.cb-video { display: grid; gap: 4px; padding: 4px 6px; border-radius: 3px; background: #ece7db; box-shadow: inset 0 0 0 1px #b9b09c; }
.cb-sonde { display: grid; grid-template-columns: 40px 12px 1fr 1fr 1fr; align-items: center; gap: 4px; }
.cb-sonde-nom { font-size: 8px; letter-spacing: .08em; }
.cb-sonde > i { width: 12px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px #5d574a; background: #000; }
.cb-barre { display: grid; grid-template-columns: 7px 1fr; grid-template-rows: auto auto; column-gap: 2px; font-size: 7.5px; }
.cb-barre b { grid-row: span 2; align-self: center; }
.cb-jauge { height: 5px; border-radius: 1px; background: #2b2924; overflow: hidden; align-self: end; }
.cb-jauge span { display: block; height: 100%; width: 0; transition: width .25s; }
.cb-barre.R .cb-jauge span { background: #e0483e; }
.cb-barre.V .cb-jauge span { background: #4cc35a; }
.cb-barre.B .cb-jauge span { background: #4d7fe0; }
.cb-barre em { font: 500 7.5px ui-monospace, Consolas, monospace; font-style: normal; letter-spacing: 0; color: #5a5650; }
.cb-lecteurs { display: flex; flex-direction: column; gap: 4px; }
.cb-lcd { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 2px 6px; border-radius: 3px;
  background: linear-gradient(#a9b48f, #97a37c); box-shadow: inset 0 0 0 1px #4c5238, inset 0 2px 3px #0004; color: #1d2414; }
.cb-lcd span { font-size: 7px; letter-spacing: .06em; opacity: .8; }
.cb-lcd strong { font: 700 13px/1.1 ui-monospace, Consolas, monospace; letter-spacing: .02em; text-align: right; }
.cb-inter { display: flex; align-items: center; gap: 6px; border: 0; margin: 0; padding: 5px 7px; border-radius: 3px; cursor: pointer;
  font: inherit; font-size: 9px; letter-spacing: .1em; color: var(--encre); background: linear-gradient(#f6f3ea, #ddd6c6);
  box-shadow: inset 0 -2px 0 #b3aa96, 0 1px 0 #8e8572, 0 2px 3px #0003; }
.cb-inter i { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1.5px #5d574a, inset 0 1px 2px #0008; background: #4a463c; }
.cb-inter.allume { transform: translateY(1px); box-shadow: inset 0 -1px 0 #b3aa96, inset 0 1px 3px #0003; }
.cb-inter.allume i { background: radial-gradient(circle at 40% 35%, #d8ffd0, #39d24a 55%, #1d7a27); box-shadow: 0 0 0 1.5px #5d574a, 0 0 5px #4cff5c; }
.cb-analyseur { border-radius: 4px; padding: 4px 8px 5px; background: #08110f; box-shadow: inset 0 0 0 2px #2b2924, inset 0 2px 6px #000, 0 1px 0 #f3efe5; }
.cb-analyseur-nom { display: block; font-size: 7.5px; letter-spacing: .14em; color: #8a8576; margin-bottom: 2px; }
.cb-trames { font: 500 9.5px/1.35 ui-monospace, Consolas, monospace; letter-spacing: 0; color: #f0b34a; text-shadow: 0 0 3px #f0b34a88; min-height: 2.7em; }
.cb-trames div { white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.cb-trames .invalide { color: #ff6b5a; }
.cb-trames .aucune { opacity: .5; }
.cb-bouchon-ligne { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; margin: 5px 0 3px; }
.cb-matrice { display: grid; grid-template-columns: repeat(8, 6px); gap: 1px; padding: 2px; background: #2b2924; border-radius: 2px; }
.cb-matrice i { width: 6px; height: 6px; background: #4a463c; }
.cb-matrice i.lue { background: #6d685a; }
.cb-matrice i.cle { background: #a76300; }
.cb-matrice i.cle.lue { background: #ffb21f; box-shadow: 0 0 3px #ffb21f; }
.cb-bouchon-texte { font-size: 9px; font-weight: 500; letter-spacing: 0; margin: 3px 0; }
.cb-lcd.memoire strong { opacity: .55; }
.cb-lcd.memoire span::after { content: ' · MÉM.'; }
/* Disposition en deux colonnes : tout tient à côté de l'écran, sans défilement. */
.cb-col { display: flex; flex-direction: column; gap: 7px; min-height: 0; min-width: 0; }
.cb-col > .cb-milieu { flex: 1; }
.cb-cadre-nom { display: block; font-size: 7.5px; letter-spacing: .14em; margin-bottom: 3px; }
.cb-bouchons { padding: 4px 6px 5px; border-radius: 3px; background: #ece7db; box-shadow: inset 0 0 0 1px #b9b09c; }
.cb-bouchon-ligne { margin: 0; }
.cb-bouchon-texte { font-size: 8.5px; margin: 1px 0; }
.cb-papier { flex: 1 1 60px; min-height: 60px; display: flex; flex-direction: column; }
.cb-onglets { display: flex; gap: 2px; }
.cb-onglets button { border: 0; margin: 0; padding: 2px 7px; border-radius: 3px 3px 0 0; font: inherit; font-size: 7.5px; letter-spacing: .1em; cursor: pointer;
  color: #d8d2c2; background: #3a3732; }
.cb-onglets button.actif { color: var(--encre); background: #fbf9f1; }
.cb-ruban { flex: 1; min-height: 0; overflow: auto; border-radius: 0 3px 3px 3px; padding: 4px 0;
  background: #262420; box-shadow: inset 0 2px 5px #000a, 0 1px 0 #f3efe5; }
.cb-ruban ol[hidden], .cb-ruban dl[hidden] { display: none; }
.cb-aide { margin: 0 10px; padding: 4px 8px; min-height: 100%; box-sizing: border-box; background: #fbf9f1;
  display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-content: start; font-size: 9.5px; font-weight: 500; letter-spacing: 0; }
.cb-aide dt { font-variant-numeric: tabular-nums; font-weight: 700; }
.cb-aide dd { margin: 0; }
.cb-lampe { padding: 2px 2px; }
.cb-col > .cb-milieu { grid-template-columns: 1fr 124px; }
.cb-milieu .cb-colonne { min-height: 0; }
.cb-milieu .cb-lampes { flex: 0 1 auto; max-height: 260px; align-content: space-evenly; }
.cb-milieu .cb-clavier { gap: 6px; }
.cb-milieu .cb-touche { font-size: 15px; }
.cb-col > .cb-afficheur { font-size: 14px; }
.cb-milieu .cb-touche.eff, .cb-milieu .cb-touche.envoi { font-size: 8px; }
.cb-milieu .cb-clavier { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cb-touche.presse { transform: translateY(1px); box-shadow: inset 0 -1px 0 #b3aa96, 0 0 0 #8e8572, 0 1px 1px #0003; filter: brightness(.94); }
.cb-aide dd small { font-size: 8.5px; color: #5a5650; }
.cb-temoin.bon i { background: radial-gradient(circle at 40% 35%, #d8ffd0, #39d24a 55%, #1d7a27); box-shadow: 0 0 0 1.5px #5d574a, 0 0 5px #4cff5c; }
.cb-temoin.defaut i { background: radial-gradient(circle at 40% 35%, #ffd2c8, #ff3b24 55%, #9a1608); box-shadow: 0 0 0 1.5px #5d574a, 0 0 5px #ff3b24; }
.cb-temoin.bon.allume i { animation: cb-clignote .5s steps(2, jump-none) infinite alternate; }

/* ------------------------------------------------------------ plateforme : salles temporaires */
.salle-temp { margin: 0 0 20px; }
.salle-temp[hidden] { display: none; }
.salle-msg { margin: 0 0 10px; padding: 9px 12px; border-radius: 8px; font-size: 13px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.salle-msg[hidden] { display: none; }
.salle-creee { display: flex; flex-direction: column; gap: 10px; }
.salle-creee[hidden] { display: none; }
.salle-ok { margin: 0; padding: 9px 12px; border-radius: 8px; font-size: 14px;
  background: color-mix(in srgb, var(--vert) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--vert) 35%, transparent); }
.salle-lien { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.salle-lien input { flex: 1 1 280px; min-width: 0; padding: 7px 10px; border: 1px solid var(--bord); border-radius: 6px; background: var(--fond); color: var(--texte); font: 13px var(--mono); }
.salle-temps { margin-left: 10px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--texte-2); }
.salle-temps.bientot { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.salle-temps[hidden] { display: none; }
.coche-ligne span { display: inline-flex; gap: 8px; align-items: center; color: var(--texte); font-size: 14px; }
.coche-ligne input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.connexion-temps { margin: -6px 0 12px; font-size: 12px; color: var(--texte-2); }
.connexion-temps[hidden] { display: none; }
#form-temporaires { align-items: end; }

/* ------------------------------------------------------------ admin : menu « sandwich » */
.menu-admin { position: relative; }
.bouton-menu { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; width: 38px; height: 34px; padding: 0 9px; }
.bouton-menu span { display: block; height: 2px; border-radius: 1px; background: var(--texte); }
.bouton-menu[aria-expanded="true"] { border-color: var(--texte-2); }
.liste-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 230px; display: flex; flex-direction: column;
  padding: 6px; background: var(--surface); border: 1px solid var(--bord); border-radius: 10px; box-shadow: 0 12px 32px rgb(0 0 0 / .18); }
.liste-menu[hidden] { display: none; }
.liste-menu button { border: 0; text-align: left; padding: 8px 10px; border-radius: 6px; background: none; }
.liste-menu button:hover, .liste-menu button:focus-visible { background: var(--surface-2, rgb(0 0 0 / .06)); }
#dialogue-mdp .boutons { display: flex; justify-content: flex-end; gap: 8px; }
#dialogue-mdp .erreur { margin: 0 0 12px; }
.menu-qui { margin: 2px 10px 6px; font-size: 12px; color: var(--texte-2); }
dialog.moyen { width: min(640px, calc(100vw - 32px)); }
#dialogue-utilisateurs .boutons { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
#dialogue-utilisateurs .erreur { margin: 0 0 12px; }
#dialogue-utilisateurs .adm-table-defil { max-height: 40vh; margin-bottom: 8px; }
.ligne-utilisateur { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .ligne-utilisateur { grid-template-columns: 1fr; } }
