/* ==========================================================================
   GestiPro — Design system (thème clair / sombre)
   ========================================================================== */
:root {
  --bg: #f3f5f9; --surface: #ffffff; --surface-2: #f7f9fc; --surface-3: #eef2f7;
  --border: #e4e9f0; --border-strong: #d3dbe6;
  --text: #0f1b2d; --text-2: #3b4a60; --muted: #6b7a90;
  --primary: #f27a0c; --primary-d: #d4660a; --primary-soft: #fff1e3; --primary-ring: rgba(242, 122, 12, .18);
  --side: #0c1a2c; --side-2: #142640; --side-3: #1c3354; --side-text: #a9b8cc; --side-head: #ffffff;
  --ok: #0f9d58; --ok-soft: #e4f6ec; --warn: #c27c0e; --warn-soft: #fdf3dd; --bad: #d93025; --bad-soft: #fde9e7;
  --info: #2563eb; --info-soft: #e7efff; --violet: #7c3aed; --violet-soft: #f1eafe; --teal: #0d9488; --teal-soft: #e0f5f3;
  --radius: 14px; --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .05);
  --shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 6px 18px rgba(15, 27, 45, .06);
  --shadow-lg: 0 24px 60px rgba(15, 27, 45, .22);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  color-scheme: light;
  font-size: 15px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1320; --surface: #121d2e; --surface-2: #172438; --surface-3: #1d2c43;
    --border: #22324a; --border-strong: #2e4262;
    --text: #e8eef7; --text-2: #c3cede; --muted: #8b9ab0;
    --primary-soft: #3a2410; --primary-ring: rgba(242, 122, 12, .28);
    --side: #08111e; --side-2: #0f1c2f; --side-3: #172a45;
    --ok-soft: #0f3324; --warn-soft: #3a2b0c; --bad-soft: #3d1614; --info-soft: #132a52; --violet-soft: #2a1a4d; --teal-soft: #0d322f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25); --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1320; --surface: #121d2e; --surface-2: #172438; --surface-3: #1d2c43;
  --border: #22324a; --border-strong: #2e4262;
  --text: #e8eef7; --text-2: #c3cede; --muted: #8b9ab0;
  --primary-soft: #3a2410; --primary-ring: rgba(242, 122, 12, .28);
  --side: #08111e; --side-2: #0f1c2f; --side-3: #172a45;
  --ok-soft: #0f3324; --warn-soft: #3a2b0c; --bad-soft: #3d1614; --info-soft: #132a52; --violet-soft: #2a1a4d; --teal-soft: #0d322f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25); --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.45; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary-d); }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: 1.5rem; font-weight: 800; } h2 { font-size: 1.05rem; font-weight: 700; } h3 { font-size: .95rem; font-weight: 700; }
code { background: var(--surface-3); padding: 2px 6px; border-radius: 6px; font-size: .85em; }
pre { color: var(--text); }
.muted { color: var(--muted); } .small { font-size: .84rem; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: var(--primary-ring); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }

