:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #1e2320;
  --muted: #676d67;
  --line: #e3e0d7;
  --brand: #26332b;
  --brand-ink: #f3f1ea;

  --orange: #e2801a;
  --orange-fill: #f5ad5b;
  --orange-tint: #fdebd5;
  --orange-ink: #6e3a00;
  --green: #2c9a58;
  --green-fill: #70c690;
  --green-tint: #dcf2e4;
  --green-ink: #10522c;
  --red: #cf3f3f;
  --red-tint: #fbe4e4;
  --red-ink: #8a1f1f;
  --blue: #3a6db3;
  --blue-tint: #e3ebf7;
  --off: #a9a59b;
  --teal: #2b7d7a;
  --teal-tint: #dff0ef;
  --weekend: #f0ede6;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(30, 35, 32, .06), 0 4px 16px rgba(30, 35, 32, .05);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- barre du haut */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px; background: var(--brand); color: var(--brand-ink);
}
.topbar { flex-wrap: wrap; row-gap: 10px; }
.jump { flex: 1 0 100%; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px -2px; padding: 0 4px 2px; }
.jump::-webkit-scrollbar { display: none; }
.jump a { flex: none; color: var(--brand-ink); text-decoration: none; font-size: 13.5px; font-weight: 550; padding: 5px 12px;
  border-radius: 99px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); white-space: nowrap; }
