/* Tableaux de géolocalisation : fiches sous 640px, tableaux inchangés sur ordinateur */
@media (max-width: 640px) {
  .table-wrap {
    overflow: visible !important;
    max-width: 100%;
    margin: 0 0 16px;
    padding: 0;
  }
  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  .table-wrap table { border: 0; background: transparent; }
  .table-wrap thead { display: none; }
  .table-wrap tbody tr {
    overflow: hidden;
    border: 1px solid #dce5ea;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(25,51,65,.055);
    margin: 0 0 12px;
    padding: 4px 12px;
  }
  .table-wrap tbody td {
    display: grid;
    grid-template-columns: minmax(95px, 38%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border: 0;
    border-bottom: 1px solid #e9eef1;
    padding: 11px 0;
    font-size: .9rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: normal;
    white-space: normal;
  }
  .table-wrap tbody td:last-child { border-bottom: 0; }
  .table-wrap tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: .84rem;
    color: #526673;
  }
  /* Le tableau IPv6 contient déjà une colonne "Information" :
     chaque ligne devient une fiche contenant les deux fournisseurs. */
  .table-wrap table.ipv6-table tbody tr {
    border-left: 4px solid #7da98a;
    padding: 0 12px 5px;
  }
  .table-wrap table.ipv6-table tbody td:first-child {
    display: block;
    font-weight: 750;
    font-size: .94rem;
    padding: 12px 0 8px;
    color: #1b4534;
    border-bottom: 1px solid #d8e5dc;
  }
  .table-wrap table.ipv6-table tbody td:first-child::before { display: none; }
  .table-wrap table.ipv6-table tbody td:nth-child(n+2) {
    grid-template-columns: minmax(95px, 38%) minmax(0, 1fr);
    padding: 10px 0;
  }
  .table-wrap table.ipv6-table tbody td:nth-child(2)::before { content: 'ipdata.co'; }
  .table-wrap table.ipv6-table tbody td:nth-child(3)::before { content: 'pro.ip-api.com'; }
  /* Les valeurs longues comme IPv6 ou route BGP doivent rester dans la fiche. */
  .table-wrap td[id^="ip"],
  .table-wrap td[id^="v6-"],
  .table-wrap .ip-cell { overflow-wrap: anywhere; white-space: normal !important; }
  #ip-flag { font-size: 14px; margin-left: 4px; }
}
@media (max-width: 380px) {
  .table-wrap tbody td { grid-template-columns: minmax(80px, 36%) minmax(0, 1fr); gap: 7px; }
}
