/* UTILITE : MODE DIRECT v2 de /streaming (vue par défaut partout ; ?direct=1 reste OK pour OBS) : grille plein ecran (haut, 4 compteurs,
   schema + « en ce moment » a gauche, 12 derniers tests a droite, bandeau defilant en bas). Ecran classique cache. Aucun style en ligne (CSP).
   Tailles RÉDUITES + look terminal/hacker dense (demande de Simon, 20 nov. 2026 : « réduit les caractères, style hacker »).
   LIEN : public/streaming/direct.js (construit .dv2) ; streaming.css (couleurs --ok --warn --bad --dim). */
html.direct-v2 .wrap{ display:none; }
html.direct-v2, html.direct-v2 body{ height:100%; overflow:hidden; margin:0; }
.dv2{ display:none; }
html.direct-v2 .dv2{ display:grid; grid-template-rows:auto auto 1fr auto; gap:12px; height:100vh; padding:16px 22px 0; box-sizing:border-box; font-size:17px; color:#c9d1d9; }
.dv2-haut{ display:flex; align-items:center; gap:20px; }
.dv2-titre{ font-size:26px; font-weight:700; color:#fff; letter-spacing:.5px; }
.dv2-rebours{ margin-left:auto; font-size:19px; color:#58a6ff; font-weight:700; }
.dv2-horloge{ font-size:19px; color:#f85149; font-weight:700; white-space:nowrap; }
.dv2-compteurs{ display:grid; grid-template-columns:repeat(4, 1fr); gap:12px; }
.dv2-compteur{ background:#161b22; border:1px solid #30363d; border-radius:10px; padding:10px 16px; }
.dv2-nombre{ font-size:40px; font-weight:800; line-height:1.05; }
.dv2-legende{ font-size:15px; color:#8b949e; }
.dv2-c-ok .dv2-nombre{ color:#3fb950; } .dv2-c-protection .dv2-nombre{ color:#58a6ff; } .dv2-c-info .dv2-nombre{ color:#d29922; } .dv2-c-echec .dv2-nombre{ color:#f85149; }
.dv2-milieu{ display:grid; grid-template-columns:1.45fr 1fr; gap:16px; min-height:0; }
.dv2-gauche{ display:flex; flex-direction:column; gap:12px; min-height:0; }
.dv2-schema{ width:100%; flex:1 1 auto; min-height:0; max-height:210px; background:#0a0d12; border:1px solid #30363d; border-radius:10px; }
.dv2-boite{ fill:#161b22; stroke:#58a6ff; stroke-width:3; transition:fill .3s, stroke .3s; }
.dv2-allume-ok{ fill:#12361d; stroke:#3fb950; } .dv2-allume-info{ fill:#3a2c0b; stroke:#d29922; } .dv2-allume-echec{ fill:#3d1414; stroke:#f85149; }
.dv2-nom{ fill:#fff; font-size:26px; font-weight:700; font-family:inherit; }
.dv2-lien{ stroke:#58a6ff; stroke-width:5; fill:none; }
.dv2-diode{ fill:#58a6ff; } .dv2-diode-barre{ stroke:#58a6ff; stroke-width:5; }
.dv2-petit{ fill:#8b949e; font-size:18px; font-family:inherit; }
.dv2-rouge{ fill:#f85149; }
.dv2-retour{ stroke:#f85149; stroke-width:3; stroke-dasharray:10 10; fill:none; opacity:.8; }
.dv2-cadenas{ fill:#f85149; } .dv2-anse{ stroke:#f85149; stroke-width:4; fill:none; }
.dv2-invisible{ fill:none; stroke:none; }
.dv2-point{ filter:drop-shadow(0 0 10px currentColor); }
.dv2-maintenant{ background:#161b22; border:1px solid #30363d; border-radius:10px; padding:12px 16px; }
.dv2-etiquette{ font-size:14px; color:#58a6ff; font-weight:700; letter-spacing:2px; margin-bottom:5px; }
.dv2-m-test{ font-size:22px; font-weight:700; color:#fff; }
.dv2-m-res{ font-size:17px; margin-top:4px; }
.dv2-m-quand{ font-size:14px; color:#8b949e; margin-top:5px; }
.dv2-e-ok{ color:#3fb950; } .dv2-e-info{ color:#d29922; } .dv2-e-echec{ color:#f85149; } .dv2-e-historique{ color:#8b949e; opacity:.6; }
.dv2-droite{ background:#000; border:1px solid #30363d; border-radius:10px; padding:12px 14px; min-height:0; overflow:hidden; }
.dv2-liste{ list-style:none; margin:0; padding:0; }
.dv2-ligne{ display:grid; grid-template-columns:26px 1fr; column-gap:8px; padding:5px 0; border-bottom:1px solid #161b22; font-size:15px; line-height:1.3; }
.dv2-l-test{ color:#fff; }
.dv2-l-res{ grid-column:2; }
.dv2-bas{ overflow:hidden; white-space:nowrap; background:#161b22; border-top:1px solid #30363d; margin:0 -22px; padding:9px 0; }
.dv2-defile{ display:inline-block; animation:dv2-defile 90s linear infinite; }
.dv2-phrase{ display:inline-block; padding:0 44px; font-size:16px; color:#c9d1d9; }
.dv2-phrase::before{ content:'◆'; color:#58a6ff; margin-right:14px; }
@keyframes dv2-defile{ from{ transform:translateX(0); } to{ transform:translateX(-50%); } }
/* Mode emission : badge du panneau selon le segment (EN DIRECT rouge, REPRISE jaune, autres bleu/vert), liste des segments a plusieurs lignes. */
.dv2-badge{ display:inline-block; font-size:14px; font-weight:800; letter-spacing:2px; padding:3px 11px; border-radius:6px; margin-bottom:7px; color:#0d1117; background:#58a6ff; }
.dv2-badge-direct{ background:#f85149; color:#fff; }
.dv2-badge-reprise{ background:#d29922; }
.dv2-badge-atelier{ background:#3fb950; }
.dv2-badge-site, .dv2-badge-reseau{ background:#58a6ff; }
.dv2-badge-materiel{ background:#8b949e; }
.dv2-m-liste{ list-style:none; margin:6px 0 0; padding:0; font-size:15px; line-height:1.4; }
.dv2-m-liste li{ padding:2px 0; }
.dv2-m-liste li::before{ content:'▸ '; color:#58a6ff; }

/* Attaque bloquée EN DIRECT : le schéma flashe rouge + le compteur « protections » pulse (événement réel, demande de Simon 20 nov.). */
.dv2-schema.dv2-flash{ animation: dv2-flash-attaque .9s ease-out; }
@keyframes dv2-flash-attaque{ 0%,100%{ background:#0a0d12; border-color:#30363d; } 18%{ background:#3d1414; border-color:#f85149; } }
.dv2-compteur.dv2-pulse{ animation: dv2-pulse-prot .9s ease-out; }
@keyframes dv2-pulse-prot{ 0%,100%{ transform:scale(1); border-color:#30363d; } 22%{ transform:scale(1.07); border-color:#58a6ff; } }

/* Responsive : vue par défaut partout. Sur écran étroit (tablette/téléphone), on empile, on réduit encore, et on autorise le défilement vertical. */
@media (max-width: 900px){
  html.direct-v2, html.direct-v2 body{ height:auto; overflow:auto; }
  html.direct-v2 .dv2{ height:auto; min-height:100vh; font-size:15px; gap:12px; padding:14px 14px 0; }
  .dv2-titre{ font-size:21px; }
  .dv2-haut{ flex-wrap:wrap; gap:8px 16px; }
  .dv2-rebours, .dv2-horloge{ font-size:16px; margin-left:0; }
  .dv2-compteurs{ grid-template-columns:repeat(2, 1fr); gap:10px; }
  .dv2-nombre{ font-size:32px; }
  .dv2-legende{ font-size:14px; }
  .dv2-milieu{ grid-template-columns:1fr; gap:14px; }
  .dv2-schema{ height:190px; flex:none; }
  .dv2-m-test{ font-size:19px; } .dv2-m-res{ font-size:16px; }
  .dv2-droite{ max-height:55vh; overflow:auto; }
  .dv2-ligne{ font-size:14px; }
  .dv2-bas{ margin:0 -14px; }
  .dv2-phrase{ font-size:15px; padding:0 26px; }
}
@media (max-width: 480px){
  .dv2-titre{ font-size:18px; }
  .dv2-nombre{ font-size:28px; }
  .dv2-schema{ height:160px; }
}
/* Sans direct (journal de plus de 5 min) : horloge en gris, « ENREGISTREMENT — dernier banc le … », qui peut aller a la ligne sur un telephone. */
/* LIEN : direct.js (tic : classe dv2-enregistrement sur la racine). */
.dv2.dv2-enregistrement .dv2-horloge{ color:#8b949e; white-space:normal; }
