/* net-toolkit — styles
   Identité visuelle reprise du portfolio (ange-bonkoski.fr), version sobre.
   Organisation : polices → variables → base → mise en page → composants → responsive → accessibilité. */

/* ========== 1. Polices auto-hébergées (licence SIL OFL 1.1, voir fonts/README.md) ========== */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;   /* police variable : toutes les graisses dans un seul fichier */
  font-style: normal;
  font-display: swap;     /* affiche le texte tout de suite avec une police de secours */
}

@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-latin-opsz-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ========== 2. Variables : toutes les couleurs et mesures de l'identité visuelle ========== */
:root {
  --white: #fffdf6;
  --bg: #FFF8DF;
  --bg-deep: #F7EBBE;

  --accent: #5A235F;
  --accent-deep: #3E1841;
  --accent-soft: rgba(90, 35, 95, .14);
  --accent-glow: rgba(90, 35, 95, .28);

  --text: #4C1F50;
  --text-dim: #6E4A75;
  --text-faint: #7E5C86;

  --line: rgba(90, 35, 95, .14);
  --line-soft: rgba(90, 35, 95, .09);
  --line-strong: rgba(90, 35, 95, .28);

  /* Rouge des erreurs (même que le badge « Nouveautés » du portfolio) */
  --error: #c81e1e;
  --error-bg: rgba(220, 38, 38, .08);
  --error-line: rgba(220, 38, 38, .3);

  --r-lg: 32px;
  --r-md: 22px;
  --r-sm: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'Menlo', 'Consolas', monospace;

  /* Marge latérale de la page */
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

/* ========== 3. Base ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  line-height: 1.55;
  color: var(--text);
  /* Fond crème + taches violettes très diffuses en haut de page (sans animation) */
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70rem 34rem at 12% -8%, rgba(90, 35, 95, .14), transparent 62%),
    radial-gradient(ellipse 56rem 30rem at 92% -6%, rgba(90, 35, 95, .08), transparent 60%),
    radial-gradient(ellipse 44rem 24rem at 55% 2%, rgba(90, 35, 95, .1), transparent 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text);
}

p {
  margin: 0;
  color: var(--text-dim);
}

a {
  color: var(--accent);
  text-underline-offset: .2em;
}

a:hover {
  color: var(--accent-deep);
}

::selection {
  background: var(--accent-soft);
}

/* Focus clavier bien visible sur tous les éléments interactifs */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Masqué à l'écran mais lu par les lecteurs d'écran */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Lien d'évitement : invisible tant qu'il n'a pas le focus clavier */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: .7rem 1.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
  color: #fff;
}

/* ========== 4. Mise en page ========== */
.wrap {
  /* Largeur max 1180px, avec la marge latérale de chaque côté sur petit écran */
  width: min(1180px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}

.header-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--text-dim);
}

.hero {
  padding-block: clamp(1.75rem, 6vw, 4rem) clamp(1.5rem, 3vw, 2.25rem);
}

.eyebrow {
  margin-bottom: .9rem;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--text-dim);
}

.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1.1;
}

.lead {
  margin-top: 1rem;
  max-width: 60ch;
  font-size: 1.05rem;
}

/* Panneau principal en effet verre */
.panel {
  margin-bottom: 4rem;
  padding: clamp(1.1rem, 3.5vw, 2.25rem);
  background: rgba(255, 253, 246, .58);
  border: 1px solid rgba(255, 253, 246, .85);
  border-radius: var(--r-md);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(90, 35, 95, .06),
    0 0 0 1px rgba(90, 35, 95, .05),
    0 8px 20px -10px var(--accent-glow),
    0 34px 64px -30px rgba(90, 35, 95, .4);
}

/* Page 404 : panneau court avec un bouton de retour */
.panel--court {
  max-width: 40rem;
}

.panel__action {
  margin-top: 1.25rem;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding-block: 1.5rem 2rem;
}

