/* [Menace SentinelOne] — public/js/s1-menace.js (lot s1menace, 03/11/2026). Panneau latéral d'une menace : jetons seuls, deux thèmes,
   espacements 4·8·12·16·24. Chargé juste après style.css (public/index.php). Le panneau est SOUS les fenêtres de confirmation
   (--z-overlay < --z-modal) : foxConfirm s'ouvre par-dessus sans le fermer. 360 px : le panneau prend toute la largeur. */
.s1m-voile { position: fixed; inset: 0; z-index: var(--z-overlay); background: var(--overlay-bg); }
.s1m-panneau {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--z-overlay); display: flex; flex-direction: column;
  width: min(44rem, 100%); max-width: 100%; overflow: hidden;
  border-left: 1px solid var(--border-strong); background: var(--bg-1); color: var(--text); box-shadow: -16px 0 32px var(--overlay-bg);
}
.s1m-entete { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); border-bottom: 1px solid var(--border); background: var(--bg-2); }
.s1m-entete-haut { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.s1m-titre { margin: 0; min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-lg); font-weight: 700; }
.s1m-corps { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); }
.s1m-section { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-2); }
.s1m-section > h3 { margin: 0; font-size: var(--fs-md); font-weight: 700; }
.s1m-badges { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.s1m-meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); color: var(--dim); font-size: var(--fs-sm); }
.s1m-meta a, .s1m-meta button { color: var(--accent); }
.s1m-lien { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; text-decoration: none; }
.s1m-lien:hover { text-decoration: underline; }
.s1m-gestes { display: flex; flex-direction: column; gap: var(--space-3); }
.s1m-geste { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); min-width: 0; }
.s1m-geste .hx-bouton { white-space: normal; text-align: left; justify-content: flex-start; max-width: 100%; }
.s1m-effet { color: var(--dim); font-size: var(--fs-xs); overflow-wrap: anywhere; }
.s1m-motif { color: var(--dim); font-size: var(--fs-xs); font-style: italic; overflow-wrap: anywhere; }
.s1m-autres { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-3); }
.s1m-resume summary, .s1m-pli > summary { cursor: pointer; font-weight: 600; }
.s1m-resultat { padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-0); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.s1m-resultat--ok { border-color: var(--color-ok); }
.s1m-resultat--warn { border-color: var(--color-warn); }
.s1m-resultat--crit { border-color: var(--color-crit); }
.s1m-cmd { margin: 0; padding: var(--space-3); overflow-x: auto; max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--code-bg); font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace; font-size: var(--fs-xs); white-space: pre-wrap; overflow-wrap: anywhere; }
.s1m-liste { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-2); font-size: var(--fs-sm); }
.s1m-liste li { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; overflow-wrap: anywhere; }
.s1m-quand { color: var(--dim); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.s1m-note-zone { width: 100%; min-height: 72px; resize: vertical; }
.s1m-evt { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.s1m-evt th, .s1m-evt td { padding: var(--space-1) var(--space-2); border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.s1m-defile { max-width: 100%; overflow-x: auto; }
.s1m-ligne { cursor: pointer; }
.s1m-ligne:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.s1m-nom { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; text-align: left; cursor: pointer; color: var(--text); }
.s1m-nom:hover { text-decoration: underline; }
.s1m-synchro { font-size: var(--fs-xs); }
.s1m-synchro--vieille { color: var(--color-warn); font-weight: 600; }
.s1m-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Lot s1liste : la liste des menaces, une ligne par menace (une hauteur de texte), Traiter toujours visible. */
.s1l-ligne:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.s1l-ligne td { white-space: nowrap; }
.s1l-nom { display: block; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s1l-poste { display: block; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s1l-client { display: inline-block; max-width: 20ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.s1l-chemin { display: block; max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s1l-actions { flex-wrap: nowrap; justify-content: flex-end; }
.s1l-etat { white-space: nowrap; }
.s1l-st-icone { display: none; }
.s1l-neutralisee { white-space: nowrap; }
/* Sous 1500 px : le chemin part ; le statut reste dans la ligne, resserré à son icône (horloge « En cours », coche « Résolu »), son mot lu par les lecteurs d'écran ;
   cellules à 8 px au lieu de 12 pour que « Traiter » tienne entier dans le cadre à 1280 px, même avec une barre de défilement. */
@media (max-width: 1500px) {
  .s1l-c-fichier { display: none; }
  .s1l-nom { max-width: 16ch; }
  .s1l-poste { max-width: 14ch; }
  .s1l-ligne td, #es-threats-table th { padding-inline: var(--space-2); }
  #es-threats-table .s1l-c-statut { width: 1%; padding-inline: var(--space-1); }
  .s1l-client { max-width: 14ch; }
  .s1l-st-mot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .s1l-st-icone { display: inline-flex; }
}
@media (max-width: 700px) {
  .s1l-c-client, .s1l-c-date, .s1l-quarantaine, .s1l-c-statut, .s1l-neutralisee { display: none; }
  .s1l-ligne td, #es-threats-table th { padding-inline: var(--space-1); }
  .s1l-nom { max-width: 12ch; }
  .s1l-poste { max-width: 11ch; }
}
/* À 360 px la gravité n'est plus qu'un point de sa couleur ; son mot reste lu (lecteurs d'écran) et en infobulle. */
@media (max-width: 480px) {
  .s1l-c-case { display: none; }
  th.s1l-c-grav { max-width: 32px; overflow: hidden; }
  .s1l-nom { max-width: 10ch; }
  .s1l-poste { max-width: 9ch; }
  .s1l-mot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
