/* UTILITE : page /streaming (demonstration AiSecurBox, non listee) ; styles sortis de la page : la CSP du site interdit les styles en ligne. */
:root{ --bg:#0d1117; --panel:#161b22; --line:#30363d; --txt:#c9d1d9; --dim:#8b949e;
         --ok:#3fb950; --warn:#d29922; --bad:#f85149; --accent:#58a6ff; }
  *{ box-sizing:border-box; }
  body{ margin:0; background:var(--bg); color:var(--txt);
        font-family:"Cascadia Code","Consolas",ui-monospace,monospace; font-size:14px; line-height:1.5; }
  .wrap{ max-width:1100px; margin:0 auto; padding:16px; }
  h1{ font-size:22px; margin:0; color:#fff; letter-spacing:.5px; }
  .sub{ color:var(--dim); margin:4px 0 20px; font-size:13px; }
  /* bandeau stream */
  .stream{ background:#000; border:1px solid var(--line); border-radius:10px; overflow:hidden; margin-bottom:8px; }
  .stream .bar{ display:flex; align-items:center; gap:8px; padding:8px 12px; background:var(--panel); border-bottom:1px solid var(--line); }
  .dot{ width:10px; height:10px; border-radius:50%; background:var(--bad); box-shadow:0 0 8px var(--bad); animation:pulse 1.4s infinite; }
  @keyframes pulse{ 50%{ opacity:.35 } }
  .live{ color:var(--bad); font-weight:700; letter-spacing:1px; }
  .url{ margin-left:auto; color:var(--accent); font-size:12px; word-break:break-all; }
  .screen{ aspect-ratio:16/9; display:flex; align-items:center; justify-content:center; color:var(--dim);
           background:repeating-linear-gradient(45deg,#0a0d12,#0a0d12 12px,#0c1016 12px,#0c1016 24px); text-align:center; padding:12px; }
  .hint{ color:var(--dim); font-size:12px; margin:0 0 24px; }
  /* sections */
  h2{ font-size:14px; color:var(--accent); border-left:3px solid var(--accent); padding-left:8px; margin:26px 0 8px; text-transform:uppercase; letter-spacing:1px; }
  .tablewrap{ overflow-x:auto; border:1px solid var(--line); border-radius:8px; }
  table{ border-collapse:collapse; width:100%; min-width:720px; }
  th,td{ text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); white-space:nowrap; }
  th{ background:var(--panel); color:var(--dim); font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.5px; }
  td.c{ white-space:normal; color:var(--dim); min-width:220px; }
  tr:last-child td{ border-bottom:none; }
  .r{ font-weight:700; }
  .ok{ color:var(--ok); } .warn{ color:var(--warn); } .bad{ color:var(--bad); } .wip{ color:var(--dim); }
  .num{ color:#fff; }
  tr.pending td{ opacity:.12; }
  tr.shown td{ opacity:1; transition:opacity .3s; }
  tr.active td{ background:#11301a; }
  #runstat{ color:var(--ok); font-size:15px; }
  #runstat .blink{ animation:pulse .9s steps(1) infinite; }
  #console{ background:#000; border:1px solid var(--line); border-radius:8px; height:240px; overflow-y:auto; padding:10px 12px; font-size:13px; margin:0 0 26px; }
  #console .ln{ white-space:pre-wrap; opacity:0; animation:appear .25s forwards; }
  @keyframes appear{ to{ opacity:1 } }
  #console .t{ color:var(--dim); }
  footer{ color:var(--dim); font-size:12px; margin:28px 0 10px; border-top:1px solid var(--line); padding-top:12px; }
  .screen.screen-console{ display:block; padding:0; align-items:stretch; text-align:left; }
  #console.console-plein{ height:100%; border:0; border-radius:0; margin:0; }
  /* journal en donnees reelles (2026-11-13) */
  #runstat{ margin:6px 0 4px; min-height:1.5em; }
  /* Cellulaire (2026-11-13, retouches de la Dispatch) : sous 480 px, chaque ligne de tableau devient une carte empilée (aucun défilement caché),
     et le lien du bandeau passe sous le titre au lieu de se couper sur 3 lignes. */
  @media (max-width:480px){
    .stream .bar{ flex-wrap:wrap; }
    .url{ margin-left:0; flex-basis:100%; padding-left:18px; }
    .tablewrap{ overflow-x:visible; border:0; }
    table{ min-width:0; }
    table, tbody, tr, td{ display:block; width:100%; }
    tr:first-child{ display:none; }
    tr{ border:1px solid var(--line); border-radius:8px; margin:0 0 8px; padding:6px 0; background:var(--panel); }
    td, td.c{ border:0; white-space:normal; min-width:0; padding:2px 12px; }
    td:first-child{ color:var(--dim); font-size:12px; }
    td:nth-child(2){ color:#fff; font-weight:600; }
    #journal td:nth-child(4), #journal td:nth-child(5){ display:inline-block; width:auto; }
  }
  /* Etat « historique » (mesure remplacee par une plus recente) : gris discret, ligne attenuee. */
  .hist{ color:var(--dim); font-weight:400; }
  #console .ln-hist{ opacity:.55; animation:none; }
  tr.ligne-hist td{ opacity:.55; }
  /* Etat « non joué (réseau) » (coupure, delai, limiteur, boite non jointe) : GRIS, jamais rouge, hors des echecs. */
  .reseau{ color:var(--dim); font-weight:400; }
  #console .ln-reseau{ opacity:.7; }
  tr.ligne-reseau td{ opacity:.7; }
  /* Banc FIGE plus de 5 min : bandeau neutre « en pause » ; le point rouge et le « EN DIRECT » passent au gris (jamais un vieux vert qui ressemble a du direct). */
  #runstat.en-pause{ color:var(--dim); }
  #etat-flux.en-pause{ color:var(--dim); }
  .bar.en-pause .dot{ background:var(--dim); box-shadow:none; animation:none; }
  .bar.en-pause .live{ color:var(--dim); }
  /* MODE DIRECT (?direct=1, OBS 1920x1080 sans souris) : plein ecran, gros texte, console sur tout l'ecran, comptes en haut, pas de tableau. */
  html.direct, html.direct body{ height:100%; overflow:hidden; }
  html.direct body{ font-size:26px; }
  html.direct .wrap{ max-width:none; height:100vh; padding:22px 32px; display:flex; flex-direction:column; gap:12px; }
  html.direct h1{ font-size:40px; order:0; }
  html.direct #runstat{ order:1; font-size:34px; margin:0; }
  html.direct .stream{ order:2; flex:1 1 auto; min-height:0; display:flex; flex-direction:column; margin:0; }
  html.direct .stream .bar{ padding:12px 18px; flex-wrap:nowrap; }
  html.direct .live{ font-size:26px; }
  html.direct .horloge{ margin-left:auto; color:#fff; font-size:26px; font-weight:700; white-space:nowrap; }
  html.direct .url{ display:none; }
  html.direct .screen.screen-console{ aspect-ratio:auto; flex:1 1 auto; min-height:0; }
  html.direct #console.console-plein{ height:100%; overflow:hidden; font-size:26px; line-height:1.45; padding:14px 20px; }
  html.direct #console .ln{ animation:none; opacity:1; padding:4px 0; border-bottom:1px solid #161b22; }
  html.direct #console .ln-hist{ opacity:.5; }
  html.direct .sub, html.direct .hint, html.direct h2, html.direct .tablewrap, html.direct footer{ display:none; }