.site-footer p {
  font-size: .82rem;
  color: var(--text-faint);
}

.site-footer a {
  display: inline-block;
  padding-block: .6rem; /* zone cliquable plus haute */
  color: var(--text-dim);
}

/* ========== 5. Composants ========== */

/* --- Message affiché quand JavaScript est désactivé (<noscript>) --- */
.noscript {
  margin-bottom: 1.5rem;
  padding: .9rem 1.1rem;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
}

/* --- Exemples rapides : boutons en pilule --- */
.exemples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

.exemples__titre {
  margin-right: .25rem;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--text-dim);
}

.pill {
  min-height: 44px;
  padding: .5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(90, 35, 95, .055);
  font: inherit;
  font-size: .86rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}

.pill:hover {
  background: rgba(90, 35, 95, .09);
  border-color: var(--line-strong);
}

/* --- Onglets (comme le sélecteur de langue du portfolio) --- */
.tabs {
  display: flex;
  gap: .25rem;
  margin-bottom: 1.75rem;
  padding: .3rem;
  border-radius: 999px;
  background: rgba(90, 35, 95, .055);
  border: 1px solid var(--line);
}

.tab {
  flex: 1;
  min-height: 44px;
  padding: .6rem 1.15rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

.tab:hover {
  color: var(--text);
  background: rgba(90, 35, 95, .06);
}

.tab[aria-selected='true'] {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(90, 35, 95, .55);
}

.tabpanel {
  border-radius: var(--r-sm);
}

/* --- Formulaires --- */
.form {
  display: grid;
  gap: 1.5rem;
}

.field {
  display: grid;
  gap: .4rem;
  align-content: start;
}

label,
legend {
  font-size: .92rem;
  font-weight: 600;
  color: var(--text);
}

.hint {
  font-size: .84rem;
  color: var(--text-faint);
}

.input {
  width: 100%;
  min-height: 48px;
  padding: .7rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: inset 0 1px 2px rgba(90, 35, 95, .05);
  transition: border-color .25s var(--ease);
}

.input:focus {
  border-color: var(--accent);
}

/* IP, masques et nombres en police à chasse fixe */
.input--mono {
  font-family: var(--mono);
  font-size: .95rem;
}

.input[aria-invalid='true'] {
  border-color: var(--error-line);
}

.field-error {
  padding: .5rem .75rem;
  font-size: .85rem;
  color: var(--error);
  background: var(--error-bg);
  border: 1px solid var(--error-line);
  border-radius: 10px;
}

/* Pas d'erreur = pas de cadre rouge vide */
.field-error:empty {
  display: none;
}

/* --- Boutons en pilule --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 44px;
  padding: .85rem 1.65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 26px -10px rgba(90, 35, 95, .55);
}

.btn--primary:hover {
  background: var(--accent-deep);
}

.btn--primary:active {
  transform: translateY(1px);
}

.btn--secondary {
  background: rgba(90, 35, 95, .05);
  border-color: var(--line);
  color: var(--text);
}

.btn--secondary:hover {
  background: rgba(90, 35, 95, .08);
}

.btn--sm {
  padding: .6rem 1.1rem;
  font-size: .88rem;
}

/* Bouton rond avec seulement une icône (supprimer une ligne) */
.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(90, 35, 95, .05);
  color: var(--text-dim);
  cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

.btn-icon:hover {
  background: rgba(90, 35, 95, .08);
  color: var(--accent-deep);
}

.btn-icon:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.icon {
  width: 1.1em;
  height: 1.1em;
  flex: none;
}

/* Bouton « Copier » : l'icône coche remplace l'icône copie pendant ~2 s (classe ajoutée par app.js) */
.btn-copy .icon-check,
.btn-copy.is-copied .icon-copy {
  display: none;
}

.btn-copy.is-copied .icon-check {
  display: block;
}

/* --- Liste des besoins VLSM --- */
.besoins {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.besoins legend {
  padding: 0;
  margin-bottom: .4rem;
}

/* Message « Limite de 256 besoins atteinte » sous le bouton Ajouter */
.besoins__limite {
  margin-top: .5rem;
}

.besoins__limite:empty {
  display: none;
}

.besoins__liste {
  display: grid;
  gap: .75rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

/* Mobile : le nom sur toute la largeur, puis les hôtes et le bouton supprimer */
.besoin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'nom   nom'
    'hotes suppr';
  gap: .75rem;
  padding: .9rem;
  background: rgba(255, 253, 246, .7);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
}

.besoin__nom {
  grid-area: nom;
}

.besoin__hotes {
  grid-area: hotes;
}

.besoin__suppr {
  grid-area: suppr;
  /* Aligné sur le champ : on saute la hauteur du libellé (1 ligne) + l'espace */
  margin-top: calc(.92rem * 1.55 + .4rem + 2px);
}

/* --- Résultats --- */
.results {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.25rem;
}

.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
}

.results-head h2 {
  font-size: 1.5rem;
}

/* Rappel de l'adresse calculée sous le titre (utile aussi à l'impression) */
.results-sub {
  margin-top: .2rem;
  font-size: .88rem;
  color: var(--text-dim);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

/* Cartes (comme les cartes projets du portfolio) */
.card {
  padding: clamp(1.1rem, 3vw, 1.6rem);
  background: var(--white);
  border-radius: var(--r-md);
  box-shadow:
    0 20px 45px -32px rgba(90, 35, 95, .3),
    0 2px 8px -3px rgba(90, 35, 95, .06);
}

.card h3 {
  margin-bottom: .75rem;
  font-size: 1.1rem;
}

.card--table {
  padding-block: .4rem;
}

/* Chiffres clés : 3 cases séparées par 1px (le fond de la grille fait office de trait) */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  background: var(--line-soft);
  border-radius: var(--r-md);
  box-shadow:
    0 20px 45px -32px rgba(90, 35, 95, .3),
    0 2px 8px -3px rgba(90, 35, 95, .06);
}

.stat {
  display: flex;
  flex-direction: column-reverse; /* dans le HTML : libellé puis valeur ; à l'écran : valeur au-dessus */
  gap: .2rem;
  min-width: 0;
  padding: 1rem clamp(.75rem, 2.5vw, 1.4rem);
  background: var(--white);
}

.stat__value {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.2rem, 4.2vw, 1.75rem);
  line-height: 1.15;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.stat__label {
  font-size: .74rem;
  color: var(--text-faint);
}

/* IP en binaire */
.binary {
  font-family: var(--mono);
  font-size: clamp(.82rem, 2.6vw, 1.05rem);
  line-height: 2;
  letter-spacing: .04em;
  color: var(--text-faint);
}

.octet {
  white-space: nowrap; /* un octet n'est jamais coupé en deux */
}

.bits-reseau {
  padding: .1em .12em;
  font-weight: 700;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 4px;
}

.bits-hote {
  padding: .1em .12em;
  color: var(--text-faint);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.25rem;
  margin-top: .75rem;
  font-size: .82rem;
}

.legend__item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.swatch {
  width: .9rem;
  height: .9rem;
  border-radius: 3px;
  border: 1px solid var(--line);
}

.swatch--reseau {
  background: var(--accent-soft);
  border-color: var(--line-strong);
}

.swatch--hote {
  background: var(--white);
}

/* Tableaux */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}

