/* PxPlan — le site navigable. Ce que la DA du Cloud (da-cloud.css) n'a pas.
   Aucune couleur inventée : tout vient de ses variables.
   da-cloud.css est la feuille de OneCloud telle qu'elle est EN LIGNE aujourd'hui
   (versions/v2/2.1.0) : c'est pour ça que la version téléphone est écrite ici, en bas. */

/* Jour / Nuit : les deux lignes qui font tout basculer (comme dans OneCloud). */
html[data-theme="clair"]  { color-scheme: light; }
html[data-theme="sombre"] { color-scheme: dark; }

/* ------------------------------------------------------------ le bandeau « maquette » */
.bandeau { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px;
  background: var(--choisi); border-bottom: 1px solid var(--choisi-bord); font-size: 11px; white-space: nowrap; }
.bandeau b { font-size: 12px; }
.bandeau .dit { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--gris); }
.bandeau a { padding: 3px 9px; border: 1px solid var(--trait); border-radius: 4px; background: var(--fond);
  color: var(--encre); text-decoration: none; }
.bandeau .jour-nuit { display: grid; place-items: center; width: 26px; height: 22px; padding: 0;
  border: 1px solid var(--trait); border-radius: 4px; background: var(--fond); }
.bandeau .jour-nuit .ic { width: 14px; height: 14px; grid-area: 1 / 1; }
.bandeau .jour-nuit .ic:first-child { display: none; }
html[data-theme="sombre"] .jour-nuit .ic:first-child { display: block; }
html[data-theme="sombre"] .jour-nuit .ic:last-child { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .jour-nuit .ic:first-child { display: block; }
  :root:not([data-theme]) .jour-nuit .ic:last-child { display: none; }
}
html[data-theme="clair"] .jour-nuit .ic:first-child { display: none; }
html[data-theme="clair"] .jour-nuit .ic:last-child { display: block; }
.app.avec-bandeau { height: calc(100dvh - 34px); }

/* ------------------------------------------------------------ briques communes */
.ind { display: inline-block; min-width: 26px; padding: 1px 6px; border-radius: 3px;
  background: var(--choisi); border: 1px solid var(--choisi-bord); color: var(--encre);
  font-size: 11px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.ind.zero { background: transparent; border-color: var(--trait); color: var(--gris); }
.ind.gros { min-width: 40px; padding: 4px 10px; font-size: 15px; }
.jauge { height: 6px; border-radius: 3px; background: var(--trait); overflow: hidden; }
.jauge i { display: block; height: 100%; background: var(--accent); }
.etiq { display: inline-block; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--trait);
  font-size: 10.5px; color: var(--gris); white-space: nowrap; }
.puces { display: inline-flex; gap: 3px; }
.puce { display: inline-block; width: 9px; height: 9px; border-radius: 2px; border: 1px solid var(--trait); }
.puce.pleine { background: var(--accent); border-color: var(--accent); }
.depot { display: inline-grid; gap: 1px; min-width: 62px; padding: 3px 7px; border-radius: 4px;
  border: 1px solid var(--plan); background: color-mix(in srgb, var(--plan) 16%, transparent); line-height: 1.15; }
.depot b { font-size: 11px; font-weight: 600; }
.depot small { color: var(--gris); font-size: 10px; }
.depot.maquette { border-color: var(--maquette); background: color-mix(in srgb, var(--maquette) 16%, transparent); }
.avenir { display: inline-block; min-width: 62px; padding: 3px 7px; border-radius: 4px;
  border: 1px dashed var(--trait); color: var(--gris); font-size: 10px; }
.vide-doux { padding: 34px 14px; color: var(--gris); font-size: 13px; text-align: center; }
.vide-doux small { display: block; margin-top: 5px; font-size: 11px; }

/* les colonnes du tableau des plans */
.liste .col-ind { width: 64px; }
.liste .col-ouvrage { width: 96px; }
.liste .col-famille { width: 128px; }
.liste .col-depot { width: 104px; }
.liste .col-phases { width: 118px; }
.liste td.centre, .liste th.centre { text-align: center; }
.liste td:nth-child(4) { text-align: left; }
.liste tbody tr { cursor: pointer; }
/* la 2e ligne et la pastille de droite ne servent qu'au téléphone */
.fichier .sous, .fichier .ind-tel { display: none; }

