/* Identité Paie CCQ : bleu marine #041e42 et jaune #fcb514, comme le logo. Fond crème, panneaux
   blancs bordés finement, tableaux aérés aux en-têtes en petites capitales, chiffres alignés à droite.
   La barre du haut est marine, soulignée de jaune ; l'action principale est jaune. Titres en Anton. */
@font-face {
  font-family: "Anton"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/polices/anton.ttf") format("truetype"); /* SIL Open Font License, voir polices/OFL-anton.txt */
}
:root {
  --marine: #041e42;
  --jaune: #fcb514;
  --titre: "Anton", Impact, "Arial Narrow", sans-serif;
  --plateau: none;
  --plateau-uni: #f4f1ec;
  --sur-plateau: #13213a;
  --sur-plateau-discret: #5b6577;
  --voile: rgba(255, 255, 255, .12);
  --voile-fort: rgba(255, 255, 255, .24);
  --barre: var(--marine);
  --colonne: #ece8e1;
  --surface: #ffffff;
  --texte: #13213a;
  --discret: #5b6577;
  --bordure: #e3e0da;
  --bordure-forte: var(--marine);
  --accent: var(--marine);
  --accent-fonce: #0b2f5f;
  --accent-texte: #ffffff;
  --principal: var(--jaune);
  --principal-fonce: #e9a400;
  --principal-texte: var(--marine);
  --encart: #f6f4f0;
  --sous-total: #efece6;
  --danger: #b4322a;
  --succes: #1f7a4d;
  --alerte-fond: #fff5dc;
  --alerte-bord: var(--jaune);
  --ombre-carte: 0 1px 2px rgba(4, 30, 66, .05);
  --ombre-levee: 0 18px 40px -10px rgba(4, 30, 66, .25), 0 0 1px rgba(4, 30, 66, .25);
  --rayon: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --plateau-uni: #08111f;
    --sur-plateau: #dfe5ee;
    --sur-plateau-discret: #93a0b4;
    --barre: #031630;
    --colonne: #0d1829;
    --surface: #111d30;
    --texte: #dfe5ee;
    --discret: #93a0b4;
    --bordure: #24324a;
    --bordure-forte: #93a0b4;
    --accent: var(--jaune);
    --accent-fonce: #ffc93f;
    --accent-texte: var(--marine);
    --encart: #18253b;
    --sous-total: #1b2a42;
    --danger: #f08b84;
    --succes: #5cc795;
    --alerte-fond: #2e2612;
    --alerte-bord: #cf9f02;
    --ombre-carte: none;
    --ombre-levee: 0 8px 24px rgba(0, 0, 0, .5), 0 0 1px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--plateau-uni);
  color: var(--texte);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
