/* Tableau réutilisable (js/tableau.js) */
.tbl-barre{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 10px}
.tbl-barre input[type=search]{flex:1 1 240px;min-width:180px;height:40px;box-sizing:border-box;padding:0 12px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface);color:var(--ink);font:500 15px var(--f-body)}
.tbl-compte{margin-left:auto;color:var(--ink2);font-size:14px}
.tbl-panneau{border:1px solid var(--line);border-radius:var(--r);padding:10px 14px;margin:0 0 10px;background:var(--surface)}
.tbl-panneau ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:4px 16px}
.tbl-panneau li{display:flex;align-items:center;gap:6px}
.tbl-panneau li label{flex:1}
.tbl-panneau .btn{height:30px;min-height:30px;padding:0 8px}
.tbl-defile{max-height:75vh;overflow:auto}
.tbl thead th{position:sticky;top:0;background:var(--surface);z-index:2;white-space:nowrap}
.tbl thead tr.tbl-filtres th{top:38px;z-index:1;padding:2px 4px}
.tbl thead tr.tbl-filtres input,.tbl thead tr.tbl-filtres select{width:100%;min-width:70px;height:30px;box-sizing:border-box;padding:0 6px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface);color:var(--ink);font:500 13px var(--f-body)}
.tbl-tri{appearance:none;background:none;border:0;padding:6px 4px;font:700 13px var(--f-body);color:var(--ink);cursor:pointer;text-align:left}
.tbl-fleche{margin-left:4px;color:var(--ink2);font-size:11px}
th[aria-sort="ascending"] .tbl-fleche,th[aria-sort="descending"] .tbl-fleche{color:var(--accent)}
.tbl th[draggable=true]{cursor:grab}
.tbl-cliquable{cursor:pointer}
.tbl-cliquable:hover td{background:var(--sunk)}
.tbl-ouverte td{background:var(--sunk);font-weight:700}
.tbl-ouvrir{height:auto;min-height:32px;padding:2px 10px;font-weight:700}
.tbl td select{height:30px;max-width:150px;font:500 13px var(--f-body);background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:var(--r)}
.tbl-detail>td{padding:0;background:var(--surface)}
.tbl-detail-in{border:3px solid var(--accent);border-radius:var(--r);margin:6px 0 14px;padding:14px 18px;font-weight:400;cursor:auto}
.tbl-libre{max-height:none}
/* Dans la fiche d'une ligne ouverte, un menu remplit sa boîte bordée (.inp) au lieu de garder la largeur d'une cellule (D-2026-11-04-01) */
.tbl td .inp select,.tbl td .inp input{max-width:none;width:100%}

/* Direction B (Q-393, docs/APPARENCE.md, section 5) : champ de recherche et filtres arrondis, fond en retrait comme les champs .inp; ligne ouverte en carte.
   Vaut pour tous les modules qui utilisent le tableau commun (Équipements, Demandes internes, Administration, Produits) : seules les formes et les couleurs changent. */
.tbl-barre input[type=search]{border-color:var(--champ-line);border-radius:var(--r-ctl);background:var(--champ-bg)}
.tbl-barre input[type=search]:focus{outline:none;background:var(--surface);border-color:var(--ink);box-shadow:0 0 0 1px var(--ink),0 0 0 4px var(--hover)}
.tbl-panneau{border-color:var(--card-line);border-radius:var(--r-ctl);box-shadow:var(--sh-card)}
.tbl thead tr.tbl-filtres input,.tbl thead tr.tbl-filtres select,.tbl td select{border-color:var(--champ-line);border-radius:10px;background:var(--champ-bg)}
.tbl-tri{font-weight:600}
.tbl-cliquable:hover td{background:var(--bg)}
.tbl-ouverte td{background:var(--bg)}
.tbl-detail-in{border:1px solid var(--card-line);border-left:4px solid var(--accent);border-radius:var(--r-card);box-shadow:var(--sh-card);background:var(--surface)}
.tbl-ouvrir{border-radius:var(--r-btn)}
@media (max-width:699px){
  .tbl-barre input[type=search]{height:44px;min-width:0;flex-basis:100%}
  .tbl-barre .btn{min-height:44px}
}