/* ------------------------------------------------------------ 1. l'accueil */
.accueil { padding: 16px 18px 28px; display: grid; gap: 16px; max-width: 1280px; }
.accueil h2 { margin: 0 0 9px; color: var(--gris); font-size: 11px; font-weight: 400;
  text-transform: uppercase; letter-spacing: .5px; }

.affaires { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 11px; }
@media (max-width: 900px) { .affaires { grid-template-columns: 1fr; } }
.affaire { display: grid; gap: 9px; padding: 16px 18px; background: var(--fond);
  border: 1px solid var(--trait); border-radius: 10px; text-align: left; color: inherit; font: inherit; }
.affaire.active { border-color: var(--accent); }
.affaire:not(.active) { opacity: .7; }
.affaire .tete-a { display: flex; align-items: baseline; gap: 10px; }
.affaire .tete-a b { font-size: 19px; }
.affaire .tete-a span { color: var(--gris); font-size: 12px; }
.affaire .client { color: var(--gris); font-size: 11px; }
.affaire .chiffres { display: flex; gap: 20px; }
.affaire .chiffres div { font-size: 11px; color: var(--gris); }
.affaire .chiffres b { display: block; font-size: 20px; color: var(--encre); font-variant-numeric: tabular-nums; }
.affaire .ouvrir-a { justify-self: start; padding: 6px 13px; border: 1px solid var(--trait); border-radius: 5px;
  background: transparent; color: var(--accent); font: inherit; font-size: 12px; }

.deux-col { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .deux-col { grid-template-columns: 1fr; } }

.derniers { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 10px; }
.vignette-plan { display: grid; gap: 0; padding: 0; overflow: hidden; background: var(--fond);
  border: 1px solid var(--trait); border-radius: 8px; text-align: left; color: inherit; font: inherit; }
.vignette-plan:hover { border-color: var(--accent); }
.vignette-plan img { display: block; width: 100%; aspect-ratio: 1000 / 708; object-fit: cover;
  background: var(--doux); border-bottom: 1px solid var(--trait); }
