:root {
  --bg: #f4f6fa; --panel: #fff; --ink: #1b2430; --muted: #6b7684; --line: #e2e6ec;
  --brand: #2b211c; --brand-2: #3d2f27; --accent: #b5452b; --accent-ink: #fff;
  --ok: #1f9d55; --warn: #d98c0b; --err: #d23f3f; --ok-bg: #e6f6ec; --warn-bg: #fff4e0; --err-bg: #fde8e8;
  --radius: 10px; --sidebar: 240px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 .6rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }

/* --- layout --- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--brand); color: #cfd8e6; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; background: var(--brand-2); }
.brand a { color: #fff; font-weight: 700; font-size: 1.1rem; }
.burger { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; }
.nav { list-style: none; margin: 0; padding: 8px 0; flex: 1; overflow-y: auto; }
.nav li a { display: flex; gap: 10px; align-items: center; padding: 10px 18px; color: #cfd8e6; }
.nav li a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.nav li.active a { background: var(--accent); color: #fff; }
.nav .ico { width: 1.2em; text-align: center; opacity: .8; }
.sidebar-foot { padding: 12px 18px; border-top: 1px solid rgba(255,255,255,.1); font-size: .9rem; }
.site-switch label { display: block; font-size: .75rem; text-transform: uppercase; opacity: .7; }
.site-switch select { width: 100%; margin: 4px 0 8px; }
.user-line a { color: #fff; margin-left: 6px; }
.main { margin-left: var(--sidebar); padding: 24px 28px 60px; min-height: 100vh; }
.login-page .main { margin-left: 0; display: grid; place-items: center; }
.login-box { background: var(--panel); padding: 32px; border-radius: var(--radius); width: min(380px, 92vw); box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.login-box h1 { text-align: center; }

@media (max-width: 900px) {
  .sidebar { width: 100%; height: auto; position: sticky; top: 0; z-index: 10; inset: auto; }
  .burger { display: block; }
  .nav, .sidebar-foot { display: none; }
  body.nav-open .nav, body.nav-open .sidebar-foot { display: block; }
  .main { margin-left: 0; padding: 16px; }
}

/* --- composants --- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.kpi .value { font-size: 1.6rem; font-weight: 700; margin-top: 4px; }
.kpi .sub { font-size: .85rem; color: var(--muted); }
.kpi.ok .value { color: var(--ok); } .kpi.warn .value { color: var(--warn); } .kpi.err .value { color: var(--err); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; font: inherit; }
.btn:hover { background: #f0f3f8; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #9a3a24; }
.btn.danger { color: var(--err); border-color: #f3c4c4; }
.btn.small { padding: 4px 10px; font-size: .85rem; }
.btn.big { padding: 14px 22px; font-size: 1.1rem; }

table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #fafbfd; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:hover td { background: #fafbfd; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.table-wrap table { border: 0; }
tfoot td { font-weight: 700; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #eef1f6; color: var(--muted); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.err { background: var(--err-bg); color: var(--err); }
.badge.info { background: #e7efff; color: var(--accent); }

.flashes { margin-bottom: 14px; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 6px; background: #e7efff; color: #1d4ed8; }
.flash-error { background: var(--err-bg); color: var(--err); }
.flash-success { background: var(--ok-bg); color: var(--ok); }
.flash-warning { background: var(--warn-bg); color: var(--warn); }

/* --- formulaires --- */
form.stack, .stack { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); }
label.inline { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #cfd6e0; border-radius: 8px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid #f0c4b8; border-color: var(--accent); }
input[type=checkbox] { width: 18px; height: 18px; }
input.short { width: 110px; } input.num { text-align: right; width: 110px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; margin-top: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 14px; }
.filters label { font-size: .8rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .right { text-align: right; }
.empty { padding: 32px; text-align: center; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: .82rem; background: #fff; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 8px 8px 0 0; color: var(--muted); }
.tabs a.active { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-bottom-color: var(--panel); margin-bottom: -1px; }
.inline-form { display: inline; }
.lines-editor td { padding: 4px 6px; }
.lines-editor input, .lines-editor select { padding: 6px 8px; }
.touch .btn { min-height: 48px; }
.touch input, .touch select { min-height: 48px; font-size: 1.05rem; }

/* --- impression --- */
@media print {
  .sidebar, .no-print, .flashes { display: none !important; }
  .main { margin: 0; padding: 0; }
  body { background: #fff; font-size: 12px; }
  .card { border: 0; padding: 0; box-shadow: none; }
  a { color: inherit; }
}
.print-page { max-width: 820px; margin: 0 auto; background: #fff; padding: 24px; }
.print-page h1 { font-size: 1.6rem; }
.label-sheet { display: grid; grid-template-columns: repeat(auto-fill, 62mm); gap: 4mm; }
.label-sheet .label { width: 62mm; height: 40mm; border: 1px dashed #999; padding: 3mm; font-size: 10px; break-inside: avoid; }
.label-sheet .label .name { font-weight: 700; font-size: 12px; }
.label-sheet .label .big { font-size: 14px; font-weight: 700; }


/* ================= Réservations ARVI ================= */
form.inline { display: inline; }
.btn.link { border: 0; background: none; color: #fff; padding: 0; margin-left: 6px; cursor: pointer; }
.search { min-width: 240px; }
.link-card { color: inherit; display: block; }
.link-card:hover { text-decoration: none; border-color: var(--accent); }
.small-value { font-size: 1.1rem !important; }
.warn-card { border-left: 5px solid var(--warn); }
.warn-card p { margin: 4px 0; }
pre.code { background: #2b211c; color: #f6e8dc; padding: 12px 14px; border-radius: 8px; white-space: pre-wrap; word-break: break-all; font-size: .85rem; }
code { background: #f3ece5; padding: 2px 6px; border-radius: 5px; }

/* tableau de bord : semaine */
.week-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.day-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; color: var(--ink); }
.day-card:hover { text-decoration: none; border-color: var(--accent); }
.day-card.closed { opacity: .55; }
.day-title { font-weight: 700; margin-bottom: 6px; text-transform: capitalize; }
.svc-line { display: flex; justify-content: space-between; font-size: .9rem; }
.bar { height: 5px; background: #eee5dc; border-radius: 3px; margin: 3px 0 6px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }

/* cahier */
.day-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.day-title-big { margin: 0 0 0 8px; font-size: 1.3rem; }
.svc-block { padding: 14px 16px; }
.svc-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.svc-head h2 { margin: 0; }
.svc-kpis { display: flex; gap: 16px; font-size: .92rem; }
.resa-list td.time { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.resa-list td.big-num { font-size: 1.2rem; font-weight: 700; }
.resa-list a.cust { font-weight: 600; color: var(--ink); }
.resa-list td.notes { max-width: 260px; }
.resa-list .status-actions { white-space: nowrap; }
.resa-list .status-actions form { margin-left: 2px; }
.resa-list tr.st-annulee td, .resa-list tr.st-no_show td { opacity: .5; }
.resa-list tr.st-annulee td.status-actions, .resa-list tr.st-no_show td.status-actions { opacity: 1; }
.resa-list tr.st-installee td:first-child { box-shadow: inset 4px 0 0 var(--ok); }
.resa-list tr.st-arrivee td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
.resa-list tr.st-terminee td { color: var(--muted); }
.dispo { margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: #f3ece5; }
.dispo:empty { display: none; }
.dispo.ok { background: var(--ok-bg); color: var(--ok); } .dispo.err { background: var(--err-bg); color: var(--err); }
.form-actions.wrap { flex-wrap: wrap; gap: 16px; }
label.force { color: var(--err); font-weight: 600; }
.table-picker { display: flex; flex-wrap: wrap; gap: 14px; }
.tp-zone-name { font-size: .78rem; color: var(--muted); text-transform: uppercase; margin-bottom: 4px; }
.tp-zone { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; align-content: flex-start; max-width: 100%; }
.tp-zone .tp-zone-name { width: 100%; }
.tp { flex-direction: row; }
.tp input { display: none; }
.tp span { display: inline-flex; flex-direction: column; align-items: center; min-width: 46px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-weight: 600; cursor: pointer; }
.tp span small { font-weight: 400; color: var(--muted); font-size: .7rem; }
.tp input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent); }
.tp input:checked + span small { color: #fde; }
.hist-line { padding: 4px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }

/* plan de salle (rendu fidèle à l'éditeur Zenchef) */
.room-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.room-tab { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 7px 14px; font: inherit; cursor: pointer; color: var(--ink); }
.room-tab:hover { text-decoration: none; border-color: var(--accent); }
.room-tab.on { background: #26304a; border-color: #26304a; color: #fff; }
.room-tab small { opacity: .75; }
.room-wrap { overflow: auto; border-radius: var(--radius); max-width: 100%; }
.room-wrap.hidden { display: none; }
.room-canvas { position: relative; background-color: #26304a; border-radius: 6px; margin-bottom: 18px;
  background-image: linear-gradient(rgba(255,255,255,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.13) 1px, transparent 1px);
  background-size: var(--u) var(--u); }
.decor { position: absolute; pointer-events: none; }
.decor-mur { background: #f2f3f6; border-radius: 2px; }
.decor-fenetre { background: repeating-linear-gradient(135deg, #f2f3f6 0 3px, transparent 3px 7px); border: 2px solid #f2f3f6; border-radius: 2px; }
.decor-porte { border-top: 3px dashed #f2f3f6; }
.decor-porte.vertical { border-top: 0; border-left: 3px dashed #f2f3f6; }
.decor-comptoir { background: #cfd2da; border-radius: 6px; }
.decor-plante { display: grid; place-items: center; color: #8fd3a8; font-size: 22px; }
.decor-escalier { border-left: 2px solid #cfd2da; border-right: 2px solid #cfd2da;
  background: repeating-linear-gradient(0deg, #cfd2da 0 2px, transparent 2px 9px); }
.ztable { position: absolute; color: #1b2430; text-align: center; user-select: none; touch-action: none; }
.ztable:hover { text-decoration: none; }
.ztable .tbody { position: absolute; inset: 0; background: #fff; border-radius: 7px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1.15; box-shadow: 0 1px 2px rgba(0,0,0,.25); z-index: 1; overflow: hidden; }
.ztable.shape-rond .tbody { border-radius: 50%; }
.ztable .chair { position: absolute; background: #c3c7d0; border-radius: 6px; }
.ztable .tname { font-weight: 800; font-size: .85rem; }
.ztable .tinfo { font-size: .66rem; color: #5b6475; white-space: nowrap; }
.ztable .tcust { font-size: .66rem; font-weight: 700; max-width: 95%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ztable:hover .tbody, .ztable.sel .tbody { outline: 3px solid var(--accent); }
.ztable.occupee .tbody { background: #f6b8a6; } .ztable.attendue .tbody { background: #ffd98a; }
.ztable.bientot .tbody { background: #c9d8f5; } .ztable.liberee .tbody { background: #9aa3b5; color: #fff; }
.ztable.occupee .tinfo, .ztable.attendue .tinfo, .ztable.bientot .tinfo { color: #1b2430; }
.room-canvas.editable .ztable { cursor: grab; }
.zone-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 6px; }
.plan-legend span::before { border: 1px solid rgba(0,0,0,.15); }
.repeat-days { display: flex; flex-wrap: wrap; gap: 10px; }
.repeat-days label { flex-direction: row; align-items: center; gap: 4px; color: var(--ink); }

@media print {
  .resa-list .status-actions { display: none; }
  .svc-block { break-inside: avoid; }
}
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--muted); margin: 8px 0 12px; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; background: var(--c); vertical-align: middle; }

/* ---- planning des services (inspiré de Zenchef) ---- */
.sched-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.week-nav { display: flex; align-items: center; gap: 6px; }
.week-label { font-weight: 700; margin: 0 6px; }
.sched { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 14px; overflow-x: auto; }
.sched-days, .sched-body { display: grid; grid-template-columns: 56px repeat(7, minmax(110px, 1fr)); min-width: 860px; }
.sched-dayhead { text-align: center; font-size: .82rem; color: var(--muted); padding: 4px 0 10px; }
.sched-dayhead b { display: block; font-size: 1.1rem; color: var(--ink); }
.sched-dayhead.today b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #26304a; color: #fff; margin-top: 2px; }
.sched-body { position: relative; }
.sched-gutter { position: relative; }
.sched-hour { position: absolute; right: 8px; transform: translateY(-50%); font: 600 .72rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.sched-col { position: relative; border-left: 1px solid var(--line); }
.sched-col.today { background: #fbf7f3; }
.sched-line { position: absolute; left: 0; right: 0; border-top: 1px solid #eef0f3; }
.sched-block { position: absolute; left: 4px; right: 4px; background: var(--c); border: 1px solid rgba(0,0,0,.08); border-radius: 8px; padding: 6px 8px;
  text-align: left; font: inherit; cursor: pointer; overflow: hidden; display: flex; flex-direction: column; gap: 1px; color: #2b2b2b; }
.sched-block:hover { box-shadow: 0 0 0 2px #26304a inset; }
.sched-block b { font-size: .86rem; } .sched-block small { font-size: .72rem; opacity: .8; }
.sched-block.variant { background: repeating-linear-gradient(135deg, var(--c) 0 8px, #fff8 8px 12px); border-style: dashed; }
.sched-block.offline { opacity: .6; }
.sched-closed { position: absolute; inset: 0; background: repeating-linear-gradient(45deg, #f6f6f6 0 8px, #ececec 8px 16px); display: grid; place-content: center;
  text-align: center; color: var(--muted); font-weight: 700; font-size: .85rem; z-index: 1; }
.sched-closed small { display: block; font-weight: 400; }
.pop { position: absolute; z-index: 50; width: 300px; background: #fff; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 10px 14px 14px; }
.pop-actions { display: flex; justify-content: flex-end; gap: 4px; }
.pop-title { margin: 6px 0 10px; padding: 6px 10px; border-radius: 6px; font-weight: 700; }
.pop-list { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.pop-list li { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; }
.pop-list li span { width: 26px; height: 26px; flex: none; display: grid; place-items: center; background: #f1f2f5; border-radius: 6px; font-size: .8rem; }
.icon-btn { border: 0; background: none; font-size: 1.05rem; cursor: pointer; padding: 6px 8px; border-radius: 6px; color: var(--ink); }
.icon-btn:hover { background: #f1f2f5; }
dialog.dlg-small { width: min(520px, 94vw); }
label.radio { flex-direction: row; gap: 10px; align-items: flex-start; color: var(--ink); font-size: .95rem; }
label.radio input { margin-top: 4px; }
.period-fields { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: .85rem; }
dialog.dlg-editor { width: min(760px, 96vw); max-height: 92vh; padding: 0; }
dialog.dlg-editor form { display: flex; flex-direction: column; max-height: 92vh; }
.ed-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 1.15rem; }
.ed-scope { font-size: .78rem; font-weight: 600; background: #eef2fb; color: #3654a8; border-radius: 999px; padding: 3px 10px; }
.ed-scope:empty { display: none; }
.ed-head .icon-btn { margin-left: auto; }
.ed-main { display: flex; flex: 1; min-height: 0; }
.ed-nav { display: flex; flex-direction: column; gap: 6px; padding: 14px 8px; border-right: 1px solid var(--line); }
.ed-nav button { border: 0; background: none; border-radius: 8px; padding: 8px 6px; cursor: pointer; font-size: 1.1rem; display: flex; flex-direction: column; align-items: center; color: var(--muted); width: 70px; }
.ed-nav button span { font-size: .66rem; margin-top: 2px; }
.ed-nav button.on { background: #eef2fb; color: #3654a8; }
.ed-body { flex: 1; overflow-y: auto; padding: 16px 22px 24px; }
.ed-sec-title { background: #eef2fb; color: #3654a8; padding: 10px 14px; border-radius: 8px; margin: 0 0 14px; font-size: 1rem; }
.ed-sec h4 { margin: 18px 0 6px; font-size: .95rem; }
.ed-field { margin-bottom: 16px; display: flex; flex-direction: column; gap: 4px; }
.ed-field > small, small.block { display: block; color: var(--muted); margin: 0 0 8px 0; line-height: 1.45; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.day-toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.day-toggles input { display: none; }
.day-toggles span { display: inline-block; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--ink); background: #fff; }
.day-toggles input:checked + span { background: #eef2fb; border-color: #8da2e0; color: #3654a8; }
label.pre, label.post { flex-direction: row; align-items: center; gap: 8px; border: 1px solid #cfd6e0; border-radius: 8px; padding: 0 10px; color: var(--muted); font-size: .78rem; font-weight: 700; background: #fff; }
label.pre input, label.post input { border: 0; outline: 0; flex: 1; min-width: 50px; padding: 9px 0; }
.turn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; margin-bottom: 6px; }
.turn-row span { background: #f4f5f7; padding: 9px 12px; border-radius: 8px; font: .85rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.seg { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; width: fit-content; }
.seg input { display: none; }
.seg span { display: inline-block; padding: 8px 14px; cursor: pointer; color: var(--ink); background: #fff; border-right: 1px solid var(--line); }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: #eef2fb; color: #3654a8; font-weight: 700; }
label.switch { flex-direction: row; align-items: center; gap: 10px; color: var(--ink); font-size: .95rem; margin: 8px 0 2px; cursor: pointer; }
label.switch input { display: none; }
label.switch > span { width: 40px; height: 22px; border-radius: 999px; background: #cfd6e0; position: relative; flex: none; transition: background .15s; }
label.switch > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
label.switch input:checked + span { background: #3654a8; }
label.switch input:checked + span::after { left: 21px; }
input.tiny { width: 56px; padding: 4px 6px; display: inline-block; }
.slot-row { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: #fff; }
.slot-line { display: flex; align-items: center; gap: 10px; padding: 4px 10px; }
.slot-line label.switch { margin: 4px 0; }
.slot-sum { flex: 1; }
.slot-row.open .slot-more { transform: rotate(90deg); }
.slot-detail { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; padding: 6px 10px 12px; }
.ed-foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.ed-foot .spacer { flex: 1; }
dialog { border: 0; border-radius: 14px; padding: 0; box-shadow: 0 24px 70px rgba(0,0,0,.28); color: var(--ink); }
dialog::backdrop { background: rgba(20, 24, 36, .45); }
dialog .dlg-head { padding: 16px 20px 6px; font-weight: 700; font-size: 1.15rem; }
dialog .dlg-body { padding: 10px 20px 18px; }
dialog .form-actions { justify-content: flex-end; }
label.radio { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
label.radio:has(input:checked) { border-color: #8da2e0; background: #f5f7fd; }
.sched-dayhead.today b { display: grid; margin: 2px auto 0; }
[hidden] { display: none !important; }
.slot-detail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.slot-detail label { min-width: 0; }
.slot-detail input { min-width: 0; width: 100%; }
.slot-line .slot-time { width: 110px; font-weight: 700; padding: 6px 8px; }
.slot-row.off { background: #f6f7f9; }
.slot-row.off .slot-time { color: var(--muted); text-decoration: line-through; }
.slot-line label.switch { margin: 0; }

.essai-banner { background: #fff3cd; color: #7a5a00; border: 1px solid #f0d58a; border-radius: 8px; padding: 8px 12px; margin: 0 0 14px; font-size: .9rem; font-weight: 600; text-align: center; }

/* ---- écran de service (liste + plan) ---- */
.service-page .main { padding-bottom: 90px; }
.svc-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.svc-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.svc-tab { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); white-space: nowrap; }
.svc-tab:hover { text-decoration: none; border-color: var(--accent); }
.svc-tab.on { background: #26304a; color: #fff; border-color: #26304a; }
.svc-tab b { margin-left: 4px; } .svc-tab small { opacity: .75; }
.svc-layout { display: grid; grid-template-columns: minmax(340px, 430px) minmax(0, 1fr); gap: 16px; align-items: start; }
.svc-list { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 190px); overflow-y: auto; padding-right: 4px; }
.svc-list .search { width: 100%; }
.svc-sum { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding: 6px 2px 2px; border-bottom: 2px solid var(--line); }
.svc-sum-kpis { font-size: .85rem; color: var(--muted); }
.resa { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid #c9d1de; border-radius: 10px; padding: 8px 10px; }
.resa.st-confirmee { border-left-color: #8da2e0; } .resa.st-en_attente { border-left-color: var(--warn); background: #fffaf0; }
.resa.st-arrivee { border-left-color: var(--warn); } .resa.st-installee { border-left-color: var(--ok); }
.resa.st-terminee { opacity: .65; } .resa.st-annulee, .resa.st-no_show { opacity: .5; }
.resa-main { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.resa-time { font-weight: 800; font-size: 1.05rem; }
.resa-guests { font-weight: 800; font-size: 1.2rem; } .resa-guests small { font-size: .7rem; font-weight: 600; color: var(--muted); }
.resa-who { min-width: 0; } .resa-who .cust { font-weight: 700; color: var(--ink); }
.resa-who .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resa-table { border: 1px solid var(--line); background: #f4f6fa; border-radius: 8px; padding: 6px 8px; font: inherit; font-weight: 700; cursor: pointer; max-width: 130px; white-space: normal; text-align: center; color: var(--ink); }
.resa-table.empty { color: var(--accent); border-style: dashed; background: #fff; }
.resa-notes { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.note-warn { color: #b45309; font-weight: 600; }
.resa-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.btn.undo { color: var(--muted); }
.svc-plan { min-width: 0; position: sticky; top: 10px; }
.plan-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.plan-bar .room-tabs { margin: 0; }
.place-hint { background: #fff3cd; border: 1px solid #f0d58a; border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; font-weight: 600; }
.placing .ztable { cursor: pointer; }
.placing .ztable:not(.candidate) { opacity: .45; }
.ztable.candidate .tbody { outline: 2px dashed #3654a8; }
.ztable.picked .tbody, .ztable.hl .tbody { outline: 4px solid #3654a8 !important; }
.walkin-bar { position: fixed; left: var(--sidebar); right: 0; bottom: 0; z-index: 20; display: flex; gap: 8px; align-items: center; justify-content: center;
  padding: 10px 14px; background: #26304a; color: #fff; box-shadow: 0 -4px 16px rgba(0,0,0,.15); flex-wrap: wrap; }
.walkin-bar span { font-weight: 700; margin-right: 6px; }
.walkin { min-width: 46px; min-height: 42px; border-radius: 10px; border: 0; background: #fff; color: #26304a; font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; }
.walkin:hover { background: #dfe7f5; }
#tpop { width: 300px; }
@media (max-width: 1100px) {
  .svc-layout { grid-template-columns: 1fr; }
  .svc-list { max-height: none; overflow: visible; }
  .svc-plan { position: static; }
}
@media (max-width: 900px) {
  .walkin-bar { left: 0; }
  .resa-main { grid-template-columns: auto auto minmax(0, 1fr); }
  .resa-table { grid-column: 1 / -1; max-width: none; text-align: left; }
  .resa-actions .btn { min-height: 40px; }
  .day-title-big { font-size: 1.05rem; width: 100%; margin: 4px 0 0; }
}
@media print {
  .svc-layout { display: block; } .svc-plan, .walkin-bar { display: none !important; }
  .svc-list { max-height: none; overflow: visible; }
}
.slot-pick { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.slot-pick-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.slot-pick-row b { width: 80px; font-size: .85rem; }
.slot-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; font: inherit; font-weight: 700; cursor: pointer; color: var(--ink); }
.slot-btn:hover { border-color: var(--accent); }
.slot-btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.slot-btn.full { color: #b8bfca; text-decoration: line-through; background: #f6f7f9; }
.slot-btn.full.on { color: #fff; text-decoration: none; }
.svc-plan .place-hint { position: absolute; left: 0; right: 0; top: 0; z-index: 30; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
@media (max-width: 600px) {
  .walkin-bar { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; gap: 6px; padding: 8px 10px; }
  .walkin-bar span { font-size: .8rem; white-space: nowrap; }
  .walkin { min-width: 38px; min-height: 38px; flex: none; }
  .svc-tabs { width: 100%; }
}
a[href^='tel:'], td.phone { white-space: nowrap; }
