/* Page Tous les appareils : le tableau complet (ancien download_table.php) */
[data-boards] [hidden] { display: none !important; }
/* plus large que les autres pages : le tableau a besoin de place */
.bt-wide { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* barre d'outils */
.bt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.bt-toolbar .search { flex: 1 1 260px; max-width: 340px; }
.bt-toolbar .search input, .bt-sel select { padding-top: .55rem; padding-bottom: .55rem; }
.bt-sel { display: inline-flex; align-items: center; gap: .45rem; margin: 0; font-size: .84rem; font-weight: 500; color: var(--muted); }
.bt-sel select { width: auto; max-width: 13rem; font-size: .9rem; }
.bt-chip, .bt-cols summary {
  display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem; border-radius: 999px; cursor: pointer; list-style: none;
  font: 600 .84rem/1 var(--font); color: var(--text); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .09);
}
.bt-chip .icon, .bt-cols summary .icon { width: 14px; height: 14px; color: var(--orange); }
.bt-chip:hover, .bt-cols summary:hover { border-color: var(--border-strong); }
.bt-chip[aria-pressed="true"] { color: #fff; border-color: var(--orange); background: rgba(251, 176, 59, .12); }
.bt-cols { position: relative; }
.bt-cols summary::-webkit-details-marker { display: none; }
.bt-cols[open] summary { border-color: var(--orange); }
.bt-cols > div {
  position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; display: grid; gap: .15rem; min-width: 180px; padding: .5rem;
  background: #0a1d20; border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .9);
}
.bt-cols label { display: flex; align-items: center; gap: .55rem; margin: 0; padding: .4rem .5rem; border-radius: 8px; font-weight: 500; cursor: pointer; }
.bt-cols label:hover { background: rgba(255, 255, 255, .05); }
.bt-cols input { accent-color: var(--orange); }
.bt-count { margin-left: auto; font: 600 .8rem/1 var(--mono); color: var(--faint); white-space: nowrap; }

/* légende des canaux */
.bt-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: .84rem; }
.bt-legend li { display: flex; align-items: baseline; gap: .4rem; }
.bt-legend strong { white-space: nowrap; }
.bt-legend .bt-dot { align-self: center; }
.bt-sel > span { white-space: nowrap; }
.bt-dot { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.bt-stable { --c: var(--teal); }
.bt-butterfly { --c: #a855f7; }
.bt-rc { --c: var(--orange); }

/* le tableau */
.bt-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .88rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.bt-table th, .bt-table td { padding: .45rem .7rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.bt-table tbody tr:last-child td { border-bottom: 0; }
.bt-table thead th {
  position: sticky; top: 72px; z-index: 5; padding-block: .6rem; background: #0a1d20; border-bottom-color: var(--border-strong);
  font: 700 .7rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); white-space: nowrap;
}
.bt-table thead th:first-child { border-top-left-radius: var(--radius); }
.bt-table thead th:last-child { border-top-right-radius: var(--radius); }
.bt-table th button { display: inline-flex; align-items: center; gap: .35rem; padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.bt-table th button:hover { color: var(--text); }
.bt-table th button::after { content: "↕"; opacity: .35; font-family: var(--font); }
.bt-table th[aria-sort="ascending"] button, .bt-table th[aria-sort="descending"] button { color: var(--orange); }
.bt-table th[aria-sort="ascending"] button::after { content: "↑"; opacity: 1; }
.bt-table th[aria-sort="descending"] button::after { content: "↓"; opacity: 1; }
.bt-table tbody tr { transition: background .15s; }
.bt-table tbody tr:hover { background: rgba(255, 255, 255, .035); }
.bt-table tbody tr:hover td.bt-model strong { color: #fff; }
.bt-table code { padding: .1em .4em; font-size: .8rem; white-space: nowrap; color: var(--muted); }

/* colonnes masquables (boards.js met la liste dans data-hide) */
.bt-table[data-hide~="family"] .c-family, .bt-table[data-hide~="arch"] .c-arch,
.bt-table[data-hide~="type"] .c-type, .bt-table[data-hide~="pic"] .c-pic { display: none; }

.c-pic { width: 88px; }
.bt-pic { display: grid; place-items: center; width: 72px; height: 40px; border-radius: 7px; background: linear-gradient(160deg, #f4fbfb, #d8ecec); overflow: hidden; }
.bt-pic img { max-width: 64px; max-height: 34px; width: auto; height: auto; object-fit: contain; mix-blend-mode: multiply; filter: contrast(1.08) brightness(1.04); }
.bt-pic.is-nopic img { max-height: 22px; opacity: .35; filter: grayscale(1); mix-blend-mode: normal; }
.bt-model { min-width: 190px; }
.bt-model small { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; color: var(--muted); font-size: .74rem; line-height: 1.3; }
.bt-model strong { display: block; font-size: .93rem; line-height: 1.25; }
/* même badge que la page Téléchargement */
.dl-lab {
  display: inline-flex; align-items: center; gap: .2rem; padding: .05rem .4rem; border-radius: 999px;
  font: 700 .62rem/1.3 var(--font); color: var(--orange); background: rgba(251, 176, 59, .1); border: 1px solid rgba(251, 176, 59, .35);
}
.dl-lab .icon { width: 10px; height: 10px; }
.bt-kind { display: inline-block; padding: .15rem .5rem; border-radius: 6px; font-size: .78rem; color: var(--muted); background: rgba(255, 255, 255, .05); white-space: nowrap; text-transform: capitalize; }

/* une version : le numéro, puis la date */
.bt-rel { white-space: nowrap; }
.bt-ver {
  display: inline-flex; align-items: baseline; gap: .45rem; padding: .25rem .55rem; border-radius: 8px; color: var(--text);
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); border-left: 3px solid var(--c);
}
.bt-ver b { font: 800 .9rem/1.1 var(--mono); color: var(--c); }
.bt-ver span { font: 500 .74rem/1.1 var(--mono); color: var(--faint); }
.bt-ver:hover { color: #fff; text-decoration: none; border-color: var(--c); background: rgba(255, 255, 255, .07); }
.bt-ver.bt-old { --c: var(--coral); } /* appareil resté sur une ancienne version stable */

.c-doc { white-space: nowrap; }
.bt-doc { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--orange); }
.bt-doc:hover { background: rgba(255, 255, 255, .07); }
.bt-doc .icon { width: 16px; height: 16px; }
.bt-must { color: var(--red); }

.bt-foot { margin-top: 1rem; }
.bt-foot .icon { width: 15px; height: 15px; margin-right: .3rem; color: var(--teal); vertical-align: -3px; }
[data-boards] .empty { margin-top: 1rem; }

@media (max-width: 1040px) { .bt-table thead th { top: 64px; } }
/* tablettes et téléphones : le tableau défile de côté (l'en-tête n'est plus collant) */
@media (max-width: 900px) {
  .bt-scroll { overflow-x: auto; margin-inline: -20px; padding-inline: 20px; -webkit-overflow-scrolling: touch; }
  .bt-table thead th { position: static; }
  .bt-count { margin-left: 0; }
  .bt-sel { flex: 1 1 140px; }
  .bt-sel select { flex: 1; max-width: none; }
}
@media (max-width: 560px) {
  .bt-toolbar .search { max-width: none; }
  .bt-sel { flex-basis: 100%; }
  .bt-sel > span { min-width: 5.2rem; }
  .bt-legend { flex-direction: column; }
  .bt-legend li { display: grid; grid-template-columns: auto auto 1fr; }
}