.vignette-plan .sous-v { display: grid; gap: 2px; padding: 8px 10px 9px; }
.vignette-plan .n { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; }
.vignette-plan .n .ind { margin-left: auto; }
.vignette-plan small { color: var(--gris); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.phases-accueil { display: grid; gap: 11px; padding: 14px 16px; background: var(--fond);
  border: 1px solid var(--trait); border-radius: 10px; }
.phases-accueil .lp { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.phases-accueil .lp span { font-size: 12px; }
.phases-accueil .lp .n { color: var(--gris); font-size: 11px; font-variant-numeric: tabular-nums; }
.phases-accueil .lp .jauge { grid-column: 1 / -1; }

.journal-accueil { display: grid; gap: 0; background: var(--fond); border: 1px solid var(--trait); border-radius: 10px; overflow: hidden; }
.journal-accueil .ev { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; padding: 11px 14px;
  border-bottom: 1px solid var(--trait); }
.journal-accueil .ev:last-child { border-bottom: 0; }
.journal-accueil .pt { grid-row: 1 / span 2; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--accent); }
.journal-accueil .ev[data-t="depot"] .pt { background: var(--plan); }
.journal-accueil .ev[data-t="debut"] .pt { background: var(--gris); }
.journal-accueil .t { font-size: 12.5px; }
.journal-accueil .d { color: var(--gris); font-size: 11px; }
.journal-accueil .q { grid-column: 2; color: var(--gris); font-size: 10.5px; }

.depot-zone { display: grid; place-items: center; gap: 7px; padding: 24px; border: 2px dashed var(--trait);
  border-radius: 10px; color: var(--gris); font-size: 12.5px; text-align: center; }
.depot-zone .ic { width: 28px; height: 28px; }
.depot-zone small { font-size: 11px; }

/* ------------------------------------------------------------ 2. la liste des plans */
.corps { display: flex; flex: 1; min-height: 0; }
.corps > .contenu { flex: 1; min-width: 0; }
.volet { width: 216px; flex-shrink: 0; overflow: auto; padding: 10px 6px 14px;
  background: var(--doux); border-right: 1px solid var(--trait); }
.volet h3 { margin: 12px 8px 5px; color: var(--gris); font-size: 10px; font-weight: 400;
  text-transform: uppercase; letter-spacing: .5px; }
.volet h3:first-child { margin-top: 2px; }
.volet .choixf { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px;
  border: 0; border-radius: 4px; background: transparent; text-align: left; font-size: 12px; color: inherit; }
.volet .choixf:hover { background: var(--fond); }
.volet .choixf[aria-pressed="true"] { background: var(--choisi); }
.volet .choixf[aria-pressed="true"] .ic { color: var(--accent); }
.volet .combien { margin-left: auto; color: var(--gris); font-size: 10px; font-variant-numeric: tabular-nums; }
.volet .ic { width: 14px; height: 14px; color: var(--gris); }
.volet .effacer { width: calc(100% - 8px); margin: 8px 4px 2px; padding: 7px; border: 1px solid var(--trait);
  border-radius: 5px; background: var(--fond); color: var(--accent); font: inherit; font-size: 11px; }

/* ------------------------------------------------------------ 3. la page d'un plan */
.fiche { display: grid; grid-template-columns: minmax(300px, 46%) 1fr; gap: 20px; padding: 18px 20px 30px;
  align-items: start; max-width: 1320px; }
@media (max-width: 980px) { .fiche { grid-template-columns: 1fr; } }
.fiche .apercu { position: sticky; top: 0; display: grid; gap: 10px; }
.fiche .apercu .cadre { display: grid; place-items: center; overflow: hidden; background: var(--doux);
  border: 1px solid var(--trait); border-radius: 10px; }
.fiche .apercu .cadre img { display: block; width: 100%; height: auto; }
.fiche .apercu .cadre.sans { aspect-ratio: 1000 / 708; color: var(--trait); }
.fiche .apercu .cadre.sans .ic { width: 64px; height: 64px; }
.fiche .apercu .sous-apercu { display: flex; align-items: center; gap: 9px; color: var(--gris); font-size: 11px; }
.fiche .apercu .sous-apercu .ic { width: 14px; height: 14px; }

.fiche .detail { display: grid; gap: 18px; }
.fiche h1 { margin: 0; font-size: 21px; line-height: 1.3; }
.fiche .numero-plan { color: var(--gris); font-weight: 400; }
.fiche .sous-titre { margin: 5px 0 0; color: var(--gris); font-size: 12.5px; }
.fiche .barre-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.fiche .barre-actions button { display: flex; align-items: center; gap: 7px; padding: 8px 14px;
  border: 1px solid var(--trait); border-radius: 6px; background: var(--fond); color: inherit; font: inherit; font-size: 12.5px; }
.fiche .barre-actions button.principal { background: var(--accent); border-color: var(--accent); color: light-dark(#fff, #12243a); }
.fiche .barre-actions .ic { width: 15px; height: 15px; }

.bloc { background: var(--fond); border: 1px solid var(--trait); border-radius: 10px; overflow: hidden; }
.bloc > header { display: flex; align-items: center; gap: 9px; padding: 11px 15px; border-bottom: 1px solid var(--trait);
  font-size: 12px; font-weight: 600; }
.bloc > header .ic { width: 15px; height: 15px; color: var(--gris); }
.bloc > header .combien { margin-left: auto; color: var(--gris); font-weight: 400; font-size: 11px; }
.bloc .dedans { padding: 13px 15px; }

.paires { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px 18px; }
.paires div > span { display: block; color: var(--gris); font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; }
.paires div b { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }

.indices-liste { display: grid; }
.indices-liste .ligne-i { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px;
  padding: 11px 15px; border-bottom: 1px solid var(--trait); }
.indices-liste .ligne-i:last-child { border-bottom: 0; }
.indices-liste .ligne-i.courant { background: var(--choisi); }
.indices-liste .ligne-i .quoi { font-size: 12.5px; }
.indices-liste .ligne-i .quoi small { display: block; color: var(--gris); font-size: 11px; }
.indices-liste .ligne-i .quand { color: var(--gris); font-size: 12px; white-space: nowrap; }

.phases-fiche { display: grid; }
.phases-fiche .lf { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  padding: 10px 15px; border-bottom: 1px solid var(--trait); font-size: 12.5px; }
.phases-fiche .lf:last-child { border-bottom: 0; }
.phases-fiche .lf.fait { background: color-mix(in srgb, var(--excel) 7%, transparent); }
.phases-fiche .lf .droite-f { display: flex; align-items: center; gap: 9px; color: var(--gris); font-size: 11.5px; }

.nom-fichier { padding: 11px 15px 13px; }
.nom-fichier .complet { padding: 8px 10px; margin-bottom: 11px; background: var(--doux);
  border: 1px solid var(--trait); border-radius: 5px; font: 11.5px Consolas, "Cascadia Mono", monospace;
  overflow-wrap: anywhere; }
.nom-fichier .morceaux { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 7px; }
.nom-fichier .mo { padding: 6px 9px; border: 1px solid var(--trait); border-radius: 5px; }
.nom-fichier .mo span { display: block; color: var(--gris); font-size: 9.5px; text-transform: uppercase; letter-spacing: .3px; }
.nom-fichier .mo b { font: 600 12px Consolas, "Cascadia Mono", monospace; }

.nav-plan { display: flex; align-items: center; gap: 8px; }
.nav-plan button { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--trait);
  border-radius: 5px; background: var(--fond); color: inherit; font: inherit; font-size: 11px; }
.nav-plan button:disabled { opacity: .4; }
.nav-plan .ic { width: 13px; height: 13px; }

/* ------------------------------------------------------------ 4. le suivi */
.suivi { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.suivi col.col-plan { width: 290px; }
.suivi col.col-ouv { width: 86px; }
.suivi th { position: sticky; top: 0; z-index: 1; height: 34px; padding: 5px 9px; background: var(--fond);
  color: var(--gris); font-size: 11px; font-weight: 400; text-align: left;
  border-bottom: 1px solid var(--trait); border-right: 1px solid var(--trait); }
.suivi th.phase { text-align: center; }
.suivi th small { display: block; color: var(--gris); font-size: 10px; }
.suivi td { height: 30px; padding: 3px 9px; border-bottom: 1px solid var(--trait); }
.suivi td.case { padding: 3px 5px; text-align: center; border-right: 1px solid var(--trait); }
.suivi tbody tr { cursor: pointer; }
.suivi tbody tr:hover { background: var(--doux); }
.nom-plan { display: flex; align-items: center; gap: 7px; min-width: 0; }
.nom-plan span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nom-plan .ic { flex-shrink: 0; color: var(--gris); }
.num { color: var(--gris); font-size: 11px; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.compteurs-phases { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 12px 0; }
.compteur-phase { flex: 1; min-width: 132px; display: grid; gap: 2px; padding: 9px 11px;
  border: 1px solid var(--trait); border-radius: 6px; font-size: 11px; color: var(--gris); }
.compteur-phase b { font-size: 19px; font-weight: 600; color: var(--encre); }
.compteur-phase.vide b { color: var(--gris); }
.legende { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 12px;
  color: var(--gris); font-size: 11px; }

/* ------------------------------------------------------------ 5. les envois */
.envois { padding: 16px 18px 28px; display: grid; gap: 13px; max-width: 1100px; }
.envoi { background: var(--fond); border: 1px solid var(--trait); border-radius: 10px; overflow: hidden; }
.envoi > header { display: flex; align-items: center; gap: 13px; padding: 13px 16px; border-bottom: 1px solid var(--trait); }
.envoi > header .ic { width: 17px; height: 17px; color: var(--accent); }
.envoi > header b { font-size: 14px; }
.envoi > header .qui { color: var(--gris); font-size: 11.5px; }
.envoi > header .combien { margin-left: auto; color: var(--gris); font-size: 11.5px; }
.envoi .dedans-e { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 16px 14px; max-height: 148px; overflow: auto; }
.envoi .p-env { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border: 1px solid var(--trait);
  border-radius: 999px; background: var(--doux); color: inherit; font: inherit; font-size: 11px; }
.envoi .p-env:hover { border-color: var(--accent); color: var(--accent); }

/* ------------------------------------------------------------ le téléphone */
@media (max-width: 700px) {
  /* le bandeau de maquette se réduit au minimum */
  .bandeau { gap: 7px; padding: 0 9px; }
  .bandeau b { font-size: 10.5px; }
  .bandeau .dit { display: none; }
  .bandeau a { font-size: 10px; padding: 3px 7px; }

  /* la barre de commandes : la flèche, le dossier où on est, c'est tout */
  .commandes { gap: 4px; padding: 5px 9px; }
  .commandes .actions { display: none; }       /* les actions sont déjà dans la page */
  .adresse { flex: 1 1 auto; justify-content: flex-start; border: 0; padding: 2px 0; font-size: 14px; font-weight: 600; }
  .adresse .sep, .adresse button:not(:last-of-type) { display: none; }
  .retour { order: -1; padding: 7px 6px; }
  .retour span { display: none; }
  .nav-plan button span, .trier span { display: none; }
  .nav-plan button { padding: 7px 9px; }

  .haut { flex-wrap: wrap; gap: 8px; padding: 9px 12px; }
  .recherche { order: 3; width: 100%; margin: 0; }
  .onglets { padding: 4px 6px; gap: 2px; overflow-x: auto; }
  .onglet { top: 0; border: 0; border-radius: 5px; padding: 8px 10px; }
  .ajouter { margin-left: 4px; margin-bottom: 0; }
  /* le volet de filtres devient une ligne de puces qui défile, au-dessus de la liste */
  .corps { flex-direction: column; }
  .volet { width: auto; display: flex; align-items: center; gap: 6px; overflow-x: auto;
    padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--trait); }
  .volet h3 { margin: 0 2px; flex: none; }
  .volet .choixf { width: auto; flex: none; border: 1px solid var(--trait); border-radius: 999px;
    background: var(--fond); padding: 6px 12px; }
  .volet .choixf .ic { display: none; }
  .volet .combien { margin-left: 6px; }
  .volet .effacer { width: auto; flex: none; margin: 0; white-space: nowrap; }

  .accueil, .fiche, .envois { padding: 12px 12px 24px; }
  .affaires, .deux-col, .fiche { grid-template-columns: 1fr; }
  .affaire .chiffres { flex-wrap: wrap; gap: 10px 20px; }
  .affaire .chiffres b { font-size: 17px; }
  .derniers { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
  /* la liste : une ligne par plan, sur deux étages — plus de colonnes à serrer */
  .liste, .liste tbody, .liste tr { display: block; width: 100%; }
  .liste thead, .liste colgroup { display: none; }
  .liste td { display: none; }
  .liste td:first-child { display: block; height: auto; padding: 0; }
  .liste tbody tr { border-bottom: 1px solid color-mix(in srgb, var(--trait) 60%, transparent); }
  .fichier { display: grid; grid-template-columns: auto 1fr auto; align-items: center;
    column-gap: 12px; min-height: 58px; padding: 8px 12px; }
  .fichier .ic { grid-row: 1 / span 2; width: 25px; height: 25px; }
  .fichier .nom { grid-column: 2; font-size: 14px; white-space: normal; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .fichier .sous { grid-column: 2; display: block; margin-top: 2px; color: var(--gris); font-size: 11.5px; }
  .fichier .ind-tel { grid-column: 3; grid-row: 1 / span 2; display: inline-block; min-width: 30px;
    padding: 2px 7px; border-radius: 3px; background: var(--choisi); border: 1px solid var(--choisi-bord);
    font-size: 11px; font-weight: 600; text-align: center; }
  .fichier .ind-tel.zero { background: transparent; border-color: var(--trait); color: var(--gris); }
  .suivi col.col-plan { width: 180px; }
  .suivi col.col-ouv { width: 0; }
  .suivi th:nth-child(2), .suivi td:nth-child(2) { display: none; }
}

/* ------------------------------------------------------------ PxPlan : l'accueil par client */
.accueil .client { display: grid; gap: 0; }
.accueil .client h2, .accueil section > h2 { display: flex; align-items: center; gap: 8px; }
.accueil .client h2 .combien-c { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 11px; }
.accueil h2 .ic { width: 14px; height: 14px; }
.affaire .client-vide { color: var(--gris); font-size: 11.5px; }
.affaires { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* le menu du compte (la DA du Cloud en ligne n'a pas .titre-menu) */
.titre-menu { padding: 5px 9px 3px; color: var(--gris); font-size: 10px;
  text-transform: uppercase; letter-spacing: .04em; }
.menu-compte { min-width: 214px; }
.app { height: 100dvh; }
.jauge-haut { margin-top: 4px; }
.depot-haut { margin-top: 12px; }
.journal-accueil .d.col2 { grid-column: 2; }
.doux { color: var(--gris); font-weight: 400; }
.doux-p { color: var(--gris); font-size: 12.5px; }
.marque-bouton { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }

/* ============================================================ LE TABLEUR (A22) + filtres Excel (B24) */
.contenu.feuille { padding: 0; }
.tableur { border-collapse: collapse; font: 11.5px/1.25 Consolas, "Cascadia Mono", monospace;
  table-layout: fixed; }
.tableur th, .tableur td { border: 1px solid var(--trait); padding: 2px 7px; height: 22px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tableur col.col-num { width: 44px; }

/* les deux lignes d'en-tête, collées en haut */
.tableur thead th { position: sticky; background: var(--doux); color: var(--gris); font-weight: 400; text-align: center; }
.tableur thead tr.lettres th { top: 0; z-index: 3; height: 17px; font-size: 10px; }
.tableur thead tr.noms th { top: 17px; z-index: 3; height: 26px; text-align: left; position: sticky;
  font: 600 11px "Segoe UI", system-ui, sans-serif; color: var(--encre); padding-right: 24px; }
.tableur thead tr.noms th { --ancre: 1; }        /* l'entonnoir se place par rapport à l'en-tête */
.tableur thead tr.noms th.filtree { background: var(--choisi); }
.tableur thead tr.noms th[data-tri] { cursor: pointer; }
.tableur .titre-col { display: block; overflow: hidden; text-overflow: ellipsis; }

/* l'entonnoir */
.entonnoir { position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 19px; height: 19px; padding: 0; border: 0;
  border-radius: 3px; background: transparent; color: var(--gris); cursor: pointer; }
.entonnoir:hover { background: var(--fond); color: var(--accent); }
.entonnoir.actif { color: var(--accent); background: var(--fond); }
.entonnoir .ic { width: 12px; height: 12px; }

/* les numéros de ligne, collés à gauche */
.tableur tbody th { position: sticky; left: 0; z-index: 2; background: var(--doux); color: var(--gris);
  font-weight: 400; text-align: center; font-size: 10px; }
.tableur tbody tr:hover td { background: var(--choisi); }
.tableur tbody tr { cursor: pointer; }
.tableur td.centre { text-align: center; }
.tableur td.mono { font-family: Consolas, "Cascadia Mono", monospace; }
.tableur td:not(.mono) { font-family: "Segoe UI", system-ui, sans-serif; font-size: 12px; }
.tableur .ind { min-width: 24px; padding: 0 5px; font-size: 10px; }

/* le menu d'un entonnoir */
.menu-col { position: fixed; z-index: 30; width: 250px; background: var(--fond);
  border: 1px solid var(--trait); border-radius: 8px; box-shadow: 0 10px 28px #00000033; overflow: hidden;
  font: 12px/1.4 "Segoe UI", system-ui, sans-serif; }
.menu-col > header { display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  border-bottom: 1px solid var(--trait); font-weight: 600; }
.menu-col > header .ic { width: 14px; height: 14px; color: var(--gris); }
.menu-col > header .n-val { margin-left: auto; color: var(--gris); font-weight: 400; font-size: 11px; }
.menu-col .vals { max-height: 300px; overflow: auto; padding: 5px; }
.menu-col label { display: flex; align-items: center; gap: 9px; padding: 5px 8px; border-radius: 4px; }
.menu-col label:hover { background: var(--doux); }
.menu-col label input { width: 15px; height: 15px; accent-color: var(--accent); flex: none; }
.menu-col label .v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-col label .c { color: var(--gris); font-size: 10.5px; }
.menu-col .pied-col { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--trait); }
.menu-col .pied-col button { flex: 1; padding: 6px; border: 1px solid var(--trait); border-radius: 5px;
  background: transparent; color: inherit; font: inherit; font-size: 11px; cursor: pointer; }
.menu-col .pied-col .principal { background: var(--accent); border-color: var(--accent); color: light-dark(#fff, #12243a); }

/* la barre de commandes */
.vider-filtres, .aide-filtre { display: flex; align-items: center; gap: 7px; padding: 5px 11px;
  border: 1px solid var(--trait); border-radius: 5px; background: var(--fond); color: inherit;
  font: inherit; font-size: 11px; white-space: nowrap; }
.aide-filtre { border-style: dashed; color: var(--gris); }
.vider-filtres { color: var(--accent); cursor: pointer; }
.vider-filtres .ic, .aide-filtre .ic { width: 13px; height: 13px; }

@media (max-width: 700px) {
  .tableur { font-size: 11px; }
  .aide-filtre { display: none; }
}