.data-table thead th {
  padding: .85rem .75rem;
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: left;
  color: var(--text-faint);
  border-bottom: 1px solid var(--line);
}

.data-table td,
.data-table tbody th {
  padding: .8rem .75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}

.data-table tbody tr:last-child > * {
  border-bottom: 0;
}

/* Tableau « clé / valeur » de l'analyse : libellé à gauche */
.table-kv tbody th {
  width: 45%;
  font-weight: 500;
  color: var(--text-dim);
}

.mono {
  font-family: var(--mono);
  font-size: .88rem;
}

.num {
  font-variant-numeric: tabular-nums;
}

.plage__ip {
  white-space: nowrap;
}

/* Barre de répartition VLSM (SVG) */
.barre {
  display: block;
  width: 100%;
  height: 40px;
}

/* Les sous-réseaux se succèdent dans 4 teintes de violet ; « fill » colore un rectangle SVG,
   « background » colore la pastille de la légende (même classe pour les deux). */
.seg-0 { fill: var(--accent-deep); background: var(--accent-deep); }
.seg-1 { fill: #7a3f80; background: #7a3f80; }
.seg-2 { fill: #a46ba9; background: #a46ba9; }
.seg-3 { fill: #c9a3cc; background: #c9a3cc; }

/* Un trait clair sépare deux sous-réseaux voisins */
.segment {
  stroke: var(--white);
  stroke-width: 2;
}

/* Espace libre : motif hachuré défini dans le SVG (<pattern id="hachures">) */
.segment--libre {
  fill: url(#hachures);
}

.hachures__fond {
  fill: var(--white);
}

.hachures__trait {
  fill: var(--line-strong);
}

.legende-barre {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.25rem;
  margin: .9rem 0 0;
  padding: 0;
  list-style: none;
  font-size: .82rem;
  color: var(--text-dim);
}

.legende-barre li {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.pastille {
  width: .9rem;
  height: .9rem;
  flex: none;
  border-radius: 3px;
}

/* Pastille hachurée pour l'espace libre (dégradé répété = rayures obliques) */
.pastille--libre {
  border: 1px solid var(--line-strong);
  background: repeating-linear-gradient(45deg, var(--line-strong) 0 2px, var(--white) 2px 5px);
}

/* Espace libre */
.free {
  font-size: .95rem;
}

.blocs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .9rem 0 0;
  padding: 0;
  list-style: none;
}

.blocs:empty {
  display: none;
}

.blocs li {
  padding: .35rem .8rem;
  font-family: var(--mono);
  font-size: .85rem;
  color: var(--accent-deep);
  background: rgba(90, 35, 95, .055);
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* ========== 6. Responsive ========== */

/* Sous 760px : flou réduit (plus léger pour les téléphones) */
@media (max-width: 759.98px) {
  .panel {
    -webkit-backdrop-filter: blur(14px) saturate(170%);
    backdrop-filter: blur(14px) saturate(170%);
  }
}

/* Sous 860px : chaque ligne du tableau VLSM devient une carte (pas de défilement horizontal).
   « screen » : seulement à l'écran. Une feuille A4 fait moins de 860px de large, et on veut
   garder un vrai tableau à l'impression. */
@media screen and (max-width: 859.98px) {
  .table-cards,
  .table-cards tbody,
  .table-cards tr,
  .table-cards td,
  .table-cards tbody th {
    display: block;
  }

  /* Les en-têtes restent lus par les lecteurs d'écran, mais sont cachés à l'écran */
  .table-cards thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .table-cards tbody tr {
    padding: .5rem 0 .75rem;
    border-bottom: 1px solid var(--line);
  }

  .table-cards tbody tr:last-child {
    border-bottom: 0;
  }

  /* Nom du sous-réseau = titre de la carte */
  .table-cards tbody th {
    padding: .5rem 0;
    border: 0;
    font-family: var(--display);
    font-size: 1.1rem;
    font-weight: 600;
  }

  /* Chaque cellule : libellé (repris de data-label) à gauche, valeur à droite */
  .table-cards td {
    display: grid;
    grid-template-columns: minmax(7rem, 40%) minmax(0, 1fr);
    gap: .75rem;
    padding: .45rem 0;
  }

  .table-cards td::before {
    content: attr(data-label);
    padding-top: .15rem;
    font-family: var(--mono);
    font-size: .7rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-faint);
  }

  .table-cards tbody tr td:last-child {
    border-bottom: 0;
  }
}

/* À partir de 480px : une ligne de besoin = nom | hôtes | supprimer */
@media (min-width: 480px) {
  .tabs {
    display: inline-flex;
    max-width: 100%;
  }

  .besoin {
    grid-template-columns: minmax(0, 1fr) minmax(6rem, 9rem) auto;
    grid-template-areas: 'nom hotes suppr';
  }
}

/* À partir de 860px : un peu plus d'air */
@media (min-width: 860px) {
  .besoins__liste {
    max-width: 44rem;
  }

  .form > .field {
    max-width: 32rem;
  }
}

/* ========== 7. Impression : un plan d'adressage lisible en noir et blanc ========== */
@media print {
  /* Paysage : les 8 colonnes du plan VLSM tiennent sur la largeur */
  @page {
    size: A4 landscape;
    margin: 1.2cm;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 10pt;
  }

  /* Tout ce qui ne sert qu'à l'écran disparaît : en-tête, pied de page, onglets,
     formulaires, boutons, exemples, messages. Seuls le titre et les résultats restent. */
  .site-header,
  .site-footer,
  .skip-link,
  .lead,
  .tabs,
  .exemples,
  .form,
  .actions,
  .noscript {
    display: none !important;
  }

  .wrap {
    width: 100%;
  }

  .hero {
    padding: 0 0 .4cm;
  }

  .hero h1 {
    font-size: 16pt;
  }

  .eyebrow {
    margin-bottom: .1cm;
  }

  /* Plus d'effet verre, d'ombres ni de fonds colorés */
  .panel,
  .card,
  .stats {
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .results {
    margin-top: 0;
    gap: .4cm;
  }

  h1, h2, h3, p, th, td, dt, dd,
  .stat__value,
  .stat__label {
    color: #000 !important;
  }

  /* Chiffres clés : 3 cases encadrées */
  .stats {
    gap: 0;
    border: 1px solid #000;
  }

  .stat {
    padding: .2cm .3cm;
    background: none;
    border-right: 1px solid #000;
  }

  .stat:last-child {
    border-right: 0;
  }

  .stat__value {
    font-size: 14pt;
  }

  /* Tableaux : traits noirs, en-têtes répétés sur chaque page, lignes jamais coupées */
  .data-table {
    font-size: 9pt;
  }

  .data-table thead {
    display: table-header-group;
  }

  .data-table thead th {
    color: #000;
    border-bottom: 1.5px solid #000;
  }

  .data-table td,
  .data-table tbody th {
    padding: .15cm .2cm;
    border-bottom: 1px solid #888;
  }

  .data-table tr,
  .card,
  .stats {
    break-inside: avoid;
  }

  /* Binaire : sans couleur, les bits réseau sont en gras soulignés */
  .bits-reseau {
    background: none;
    text-decoration: underline;
  }

  .bits-hote {
    color: #555;
  }

  .swatch--reseau {
    background: #ccc;
  }

  /* Barre de répartition en niveaux de gris ; on demande à l'imprimante de garder les remplissages */
  .barre,
  .pastille {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .seg-0 { fill: #222; background: #222; }
  .seg-1 { fill: #555; background: #555; }
  .seg-2 { fill: #888; background: #888; }
  .seg-3 { fill: #bbb; background: #bbb; }

  .segment {
    stroke: #fff;
  }

  .hachures__trait {
    fill: #000;
  }

  .pastille--libre {
    border-color: #000;
    background: repeating-linear-gradient(45deg, #000 0 2px, #fff 2px 5px);
  }

  /* Même taille pour toutes les cellules (les IP en .mono étaient plus grandes) */
  .data-table .mono,
  .data-table .num {
    font-size: 9pt;
  }

  .legende-barre,
  .blocs li {
    color: #000;
  }

  .blocs li {
    background: none;
    border-color: #000;
  }
}

/* ========== 8. Mouvement réduit : on coupe toutes les transitions ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
