:root {
  --bg: #f6f3ee; --panel: #ffffff; --panel-2: #faf8f4; --ink: #1b1714; --muted: #7d7368; --line: #e8e1d6;
  --gold: #b8925a; --gold-soft: #f5ecdd; --accent: #1b1714;
  --blue: #3563c9; --blue-soft: #e8eefb; --green: #2f8a57; --green-soft: #e3f3e9;
  --amber: #b87514; --amber-soft: #fbf0dc; --red: #c2412d; --red-soft: #fbe8e4; --violet: #7a4fc4; --violet-soft: #efe8fb;
  --grey-soft: #eeebe6;
  --radius: 14px; --shadow: 0 1px 2px rgba(27,23,20,.05), 0 8px 24px -16px rgba(27,23,20,.25);
  --sans: "Inter", system-ui, -apple-system, sans-serif; --serif: "Fraunces", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141210; --panel: #1d1a17; --panel-2: #23201c; --ink: #f1ebe2; --muted: #a39887; --line: #34302a;
    --gold-soft: #3a2f20; --blue-soft: #1f2a40; --green-soft: #1b3326; --amber-soft: #3b2c14; --red-soft: #3d1f19;
    --violet-soft: #2c2240; --grey-soft: #2a2622; --accent: #e9d9bd;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -16px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --bg: #141210; --panel: #1d1a17; --panel-2: #23201c; --ink: #f1ebe2; --muted: #a39887; --line: #34302a;
  --gold-soft: #3a2f20; --blue-soft: #1f2a40; --green-soft: #1b3326; --amber-soft: #3b2c14; --red-soft: #3d1f19;
  --violet-soft: #2c2240; --grey-soft: #2a2622; --accent: #e9d9bd;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 var(--sans); background: var(--bg); color: var(--ink); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; }
.hidden { display: none !important; }

/* ---------- structure ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: #000; color: #e9e1d4; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side .brand { font-family: var(--serif); letter-spacing: .25em; font-size: 16px; padding: 4px 10px 18px; }
.side .brand b { color: var(--gold); font-weight: 500; }
.side a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: #cbbfae; }
.side a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side a.on { background: rgba(184,146,90,.18); color: #f3e3c6; }
.side a .count { margin-left: auto; background: var(--gold); color: #15120f; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.side .grow { flex: 1; }
.side .who { font-size: 12px; color: #988b79; padding: 10px 12px; border-top: 1px solid rgba(255,255,255,.08); }
.side .who button { background: none; border: 0; color: #cbbfae; padding: 0; cursor: pointer; text-decoration: underline; }
.main { min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; }
.top .menu { display: none; }
.search { position: relative; flex: 1; max-width: 520px; }
.search input { width: 100%; padding: 9px 14px 9px 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); }
.search::before { content: "⌕"; position: absolute; left: 13px; top: 6px; color: var(--muted); font-size: 18px; }
.search .results { position: absolute; top: 44px; left: 0; right: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 60vh; overflow: auto; z-index: 20; }
.search .results a { display: flex; gap: 10px; justify-content: space-between; padding: 10px 14px; text-decoration: none; border-bottom: 1px solid var(--line); }
.search .results a:hover, .search .results a.sel { background: var(--panel-2); }
.venue-switch { display: flex; gap: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.venue-switch button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.venue-switch button.on { background: var(--accent); color: var(--bg); }
.page { padding: 26px 28px 60px; max-width: 1400px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-family: var(--serif); font-weight: 500; font-size: 30px; }
.page-head .sub { color: var(--muted); }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 30; left: 0; top: 0; width: 250px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .top { padding: 10px 16px; flex-wrap: wrap; }
  .top .menu { display: block; }
  .page { padding: 18px 16px 50px; }
  .venue-switch { order: 3; }
}

/* ---------- composants ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); padding: 8px 14px; border-radius: 10px; cursor: pointer; text-decoration: none; white-space: nowrap; font-weight: 500; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #15120f; }
.btn.danger { color: var(--red); border-color: var(--red-soft); }
.btn.small { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-h h2 { font-size: 15px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 14px 18px; }
.empty { color: var(--muted); padding: 18px; text-align: center; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
@media (max-width: 500px) { .g2 { grid-template-columns: 1fr; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; display: block; }
.kpi .v { font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 13px; }
.kpi.alert .v { color: var(--red); }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--grey-soft); color: var(--muted); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-nouvelle { background: var(--blue-soft); color: var(--blue); }
.st-a_traiter { background: var(--amber-soft); color: var(--amber); }
.st-attente_client { background: var(--violet-soft); color: var(--violet); }
.st-option { background: var(--gold-soft); color: var(--gold); }
.st-confirmee { background: var(--green-soft); color: var(--green); }
.st-annulee { background: var(--grey-soft); color: var(--muted); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.ok { color: var(--green); } .warn { color: var(--amber); } .bad { color: var(--red); } .muted { color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); display: inline-block; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line); text-decoration: none; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--panel-2); }
.list-row .main-txt { flex: 1; min-width: 0; }
.list-row .t { font-weight: 600; }
.list-row .s { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); position: sticky; top: 0; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--panel-2); }
table.t tr.unread td:first-child + td { font-weight: 700; }
.table-wrap { overflow: auto; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.filters select, .filters input, .field input, .field select, .field textarea {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea { color: var(--ink); font-size: 14px; font-weight: 400; width: 100%; }
.field textarea { min-height: 80px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink); font-weight: 500; }
.bulkbar { position: sticky; bottom: 16px; margin-top: 12px; display: flex; gap: 8px; align-items: center; background: var(--accent); color: var(--bg); padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow); flex-wrap: wrap; }
.bulkbar .btn { background: transparent; color: var(--bg); border-color: rgba(255,255,255,.3); }

/* ---------- fiche ---------- */
.fiche { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .fiche { grid-template-columns: 1fr; } }
.fiche-head { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.fiche-head h1 { font-family: var(--serif); font-weight: 500; font-size: 28px; }
.fiche-head .meta { color: var(--muted); display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; align-items: center; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 18px; border: 1px solid var(--line); }
.facts div { background: var(--panel); padding: 10px 14px; }
.facts .l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.facts .v { font-weight: 600; overflow-wrap: anywhere; }
.convo { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; max-height: 560px; overflow: auto; background: var(--panel-2); }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; overflow-wrap: anywhere; }
.msg .txt { white-space: pre-wrap; }
.msg.in { background: var(--panel); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.out { background: var(--gold-soft); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.draft { border: 1px dashed var(--gold); background: transparent; }
.msg.sys { align-self: center; background: none; color: var(--muted); font-size: 12px; padding: 2px; }
.msg .h { font-size: 11px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.msg.unread { box-shadow: 0 0 0 2px var(--blue); }
.composer { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.composer textarea { min-height: 130px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); resize: vertical; }
.composer input { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.composer .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--line); position: relative; margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--panel); border: 2px solid var(--gold); }
.timeline .d { font-size: 12px; color: var(--muted); }
.timeline .chg { font-size: 12px; color: var(--muted); margin: 2px 0 0; padding-left: 14px; }
.note { padding: 10px 12px; background: var(--amber-soft); border-radius: 10px; margin-bottom: 8px; white-space: pre-wrap; }
.note .d { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.tabbar { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 12px; overflow-x: auto; }
.tabbar button { border: 0; background: none; padding: 12px 12px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabbar button.on { color: var(--ink); border-color: var(--gold); font-weight: 600; }
.dep-steps { display: flex; gap: 4px; margin: 8px 0 12px; }
.dep-steps span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.dep-steps span.on { background: var(--green); }

/* ---------- calendrier ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal .dh { padding: 8px; font-size: 12px; color: var(--muted); text-transform: uppercase; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel-2); }
.cal .day { min-height: 116px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.cal .day.out { background: var(--panel-2); opacity: .55; }
.cal .day.today .n { background: var(--gold); color: #15120f; border-radius: 999px; padding: 0 7px; }
.cal .n { font-size: 12px; font-weight: 600; display: inline-block; margin-bottom: 4px; }
.cal .ev { display: block; font-size: 12px; padding: 3px 6px; border-radius: 6px; margin-bottom: 3px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 3px solid currentColor; }
.cal .more { font-size: 11px; color: var(--muted); }
@media (max-width: 760px) { .cal .day { min-height: 70px; } .cal .ev { font-size: 0; height: 6px; padding: 0; margin: 2px 0; } }
.src-Joy { box-shadow: inset -3px 0 0 #e0457b; }
.src-Réserver { box-shadow: inset -3px 0 0 #3a8fd6; }
.src-Kactus { box-shadow: inset -3px 0 0 #32a36b; }

/* ---------- graphiques ---------- */
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: 140px 1fr 50px; gap: 10px; align-items: center; font-size: 13px; }
.bar .track { background: var(--panel-2); border-radius: 6px; height: 12px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--gold); border-radius: 6px; }
.bar .n { text-align: right; font-variant-numeric: tabular-nums; }
.cols { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 10px; }
.cols .c { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; font-size: 11px; color: var(--muted); min-width: 0; }
.cols .stack { width: 100%; max-width: 42px; display: flex; flex-direction: column-reverse; border-radius: 6px 6px 0 0; overflow: hidden; }
.cols .stack .a { background: var(--line); }
.cols .stack .b { background: var(--green); }

/* ---------- divers ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15,12,10,.5); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border-radius: 16px; width: min(560px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
.modal .card-b { display: flex; flex-direction: column; gap: 12px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--bg); padding: 11px 18px; border-radius: 12px; z-index: 60; box-shadow: var(--shadow); max-width: 90vw; }
.toast.err { background: var(--red); color: #fff; }
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: #000; padding: 16px; }
.login form { background: var(--panel); padding: 34px; border-radius: 20px; width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login h1 { font-family: var(--serif); font-weight: 500; letter-spacing: .2em; font-size: 20px; text-align: center; }
.login h1 b { color: var(--gold); font-weight: 500; }
.banner { padding: 10px 14px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); margin-bottom: 14px; font-size: 13px; }
.banner.info { background: var(--blue-soft); color: var(--blue); }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: s .7s linear infinite; }
@keyframes s { to { transform: rotate(360deg); } }
.row-flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sep { height: 1px; background: var(--line); margin: 10px 0; }
kbd { font-size: 11px; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; color: var(--muted); }

.bell { white-space: nowrap; }
.bell.on { padding: 5px 10px; }
@media (max-width: 760px) { .bell:not(.on) { font-size: 12px; } }

/* Logo néon */
.side .brand { display: block; padding: 0 6px 14px; }
.side .brand img { width: 100%; max-width: 170px; height: auto; display: block; mix-blend-mode: screen; }
.login-logo { width: min(300px, 80vw); height: auto; mix-blend-mode: screen; }

/* ---------- refonte : tableau de bord ---------- */
.kpi[role=button] { cursor: pointer; }
.list-row.todo .t { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.list-row.todo .pill { font-size: 11px; padding: 1px 8px; }
.side-mini { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.side-mini a { font-size: 13px; opacity: .7; padding: 6px 12px !important; }
.side-mini a:hover, .side-mini a.on { opacity: 1; }
.st-expiree { background: var(--grey-soft); color: var(--muted); }

/* ---------- refonte : fiche ---------- */
.fiche-wrap { transition: padding-right .2s; }
.back { text-decoration: none; display: inline-block; margin-bottom: 10px; }
.fhead { padding: 20px 22px; margin-bottom: 16px; }
.fh-top { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.fh-name h1 { font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.1; }
.fh-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill-select { appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; padding: 7px 30px 7px 14px; font-weight: 600; font-size: 13px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.pill-select:disabled { cursor: default; }
.pill-select option { color: var(--ink); background: var(--panel); }
.fh-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 16px 0 14px; }
.ff { display: flex; align-items: baseline; gap: 7px; font-size: 18px; }
.ff b { font-weight: 600; }
.ff .muted { font-size: 13px; }
.fh-contact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); text-decoration: none; font-weight: 500; }
a.chip:hover { border-color: var(--gold); }
.fh-meta { font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.btn.ghost-danger { color: var(--red); background: transparent; }
.btn.ghost-danger:hover { background: var(--red-soft); }
.btn.subtle { background: transparent; border-color: transparent; color: var(--muted); }
.btn .count, #openmsg .count { margin-left: 4px; }
.fgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1250px) { .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .fgrid { grid-template-columns: 1fr; } .ff { font-size: 16px; } .fh-name h1 { font-size: 24px; } }
.note-form { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 10px; }
.note-form textarea { flex: 1; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); resize: vertical; }
.note.joy { background: var(--violet-soft); }
.dep-state { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); }
.dep-state .ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none; }
.dep-state.ok .ic { background: var(--green-soft); color: var(--green); }
.dep-state.warn .ic { background: var(--amber-soft); color: var(--amber); }
.dep-state.bad .ic { background: var(--red-soft); color: var(--red); }
.dep-state.muted .ic { background: var(--grey-soft); color: var(--muted); }
.dep-state.ok b { color: var(--green); } .dep-state.warn b { color: var(--amber); } .dep-state.bad b { color: var(--red); }
.next-act { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); margin-bottom: 10px; }
.next-act.late { background: var(--red-soft); }
.naf { display: flex; gap: 6px; }
.naf input { min-width: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.naf input[name=next_action] { flex: 1; }
.fu-row { justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); margin-top: 6px; }