.jump a:hover { background: rgba(255, 255, 255, .18); }
.jump-n { font-size: 11px; font-weight: 700; background: #eb6834; color: #fff; border-radius: 99px; padding: 1px 7px; margin-left: 3px; }
.jump-n:empty { display: none; }
.panel { scroll-margin-top: 130px; }
.panel:target, #a-valider:target { animation: jump-flash 2.2s ease-out; }
@keyframes jump-flash { 0%, 35% { box-shadow: 0 0 0 3px #eb6834; } 100% { box-shadow: var(--shadow); } }
#a-valider { scroll-margin-top: 130px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand h1 { font-size: 18px; font-weight: 650; letter-spacing: .2px; }
.brand p { margin: 0; font-size: 12.5px; opacity: .7; }
.sync { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.sync .muted { opacity: .75; }
.btn {
  border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: inherit;
  padding: 7px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 550;
}
.btn:hover { background: rgba(255, 255, 255, .16); }
.btn-accent { background: #f3f1ea; color: var(--brand); border-color: #f3f1ea; text-decoration: none; }
.btn-accent:hover { background: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }

main { max-width: 1440px; margin: 0 auto; padding: 20px 24px 60px; }
.banner { margin-bottom: 16px; padding: 12px 16px; border-radius: 10px; background: var(--red-tint); color: var(--red-ink); border: 1px solid #f1c4c4; }

/* ---------------------------------------------------------------- récap par étape */
.stages { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.stage-group { display: flex; flex-direction: column; gap: 6px; }
.stage-group > .cap { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding-left: 2px; }
.stage-group > .row { display: flex; gap: 8px; flex-wrap: wrap; }
.stage {
  min-width: 104px; padding: 10px 12px 9px; border-radius: 10px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--orange);
  box-shadow: var(--shadow); color: var(--ink); transition: transform .08s ease;
}
.stage:hover { transform: translateY(-1px); }
.stage .n { display: block; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.05; }
.stage .name { display: block; font-size: 12.5px; color: var(--muted); max-width: 150px; margin-top: 2px; }
.stage.c-option { border-top-color: var(--orange); background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(226, 128, 26, .07) 6px 12px); }
.stage.c-valide { border-top-color: var(--green); }
.stage.c-off { border-top-color: var(--off); }
.stage.c-off .n { color: var(--muted); }
.stage.open { outline: 2px solid var(--ink); outline-offset: 1px; }

.stage-detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.stage-detail header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); gap: 12px; }
.stage-detail header h2 { font-size: 16px; }
.stage-detail .close { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table.leads { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.leads th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.leads td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.leads tr:last-child td { border-bottom: 0; }
table.leads .title a { font-weight: 600; text-decoration: none; }
table.leads .title a:hover { text-decoration: underline; }
table.leads .sub { color: var(--muted); font-size: 12.5px; }
table.leads .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dir { display: inline-block; font-size: 11px; font-weight: 650; padding: 1px 6px; border-radius: 4px; margin-right: 4px; }
.dir.in { background: var(--orange-tint); color: var(--orange-ink); }
.dir.out { background: var(--green-tint); color: var(--green-ink); }

/* ---------------------------------------------------------------- panneaux */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 22px; }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { font-size: 19px; font-weight: 700; }
.count { font-size: 12.5px; font-weight: 650; background: var(--ink); color: #fff; border-radius: 99px; padding: 2px 9px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ---------------------------------------------------------------- à faire */
.todo-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px 22px; }
.tgroup h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.tgroup h3 .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.tgroup.g-mail h3 .dot { background: var(--red); }
.tgroup.g-new h3 .dot, .tgroup.g-wait h3 .dot { background: var(--orange); }
.tgroup.g-act h3 .dot { background: var(--blue); }
.tgroup.g-resto h3 .dot { background: var(--teal); }
.tgroup.g-check h3 .dot { background: #8a6bbf; }
.todo {
  position: relative; border: 1px solid var(--line); border-left: 4px solid var(--orange);
  border-radius: 10px; padding: 11px 13px; margin-bottom: 9px; background: var(--surface);
}
.todo.k-mail_failed, .todo.k-mail_stuck { border-left-color: var(--red); background: linear-gradient(90deg, var(--red-tint), var(--surface) 55%); }
.todo.k-activity { border-left-color: var(--blue); }
.todo.k-resto { border-left-color: var(--teal); }
.todo.k-check { border-left-color: #8a6bbf; }
.todo.low { opacity: .8; }
.todo-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.todo h4 { margin: 0; font-size: 14.5px; font-weight: 650; }
.since { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.since.late { color: var(--red-ink); background: var(--red-tint); padding: 1px 7px; border-radius: 99px; font-weight: 600; }
.who { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.todo blockquote { margin: 7px 0 0; padding: 6px 10px; background: var(--surface-2); border-radius: 6px; font-size: 13px; color: #3a403b; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.todo blockquote.open { -webkit-line-clamp: unset; }
.actions { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.act { border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 4px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 550; text-decoration: none; }
.act:hover { background: var(--surface-2); border-color: #cfcabe; }
.act.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.act.primary:hover { background: #34463b; }
.empty { padding: 18px; text-align: center; color: var(--muted); background: var(--surface-2); border-radius: 10px; }
.foot { margin-top: 12px; font-size: 12.5px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.linkish { border: 0; background: none; padding: 0; color: var(--blue); text-decoration: underline; font-size: inherit; }
details.lowgroup > summary { cursor: pointer; font-size: 13px; color: var(--muted); margin: 4px 0 8px; }

/* ---------------------------------------------------------------- calendrier */
.cal-head { justify-content: space-between; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; min-width: 34px; height: 32px; font-size: 16px; }
.cal-nav button.today { font-size: 13px; padding: 0 12px; }
.cal-nav .title { font-size: 16px; font-weight: 650; min-width: 190px; text-align: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 6px 13px; font-size: 13px; font-weight: 550; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--ink); color: #fff; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 18px; height: 12px; border-radius: 3px; display: inline-block; }
.sw.req { background: var(--orange-fill); }
.sw.opt { background: repeating-linear-gradient(135deg, var(--orange-fill) 0 4px, #f9cf9e 4px 8px); }
.sw.ok { background: var(--green-fill); }
.sw.conf { background: var(--surface); outline: 2px solid var(--red); outline-offset: -2px; }
.sw.closed { background: repeating-linear-gradient(135deg, #e6e2d8 0 3px, #f3f0e9 3px 6px); }
.sw.tbd { background: var(--surface); border: 1.5px dashed var(--muted); }

.tl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.tl { display: grid; min-width: 1080px; }
.tl .hd { position: sticky; top: 0; background: var(--surface-2); border-bottom: 1px solid var(--line); text-align: center; padding: 5px 0 4px; font-size: 11px; color: var(--muted); }
.tl .hd b { display: block; font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.tl .hd.we { background: var(--weekend); }
.tl .hd.today b { background: var(--ink); color: #fff; border-radius: 99px; width: 24px; height: 24px; line-height: 24px; margin: 0 auto; }
.tl .room { display: flex; align-items: center; gap: 7px; padding: 0 10px; font-size: 13px; font-weight: 650; background: var(--surface-2); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); position: sticky; left: 0; z-index: 1; }
.tl .room .ic { font-size: 15px; }
.tl .room small { display: block; font-weight: 450; color: var(--muted); font-size: 10.5px; }
.tl .cell { min-height: 58px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 3px 2px; display: flex; flex-direction: column; gap: 2px; }
.tl .cell.we { background: var(--weekend); }
.tl .cell.today { background: #fff6d8; }
.tl .cell.closed { background: repeating-linear-gradient(135deg, #ebe7de 0 4px, #f5f2eb 4px 8px); }
.tl .corner { background: var(--surface-2); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); position: sticky; left: 0; z-index: 2; }

.ev {
  display: block; width: 100%; border: 0; border-radius: 5px; padding: 2px 2px; text-align: center;
  font-size: 10.5px; font-weight: 700; line-height: 1.2; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  background: var(--orange-fill); color: var(--orange-ink); flex: 1; min-height: 20px;
}
.ev.green { background: var(--green-fill); color: var(--green-ink); }
.ev.option { background: repeating-linear-gradient(135deg, var(--orange-fill) 0 5px, #f9cf9e 5px 10px); }
.ev.tbd { outline: 1.5px dashed rgba(0, 0, 0, .45); outline-offset: -2px; }
.ev.conflict, .ev.season { box-shadow: 0 0 0 2px var(--red); }
.ev:hover { filter: brightness(.95); }

/* resto éphémère (dans la ligne Winter) */
.ico { width: 10px; height: 10px; vertical-align: -1px; margin-right: 1px; }
.resto { display: block; margin-top: auto; font-size: 10px; line-height: 1.5; text-align: center; border-radius: 4px; white-space: nowrap; overflow: hidden; }
.resto.open { background: var(--teal-tint); color: #1f5c5a; }
.resto.full { background: #ebe8e0; color: #77736a; }
.resto.alert { background: var(--red); color: #fff; font-weight: 700; }
.wk .resto, .agenda .resto, .kv .resto { font-size: 11.5px; padding: 1px 7px; text-align: left; display: inline-block; margin-top: 4px; }
.agenda .date .resto { display: block; width: fit-content; max-width: 100%; white-space: normal; font-weight: 500; }

/* vue semaine */
.wk { display: grid; grid-template-columns: 120px repeat(7, minmax(130px, 1fr)); min-width: 1040px; }
.wk .cell { min-height: 84px; padding: 5px; }
.wk .ev { white-space: normal; text-align: left; font-size: 12px; font-weight: 500; padding: 5px 7px 6px; border-radius: 7px; flex: none; }
.wk .ev .t { font-weight: 700; display: block; }
.wk .ev .c { opacity: .85; font-size: 11.5px; }

/* vue liste */
.agenda .day { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.agenda .day:last-child { border-bottom: 0; }
.agenda .date { font-weight: 650; }
.agenda .date small { display: block; font-weight: 450; color: var(--muted); }
.agenda .date.today { color: var(--green-ink); }
.aev { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-left: 5px solid var(--orange); border-radius: 8px; background: var(--surface); margin-bottom: 6px; text-align: left; color: var(--ink); }
.aev.green { border-left-color: var(--green); }
.aev.conflict, .aev.season { box-shadow: 0 0 0 2px var(--red); }
.aev .time { flex: none; width: 92px; font-weight: 650; font-variant-numeric: tabular-nums; }
.aev .what b { display: block; }
.rb { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); margin: 3px 4px 0 0; }

details.unplanned { margin-top: 16px; }
details.unplanned summary { cursor: pointer; font-size: 13.5px; color: var(--muted); }
details.unplanned ul { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; }
details.unplanned li { margin-bottom: 4px; }

/* ---------------------------------------------------------------- fiche (panneau latéral) */
.scrim { position: fixed; inset: 0; background: rgba(20, 24, 21, .35); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--surface); z-index: 41; box-shadow: -8px 0 30px rgba(0, 0, 0, .15); padding: 22px; overflow-y: auto; }
.drawer .close { position: absolute; top: 14px; right: 14px; border: 0; background: none; font-size: 26px; color: var(--muted); }
.drawer h2 { font-size: 19px; margin: 6px 30px 4px 0; }
.badge { display: inline-block; font-size: 12px; font-weight: 650; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.badge.orange { background: var(--orange-tint); color: var(--orange-ink); }
.badge.green { background: var(--green-tint); color: var(--green-ink); }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 16px 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.warn { background: var(--red-tint); color: var(--red-ink); border-radius: 8px; padding: 8px 11px; font-size: 13.5px; margin: 8px 0; }
.raw { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 13px; white-space: pre-line; color: #3a403b; }

/* ---------------------------------------------------------------- fiches événement */
.badge.grey { background: #ecebe6; color: #5d625c; }
.badge.red { background: var(--red-tint); color: var(--red-ink); }
.badge .spin { width: 10px; height: 10px; }
.banner.soft { background: #fff7d6; color: #6b5300; border-color: #f1dc8f; }
.banner.ok { background: var(--green-tint); color: var(--green-ink); border-color: #b9e3c7; }
table.fiches td { vertical-align: middle; }
.fiche-modal { position: fixed; top: 2.5vh; bottom: 2.5vh; left: 50%; transform: translateX(-50%); width: min(1020px, 96vw); z-index: 51;
  background: var(--surface); border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); display: flex; flex-direction: column; overflow: hidden; }
.fiche-modal header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.fiche-modal header h2 { font-size: 18px; }
.fiche-modal .close { border: 0; background: none; font-size: 26px; line-height: 1; color: var(--muted); }
.fiche-body { overflow-y: auto; padding: 18px 20px 26px; flex: 1; }
.fiche-modal footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.fiche-modal footer .grow { flex: 1; }
.fiche-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.fiche-check { background: #fff7d6; border: 1px solid #f1dc8f; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.fiche-check textarea { background: #fffdf3; }
.fiche-changes { background: var(--blue-tint); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-size: 13.5px; white-space: pre-line; }
.fiche-head { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); margin-bottom: 16px; }
.fiche-head .span4 { grid-column: 1 / -1; }
.fiche-head .big input { font-size: 18px; font-weight: 650; }
.fiche-body label { display: flex; flex-direction: column; gap: 4px; }
.fiche-body label > span, .fiche-body legend { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.fiche-body label > small { font-size: 12px; color: var(--muted); }
.fiche-body label.sec { margin-bottom: 14px; }
.fiche-body label.sec > span { font-size: 13px; color: var(--ink); text-transform: none; letter-spacing: 0; text-decoration: underline; }
.fiche-body input, .fiche-body textarea { width: 100%; border: 1px solid #d9d5ca; border-radius: 8px; padding: 7px 10px; font: 14px/1.45 var(--font); color: var(--ink); background: #fff; resize: vertical; }
.fiche-body input:focus, .fiche-body textarea:focus { outline: 2px solid #9cc3a8; border-color: #9cc3a8; }
.fiche-body fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.fiche-body label.chk { flex-direction: row; align-items: center; gap: 7px; font-size: 14px; }
.fiche-body label.chk input { width: auto; }
.fiche-wait { text-align: center; padding: 50px 20px; }
.spin.big { width: 30px; height: 30px; border-width: 3px; color: var(--green); margin-bottom: 12px; }
.act.big { font-size: 15px; padding: 10px 18px; margin-top: 10px; }
#print-root { display: none; }

/* fiche en couleurs : aperçu à l'écran et impression */
.cat-salle { --cc: #008300; --ct: #e4f3e4; --ci: #0b4f0b; }
.cat-boissons { --cc: #2a78d6; --ct: #e2edfb; --ci: #174a8a; }
.cat-nourriture { --cc: #eda100; --ct: #fcf0d2; --ci: #6b4500; }
.cat-animation { --cc: #e87ba4; --ct: #fbe5ee; --ci: #8a2350; }
.fiche-tabs { margin-bottom: 14px; }
.fiche-check ul { margin: 6px 0 0; padding-left: 20px; font-size: 13.5px; }
.fdoc { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 22px 26px; font: 14.5px/1.45 var(--font); color: #111; }
.fdoc .p-head { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 14px; }
.fdoc .p-head td { padding: 3px 6px; vertical-align: top; }
.fdoc .p-title { background: #a8d08d; text-align: center; font-size: 24px; }
.fdoc .p-lab td { background: #bfbfbf; font-weight: 700; }
.fdoc .p-lab2 td { background: #d0cece; font-weight: 700; text-align: center; }
.fdoc .p-head .b { font-weight: 700; }
.fdoc .p-head .c { text-align: center; }
.fdoc h3 { font-size: 15px; font-weight: 500; text-decoration: underline; margin: 18px 0 6px; }
.fdoc h4 { font-size: 15px; margin: 16px 0 6px; }
.c-legend { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 4px 0 6px; }
.c-chip { border: 0; border-left: 6px solid var(--cc); background: var(--ct); color: var(--ci); font: 700 12.5px var(--font); letter-spacing: .3px; padding: 5px 11px; border-radius: 0 7px 7px 0; }
button.c-chip { cursor: pointer; }
button.c-chip:hover { filter: brightness(.97); }
.c-chip.on { box-shadow: 0 0 0 2px var(--cc); }
.c-chip.off { opacity: .45; }
.c-line { border-left: 6px solid var(--cc); background: var(--ct); padding: 5px 10px; margin: 3px 0; border-radius: 0 7px 7px 0; }
.c-plain { padding: 2px 0; }
.c-bullet { margin-left: 22px; }
.c-step { margin: 10px 0 3px; }
.c-step.c-line { margin-top: 10px; }
.c-tag { display: inline-block; min-width: 92px; font-size: 10.5px; font-weight: 800; letter-spacing: .6px; color: var(--ci); margin-right: 6px; vertical-align: 1px; }
.c-gap { height: 6px; }
.dim { opacity: .18; }

@media print {
  body > *:not(#print-root) { display: none !important; }
  body { background: #fff; }
  #print-root { display: block; }
  #print-root .fdoc { border: 0; padding: 0; font: 11pt/1.4 "Abadi Extra Light", "Abadi", Arial, sans-serif; color: #000; }
  #print-root, #print-root * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #print-root .c-line { break-inside: avoid; }
  .p-head { width: 100%; border-collapse: collapse; margin-bottom: 18pt; }
  .p-head td { padding: 2pt 4pt; vertical-align: top; }
  .p-title { background: #a8d08d; text-align: center; font-size: 22pt; }
  .p-lab td { background: #bfbfbf; font-weight: bold; }
  .p-lab2 td { background: #d0cece; font-weight: bold; text-align: center; }
  .p-head .b { font-weight: bold; }
  .p-head .c { text-align: center; }
  #print-root h3 { font-size: 11pt; font-weight: normal; text-decoration: underline; margin: 12pt 0 2pt; }
  #print-root h4 { font-size: 11pt; margin: 10pt 0 2pt; }
  .p-bullet { padding-left: 22pt; text-indent: -12pt; }
  .p-bullet::before { content: "•"; display: inline-block; width: 12pt; }
  .p-gap { height: 8pt; }
}

/* ---------------------------------------------------------------- statistiques */
:root { --s-room: #2a78d6; --s-other: #eb6834; --s-tva: #cfccc3; --s-pipe-bg: #f1f2f5; --s-pipe-line: #8d97a8; }
.filters { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.chk-inline { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi span { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.kpi b { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 12.5px; }
.kpi.pipe { background: repeating-linear-gradient(135deg, #fff 0 6px, #f4f5f8 6px 12px); }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid { stroke: #ece9e1; stroke-width: 1; }
.chart .base { stroke: #bdb9ae; stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .val { fill: var(--ink); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .mlabel { fill: var(--muted); font-size: 12px; }
.chart .mlabel.cur { fill: var(--ink); font-weight: 700; }
.chart .mlabel.sel { text-decoration: underline; fill: var(--ink); }
.chart .s-room { fill: var(--s-room); }
.chart .s-other { fill: var(--s-other); }
.chart .s-tva { fill: var(--s-tva); }
.chart .s-pipe { fill: url(#hatch); }
.chart .pipe-bg { fill: var(--s-pipe-bg); }
.chart .pipe-line { stroke: var(--s-pipe-line); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit:hover { fill: rgba(30, 35, 32, .04); }
.chart .hit.sel { fill: rgba(30, 35, 32, .06); }
.chart .ref { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.sw.s-ref { background: none; height: 0; border-top: 2px solid var(--ink); width: 18px; }
.tooltip div.sep { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 5px; }
td .up { color: var(--green-ink); font-weight: 600; }
td .down { color: var(--red-ink); font-weight: 600; }
.sw.s-room { background: var(--s-room); }
.sw.s-other { background: var(--s-other); }
.sw.s-tva { background: var(--s-tva); }
.sw.s-pipe { background: repeating-linear-gradient(135deg, var(--s-pipe-bg) 0 2px, var(--s-pipe-line) 2px 3px); }
.tooltip { position: absolute; z-index: 5; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); padding: 10px 12px; font-size: 13px; min-width: 260px; }
.tooltip b { display: block; margin-bottom: 6px; text-transform: capitalize; }
.tooltip div { display: flex; justify-content: space-between; gap: 16px; padding: 1px 0; font-variant-numeric: tabular-nums; }
.tooltip div span:first-child { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.tooltip .sw { width: 10px; height: 10px; }
#chart-panel .panel, .stats-page .panel { position: relative; }
table.num-table tbody tr[data-month] { cursor: pointer; }
table.num-table tbody tr[data-month]:hover td { background: var(--surface-2); }
table.num-table tr.sel td { background: #f2f7f3; }
table.num-table tr.total td { font-weight: 700; border-top: 2px solid var(--line); }
table.num-table tr.pipe-row td { color: var(--muted); }
.topbar a.btn { text-decoration: none; }

/* ---------------------------------------------------------------- réglages */
.setup ol { margin: 6px 0 0; padding-left: 20px; }
.setup li { margin-bottom: 6px; }
code.topic { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: 13px; user-select: all; }

/* ---------------------------------------------------------------- téléphone */
@media (max-width: 760px) {
  .topbar { padding: 10px 16px; }
  .brand p, .sync .muted { display: none; }
  .panel, #a-valider { scroll-margin-top: 150px; }
  main { padding: 14px 16px 50px; }
  .stages { gap: 10px; }
  .stage { min-width: 0; flex: 1 1 30%; padding: 8px 10px; }
  .stage .n { font-size: 20px; }
  .todo-groups { grid-template-columns: 1fr; }
  .panel { padding: 14px; }
  .cal-head { flex-direction: column; align-items: stretch; }
  .cal-nav .title { min-width: 0; flex: 1; }
  .agenda .day { grid-template-columns: 1fr; gap: 4px; }
  .aev .time { width: 78px; }
  .fiche-modal { inset: 0; transform: none; width: 100%; border-radius: 0; }
  .fiche-head { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------- plans de salle */
.plan-controls label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.plan-controls select, .plan-controls input[type=number] { font: inherit; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.plan-controls input[type=number] { width: 80px; }
.plan-layout { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.plan-panel { padding: 10px; }
.plan-svg { width: 100%; height: auto; display: block; }
.plan-side h2 { font-size: 17px; margin-bottom: 8px; }
.plan-side ul { padding-left: 18px; margin: 6px 0; }
.plan-verdict { font-weight: 700; padding: 8px 10px; border-radius: 8px; }
.plan-verdict.ok { background: var(--green-tint); color: var(--green-ink); }
.plan-verdict.ko { background: var(--red-tint); color: var(--red-ink); }
.down { color: var(--red-ink); }
.pl-room { fill: #f7f6f2; }
.pl-room.on { fill: #fff; }
.pl-wall { fill: none; stroke: #3a3d3a; stroke-width: 22; }
.pl-open { fill: #fff; }
.pl-partition { stroke: #8d97a8; stroke-width: 6; stroke-dasharray: 24 14; }
.pl-door { fill: #fff; stroke: #6d726c; stroke-width: 3; }
.pl-door.exit { fill: #d9f0df; stroke: #1f7a3a; stroke-width: 4; }
.pl-door.service { fill: #fff3d6; stroke: #a07a1a; }
.pl-doorlab { font: 600 30px var(--font); fill: #5f645e; }
.pl-doorlab.exit { fill: #1f7a3a; }
.pl-keep { fill: rgba(232, 123, 164, .12); stroke: rgba(200, 80, 130, .45); stroke-width: 3; stroke-dasharray: 10 8; }
.pl-obs { fill: #9aa29a; }
.pl-obs.bar { fill: #3f6fb0; }
.pl-obs.stairs { fill: #b9b4a6; }
.pl-lab { font: 600 28px var(--font); fill: #444a44; }
.pl-lab.muted { fill: #8a8d86; }
.pl-room-lab { font: 700 40px var(--font); fill: #8a8d86; }
.pl-table { fill: #cfe8d5; stroke: #2c7a46; stroke-width: 4; }
.pl-table.md { fill: #fde7c4; stroke: #b07a12; }
.pl-chair { fill: #c9c6bd; stroke: #8f8b80; stroke-width: 2; }
.pl-tnum { font: 700 38px var(--font); fill: #1f4f2e; }
.pl-scale line { stroke: #333; stroke-width: 5; }
.pl-scale text { font: 600 30px var(--font); fill: #333; }
@media (max-width: 900px) { .plan-layout { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- boîte à idées */
.small-count { font-size: 11px; padding: 1px 6px; margin-left: 4px; background: #eb6834; }
.badge.blue { background: var(--blue-tint); color: var(--blue); }
.idea-form { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-2); margin-bottom: 14px; }
.idea-form textarea { width: 100%; border: 1px solid #d9d5ca; border-radius: 8px; padding: 9px 11px; font: 14px/1.45 var(--font); resize: vertical; background: #fff; }
.idea-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.idea-row .grow { flex: 1; }
.idea-row select { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.idea-file { cursor: pointer; }
.idea-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.idea-thumb { position: relative; }
.idea-thumb img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.idea-thumb button { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 14px; line-height: 1; }
.idea-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 10px; }
.idea { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; background: var(--surface); }
.idea-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.idea-text { margin: 8px 0 0; white-space: pre-line; font-size: 14px; }
.idea-imgs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.idea-imgs img { width: 96px; height: 96px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); display: block; }
.idea .actions select { font: inherit; font-size: 12.5px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
@media (max-width: 760px) {
  .topbar .sync { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .topbar .btn { padding: 5px 9px; font-size: 12.5px; }
  .brand h1 { font-size: 16px; }
  .idea-list { grid-template-columns: 1fr; }
}

.plan-controls .grow { flex: 1; }
.plan-controls #save-wrap select { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; max-width: 260px; }
.plan-side h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 14px 0 4px; }
.plan-event { margin-bottom: 10px; }
.plan-issues { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--red-ink); }
.plan-selected { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.plan-selected h3 { margin-top: 0; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 14px; }
.stepper { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.stepper .act { min-width: 30px; }
.palette { display: flex; flex-wrap: wrap; gap: 6px; }
.palette .act { font-size: 12px; }
.pl-window { fill: #dbe9f7; stroke: #6b8db3; stroke-width: 3; }
.pl-item { cursor: grab; }
.pl-item:active { cursor: grabbing; }
.pl-item.sel .pl-table { stroke: #1e2320; stroke-width: 8; }
.pl-item.bad .pl-table { fill: #fbe4e4; stroke: #cf3f3f; stroke-width: 7; }
.pl-item.bad .pl-chair { fill: #f3c6c6; }
.pl-tlab { font: 700 26px var(--font); fill: #2c5a3a; pointer-events: none; }
.pl-tnum { pointer-events: none; }
.pl-tnum.sm { font-size: 26px; }
.plan-svg { touch-action: none; user-select: none; }

.fiche-plan { display: block; width: 100%; max-width: 760px; margin: 6px auto 10px; border: 1px solid var(--line); border-radius: 8px; }
@media print { #print-root .fiche-plan { max-width: 100%; border: 0; } }

/* ---------------------------------------------------------------- engagements (V3) */
:root { --eng-promesse: #3a6db3; --eng-promesse-tint: #e3ebf7; --eng-attente: #7b5cb8; --eng-attente-tint: #eee8f8; }
.count:empty { display: none; }
.panel-head .grow { flex: 1; }
.tgroup.g-eng h3 .dot { background: var(--eng-promesse); }
.todo.k-engagement { border-left-color: var(--eng-promesse); }
.eng-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.eng-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.eng-sw { display: inline-block; width: 4px; height: 14px; border-radius: 2px; background: var(--eng-promesse); }
.eng-sw.t-attente { background: var(--eng-attente); }
.eng-board { display: flex; gap: 10px; align-items: flex-start; overflow-x: auto; padding-bottom: 2px; }
.eng-col { flex: 1 1 0; min-width: 180px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 90px; }
.eng-col.is-empty { flex: 0 0 118px; min-width: 0; }
.eng-col h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 2px 4px 8px; display: flex; justify-content: space-between; align-items: center; }
.eng-n { background: var(--ink); color: #fff; border-radius: 99px; padding: 0 7px; font-size: 11.5px; letter-spacing: 0; }
.eng-n:empty { display: none; }
.eng-col.c-late:not(.is-empty) { background: var(--red-tint); border-color: #f0c4c4; }
.eng-col.c-late:not(.is-empty) h3 { color: var(--red-ink); }
.eng-col.c-late .eng-n { background: var(--red); }
.eng-col.c-today:not(.is-empty) { background: #fff7e8; border-color: #f3d9a8; }
.eng-col.c-today:not(.is-empty) h3 { color: var(--orange-ink); }
.eng-col.c-today .eng-n { background: var(--orange); }
.eng-none { color: #b9b5aa; text-align: center; margin: 14px 0; }
.eng-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--eng-promesse); border-radius: 8px; padding: 8px 9px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(30,35,32,.05); }
.eng-card.t-attente { border-left-color: var(--eng-attente); }
.eng-top { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.eng-kind { font-size: 13px; }
.eng-when { font-weight: 650; color: var(--ink); }
.eng-est { font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: #8a6d2f; background: #f6edd6; border-radius: 4px; padding: 0 5px; }
.eng-card h4 { margin: 4px 0 2px; font-size: 13.5px; font-weight: 650; line-height: 1.3; }
.eng-who { margin: 0; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eng-from { margin: 2px 0 0; font-size: 12px; color: var(--eng-attente); font-weight: 600; }
.eng-quote { margin-top: 5px; font-size: 12px; }
.eng-quote summary { cursor: pointer; color: var(--blue); }
.eng-quote blockquote { margin: 5px 0 3px; padding: 5px 8px; background: var(--surface-2); border-radius: 6px; color: #3a403b; }
.eng-quote p { margin: 2px 0; }
.eng-actions { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.eng-actions .act { padding: 3px 8px; font-size: 12px; }
.eng-actions .eng-x { margin-left: auto; color: var(--muted); }
.eng-snooze { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line); }
.eng-snooze .act { padding: 3px 7px; font-size: 12px; }
.eng-snooze input[type=date] { font-size: 12px; padding: 2px 4px; border: 1px solid var(--line); border-radius: 6px; }
.eng-more { margin-top: 12px; }
.eng-more summary { cursor: pointer; font-size: 13px; color: var(--ink); font-weight: 600; }
.eng-old { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 8px; }
.eng-old .eng-card { margin: 0; }
.eng-closed { list-style: none; padding: 0; margin: 8px 0 0; }
.eng-closed li { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.eng-closed-what { font-weight: 600; }
.eng-ok { color: var(--green-ink); }
.eng-err { color: var(--red-ink); }
.eng-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; margin-bottom: 12px; background: var(--eng-promesse-tint); border-radius: 10px; }
.eng-form input { font: inherit; font-size: 13.5px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.eng-form #eng-new-action { flex: 1 1 280px; }
.eng-form #eng-new-lead { flex: 0 1 240px; }
@media (max-width: 760px) {
  .eng-board { flex-direction: column; align-items: stretch; overflow: visible; }
  .eng-col { flex: none; min-width: 0; }
  .eng-col.is-empty { display: none; }
}
@media print { #eng-panel { display: none; } }

/* ---------------------------------------------------------------- suggestions de l'agent (V4) */
.sg-running { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--blue-tint); color: #24456f; margin-bottom: 12px; font-size: 14px; }
.sg-bilan { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; }
.sg-bilan h3, .sg-follow h3, .sg-learned h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 0 0 8px; }
.sg-bilan ul { margin: 0; padding-left: 18px; }
.sg-bilan li { margin: 4px 0; font-size: 14px; line-height: 1.45; }
.sg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.sg-card { border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 10px; padding: 12px 14px; background: var(--surface); }
.sg-card.q-celine { border-top-color: var(--orange); }
.sg-card.q-agent { border-top-color: var(--green); }
.sg-card.q-alexis { border-top-color: #8a6bbf; }
.sg-card.q-equipe { border-top-color: var(--teal); }
.sg-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.sg-top .grow { flex: 1; }
.sg-who { font-weight: 650; }
.sg-level { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 11.5px; margin-left: 6px; }
.sg-level i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #dedbd2; margin-left: 2px; }
.sg-level i.on { background: var(--ink); }
.sg-card h4 { margin: 8px 0 4px; font-size: 15px; font-weight: 700; line-height: 1.3; }
.sg-constat { margin: 0 0 6px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.sg-prop { margin: 0; font-size: 13.5px; line-height: 1.45; }
.sg-rule { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--green-tint); color: var(--green-ink); font-size: 12.5px; line-height: 1.45; }
.sg-rule q { display: block; margin-top: 3px; font-style: italic; }
.sg-follow, .sg-learned { margin-top: 16px; }
.sg-list { list-style: none; padding: 0; margin: 8px 0 0; }
.sg-list li { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.sg-row-title { font-weight: 600; flex: 1 1 260px; }
.idea-avis { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--blue-tint); color: #24456f; font-size: 13px; line-height: 1.45; }
@media (max-width: 760px) {
  .sg-grid { grid-template-columns: 1fr; }
  .sg-level { margin-left: 0; }
}
@media print { #sugg-panel { display: none; } }

/* ---------------------------------------------------------------- connexion (version en ligne) */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.login-box { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 24px; }
.login-brand { margin-bottom: 18px; }
.login-brand svg { width: 40px; height: 40px; }
.login-brand h1 { font-size: 19px; margin: 0; color: var(--ink); }
.login-brand p { margin: 0; color: var(--muted); font-size: 13px; }
.login-form { display: grid; gap: 12px; }
.login-form h2 { font-size: 18px; margin: 0; }
.login-form p { margin: 0; font-size: 14px; }
.login-form label { display: grid; gap: 5px; font-size: 13.5px; font-weight: 600; }
.login-form input { font: inherit; font-size: 16px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; }
.login-form .act.big { margin-top: 4px; width: 100%; }
.login-error { color: var(--red-ink); font-size: 14px; min-height: 1em; margin: 12px 0 0; }

/* ---------------------------------------------------------------- V5 : fournisseurs, courrier, boîte mail */
:root { --s-todo: #cf3f3f; --s-todo-t: #fbe4e4; --s-asked: #c46a00; --s-asked-t: #fdebd5; --s-quote: #2a6fc0; --s-quote-t: #e3ebf7; --s-ok: #1e8a4c; --s-ok-t: #dcf2e4; }
.tgroup.g-presta h3 .dot { background: var(--s-todo); }
.todo.k-prestation { border-left-color: var(--s-todo); }
.pr-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pr-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.pr-grid { border-collapse: collapse; width: 100%; font-size: 13px; }
.pr-grid th, .pr-grid td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: center; vertical-align: middle; }
.pr-grid thead th { background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); white-space: nowrap; border-top: 3px solid transparent; }
.pr-grid thead th.pole-animation { border-top-color: #e87ba4; }
.pr-grid thead th.pole-nourriture { border-top-color: #eda100; }
.pr-grid thead th.pole-salle { border-top-color: #008300; }
.pr-grid tbody th { text-align: left; font-weight: 600; min-width: 190px; background: var(--surface); position: sticky; left: 0; }
.pr-grid tr.soon14 th { box-shadow: inset 4px 0 0 var(--s-asked); }
.pr-grid tr.soon7 th { box-shadow: inset 4px 0 0 var(--s-todo); }
.pr-date { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.pr-j { background: var(--surface-2); border-radius: 99px; padding: 0 6px; margin-left: 4px; }
.soon7 .pr-j { background: var(--s-todo-t); color: var(--red-ink); }
.pr-title { display: block; }
.pr-cell { display: inline-flex; align-items: center; gap: 5px; border: 1px solid transparent; border-radius: 99px; padding: 3px 10px 3px 4px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pr-cell.mini { cursor: default; padding: 1px 8px 1px 3px; }
.pr-ic { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 11px; }
.pr-cell.s-todo { background: var(--s-todo-t); color: var(--red-ink); } .s-todo .pr-ic { background: var(--s-todo); }
.pr-cell.s-asked { background: var(--s-asked-t); color: var(--orange-ink); } .s-asked .pr-ic { background: var(--s-asked); }
.pr-cell.s-quote { background: var(--s-quote-t); color: #174a8a; } .s-quote .pr-ic { background: var(--s-quote); }
.pr-cell.s-ok { background: var(--s-ok-t); color: var(--green-ink); } .s-ok .pr-ic { background: var(--s-ok); }
.pr-cell.s-off { background: #ecebe6; color: #5d625c; text-decoration: line-through; } .s-off .pr-ic { background: #9a968c; }
.pr-cell.s-none { background: #f3f2ee; color: #8a8e88; } .s-none .pr-ic { background: #bdb9ae; }
.pr-h { font-weight: 700; margin-left: 2px; }
.pr-none { color: #cfcbc0; }
.pr-detail { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.pr-detail-top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.pr-detail blockquote { margin: 6px 0; padding: 6px 10px; background: var(--surface); border-radius: 6px; font-size: 13px; }
.pr-detail select { margin-left: 6px; font: inherit; padding: 3px 6px; }
.pr-prop { margin-top: 14px; }
.pr-prop h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.pr-prop-card { border: 1px dashed var(--line); border-radius: 9px; padding: 8px 10px; margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.pr-prop-card p { flex-basis: 100%; margin: 0; }
.pr-book { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.pr-book td { border-bottom: 1px solid var(--line); padding: 5px 6px; }
.flux-tabs { margin-bottom: 10px; flex-wrap: wrap; }
.flux { list-style: none; margin: 0; padding: 0; }
.flux li { display: grid; grid-template-columns: 22px 92px 1fr auto; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line); align-items: start; font-size: 13px; }
.fx-dir { font-weight: 700; color: var(--muted); }
.fx-when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.fx-main { min-width: 0; }
.fx-who { font-weight: 650; margin-right: 6px; }
.fx-dossier { font-size: 12px; color: var(--blue); margin-right: 6px; }
.fx-subj { color: var(--ink); }
.fx-prev { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-tags { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.flux li.fx-fournisseur { box-shadow: inset 3px 0 0 #e87ba4; }
.flux li.fx-demande { box-shadow: inset 3px 0 0 var(--orange); }
.boite-form { display: grid; gap: 8px; max-width: 460px; }
.boite-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.boite-form input { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; }
.boite-promise { margin: 6px 0 12px; padding-left: 18px; }
@media (max-width: 760px) {
  .flux li { grid-template-columns: 18px 1fr; }
  .fx-when { grid-column: 2; }
  .fx-main, .fx-tags { grid-column: 2; justify-content: flex-start; }
  .pr-grid tbody th { min-width: 140px; }
}
@media print { #fournisseurs-panel, #courrier-panel, #boite-panel { display: none; } }

/* tableau de bord : questionnaire dans les fiches */
.q-status { min-width: 180px; }
.q-copy { display: block; margin-top: 6px; white-space: nowrap; }
.fiche-q { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0; background: #f7f9f6; }
.fiche-q pre { white-space: pre-wrap; font: inherit; font-size: 13px; margin: 8px 0 0; }
.tgroup.g-quest h3 .dot { background: var(--green); }
.todo.k-questionnaire { border-left-color: var(--green); }

/* ---------------------------------------------------------------- facturation */
.tgroup.g-fact h3 .dot { background: var(--teal); }
.todo.k-facturation { border-left-color: var(--teal); }
.fa-kpis { margin-bottom: 14px; }
.fa-kpi { box-shadow: none; }
.fa-kpi b { font-size: 22px; }
.fa-kpi.warn { border-color: #f1c4c4; background: var(--red-tint); }
.fa-kpi.warn b { color: var(--red-ink); }
.fa-kpi.todo { border-color: #f3d3a8; background: var(--orange-tint); }
.fa-kpi.todo b { color: var(--orange-ink); }
.fa-kpi.ok b { color: var(--green-ink); }
.fa-bar { margin-bottom: 12px; overflow-x: auto; }
.fa-seg button { white-space: nowrap; }
.fa-row { cursor: pointer; }
.fa-split { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 2px 0; font: inherit; font-size: 12.5px;
  color: var(--red-ink); cursor: pointer; }
.fa-split:hover { text-decoration: underline; }
.fa-kpi .fa-split b { font-size: inherit; font-weight: 700; color: inherit; }
.fa-when { display: inline-block; font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 99px; white-space: nowrap; }
.fa-when.soon { background: var(--orange-tint); color: var(--orange-ink); }
.fa-when.past { background: #ecebe6; color: #5d625c; }
.tgroup.g-facta h3 .dot { background: var(--orange); }
.todo.k-facturation_avenir { border-left-color: var(--orange); }
.fa-sort { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.fa-sort:hover { color: var(--ink); }
.fa-sort .ind { margin-left: 4px; font-size: 10px; opacity: .35; }
.fa-sort.on { color: var(--ink); }
.fa-sort.on .ind { opacity: 1; }
.fa-row:hover td, .fa-row.open td { background: var(--surface-2); }
.fa-detail > td { background: var(--surface-2); padding: 4px 12px 14px; }
.fa-box { display: flex; flex-direction: column; gap: 10px; }
.fa-inv { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.fa-inv-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fa-inv-top a { color: var(--ink); text-decoration: none; }
.fa-inv-top a:hover { text-decoration: underline; }
.fa-inv .actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fa-alert { margin: 0; padding: 9px 12px; border-radius: 9px; background: var(--orange-tint); color: var(--orange-ink); font-size: 13.5px; }
.fa-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fa-pay { margin-top: 8px; }
.fa-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fa-import { cursor: pointer; white-space: nowrap; }
.fa-import.busy { opacity: .7; cursor: progress; }
.fa-importres { position: relative; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--teal-tint); font-size: 13.5px; }
.fa-importres ul { margin: 6px 0 8px; padding-left: 18px; }
.fa-importres li { margin-bottom: 6px; }
.fa-importres .act { margin: 4px 6px 0 0; }
.fa-close { position: absolute; top: 10px; right: 12px; }
.fa-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 8px; font-size: 12px; }
.fa-step { padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.fa-step.done { background: var(--green-tint); border-color: transparent; color: var(--green-ink); }
.fa-step.now { background: var(--red-tint); border-color: transparent; color: var(--red-ink); font-weight: 650; }
.fa-step.next { background: var(--blue-tint); border-color: transparent; color: var(--blue); font-weight: 650; }
.fa-arrow { color: var(--off); }
.fa-paid { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 10px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; }
.fa-paid input { width: 16px; height: 16px; accent-color: var(--green); }
.fa-foot { margin: 12px 2px 0; }
@media (max-width: 760px) {
  .fa-hide { display: none; }
  .fa-kpis { grid-template-columns: 1fr 1fr; }
}
@media print { #facturation-panel { display: none; } }
