/* Tableau de Service — styles (charte commune au site : marine / vert / sable, Arial) */
:root {
  --navy: #1F3864; --band: #2F5496; --vert: #1F5C3A; --sable: #B49B6C; --focus: #9C7E45;
  --font: Arial, Helvetica, sans-serif;
  --liste-w: 272px;
  --retard: #C8102E; --proche: #B07A00; --fait: #3E7D22;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: #f5f6f8; color: #111; font: 14px/1.4 var(--font); }
/* contour de focus commun au site : 3,83:1 sur blanc */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
body.login > :focus-visible, body.login footer.foot a:focus-visible, .board-bar :focus-visible { outline-color: #fff; }
svg.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.15em; flex: none; }

/* ===== BANDEAU COMMUN (début) =====
   Bloc identique au caractère près dans planning/assets/app.css, service/assets/app.css et
   bible/bible.css : toute retouche se reporte dans les trois (contrôle : deploy/verif-bandeau.ps1).
   Modèle : l'entête de la Bible du Soldat. Balisage : header.bandeau > a.bandeau-marque
   (img.bandeau-insigne, span.bandeau-txt > span.bandeau-unite + span.bandeau-titre), puis
   nav.bandeau-menu > .bandeau-btn (liens ou boutons) et span.bandeau-qui (personne connectée).
   Couleurs écrites en dur : le jeton --focus n'a pas la même valeur d'une feuille à l'autre.
   Titre dans la police des boutons (Arial, héritée du bandeau) : demande de David, lot 1.0927.02 ;
   Georgia reste réservée aux pages du livre.
   Contrastes sur le dégradé #24427a → #1F3864 : blanc 9,8 à 11,6:1 ; sable clair #E3D6BC 6,8 à 8,1:1 ;
   contour de focus #F2D69B 7,0 à 8,2:1 ; libellé d'un bouton sur son fond 7,9:1.
   position + z-index : l'ombre passe au-dessus du contenu qui suit, même s'il a un fond (tableau). */
.bandeau { flex: none; position: relative; z-index: 2; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
  min-height: 54px; padding: 8px 14px; color: #fff; font: 15px/1.2 Arial, Helvetica, sans-serif;
  background: #1F3864 linear-gradient(180deg, #24427a, #1F3864); border-bottom: 2px solid #1F5C3A; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.bandeau-marque { display: flex; align-items: center; gap: 10px; min-width: 0; color: #fff; text-decoration: none; border-radius: 4px; }
.bandeau-insigne { width: 38px; height: 38px; flex: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.bandeau-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.bandeau-unite { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #E3D6BC; }
.bandeau-unite sup { text-transform: none; font-size: .75em; line-height: 0; letter-spacing: 0; }
.bandeau-titre { font-size: 19px; white-space: nowrap; }
.bandeau-marque:hover .bandeau-titre, .bandeau-marque:focus-visible .bandeau-titre { text-decoration: underline; }
.bandeau-menu { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.bandeau-btn { font: inherit; color: #fff; text-decoration: none; cursor: pointer; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28); border-radius: 6px; padding: 6px 12px; }
.bandeau-btn:hover { background: rgba(255,255,255,.18); }
.bandeau-qui { font-size: 13px; color: #E3D6BC; padding: 0 4px; }
.bandeau :focus-visible { outline: 3px solid #F2D69B; outline-offset: 2px; }
@media (max-width: 700px) {
  .bandeau { min-height: 48px; padding: 6px 10px; }
  .bandeau-insigne { width: 32px; height: 32px; }
  .bandeau-unite, .bandeau-qui { display: none; }
  .bandeau-titre { font-size: 17px; }
  .bandeau-btn { padding: 6px 8px; font-size: 13px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .bandeau { min-height: 42px; padding: 4px 10px; }
  .bandeau-titre { font-size: 16px; }
}
@media print { .bandeau { display: none !important; } }
/* ===== BANDEAU COMMUN (fin) ===== */

.flash { margin: 10px 14px 0; padding: 8px 12px; border-radius: 4px; background: #e2efda; border: 1px solid #70ad47; color: #111; }
.flash.err { background: #fde2e2; border-color: #ff0000; }
footer.foot { text-align: center; color: #888; font-size: 11px; padding: 10px; }
footer.foot a { color: var(--band); text-decoration: underline; }
footer.foot a:hover, footer.foot a:focus { color: var(--navy); }
svg.coeur { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -.2em; fill: #C8102E; }

/* ---------- boutons, formulaires, cartes blanches (identiques au Planning) ---------- */
.btn { display: inline-block; background: var(--band); color: #fff; border: 1px solid rgba(0,0,0,.15); border-radius: 6px; padding: 9px 14px; font: bold 14px var(--font); cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.1); }
.btn.secondary { background: #666; }
.btn.danger { background: #c00; }
.btn.small { padding: 4px 9px; font-size: 12px; }
.btn.tiny { padding: 2px 6px; font-size: 11px; }
.btns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.err { color: #c00; font-weight: bold; }
.muted { color: #666; font-size: 12px; }
.card { background: #fff; color: #111; border: 1px solid #d0d4da; border-top: 5px solid var(--vert); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.10); padding: 18px 20px; }
.card h1 { margin: 0 0 12px; font-size: 20px; color: var(--navy); }
.card h2 { margin: 0 0 10px; font-size: 17px; color: var(--navy); }
.form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: bold; }
.form input, .form select, .form textarea { font: 14px var(--font); padding: 8px; border: 1px solid #aaa; border-radius: 4px; width: 100%; }
table.list { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
table.list th, table.list td { border: 1px solid #ccc; padding: 5px 7px; text-align: left; vertical-align: middle; }
table.list th { background: #e6e9f0; }
table.list td.acts { white-space: nowrap; }
table.list form { display: inline; }

/* ---------- page de connexion (carte sur fond marine, comme le Planning) ---------- */
main.card-wrap { max-width: 520px; margin: 24px auto; padding: 0 14px; display: flex; flex-direction: column; gap: 14px; }
body.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center;
  gap: 18px; padding: 32px 16px; color: #fff; text-align: center;
  background: var(--navy); background-image: radial-gradient(circle at 50% 30%, #2F5496 0%, #1F3864 55%, #16294a 100%); }
body.login main.card-wrap { width: 100%; max-width: 460px; margin: auto 0 0; padding: 0; }
body.login .flash { width: 100%; max-width: 460px; margin: 0; text-align: left; }
body.login footer.foot { margin: 0 0 auto; color: rgba(255,255,255,.85); }
body.login footer.foot a { color: #fff; }
body.login footer.foot svg.coeur { fill: #FF7A8A; }
body.login .card { text-align: center; padding: 26px 24px 24px; }
body.login .card h1 { margin: 0 0 4px; }
body.login .form { text-align: left; }
body.login .btn { width: 100%; padding: 13px 18px; font-size: 16px; }
body.login .btn:hover, body.login .btn:focus { background: var(--navy); filter: none; }
.muted-login { margin: 0 0 6px; font-size: 13px; color: #555; }
.liens-login { margin: 14px 0 0; font-size: 12px; }
.liens-login a { color: var(--band); }
.insigne { width: 150px; max-width: 55%; height: auto; display: block; margin: 0 auto 12px; }
.devise { margin: 0 0 16px; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--vert);
  display: flex; align-items: center; justify-content: center; gap: 10px; }
.devise::before, .devise::after { content: ""; height: 1px; flex: 0 1 28px; min-width: 0; background: var(--sable); }
.unite { margin: 0 0 20px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #6b6b6b; }
.unite sup { text-transform: none; }
@media (max-width: 360px) {
  .devise { font-size: 12px; letter-spacing: .08em; gap: 8px; }
  .devise::before, .devise::after { flex: 0 1 20px; }
}

/* ---------- page des tableaux ---------- */
main.tableaux { max-width: 1100px; margin: 0 auto; padding: 16px 14px 24px; }
main.tableaux h1 { font-size: 20px; color: var(--navy); margin: 6px 0 12px; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tuile { display: flex; flex-direction: column; justify-content: space-between; min-height: 104px; padding: 12px 14px; border-radius: 10px;
  color: #fff; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.15); border: 1px solid rgba(0,0,0,.2); font: inherit; text-align: left; cursor: pointer; }
.tuile:hover { filter: brightness(1.08); }
.tuile-titre { font-weight: bold; font-size: 16px; text-shadow: 0 1px 2px rgba(0,0,0,.35); display: flex; align-items: center; gap: 6px; }
.tuile-info { font-size: 12px; opacity: .9; }
.tuile-retard { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px; background: var(--retard); color: #fff; font-weight: bold; }
.tuile-new { background: #e6e9f0; color: var(--navy); border: 2px dashed var(--band); justify-content: center; align-items: center; }
.tuile-new .tuile-titre { text-shadow: none; }
.tuile-new:hover { background: #dde3ee; filter: none; }
.form-new { max-width: 560px; margin-bottom: 16px; }
.fonds { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fonds legend { font-size: 13px; font-weight: bold; margin-bottom: 6px; }
.fond-opt { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font-size: 11px; font-weight: normal; }
.fond-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fond-sw { width: 58px; height: 36px; border-radius: 6px; border: 2px solid transparent; }
.fond-opt input:checked + .fond-sw { border-color: #111; box-shadow: 0 0 0 2px #fff inset; }
.fond-opt input:focus-visible + .fond-sw { outline: 3px solid var(--focus); outline-offset: 2px; }
.vide { color: #555; }
.archives-tableaux { margin-top: 18px; }
.archives-tableaux summary { cursor: pointer; font-weight: bold; color: var(--navy); margin-bottom: 8px; }

/* ---------- page d'un tableau ---------- */
body.tableau { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
body.tableau footer.foot { flex: none; padding: 4px; background: #fff; }
main.board { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; color: #fff; }
.board-bar { flex: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; background: rgba(0,0,0,.28); backdrop-filter: blur(4px); }
.board-titre { margin: 0; font-size: 18px; }
.titre-btn { background: none; border: 0; color: #fff; font: bold 18px var(--font); padding: 4px 8px; border-radius: 6px; cursor: pointer; text-align: left; }
.titre-btn:hover { background: rgba(255,255,255,.2); }
.board-archive { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: rgba(255,255,255,.25); }
.board-outils { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.filtres { display: contents; }
.bbtn.seulement-mobile { display: none; }
.filtre-txt { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,.92); color: #333; border-radius: 6px; padding: 0 8px; }
.filtre-txt input { border: 0; background: none; font: 13px var(--font); padding: 6px 2px; width: 150px; color: #111; }
.filtre-txt input:focus-visible { outline: none; }
.filtre-txt:focus-within { box-shadow: 0 0 0 3px #fff; }
.board-outils select { font: 13px var(--font); padding: 6px 4px; border-radius: 6px; border: 0; background: rgba(255,255,255,.92); color: #111; max-width: 200px; }
.bbtn { display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,.2); color: #fff; border: 0; border-radius: 6px; padding: 6px 10px; font: bold 13px var(--font); cursor: pointer; text-decoration: none; }
.bbtn:hover { background: rgba(255,255,255,.35); }
.bbtn.on { background: #fff; color: var(--navy); }

.board-corps { flex: 1 1 auto; min-height: 0; display: flex; align-items: stretch; }
.listes { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px 14px; overflow-x: auto; overflow-y: hidden; scroll-padding: 14px; }
.liste { flex: none; width: var(--liste-w); max-height: 100%; display: flex; flex-direction: column; background: #f1f2f4; color: #172b4d; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.liste-head { display: flex; align-items: center; gap: 6px; padding: 8px 8px 4px 12px; cursor: grab; }
.liste-titre { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 14px; }
.liste-titre-btn { width: 100%; background: none; border: 0; font: bold 14px var(--font); color: #172b4d; text-align: left; padding: 4px 6px; border-radius: 4px; cursor: text; overflow-wrap: anywhere; }
.liste-titre-btn:hover { background: #e2e4e9; }
.liste-titre input { width: 100%; font: bold 14px var(--font); padding: 4px 6px; border: 2px solid var(--band); border-radius: 4px; }
.liste-nb { font-size: 12px; color: #626f86; min-width: 18px; text-align: center; }
.liste-menu { background: none; border: 0; border-radius: 4px; padding: 4px; cursor: pointer; color: #44546f; display: inline-flex; }
.liste-menu:hover { background: #dcdfe4; }
.cartes { flex: 1 1 auto; min-height: 8px; overflow-y: auto; padding: 2px 8px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.liste-foot { padding: 6px 8px 8px; }
.ajout-carte, .ajout-liste { display: flex; align-items: center; gap: 6px; width: 100%; background: none; border: 0; border-radius: 8px; padding: 7px 10px;
  font: 14px var(--font); color: #44546f; cursor: pointer; text-align: left; }
.ajout-carte:hover { background: #dcdfe4; color: #172b4d; }
.liste-new { background: rgba(255,255,255,.28); color: #fff; }
.ajout-liste { color: #fff; font-weight: bold; padding: 11px 12px; }
.ajout-liste:hover { background: rgba(255,255,255,.2); }
.composer { padding: 0 8px 8px; }
.composer textarea, .liste-new .composer input { width: 100%; font: 14px var(--font); padding: 8px; border: 2px solid var(--band); border-radius: 8px; resize: none; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.composer .btns { margin-top: 6px; }
.liste-new .composer { padding: 8px; }
.liste-new .composer .btn.secondary { background: rgba(255,255,255,.25); }

/* vignette de carte */
.carte { background: #fff; border-radius: 8px; padding: 8px 10px; box-shadow: 0 1px 1px rgba(9,30,66,.25); cursor: pointer; color: #172b4d; position: relative; }
.carte:hover { outline: 2px solid var(--band); outline-offset: -1px; }
.carte.filtre-out { display: none; }
.carte-titre { font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.etq { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.etq-chip { display: inline-flex; align-items: center; min-width: 40px; height: 16px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: bold; line-height: 16px; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; font-size: 12px; color: #44546f; }
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 4px; border-radius: 4px; }
.badge.ech.normal { background: #e9edf3; }
.badge.ech.retard { background: var(--retard); color: #fff; }
.badge.ech.proche { background: #FFC000; color: #111; }
.badge.ech.fait { background: #d9efd0; color: var(--fait); }
.badge.chk.done { background: #d9efd0; color: var(--fait); }
.avatars { display: inline-flex; margin-left: auto; gap: 2px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; font-size: 10px; font-weight: bold; color: #fff; background: var(--band); border: 1px solid rgba(0,0,0,.15); cursor: default; }
.avatar.p1 { background: var(--navy); } .avatar.p2 { background: var(--vert); } .avatar.p3 { background: var(--sable); color: #111; } .avatar.p4 { background: #3E4753; }
.avatars.big .avatar { width: 32px; height: 32px; font-size: 12px; }

/* glisser-déposer */
.carte.drag-src, .liste.drag-src { opacity: .4; }
.placeholder { border-radius: 8px; background: rgba(9,30,66,.12); border: 2px dashed rgba(9,30,66,.3); min-height: 40px; }
.liste-placeholder { flex: none; width: var(--liste-w); border-radius: 12px; background: rgba(255,255,255,.25); border: 2px dashed rgba(255,255,255,.7); align-self: stretch; min-height: 80px; }
.ghost { position: fixed; z-index: 100; pointer-events: none; transform: rotate(3deg); box-shadow: 0 8px 24px rgba(0,0,0,.35); opacity: .95; }
.ghost.liste { max-height: 70vh; overflow: hidden; }
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none; }

/* ---------- fenêtre d'une carte ---------- */
.voile { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 60; }
.modal { position: fixed; z-index: 70; top: 4vh; left: 50%; transform: translateX(-50%); width: min(920px, calc(100vw - 20px)); max-height: 92vh;
  display: flex; flex-direction: column; background: #f4f5f7; color: #172b4d; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.m-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #dfe1e6; }
.m-liste { font-size: 13px; color: #44546f; display: inline-flex; align-items: center; gap: 6px; }
.m-liste select { font: bold 13px var(--font); padding: 4px 6px; border-radius: 4px; border: 1px solid #c1c7d0; background: #fff; max-width: 220px; }
.m-close { background: none; border: 0; border-radius: 6px; padding: 6px; cursor: pointer; color: #44546f; display: inline-flex; font-size: 18px; }
.m-close:hover { background: #dfe1e6; }
.m-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0 20px; padding: 12px 18px 18px; }
.m-main { min-width: 0; }
.m-side { min-width: 0; }
.m-titre-wrap { margin: 0 0 8px; }
#m-titre { width: 100%; font: bold 20px/1.25 var(--font); color: #172b4d; border: 2px solid transparent; border-radius: 6px; padding: 4px 6px; background: none; resize: none; overflow: hidden; }
#m-titre:hover { background: #e9ebef; }
#m-titre:focus { background: #fff; border-color: var(--band); outline: none; }
.m-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.mbtn { display: inline-flex; align-items: center; gap: 5px; background: #e2e4e9; color: #172b4d; border: 0; border-radius: 6px; padding: 6px 10px; font: bold 13px var(--font); cursor: pointer; }
.mbtn:hover { background: #d0d4dc; }
.mbtn.danger { background: #fde2e2; color: #b00020; }
.m-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 8px; }
.m-bloc h3 { margin: 0 0 4px; font-size: 12px; color: #626f86; text-transform: uppercase; letter-spacing: .04em; }
.m-ech { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.m-ech input { width: 16px; height: 16px; }
.m-ech .badge { font-size: 13px; padding: 4px 8px; }
.m-sec { margin: 12px 0; }
.m-sec h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 15px; color: #172b4d; }
.m-sec h3 .btn { margin-left: auto; }
.m-desc { white-space: pre-wrap; overflow-wrap: anywhere; background: #fff; border-radius: 6px; padding: 8px 10px; min-height: 36px; font-size: 14px; border: 1px solid #e3e5e9; }
.m-desc.vide { color: #626f86; font-style: italic; cursor: pointer; }
.m-desc-form textarea, .m-com-form textarea, .cmt-edit textarea { width: 100%; font: 14px var(--font); padding: 8px; border: 2px solid var(--band); border-radius: 6px; resize: vertical; }
.m-desc-form .btns, .cmt-edit .btns { margin-top: 6px; }
.m-com-form { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; margin-bottom: 10px; }
.m-com-form textarea { border-color: #c1c7d0; }
.m-com-form textarea:focus { border-color: var(--band); outline: none; }
.cmt { background: #fff; border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; border: 1px solid #e3e5e9; font-size: 13px; }
.cmt-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #626f86; margin-bottom: 4px; }
.cmt-meta .acts { margin-left: auto; display: inline-flex; gap: 4px; }
.cmt-meta button { background: none; border: 0; color: var(--band); font: 11px var(--font); cursor: pointer; text-decoration: underline; padding: 0; }
.cmt-txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.journal { list-style: none; margin: 0; padding: 0; font-size: 12px; color: #44546f; }
.journal li { padding: 4px 0; border-bottom: 1px solid #e3e5e9; }
.journal li b { color: #172b4d; }
.journal time { display: block; font-size: 11px; color: #8590a2; }

/* checklists */
.chk { margin: 14px 0; }
.chk-head { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 15px; }
.chk-titre { background: none; border: 0; font: bold 15px var(--font); color: #172b4d; padding: 2px 4px; border-radius: 4px; cursor: text; text-align: left; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.chk-titre:hover { background: #e9ebef; }
.chk-head input { flex: 1 1 auto; font: bold 15px var(--font); padding: 2px 4px; border: 2px solid var(--band); border-radius: 4px; min-width: 0; }
.progress { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; }
.progress .pct { font-size: 11px; color: #626f86; width: 34px; text-align: right; }
.progress .bar { flex: 1 1 auto; height: 8px; border-radius: 4px; background: #dfe1e6; overflow: hidden; }
.progress .fill { height: 100%; background: var(--band); width: 0; transition: width .2s; }
.progress.done .fill { background: #3E7D22; }
.items { list-style: none; margin: 0; padding: 0; }
.items li { display: flex; align-items: flex-start; gap: 8px; padding: 4px 6px; border-radius: 6px; }
.items li:hover { background: #e9ebef; }
.items li input[type=checkbox] { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.items li .txt { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; cursor: text; }
.items li.fait .txt { text-decoration: line-through; color: #626f86; }
.items li .del { background: none; border: 0; color: #626f86; cursor: pointer; padding: 0 2px; display: inline-flex; opacity: 0; }
.items li:hover .del, .items li .del:focus-visible { opacity: 1; }
.items li input[type=text] { flex: 1 1 auto; font: 14px var(--font); padding: 4px 6px; border: 2px solid var(--band); border-radius: 4px; min-width: 0; }
.item-add { display: flex; gap: 6px; margin: 6px 0 0 30px; }
.item-add input { flex: 1 1 auto; font: 13px var(--font); padding: 5px 8px; border: 1px solid #c1c7d0; border-radius: 4px; min-width: 0; }

/* ---------- popover générique ---------- */
.pop { position: fixed; z-index: 80; width: 304px; max-width: calc(100vw - 16px); max-height: 80vh; overflow-y: auto; background: #fff; color: #172b4d; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.3); border: 1px solid #dfe1e6; padding: 8px 12px 12px; font-size: 13px; }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid #dfe1e6; font-weight: bold; text-align: center; }
.pop-head .m-close { padding: 2px; }
.pop-head .back { background: none; border: 0; cursor: pointer; color: #44546f; display: inline-flex; padding: 2px; }
.pop-head span { flex: 1 1 auto; }
.pop label.ligne { display: flex; align-items: center; gap: 8px; padding: 4px 2px; cursor: pointer; border-radius: 4px; }
.pop label.ligne:hover { background: #f4f5f7; }
.pop label.ligne input { width: 16px; height: 16px; flex: none; }
.pop .etq-sw { flex: 1 1 auto; height: 30px; border-radius: 4px; display: flex; align-items: center; padding: 0 10px; font-weight: bold; }
.pop .edit { background: none; border: 0; cursor: pointer; color: #44546f; display: inline-flex; padding: 4px; border-radius: 4px; }
.pop .edit:hover { background: #e9ebef; }
.pop .btn { margin-top: 8px; }
.pop .btn.full { display: block; width: 100%; text-align: center; }
.pop input[type=text], .pop input[type=date], .pop input[type=search] { width: 100%; font: 14px var(--font); padding: 7px 8px; border: 1px solid #c1c7d0; border-radius: 4px; margin: 4px 0 8px; }
.pop .palette { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 4px 0 8px; }
.pop .palette label { position: relative; display: block; height: 32px; border-radius: 4px; cursor: pointer; }
.pop .palette input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pop .palette input:checked + span { outline: 2px solid #172b4d; outline-offset: 2px; }
.pop .palette input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.pop .palette span { display: block; height: 100%; border-radius: 4px; }
.pop .menu-item { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; padding: 7px 6px; border-radius: 4px; font: 14px var(--font); color: #172b4d; cursor: pointer; text-align: left; }
.pop .menu-item:hover { background: #f4f5f7; }
.pop .menu-item.danger { color: #b00020; }
.pop .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #626f86; margin: 8px 0 2px; font-weight: bold; }
.pop .fonds { gap: 8px; justify-content: center; }
.pop-ech .ech-vite { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.pop-ech .ech-vite button { background: #e9ebef; border: 0; border-radius: 12px; padding: 3px 9px; font: 12px var(--font); cursor: pointer; }
.pop-ech .ech-vite button:hover { background: #d0d4dc; }
.pop .note { font-size: 12px; color: #626f86; margin: 0 0 6px; }

/* ---------- panneau latéral (archives, journal) ---------- */
.panneau { flex: none; width: 360px; max-width: 100%; background: #f4f5f7; color: #172b4d; box-shadow: -6px 0 24px rgba(0,0,0,.3); display: flex; flex-direction: column; }
.p-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid #dfe1e6; }
.p-head h2 { margin: 0; font-size: 16px; }
.p-body { flex: 1 1 auto; overflow-y: auto; padding: 10px 14px 20px; font-size: 13px; }
.p-body .arch { background: #fff; border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; border: 1px solid #e3e5e9; }
.p-body .arch .t { font-weight: bold; overflow-wrap: anywhere; }
.p-body .arch .s { font-size: 11px; color: #626f86; margin: 2px 0 6px; }
.p-body .vide { color: #626f86; font-style: italic; }
.p-body .journal li { padding: 6px 0; }

/* toast */
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: #222; color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 90; font-size: 13px; max-width: calc(100vw - 32px); }
.toast.err { background: #b00020; }

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  .m-body { grid-template-columns: 1fr; }
  .modal { top: 0; width: 100vw; max-height: 100vh; max-height: 100dvh; border-radius: 0; }
}
@media (max-width: 700px) {
  :root { --liste-w: 84vw; }
  .board-bar { padding: 6px 10px; gap: 6px; }
  .board-titre { font-size: 16px; }
  .titre-btn { font-size: 16px; }
  .board-outils { margin-left: 0; width: 100%; }
  /* les trois filtres se replient derrière un bouton « Filtres » */
  .bbtn.seulement-mobile { display: inline-flex; }
  .filtres { display: none; width: 100%; gap: 6px; flex-wrap: wrap; }
  .board-bar.filtres-ouverts .filtres { display: flex; }
  .filtre-txt { flex: 1 1 100%; }
  .filtre-txt input { width: 100%; }
  .board-outils select { flex: 1 1 40%; max-width: none; font-size: 12px; }
  .bbtn { padding: 5px 8px; font-size: 12px; }
  .listes { padding: 8px 10px 10px; gap: 10px; scroll-snap-type: x proximity; }
  .liste { scroll-snap-align: start; }
  .panneau { width: 100%; }
  .m-body { padding: 10px 12px 16px; }
}

/* ---------- impression : les listes se suivent en colonnes, sans défilement ---------- */
@media print {
  footer.foot, .board-outils, .voile, .modal, .panneau, .pop, .toast, .ajout-carte, .liste-menu, .liste-new, .liste-foot { display: none !important; }
  body, body.tableau { display: block; height: auto; overflow: visible; background: #fff; }
  main.board { background: #fff !important; color: #000; display: block; }
  .board-bar { background: none; color: #000; padding: 0 0 8px; }
  .titre-btn { color: #000; }
  .listes { display: flex; flex-wrap: wrap; align-items: flex-start; overflow: visible; padding: 0; }
  .liste { max-height: none; break-inside: avoid; border: 1px solid #999; box-shadow: none; }
  .cartes { overflow: visible; }
  .carte { border: 1px solid #ccc; box-shadow: none; }
  .etq-chip, .badge, .avatar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4 landscape; margin: 10mm; }
}