main { max-width: 1000px; margin: 0 auto; padding: 20px 16px; color: var(--sur-plateau); }
main.large { max-width: none; }
main.centre { max-width: 440px; padding-top: 10vh; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h2 { font-family: var(--titre); font-size: 1.65rem; font-weight: 400; letter-spacing: .01em; }
h3 { font-size: 1.08rem; }
a { color: var(--accent); }
main a { color: var(--accent); }
.discret { color: var(--discret); font-size: .92em; }
main .discret { color: var(--sur-plateau-discret); }
.chargement, .vide { color: var(--sur-plateau-discret); text-align: center; padding: 24px 8px; }
/* Dans une carte (fond blanc), le texte pâle prévu pour le fond bleu serait invisible. */
.carte .vide, details .vide { color: var(--discret); }
.succes { color: var(--succes); }
.invalide { color: var(--danger); }

/* Panneaux posés sur le plateau : texte foncé, liens et texte discret ordinaires. */
main .carte, main .jour, main .colonne, .feuille-modale, main.centre > form, main.centre > div { color: var(--texte); }
.carte a, .jour a, .colonne a, .feuille-modale a, main.centre a { color: var(--accent); }
.carte .discret, .jour .discret, .colonne .discret, .feuille-modale .discret, main.centre .discret { color: var(--discret); }
.carte a.rangee-lien, .carte a.etat-chantier { color: inherit; }

/* ── En-tête ── */
.entete {
  position: sticky; top: 0; z-index: 10;
  background: var(--barre); color: #fff; border-bottom: 4px solid var(--jaune);
  padding-top: env(safe-area-inset-top);
}
.barre { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; max-width: 960px; margin: 0 auto; }
.barre a { color: inherit; text-decoration: none; }
.marque { font-family: var(--titre); font-size: 1.55rem; line-height: 1; letter-spacing: .01em; display: inline-flex; align-items: center; gap: .28em; padding: 4px 0; }
.marque .m-ccq { color: var(--jaune); letter-spacing: -.02em; }
.marque .porte { margin-left: 6px; padding: 3px 8px; border-radius: 3px; border: 1px solid rgba(255,255,255,.35); font-family: ui-monospace, Consolas, monospace; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.barre-droite { display: flex; gap: 10px; align-items: center; }
.cloche { position: relative; font-size: 1.1rem; display: inline-flex; padding: 6px 8px; border-radius: 6px; }
.cloche:hover, .moi:hover { background: var(--voile); }
.cloche .compte {
  position: absolute; top: -2px; right: -4px; background: #d9443a; color: #fff;
  border-radius: 10px; font-size: .7rem; padding: 0 5px; font-weight: 700;
}
.moi {
  display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 10px;
  border-radius: 16px; background: var(--voile-fort); font-size: .88rem; font-weight: 600;
}
.pastille-attente { font-size: .85rem; }
.onglets { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 10px; max-width: 960px; margin: 0 auto; scrollbar-width: none; }
.onglets a {
  color: #fff; text-decoration: none; padding: 6px 12px; white-space: nowrap; border-radius: 6px;
  background: var(--voile); font-size: .92rem; font-weight: 500;
}
.onglets a:hover { background: var(--voile-fort); }
.onglets a.actif { background: var(--jaune); color: var(--marine); font-weight: 600; }
.bandeau-hors-ligne { background: var(--alerte-fond); color: var(--texte); padding: 6px 16px; font-size: .88rem; text-align: center; }
.bandeau-invitation { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; background: var(--surface); color: var(--texte); padding: 6px 16px; font-size: .9rem; border-bottom: 1px solid var(--bordure); }
.choix-entreprise { width: auto; max-width: 45vw; min-height: 32px; padding: 2px 8px; margin-left: 10px; background: rgba(255,255,255,.15); color: inherit; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; font-size: .9rem; }
.choix-entreprise option { color: #13213a; }

/* ── Éléments ── */
.carte {
  background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); box-shadow: var(--ombre-carte);
  padding: 18px 20px; margin-bottom: 16px;
}
.carte > h3:first-child, .carte > h2:first-child { margin-top: 2px; }
/* Titre de section discret, en petites capitales (« DÉTAIL PAR SALARIÉ »). */
.carte h4, .titre-section { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--discret); margin: 18px 0 8px; }
@media (max-width: 600px) { .carte { padding: 14px; } }
main.centre > form, main.centre > div:not(.vide) {
  background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); box-shadow: var(--ombre-levee); padding: 20px; margin-bottom: 12px;
}
main.centre > p { color: var(--sur-plateau); text-align: center; }
.carte.alerte, .alerte { background: var(--alerte-fond); border-left: 4px solid var(--alerte-bord); padding: 10px 12px; border-radius: 6px; margin: 8px 0; }
.note { background: var(--encart); color: var(--discret); font-size: .9rem; padding: 10px 12px; border-radius: 6px; margin: 8px 0; }
.carte.erreur { color: var(--danger); }
.liste { display: flex; flex-direction: column; gap: 10px; }
.liste .carte { margin: 0; }
.rangee { display: flex; align-items: center; gap: 12px; justify-content: space-between; color: inherit; text-decoration: none; }
.rangee-lien { display: flex; flex: 1; justify-content: space-between; gap: 12px; color: inherit; text-decoration: none; align-items: center; }
.droite { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.inactif { opacity: .6; }
.defilant { overflow-x: auto; }

.champ { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; flex: 1; min-width: 0; }
.champ > span { font-size: .88rem; font-weight: 600; }
.champ small { color: var(--discret); font-size: .8rem; }
.case { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]), select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid var(--bordure); border-radius: 6px; background: var(--surface);
  min-height: 44px; color: var(--texte);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input[type=checkbox] { width: 20px; height: 20px; }
