/* CAB.72 : allure reprise du tableau de Loup (tableau-kanban/web/style.css) : gris ardoise, clair adouci et sombre. */
:root {
  --fond: #efeeea;
  --surface: #faf9f6;
  --surface-2: #e6e4df;
  --texte: #2b3036;
  --texte-doux: #5f6670;
  --trait: #d9d6cf;
  --accent: #4b5563;
  --accent-texte: #f5f5f4;
  --rouge: #a8322b;
  --orange: #8a5a00;
  --barre: #4f8f57;
  --ombre-carte: 0 1px 2px rgba(30, 35, 45, 0.10), 0 3px 8px rgba(30, 35, 45, 0.08);
  --col-afaire: #cfd2d6;
  --col-encours: #f2d77e;
  --col-terminee: #b9dcae;
  --rayon: 12px;
  color-scheme: light;
  font-family: 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
  color: var(--texte);
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #16191d;
    --surface: #1f2328;
    --surface-2: #2a2f35;
    --texte: #e4e6e9;
    --texte-doux: #a3abb5;
    --trait: #353b43;
    --accent: #aab4c1;
    --accent-texte: #16191d;
    --rouge: #f0877d;
    --orange: #e8b45a;
    --barre: #6fb877;
    --ombre-carte: 0 1px 2px rgba(0, 0, 0, 0.45), 0 3px 10px rgba(0, 0, 0, 0.30);
    --col-afaire: #363b42;
    --col-encours: #5e5122;
    --col-terminee: #2f4d2a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--fond); color: var(--texte); font-size: 15px; }
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
button, select, input[type='search'] {
  background: var(--surface); border: 1px solid var(--trait); border-radius: 8px; padding: 6px 10px; min-height: 36px;
}
button { cursor: pointer; }
button:disabled { opacity: 0.6; cursor: progress; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.principal { background: var(--accent); color: var(--accent-texte); border-color: var(--accent); }
.doux { color: var(--texte-doux); }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.aller-contenu { position: absolute; left: -9999px; }
.aller-contenu:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px; z-index: 10; }
.espace { flex: 1; }

.entete {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px;
  background: var(--surface); border-bottom: 1px solid var(--trait); position: sticky; top: 0; z-index: 5;
}
.entete h1 { font-size: 1.25rem; margin: 0; }
.bascule { display: inline-flex; gap: 4px; }
.bascule button[aria-pressed='true'] { background: var(--accent); color: var(--accent-texte); border-color: var(--accent); }

.choix { position: relative; }
.choix-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 6; min-width: 260px; max-height: 70vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre-carte); padding: 10px 12px;
}
.choix-menu fieldset { border: 0; margin: 0; padding: 0; }
.choix-menu label { display: flex; gap: 8px; align-items: center; padding: 5px 0; min-height: 32px; }
.choix-employes { padding-left: 22px; border-left: 2px solid var(--trait); margin: 2px 0 8px 6px; }
.choix-boutons { display: flex; justify-content: flex-end; gap: 8px; }

.message { padding: 0 16px; min-height: 0; }
.message:not(:empty) { padding: 10px 16px; }
.message.erreur { color: var(--rouge); font-weight: 600; }

main { padding: 12px 16px 32px; outline: none; }
.vide { color: var(--texte-doux); font-style: italic; margin: 8px 0; }

.rangee { margin-bottom: 20px; }
.rangee-nom { font-size: 1.05rem; margin: 6px 0 8px; }
.colonnes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .colonnes { grid-template-columns: 1fr; } }
.colonne { background: var(--surface-2); border-radius: var(--rayon); padding: 8px; border-top: 6px solid var(--col-afaire); }
.colonne.encours { border-top-color: var(--col-encours); }
.colonne.terminee { border-top-color: var(--col-terminee); }
.colonne h3 { font-size: 0.95rem; margin: 2px 4px 8px; }
.compte { color: var(--texte-doux); font-weight: 400; }
.cartes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.carte { background: var(--surface); border-radius: 10px; padding: 8px 10px; box-shadow: var(--ombre-carte); border-left: 4px solid transparent; }
.carte.en-retard { border-left-color: var(--rouge); }
.carte-titre { font-weight: 600; text-decoration: none; display: block; overflow-wrap: anywhere; }
.carte-titre:hover { text-decoration: underline; }
.carte-plan { font-size: 0.85rem; color: var(--texte-doux); margin-top: 2px; }
.carte-bas { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.82rem; margin-top: 6px; }
.gestes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.geste { min-height: 32px; padding: 3px 10px; font-size: 0.85rem; }
td .gestes { margin-top: 4px; }
.carte[aria-busy='true'] { opacity: 0.7; }
.pastille { border-radius: 999px; padding: 0 8px; border: 1px solid currentColor; }
.pastille.urgente { color: var(--rouge); }
.pastille.importante { color: var(--orange); }
.echeance.retard, .retard { color: var(--rouge); font-weight: 600; }
.echeance.proche { color: var(--orange); font-weight: 600; }

.outils { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 10px; }
.outils label { display: inline-flex; gap: 6px; align-items: center; max-width: 100%; }
.outils select, .outils input { min-width: 0; max-width: 100%; }
.cadre-table { overflow-x: auto; background: var(--surface); border-radius: var(--rayon); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--trait); vertical-align: top; }
thead th { position: sticky; top: 0; background: var(--surface); white-space: nowrap; }
th .tri { border: 0; background: none; padding: 0; min-height: 0; font-weight: 700; }
tr.en-retard td:first-child { box-shadow: inset 4px 0 var(--rouge); }

#vue-charge .cadre-table { margin-bottom: 18px; }
.charge caption { text-align: left; font-weight: 700; padding: 10px 10px 4px; }
.charge td, .charge th { white-space: nowrap; }
.barre { display: inline-block; height: 10px; width: 80px; border-radius: 5px; vertical-align: middle;
  background: linear-gradient(to right, var(--barre) var(--part, 0%), var(--surface-2) var(--part, 0%)); }
