/* Panel NXGS — style épuré. Thème (clair, sombre) et couleur d'accent au choix du commerce. */
:root {
  --bg: #ffffff; --side: #fafafa; --surface: #ffffff; --soft: #f6f7f6; --soft-2: #eff1ef;
  --line: #ebedec; --line-2: #dde1de; --text: #0d0d0d; --muted: #616864; --faint: #858c88;
  --shadow: 0 1px 2px rgba(13, 13, 13, .05);
  --pop: 0 12px 32px rgba(13, 13, 13, .14), 0 0 0 1px rgba(13, 13, 13, .06);
  --acc: #17834a; --acc-line: #1e9e5a; --acc-soft: #e7f5ed; --on-acc: #ffffff;
  --ok: #157a45; --ok-soft: #e7f5ed; --warn: #8a5a00; --warn-soft: #fcf1dc; --bad: #b42318; --bad-soft: #fde8e5; --info: #2457c5; --info-soft: #e8effc;
  --mk-a: #0d0d0d;
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
[data-accent="bleu"] { --acc: #2457c5; --acc-line: #3b6fd8; --acc-soft: #e8effc; }
[data-accent="violet"] { --acc: #6a3fc7; --acc-line: #7c5cd6; --acc-soft: #efeafc; }
[data-accent="rose"] { --acc: #c2346f; --acc-line: #d94a85; --acc-soft: #fde8f0; }
[data-accent="noir"] { --acc: #0d0d0d; --acc-line: #0d0d0d; --acc-soft: #eeefee; }
[data-theme="sombre"] {
  --bg: #0e100f; --side: #121513; --surface: #161917; --soft: #1c201d; --soft-2: #242925;
  --line: #262b27; --line-2: #343b36; --text: #f2f5f3; --muted: #a2aba6; --faint: #7f8883;
  --shadow: none; --pop: 0 16px 40px rgba(0, 0, 0, .5), 0 0 0 1px #343b36;
  --acc: #3ddc84; --acc-line: #3ddc84; --acc-soft: rgba(61, 220, 132, .13); --on-acc: #04170b;
  --ok: #3ddc84; --ok-soft: rgba(61, 220, 132, .13); --warn: #f5c04a; --warn-soft: rgba(245, 192, 74, .13); --bad: #ff7a6e; --bad-soft: rgba(255, 122, 110, .13); --info: #7cb2ff; --info-soft: rgba(124, 178, 255, .13);
  --mk-a: #f2f5f3;
  color-scheme: dark;
}
[data-theme="sombre"][data-accent="bleu"] { --acc: #7cb2ff; --acc-line: #7cb2ff; --acc-soft: rgba(124, 178, 255, .14); --on-acc: #06152b; }
[data-theme="sombre"][data-accent="violet"] { --acc: #b49cff; --acc-line: #b49cff; --acc-soft: rgba(180, 156, 255, .15); --on-acc: #160c33; }
[data-theme="sombre"][data-accent="rose"] { --acc: #ff8fb8; --acc-line: #ff8fb8; --acc-soft: rgba(255, 143, 184, .14); --on-acc: #33081a; }
[data-theme="sombre"][data-accent="noir"] { --acc: #f2f5f3; --acc-line: #f2f5f3; --acc-soft: rgba(242, 245, 243, .1); --on-acc: #0d0d0d; }

/* Couleurs de l'équipe et des catégories (fond, texte) */
.c-vert { --c-bg: #e7f5ed; --c-fg: #11653a; --c-dot: #1e9e5a; }
.c-bleu { --c-bg: #e8effc; --c-fg: #244e9e; --c-dot: #3b6fd8; }
.c-ambre { --c-bg: #fcf1dc; --c-fg: #7a5200; --c-dot: #e0a82e; }
.c-violet { --c-bg: #efeafc; --c-fg: #5236a3; --c-dot: #7c5cd6; }
.c-rose { --c-bg: #fde8f0; --c-fg: #9b2557; --c-dot: #d94a85; }
.c-cyan { --c-bg: #e3f4f4; --c-fg: #1f6f6f; --c-dot: #2fa3a3; }
.c-gris { --c-bg: #f0f1f0; --c-fg: #4d5450; --c-dot: #8b928e; }
[data-theme="sombre"] .c-vert { --c-bg: rgba(61, 220, 132, .14); --c-fg: #8ff0bb; }
[data-theme="sombre"] .c-bleu { --c-bg: rgba(124, 178, 255, .15); --c-fg: #b5d2ff; }
[data-theme="sombre"] .c-ambre { --c-bg: rgba(245, 192, 74, .14); --c-fg: #f7d68a; }
[data-theme="sombre"] .c-violet { --c-bg: rgba(180, 156, 255, .15); --c-fg: #d3c6ff; }
[data-theme="sombre"] .c-rose { --c-bg: rgba(255, 143, 184, .14); --c-fg: #ffc2d8; }
[data-theme="sombre"] .c-cyan { --c-bg: rgba(95, 210, 210, .14); --c-fg: #a8e6e6; }
[data-theme="sombre"] .c-gris { --c-bg: rgba(255, 255, 255, .07); --c-fg: #c4cbc7; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; transition: background .25s, color .25s; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num, td, .kpi-v { font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; }
.ok { color: var(--ok); } .bad { color: var(--bad); }
.i { width: 17px; height: 17px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--acc); color: var(--on-acc); border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--acc-line); outline-offset: 2px; }
.mark { width: 26px; height: 26px; flex: none; }
.mk-a { fill: var(--mk-a); } .mk-b { fill: var(--acc-line); }
[data-accent="noir"] .mk-b { fill: #1e9e5a; }

/* Structure */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; padding: 18px 14px 14px; background: var(--side); border-right: 1px solid var(--line); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; min-width: 0; }
.brand strong { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { display: block; font-size: 12px; color: var(--muted); }
.brand span { min-width: 0; }
.nav { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.nav:hover { background: var(--soft-2); color: var(--text); }
.nav.on { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.nav.on .i { color: var(--acc-line); }
.nav em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); }
.nav-sec { padding: 22px 10px 6px; font-size: 12px; color: var(--faint); }
.me { margin-top: auto; position: relative; border-top: 1px solid var(--line); padding-top: 12px; }
.me summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.me summary::-webkit-details-marker { display: none; }
.me summary:hover { background: var(--soft-2); }
.me summary strong { display: block; font-size: 13.5px; font-weight: 600; }
.me summary small { display: block; font-size: 12px; color: var(--muted); }
.me-menu { position: absolute; left: 0; bottom: calc(100% + 8px); width: 280px; padding: 14px; background: var(--surface); border-radius: 12px; box-shadow: var(--pop); z-index: 30; display: flex; flex-direction: column; gap: 12px; }
.me-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.me-out { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: var(--soft); cursor: pointer; font-weight: 500; }
.me-out:hover { background: var(--soft-2); }
.me form { margin: 0; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px 32px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-title { min-width: 0; margin-right: auto; }
.top-title h1 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title p { font-size: 13px; color: var(--muted); }
.search { display: flex; align-items: center; gap: 8px; width: 260px; height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; }
.search kbd { font: inherit; font-size: 11.5px; padding: 0 5px; border: 1px solid var(--line-2); border-radius: 4px; }
.search:focus-within { border-color: var(--acc-line); }
.top-actions { display: flex; gap: 8px; align-items: center; }
.top-actions form { margin: 0; }
.icon-btn.menu-btn { display: none; }
.content { flex: 1; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 22px; max-width: 1360px; width: 100%; }
.content.wide { max-width: none; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, filter .15s; }
.btn:hover { background: var(--soft); }
.btn .i { width: 16px; height: 16px; }
.btn-primary { background: var(--acc); border-color: transparent; color: var(--on-acc); }
.btn-primary:hover { background: var(--acc); filter: brightness(1.1); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; height: 44px; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--text); background: var(--soft); }
.link { color: var(--acc); font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-actions form { margin: 0; }

/* Cartes, chiffres, listes */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 0; }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.card-head h2 { font-size: 15px; font-weight: 600; }
.card-head + .list, .card-head + .table-wrap { border-top: 1px solid var(--line); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 18px 20px; }
.kpi small { display: block; font-size: 13px; color: var(--muted); }
.kpi-v { display: block; margin-top: 6px; font-size: 27px; font-weight: 600; letter-spacing: -.02em; }
.kpi p { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.kpi p b { color: var(--ok); font-weight: 600; }
.meter { height: 5px; margin-top: 10px; border-radius: 3px; background: var(--soft-2); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 3px; background: var(--acc-line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); min-width: 0; }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .grow small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list a.grow:hover strong { color: var(--acc); }
.time { width: 48px; flex: none; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--c-dot, var(--faint)); }
.av { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; font-size: 11.5px; font-weight: 600; background: var(--c-bg); color: var(--c-fg); }
.av.lg { width: 56px; height: 56px; font-size: 19px; }
.av-vert { --c-bg: #dff3e8; --c-fg: #157a45; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--soft-2); color: var(--muted); }
.p-green { background: var(--ok-soft); color: var(--ok); } .p-blue { background: var(--info-soft); color: var(--info); }
.p-amber { background: var(--warn-soft); color: var(--warn); } .p-red { background: var(--bad-soft); color: var(--bad); }
.p-acc { background: var(--acc-soft); color: var(--acc); }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--c-bg, var(--soft-2)); color: var(--c-fg, var(--muted)); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 10px 20px; font-size: 12.5px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--soft); }
.table .r { text-align: right; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who strong { display: block; font-weight: 600; }
.who small { display: block; font-size: 12.5px; color: var(--muted); }
a.who:hover strong { color: var(--acc); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; gap: 3px; padding: 3px; border-radius: 9px; background: var(--soft-2); }
.seg a, .seg label span { white-space: nowrap; display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; }
.seg a.on, .seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg input:focus-visible + span { outline: 2px solid var(--acc-line); }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 56px 24px; }
.empty-ico { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--soft-2); }
.empty h2 { font-size: 17px; font-weight: 600; }
.empty p { color: var(--muted); max-width: 420px; }
.empty .btn { margin-top: 6px; }

/* Messages */
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 10px; max-width: 420px; padding: 12px 16px; border-radius: 10px; background: #0d0d0d; color: #ffffff; font-weight: 500; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); animation: pop .35s cubic-bezier(.2, .8, .2, 1) both; }
[data-theme="sombre"] .toast { background: #f2f5f3; color: #0d0d0d; }
.toast .i { color: #3ddc84; }
[data-theme="sombre"] .toast .i { color: #157a45; }
.toast.err .i { color: #ff7a6e; }
.toast.hide { animation: out .3s ease forwards; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }
@keyframes out { to { opacity: 0; transform: translateY(10px); } }
.form-error { padding: 12px 14px; border-radius: 8px; background: var(--bad-soft); color: var(--bad); font-weight: 500; }
.notice { padding: 12px 14px; border-radius: 8px; background: var(--soft); color: var(--muted); }

/* Formulaires */
.form { display: flex; flex-direction: column; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.hint { font-size: 12.5px; color: var(--faint); }
:where(input:not([type=checkbox]):not([type=radio]):not([type=search])), :where(select), :where(textarea) {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 14.5px; transition: border-color .15s, box-shadow .15s; }
:where(textarea) { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
:where(input, select, textarea):focus { outline: 0; border-color: var(--acc-line); box-shadow: 0 0 0 3px var(--acc-soft); }
select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23858c88' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--acc-line); }
.danger-zone { display: flex; justify-content: flex-end; }

/* Coloris */
.look { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.look fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.look legend { font-size: 12.5px; color: var(--muted); padding: 0; margin-bottom: 6px; }
.swatches { display: flex; gap: 8px; }
.swatches label { position: relative; cursor: pointer; }
.swatches input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { display: block; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.swatches input:checked + .sw { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.swatches input:focus-visible + .sw { outline: 2px solid var(--acc-line); outline-offset: 4px; }
.sw-vert { background: #1e9e5a; } .sw-bleu { background: #3b6fd8; } .sw-violet { background: #7c5cd6; } .sw-rose { background: #d94a85; } .sw-noir { background: #0d0d0d; }
[data-theme="sombre"] .sw-noir { background: #f2f5f3; }
.demo-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 20px; padding: 10px 14px 10px 18px; border-radius: 14px; background: var(--surface); box-shadow: var(--pop); max-width: calc(100% - 24px); }
.demo-bar p { display: flex; flex-direction: column; font-size: 13px; }
.demo-bar small { color: var(--muted); font-size: 12px; }
.look-row { flex-direction: row; align-items: center; gap: 16px; }
.look-row fieldset { flex-direction: row; align-items: center; gap: 8px; }
.look-row legend { float: left; margin: 0 4px 0 0; }

/* Tableau de bord */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hello h2 { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.hello p { margin-top: 4px; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding: 4px 20px 16px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.bars span { display: block; width: 100%; min-height: 3px; border-radius: 5px; background: var(--soft-2); }
.bars .past span { background: color-mix(in srgb, var(--acc-line) 35%, var(--soft-2)); }
.bars .now span { background: var(--acc-line); }
.bars small { font-size: 11.5px; color: var(--muted); }

/* Agenda */
.ag-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; align-items: start; }
.ag-card { padding: 14px 16px 18px; overflow-x: auto; }
.ag-head, .ag-grid { display: grid; grid-template-columns: 52px repeat(var(--cols), minmax(150px, 1fr)); min-width: calc(52px + var(--cols) * 150px); }
.ag-head { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ag-head > div { display: flex; align-items: center; gap: 9px; padding-left: 6px; min-width: 0; }
.ag-head strong { display: block; font-size: 13.5px; font-weight: 600; }
.ag-head small { display: block; font-size: 12px; color: var(--muted); }
.ag-grid { position: relative; margin-top: 12px; grid-template-rows: repeat(var(--rows), 20px); background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 80px; }
.ag-h { grid-column: 1; font-size: 11.5px; color: var(--faint); transform: translateY(-8px); font-variant-numeric: tabular-nums; }
.slot { display: block; margin: 0 3px; border-radius: 6px; }
.slot:hover { background: var(--soft); outline: 1px dashed var(--line-2); }
.ev { position: relative; z-index: 1; margin: 2px 3px; padding: 6px 9px; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; line-height: 1.3; background: var(--c-bg); color: var(--c-fg); transition: filter .15s, transform .15s; }
.ev:hover { filter: brightness(.97); transform: translateY(-1px); }
[data-theme="sombre"] .ev:hover { filter: brightness(1.15); }
.ev b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev span { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.st-termine { opacity: .72; }
.ev.st-absent, .ev.st-annule { opacity: .5; text-decoration: line-through; }
.ev.st-arrive { box-shadow: inset 0 0 0 1.5px var(--c-dot); }
.ev i { position: absolute; top: 6px; right: 7px; font-style: normal; font-size: 11px; font-weight: 700; }
.now-line { grid-column: 2 / -1; align-self: start; height: 2px; background: var(--acc-line); position: relative; z-index: 2; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--acc-line); }
.mini { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; padding: 0 14px 14px; }
.mini span, .mini a { display: grid; place-items: center; height: 30px; border-radius: 7px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mini .h { font-size: 11.5px; color: var(--faint); font-weight: 600; }
.mini a:hover { background: var(--soft-2); }
.mini a.past { color: var(--faint); }
.mini a.busy { background: var(--acc-soft); }
.mini a.today { box-shadow: inset 0 0 0 1.5px var(--acc-line); }
.mini a.sel { background: var(--text); color: var(--bg); font-weight: 600; }
.cal-nav { display: flex; align-items: center; gap: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 16px; }

/* Fiche cliente */
.profile { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px; }
.profile h2 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.profile .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.profile .row-actions { margin-left: auto; }
.dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 14px; margin: 0; padding: 4px 20px 18px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 4px 20px 18px 38px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 25px; top: 10px; bottom: 22px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 8px 0; }
.timeline li::before { content: ""; position: absolute; left: -18px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--c-dot, var(--acc-line)); }
.timeline small { grid-column: 1; color: var(--muted); font-size: 12.5px; }
.timeline b { grid-row: 1; grid-column: 2; }
.note-box { padding: 12px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); white-space: pre-line; }

/* Caisse */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.pos-cats { display: flex; gap: 4px; flex-wrap: wrap; padding: 14px 16px 0; }
.pos-cats button { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--soft); color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; }
.pos-cats button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.pos-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 14px 16px 16px; }
.pos-it { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: left; cursor: pointer; transition: border-color .15s, transform .1s; }
.pos-it:hover { border-color: var(--acc-line); }
.pos-it:active { transform: scale(.98); }
.pos-it b { font-weight: 600; font-size: 13.5px; }
.pos-it small { color: var(--muted); font-size: 12px; }
.pos-it em { margin-top: 6px; font-style: normal; font-weight: 600; }
.pos-it .dot { margin-bottom: 4px; }
.ticket { position: sticky; top: 88px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.ticket h2 { font-size: 15px; font-weight: 600; }
.lines { display: flex; flex-direction: column; gap: 8px; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) 54px 84px 30px; gap: 6px; align-items: center; }
.line input, .line select { height: 36px; font-size: 13.5px; padding: 0 8px; }
.line .rm { width: 30px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--faint); cursor: pointer; display: grid; place-items: center; }
.line .rm:hover { background: var(--bad-soft); color: var(--bad); }
.tot { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.tot strong { font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pay { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pay label { position: relative; }
.pay input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pay span { display: grid; place-items: center; height: 38px; border-radius: 8px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 500; cursor: pointer; }
.pay input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.pay input:focus-visible + span { outline: 2px solid var(--acc-line); }
.day-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.day-sum div { background: var(--surface); padding: 12px 16px; }
.day-sum small { display: block; color: var(--muted); font-size: 12px; }
.day-sum b { font-variant-numeric: tabular-nums; }
.receipt { max-width: 420px; margin: 0 auto; padding: 28px; }
.receipt h2 { font-size: 18px; }
.receipt .rl { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.receipt .rt { border-top: 1px dashed var(--line-2); margin-top: 8px; padding-top: 10px; font-size: 18px; font-weight: 600; }

/* Connexion */
.bare-main { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--soft); }
.auth-card { width: 100%; max-width: 420px; padding: 32px; border-radius: 16px; background: var(--surface); box-shadow: var(--pop); display: flex; flex-direction: column; gap: 14px; }
.auth-card.wide { max-width: 620px; }
.auth-card .brand { padding: 0 0 8px; }
.auth-card h1 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }

/* Compléments : écrans de gestion */
.card-body { padding: 18px 20px; }
.card-body.sep, .sep { border-top: 1px solid var(--line); }
.sm-text { font-size: 13px; margin-top: 2px; }
.h3 { font-size: 14.5px; font-weight: 600; }
.nowrap { white-space: nowrap; }
.ellipsis { max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.narrow { max-width: 760px; width: 100%; }
.narrow-c { max-width: 420px; width: 100%; margin: 0 auto; }
.cap::first-letter { text-transform: uppercase; }
.tabs { align-self: flex-start; }
.list > li.off { opacity: .55; }
.list > li.past .grow strong { color: var(--muted); }
.list > li.is-next { background: var(--acc-soft); }
.list > li.is-next .time { color: var(--acc); font-weight: 600; }
.who-sm { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.av.sm { width: 22px; height: 22px; font-size: 10px; }
.empty.sm { padding: 32px 20px; }
.kpi p b.down { color: var(--bad); }
.kpi-txt { font-size: 18px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars em { font-style: normal; font-size: 10.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bars .now em { color: var(--text); font-weight: 600; }
.rank-n { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: var(--soft-2); font-size: 12px; font-weight: 600; color: var(--muted); flex: none; }
.rank li:first-child .rank-n { background: var(--acc-soft); color: var(--acc); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
.search-inline { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 420px; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--muted); }
.search-inline input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; }
.search-inline:focus-within { border-color: var(--acc-line); box-shadow: 0 0 0 3px var(--acc-soft); }
.btn.is-on { border-color: var(--text); }
.is-disabled { opacity: .35; pointer-events: none; }
.date-jump input { height: 34px; width: 148px; padding: 0 8px; font-size: 13px; }

/* Réglages */
.svc-group + .svc-group { border-top: 1px solid var(--line); }
.svc-head { display: flex; align-items: center; gap: 8px; padding: 14px 20px 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.svc-head small { font-weight: 500; color: var(--faint); }
.svc-group .list > li { border-top: 0; padding-top: 9px; padding-bottom: 9px; }
.cat-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; min-width: 0; margin: 0; }
.cat-form > input:not([type]) , .cat-form > input[name="name"] { flex: 1; min-width: 140px; height: 36px; }
li > form { margin: 0; }
.colors { display: flex; gap: 5px; }
.colors label { position: relative; cursor: pointer; }
.colors input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cdot { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--c-dot); }
.colors input:checked + .cdot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--c-dot); }
.colors input:focus-visible + .cdot { outline: 2px solid var(--acc-line); outline-offset: 3px; }
.theme-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.theme-card { position: relative; display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.theme-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tc-prev { position: relative; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: repeat(3, 14px); gap: 6px 8px; width: 168px; padding: 12px; border-radius: 10px; border: 1px solid var(--line-2); }
.tc-prev i { grid-row: 1 / -1; border-radius: 5px; }
.tc-prev b { border-radius: 4px; }
.tc-clair { background: #ffffff; } .tc-clair i { background: #f2f3f2; } .tc-clair b { background: #eceeed; } .tc-clair b:first-of-type { background: var(--acc-line); width: 50%; }
.tc-sombre { background: #0e100f; border-color: #343b36; } .tc-sombre i { background: #1c201d; } .tc-sombre b { background: #262b27; } .tc-sombre b:first-of-type { background: var(--acc-line); width: 50%; }
.theme-card input:checked + .tc-prev { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--acc-line); }
.theme-card input:focus-visible + .tc-prev { outline: 2px solid var(--acc-line); outline-offset: 5px; }
.tc-name { font-size: 13.5px; font-weight: 500; }
.look-cards { gap: 20px; }

/* Choix de la cliente */
.cp { display: flex; flex-direction: column; gap: 8px; }
.cp-chosen { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--acc-line); border-radius: 8px; background: var(--acc-soft); }
.cp-chosen .grow { flex: 1; min-width: 0; }
.cp-chosen strong { display: block; font-weight: 600; }
.cp-chosen small { display: block; color: var(--muted); font-size: 12.5px; }
.cp-search { position: relative; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--muted); }
.cp-search:focus-within { border-color: var(--acc-line); box-shadow: 0 0 0 3px var(--acc-soft); }
.cp-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 14.5px; }
.ac-list { position: absolute; left: -1px; right: -1px; top: calc(100% + 4px); z-index: 25; list-style: none; margin: 0; padding: 4px; border-radius: 10px; background: var(--surface); box-shadow: var(--pop); max-height: 300px; overflow-y: auto; }
.ac-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 7px; cursor: pointer; color: var(--text); }
.ac-list li small { color: var(--muted); }
.ac-list li:hover, .ac-list li[aria-selected="true"] { background: var(--soft-2); }
.ac-list .ac-empty { color: var(--muted); cursor: default; }
.add-link { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 2px 0; border: 0; background: none; color: var(--acc); font-weight: 500; font-size: 13.5px; cursor: pointer; }
.add-link .i { width: 15px; height: 15px; }
.add-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.cp-new { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 10px; background: var(--soft); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sm-link { font-size: 13px; }

/* Rendez-vous */
.appt-side { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.quick { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.quick .btn, .quick form, .quick .btn-block-sm { width: 100%; justify-content: flex-start; }
.tips { display: flex; flex-direction: column; gap: 8px; }
.ev.short { padding-top: 4px; padding-bottom: 4px; }
.ev.short span:not(.ev-t) { display: none; }
.ev.tiny { padding-top: 1px; padding-bottom: 1px; justify-content: center; }
.ev.tiny span { display: none; }
.ev.tiny i { top: 2px; }
body.has-demo .content { padding-bottom: 130px; }
.ev .ev-t { font-variant-numeric: tabular-nums; font-size: 11.5px; }
.free .gaps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.free .gaps a { padding: 2px 7px; border-radius: 6px; background: var(--acc-soft); color: var(--acc); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.free .gaps a:hover { background: var(--acc); color: var(--on-acc); }
.free small { color: var(--muted); }

/* Caisse */
.ticket-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.line-label { font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line.new { animation: pop .3s ease both; }
.lines-empty { padding: 14px; border: 1px dashed var(--line-2); border-radius: 10px; text-align: center; font-size: 13px; }
.sub { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sub .discount { width: 100px; height: 34px; text-align: right; }
.pay { border: 0; margin: 0; padding: 0; }
.is-cancelled td, .receipt.is-cancelled .r-lines { text-decoration: line-through; color: var(--faint); }
.receipt { display: flex; flex-direction: column; gap: 8px; }
.r-head { text-align: center; padding-bottom: 8px; }
.r-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); padding: 8px 0; border-top: 1px dashed var(--line-2); border-bottom: 1px dashed var(--line-2); }
.receipt .rl small { display: block; color: var(--faint); font-size: 12px; }
.r-note { font-size: 13px; }
.r-thanks { text-align: center; color: var(--muted); padding-top: 10px; font-size: 13px; }

/* Écrans plus petits */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ag-wrap, .pos, .grid-main { grid-template-columns: minmax(0, 1fr); }
  .ag-side { display: none; }
  .ticket { position: static; }
  .search { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; width: 260px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--pop); }
  body.menu-open .side { transform: none; }
  .icon-btn.menu-btn { display: inline-grid; }
  .top { padding: 10px 16px; }
  .top-actions .btn span { display: none; }
  .content { padding: 20px 16px 120px; }
  .grid-2, .form-grid, .form-grid.three { grid-template-columns: minmax(0, 1fr); }
  .day-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .who-sm span, .date-jump { display: none; }
  .kpi-v { font-size: 22px; }
  .demo-bar { flex-direction: column; align-items: stretch; gap: 8px; left: 12px; right: 12px; transform: none; }
  .look-row { flex-wrap: wrap; }
  .dl { grid-template-columns: 100px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .side, .top, .demo-bar, .no-print, .toast { display: none !important; }
  .receipt { box-shadow: none; border: 0; }
  .app { display: block; }
  body { background: #fff; color: #000; }
}
.demo-login { display: none; }
.or { text-align: center; font-size: 13px; }
@media (max-width: 860px) { .demo-bar small { display: none; } .demo-bar { padding: 10px 12px; } }