fieldset { border: 1px solid var(--bordure); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
legend { font-weight: 600; font-size: .9rem; padding: 0 4px; }
.deux { display: flex; gap: 10px; flex-wrap: wrap; }
.deux > * { flex: 1 1 180px; }
.trois { display: flex; gap: 10px; flex-wrap: wrap; }
.trois > * { flex: 1 1 120px; }

button, .bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 16px; border-radius: 4px; border: 1.5px solid var(--accent);
  background: var(--surface); cursor: pointer; text-decoration: none; color: var(--accent);
  font-weight: 600; transition: background .12s, border-color .12s, color .12s;
}
button:hover:not(:disabled), .bouton:hover { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
button:disabled { opacity: .5; cursor: default; }
button.principal, .bouton.principal { background: var(--principal); border-color: var(--principal); color: var(--principal-texte); }
button.principal:hover:not(:disabled), .bouton.principal:hover { background: var(--principal-fonce); border-color: var(--principal-fonce); }
button.danger { color: var(--danger); border-color: var(--danger); }
button.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
button.large { width: 100%; margin-top: 8px; }
button.petit { min-height: 36px; padding: 4px 10px; font-size: .88rem; }
button.lien, button.lien:hover:not(:disabled) { border: 0; background: none; box-shadow: none; color: var(--accent); padding: 0; min-height: 0; text-decoration: underline; font-weight: 500; }
.boutons { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; align-self: center; }

.badge { display: inline-block; font-size: .76rem; padding: 2px 8px; border-radius: 4px; font-weight: 600; white-space: nowrap; }
.b-brouillon { background: #e3e7ec; color: #3a4553; }
.b-soumise { background: #dbe5f3; color: #0b2f5f; }
.b-approuvee { background: #dcf1e2; color: #1e6a36; }
.b-refusee { background: #fbe1df; color: #9b1d17; }
.b-traitee { background: #d7d7d7; color: #2b2b2b; }
.role { font-size: .8rem; color: var(--discret); }
.etiquettes { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }

/* ── Connexion ── */
.connexion h1 { color: var(--accent); }
/* Écran de connexion : le logo, et le nom de la porte en petites capitales. */
.logo-connexion { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 4px 0 14px; }
.logo-connexion img { width: 210px; height: auto; }
.logo-connexion .porte { font: 600 .72rem/1 ui-monospace, Consolas, monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--discret); display: inline-flex; align-items: center; gap: 8px; }
.logo-connexion .porte::before { content: ""; width: 9px; height: 9px; background: var(--jaune); }
main.centre .logo-connexion + p { text-align: center; }
.qr { display: block; margin: 8px auto; background: #fff; padding: 8px; border-radius: 8px; }
.code { font-size: 1.4rem; letter-spacing: .2em; text-align: center; }
.secret { display: block; padding: 8px; background: var(--colonne); border-radius: 6px; word-break: break-all; font-size: .95rem; }
.secret.grand { font-size: 1.3rem; text-align: center; margin: 8px 0; user-select: all; }
.codes { columns: 2; list-style: none; padding: 0; }
.codes li { padding: 4px 0; }

/* ── Saisie ── */
.semaine-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.fleche { font-size: 1.8rem; text-decoration: none; padding: 0 14px; line-height: 1; }
.statut-ligne { margin-bottom: 10px; }
.jour { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); box-shadow: var(--ombre-carte); margin-bottom: 10px; padding: 10px 12px; }
.jour.aujourdhui { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.jour > header { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 4px; }
.nom-jour::first-letter { text-transform: uppercase; }
.ligne { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px dashed var(--bordure); align-items: center; flex-wrap: wrap; }
.nature { color: var(--discret); font-size: .92rem; }
.ajouter { width: 100%; justify-content: flex-start; color: var(--accent); margin-top: 6px; background: transparent; box-shadow: none; border: 1px dashed var(--bordure); }
.ajouter:hover:not(:disabled) { background: color-mix(in srgb, var(--texte) 8%, transparent); box-shadow: none; color: var(--texte); }
.total-semaine { text-align: right; padding: 10px 4px; font-size: 1.05rem; font-weight: 600; }
.apercu { font-weight: 600; }

/* ── Fenêtres ── */
.fond {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
}
.feuille-modale {
  background: var(--surface); width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
  border-radius: 12px 12px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: var(--ombre-levee);
}
.feuille-modale.large { max-width: 720px; }
@media (min-width: 700px) {
  .fond { align-items: center; }
  .feuille-modale { border-radius: 12px; }
}

/* ── Approbation ── */
.sous-onglets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.sous-onglets { gap: 4px; border-bottom: 1px solid var(--bordure); margin-bottom: 18px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.sous-onglets a { white-space: nowrap; }
.sous-onglets a { padding: 8px 12px; text-decoration: none; color: var(--discret); font-size: .93rem; font-weight: 500; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.sous-onglets a:hover { color: var(--texte); }
.sous-onglets a.actif { color: var(--texte); border-bottom-color: var(--jaune); font-weight: 600; }
.barre-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.barre-actions label { display: flex; gap: 8px; align-items: center; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0 10px; }
.ligne-edition.ecart { border-color: var(--danger); }
.pied-ligne { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.differences { margin: 6px 0; padding-left: 20px; font-size: .92rem; }
.differences del { color: var(--danger); }
.differences ins { color: var(--succes); text-decoration: none; font-weight: 600; }
.differences .ajout { color: var(--succes); }
.differences .retrait { color: var(--danger); }
.historique { padding-left: 20px; }
.historique li { margin-bottom: 8px; }
.notification.non-lue { border-left: 4px solid var(--accent); }
.compte { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.tableau, .montants { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tableau th, .tableau td, .montants th, .montants td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--bordure); vertical-align: top; }
.tableau th, .montants th { font-size: .76rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--discret); white-space: nowrap; }
.tableau th.nombre, .montants th:last-child { text-align: right; }
.tableau tr.sous-total td, .montants tr.sous-total td { background: var(--sous-total); font-weight: 700; }
.tableau tr.sous-total td:first-child, .montants tr.sous-total td:first-child { font-style: italic; font-weight: 500; padding-left: 16px; }
.tableau tr.total td, .tableau tfoot td { font-weight: 700; border-top: 2px solid var(--bordure-forte); }
.nas, .code-long { font-family: ui-monospace, Consolas, monospace; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--marine); color: #fff; padding: 12px 16px; border-radius: 6px; z-index: 100; opacity: 0;
  transition: opacity .25s, transform .25s; max-width: calc(100vw - 32px); box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast-erreur { background: var(--danger); color: #fff; }
.toast-succes { background: var(--succes); color: #fff; }

/* ── Coffre ── */
fieldset.protege { border-style: dashed; border-color: var(--accent); }
.code-long { font-family: ui-monospace, Consolas, monospace; letter-spacing: .05em; text-transform: uppercase; }
.liste-simple { padding-left: 18px; }
.liste-simple li { margin: 6px 0; }
h4 { margin: 14px 0 6px; font-size: .95rem; }

/* Impression de la clé de récupération : seule la clé sort sur papier. */
@media print {
  body.impression > *:not(.fond) { display: none !important; }
  body.impression .fond { position: static; background: none; display: block; }
  body.impression .feuille-modale { max-height: none; box-shadow: none; }
  body.impression .feuille-modale > *:not(.a-imprimer) { display: none !important; }
  body.impression .secret.grand { font-size: 18pt; border: 1px solid #000; padding: 12pt; }
}

/* ── Mode développement (démonstration seulement) ── */
.barre-dev { background: #f0a020; color: #1c2430; padding: 4px 16px; font-size: .85rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.barre-dev select { width: auto; min-height: 30px; padding: 2px 6px; background: #fff; color: #1c2430; }
.carte.dev { border: 2px dashed #f0a020; }

/* ── Saisie multi-chantiers et métiers ── */
.etats-chantiers { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; align-items: center; }
.etat-chantier { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border: 1px solid var(--bordure); border-radius: 16px; background: var(--surface); color: var(--texte); text-decoration: none; font-size: .9rem; }
.chantier-metier { font-size: .9rem; font-weight: 600; color: var(--accent); }
.ligne.figee { opacity: .75; }
.rangee-competence { display: grid; grid-template-columns: 1fr 140px auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
@media (max-width: 520px) { .rangee-competence { grid-template-columns: 1fr 110px auto; } .rangee-competence > span { display: none; } }

/* L'attribut hidden l'emporte sur les display: flex des champs. */
[hidden] { display: none !important; }

/* Chantier de service : lieu de la job */
.lieu { font-size: .88rem; color: var(--discret); }

/* Mon équipe : menu et bouton d'ajout sur une ligne */
.rangee-ajout { display: flex; gap: .5rem; flex-wrap: wrap; }
.rangee-ajout select { flex: 1 1 14rem; }

/* Chantiers cochés pour un employé */
.cases-chantiers { display: grid; gap: .4rem; margin: .75rem 0; }
.alerte { color: var(--texte); }

/* ── Tableau à colonnes (façon Trello) ── */
.tete-plateau { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.tete-plateau h2 { margin: 0; }
.aide-plateau { margin: 0 0 14px; max-width: 70ch; }
.kanban {
  display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding: 2px 2px 16px;
  min-height: calc(100vh - 230px);
}
.colonne {
  flex: 0 0 272px; background: var(--colonne); border: 1px solid var(--bordure); border-radius: 12px; padding: 8px;
  display: flex; flex-direction: column; max-height: calc(100vh - 230px);
}
.colonne-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; padding: 4px 4px 8px 8px; }
.colonne-tete strong { display: block; font-size: .95rem; }
.colonne-tete .discret { font-size: .8rem; }
.colonne-tete button { min-height: 32px; min-width: 32px; padding: 0 8px; box-shadow: none; background: transparent; color: var(--discret); border: 0; }
.colonne-tete button:hover:not(:disabled) { background: color-mix(in srgb, var(--texte) 10%, transparent); box-shadow: none; }
.cartes { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 48px; padding: 2px 4px 4px; border-radius: 8px; }
.colonne.cible .cartes { background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: inset 0 0 0 2px var(--accent); }
.vide-colonne { color: var(--discret); font-size: .85rem; text-align: center; padding: 14px 8px; border: 2px dashed var(--bordure); border-radius: 8px; }
.carte-k {
  background: var(--surface); border: 1px solid var(--bordure); border-radius: 8px; padding: 8px 10px; box-shadow: var(--ombre-carte);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 6px;
  cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; font-size: .92rem;
}
.carte-k:hover { box-shadow: 0 0 0 2px var(--accent), var(--ombre-carte); }
.carte-k .titre-k { font-weight: 500; }
.carte-k .discret { display: block; font-size: .78rem; }
.carte-k .etiquette { display: block; height: 8px; width: 40px; border-radius: 4px; margin-bottom: 4px; background: #4bce97; }
.carte-k .etiquette.service { background: #f5cd47; }
.carte-k .retirer {
  min-height: 26px; min-width: 26px; padding: 0; box-shadow: none; background: transparent; color: var(--discret);
  font-size: 1.1rem; line-height: 1; opacity: 0;
}
.carte-k:hover .retirer, .carte-k:focus-within .retirer { opacity: 1; }
@media (hover: none) { .carte-k .retirer { opacity: 1; } }
.carte-k.origine { opacity: .35; }
.carte-k.fantome {
  position: fixed; z-index: 200; pointer-events: none; transform: rotate(4deg);
  box-shadow: var(--ombre-levee); cursor: grabbing; margin: 0;
}
.kanban.glisse, .kanban.glisse * { cursor: grabbing; }
.colonne.ajout { background: transparent; border-style: dashed; }
.colonne.ajout > button { justify-content: flex-start; background: transparent; border: 0; box-shadow: none; color: var(--accent); width: 100%; }
.colonne.ajout > button:hover { background: var(--encart); }
.colonne.ajout form { display: flex; flex-direction: column; gap: 8px; }
.autres-equipes { max-width: 560px; }
@media (max-width: 600px) {
  .colonne { flex-basis: 84vw; }
  .kanban { scroll-snap-type: x mandatory; }
  .kanban.glisse { scroll-snap-type: none; }
  .colonne { scroll-snap-align: start; }
}

/* Boutons d'icône dans les en-têtes de colonne : sans bordure. */
.colonne-tete button, .carte-k .retirer { border: 0; }
.colonne-tete button { background: transparent !important; }

/* Annexes offertes sur un chantier : une pastille par annexe, touchée pour la retirer ou la remettre. */
.pastilles { display: flex; flex-wrap: wrap; gap: 6px; }
.pastille {
  border-radius: 999px; padding: 5px 12px; font-size: .86rem; text-align: left; min-height: 34px; font-weight: 500;
  border: 1px solid var(--bordure); background: var(--colonne); color: var(--texte);
}
.pastille.offerte { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.pastille.retiree { color: var(--discret); text-decoration: line-through; }
.pastille:disabled { opacity: 1; cursor: default; font-weight: 600; }
.pastille.offerte:hover:not(:disabled) { background: var(--accent-fonce); box-shadow: none; }
.avis { background: var(--alerte-fond); border-left: 4px solid var(--alerte-bord); border-radius: 6px; padding: 8px 10px; font-size: .88rem; margin: 0 0 12px; }
.avis[hidden] { display: none; }

/* Paie */
.b-calculee { background: #fff1c2; color: #6b4e00; }
.b-fermee { background: #dcf1e2; color: #1e6a36; }
.totaux-paie { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.totaux-paie > div { display: flex; flex-direction: column; gap: 2px; background: var(--encart); border-radius: 8px; padding: 10px 12px; font-size: .85rem; color: var(--discret); }
.totaux-paie strong { font-size: 1.15rem; color: var(--texte); font-variant-numeric: tabular-nums; }
.net-a-payer { display: flex; justify-content: space-between; align-items: baseline; background: var(--encart); border-radius: 10px; padding: 12px 14px; margin-top: 8px; }
.net-a-payer strong { font-size: 1.5rem; }
.tableau .nombre, .montants td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.montants tr.total td { font-weight: 700; border-top: 2px solid var(--bordure-forte); border-bottom: 0; }
.retenue { display: grid; grid-template-columns: minmax(0, 2fr) 90px 130px auto auto auto; gap: 6px; align-items: center; margin-bottom: 8px; }
.retenue .case { margin: 0; white-space: nowrap; }
@media (max-width: 640px) { .retenue { grid-template-columns: 1fr 1fr; } }
.sur-plateau { color: var(--sur-plateau); }

.unite-cnesst { display: grid; grid-template-columns: 90px minmax(0, 1fr) 90px auto auto; gap: 6px; align-items: center; margin-bottom: 8px; }
.unite-cnesst .case { margin: 0; white-space: nowrap; }
@media (max-width: 640px) { .unite-cnesst { grid-template-columns: 90px 1fr; } }

.retenue input.large { grid-column: span 3; }
.boutons.gauche { justify-content: flex-start; flex-wrap: wrap; align-items: center; }

/* Deux tableaux côte à côte (Revenu Québec | ARC), l'un sous l'autre sur un téléphone. */
.cote-a-cote { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px 28px; align-items: start; }
.cote-a-cote h3 { font-size: 1.25rem; margin: 4px 0 14px; }
.heure { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
input.heure:user-invalid { border-color: var(--danger); outline-color: var(--danger); }