/* ---------- panneau de messages (fiche) ---------- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--panel); border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px -20px rgba(0,0,0,.35); z-index: 40; display: flex; flex-direction: column; transform: translateX(105%); transition: transform .22s ease; }
.drawer.open { transform: none; }
@media (min-width: 1280px) { .fiche-wrap.with-drawer { padding-right: 520px; } .fiche-wrap.with-drawer .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.drawer-h { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.drawer .convo, .mx-pane .convo { flex: 1; max-height: none; min-height: 0; }
.drawer .composer textarea, .mx-pane .composer textarea { min-height: 90px; }
.day-sep { text-align: center; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 6px 0; }
.day-sep span { background: var(--panel-2); padding: 0 8px; }
.evs, .msg-note { align-self: center; font-size: 12px; color: var(--muted); max-width: 90%; }
.evs summary, .msg-note summary { cursor: pointer; list-style: none; text-align: center; }
.evs summary::-webkit-details-marker, .msg-note summary::-webkit-details-marker { display: none; }
.msg-note .txt { white-space: pre-wrap; background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; margin-top: 6px; color: var(--ink); text-align: left; max-height: 260px; overflow: auto; }
.msg.first { border-color: var(--gold); }
.composer .more { position: relative; }
.composer .more summary { list-style: none; }
.composer .more summary::-webkit-details-marker { display: none; }
.composer .menu { position: absolute; right: 0; bottom: calc(100% + 6px); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 290px; z-index: 5; display: flex; flex-direction: column; }
.composer .menu button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.composer .menu button:hover { background: var(--panel-2); }

/* ---------- messagerie deux colonnes ---------- */
.mx { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; height: calc(100vh - 120px); min-height: 480px; }
.mx-list, .mx-pane { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.mx-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px 6px; }
.mx-head h1 { font-family: var(--serif); font-weight: 500; font-size: 24px; }
.mx-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 16px 12px; border-bottom: 1px solid var(--line); }
.mx-filters input { flex: 1; min-width: 120px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); }
.mx-items { overflow: auto; flex: 1; }
.mx-row { display: flex; gap: 8px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 11px 14px; cursor: pointer; }
.mx-row:hover { background: var(--panel-2); }
.mx-row.on { background: var(--gold-soft); }
.mx-row .dotw { width: 8px; flex: none; padding-top: 6px; }
.mx-row .main-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mx-row .t { font-weight: 600; }
.mx-row.unread .t { font-weight: 700; }
.mx-row .s { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-row .ex { color: var(--ink); opacity: .75; }
.mx-row .when { font-size: 11px; color: var(--muted); text-align: right; display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.mx-empty { margin: auto; font-size: 15px; line-height: 2; }
@media (max-width: 860px) {
  .mx { grid-template-columns: 1fr; height: calc(100vh - 110px); }
  .mx.has-sel .mx-list { display: none; }
  .mx:not(.has-sel) .mx-pane { display: none; }
}
.naf { flex-wrap: wrap; }
.naf input[name=next_action] { flex: 1 1 100%; }
.naf input[type=date] { flex: 1; }
.list-row.todo .pill::before { display: none; }
@media (max-width: 760px) {
  .drawer { left: 0; width: auto; }
  .drawer-h { padding: 10px 12px; }
  .composer .menu { min-width: 0; width: calc(100vw - 40px); }
}

/* ---------- calendrier : jour / semaine ---------- */
.cal-head { margin-bottom: 10px; }
.cal-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 14px; }
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg a, .seg button { border: 0; background: none; padding: 5px 13px; border-radius: 999px; cursor: pointer; color: var(--muted); text-decoration: none; font-size: 13px; }
.seg .on { background: var(--accent); color: var(--bg); }
.legend { font-size: 12px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.legend i.st-confirmee { background: var(--green); } .legend i.st-option { background: var(--gold); } .legend i.st-nouvelle { background: var(--blue); }
.cal .n { text-decoration: none; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: start; }
.cal-wd { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-height: 160px; display: flex; flex-direction: column; gap: 6px; }
.cal-wd.today { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.cal-wd-h { display: flex; justify-content: space-between; align-items: baseline; text-decoration: none; padding: 2px 4px 6px; border-bottom: 1px solid var(--line); font-size: 13px; }
.cal-wd-h .muted { font-size: 11px; }
.cev { display: block; text-decoration: none; padding: 7px 9px; border-radius: 9px; border-left: 4px solid currentColor; position: relative; }
.cev:hover { filter: brightness(.97); }
.cev-top { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; }
.cev-name { font-weight: 600; color: var(--ink); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cev-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cev-tag { position: absolute; right: 6px; bottom: 6px; font-size: 10px; font-weight: 600; opacity: .8; }
.cal-day { display: grid; gap: 14px; align-items: start; }
.cal-col { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.cal-col-h { font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.cal-col-h .muted { font-size: 12px; font-weight: 400; }
.cal-col .cev { padding: 10px 12px; }
.cal-col .cev-name { font-size: 15px; white-space: normal; }
.cal-col .cev-top { font-size: 14px; }
.cal-col .cev-sub { font-size: 12.5px; white-space: normal; }
@media (max-width: 1000px) { .cal-week { grid-template-columns: 1fr; } .cal-wd { min-height: 0; } }
@media (max-width: 760px) { .cal-day { grid-template-columns: 1fr !important; } }

/* ---------- messagerie : infos de la résa dans la liste ---------- */
.mx-row .src { font-weight: 500; font-size: 11px; color: var(--muted); margin-left: 4px; }
.mx-row .mx-facts { color: var(--ink); opacity: .85; }
.mx-row .mx-facts b { font-weight: 600; }
.mx-row .mx-facts { white-space: normal; display: flex; flex-wrap: wrap; column-gap: 6px; line-height: 1.35; margin: 1px 0; }
.mx-row .mx-facts .muted { font-weight: 400; }

/* ---------- téléphone : mise en page et alignements ---------- */
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .top { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 10px; padding: 10px 14px; }
  .top .menu { padding: 8px 11px; }
  .search { max-width: none; min-width: 0; }
  .search input { padding: 8px 12px 8px 32px; }
  .bell .bl { display: none; }
  .bell { padding: 8px 11px; font-size: 15px; }
  .venue-switch { grid-column: 1 / -1; order: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
  .venue-switch button { padding: 6px 4px; text-align: center; }
  .page { padding: 14px 14px 60px; }
  .page-head { align-items: center; margin-bottom: 14px; gap: 10px; }
  .page-head h1 { font-size: 24px; }
  .page-head .btn.primary { padding: 8px 12px; font-size: 13.5px; }
  .banner { font-size: 13px; }
  /* Compteurs : grille compacte 2 colonnes, le principal en pleine largeur */
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
  .kpi { padding: 10px 12px; border-radius: 12px; }
  .kpi .v { font-size: 22px; line-height: 1.2; }
  .kpi .l { font-size: 12px; line-height: 1.3; }
  .kpi:first-child { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; }
  /* Listes : texte sur plusieurs lignes, l'ancienneté en petit en haut à droite */
  .card-h { padding: 12px 14px; flex-wrap: wrap; }
  .card-h > .muted { display: none; }
  .list-row { padding: 10px 14px; align-items: flex-start; position: relative; }
  .list-row .s { white-space: normal; overflow: visible; }
  .list-row.todo { padding-right: 14px; }
  .list-row.todo > .muted { position: absolute; top: 10px; right: 12px; font-size: 11px !important; }
  .list-row.todo .t { padding-right: 58px; }
  .list-row .pill { margin-top: 1px; }
  .grid.g2 { grid-template-columns: 1fr; }
  /* Fiche */
  .fhead { padding: 16px; }
  .fh-actions { width: 100%; }
  .fh-actions .pill-select { flex: 1; }
  .fh-facts { gap: 6px 18px; margin: 12px 0; }
  .fh-contact .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #openmsg { width: 100%; justify-content: center; }
  .fh-contact > span[style*="flex:1"] { display: none; }
  .table-wrap { overflow-x: auto; }
  .cal-bar { gap: 8px; }
  .cal-bar .check { font-size: 13px; }
  .legend { display: none; }
}
@media (max-width: 760px) {
  .fh-actions .pill-select { flex: 1 1 100%; }
  .fh-actions .btn { flex: 1; justify-content: center; }
  .cal-title { font-size: 22px !important; }
  .cal-venue { display: none; }
  .cal-wd.empty:not(.today) { display: none; }
  .cal-head .row-flex { width: 100%; }
}

/* ---------- formulaire réservation ---------- */
.rf-sec { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 4px 0 8px; }
.rf .form-grid + .rf-sec { margin-top: 18px; }
.rf-opt { display: contents; }
.rf-opt.hidden { display: none !important; }
.rel-seg label, .rel-seg button { cursor: pointer; padding: 5px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 13px; border: 0; background: none; }
.rel-seg input { display: none; }
.rel-seg .on { background: var(--accent); color: var(--bg); }
.field .rel-seg { align-self: flex-start; }
.subtle-back { color: var(--muted); }

/* Notifications */
.nbell { position: relative; padding: 5px 10px; text-decoration: none; }
.nbell.on { border-color: var(--gold); }
.nbell .nb { position: absolute; top: -6px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #d64545; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.nlist .mx-day { padding: 10px 16px 4px; font-size: 12px; color: var(--muted); text-transform: capitalize; }
.nrow { align-items: flex-start; gap: 12px; text-decoration: none; color: inherit; }
.nrow .nic { font-size: 18px; width: 24px; text-align: center; line-height: 1.3; }
.nrow .nago { font-size: 12px; white-space: nowrap; }
.nrow.unread { background: rgba(184, 146, 90, .12); box-shadow: inset 3px 0 0 var(--gold); }
.nrow.unread .t { font-weight: 700; }
#popups { position: fixed; right: 18px; bottom: 18px; z-index: 300; display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100vw - 32px)); }
.popup { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 12px; background: #1b1712; color: #f3e3c6; border: 1px solid rgba(184, 146, 90, .5); box-shadow: 0 10px 30px rgba(0,0,0,.35); text-decoration: none; font-size: 13px; animation: popin .25s ease-out; transition: opacity .5s, transform .5s; }
.popup span { color: #cdbfa6; }
.popup.out { opacity: 0; transform: translateY(8px); }
@keyframes popin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Titres : pas de ligature « fi » ni de lettres fantaisie (Fraunces) */
h1, h2, h3, h4, .brand, .side .brand { font-variant-ligatures: no-common-ligatures; font-feature-settings: "liga" 0, "dlig" 0; font-variation-settings: "WONK" 0, "SOFT" 0, "opsz" 24; }

/* E-mails reçus / envoyés */
.em-wrap { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.em-list { overflow: hidden; }
.em-top { padding: 16px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.em-top h1 { font-family: var(--serif); font-weight: 500; font-size: 24px; margin: 0; }
.em-top input { width: 100%; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: inherit; font: inherit; }
.em-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-f { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--muted); }
.chip-f.on { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.chip-f b { font-weight: 700; }
#emitems { max-height: calc(100vh - 250px); overflow: auto; }
.em-row { display: grid; gap: 3px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 11px 16px; cursor: pointer; color: inherit; font: inherit; }
.em-row:hover { background: var(--panel-2); }
.em-row.on { background: rgba(184, 146, 90, .14); box-shadow: inset 3px 0 0 var(--gold); }
.em-r1 { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.em-addr { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.em-at { font-size: 12px; white-space: nowrap; }
.em-subj { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.em-r3 { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.tag.ok { color: #2f7a4a; border-color: rgba(47,122,74,.35); } .tag.warn { color: #a06a12; border-color: rgba(160,106,18,.35); } .tag.bad { color: #b4442f; border-color: rgba(180,68,47,.35); }
.em-pane { position: sticky; top: 12px; max-height: calc(100vh - 110px); overflow: auto; }
.em-ph { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.em-ph h2 { font-size: 17px; margin: 0; line-height: 1.3; }
.em-meta { font-size: 12px; margin-top: 4px; overflow-wrap: anywhere; }
.em-res { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); text-decoration: none; color: inherit; font-size: 13px; }
.em-res .em-open { margin-left: auto; color: var(--gold); font-weight: 600; }
.em-body { padding: 14px 18px 18px; }
.em-text { white-space: pre-wrap; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
#emframe { width: 100%; min-height: 400px; border: 0; border-radius: 8px; background: #f6f1ea; }
@media (max-width: 900px) {
  .em-wrap { grid-template-columns: minmax(0, 1fr); }
  .em-pane { display: none; position: static; max-height: none; }
  body.em-open-m .em-pane { display: block; position: fixed; inset: 0; z-index: 60; border-radius: 0; overflow: auto; padding-bottom: env(safe-area-inset-bottom, 0px); }
  #emitems { max-height: none; }
}

/* Menu latéral : icônes au même gabarit, libellés alignés */
.side a { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
.side a .ico { width: 18px; height: 18px; justify-self: center; opacity: .85; }
.side a.on .ico { opacity: 1; color: var(--gold); }
.side a .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side a .count { margin-left: 0; }
.side a.side-new { margin-top: 10px; background: rgba(184,146,90,.25); color: #f3e3c6; }
.side-mini a { font-size: 13px; padding-block: 7px; }
.side a.side-new .lbl { white-space: normal; overflow: visible; line-height: 1.25; }

/* Sélection rapide sous la zone de réponse */
.composer .quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.composer .qk { font: inherit; font-size: 12.5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel, #fff); color: var(--ink); cursor: pointer; line-height: 1.2; }
.composer .qk:hover { border-color: var(--gold, #a9834f); }
.composer .qk.ai { background: var(--ink); color: var(--bg, #fff); border-color: var(--ink); font-weight: 600; }
.composer .qk:disabled { opacity: .55; cursor: progress; }

.po-g { font-size: 12px; font-weight: 600; color: var(--muted); margin: 10px 0 2px; text-transform: uppercase; letter-spacing: .03em; }
.po-g:first-child { margin-top: 0; }
.po-l { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 14px; }
.po-t { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }

/* Fiche : infos du dossier à gauche, caution à droite ; Notes / Précommande / Relance alignées dessous. */
.ftop { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: stretch; margin-bottom: 16px; }
.ftop .fhead { margin-bottom: 0; }
.ftop .fdep { margin: 0; }
.fh-contact #openmsg { margin-left: 4px; }
@media (min-width: 761px) { .fgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .fiche-wrap.with-drawer .fgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .ftop { grid-template-columns: 1fr; } }
@media (min-width: 1280px) { .fiche-wrap.with-drawer .ftop { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (min-width: 1280px) and (max-width: 1450px) { .fiche-wrap.with-drawer .ftop { grid-template-columns: 1fr; } }
/* Ligne contact : tout sur une ligne (le bouton Messages reste à côté de « Reçue il y a… ») ; cartes du bas de même hauteur. */
@media (min-width: 900px) {
  .fh-contact { flex-wrap: wrap; }
  .fh-contact .chip { white-space: nowrap; flex-shrink: 0; }
  .fh-contact .fh-meta { flex-wrap: nowrap; white-space: nowrap; flex-shrink: 0; }
  .fh-contact #openmsg { flex-shrink: 0; white-space: nowrap; }
  .fgrid { align-items: stretch; }
}

.call-row .nic { width: 34px; text-align: center; font-size: 13px; color: var(--muted); }
.call-row .nic.bad { color: var(--red); }
.call-row .main-txt .s + .s { margin-top: 2px; }
.call-sum { color: var(--ink); opacity: .8; font-style: italic; }
.call-row { align-items: center; gap: 12px; }
.call-row .cdir { width: 22px; text-align: center; color: var(--muted); font-size: 15px; flex-shrink: 0; }
.call-row .cdir.bad { color: var(--red); }
.cline { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.cwho { min-width: 0; }
.cres { white-space: nowrap; font-size: 13px; }
.call-row .call-sum { margin-top: 2px; }

/* Panneau Allo intégré : grand panneau par-dessus l'outil (Allo a besoin de largeur) ; masqué, il reste actif (l'appel continue) */
#allo-panel { position: fixed; top: 12px; right: 12px; bottom: 12px; width: min(1100px, calc(100vw - 120px)); background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 18px 60px rgba(0,0,0,.25); z-index: 80; display: flex; flex-direction: column; overflow: hidden;
  visibility: hidden; opacity: 0; transform: translateX(24px); transition: opacity .15s, transform .15s, visibility 0s .15s; }
.allo-open #allo-panel { visibility: visible; opacity: 1; transform: none; transition: opacity .15s, transform .15s; }
#allo-panel .ap-h { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #faf8f5; }
#allo-panel iframe { flex: 1; width: 100%; border: 0; background: #fff; }
#allo-bg { position: fixed; inset: 0; background: rgba(12,10,9,.25); z-index: 79; display: none; }
.allo-open #allo-bg { display: block; }
.allo-tg.on { background: var(--ink); color: #fff; }
.fh-contact .call-btn { font-weight: 600; }
.copy-num { cursor: copy; }

/* Appel en cours : carte flottante en bas à droite */
#live-calls { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 10px; width: 380px; max-width: calc(100vw - 36px); }
#live-calls .lc { background: #fff; border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.22); padding: 12px 14px; border-left: 5px solid var(--green); font-size: 14px; }
#live-calls .lc.ring { border-left-color: var(--red); animation: lcpulse 1.2s ease-in-out infinite; }
@keyframes lcpulse { 50% { box-shadow: 0 14px 40px rgba(220,38,38,.35); } }
#live-calls .lc.min .lc-d, #live-calls .lc.min .lc-m, #live-calls .lc.min .lc-a { display: none; }
#live-calls .lc-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
#live-calls .lc.ring .lc-h { color: var(--red); }
#live-calls .lc-t { font-variant-numeric: tabular-nums; color: var(--green); }
#live-calls .lc-x { margin-left: auto; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 14px; }
#live-calls .lc-n { font-size: 17px; font-weight: 700; margin: 4px 0 2px; }
#live-calls .lc-d { margin: 2px 0; } #live-calls .lc-m { color: var(--muted); font-style: italic; margin: 4px 0; }
#live-calls .lc-a { margin-top: 8px; display: flex; gap: 6px; }
#live-calls .lc.end { border-left-color: var(--muted); }
#live-calls .lc.miss { border-left-color: var(--amber); }
#live-calls .lc.miss .lc-h { color: var(--amber); }

/* Carte d'appel : en haut à droite, juste sous la fenêtre d'appel d'Allo ; réductible en bandeau */
#live-calls { top: 290px; bottom: auto; right: 10px; width: 340px; }
#live-calls .lc-min { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 15px; margin-left: auto; padding: 0 4px; }
#live-calls .lc-min + .lc-x { margin-left: 0; }
#live-calls .lc-open { font-size: 13px; font-weight: 600; margin-left: 6px; color: var(--ink); }
#live-calls .lc.min { padding: 8px 12px; }
#live-calls .lc.min .lc-n { font-size: 14px; margin: 2px 0 0; }
#live-calls .lc.min .lc-d, #live-calls .lc.min .lc-m, #live-calls .lc.min .lc-a { display: none; }
@media (max-height: 700px) { #live-calls { top: auto; bottom: 18px; } }
/* Même largeur que la fenêtre d'appel d'Allo, juste en dessous */
#live-calls { width: 279px; right: 9px; top: 286px; }
#live-calls .lc { padding: 10px 12px; font-size: 13px; }
#live-calls .lc-h { font-size: 11px; }
#live-calls .lc-n { font-size: 16px; }
#live-calls .lc-d { line-height: 1.5; }
#live-calls .lc-d .pill, #live-calls .lc-d .tag { font-size: 11px; }
#live-calls .lc-a .btn { width: 100%; justify-content: center; }

/* Calendrier : affichage des précommandes */
.cev-po { font-size: 12px; line-height: 1.4; margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line); }
.cev-po .po-sum { font-weight: 700; white-space: nowrap; }
.po-day { background: #fff7e8; border: 1px solid #f1dcb2; border-radius: 8px; padding: 6px 8px; margin: 6px 0; font-size: 12px; }
.po-day div { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 3px; }
.po-mini { font-size: 11px; font-weight: 700; color: #8a5a12; margin: 2px 0; }
.btn.po-on { background: var(--ink); color: #fff; }

/* Calendrier : onglets Calendrier / Plan de salle */
.cal-tabs { margin-bottom: 12px; }
.cal-tabs a { font-weight: 600; padding: 6px 16px; }

/* Plan de salle */
.fp-help { font-size: 12px; }
#fpd { padding: 6px 10px; }
.fp-canvas { position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 780px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.fp-canvas.fp-pig { aspect-ratio: 16 / 11; }
.fp-wall { position: absolute; left: var(--l); top: var(--t); width: var(--w); height: var(--h); border: 5px solid var(--line); border-radius: 4px; pointer-events: none; }
.fp-wall.inner { border-top: 0; border-right: 0; }
.fp-wall.vipz { border-radius: 36px 36px 6px 6px; border-color: var(--gold-soft); border-width: 4px; }
.fp-sep { position: absolute; left: 4%; width: 92%; top: var(--t); height: 3px; background: var(--line); }
.fp-lvl { position: absolute; left: var(--l); top: var(--t); font-size: 10px; font-weight: 700; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.fp-room { position: absolute; left: var(--l); top: var(--t); width: var(--w); height: var(--h); display: flex; flex-direction: column; gap: 4px; min-height: 0;
  background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 7px 8px; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.fp-room.busy { border-color: var(--gold); }
.fp-room.split { border-color: #d9a2a2; }
.fp-rh { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 13px; }
.fp-rh .muted { font-size: 11px; white-space: nowrap; }
.fp-list, .fp-zone { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; }
.fp-split { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fp-zone + .fp-zone { border-left: 1px dashed var(--line); padding-left: 8px; }
.fp-zh { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.fp-free { font-size: 11px; color: var(--muted); }
:where(.fp-b) { all: unset; }
.fp-b { box-sizing: border-box; display: block; cursor: grab; padding: 5px 7px; border-radius: 8px; border-left: 4px solid currentColor; font-size: 11.5px; line-height: 1.35; }
.fp-b:hover { filter: brightness(.96); } .fp-b:focus-visible { outline: 2px solid var(--gold); }
.fp-b.drag { opacity: .4; }
.fp-n { font-weight: 700; color: var(--ink); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-s { color: var(--ink); opacity: .85; }
.fp-note { color: var(--ink); font-style: italic; margin-top: 2px; }
.fp-po { color: var(--ink); margin-top: 2px; padding-top: 2px; border-top: 1px dashed currentColor; }
.fp-dragging [data-drop] { outline: 2px dashed var(--line); outline-offset: -4px; }
[data-drop].over { outline: 2px dashed var(--gold) !important; box-shadow: 0 0 0 4px var(--gold-soft); }
.fp-unplaced { background: var(--panel); border: 2px dashed var(--gold); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.fp-ulist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 6px; }
.fp-raw { font-size: 11px; color: var(--muted); margin: 2px 0 0 6px; }
.modal.wide { width: min(760px, 100%); }
.fp-info { display: flex; flex-direction: column; gap: 3px; }
.fp-hint { font-size: 12px; }
.fp-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.fp-box summary { cursor: pointer; }
.fp-pl { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.fp-pl:last-child { border-top: 1px solid var(--line); padding-top: 4px; }
.fp-cg { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 8px; }
.fp-cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 14px; }
.fp-cat label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.fp-cat input { width: 64px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); text-align: right; }
.fp-msg { width: 100%; box-sizing: border-box; font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); color: var(--ink); resize: vertical; }
@media (max-width: 900px) {
  .fp-canvas, .fp-canvas.fp-pig { aspect-ratio: auto; min-height: 0; display: grid; grid-template-columns: 1fr; gap: 10px; background: none; border: 0; overflow: visible; }
  .fp-wall, .fp-sep, .fp-lvl { display: none; }
  .fp-room { position: static; width: auto; height: auto; min-height: 90px; }
  .fp-list, .fp-zone { overflow: visible; }
  .fp-help { display: none; }
}

/* Calendrier : flèches avec l'unité + sélecteur de date */
.cal-arrow span { font-size: 12px; color: var(--muted); }
.dp { position: absolute; z-index: 60; width: 300px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px -15px rgba(0,0,0,.35); padding: 10px; }
.dp-h { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.dp-h select { flex: 1; min-width: 0; padding: 5px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--ink); font-weight: 600; }
.dp-h select[data-y] { flex: 0 0 76px; }
.dp-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dp-g span { font-size: 11px; color: var(--muted); padding: 2px 0 4px; }
.dp-g button { border: 0; background: none; border-radius: 8px; padding: 7px 0; cursor: pointer; color: var(--ink); font-size: 13px; }
.dp-g button:hover { background: var(--panel-2); }
.dp-g button.out { color: var(--muted); opacity: .55; }
.dp-g button.today { box-shadow: inset 0 0 0 1.5px var(--gold); font-weight: 700; }
.dp-g button.sel { background: var(--accent); color: var(--bg); font-weight: 700; }
.dp-f { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

/* Étiquette « Pré-confirmée » sur sa propre ligne (ne chevauche plus l'établissement / l'espace) */
.cev-tag { position: static; display: block; margin-top: 2px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Calendrier : nom de l'établissement en couleur (bleu = Saint-Germain, rouge = Pigalle) */
.cev-sub .v-sg, .legend .v-sg { color: #3b6fd8; }
.cev-sub .v-pig, .legend .v-pig { color: #d63a3a; }
.legend .lg-v { font-weight: 700; font-size: 12px; margin-left: 6px; }

.fp-b { -webkit-user-drag: element; user-select: none; -webkit-user-select: none; }
.fp-raw select { font-size: 12px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); margin-top: 3px; }

/* Plan de salle : case ronde « Privatisation complète » en haut à gauche */
.fp-room.round { height: auto; aspect-ratio: 1; border-radius: 50%; border: 4px solid #000; box-shadow: 0 0 0 1px #000;
  justify-content: center; align-items: center; text-align: center; padding: 2.4% 2.1%; z-index: 2; contain: size; box-sizing: border-box; gap: 3px; }
.fp-room.round.busy { border-color: #000; background: var(--panel); }
.fp-room.round .fp-rh { flex-direction: column; align-items: center; gap: 0; }
.fp-room.round .fp-list { flex: 0 0 auto; width: 100%; overflow: visible; }
.fp-room.round .fp-b { text-align: left; width: 100%; }
@media (max-width: 900px) { .fp-room.round { aspect-ratio: auto; border-radius: 22px; padding: 10px; } }
/* Contenu du rond resserré pour rester à l'intérieur du cercle */
.fp-room.round .fp-rh b { font-size: 12px; line-height: 1.25; }
.fp-room.round .fp-rh .muted { display: none; }
.fp-room.round .fp-b { padding: 4px 6px; font-size: 11px; }
.fp-room.round .fp-n { white-space: normal; font-size: 11.5px; line-height: 1.2; }
.fp-room.round .fp-free { text-align: center; }

/* Devis & factures */
.bill-tabs { margin-bottom: 12px; }
.bill-tabs a { font-weight: 600; padding: 6px 16px; }
.pill.bst-draft { background: var(--grey-soft); color: var(--muted); }
.pill.bst-saved { background: var(--blue-soft); color: var(--blue); }
.pill.bst-sent { background: var(--gold-soft); color: var(--gold); }
.pill.bst-ok { background: var(--green-soft); color: var(--green); }
.pill.bst-off { background: var(--grey-soft); color: var(--muted); text-decoration: line-through; }
.pill.bst-late { background: #fde4e1; color: #c0392b; }
.bill-g { margin-bottom: 14px; }
.bill-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 150px 170px; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.bill-row:hover { background: var(--panel-2); }
.bill-row > span { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.bill-row .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bill-t { align-items: flex-end; gap: 3px; }
.bill-d { font-size: 12px; }
.bill-head h1 { margin-top: 8px; }
.bill-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 14px; position: sticky; top: 64px; z-index: 4; background: var(--bg); padding: 8px 0; }
.bill-stsel { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.bill-stsel select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); }
.bill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.bill-wide { grid-column: 1 / -1; }
.bill-texts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bl-row { display: grid; grid-template-columns: minmax(220px, 1fr) 70px 100px 100px 90px 80px 110px 34px; gap: 8px; align-items: start; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.bl-row label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); font-weight: 600; }
.bl-row input, .bl-row select, .bl-row textarea { padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); width: 100%; box-sizing: border-box; font-size: 13px; }
.bl-main { display: flex; flex-direction: column; gap: 5px; }
.bl-des { font-weight: 600; }
.bl-tot { display: flex; flex-direction: column; align-items: flex-end; font-size: 11px; gap: 6px; padding-top: 2px; }
.bl-tot b { font-size: 14px; }
.bl-del { margin-top: 18px; }
.bill-totals { margin: 14px 0 0 auto; width: min(340px, 100%); display: flex; flex-direction: column; gap: 4px; }
.bt-l { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.bt-ttc { border-top: 2px solid var(--ink); padding-top: 6px; margin-top: 4px; font-weight: 700; font-size: 16px; }
.bill-note { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); }
.fgrid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.cat-row { cursor: pointer; }
.v-sg { color: #3b6fd8; } .v-pig { color: #d63a3a; }
@media (max-width: 1100px) { .bill-grid, .bill-texts, .fgrid2 { grid-template-columns: 1fr; } .bl-row { grid-template-columns: 1fr 1fr 1fr; } .bl-main { grid-column: 1 / -1; } }
@media (max-width: 760px) { .bill-row { grid-template-columns: 1fr auto; } .bill-d { display: none; } .bill-n { grid-column: 1 / -1; flex-direction: row !important; gap: 8px; } }

/* Devis & factures : calendrier des devis */
.bc-grid .day { min-height: 120px; display: flex; flex-direction: column; gap: 5px; }
.bc-card { display: flex; flex-direction: column; gap: 1px; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 6px 8px; font-size: 11.5px; line-height: 1.3; }
.bc-card:hover { border-color: var(--gold); }
.bc-card.ok { background: var(--green-soft); border-color: var(--green); }
.bc-card.due { border: 2px solid #82b7de; }
.bc-n { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-s { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-t { font-weight: 700; font-size: 13px; margin-top: 2px; } .bc-t i { font-style: normal; font-weight: 400; font-size: 10px; color: var(--muted); }
.bc-due { align-self: flex-start; margin-top: 3px; background: #c4e2f6; color: #000; border-radius: 5px; padding: 1px 6px; font-size: 10px; font-weight: 700; }
.bc-lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin: 0 4px 0 10px; border: 1px solid var(--line); }
.bc-lg.ok { background: var(--green-soft); border-color: var(--green); } .bc-lg.due { border: 2px solid #82b7de; }
.bc-mob { display: none; }
.bc-day h3 { background: var(--ink); color: var(--bg); border-radius: 8px; padding: 6px 10px; font-size: 14px; margin: 12px 0 8px; text-transform: capitalize; }
.bc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.bc-undated { margin-top: 14px; padding: 12px; } .bc-undated summary { cursor: pointer; margin-bottom: 8px; }
@media (max-width: 1100px) { .bc-desk { display: none; } .bc-mob { display: block; } }

/* Devis & factures : onglets de catégories */
.bill-cats { display: flex; flex-wrap: wrap; border-radius: 14px; margin-bottom: 12px; }
.bill-cats button { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.bill-cats .bc-nb { font-size: 11px; font-weight: 700; background: var(--panel); color: var(--muted); border-radius: 999px; padding: 0 7px; min-width: 18px; text-align: center; }
.bill-cats .on .bc-nb { background: var(--bg); color: var(--ink); }
.bill-cats .hot .bc-nb { background: #c4e2f6; color: #000; }

/* Devis & factures : améliorations */
.bill-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.bill-kpis .kpi { text-decoration: none; color: inherit; }
.bill-kpis .kpi .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.bill-kpis .kpi .v { font-size: 22px; font-weight: 700; margin: 2px 0; }
.bill-kpis .kpi .s { font-size: 12px; }
.bill-conv { display: flex; flex-direction: column; gap: 0; font-size: 15px !important; }
.bill-more { position: relative; display: inline-block; }
.bill-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 270px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.3); padding: 6px; display: flex; flex-direction: column; }
.bill-menu[hidden] { display: none; }
.bill-menu button { border: 0; background: none; text-align: left; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--ink); }
.bill-menu button:hover { background: var(--panel-2); }
.bill-menu button.danger { color: #c0392b; }
.bill-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bill-layout.with-prev { display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 16px; align-items: start; }
.bill-layout.with-prev .bill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bill-prev { position: sticky; top: 130px; }
.bill-prev-h { font-size: 12px; margin-bottom: 4px; }
.bill-prev iframe { width: 100%; height: calc(100vh - 170px); border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.bl-row { grid-template-columns: 18px minmax(200px, 1fr) 66px 96px 96px 86px 76px 104px 70px !important; }
.bl-grip { cursor: grab; color: var(--muted); font-weight: 700; padding-top: 8px; user-select: none; letter-spacing: -2px; }
.bl-row.drag { opacity: .4; } .bl-row.over { box-shadow: inset 0 3px 0 var(--gold); }
.bl-btns { display: flex; gap: 4px; margin-top: 18px; }
.bill-inline { display: flex; gap: 6px; } .bill-inline input { flex: 1; }
.field { position: relative; }
.bill-sug { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 30px -10px rgba(0,0,0,.3); padding: 4px; display: flex; flex-direction: column; }
.bill-sug button { border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 7px; cursor: pointer; display: flex; flex-direction: column; color: var(--ink); font-size: 13px; }
.bill-sug button:hover { background: var(--panel-2); }
.bill-sug .muted { font-size: 12px; font-weight: 400; }
.bill-pj { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.bill-up { margin-top: 8px; cursor: pointer; display: inline-flex; }
.bill-ver { display: block; padding: 3px 0; font-size: 13px; color: var(--ink); }
.bill-h2 { font-size: 18px; margin: 20px 0 10px; }
.bk-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; max-height: 50vh; overflow: auto; }
.bk-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.modal textarea[name=txt] { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.cev-bill { cursor: pointer; } .cev-bill:hover { filter: drop-shadow(0 0 2px var(--gold)); }
@media (max-width: 1250px) { .bill-layout.with-prev { display: block; } .bill-prev { display: none; } }
@media (max-width: 1100px) { .bill-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bl-row { grid-template-columns: 18px 1fr 1fr 1fr !important; } .bl-main { grid-column: 2 / -1; } }

/* Devis & factures : sélection multiple */
.bill-row { grid-template-columns: 26px 150px minmax(0, 1fr) 150px 170px !important; }
.bill-sel { display: flex !important; align-items: center; justify-content: center; align-self: stretch; cursor: pointer; }
.bill-sel input { width: 17px; height: 17px; cursor: pointer; pointer-events: none; }
.bill-row.picked { background: var(--gold-soft); }
.bill-cx { margin: 0 0 8px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; }
@media (max-width: 760px) { .bill-row { grid-template-columns: 26px 1fr auto !important; } .bill-n { grid-column: 2 / -1; } }

/* Devis & factures : pages Export et Rapprochement */
.bill-narrow { max-width: 760px; }
.bk-txt { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.bill-tabs { flex-wrap: wrap; }

/* Devis & factures : auteur et historique */
.bill-who { font-size: 11.5px; }
.bill-hist { max-height: 420px; overflow: auto; }

.bill-all { margin: 0 0 10px 16px; font-weight: 600; }
.bill-all input { width: 17px; height: 17px; }

/* Devis & factures : auteur + date de modification sur deux lignes, sans coupure */
.bill-row { grid-template-columns: 26px 150px minmax(0, 1fr) 190px 170px !important; }
.bill-d .bill-who, .bill-d .bill-when { display: block; white-space: normal; overflow: visible; text-overflow: clip; }
.bill-when { font-size: 11.5px; }
@media (max-width: 760px) { .bill-row { grid-template-columns: 26px 1fr auto !important; } }

/* auteur + date sur une seule ligne */
.bill-row { grid-template-columns: 26px 150px minmax(0, 1fr) 215px 170px !important; }
.bill-d .bill-who { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .bill-row { grid-template-columns: 26px 1fr auto !important; } }

/* Calendrier mois : personnes attendues à côté du numéro du jour */
.cal .day .n { display: flex; align-items: baseline; gap: 6px; }
.cal .day .n-p { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* Carte d'appel : retour à sa position d'origine, en bas à droite */
#live-calls { top: auto !important; bottom: 18px !important; right: 18px !important; width: 380px !important; max-width: calc(100vw - 36px); }
#live-calls .lc { padding: 12px 14px; font-size: 14px; }
#live-calls .lc-n { font-size: 17px; }
#live-calls .lc-a .btn { width: auto; }

/* Doublons de clients */
.dup-list { display: flex; flex-direction: column; gap: 12px; max-height: 60vh; overflow: auto; }
.dup-g { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.dup-why { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.dup-c { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; cursor: pointer; }

/* Invitation */
.inv-link { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; margin-top: 8px; }

/* Statistiques : devis signés */
.st-money td, .st-money th { padding: 6px 8px; font-size: 13.5px; }

/* Recherche globale : titres de groupes */
.qr-h { padding: 8px 14px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--bg, #faf8f5); }

/* ===== Mobile (téléphone) : en-tête compact, plan de salle et vue jour lisibles debout au bar ===== */
@media (max-width: 760px) {
  .top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .top .search { flex: 1 1 calc(100% - 60px); min-width: 0; order: 1; }
  .top #menu { order: 0; }
  .top .bell, .top .allo-tg, .top .nbell { order: 2; flex: 0 0 auto !important; width: auto !important; }
  .top .venue-switch { order: 3; flex: 1 1 100%; }
  .top .venue-switch button { padding: 6px 8px; font-size: 13px; }
  .cal-title, .page-head h1 { font-size: 22px; line-height: 1.2; }
  .fp-room.round { contain: none !important; aspect-ratio: auto !important; height: auto !important; min-height: 0 !important; border-radius: 16px !important; padding: 10px 12px !important; }
  .fp-room.round:not(.busy) .fp-list { display: none; }
  .fp-b { padding: 10px 12px; }
  .fp-b .fp-n { font-size: 15px; }
  .cal-bar { gap: 8px; }
  .cal-head .row-flex .btn { padding: 8px 12px; }
  .modal { max-height: 92vh; overflow: auto; }
}

/* Statut avec emoji et urgence sur les lignes */
.st-emo { font-size: 11.5px; padding: 1px 7px; vertical-align: 1px; }
.pill.urg { font-size: 11.5px; padding: 1px 7px; background: #fdecea; color: #b3261e; border: 1px solid #f5c2bd; font-weight: 700; vertical-align: 1px; }
.mx-row .t .pill { margin-left: 2px; }
.st-emo::before, .pill.urg::before { display: none !important; }

/* À traiter : point bleu = pas encore ouvert */
.list-row.todo .dotw { width: 8px; flex: none; align-self: flex-start; padding-top: 7px; margin-right: -4px; }
.list-row.todo.fresh .nm { font-weight: 800; }
.list-row.todo:not(.fresh) .nm { font-weight: 600; }

/* Fiche : modifications non enregistrées */
#ef button.primary.dirty { background: #ff2d4b; border-color: #ff2d4b; color: #fff; }
