/* Thème « cybersécurité » : fond bleu nuit, accents cyan lumineux, libellés en police à chasse fixe.
   Fichier isolé : il ne fait que surcharger les couleurs et quelques détails du thème d'origine (styles dans index.html).
   Retour au thème d'origine : voir docs/RETOUR-ARRIERE.md (git revert du commit, ou aperçu immédiat avec ?theme=origine).
   Écran seulement : l'impression et le document d'inventaire gardent la mise en page claire d'origine. */
@media screen {
  :root:root:root {
    --marine: #020814; --accent: #22d3ee; --fond: #030a16; --surface: #081a2c; --trait: #12324d; --texte: #e2f6ff; --doux: #7fa6c2;
    --rouge: #ff4d6d; --orange: #ffa53d; --jaune: #e8d44d; --vert: #2ee59d; --bleu: #5cc8ff;
    --neon: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 0 14px color-mix(in srgb, var(--accent) 22%, transparent);
    --sur-accent: #021220;
    color-scheme: dark;
  }
  /* Cyber jour (sélecteur de thème du bandeau, choix gardé dans le navigateur) : mêmes formes, palette claire */
  :root:root:root[data-theme="jour"] {
    --marine: #0b2540; --accent: #0e7490; --fond: #eef4f9; --surface: #ffffff; --trait: #cbdbe7; --texte: #0f2233; --doux: #4f6a84;
    --rouge: #c62845; --orange: #b25f00; --jaune: #857400; --vert: #0a855c; --bleu: #1d6fb8;
    --neon: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), 0 2px 10px color-mix(in srgb, var(--accent) 16%, transparent);
    --sur-accent: #ffffff;
    color-scheme: light;
  }
  /* Le bandeau reste sombre le jour : ses couleurs sont celles de la nuit */
  :root[data-theme="jour"] .barre-haut { --accent: #22d3ee; --doux: #a9c6da; --texte: #e2f6ff; --trait: #1d4566; }
  :root[data-theme="jour"] .carte, :root[data-theme="jour"] .tuile { box-shadow: 0 1px 2px rgb(15 34 51 / .06); }
  :root[data-theme="jour"] dialog::backdrop { background: rgb(15 34 51 / .45); }
  ::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--texte); }
  html { scrollbar-color: var(--trait) var(--fond); }

  /* Fond : grille discrète */
  body {
    background-color: var(--fond);
    background-image:
      radial-gradient(ellipse at 15% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 50%),
      radial-gradient(ellipse at 95% 110%, color-mix(in srgb, #1e6bff 14%, transparent), transparent 45%),
      linear-gradient(color-mix(in srgb, var(--bleu) 5%, transparent) 1px, transparent 1px),
      linear-gradient(90deg, color-mix(in srgb, var(--bleu) 5%, transparent) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 24px 24px, 24px 24px;
    background-attachment: fixed;
  }

  /* Titres et libellés */
  h1, h2 { letter-spacing: .03em; }
  h1::before { content: "> "; color: var(--accent); font-family: var(--f-mono); font-weight: 400; }
  h3, th, .fil, .compte, .nb-constats, .reco-code, .entete .type, .etat, .niv, .etiquette { font-family: var(--f-mono); }
  th { color: var(--accent); }

  /* Bandeau haut */
  .barre-haut { background: color-mix(in srgb, var(--marine) 92%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 1px 18px color-mix(in srgb, var(--accent) 18%, transparent); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 5; }
  .barre-haut .logo { font-family: var(--f-mono); text-transform: uppercase; letter-spacing: .08em; font-size: 16px; }
  .barre-haut .logo b { background: transparent; color: var(--accent); border: 1px solid var(--accent); box-shadow: var(--neon); }
  .barre-haut nav a { font-family: var(--f-mono); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--doux); }
  .barre-haut nav a.actif { color: var(--accent); text-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent); }
  .barre-haut .util, .barre-haut .util a { color: var(--doux); }
  #bandeau { background: color-mix(in srgb, var(--orange) 14%, var(--fond)); color: var(--orange); border-bottom: 1px solid color-mix(in srgb, var(--orange) 40%, transparent); font-family: var(--f-mono); }

  /* Cartes, tuiles, dialogues */
  .carte, .tuile, .reco, dialog, .choix-carte { border-color: var(--trait); box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 4%, transparent); }
  .carte, .tuile { border-radius: 4px; }
  .tuile .val, .niveau .val { font-family: var(--f-mono); }
  .tuile:hover, a.choix-carte:hover, .noeud:hover { box-shadow: var(--neon); }
  dialog { border-color: color-mix(in srgb, var(--accent) 40%, var(--trait)); box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 14%, transparent); }
  dialog::backdrop { background: rgb(2 6 14 / .75); backdrop-filter: blur(2px); }

  /* Boutons */
  .btn { border-radius: 4px; }
  .btn:hover { border-color: var(--accent); color: var(--accent); }
  .btn.prim, a.btn.prim { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); }
  .btn.prim:hover { color: var(--sur-accent); box-shadow: var(--neon); }
  .btn.danger:hover { border-color: var(--rouge); color: var(--rouge); box-shadow: 0 0 12px color-mix(in srgb, var(--rouge) 30%, transparent); }

  /* Tableaux */
  tr.cliquable:hover td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
  .tableau.defile thead th { background: var(--surface); }

  /* Onglets et blocs de script façon terminal */
  .onglets-reco { border-bottom-color: var(--accent); }
  .onglet-reco.actif { background: var(--accent); color: var(--sur-accent); }
  details.mise-en-oeuvre pre, details.regles-communes pre { background: #01060f; color: #8be9ff; border: 1px solid var(--trait); }
  details.verif pre { background: #01060f; color: #b9d3ee; border: 1px solid var(--trait); }
  #notif { background: var(--surface); color: var(--accent); border: 1px solid var(--accent); box-shadow: var(--neon); font-family: var(--f-mono); }

  /* Niveaux de gravité : léger halo */
  .niv-critique, .b.critique, .pilule.rouge { box-shadow: 0 0 10px color-mix(in srgb, var(--rouge) 45%, transparent); }
  .tuile.alerte { box-shadow: inset 4px 0 0 var(--rouge), 0 0 16px color-mix(in srgb, var(--rouge) 15%, transparent); }

  /* Champs */
  dialog input:not([type=file]), dialog select, dialog textarea, input.filtre, td select, .champ-ligne select { border-radius: 4px; }
  dialog input:focus, dialog select:focus, dialog textarea:focus, input.filtre:focus { outline: none; border-color: var(--accent); box-shadow: var(--neon); }
}
@media screen and (prefers-reduced-motion: no-preference) {
  .btn, .tuile, .noeud, a.choix-carte { transition: box-shadow .15s, border-color .15s, color .15s; }
}
/* Le document d'inventaire reste au format du livrable Word */
@media screen { .document h3, .document th { font-family: var(--f-corps); } .document h1::before { content: none; } }