/* ---------- Boutons & champs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border); background: var(--surface); padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: .9rem; white-space: nowrap; text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; }
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, #f8861d, var(--primary)); border-color: var(--primary-d); color: #fff; box-shadow: 0 1px 2px rgba(212, 102, 10, .35), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn.primary:hover { background: var(--primary-d); }
.btn.ok { background: linear-gradient(180deg, #14ad63, var(--ok)); border-color: #0c8a4c; color: #fff; }
.btn.ok:hover { background: #0c8a4c; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, var(--border)); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { padding: 5px 10px; font-size: .8rem; border-radius: 8px; gap: 5px; }
.btn.sm svg.i { width: 15px; height: 15px; }
.btn.lg { padding: 12px 18px; font-size: 1rem; border-radius: 12px; }
.btn.block { width: 100%; }
.icon-btn { width: 38px; height: 38px; padding: 0; border-radius: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .78rem; font-weight: 600; color: var(--text-2); letter-spacing: .01em; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); padding: 9px 12px; outline: none; min-height: 41px; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: var(--muted); opacity: .8; }
textarea.input { min-height: 90px; resize: vertical; }
.input:hover { border-color: var(--border-strong); }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: .9rem; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: .78rem; color: var(--muted); }

/* ---------- Structure ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 252px; background: linear-gradient(180deg, var(--side) 0%, #0e2036 100%); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; flex: none; z-index: 40; transition: width .2s; border-right: 1px solid rgba(255, 255, 255, .04); }
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 18px 16px; color: var(--side-head); min-width: 0; }
.brand .logo { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, #ff9a3d, var(--primary-d)); display: grid; place-items: center; font-weight: 800; overflow: hidden; flex: none; color: #fff; box-shadow: 0 4px 12px rgba(242, 122, 12, .35); }
.brand .logo img { width: 100%; height: 100%; object-fit: cover; }
.brand .bt { min-width: 0; }
.brand b { display: block; font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand small { color: var(--side-text); opacity: .75; font-size: .74rem; }
.nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.nav::-webkit-scrollbar-thumb { background: var(--side-3); }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--side-text); text-decoration: none; font-size: .89rem; font-weight: 500; margin-bottom: 2px; white-space: nowrap; }
.nav a:hover { background: var(--side-2); color: #fff; }
.nav a.active { background: var(--side-3); color: #fff; font-weight: 600; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.nav a.active svg.i { color: var(--primary); }
.nav .sep { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; opacity: .5; padding: 16px 12px 6px; font-weight: 700; }
.side-foot { padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, .06); font-size: .76rem; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-foot .code { opacity: .8; white-space: nowrap; overflow: hidden; }
.side-foot .btn { color: var(--side-text); }
.side-foot .btn:hover { background: var(--side-2); color: #fff; }
.layout.collapsed .sidebar { width: 76px; }
.layout.collapsed .brand .bt, .layout.collapsed .nav a span, .layout.collapsed .nav .sep, .layout.collapsed .side-foot .code { display: none; }
.layout.collapsed .nav a { justify-content: center; padding: 11px; }
.layout.collapsed .brand { justify-content: center; padding: 20px 0 16px; }
.layout.collapsed .side-foot { justify-content: center; }
.layout.collapsed .collapse-ic { transform: rotate(180deg); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 12px 26px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; min-height: 64px; }
.topbar .title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar .crumb { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar #page-title { font-weight: 700; font-size: 1.08rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .today { font-size: .82rem; color: var(--muted); padding: 0 6px; white-space: nowrap; }
.menu-btn { display: none; }
.userchip { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; background: var(--surface); }
.userchip:hover { border-color: var(--border-strong); }
.userchip .uname { line-height: 1.2; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-soft), color-mix(in srgb, var(--primary) 25%, var(--surface))); color: var(--primary-d); display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.view { padding: 26px; max-width: 1440px; width: 100%; }
.banner { background: var(--warn-soft); color: var(--warn); padding: 10px 26px; font-size: .86rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-weight: 500; border-bottom: 1px solid var(--border); }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.toolbar .input { width: auto; min-width: 150px; }
.toolbar .grow { flex: 1; min-width: 180px; }
.toolbar .field > span { font-size: .72rem; }
.overlay { display: none; }

/* ---------- Cartes & KPI ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head a { font-size: .82rem; font-weight: 600; text-decoration: none; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: flex-start; overflow: hidden; }
.kpi-txt { min-width: 0; flex: 1; }
.kpi .lbl { font-size: .78rem; color: var(--muted); font-weight: 600; }
.kpi .val { font-size: 1.5rem; font-weight: 800; margin-top: 6px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .sub { font-size: .78rem; color: var(--muted); margin-top: 5px; }
.kpi-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; order: 2; background: var(--primary-soft); color: var(--primary-d); }
.kpi-ic svg.i { width: 21px; height: 21px; }
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--kc, var(--primary)); opacity: .9; }
.kpi.c-orange { --kc: var(--primary); } .kpi.c-orange .kpi-ic { background: var(--primary-soft); color: var(--primary-d); }
.kpi.c-green { --kc: var(--ok); } .kpi.c-green .kpi-ic { background: var(--ok-soft); color: var(--ok); }
.kpi.c-blue { --kc: var(--info); } .kpi.c-blue .kpi-ic { background: var(--info-soft); color: var(--info); }
.kpi.c-red { --kc: var(--bad); } .kpi.c-red .kpi-ic { background: var(--bad-soft); color: var(--bad); }
.kpi.c-violet { --kc: var(--violet); } .kpi.c-violet .kpi-ic { background: var(--violet-soft); color: var(--violet); }
.kpi.c-teal { --kc: var(--teal); } .kpi.c-teal .kpi-ic { background: var(--teal-soft); color: var(--teal); }
.pos-val { color: var(--ok); } .neg-val { color: var(--bad); }
.hero { background: linear-gradient(120deg, var(--side) 0%, #1a3a5e 60%, #23507a 100%); color: #fff; border-radius: var(--radius); padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 122, 12, .45), transparent 70%); }
.hero h1 { color: #fff; } .hero p { margin: 6px 0 0; opacity: .8; font-size: .9rem; }
.hero .actions { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .btn:not(.primary) { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; box-shadow: none; }
.hero .btn:not(.primary):hover { background: rgba(255, 255, 255, .18); }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .88rem; }
.t th { text-align: left; background: var(--surface-2); color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; }
.t td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background .1s; }
.t tbody tr:hover { background: var(--surface-2); }
.t .acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.t tfoot td { font-weight: 700; background: var(--surface-2); }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); font-size: .9rem; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.info { background: var(--info-soft); color: var(--info); }
.badge.pri { background: var(--primary-soft); color: var(--primary-d); }
.tabs { display: flex; gap: 4px; margin-bottom: 18px; overflow-x: auto; background: var(--surface-3); padding: 4px; border-radius: 12px; width: fit-content; max-width: 100%; }
.tabs button { border: 0; background: none; padding: 8px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-radius: 9px; white-space: nowrap; font-size: .87rem; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); background: var(--surface); box-shadow: var(--shadow-sm); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 13px; font-size: .82rem; font-weight: 600; cursor: pointer; color: var(--text-2); }
.chip:hover { border-color: var(--border-strong); }
.chip.active { background: var(--text); color: var(--surface); border-color: var(--text); }
.list-rows > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.list-rows > div:last-child { border-bottom: 0; }

/* ---------- Graphiques ---------- */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 14px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .bar i { display: block; width: 100%; max-width: 44px; background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 45%, var(--surface))); border-radius: 8px 8px 3px 3px; min-height: 3px; transition: filter .15s; }
.bars .bar:hover i { filter: brightness(1.08); }
.bars .bar small { font-size: .7rem; color: var(--muted); white-space: nowrap; text-transform: capitalize; }
.bars .bar em { font-style: normal; font-size: .66rem; color: var(--muted); white-space: nowrap; font-weight: 600; }
.hbar { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.hbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #ffa94d); border-radius: 99px; }

/* ---------- Caisse ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.prod { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 13px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 6px; min-height: 104px; box-shadow: var(--shadow-sm); transition: border-color .12s, box-shadow .12s, transform .06s; color: var(--text); }
.prod:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.prod:active { transform: scale(.97); }
.prod b { font-size: .88rem; line-height: 1.25; font-weight: 700; }
.prod .badge { align-self: flex-start; }
.prod .p { color: var(--primary-d); font-weight: 800; margin-top: auto; font-size: .95rem; }
.prod.out { opacity: .45; }
.cart { position: sticky; top: 82px; display: flex; flex-direction: column; max-height: calc(100vh - 104px); padding: 0; overflow: hidden; }
.cart-head { padding: 15px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.cart-lines { overflow-y: auto; flex: 1; min-height: 120px; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 11px 18px; border-bottom: 1px solid var(--border); }
.cart-line .nm { font-weight: 600; font-size: .88rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--surface); }
.qty button { border: 0; background: var(--surface-2); width: 30px; height: 30px; cursor: pointer; font-weight: 800; color: var(--text); }
.qty button:hover { background: var(--surface-3); }
.qty input { width: 44px; border: 0; text-align: center; height: 30px; outline: none; background: transparent; }
.cart-foot { padding: 16px 18px; border-top: 1px solid var(--border); background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.total-line { display: flex; justify-content: space-between; font-size: .9rem; gap: 10px; }
.total-line.big { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.pay-methods button { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 10px 4px; font-size: .78rem; font-weight: 700; cursor: pointer; color: var(--text-2); }
.pay-methods button:hover { border-color: var(--border-strong); }
.pay-methods button.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-d); box-shadow: 0 0 0 3px var(--primary-ring); }
.mobile-cart-btn { display: none; }

/* ---------- Restaurant / hôtel / cuisine ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.tile { position: relative; border: 1px solid var(--border); background: var(--surface); border-radius: 14px; padding: 15px 15px 15px 18px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 6px; min-height: 116px; box-shadow: var(--shadow-sm); color: var(--text); overflow: hidden; transition: border-color .12s, box-shadow .12s; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--border-strong); }
.tile:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.tile b { font-size: 1.05rem; }
.tile.free::before { background: var(--ok); } .tile.busy::before { background: var(--primary); } .tile.busy { background: linear-gradient(180deg, var(--primary-soft), var(--surface) 70%); }
.tile.clean::before { background: var(--info); } .tile.maint::before { background: var(--bad); } .tile.resa::before { background: var(--warn); }
.tile .badge { align-self: flex-start; }
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; }
.kitchen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.kcol { background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; min-height: 320px; }
.kcol h3 { display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 12px; }
.kitem { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.kitem .top { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: var(--muted); gap: 8px; }
.kitem .top b { color: var(--text); }
.kitem .what { font-size: 1.05rem; font-weight: 800; margin: 6px 0; }
.kitem .note { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 5px 9px; font-size: .8rem; margin-bottom: 8px; font-weight: 600; }
.kitem.late { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }

/* ---------- Modales, toasts ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(8, 15, 28, .55); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; z-index: 100; padding: 5vh 14px; overflow-y: auto; animation: fade .15s; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; width: 100%; max-width: 580px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: pop .18s ease-out; }
.modal.wide { max-width: 920px; } .modal.xl { max-width: 1240px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 10px; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 18px 18px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--side); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .88rem; font-weight: 500; max-width: 380px; animation: pop .2s; border-left: 4px solid var(--info); }
.toast.err { border-left-color: var(--bad); } .toast.ok { border-left-color: var(--ok); }

/* ---------- Connexion ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; background: var(--bg); }
.auth-side { position: relative; overflow: hidden; background: radial-gradient(circle at 85% 10%, rgba(242, 122, 12, .35), transparent 40%), linear-gradient(150deg, #08111e 0%, #12304f 60%, #1d4a72 100%); color: #fff; padding: 52px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side .brand { padding: 0; }
.auth-side h1 { font-size: 2.3rem; margin: 30px 0 14px; line-height: 1.12; letter-spacing: -.03em; max-width: 560px; }
.auth-side p { max-width: 520px; }
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0; max-width: 600px; }
.feat div { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; padding: 12px 14px; font-size: .86rem; display: flex; gap: 10px; align-items: center; }
.feat svg.i { color: #ffb066; }
.auth-form { display: grid; place-items: center; padding: 30px 18px; }
.auth-form .card { width: 100%; max-width: 420px; padding: 32px; border-radius: 20px; box-shadow: var(--shadow-lg); }
.auth-form form { display: grid; gap: 15px; margin-top: 20px; }
.auth-form h1 { font-size: 1.6rem; }

/* ---------- Ticket ---------- */
.receipt { font-family: "Courier New", ui-monospace, monospace; font-size: 13px; color: #000; background: #fff; width: 300px; margin: 0 auto; padding: 12px; border-radius: 6px; }
.receipt .c { text-align: center; } .receipt hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.receipt table { width: 100%; border-collapse: collapse; font-size: 12px; } .receipt td { padding: 2px 0; vertical-align: top; }
.receipt .r { text-align: right; } .receipt .b { font-weight: 700; } .receipt .big { font-size: 15px; font-weight: 700; }
.receipt img { max-width: 70px; max-height: 70px; }
#print-area { display: none; }
.report-print { font-family: system-ui, sans-serif; color: #000; }
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; }
  body { background: #fff; }
  @page { margin: 8mm; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pos, .order-layout { grid-template-columns: minmax(0, 1fr) 350px; } .topbar .today { display: none; } }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .22s; width: 268px !important; }
  .layout.collapsed .brand .bt, .layout.collapsed .nav a span, .layout.collapsed .nav .sep, .layout.collapsed .side-foot .code { display: revert; }
  .layout.collapsed .nav a { justify-content: flex-start; padding: 9px 12px; }
  .collapse-btn { display: none !important; }
  .layout.open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .layout.open .overlay { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 35; }
  .menu-btn { display: inline-flex; }
  .view { padding: 16px; }
  .topbar { padding: 10px 14px; min-height: 58px; }
  .banner { padding: 9px 14px; }
  .g3, .g2 { grid-template-columns: 1fr; }
  .pos, .order-layout { grid-template-columns: 1fr; }
  .cart { position: static; max-height: none; }
  .mobile-cart-btn { display: flex; position: fixed; bottom: 14px; left: 14px; right: 14px; z-index: 25; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
  .pos-products { padding-bottom: 72px; }
  .kitchen { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .userchip .uname { display: none; }
  .userchip { padding: 3px; }
  .hero { padding: 18px; }
}
@media (max-width: 560px) {
  .g4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .kpi { padding: 14px; flex-direction: column; gap: 8px; }
  .kpi-ic { order: 0; width: 34px; height: 34px; border-radius: 10px; }
  .kpi .val { font-size: 1.12rem; }
  .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-bg { padding: 0; }
  .modal { border-radius: 0; min-height: 100vh; border: 0; }
  .modal-foot { border-radius: 0; }
  .toolbar .input { min-width: 0; flex: 1; }
  .toolbar { padding: 10px; }
  h1 { font-size: 1.25rem; }
  .page-head { align-items: flex-start; }
  .auth-form .card { padding: 24px; }
}


/* ==========================================================================
   Thème « Glass » — icônes en verre colorées, fond pastel, menu clair
   ========================================================================== */
:root { --radius: 18px; --radius-sm: 12px; --side-bg: rgba(255, 255, 255, .72); --side-fg: #3a4558; --side-hover: rgba(15, 27, 45, .05); --side-active: #ffffff;
  --page-bg: radial-gradient(1100px 620px at 0% -10%, #ffe6d3 0%, transparent 60%), radial-gradient(900px 560px at 105% 0%, #e2ebff 0%, transparent 58%), radial-gradient(800px 600px at 50% 120%, #efe4ff 0%, transparent 60%), #f6f3ef; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --side-bg: rgba(14, 23, 38, .82); --side-fg: #c3cede; --side-hover: rgba(255, 255, 255, .06); --side-active: rgba(255, 255, 255, .09);
  --page-bg: radial-gradient(1000px 600px at 0% -10%, rgba(242, 122, 12, .12) 0%, transparent 60%), radial-gradient(900px 560px at 105% 0%, rgba(59, 130, 246, .14) 0%, transparent 58%), #0b1320; } }
:root[data-theme="dark"] { --side-bg: rgba(14, 23, 38, .82); --side-fg: #c3cede; --side-hover: rgba(255, 255, 255, .06); --side-active: rgba(255, 255, 255, .09);
  --page-bg: radial-gradient(1000px 600px at 0% -10%, rgba(242, 122, 12, .12) 0%, transparent 60%), radial-gradient(900px 560px at 105% 0%, rgba(59, 130, 246, .14) 0%, transparent 58%), #0b1320; }
body { background: var(--page-bg); background-attachment: fixed; }

/* L'icône « verre » */
.app-ic { --s: 52px; position: relative; display: inline-grid; place-items: center; flex: none; width: var(--s); height: var(--s); border-radius: 30%;
  background: linear-gradient(150deg, var(--g1), var(--g2)); color: #fff;
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .7), inset 0 -8px 14px rgba(0, 0, 0, .07), 0 10px 22px -10px var(--g2), 0 2px 5px -2px rgba(15, 27, 45, .18); }
.app-ic::before { content: ""; position: absolute; left: 6%; right: 6%; top: 4%; height: 46%; border-radius: 30% 30% 45% 45% / 40% 40% 60% 60%; background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0)); pointer-events: none; }
.app-ic svg.i { position: relative; width: 52%; height: 52%; color: #fff !important; stroke-width: 2.1; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .18)); }
.app-ic.letter b { position: relative; font-weight: 800; font-size: calc(var(--s) * .44); text-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.app-ic.xs { --s: 30px; border-radius: 9px; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .6), 0 4px 10px -6px var(--g2); }
.app-ic.xs svg.i { width: 17px; height: 17px; stroke-width: 2.2; }
.app-ic.sm { --s: 38px; border-radius: 11px; }
.app-ic.md { --s: 44px; border-radius: 13px; }
.app-ic.lg { --s: 64px; border-radius: 30%; }

/* Menu latéral clair en verre dépoli */
.sidebar { background: var(--side-bg); backdrop-filter: saturate(1.5) blur(20px); -webkit-backdrop-filter: saturate(1.5) blur(20px); color: var(--side-fg); border-right: 1px solid var(--border); }
.brand { color: var(--text); } .brand small { color: var(--muted); opacity: 1; }
.nav a { color: var(--side-fg); padding: 7px 10px; gap: 11px; border-radius: 12px; }
.nav a:hover { background: var(--side-hover); color: var(--text); }
.nav a.active { background: var(--side-active); color: var(--text); box-shadow: var(--shadow); }
.nav a.active::before { display: none; }
.nav .sep { color: var(--muted); opacity: 1; }
.nav::-webkit-scrollbar-thumb { background: var(--border-strong); }
.side-foot { border-top-color: var(--border); color: var(--muted); }
.side-foot .btn { color: var(--muted); } .side-foot .btn:hover { background: var(--side-hover); color: var(--text); }
.layout.collapsed .nav a { padding: 8px; }

/* Barre du haut */
.topbar { background: color-mix(in srgb, var(--surface) 70%, transparent); gap: 12px; }
#page-ic:empty { display: none; }

/* Cartes plus douces */
.card, .kpi, .table-wrap, .toolbar { border-color: color-mix(in srgb, var(--border) 70%, transparent); }
.card, .kpi { box-shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 12px 30px -12px rgba(15, 27, 45, .14); }
.kpi::after { display: none; }
.kpi .kpi-ic.app-ic { background: linear-gradient(150deg, var(--g1), var(--g2)); color: #fff; width: 48px; height: 48px; border-radius: 15px; }
.kpi .val { font-size: 1.55rem; }

/* Titres de page avec icône */
h1.ph { display: flex; align-items: center; gap: 12px; }

/* Écran d'accueil façon téléphone */
.launcher { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 18px 10px; margin: 4px 0 22px; padding: 20px 14px;
  background: color-mix(in srgb, var(--surface) 60%, transparent); backdrop-filter: blur(14px); border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); border-radius: 24px; box-shadow: 0 12px 30px -14px rgba(15, 27, 45, .16); }
.app-tile { display: flex; flex-direction: column; align-items: center; gap: 9px; text-decoration: none; color: var(--text); font-size: .8rem; font-weight: 600; text-align: center; line-height: 1.2; padding: 4px; border-radius: 16px; transition: transform .12s; }
.app-tile:hover { transform: translateY(-3px); }
.app-tile:active { transform: scale(.94); }
.app-tile:hover .app-ic { box-shadow: inset 0 1px 1px rgba(255, 255, 255, .7), inset 0 -8px 14px rgba(0, 0, 0, .07), 0 16px 28px -10px var(--g2); }

/* Bannière d'accueil en dégradé pastel */
.hero { background: linear-gradient(120deg, #6d8bff 0%, #9b6bff 48%, #ff8a7a 100%); border: 1px solid rgba(255, 255, 255, .35); border-radius: 24px; }
.hero::after { background: radial-gradient(circle, rgba(255, 255, 255, .35), transparent 70%); }
.hero .btn.primary { background: #fff; color: #5b3df0; border-color: #fff; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .3); }
.hero .btn.primary svg.i { color: #5b3df0; }

/* Produits, tables, chambres */
.prod { border-radius: 18px; padding: 14px; gap: 7px; }
.prod .app-ic { margin-bottom: 2px; }
.tile { border-radius: 20px; padding: 16px; gap: 7px; }
.tile::before { display: none; }
.tile.busy { background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 10%, var(--surface)), var(--surface) 75%); }

/* Boutons */
.btn { border-radius: 12px; }
.btn.primary { background: linear-gradient(150deg, #ffa24d, #f2700c); border-color: transparent; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .45), 0 8px 18px -8px rgba(242, 112, 12, .8); }
.btn.ok { background: linear-gradient(150deg, #4fdc98, #12a862); border-color: transparent; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .45), 0 8px 18px -8px rgba(18, 168, 98, .8); }
.tabs { border-radius: 14px; }
.modal { border-radius: 22px; } .modal-foot { border-radius: 0 0 22px 22px; }

/* Connexion */
.auth { background: var(--page-bg); }
.auth-side { background: linear-gradient(140deg, #6d8bff 0%, #9b6bff 45%, #ff8a7a 100%); }
.auth-side .feat div { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); backdrop-filter: blur(8px); }
.auth-side .feat svg.i { color: #fff; }
.auth-form .card { background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(16px); border-radius: 26px; }

@media (max-width: 900px) {
  .sidebar { background: var(--surface); }
  .launcher { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 6px; padding: 16px 8px; }
  .app-ic.lg { --s: 58px; }
}
@media (max-width: 560px) {
  .launcher { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app-ic.lg { --s: 64px; }
  .app-tile { font-size: .76rem; }
  .kpi .kpi-ic.app-ic { width: 40px; height: 40px; border-radius: 12px; }
}

.brand .logo { position: relative; border-radius: 30%; background: linear-gradient(150deg, #ffbe7a, #ff7a2f); border: 1px solid rgba(255, 255, 255, .55); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .7), 0 10px 22px -10px #ff7a2f; }
.brand .logo::before { content: ""; position: absolute; left: 6%; right: 6%; top: 4%; height: 46%; border-radius: 30% 30% 45% 45% / 40% 40% 60% 60%; background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0)); }

/* ---------- Photos produits ---------- */
.thumb { flex: none; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.thumb.sm { width: 40px; height: 40px; } .thumb.md { width: 52px; height: 52px; border-radius: 14px; }
.name-cell { display: flex; align-items: center; gap: 12px; }
.prod-img { width: 100%; height: 104px; object-fit: cover; border-radius: 13px; margin-bottom: 2px; background: var(--surface-2); }
.img-pick { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.img-prev { width: 110px; height: 110px; border-radius: 22px; overflow: hidden; background: var(--surface-2); border: 1px dashed var(--border-strong); display: grid; place-items: center; flex: none; }
.img-prev img { width: 100%; height: 100%; object-fit: cover; }
.img-empty svg.i { width: 34px; height: 34px; color: var(--muted); }

/* ---------- Assistance ---------- */
.help-btn { position: relative; }
.help-btn .dot { position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); border: 2px solid var(--surface); }
b.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--bad); color: #fff; font-size: .7rem; margin-left: 4px; }
.tabs button svg.i { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.support-ways .way { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); box-shadow: 0 12px 30px -14px rgba(15, 27, 45, .16); transition: transform .12s; }
.support-ways .way:hover { transform: translateY(-2px); }
.support-ways .way b { display: block; font-size: 1rem; } .support-ways .way span { font-size: .82rem; color: var(--muted); }
.support-ways .way:not([href]) { opacity: .55; pointer-events: none; }
.tickets { display: flex; flex-direction: column; gap: 10px; }
.ticket { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 13px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text); transition: border-color .12s, box-shadow .12s; }
.ticket:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.ticket.unread { background: linear-gradient(90deg, var(--info-soft), var(--surface) 60%); border-color: color-mix(in srgb, var(--info) 35%, var(--border)); }
.tk-main { flex: 1; min-width: 0; }
.tk-top { display: flex; justify-content: space-between; gap: 10px; }
.tk-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-last { font-size: .84rem; color: var(--text-2); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-badges { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; padding: 6px 2px 10px; }
.msg { max-width: 80%; padding: 10px 14px; border-radius: 18px; background: var(--surface-3); font-size: .9rem; line-height: 1.45; }
.msg .who { font-size: .72rem; font-weight: 700; opacity: .75; margin-bottom: 3px; }
.msg small { display: block; font-size: .7rem; opacity: .7; margin-top: 5px; }
.msg.them { align-self: flex-start; border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; border-bottom-right-radius: 6px; color: #fff; background: linear-gradient(150deg, #8cc8ff, #3b82f6); box-shadow: 0 8px 18px -10px #3b82f6; }
.chat-input { display: flex; gap: 10px; align-items: flex-end; margin-top: 10px; }
.chat-input textarea { min-height: 48px; }
.faq details { border-bottom: 1px solid var(--border); padding: 11px 2px; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: .9rem; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::after { content: "+"; color: var(--primary-d); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 8px 0 0; color: var(--text-2); font-size: .87rem; }
@media (max-width: 560px) { .chat-input { flex-direction: column; align-items: stretch; } .msg { max-width: 92%; } .tk-badges { display: none; } }
.tk-top { flex-wrap: wrap; } .tk-top b { white-space: normal; } .tk-top span { white-space: nowrap; }

/* ==========================================================================
   Une interface par métier : couleurs propres à chaque type d'entreprise
   ========================================================================== */
:root { --hero: linear-gradient(120deg, #6d8bff 0%, #9b6bff 48%, #ff8a7a 100%); --btn-grad: linear-gradient(150deg, #ffa24d, #f2700c); }
:root[data-service] { --primary-soft: color-mix(in srgb, var(--primary) 13%, var(--surface)); --primary-ring: color-mix(in srgb, var(--primary) 24%, transparent); }
:root[data-service="boutique"] { --primary: #10b981; --primary-d: #047857; --hero: linear-gradient(120deg, #34d399 0%, #10b981 50%, #0e9f9a 100%); --btn-grad: linear-gradient(150deg, #4ade80, #059669); }
:root[data-service="supermarche"] { --primary: #3b82f6; --primary-d: #1d4ed8; --hero: linear-gradient(120deg, #60a5fa 0%, #3b82f6 50%, #6366f1 100%); --btn-grad: linear-gradient(150deg, #60a5fa, #2563eb); }
:root[data-service="pharmacie"] { --primary: #14b8a6; --primary-d: #0f766e; --hero: linear-gradient(120deg, #5eead4 0%, #14b8a6 50%, #0e7490 100%); --btn-grad: linear-gradient(150deg, #2dd4bf, #0d9488); }
:root[data-service="quincaillerie"] { --primary: #f59e0b; --primary-d: #b45309; --hero: linear-gradient(120deg, #fcd34d 0%, #f59e0b 50%, #ea580c 100%); --btn-grad: linear-gradient(150deg, #fbbf24, #d97706); }
:root[data-service="restaurant"] { --primary: #ef5b3a; --primary-d: #c2410c; --hero: linear-gradient(120deg, #ffb36b 0%, #ff7a59 50%, #e2433c 100%); --btn-grad: linear-gradient(150deg, #ff8a65, #e8492e); }
:root[data-service="hotel"] { --primary: #8b5cf6; --primary-d: #6d28d9; --hero: linear-gradient(120deg, #c4b5fd 0%, #8b5cf6 50%, #5b21b6 100%); --btn-grad: linear-gradient(150deg, #a78bfa, #7c3aed); }
:root[data-service="hotel_restaurant"] { --primary: #6366f1; --primary-d: #4338ca; --hero: linear-gradient(120deg, #93c5fd 0%, #6366f1 50%, #a855f7 100%); --btn-grad: linear-gradient(150deg, #818cf8, #4f46e5); }
:root[data-service="services"] { --primary: #ec4899; --primary-d: #be185d; --hero: linear-gradient(120deg, #f9a8d4 0%, #ec4899 50%, #a855f7 100%); --btn-grad: linear-gradient(150deg, #f472b6, #db2777); }
body { background: radial-gradient(1100px 620px at 0% -10%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 60%), var(--page-bg); background-attachment: fixed; }
.hero { background: var(--hero); }
.hero .btn.primary { color: var(--primary-d); } .hero .btn.primary svg.i { color: var(--primary-d); }
.btn.primary { background: var(--btn-grad); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .45), 0 8px 18px -8px color-mix(in srgb, var(--primary) 85%, transparent); }
.hero .btn.primary { background: #fff; }
.brand .logo { background: var(--btn-grad); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .7), 0 10px 22px -10px var(--primary); }
.nav a.active { box-shadow: var(--shadow), inset 3px 0 0 var(--primary); }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35); padding: 4px 12px 4px 4px; border-radius: 99px; font-size: .78rem; font-weight: 700; margin-bottom: 10px; }
.hero-tag .app-ic { --g1: rgba(255, 255, 255, .55) !important; --g2: rgba(255, 255, 255, .2) !important; box-shadow: none; }

/* Blocs métier du tableau de bord */
.kpipe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.kpipe div { background: var(--warn-soft); color: var(--warn); border-radius: 14px; padding: 10px; text-align: center; }
.kpipe div:nth-child(2) { background: var(--info-soft); color: var(--info); } .kpipe div.ok { background: var(--ok-soft); color: var(--ok); }
.kpipe b { display: block; font-size: 1.5rem; } .kpipe span { font-size: .75rem; font-weight: 600; }
.mini-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.mini { text-decoration: none; color: var(--text); border-radius: 12px; padding: 9px; background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); display: flex; flex-direction: column; font-size: .78rem; }
.mini.busy { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.mini b { font-size: .85rem; } .mini span { color: var(--muted); }
.occbar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--surface-3); }
.occbar i.o { background: linear-gradient(90deg, #a78bfa, #7c3aed); } .occbar i.c { background: linear-gradient(90deg, #7dd3fc, #0ea5e9); } .occbar i.f { background: linear-gradient(90deg, #86efac, #16a34a); }
.news h2 { display: flex; align-items: center; gap: 8px; }
.news-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: 0; } .news-item p { margin: 3px 0 0; font-size: .86rem; color: var(--text-2); }

/* Documents (factures, reçus, rapports) en aperçu */
.doc-preview { background: #fff; color: #111; border-radius: 14px; padding: 22px; border: 1px solid var(--border); max-height: 60vh; overflow: auto; }

/* Espace créateur élargi */
.creator-bar { background: linear-gradient(90deg, color-mix(in srgb, #7c3aed 14%, var(--surface)), var(--surface)); color: var(--text); gap: 12px; }
.creator-bar svg.i { color: #7c3aed; } .creator-bar > span { flex: 1; min-width: 200px; }
.creator-bar select.input { width: auto; min-height: 34px; padding: 5px 10px; font-size: .85rem; }
.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.co-card { background: var(--surface); border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); border-radius: 22px; padding: 18px; box-shadow: 0 12px 30px -14px rgba(15, 27, 45, .18); display: flex; flex-direction: column; gap: 14px; }
.co-top { display: flex; align-items: center; gap: 12px; } .co-name { flex: 1; min-width: 0; display: flex; flex-direction: column; } .co-name b { font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-logo { object-fit: contain; background: #fff; border: 1px solid var(--border); flex: none; }
.co-logo.md { width: 44px; height: 44px; border-radius: 13px; } .co-logo.sm { width: 38px; height: 38px; border-radius: 11px; }
.co-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.co-stats div { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; } .co-stats span { display: block; font-size: .7rem; color: var(--muted); font-weight: 600; } .co-stats b { font-size: .95rem; }
.co-meta { line-height: 1.7; } .co-acts { display: flex; gap: 6px; flex-wrap: wrap; } .co-acts .btn.primary { flex: 1; }
.matrix th.c, .matrix td.c { text-align: center; min-width: 110px; }
.matrix .mx-title { font-size: .7rem; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--text-2); margin: 4px 0; white-space: normal; }
.matrix .mx-all { justify-content: center; font-size: .72rem; text-transform: none; letter-spacing: 0; }
.matrix input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer; }
.upd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; } .upd-grid .card + .card { margin-top: 0; }
.img-prev.sm { width: 72px; height: 72px; border-radius: 16px; }
#c-tabs { margin-bottom: 20px; }
b.count[hidden], [hidden] { display: none !important; }

/* Installation de l'application */
.install-cta { margin-top: 14px; border-style: dashed; }
.install-help { display: grid; gap: 14px; }
.install-help .ih { display: flex; gap: 14px; align-items: flex-start; }
.install-help p { margin: 4px 0 0; font-size: .88rem; color: var(--text-2); }

/* Sécurité : double authentification */
.mfa-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); margin: 6px 0; }
.mfa-row > div { display: flex; gap: 10px; align-items: flex-start; } .mfa-row svg.i { color: var(--ok); margin-top: 2px; }
.mfa-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: .9rem; }
.mfa-key { font-family: ui-monospace, Consolas, monospace; font-size: 1.15rem; font-weight: 700; letter-spacing: .08em; background: var(--surface-3); padding: 10px 12px; border-radius: 10px; margin: 8px 0; word-break: break-all; user-select: all; }
.mfa-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; } .mfa-codes code { font-size: 1rem; padding: 8px; text-align: center; }

/* ==========================================================================
   Lot 1 — cartes produits, encaissement en 2 étapes, reçus, logo
   ========================================================================== */
.brand-mark { width: 40px; height: 40px; border-radius: 12px; flex: none; filter: drop-shadow(0 6px 12px rgba(109, 40, 217, .35)); }
.brand-mark.sm { width: 36px; height: 36px; }
svg.i.rot { transform: rotate(180deg); }

/* ---------- Cartes produits ---------- */
.prod-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.pcard { position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; cursor: pointer; color: var(--text);
  background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--border) 80%, transparent); border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 8px 22px -14px rgba(15, 27, 45, .22);
  transition: transform .16s cubic-bezier(.2, .8, .3, 1), box-shadow .16s, border-color .16s; -webkit-tap-highlight-color: transparent; }
.pcard:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(15, 27, 45, .06), 0 16px 30px -14px color-mix(in srgb, var(--primary) 45%, transparent); border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.pcard:active { transform: scale(.965); transition-duration: .06s; }
.pcard:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--primary-ring); }
.pcard.sel { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring), 0 14px 28px -16px var(--primary); }
.pcard.bump { animation: pc-bump .38s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes pc-bump { 0% { transform: scale(1); } 35% { transform: scale(.95); } 70% { transform: scale(1.03); } 100% { transform: scale(1); } }
.pc-media { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(160deg, var(--surface-2), var(--surface-3)); display: grid; place-items: center; overflow: hidden; }
.pc-media img { width: 100%; height: 100%; object-fit: contain; padding: 6px; transition: transform .3s; }
.pcard:hover .pc-media img { transform: scale(1.04); }
.pc-media .app-ic { --s: 58px; }
.pc-flag { position: absolute; top: 8px; left: 8px; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 4px 9px; border-radius: 99px; color: #fff; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35); }
.pc-flag.bad { background: #dc2626; } .pc-flag.warn { background: #d97706; }
.pc-qty { position: absolute; top: 8px; right: 8px; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 99px; background: var(--primary); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .9rem; box-shadow: 0 6px 14px -6px var(--primary); animation: pc-pop .25s ease-out; }
@keyframes pc-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.pc-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pc-name { font-weight: 700; font-size: .9rem; line-height: 1.25; overflow-wrap: anywhere; }
.pc-meta { font-size: .72rem; color: var(--muted); font-weight: 600; }
.pc-price { margin-top: auto; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.pc-price b { font-size: 1.05rem; font-weight: 800; color: var(--primary-d); letter-spacing: -.01em; }
.pc-price span { font-size: .72rem; color: var(--muted); font-weight: 600; }
.pc-cost { font-size: .7rem; color: var(--text-2); background: var(--surface-3); border-radius: 7px; padding: 2px 7px; align-self: flex-start; }
.pc-stock { font-size: .74rem; color: var(--ok); font-weight: 600; }
.pc-stock.warn { color: var(--warn); } .pc-stock.bad { color: var(--bad); }
.pcard.out { opacity: .78; } .pcard.out .pc-media { filter: grayscale(.6); }
.cl-main { display: flex; gap: 10px; align-items: flex-start; }
@media (max-width: 560px) { .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .pc-body { padding: 8px 10px 10px; } }
@media (prefers-reduced-motion: reduce) { .pcard, .pcard.bump, .pc-qty, .pc-media img { animation: none !important; transition: none !important; } }

/* ---------- Encaissement en 2 étapes ---------- */
.wz-steps { display: flex; gap: 8px; margin-bottom: 16px; }
.wz-steps span { flex: 1; text-align: center; padding: 9px 10px; border-radius: 12px; background: var(--surface-3); color: var(--muted); font-weight: 700; font-size: .85rem; display: flex; align-items: center; justify-content: center; gap: 6px; }
.wz-steps span svg { display: none; width: 16px; height: 16px; }
.wz-steps span.on { background: var(--primary); color: #fff; box-shadow: 0 8px 18px -10px var(--primary); }
.wz-steps span.done { background: var(--ok-soft); color: var(--ok); } .wz-steps span.done svg { display: inline; }
.wz-ask { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; padding: 14px 16px; border-radius: 14px; background: var(--primary-soft); color: var(--text); margin-bottom: 14px; }
.wz-ask svg.i { color: var(--primary-d); width: 22px; height: 22px; }
.wz-sum { border: 1px solid var(--border); border-radius: 14px; padding: 6px 14px; margin: 10px 0 14px; background: var(--surface-2); }
.wz-sum > div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: .95rem; }
.wz-sum > div:last-child { border-bottom: 0; }
.wz-sum .big { font-size: 1.35rem; font-weight: 800; color: var(--primary-d); }
.wz-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.wz-big { font-size: 1.5rem !important; font-weight: 800; min-height: 54px !important; text-align: right; }
.wz-next, .wz-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.wz-actions #pm-ok { flex: 1; min-width: 240px; }
#wz-lim.err { color: var(--bad); font-weight: 700; }
.wz-recap { display: flex; flex-direction: column; gap: 8px; max-height: 38vh; overflow-y: auto; padding-right: 4px; }
.wz-line { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); animation: wz-in .25s ease-out; }
@keyframes wz-in { from { transform: translateY(6px); } to { transform: none; } }
.wz-line img { width: 54px; height: 54px; border-radius: 12px; object-fit: contain; background: var(--surface-2); flex: none; }
.wz-ln { flex: 1; min-width: 0; display: flex; flex-direction: column; } .wz-ln b { overflow-wrap: anywhere; } .wz-ln span { color: var(--muted); font-size: .85rem; }
.wz-lt { font-size: 1.02rem; white-space: nowrap; }
.wz-cash { margin-top: 8px; padding: 10px 14px; border-radius: 12px; font-size: 1rem; display: flex; align-items: center; gap: 8px; background: var(--surface-2); }
.wz-cash.bad { background: var(--bad-soft); color: var(--bad); } .wz-cash.ok { background: var(--ok-soft); color: var(--ok); }
@media (max-width: 560px) { .wz-choice { grid-template-columns: 1fr; } .wz-actions .btn { flex: 1; } }

/* ---------- Ticket de caisse : noir, gras, lisible ---------- */
.receipt { font-family: Arial, Helvetica, sans-serif !important; color: #000 !important; font-size: 13.5px; font-weight: 600; line-height: 1.35; width: 300px; padding: 14px 12px; background: #fff; }
.receipt * { color: #000 !important; }
.receipt .c { text-align: center; }
.receipt .rc-logo img { max-width: 110px; max-height: 80px; object-fit: contain; filter: grayscale(1) contrast(1.4); }
.receipt .rc-name { font-size: 18px; font-weight: 800; text-transform: uppercase; margin-top: 4px; }
.receipt .rc-co { font-size: 12px; font-weight: 600; }
.receipt .rc-sep { border-top: 2px dashed #000; margin: 8px 0; }
.receipt .rc-title { font-size: 15px; font-weight: 800; letter-spacing: .03em; }
.receipt table { width: 100%; border-collapse: collapse; font-size: 13px; }
.receipt td, .receipt th { padding: 2px 0; vertical-align: top; }
.receipt th { text-align: left; font-size: 11.5px; text-transform: uppercase; border-bottom: 1.5px solid #000; padding-bottom: 3px; }
.receipt .r { text-align: right; white-space: nowrap; }
.receipt .rc-it { font-weight: 700; padding-top: 5px; }
.receipt .rc-q { font-weight: 600; padding-left: 8px; }
.receipt .rc-big td { font-size: 18px; font-weight: 900; border-top: 2px solid #000; border-bottom: 2px solid #000; padding: 5px 0; }
.receipt .rc-b td { font-weight: 800; font-size: 14px; }
.receipt .rc-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.receipt .rc-qr svg { width: 130px; height: 130px; }
.receipt .rc-qr .qr-txt { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 700; }
.receipt .rc-qr .qr-txt b { font-size: 12.5px; font-weight: 800; }
.receipt .rc-qr.expired { font-size: 11px; display: block; }
.receipt .rc-foot { font-size: 12.5px; font-weight: 700; }
.receipt .rc-by { font-size: 10px; font-weight: 600; margin-top: 4px; }
.receipt img { max-width: 110px; }

/* ---------- Mot de passe oublié ---------- */
.pw-track { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; margin: 10px 0; font-size: .86rem; background: var(--surface-2); border: 1px solid var(--border); }
.pw-track.warn { background: var(--warn-soft); } .pw-track.ok { background: var(--ok-soft); } .pw-track.bad { background: var(--bad-soft); }
.pw-done { text-align: center; padding: 10px 0; } .pw-done > svg.i { width: 46px; height: 46px; color: var(--ok); background: var(--ok-soft); border-radius: 50%; padding: 10px; }
.pw-done h2 { margin: 8px 0; } .pw-done p { color: var(--text-2); font-size: .9rem; }
.pw-box { margin-bottom: 16px; } .pw-box h2 { display: flex; align-items: center; gap: 8px; }
.pw-item { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border); }
.pw-item:last-child { border-bottom: 0; } .pw-item.pending { background: linear-gradient(90deg, var(--warn-soft), transparent 70%); border-radius: 12px; padding: 10px; }
.pw-av { width: 38px; height: 38px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-d); display: grid; place-items: center; font-weight: 800; flex: none; }
.pw-main { flex: 1; min-width: 0; }
.pw-code { text-align: center; display: flex; flex-direction: column; gap: 8px; padding: 10px 0 4px; }
.pw-code-val { font-family: ui-monospace, Consolas, monospace; font-size: 2.4rem; font-weight: 900; letter-spacing: .14em; background: var(--surface-3); border: 2px dashed var(--primary); border-radius: 16px; padding: 14px; user-select: all; }

/* ---------- Abonnements ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.plan-card { border: 1.5px solid var(--border); border-radius: 20px; padding: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; box-shadow: 0 10px 26px -18px rgba(15, 27, 45, .3); }
.plan-card.current { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.plan-card.off { opacity: .6; }
.plan-name { font-weight: 800; font-size: 1.1rem; }
.plan-price b { font-size: 1.6rem; font-weight: 900; letter-spacing: -.02em; } .plan-price span { color: var(--muted); font-size: .85rem; }
.plan-desc { margin: 0; color: var(--text-2); font-size: .86rem; } .plan-meta { font-size: .8rem; font-weight: 700; color: var(--muted); }
.plan-feat { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 5px; font-size: .84rem; flex: 1; }
.plan-feat li { display: flex; gap: 6px; align-items: flex-start; } .plan-feat svg.i { width: 15px; height: 15px; color: var(--ok); flex: none; margin-top: 2px; }
.plan-feat li.soon { color: var(--muted); } .plan-feat li.soon svg.i { color: var(--muted); } .plan-feat em { font-size: .72rem; background: var(--surface-3); border-radius: 6px; padding: 1px 6px; font-style: normal; }
.sub-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.sub-head h2 { margin: 2px 0 6px; font-size: 1.3rem; }
.sub-pay { background: var(--ok-soft); border-radius: 14px; padding: 10px 14px; margin: 10px 0; } .sub-pay p { margin: 4px 0 0; font-size: .9rem; }
.calc { grid-template-columns: repeat(3, 1fr); margin-bottom: 14px; } @media (max-width: 700px) { .calc { grid-template-columns: 1fr 1fr; } }
.plan-feat { align-content: start; }

/* ===== Lot 4 : devis & commandes, retours, fidélité ===== */
.doc-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.doc-acts { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.wz-loy { margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--border); background: var(--surface-2); }
.wz-loy-in { display: flex; gap: 8px; align-items: center; }
.wz-loy-in svg { color: #f59e0b; }
.wz-loy-use { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 8px; }
.wz-loy-use .field { flex: 1; min-width: 160px; }
.cl-head { display: flex; gap: 14px; align-items: center; }
.cl-head h2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.badge svg { width: 12px; height: 12px; vertical-align: -2px; }

/* ===== Lot 5 : stock avancé ===== */
.pu-extra { grid-template-columns: 1fr 1fr; margin: -2px 0 12px; padding: 8px 10px; border-left: 3px solid var(--border); background: var(--surface-2); border-radius: 0 10px 10px 0; }
.inv-due { border-color: #f59e0b; box-shadow: 0 0 0 1px #f59e0b33; }
#st-tabs { flex-wrap: wrap; }

/* ===== Lot 6 : caisse et finances ===== */
.denoms { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.denom { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.denom span { font-weight: 700; font-size: 13px; }
.warn-btn { border-color: #f59e0b !important; color: #b45309 !important; }
.rc-sign { margin-top: 18px; font-size: 12px; }
#fi-tabs { flex-wrap: wrap; }

/* ===== Lot 7 : alertes et analyses ===== */
.alert-list { display: grid; gap: 10px; }
.alert-item { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); border-left-width: 4px; background: var(--surface); }
.alert-item.lvl-alert { border-left-color: #ef4444; } .alert-item.lvl-warn { border-left-color: #f59e0b; } .alert-item.lvl-info { border-left-color: #3b82f6; }
.alert-item.acked { opacity: .65; }
.alert-item p { margin: 6px 0; }
.al-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.al-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.alert-card { border-color: #f59e0b; }
.feed { display: grid; gap: 6px; max-height: 420px; overflow: auto; }
.feed-it { display: grid; grid-template-columns: 48px 1fr auto; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); border-left: 3px solid var(--border); }
.feed-it.k-vente { border-left-color: #22c55e; } .feed-it.k-annulation { border-left-color: #ef4444; } .feed-it.k-retour { border-left-color: #f59e0b; } .feed-it.k-caisse { border-left-color: #3b82f6; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 4px; animation: livepulse 1.6s infinite; }
@keyframes livepulse { 50% { opacity: .3; } }
.hbar.goal { position: relative; height: 14px; }
.hbar.goal em { position: absolute; top: -4px; width: 3px; height: 22px; background: var(--text); border-radius: 2px; }
.reco { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.reco .rk-urgent { color: var(--bad); font-weight: 600; }
#in-tabs { flex-wrap: wrap; }

/* ===== Lot 8 : finitions téléphone ===== */
@media (max-width: 600px) {
  .toolbar > select.input { flex: 1 1 100%; min-width: 0; }
  .toolbar > .field { flex: 1 1 45%; }
  .doc-acts .btn, .al-foot .btn { flex: 1 1 auto; }
  .denoms { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Lot 9 : souscription et file des paiements ===== */
.mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: .3px; }
.req-card { border-left: 4px solid var(--border); margin: 12px 0; }
.req-card.st-à-vérifier { border-left-color: #3b82f6; } .req-card.st-en-attente { border-left-color: #f59e0b; } .req-card.st-activé { border-left-color: #22c55e; } .req-card.st-refusé { border-left-color: #ef4444; }
.req-steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 12px; }
.req-steps span { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.req-steps span.on { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; font-weight: 600; }
.req-steps span.done { background: #dcfce7; color: #15803d; border-color: #86efac; }
.req-steps svg { width: 13px; height: 13px; }
.pay-m { padding: 8px 10px; margin-top: 6px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.notif-list { display: grid; gap: 8px; }
.notif { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); border-left: 4px solid #3b82f6; }
.notif.lvl-alert { border-left-color: #ef4444; } .notif.lvl-warn { border-left-color: #f59e0b; }
.notif.read { opacity: .6; }
.notif p { margin: 4px 0; }

/* ===== Lot 11 : secteurs et assistant de création ===== */
.create-tile { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 18px; padding: 16px 18px; border: 0; border-radius: 18px; cursor: pointer; text-align: left; color: #fff;
  background: linear-gradient(120deg, #6366f1, #8b5cf6 55%, #ec4899); box-shadow: 0 10px 28px -12px #6366f1aa; transition: transform .15s, box-shadow .15s; }
.create-tile:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px #6366f1cc; }
.create-tile b { display: block; font-size: 17px; letter-spacing: .5px; } .create-tile small { opacity: .9; }
.create-tile > span:nth-child(2) { flex: 1; }
.ct-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.2); }
.ct-ic svg, .create-tile > svg { width: 26px; height: 26px; stroke: #fff; }
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; max-height: 56vh; overflow: auto; padding: 2px; }
.sec-card { display: flex; flex-direction: column; text-align: left; padding: 0; border: 2px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); cursor: pointer; transition: border-color .15s, transform .15s; color: inherit; font: inherit; }
.sec-card:hover { transform: translateY(-2px); }
.sec-card.sel { border-color: var(--primary, #6366f1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #6366f1) 25%, transparent); }
.sec-card img { width: 100%; height: 64px; object-fit: cover; display: block; }
.sec-body { padding: 10px 12px 12px; }
.sec-name { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.sec-body p { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); }
.sec-body ul { margin: 0; padding: 0; list-style: none; font-size: 12px; display: grid; gap: 2px; }
.sec-body li svg { width: 12px; height: 12px; color: #16a34a; vertical-align: -2px; }
.sec-up { margin-top: 6px; font-size: 11.5px; color: #b45309; }
.sec-ban { position: relative; border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.sec-ban img { width: 100%; height: 90px; object-fit: cover; display: block; }
.sec-ban b { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #fff; font-size: 20px; text-shadow: 0 2px 8px rgba(0,0,0,.25); }
.hero { position: relative; overflow: hidden; }
.hero-art { position: absolute; right: -30px; top: 0; height: 100%; width: auto; opacity: .55; pointer-events: none; }
.hero > :not(.hero-art) { position: relative; }
.modal .grow { flex: 1; }
@media (max-width: 600px) { .hero-art { opacity: .25; } .sec-grid { grid-template-columns: 1fr; max-height: none; } }

/* ===== Lot 12 : agenda, dossiers, contrats, interventions ===== */
.timeline { display: grid; gap: 8px; max-height: 320px; overflow: auto; }
.tl-it { padding: 8px 10px; border-left: 3px solid var(--primary, #6366f1); background: var(--surface-2); border-radius: 0 10px 10px 0; }
.tl-it p { margin: 4px 0 0; }
.wo-board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; }
.wo-col { background: var(--surface-2); border-radius: 14px; padding: 10px; min-height: 120px; }
.wo-col h3 { margin: 0 0 8px; display: flex; gap: 6px; align-items: center; font-size: 14px; }
.wo-card { display: grid; gap: 4px; padding: 10px; margin-bottom: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
@media (max-width: 900px) { .wo-board { grid-template-columns: 1fr; } }

/* Lot 15 : assistant */
.ast-log { max-height: 55vh; min-height: 180px; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 10px; }
.ast-q { align-self: flex-end; max-width: 80%; background: var(--primary, #4F46E5); color: #fff; padding: 8px 12px; border-radius: 14px 14px 4px 14px; }
.ast-a { align-self: flex-start; max-width: 100%; background: var(--surface-2, rgba(127,127,127,.08)); padding: 10px 12px; border-radius: 14px 14px 14px 4px; }
.ast-a p { margin: 0 0 6px; } .ast-a .chip { margin: 4px 6px 0 0; }
.ast-form { display: flex; gap: 8px; } .ast-form .input { flex: 1; }
#ast-mic.rec { background: #dc2626; color: #fff; }
.ast-card { display: flex; gap: 12px; align-items: flex-start; } .ast-card img, .ast-ph { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; flex: none; }
.ast-ph { display: grid; place-items: center; font-size: 1.8rem; font-weight: 900; background: rgba(127,127,127,.15); }
.ast-kv { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0; font-size: .9rem; }
