/* Agenda Crosly — style proche de l'outil d'origine (bleu nuit), modernisé */
:root { --night: #0f1b3d; --night-2: #1a2a57; --panel: #23345f; --line: #3b4d7a; --text: #eef2ff; --muted: #a8b3d6; --cell: #ffffff; --cell-line: #c9d2ea; --hour: #e7ecf8; --accent: #7c3aed; --ok: #16a34a; --err: #dc2626; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--night); color: var(--text); font-size: 14px; }
button, input, select, textarea { font: inherit; }
.top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 10px 18px; background: linear-gradient(90deg, #0b1430, #16285a); border-bottom: 3px solid #2b3e72; }
.logo { height: 48px; background: #fff; border-radius: 10px; padding: 4px 10px; }
.tabs { display: flex; gap: 4px; }
.tabs button { border: 0; padding: 8px 16px; background: #5b6b93; color: #fff; font-weight: 600; cursor: pointer; border-radius: 6px 6px 0 0; }
.tabs button[aria-current="true"] { background: #fff; color: var(--night); }
.who { margin-left: auto; color: var(--muted); }
.who b { color: #fff; }
.who button { background: none; border: 0; color: #c4b5fd; text-decoration: underline; cursor: pointer; }
main { padding: 10px 10px 30px; }
.loading { color: var(--muted); }

/* Barre du jour */
.daybar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.daybar h1 { font-size: 18px; margin: 0 10px 0 0; text-transform: capitalize; }
.count { background: var(--panel); padding: 6px 12px; border-radius: 8px; }
.places { display: flex; gap: 2px; }
.places button, .btn { border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.places button[aria-current="true"] { background: #fff; color: var(--night); font-weight: 700; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.btn.danger { background: transparent; border-color: #f87171; color: #fecaca; }
.btn.small { padding: 3px 8px; font-size: 12px; }
select, input[type=text], input[type=date], input[type=email], input[type=tel], input[type=number], input[type=password], textarea { background: #fff; color: #111827; border: 1px solid #94a3b8; border-radius: 6px; padding: 6px 8px; }

/* Mise en page : grille + colonne de droite */
.layout { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 1200px) { .layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 12px; } }
.side { display: grid; gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.card h2 { font-size: 15px; margin: 0 0 8px; }

/* Grille de l'agenda */
.grid-wrap { overflow: auto; max-height: calc(100vh - 170px); border-radius: 8px; border: 1px solid var(--line); background: var(--night-2); user-select: none; }
table.grid { border-collapse: separate; border-spacing: 0; font-size: 12px; width: 100%; table-layout: auto; }
.grid th, .grid td { border-right: 1px solid var(--cell-line); border-bottom: 1px solid var(--cell-line); min-width: 26px; height: 20px; padding: 0; text-align: center; }
.grid thead th { position: sticky; top: 0; z-index: 2; background: #dbe3f7; color: #0f1b3d; font-weight: 700; height: 22px; }
.grid thead th.time, .grid td.time { position: sticky; left: 0; z-index: 3; width: 58px; min-width: 58px; background: #fff; color: #0f1b3d; font-weight: 800; }
.grid thead th.time { z-index: 4; }
.grid tr.q td.time { background: #4b5563; color: #e5e7eb; font-weight: 600; }
.grid td.c { background: var(--cell); cursor: crosshair; }
.grid td.sep { border-left: 3px solid #475569; }
.grid td.cnt { background: #f1f5ff; font-weight: 800; color: #0f1b3d; }
.grid td.res { cursor: pointer; color: #fff; font-weight: 800; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); }
.grid td.res.option { background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .35) 0 4px, transparent 4px 8px) !important; }
.grid td.sel { background: #c4b5fd !important; }
.grid td.now { box-shadow: inset 0 2px 0 #f43f5e; }
.grid th.hdr-cnt { color: #fff; }
.grid tr.block td { background: #3f5185; color: #fff; text-align: left; padding: 0 6px; cursor: pointer; height: 22px; }
.grid tr.block td .chip { display: inline-block; min-width: 18px; padding: 0 4px; margin-right: 3px; border-radius: 3px; text-align: center; font-weight: 800; color: #fff; }

/* Calendrier */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-weight: 700; text-transform: capitalize; }
.cal-head button { background: none; border: 0; color: #c4b5fd; font-size: 18px; cursor: pointer; }
table.cal { width: 100%; border-collapse: collapse; text-align: center; }
.cal th { color: var(--muted); font-weight: 600; padding: 3px 0; }
.cal td { padding: 0; }
.cal td button { width: 100%; padding: 5px 0; border: 1px solid transparent; background: #fff; color: #0f1b3d; cursor: pointer; border-radius: 4px; position: relative; }
.cal td button.we { color: #64748b; }
.cal td button.has { font-weight: 800; }
.cal td button.has::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.cal td button.today { border-color: #f59e0b; }
.cal td button.on { background: #f59e0b; color: #111; font-weight: 800; }

/* Légende */
.legend { display: grid; gap: 4px; }
.legend span { display: inline-block; min-width: 34px; margin-right: 6px; padding: 0 4px; border-radius: 3px; color: #fff; font-weight: 800; font-size: 11px; text-align: center; }

/* Demandes du site */
.req { border-top: 1px solid var(--line); padding: 8px 0; }
.req:first-of-type { border-top: 0; }
.req small { color: var(--muted); display: block; }
.req .badge { font-size: 11px; padding: 1px 6px; border-radius: 99px; background: #f59e0b; color: #111; font-weight: 700; }

/* Fenêtre de réservation */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 24px); background: #fff; color: #111827; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
dialog::backdrop { background: rgba(5, 10, 30, .7); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--night); color: #fff; }
.dlg-head h2 { margin: 0; font-size: 17px; }
.dlg-body { padding: 14px 16px; overflow: auto; max-height: calc(100vh - 150px); }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid #e5e7eb; flex-wrap: wrap; }
.dlg-foot .btn { background: #e5e7eb; color: #111827; border-color: #cbd5e1; }
.dlg-foot .btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.dlg-foot .btn.danger { color: var(--err); border-color: #fca5a5; background: #fff; margin-right: auto; }
.row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 10px; }
.f { display: grid; gap: 4px; }
.f label { font-size: 12px; font-weight: 700; color: #475569; }
.cols-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 4px; margin-bottom: 10px; }
.cols-pick label { display: flex; align-items: center; justify-content: center; gap: 2px; padding: 4px 0; border: 1px solid #cbd5e1; border-radius: 6px; cursor: pointer; font-weight: 700; font-size: 12px; }
.cols-pick label:has(input:checked) { background: #ede9fe; border-color: var(--accent); color: var(--accent); }
.cols-pick input { display: none; }
.conflict { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; padding: 8px 10px; border-radius: 8px; margin-bottom: 10px; }
.meta { font-size: 12px; color: #64748b; }

/* Listes (utilisateurs, clients) */
table.list { width: 100%; border-collapse: collapse; background: #fff; color: #111827; border-radius: 10px; overflow: hidden; }
table.list th, table.list td { padding: 7px 10px; border-bottom: 1px solid #e5e7eb; text-align: left; }
table.list th { background: #e0e7ff; font-size: 12px; text-transform: uppercase; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover { background: #f5f3ff; }
.panel-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .panel-grid { grid-template-columns: 1.3fr 1fr; } }

/* Connexion */
.login { max-width: 360px; margin: 60px auto; background: #fff; color: #111827; padding: 24px; border-radius: 14px; display: grid; gap: 10px; }
.login h1 { margin: 0; font-size: 20px; }
.login .err { color: var(--err); min-height: 1em; }

.toast { position: fixed; right: 16px; bottom: 16px; padding: 10px 16px; border-radius: 10px; background: #111827; color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); z-index: 50; }
.toast.ok { background: var(--ok); } .toast.err { background: var(--err); }

/* Vue par semaine */
.week { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 6px; overflow-x: auto; }
.wday { background: var(--night-2); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; min-height: calc(100vh - 190px); }
.wday.today { border-color: #f59e0b; }
.wday.on .whead { background: #fff; color: var(--night); }
.whead { border: 0; background: #dbe3f7; color: #0f1b3d; padding: 6px; border-radius: 8px 8px 0 0; cursor: pointer; text-transform: capitalize; text-align: center; line-height: 1.3; }
.whead small { display: block; font-size: 11px; color: #475569; text-transform: none; }
.wlist { display: grid; gap: 5px; padding: 6px; align-content: start; flex: 1; }
.wcard { text-align: left; border: 0; border-left: 6px solid #64748b; background: #fff; color: #111827; border-radius: 6px; padding: 5px 7px; cursor: pointer; font-size: 12px; line-height: 1.35; }
.wcard:hover { background: #f5f3ff; }
.wcard .chip { display: inline-block; padding: 0 4px; border-radius: 3px; color: #fff; font-weight: 800; font-size: 10px; }
.wcard small { color: #64748b; }
.wcard.option { background-image: repeating-linear-gradient(45deg, rgba(124, 58, 237, .08) 0 4px, transparent 4px 8px); }
.wcard.cancelled { opacity: .5; text-decoration: line-through; }
.wadd { margin: 0 6px 6px; border: 1px dashed var(--line); background: transparent; color: var(--muted); border-radius: 6px; padding: 4px; cursor: pointer; }
.wadd:hover { color: #fff; border-color: #c4b5fd; }

/* Impression des rapports */
#print-area { display: none; }
@media print {
  body { background: #fff; color: #111; }
  body.printing > *:not(#print-area) { display: none !important; }
  body > *:not(#print-area):not(dialog) { display: none !important; }
  dialog { display: none !important; }
  #print-area { display: block; font-size: 11px; color: #111; }
  .p-head { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid #0f1b3d; padding-bottom: 8px; margin-bottom: 10px; }
  .p-head img { height: 46px; }
  .p-head h1 { font-size: 17px; margin: 0; }
  #print-area h2 { font-size: 13px; margin: 14px 0 4px; text-transform: capitalize; break-after: avoid; }
  #print-area table { width: 100%; border-collapse: collapse; }
  #print-area th, #print-area td { border: 1px solid #9ca3af; padding: 3px 5px; text-align: left; vertical-align: top; }
  #print-area th { background: #e5e7eb; }
  #print-area tr { break-inside: avoid; }
  .p-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .p-cancel td { text-decoration: line-through; color: #6b7280; }
  .p-empty { color: #6b7280; margin: 2px 0 6px; }
  .p-total { margin-top: 10px; font-weight: 700; }
  @page { size: A4 landscape; margin: 10mm; }
}

table.list.order input { min-height: 30px; }
.hist { border-left: 4px solid var(--accent); padding: 4px 10px; margin: 0 0 10px; background: #f8fafc; border-radius: 6px; }
.hist pre { margin: 4px 0 0; white-space: pre-wrap; font-family: inherit; font-size: 13px; }
@media print {
  #print-area table { table-layout: fixed; }
  #print-area th:nth-child(1) { width: 9%; } #print-area th:nth-child(2) { width: 13%; } #print-area th:nth-child(3) { width: 16%; }
  #print-area th:nth-child(4) { width: 11%; } #print-area th:nth-child(5) { width: 5%; } #print-area th:nth-child(6) { width: 12%; }
  #print-area th:nth-child(7) { width: 8%; } #print-area th:nth-child(8) { width: 26%; }
}
.lane-pick { background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 8px; padding: 8px 10px 4px; margin-bottom: 8px; }
.lane-pick .row { margin-bottom: 4px; grid-template-columns: repeat(3, minmax(110px, 160px)); }
.lane-pick .meta { display: block; min-height: 1.2em; margin-bottom: 4px; }
.cols-pick label { user-select: none; }
.cols-pick label.busy { border-color: #f87171; background: #fef2f2; color: #b91c1c; }
.cols-pick label.busy:has(input:checked) { background: #fecaca; color: #7f1d1d; border-color: #dc2626; }
.segs { display: grid; gap: 8px; }
.seg { border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 8px; padding: 8px 10px; }
.seg .row { grid-template-columns: 1.4fr 1fr 1fr .8fr 1.2fr; margin: 4px 0; }
.seg-add { background: #e0e7ff !important; color: #1e3a8a !important; border-color: #a5b4fc !important; }

/* Étages du bowling */
.grid.has-floors thead tr.floors th { top: 0; height: 20px; background: #0f1b3d; color: #fde68a; font-size: 11px; letter-spacing: .02em; }
.grid.has-floors thead tr.floors th.floor { background: #1e3a8a; }
.grid.has-floors thead tr:not(.floors) th { top: 21px; }
.grid th.fsep, .grid td.fsep { border-left: 3px solid #1e3a8a; }
.floor-pick { display: grid; gap: 6px; margin-bottom: 10px; }
.floor-grp { display: grid; grid-template-columns: 120px 1fr; gap: 8px; align-items: center; }
.floor-grp .cols-pick { margin: 0; }
.floor-name { display: grid; gap: 3px; font-size: 12px; color: #1e3a8a; }
.floor-name .btn.small { background: #e0e7ff; color: #1e3a8a; border-color: #a5b4fc; padding: 2px 6px; font-size: 11px; }
@media (max-width: 600px) { .floor-grp { grid-template-columns: 1fr; } }

/* Sous-menu Réservation (entre le logo et la barre du jour) */
.subnav { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 10px; background: #16285a; border-bottom: 1px solid #2b3e72; }
.subnav[hidden] { display: none; }
.subnav button { border: 1px solid transparent; background: transparent; color: #dbe3f7; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.subnav button:hover { background: #23345f; border-color: var(--line); }
.subnav button[aria-current="true"] { background: #f59e0b; color: #111; }
.memo-text { white-space: pre-wrap; background: #fffbeb; color: #111827; border-radius: 6px; padding: 8px; font-size: 13px; max-height: 200px; overflow: auto; }
#memo-card h2 { display: flex; justify-content: space-between; align-items: center; }
@media print { .subnav { display: none !important; } .p-memo { border: 1px solid #f59e0b; background: #fffbeb; padding: 4px 6px; margin: 2px 0 6px; white-space: pre-wrap; } }
.user-form { display: grid; gap: 8px; margin-bottom: 8px; }
.user-form label { display: grid; gap: 3px; font-size: 12px; font-weight: 700; color: var(--muted); }

/* Semaine verticale : un jour par bloc, détail par catégorie */
.wlistv { display: grid; gap: 12px; }
.wdayv { background: var(--night-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.wdayv.today { border-color: #f59e0b; }
.wdayv header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 12px; background: #dbe3f7; color: #0f1b3d; }
.wdayv.on header { background: #fff; }
.wdate { border: 0; background: none; font: inherit; font-size: 16px; color: #0f1b3d; cursor: pointer; padding: 0; }
.wdate b { text-transform: capitalize; }
.wdayv .sum { font-size: 13px; color: #475569; }
.wmemo { font-size: 12px; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 6px; padding: 2px 8px; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wdayv header .btn { margin-left: auto; background: var(--accent); border-color: var(--accent); color: #fff; }
.wcats { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px; padding: 8px; }
.wcat { background: #fff; color: #111827; border-radius: 8px; padding: 6px 8px; }
.wcat.empty { background: #e9edf7; color: #64748b; }
.wcat h3 { margin: 0 0 4px; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.wcat h3 .n { font-size: 12px; font-weight: 600; color: #64748b; }
table.wtab { width: 100%; border-collapse: collapse; font-size: 13px; }
.wtab th { text-align: left; font-size: 11px; color: #64748b; font-weight: 700; border-bottom: 1px solid #e5e7eb; padding: 2px 4px; }
.wtab td { padding: 4px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.wtab tr { cursor: pointer; } .wtab tbody tr:hover { background: #f5f3ff; }
.wtab tr.opt td { background-image: repeating-linear-gradient(45deg, rgba(124, 58, 237, .07) 0 4px, transparent 4px 8px); }
.wtab td.hr { white-space: nowrap; font-weight: 700; }
.wtab td.num { text-align: right; font-weight: 700; }
.wtab .dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
a.bc { display: inline-block; text-decoration: none; color: #1e3a8a; font-weight: 700; border: 1px solid #c7d2fe; background: #eef2ff; border-radius: 6px; padding: 1px 6px; line-height: 1.25; white-space: nowrap; }
a.bc small { display: block; font-weight: 500; font-size: 10px; color: #64748b; }
a.bc.ok { color: #166534; border-color: #86efac; background: #f0fdf4; }
a.bc:hover { text-decoration: underline; }
.bc-none { font-size: 11px; color: #94a3b8; }
.wcats { align-items: start; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.wdayv.none .wcats { display: none; }
.wcats { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }

/* Fiche client verticale : entreprise puis contact */
.client-v { display: grid; gap: 10px; margin-bottom: 10px; }
.client-v fieldset { border: 1px solid #c7d2fe; border-radius: 10px; padding: 8px 12px 10px; margin: 0; background: #f8faff; }
.client-v legend { font-weight: 800; color: #1e3a8a; padding: 0 6px; }
.vline { display: grid; grid-template-columns: 130px 1fr; gap: 8px; align-items: center; margin: 5px 0; }
.vline > label { font-size: 12px; font-weight: 700; color: #475569; text-align: right; }
.vin { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.vin input { flex: 1; min-width: 160px; }
.vin .btn.small { white-space: nowrap; }
.dlg-body .vin a.btn { background: #eef2ff; color: #1e3a8a; border-color: #a5b4fc; text-decoration: none; }
.vat-msg { margin: 0 0 4px 138px; font-size: 12px; min-height: 1em; color: #475569; }
.vat-msg.ok { color: #166534; } .vat-msg.err { color: #b91c1c; }
.vfind input { width: 100%; }
@media (max-width: 560px) { .vline { grid-template-columns: 1fr; } .vline > label { text-align: left; } .vat-msg { margin-left: 0; } }

/* Rapport quotidien (écran et impression) */
.rep-wrap { background: #27325a; border: 1px solid var(--line); border-radius: 8px; padding: 0 0 8px; }
.rep-title { background: #5b6b93; color: #fff; text-align: center; font-weight: 800; padding: 4px; text-transform: capitalize; border-radius: 8px 8px 0 0; }
.rep-memo { margin: 8px; color: #111827; }
.rep { display: grid; gap: 2px; padding: 4px 8px; }
.rep-h { margin-top: 10px; padding: 2px 8px; font-weight: 800; color: #111; border-left: 6px solid; filter: saturate(.9); }
.rep-none { margin: 2px 0 4px; color: #e5e7eb; }
table.rep-t { width: 100%; border-collapse: collapse; font-size: 13px; color: #fff; }
.rep-t th { background: #4b587f; font-weight: 700; padding: 3px 6px; text-align: left; }
.rep-t td { padding: 4px 6px; vertical-align: top; border-bottom: 1px solid #3b4d7a; }
.rep-t tbody tr:nth-child(even) td { background: #323e68; }
.rep-t tr.click { cursor: pointer; } .rep-t tr.click:hover td { background: #44508a; }
.rep-t td.no { text-align: right; color: #c7d2fe; width: 28px; }
.rep-t td.hr { white-space: nowrap; font-weight: 700; }
.rep-t td.num { text-align: center; font-weight: 700; }
.rep-t td.lanes { width: 70px; }
.rep-t .lane { display: block; width: 44px; text-align: center; margin-bottom: 2px; background: #fbcfe8; color: #111; border: 2px solid; font-weight: 700; }
.rep-t .cnt { display: inline-block; min-width: 18px; padding: 0 4px; color: #fff; font-weight: 800; border-radius: 2px; }
.rep-t .chip { display: inline-block; padding: 0 4px; border-radius: 3px; color: #fff; font-weight: 800; font-size: 10px; }
.rep-t td.who em { color: #fcd34d; }
@media print {
  #print-area .p-day { margin-top: 12px; }
  #print-area .rep { padding: 0; }
  #print-area .rep-h { color: #111; -webkit-print-color-adjust: exact; print-color-adjust: exact; margin-top: 6px; font-size: 11px; }
  #print-area .rep-none { color: #6b7280; font-size: 10px; }
  #print-area table.rep-t { color: #111; font-size: 10px; table-layout: auto; }
  #print-area .rep-t th { background: #e5e7eb; width: auto !important; }
  #print-area .rep-t td { background: #fff !important; border: 1px solid #d1d5db; }
  #print-area .rep-t .lane { display: inline-block; width: auto; padding: 0 3px; margin: 0 2px 2px 0; border-width: 1px; background: #fff; }
  #print-area .rep-t .cnt, #print-area .rep-t .chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.rep-t td.who { color: #fff !important; font-weight: 600; }
@media print { #print-area .rep-t td.who { color: #111 !important; } }

.opts { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 0 0 10px; padding: 6px 10px; background: #f1f5f9; border-radius: 8px; font-size: 13px; }
.opts label { display: flex; gap: 5px; align-items: center; cursor: pointer; }
.rep-t td.mark { color: #fde68a; }
@media print { #print-area .rep-t td.mark { color: #111; } }
/* Lisibilité du rapport à l'écran */
.rep-memo { background: #fffbeb; color: #111827 !important; border: 1px solid #fcd34d; border-left: 6px solid #f59e0b; border-radius: 6px; padding: 6px 10px; white-space: pre-wrap; font-size: 14px; }
.rep-memo b { color: #92400e; }
.rep-t { font-size: 14px; }
.rep-t th { color: #fff; }
.rep-none { color: #f1f5f9; font-size: 14px; }
.rep-h { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); font-size: 15px; }
/* Couleurs des étages */
.floor-grp { border-radius: 8px; padding: 4px 6px; }
.grid td.c.res, .grid td.c.sel { } 
.grid.has-floors thead tr.floors th.floor { text-shadow: 0 1px 1px rgba(0,0,0,.4); }
.rep-t .lane { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
@media print { #print-area .rep-t .lane { border-width: 2px; } }

/* Salles */
.rooms-grp { border-left: 5px solid #0d9488; background: #ccfbf1; }
.rooms-grp .floor-name b { color: #0f766e; }
.rooms-grp .floor-name small { color: #0f766e; font-size: 11px; }
.room-hint { margin: 2px 0 0 138px; font-size: 12px; color: #0f766e; }
.room-hint.err { color: #b91c1c; font-weight: 700; }
.cols-pick label.room-btn { grid-column: span 3; }
.grid th.room { color: #fff; }
/* Semaine au format rapport */
.wlistv .rep-wrap.today { border-color: #f59e0b; }
.rep-title-w { display: flex; align-items: center; justify-content: center; gap: 14px; position: relative; }
.rep-date { border: 0; background: none; color: #fff; font: inherit; font-weight: 800; cursor: pointer; text-transform: capitalize; }
.rep-date:hover { text-decoration: underline; }
.rep-sum { font-weight: 500; font-size: 12px; color: #e0e7ff; }
.rep-title-w .btn.small { position: absolute; right: 6px; background: var(--accent); border-color: var(--accent); color: #fff; }
.rep-title-w .rep-sum, .rep-title-w .btn { text-transform: none; }
/* Petites flèches : ajouter une activité pour ce client */
.fn-row { display: flex; align-items: center; gap: 5px; }
.act-arrow { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid #7c3aed; background: #fff; color: #7c3aed; font-size: 13px; line-height: 1; cursor: pointer; flex: none; }
.act-arrow:hover, .act-arrow:focus-visible { background: #7c3aed; color: #fff; }
.cols-pick.acts { grid-template-columns: repeat(auto-fill, minmax(70px, max-content)); }
.act-pair { display: inline-flex; align-items: center; gap: 4px; }
.act-pair label { min-width: 40px; }
.resto-grp { border-left: 5px solid #16a34a; background: #dcfce7; }
.resto-grp b { color: #15803d; }
.seg.flash { animation: segflash 1.2s ease-out; }
@keyframes segflash { from { box-shadow: 0 0 0 4px #c4b5fd; } to { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .seg.flash { animation: none; } }
/* Q-Zar, Événement, Anniversaire, Publicité : l'un sous l'autre */
.cols-pick.acts { display: grid; grid-template-columns: 1fr; gap: 4px; }
.act-pair { display: flex; align-items: center; gap: 8px; }
.act-pair label { min-width: 44px; flex: none; }
.act-name { font-size: 13px; font-weight: 600; color: #1e293b; }
/* Liste verticale des activités : ▸ | nom | pistes */
.act-list { display: grid; gap: 4px; }
.act-row { display: grid; grid-template-columns: 26px 170px 1fr; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 8px; border-left: 5px solid #cbd5e1; background: #f8fafc; }
.act-row .cols-pick { margin: 0; }
.act-label { display: grid; gap: 1px; font-size: 13px; }
.act-label small { font-size: 11px; color: #475569; }
.act-label .btn.small { justify-self: start; background: #e0e7ff; color: #1e3a8a; border-color: #a5b4fc; padding: 1px 6px; font-size: 11px; margin-top: 2px; }
.act-row.rooms { border-left-color: #0d9488; background: #ccfbf1; } .act-row.rooms b { color: #0f766e; }
.act-row.act-Q { border-left-color: #3b82f6; background: #eff6ff; } .act-row.act-Q b { color: #1d4ed8; }
.act-row.act-E { border-left-color: #22c55e; background: #f0fdf4; } .act-row.act-E b { color: #15803d; }
.act-row.act-A { border-left-color: #ec4899; background: #fdf2f8; } .act-row.act-A b { color: #be185d; }
.act-row.act-Pub { border-left-color: #d946ef; background: #fdf4ff; } .act-row.act-Pub b { color: #a21caf; }
@media (max-width: 600px) { .act-row { grid-template-columns: 26px 1fr; } .act-row .cols-pick { grid-column: 1 / -1; } }
.modebar { display: flex; gap: 8px; margin: 0 0 8px; }

/* Prix par activité */
.price-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; padding: 6px 10px; background: #fefce8; border: 1px solid #fde68a; border-radius: 8px; font-size: 13px; }
.price-box input[type=text] { flex: 1; min-width: 200px; }
.price-total { font-size: 15px; color: #111827; }
.seg .price-box { margin: 4px 0; }
.rep-t td.price { white-space: nowrap; color: #bbf7d0; }
@media print { #print-area .rep-t td.price { color: #111; } }
.sec-title { font-weight: 800; font-size: 15px; color: #1e3a8a; border-bottom: 2px solid #c7d2fe; padding: 2px 0 4px; margin: 12px 0 8px; }
.dlg-body > .sec-title:first-of-type { margin-top: 0; }
.room-hint { margin: 0 0 8px; }

/* Formulaire : section Réservation */
.resa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 12px; align-items: end; margin-bottom: 8px; }
.resa-grid .chk { display: flex; gap: 6px; align-items: center; font-weight: 700; font-size: 13px; color: #334155; padding-bottom: 6px; }

/* Fiche de réservation (clic sur un événement), comme l'ancien agenda */
.detail { background: #0f1b3d; color: #e5e7eb; }
.detail .rep-h { margin-top: 12px; }
.detail .rep-h.dark { background: #5b6b93; border-color: #5b6b93; }
table.dt { width: 100%; border-collapse: collapse; font-size: 13px; }
.dt th, .dt td { padding: 3px 6px; border-bottom: 1px solid #2b3e72; text-align: left; }
.dt thead th { background: #4b587f; color: #fff; font-size: 12px; }
.dt tbody th { background: #4b587f; color: #fff; white-space: nowrap; }
.dt tr.click { cursor: pointer; } .dt tr.click:hover td { background: #26365f; }
.dt tr.cur td { background: #1e2c55; }
table.kv { border-collapse: collapse; font-size: 13px; margin-top: 2px; }
.kv th { background: #4b587f; color: #fff; text-align: right; padding: 3px 8px; min-width: 150px; font-weight: 600; border-bottom: 1px solid #0f1b3d; }
.kv td { padding: 3px 10px; color: #fff; }
.kv a { color: #c4b5fd; }
table.kv.click { cursor: pointer; width: 100%; } table.kv.click:hover td { background: #1e2c55; }
.detail .comment { white-space: pre-wrap; padding: 6px 8px; font-size: 13px; color: #fff; }
.detail-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; padding: 8px 10px; background: #5b6b93; color: #fff; border-radius: 6px; font-size: 13px; }
.detail-foot .btns { display: flex; gap: 8px; }
.detail-foot .btn.danger { background: #fff; color: #b91c1c; border-color: #fca5a5; }
.dt.mods td.det { color: #a8b3d6; font-size: 12px; }
/* Couleurs claires sur les fonds foncés (lisibilité) */
.detail { color: #f8fafc; }
.detail .rep-h.dark, .rep-title, .detail-foot { background: #c7d2fe; border-color: #c7d2fe; color: #0f1b3d; text-shadow: none; }
.rep-title-w .rep-date { color: #0f1b3d; } .rep-title-w .rep-sum { color: #1e3a8a; }
.kv th { background: #dbe3f7; color: #0f1b3d; border-bottom: 1px solid #0f1b3d; }
.kv td { color: #ffffff; font-weight: 600; }
.kv a, .detail a { color: #fde68a; }
.dt thead th, .rep-t th { background: #dbe3f7; color: #0f1b3d; }
.dt tbody th { background: #e0e7ff; color: #0f1b3d; }
.dt td, .rep-t td { color: #ffffff; }
.dt.mods td.det, .rep-t td.no { color: #e0e7ff; }
.rep-none, .detail .comment { color: #ffffff; }
.rep-t td.mark { color: #fde047; } .rep-t td.price { color: #86efac; }
.card .meta, .side .meta, .req small { color: #dbe3f7 !important; }
.count { color: #f8fafc; background: #3b4d7a; }
.detail-foot b { color: #0f1b3d; }
.detail-foot .btn.primary { color: #fff; }

/* Publicité */
.pub-box { display: none; background: #fdf4ff; border: 1px solid #f0abfc; border-left: 5px solid #d946ef; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.pub-box b { color: #a21caf; }
dialog.is-pub .pub-box { display: block; }
dialog.is-pub .hide-pub { display: none; }
.now-win { display: inline-flex; align-items: center; gap: 6px; background: #f59e0b; color: #111; padding: 4px 8px; border-radius: 8px; } .now-win .btn.small { background: #fff; color: #111; border-color: #fff; }

/* Pub : importation / validation / programmation */
.pub-panel { margin-top: 6px; }
.pub-steps { font-size: 12px; color: #fde68a; margin: 6px 0; }
.pub-up { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #1e2c55; padding: 6px 8px; border-radius: 6px; }
.pub-up input[type=file] { color: #fff; }
.pub-list { display: grid; gap: 8px; margin-top: 8px; }
.pub-item { display: grid; grid-template-columns: 220px 1fr; gap: 10px; background: #1e2c55; border-left: 5px solid #94a3b8; border-radius: 8px; padding: 8px; color: #fff; }
.pub-item img, .pub-item video { width: 220px; aspect-ratio: 16 / 9; object-fit: cover; background: #000; border-radius: 4px; }
.pub-item.st-validé { border-left-color: #22c55e; } .pub-item.st-refusé { border-left-color: #ef4444; } .pub-item.st-programmé { border-left-color: #d946ef; } .pub-item.st-importé { border-left-color: #f59e0b; }
.pub-badge { display: inline-block; margin: 3px 0; padding: 1px 8px; border-radius: 99px; background: #fff; color: #111; font-weight: 700; font-size: 12px; }
.pub-item .meta { color: #dbe3f7 !important; }
.pub-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pub-btns .btn.danger { background: transparent; color: #fecaca; border-color: #f87171; }
.pub-warn { background: #fef3c7; color: #92400e; padding: 6px 8px; border-radius: 6px; font-size: 13px; }
.pub-choose { margin-top: 8px; background: #fff; color: #111827; border-radius: 8px; padding: 10px; display: grid; gap: 6px; }
.pub-choose label { display: flex; gap: 6px; align-items: center; }
@media (max-width: 600px) { .pub-item { grid-template-columns: 1fr; } .pub-item img, .pub-item video { width: 100%; } }
/* Agenda global : toute la journée, sans barre de défilement interne (la page défile, l'en-tête reste visible) */
.grid-wrap.full { max-height: none; overflow: visible; }
.grid-wrap.full table.grid thead th { top: 0; }
.grid-wrap.full table.grid.has-floors thead tr:not(.floors) th { top: 21px; }

/* Gestion des bons de commande */
.ord-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ord-filters input { flex: 1; min-width: 240px; }
.ord-sum { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ord-sum span { background: #3b4d7a; color: #fff; padding: 5px 10px; border-radius: 8px; font-weight: 600; }
.ord-st { display: inline-block; color: #fff !important; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; }
table.list.orders td.num { text-align: right; white-space: nowrap; }
.chip-t { display: inline-block; padding: 0 4px; border-radius: 3px; color: #fff; font-weight: 800; font-size: 10px; }
.cat-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; padding: 8px; background: #eef2ff; border-radius: 8px; }
.cat-find { flex: 1; min-width: 220px; }
.cat-sel { flex: 2; min-width: 260px; }

/* thème saisonnier du site */
.th-box.busy { opacity: .55; pointer-events: none; }
.th-now { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); margin-bottom: 12px; }
.th-now.on { border-color: #a78bfa; background: #2e2a6b; }
.th-now p { margin: 2px 0 0; color: var(--muted); }
.th-big { font-size: 2.4rem; line-height: 1; }
.th-modes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.th-list { display: grid; gap: 8px; }
.th-card { display: grid; grid-template-columns: 44px 1fr auto auto auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.th-card.cur { border-color: #a78bfa; box-shadow: 0 0 0 2px #7c3aed; }
.th-card.off { opacity: .6; }
.th-ico { font-size: 1.8rem; text-align: center; }
.th-txt { display: flex; flex-direction: column; min-width: 0; }
.th-txt small { color: var(--muted); }
.th-msg { font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-card .chk, .th-modes .chk { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
@media (max-width: 700px) { .th-card { grid-template-columns: 36px 1fr; } }

/* 💶 Prix */
.pr-bar { position: sticky; top: 0; z-index: 5; display: flex; gap: 12px; align-items: center; padding: 10px 0; background: var(--night); }
.pr-sec { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin: 10px 0; padding: 8px 14px; }
.pr-sec > summary { cursor: pointer; font-size: 1.1rem; padding: 4px 0; }
.pr-sec h3 { margin: 14px 0 6px; font-size: .95rem; color: #c4b5fd; }
.pr-table { border-collapse: collapse; width: 100%; max-width: 760px; }
.pr-table td { padding: 4px 8px; border-bottom: 1px solid var(--line); }
.pr-table td:last-child { width: 130px; text-align: right; white-space: nowrap; }
.pr-num { width: 90px; text-align: right; }
.pr-eur { white-space: nowrap; }
.pr-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 8px 0; background: var(--night-2); }
.pr-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0; }
.pr-txt { flex: 1 1 260px; min-width: 0; }
.pr-strong { font-weight: 700; }
.pr-suf { width: 90px; }
.pr-item { padding-left: 14px; }
.pr-add { padding-left: 14px; opacity: .9; }
.pr-or { padding-left: 14px; color: var(--muted); font-size: .85rem; }
.pr-area { width: 100%; }
.pr-cat { margin: 6px 0; }
.pr-cat > summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.pr-sec input, .pr-sec select, .pr-sec textarea { background: #fff; color: #111827; border: 1px solid var(--cell-line); border-radius: 6px; padding: 4px 6px; font: inherit; }

/* paiement des bons (Viva Wallet) */
.pay { display: inline-block; padding: 1px 8px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.pay-ok { background: #dcfce7; color: #166534; } .pay-wait { background: #fef9c3; color: #854d0e; } .pay-ko { background: #fee2e2; color: #991b1b; } .pay-none { background: #e2e8f0; color: #334155; }
a.bc small.pay { display: block; margin-top: 2px; }
.pay-badge { display: inline-block; margin-left: 2px; font-size: 9px; line-height: 1; padding: 1px 2px; border-radius: 3px; vertical-align: top; }
.pay-box { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.pay-box .row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pay-box .row input { flex: 1 1 280px; }

/* 📋 Suivi */
table.suivi tr.todo td:first-child { box-shadow: inset 4px 0 0 #f59e0b; }
.suivi-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.suivi-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.suivi-note { display: grid; gap: 6px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; margin-bottom: 12px; }
.tl-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.chip-o { display: inline-flex; gap: 4px; align-items: center; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.timeline li { display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--panel); color: var(--text); border-left: 4px solid #64748b; }
.timeline li.tl-client { border-left-color: #0ea5e9; } .timeline li.tl-secretaire { border-left-color: #a78bfa; } .timeline li.tl-ia { border-left-color: #ec4899; }
.chip-o.tl-client { border-color: #0ea5e9; } .chip-o.tl-secretaire { border-color: #a78bfa; } .chip-o.tl-ia { border-color: #ec4899; }
.tl-ico { font-size: 1.4rem; line-height: 1; }
.tl-meta { font-size: 12px; color: var(--muted); }
.tl-meta b { color: #fff; }
.tl-meta { color: #c7d2fe !important; }
.timeline details summary { cursor: pointer; color: #c7d2fe; }
.tl-text { white-space: pre-wrap; }
.conv { margin: 4px 0; padding: 4px 8px; border-radius: 8px; font-size: 13px; } .conv-ia { background: rgba(236, 72, 153, .12); } .conv-client { background: rgba(14, 165, 233, .12); }
.timeline label.meta { color: #c7d2fe; }

/* menus Eagle-Burger, icônes et badge Halal */
.halal { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #166534; background: #dcfce7; border: 1px solid #86efac; vertical-align: middle; white-space: nowrap; }
.ol-lab { display: flex; align-items: center; gap: 6px; } .ol-lab input { flex: 1; min-width: 0; }
.ol-ic { display: inline-block; width: 1.5em; text-align: center; font-size: 1.1em; }
.burger-box { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.burger-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; } .burger-row .bn { font-weight: 700; min-width: 12em; }
.opt-list { white-space: pre-line; }
.burger-box, .burger-box b, .burger-row .bn { color: #fff; }
.burger-row .meta, .burger-row label { color: #c7d2fe !important; }
.burger-box b { font-size: 15px; }

/* fiche : section Commande */
table.cmd { width: 100%; border-collapse: collapse; margin: 6px 0; }
table.cmd th, table.cmd td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; }
table.cmd td.n, table.cmd th:nth-child(n+2) { text-align: right; white-space: nowrap; }
table.cmd tr.tot td { font-weight: 800; }
table.cmd tr.onsite td { font-weight: 800; color: #b45309; background: #fef3c7; }
.qz-ok { margin-left: 10px; color: #fecaca; font-weight: 700; }
.cond-ok { color: #bbf7d0; font-weight: 600; }

/* Info-bulles photo des menus Eagle-Burger */
.ptip { position: relative; display: inline-block; }
.ptip-btn { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: help; text-align: left; text-decoration: underline dotted 1px; text-underline-offset: 3px; }
.ptip-i { display: inline-block; margin-left: 4px; font-size: .85em; opacity: .85; text-decoration: none; }
.ptip-box { position: absolute; z-index: 60; left: 0; top: calc(100% + 8px); width: min(260px, 80vw); padding: 8px; border-radius: 14px; background: #fff; color: #1f2937; box-shadow: 0 12px 32px rgba(0,0,0,.35); font-size: .85rem; line-height: 1.35; font-weight: 400; text-align: left; text-transform: none; letter-spacing: 0; white-space: normal; }
.ptip-box.up { top: auto; bottom: calc(100% + 8px); }
.ptip-box[hidden] { display: none; }
.ptip-box img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; border-radius: 10px; margin-bottom: 6px; }
.ptip-box b { display: block; font-size: .95rem; color: #111827; }
.ptip-box em { display: block; margin-top: 4px; font-style: normal; font-weight: 800; color: #111827; }
.ptip-box .halal { color: #166534; background: #dcfce7; border: 1px solid #86efac; }

/* Statut du site web (lecture seule) */
.site-st { margin-left: auto; padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; white-space: nowrap; }
.site-st.on { background: #dcfce7; color: #166534; } .site-st.works { background: #ffedd5; color: #9a3412; } .site-st:empty { display: none; }

/* Thème du site : barre Valider / Retour */
.th-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 14px; }
.th-dirty { color: #b45309; font-weight: 800; }

/* Petite salle bloquée par la Grande salle */
td.by-big { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px); font-size: 11px; white-space: nowrap; }

/* menu et nom caché tant que personne n’est connecté */
.tabs[hidden], .who[hidden] { display: none !important; }