/* Direction B, le tableau lui-même (Q-393, docs/APPARENCE.md, section 5, règle 7) : même allure que le tableau des Demandes internes (css/tickets-materiel.css).
   Cadre arrondi à bordure pâle, titres de colonne en phrase normale, lignes aérées séparées d'un trait, survol en retrait, pastilles d'état, boutons d'action compacts.
   Seules les formes et les couleurs changent : tri, filtres, recherche, colonnes, ligne ouverte et export restent ceux de js/tableau.js.
   Au téléphone, le tableau garde sa forme et défile dans son cadre (jamais la page), comme le catalogue des Produits. */
.tw.tbl-defile{margin:0 0 10px;padding:0;border:1px solid var(--card-line);border-radius:var(--r-ctl);background:var(--surface)}
.tb.tbl{width:100%;margin:0;font-size:13.5px}
.tb.tbl th,.tb.tbl td{padding:10px 12px;border-top:1px solid var(--line);vertical-align:middle}
.tb.tbl thead th{border-top:0;color:var(--ink2);font:600 13px/1.2 var(--f-body);letter-spacing:0;text-transform:none;background:var(--surface)}
.tb.tbl thead tr:first-child th{height:40px;padding:4px 12px;box-sizing:border-box}
.tb.tbl thead tr.tbl-filtres th{top:40px;padding:0 6px 8px;border-bottom:1px solid var(--line)}
.tb.tbl tbody tr:first-child td{border-top:0}
.tb.tbl .tbl-tri{padding:4px 0;font:600 13px/1.2 var(--f-body);color:var(--ink2);border-radius:calc(var(--r-ctl) - 4px)}
.tb.tbl th[aria-sort="ascending"] .tbl-tri,.tb.tbl th[aria-sort="descending"] .tbl-tri{color:var(--ink)}
.tb.tbl .tbl-tri:hover{color:var(--ink)}
.tb.tbl .tbl-tri:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tb.tbl th[aria-sort="none"] .tbl-fleche{opacity:.6}
.tbl-cliquable:hover td,.tbl-ouverte td{background:var(--bg)}
.tbl-ouverte td{font-weight:600}
/* Pastilles d'état dans une cellule (.etat de css/moderne.css, .st des modules) : sur une ligne, centrées */
.tb.tbl td .etat,.tb.tbl td .st{vertical-align:middle;white-space:nowrap}
/* Ouvrir la fiche : bouton tonal compact; quand le bouton porte le nom de la ligne (première colonne), il se lit comme un lien en gras */
.tb.tbl .btn.tbl-ouvrir{min-height:32px;height:auto;padding:2px 12px;border-color:transparent;background:var(--sunk);color:var(--ink);font:600 13px/1.2 var(--f-body);box-shadow:none}
.tb.tbl .btn.tbl-ouvrir:hover{background:var(--hover);border-color:var(--line-f)}
.tb.tbl .btn.tbl-ouvrir.tbl-ouvrir-nom{background:none;padding:2px 0;min-height:32px;justify-content:flex-start;text-align:left;font-weight:700}
.tb.tbl .btn.tbl-ouvrir.tbl-ouvrir-nom:hover{background:none;border-color:transparent;text-decoration:underline}
.tb.tbl .btn.tbl-ouvrir[aria-expanded="true"]{background:var(--ink);color:var(--bg)}
.tb.tbl .btn.tbl-ouvrir.tbl-ouvrir-nom[aria-expanded="true"]{background:none;color:var(--accent)}
/* Icônes d'action dans une cellule (Supprimer du Journal, .ib) : carré compact, bordure pâle; rouge au survol */
.tb.tbl td .ib{width:34px;height:34px;border-color:var(--card-line);border-radius:var(--r-ctl);color:var(--ink2)}
.tb.tbl td .ib svg{width:16px;height:16px}
@media (hover:hover){.tb.tbl td .ib:hover{background:var(--bad-soft);border-color:var(--bad);color:var(--bad)}}
.tb.tbl td .btn{box-shadow:none}
@media (max-width:699px){
  .tb.tbl{font-size:13px}
  .tb.tbl th,.tb.tbl td{padding:8px 10px}
  .tb.tbl thead tr:first-child th{padding:4px 10px}
  .tb.tbl .btn.tbl-ouvrir{min-height:40px}
  .tb.tbl td .ib{width:40px;height:40px}
}
