@font-face { font-family: 'Bricolage'; src: url('/fonts/bricolage.woff2') format('woff2'); font-weight: 500 800; font-display: swap; }
:root {
  color-scheme: dark light;
  --bg: #04191D; --bg2: #0A2429; --card: #0C2A2E; --line: #18353B; --line2: #234850;
  --ink: #F6E2CB; --ink2: #C7C0AE; --ink3: #9aa8a2;
  --dl: #E65C52; --dl-ink: #2a0805; --cm: #5FB98A; --cm-ink: #062a17; --gold: #ffd88a; --gold-ink: #2a1b00;
  --ok: #5FB98A; --warn: #f0a65c; --bad: #ff8f8f; --wa: #25d366; --wa-ink: #06240f;
  --ff: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ffd: 'Bricolage', var(--ff);
  --r: 16px; --tap: 48px;
  --sur-alerte: #04191D; --ok-ink: #062a17;
}
:root[data-theme="light"] {
  --bg: #F7F3EA; --bg2: #FFFFFF; --card: #FFFFFF; --line: #DDD6C6; --line2: #C9C1AE;
  --ink: #14262A; --ink2: #4C5B58; --ink3: #5e6c68; --gold: #8a5a00; --gold-ink: #fff; --ok: #1f7a4b; --warn: #a35200; --bad: #b3261e; --sur-alerte: #fff; --ok-ink: #fff;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F7F3EA; --bg2: #FFFFFF; --card: #FFFFFF; --line: #DDD6C6; --line2: #C9C1AE;
    --ink: #14262A; --ink2: #4C5B58; --ink3: #5e6c68; --gold: #8a5a00; --gold-ink: #fff; --ok: #1f7a4b; --warn: #a35200; --bad: #b3261e; --sur-alerte: #fff; --ok-ink: #fff;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--ff); font-size: 16px; overflow-x: hidden; }
body { min-height: 100dvh; padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
body.sheet-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.num { font-family: var(--ffd); font-weight: 800; letter-spacing: -0.02em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---- en-tête ---- */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: calc(8px + env(safe-area-inset-top)) 14px 10px; }
.row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.top .row.between { flex-wrap: nowrap; gap: 6px; }
.row.between { justify-content: space-between; }
.seg { display: flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; flex: 1 1 auto; min-width: 0; }
.seg button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--ink2); font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg button.dl[aria-pressed="true"] { background: var(--dl); color: var(--dl-ink); }
.seg button.cm[aria-pressed="true"] { background: var(--cm); color: var(--cm-ink); }
.icon-btn { min-width: 44px; min-height: 44px; padding: 0 10px; flex: 0 0 auto; border: 1px solid var(--line); background: var(--bg2); border-radius: 14px; font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.day-pager { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.day-title { flex: 1; text-align: center; line-height: 1.1; background: none; border: 0; padding: 4px; color: inherit; min-height: 44px; }
.day-title .num { font-size: 21px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-title small { color: var(--ink2); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.day-title.today .num { color: var(--gold); }
.pill { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.pill.dl { background: var(--dl); color: var(--dl-ink); } .pill.cm { background: var(--cm); color: var(--cm-ink); }
.banner { margin: 10px 14px 0; padding: 10px 12px; border-radius: 12px; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.banner.err { background: color-mix(in srgb, var(--bad) 18%, var(--card)); color: var(--bad); border: 1px solid var(--bad); }
.banner.off { background: color-mix(in srgb, var(--warn) 22%, var(--card)); color: var(--warn); }
.banner button { margin-left: auto; min-height: 40px; border-radius: 10px; border: 1px solid currentColor; background: transparent; color: inherit; padding: 0 12px; font-weight: 800; }

/* ---- résumé ---- */
.stats { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0 0 10px; }
/* bandeau condensé : 4-5 compteurs sur une seule ligne (~46 px de haut au lieu de 3 rangées de tuiles) */
.stats .strip { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 3px; }
.stat { flex: 1 1 0; min-width: 0; min-height: 44px; background: none; border: 0; border-radius: 11px; padding: 4px 2px; text-align: center; }
.stat .num { font-size: 17px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat small { display: block; color: var(--ink2); font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.warn .num { color: var(--warn); } .stat.ok .num { color: var(--ok); }

/* ---- liste ---- */
main { padding: 12px 14px 24px; max-width: 640px; margin: 0 auto; }
main[aria-busy="true"] .card { opacity: .5; }
.empty { text-align: center; color: var(--ink3); padding: 44px 16px; line-height: 1.5; }
.empty .big { font-size: 40px; display: block; margin-bottom: 8px; }
.skel { height: 84px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); margin-bottom: 10px; opacity: .6; }
.card { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--line2); border-radius: var(--r); padding: 6px 6px 6px 10px; margin-bottom: 6px; display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 8px; align-items: center; transition: background .25s; }
.card.DL { border-left-color: var(--dl); } .card.CM { border-left-color: var(--cm); }
.card.done { background: var(--bg); }
/* pli « arrivées / closes » : les tables installées ne prennent plus la place des tables à accueillir */
.pli { width: 100%; margin: 4px 0 8px; min-height: 44px; border-radius: 12px; border: 1px dashed var(--line2); background: transparent; color: var(--ink2); display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-size: 14px; }
.pli .num { color: var(--ok); }
.pli small { color: var(--ink3); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.card.compact { padding: 4px 8px 4px 10px; margin-bottom: 4px; opacity: .85; }
.card.compact .nom { font-size: 15px; }
.card.compact .meta { display: none; }
.card.compact .heure .num { font-size: 16px; }
.card.compact .btn { min-height: 44px; min-width: 44px; font-size: 13px; padding: 0 8px; }
.card.compact .heure, .card.compact .body { min-height: 44px; }
.card.glisse-ok { background: color-mix(in srgb, var(--ok) 30%, var(--card)) !important; border-color: var(--ok); }
.card { touch-action: pan-y; }
.sep-heure { color: var(--ink3); font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 10px 4px 4px; }
.par-marque { color: var(--ink2); font-size: 12.5px; font-weight: 700; text-align: center; padding: 2px 4px 0; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.stats .soir.pliee { padding: 8px 12px; } .stats .soir.pliee .soir-l1 { flex-wrap: nowrap; } .stats .soir.pliee .soir-etat { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } .stats .soir.pliee .soir-lim { flex: none; }
.stats .soir.pliee .soir-det { display: none; }
.porte .card.compact .btn.primary { min-width: 70px; min-height: 44px; font-size: 13px; }
.card.done .heure .num, .card.done .nom { color: var(--ink2); }
.card.annule .nom, .card.no_show .nom { text-decoration: line-through; }
.card.retard { border-color: var(--warn); }
/* retard : la couleur monte avec les minutes (léger → franc → rouge) */
/* --t = 0 à 15 min de retard, 1 à 60 min et plus : la teinte glisse de l'orange au rouge, le fond se charge */
.card[class*="retard-"] { --teinte: color-mix(in srgb, var(--bad) calc(var(--t, 0) * 100%), var(--warn)); border-color: var(--teinte); border-left-color: var(--teinte); background: color-mix(in srgb, var(--teinte) calc(8% + var(--t, 0) * 24%), var(--card)); }
.card[class*="retard-"] .heure .num { color: var(--teinte); }
/* pré-alerte (10 min → tolérance) : teinte à peine visible */
.card.retard-0 { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); background: color-mix(in srgb, var(--warn) 4%, var(--card)); }
.card.retard-0 .heure .num { color: color-mix(in srgb, var(--warn) 60%, var(--ink)); }
.chip.retard.p0 { background: transparent; border: 1px dashed color-mix(in srgb, var(--warn) 60%, var(--line)); color: var(--warn); }
.card.retard-4 .nom { color: var(--bad); }
.chip.retard.p1, .chip.retard.p2 { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.chip.retard.p3 { background: color-mix(in srgb, var(--teinte, var(--warn)) 35%, transparent); color: var(--teinte, var(--warn)); }
.chip.retard.p4 { background: var(--bad); color: var(--sur-alerte); }
.card.a_traiter { border-color: var(--warn); border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--card)); }
.chip.a_traiter { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); border-color: transparent; }
.card.a_traiter .heure .num { color: var(--warn); }
.card.flash { background: color-mix(in srgb, var(--ok) 22%, var(--card)); }
.heure { text-align: center; background: none; border: 0; padding: 0; color: inherit; min-height: 44px; }
.heure .num { font-size: 20px; line-height: 1; display: block; }
.heure small { color: var(--ink3); font-size: 12px; white-space: nowrap; }
.heure small.ok { color: var(--ok); font-weight: 800; }
.body { min-width: 0; text-align: left; background: none; border: 0; padding: 0; color: inherit; width: 100%; min-height: 44px; }
.nom { font-weight: 800; font-size: 16px; line-height: 1.15; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.nom .tel4 { color: var(--ink3); font-weight: 600; font-size: 13px; }
.homonyme { color: var(--warn); font-size: 12px; font-weight: 800; }
.meta { color: var(--ink2); font-size: 13px; margin-top: 2px; line-height: 1.3; overflow-wrap: anywhere; }
.note { color: var(--gold); font-size: 13px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); color: var(--ink2); }
.chip.arrive { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); border-color: transparent; }
.chip.retard { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); border-color: transparent; }
.chip.no_show, .chip.annule { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); border-color: transparent; }
/* mémoire clients : badges compacts sur la carte ; une suggestion du modèle est en pointillés */
.bd { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; line-height: 1; padding: 3px 5px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 9%, transparent); color: var(--ink); white-space: nowrap; }
.bd.sugg { background: transparent; border: 1px dashed var(--line2); color: var(--ink2); font-weight: 600; }
.bd.warn { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.meta.line { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.meta.line .pill { font-size: 11px; padding: 2px 7px; }
.chip.mini { font-size: 11px; padding: 2px 6px; }
.client-box { margin: 8px 0 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.client-facts { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.client-facts .who { font-size: 15px; margin-right: 2px; }
.client-ctrls { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 10px; align-items: start; }
.client-cell { display: flex; flex-direction: column; gap: 4px; }
.seg.mini { display: inline-flex; gap: 4px; }
.seg.mini button { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink2); font-weight: 700; font-size: 14px; }
.seg.mini button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg.mini button[aria-pressed="true"].sugg { background: transparent; color: var(--ink); border: 1px dashed var(--ink2); }
.seg.mini button:disabled { opacity: .5; }
.client-cap { background: none; border: 0; padding: 8px 0; min-height: 44px; text-align: left; font-size: 12px; color: var(--ink3); font-weight: 700; }
.client-cap.ok { color: var(--ok); } .client-cap.warn { color: var(--warn); } .client-cap.bad { color: var(--bad); }
.meta.why { font-size: 12px; color: var(--ink3); }
.client-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.note-row input { flex: 1; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); padding: 0 10px; font-size: 15px; }
.actions { display: flex; flex-direction: row; gap: 6px; align-items: center; }
.btn { min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink); font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; transition: transform .08s; }
.btn:active { transform: scale(.96); filter: brightness(1.15); }
.btn.primary { background: var(--ok); color: var(--ok-ink); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.action { background: var(--card); border: 2px solid var(--line2); min-height: 48px; font-size: 16px; }
.btn.wa { background: var(--wa); color: var(--wa-ink); border-color: transparent; }
.btn.danger { color: var(--bad); }
.btn.small { min-height: 44px; font-size: 14px; padding: 0 12px; }
.btn.lock { pointer-events: none; opacity: .6; }
.arrived-mark { color: var(--ok); font-weight: 800; font-size: 14px; text-align: center; min-width: 64px; }
.card.arrive { background: color-mix(in srgb, var(--ok) 12%, var(--card, #fff)); border-color: var(--ok); }
.card.arrive .heure .num, .card.arrive .nom { color: var(--ink); }

/* ---- porte ---- */
.search { width: 100%; min-height: var(--tap); border-radius: 14px; border: 1px solid var(--line); background: var(--bg2); padding: 0 14px; font-size: 17px; }
.porte .card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 10px 10px 10px 12px; }
.porte .nom { font-size: 19px; }
.porte .card .actions .btn, .porte .btn.primary { min-width: 96px; min-height: 58px; font-size: 18px; }

/* ---- calendrier ---- */
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; color: var(--ink3); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin: 6px 0 4px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cell { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line); background: var(--card); padding: 5px 4px; display: flex; flex-direction: column; justify-content: space-between; align-items: stretch; color: var(--ink); min-height: 48px; }
.cell.off { opacity: .28; } .cell.today { border-color: var(--gold); } .cell.sel { background: var(--ink); color: var(--bg); }
.cell .d { font-family: var(--ffd); font-weight: 800; font-size: 14px; }
.dots { display: flex; gap: 3px; flex-wrap: wrap; }
.dot { font-size: 11px; font-weight: 800; padding: 1px 5px; border-radius: 6px; line-height: 1.2; }
.dot.dl { background: var(--dl); color: var(--dl-ink); } .dot.cm { background: var(--cm); color: var(--cm-ink); }

/* ---- barre du bas ---- */
.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 96%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); display: flex; gap: 4px; }
.bottom button { flex: 1; min-height: 54px; border: 0; border-radius: 14px; background: transparent; color: var(--ink2); font-size: 12px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 2px; }
.bottom button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bottom button[aria-current="page"] { background: var(--bg2); color: var(--ink); }
.bottom button.add { color: var(--gold); }

/* ---- feuille ---- */
.sheet-bg { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 640px; max-height: 92dvh; overflow: auto; overscroll-behavior: contain; background: var(--bg2); border-radius: 22px 22px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line2); }
.sheet h2 { margin: 6px 0 12px; font-family: var(--ffd); font-size: 22px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.sheet h2:focus { outline: none; }
.field { display: block; margin-bottom: 10px; }
.field span { display: block; font-size: 12px; color: var(--ink2); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; min-height: var(--tap); border-radius: 12px; border: 1px solid var(--line); background: var(--card); padding: 10px 12px; font-size: 17px; }
.field input:disabled { opacity: .6; }
.field textarea { min-height: 70px; resize: vertical; }
.field input.manque { border-color: var(--warn); box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 30%, transparent); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet .btn { width: 100%; margin-top: 8px; }
.sheet .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet .grid2 .btn { margin-top: 0; }
.brand-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.brand-pick .btn { margin: 0; border: 2px solid transparent; }
.brand-pick .btn[aria-pressed="true"].dl { background: var(--dl); color: var(--dl-ink); }
.brand-pick .btn[aria-pressed="true"].cm { background: var(--cm); color: var(--cm-ink); }
.sheet h2 .chip { font-size: 12px; padding: 3px 8px; }
.sheet h2 { position: relative; padding-right: 40px; }
.sheet h2 .x { position: absolute; right: -5px; top: -5px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink2); font-size: 15px; font-family: inherit; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.fact { display: inline-flex; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 5px 9px; font-size: 14px; font-weight: 600; }
.fact .tel-call { color: inherit; text-decoration: none; }
.fact .wa-mini { margin-left: 2px; }
.note-line { background: color-mix(in srgb, var(--gold) 12%, transparent); border-radius: 10px; padding: 8px 10px; font-size: 14px; margin-bottom: 8px; overflow-wrap: anywhere; }
.sheet .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sheet .actions .btn.small { width: auto; flex: 1 1 auto; margin: 0; min-height: 44px; font-size: 14px; padding: 0 10px; }
.sheet .btn.ghost.small { width: auto; margin: 12px auto 0; display: block; min-height: 44px; font-size: 13px; }
.hist { color: var(--ink3); font-size: 12px; margin-top: 8px; line-height: 1.45; }
.err-msg { color: var(--bad); font-weight: 700; min-height: 22px; margin-top: 8px; }

/* ---- login ---- */
.gate { max-width: 380px; margin: 48px auto 0; padding: 0 22px; text-align: center; }
.gate h1 { font-family: var(--ffd); font-size: 34px; margin: 0 0 6px; }
.gate p { color: var(--ink2); margin: 0 0 18px; line-height: 1.5; }
.gate input { width: 100%; font-size: 26px; letter-spacing: .2em; text-align: center; min-height: 58px; border-radius: 16px; border: 1px solid var(--line2); background: var(--card); }
.gate .btn { width: 100%; margin-top: 12px; min-height: 56px; font-size: 17px; }
.gate .btn.enter { background: var(--ink); color: var(--bg); border: 0; }
.gate .brand { min-height: 62px; font-size: 19px; border: 0; }
.gate .brand.dl { background: var(--dl); color: var(--dl-ink); } .gate .brand.cm { background: var(--cm); color: var(--cm-ink); }
.gate .msg { min-height: 22px; margin-top: 12px; color: var(--bad); font-weight: 700; }

/* ---- toast ---- */
.toast { position: fixed; left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 30; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 16px; font-weight: 700; font-size: 15px; opacity: 0; transform: translateY(10px); transition: opacity .18s, transform .18s; pointer-events: none; display: flex; gap: 10px; align-items: center; max-width: 640px; margin: 0 auto; }
.toast.show { opacity: 1; transform: none; pointer-events: auto; }
body.sheet-open .toast { bottom: auto; top: calc(12px + env(safe-area-inset-top)); }
.poignee { width: 36px; height: 5px; border-radius: 3px; background: var(--line2); margin: -6px auto 10px; }
.bot-ligne.inerte { opacity: .6; }
.toast.err { background: var(--bad); color: #fff; }
.toast span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast button { border: 0; background: var(--bg); color: var(--ink); border-radius: 12px; min-height: 44px; padding: 0 16px; font-weight: 800; white-space: nowrap; }
.toast.err button { background: #fff; color: var(--bad); }

/* ---- étiquettes ---- */
.labels { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.label { border: 2px dashed var(--line2); border-radius: 12px; padding: 12px; text-align: center; min-height: 110px; display: flex; flex-direction: column; justify-content: center; overflow-wrap: anywhere; }
.label .n { font-family: var(--ffd); font-weight: 800; font-size: 20px; line-height: 1.1; }
.label .p { font-size: 14px; color: var(--ink2); margin-top: 4px; }
/* lien d'impression sous la liste + feuille papier (générée à la demande, invisible à l'écran) */
.lien-imprimer { display: block; width: 100%; margin: 14px 0 4px; padding: 10px; background: none; border: 0; color: var(--ink3); font: inherit; font-size: 13px; font-weight: 600; text-align: center; min-height: 44px; }
.print-liste { display: none; }
@media print {
  body { background: #fff; color: #000; padding: 0; }
  .top, .bottom, .stats, .toast, .banner, .no-print { display: none !important; }
  body.impression-liste main, body.impression-liste .sheet, body.impression-liste .overlay { display: none !important; }
  body.impression-liste .print-liste { display: block; color: #000; font: 11pt/1.3 -apple-system, Helvetica, Arial, sans-serif; }
  .print-liste h1 { font-size: 16pt; margin: 0 0 2pt; }
  .print-liste .sous { margin: 0 0 8pt; color: #333; font-size: 10pt; }
  .print-liste table { width: 100%; border-collapse: collapse; }
  .print-liste th, .print-liste td { border-bottom: 1px solid #bbb; padding: 4pt 5pt; text-align: left; vertical-align: top; }
  .print-liste th { font-size: 9pt; text-transform: uppercase; letter-spacing: .05em; color: #444; border-bottom: 2px solid #000; }
  .print-liste td.h, .print-liste td.p, .print-liste td.c { white-space: nowrap; font-variant-numeric: tabular-nums; }
  .print-liste td.n { font-weight: 700; }
  .print-liste td.d { color: #333; font-size: 10pt; }
  .print-liste tr.arrive td { color: #777; }
  .print-liste tr { page-break-inside: avoid; }
  main { max-width: none; padding: 0; }
  .labels { gap: 0; }
  .label { border: 1px solid #999; border-radius: 0; min-height: 5.5cm; page-break-inside: avoid; color: #000; }
  .label .p { color: #333; }
}
@media (prefers-reduced-motion: reduce) { .toast, .btn, .card { transition: none; } }

.stat { cursor: pointer; font: inherit; color: inherit; text-align: center; }
.stat[aria-pressed="true"] { background: color-mix(in srgb, var(--ink) 12%, transparent); outline: 0; }
.stat.off .num { color: var(--ink2); }

/* numéro cliquable (appel) + icône WhatsApp */
.tel-line { display: inline-flex; align-items: center; gap: 8px; }
.tel-call { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.wa-mini { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: var(--wa); color: var(--wa-ink); text-decoration: none; font-size: 17px; }

/* ---- questions au bot (boucle d'apprentissage) ---- */
.stats .q-ligne { grid-column: 1 / -1; background: none; border: 0; color: var(--ink3); font-size: 13px; font-weight: 600; padding: 0 4px; min-height: 44px; margin: -8px 0 -6px; text-align: center; }
.stats .q-ligne.attente { color: var(--warn); font-weight: 800; }
.q-carte { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 10px 0; }
.q-question { font-weight: 700; overflow-wrap: anywhere; }
.q-carte textarea, .q-carte .q-gen { width: 100%; margin-top: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink); padding: 8px 10px; font-size: 16px; font-family: inherit; }
.q-carte .q-gen { font-size: 14px; color: var(--ink2); }
.q-apprendre { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); margin-top: 8px; }
.sheet .q-carte .actions { display: flex; gap: 6px; margin-top: 8px; }
.sheet .q-carte .actions .btn { width: auto; flex: 1 1 auto; margin: 0; min-height: 40px; }
.q-apprises { margin-top: 14px; }
.q-apprises summary { font-weight: 700; cursor: pointer; padding: 6px 0; }
.q-appris { border-top: 1px solid var(--line); padding: 8px 0; font-size: 14px; overflow-wrap: anywhere; }
.q-appris .lien { background: none; border: 0; color: var(--ink3); text-decoration: underline; font-size: 12px; padding: 4px 0; }

/* ---- relecture du bot ---- */
.r-filtres { display: flex; gap: 6px; margin: 0 0 10px; }
.r-filtres .chip { cursor: pointer; min-height: 44px; }
.r-filtres .chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.r-carte { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin: 0 0 8px; overflow: hidden; }
.r-carte.a_verifier { border-color: var(--warn); }
.r-tete { display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit; padding: 10px 12px; font: inherit; }
.r-l1 { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink3); margin-bottom: 4px; }
.r-carte.a_verifier .r-statut { color: var(--warn); font-weight: 800; }
.r-carte.ok .r-statut, .r-carte.vu .r-statut { color: var(--ok); }
.r-client { font-weight: 700; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.r-bot { font-size: 14px; color: var(--ink2); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.r-raison { font-size: 13px; color: var(--warn); margin-top: 6px; }
.r-fil { padding: 4px 12px 8px; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); }
.r-msg { max-width: 88%; padding: 7px 10px; border-radius: 12px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.r-msg.cl { align-self: flex-end; background: color-mix(in srgb, var(--ok) 18%, var(--card)); }
.r-msg.bt { align-self: flex-start; background: var(--bg2); }
.r-fn { align-self: center; font-size: 11px; color: var(--ink3); }
.r-carte .actions { display: flex; gap: 6px; padding: 0 12px 10px; }
.sheet .r-carte .actions .btn { width: auto; flex: 1 1 auto; margin: 0; min-height: 40px; }
.r-corr { padding: 0 12px 12px; }
.r-corr textarea, .r-corr .q-gen { width: 100%; margin-top: 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink); padding: 8px 10px; font-size: 16px; font-family: inherit; }
.r-corr .q-gen { font-size: 14px; color: var(--ink2); }
.sheet .r-corr .btn { width: 100%; margin-top: 8px; }

/* ---- carte « ce soir » : ce que le bot dit ---- */
.stats .soir { grid-column: 1 / -1; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; color: inherit; display: flex; flex-direction: column; gap: 4px; }
.stats .soir.ouvert { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.stats .soir.complet { border-color: var(--warn); }
.stats .soir.ferme { opacity: .85; }
.soir-l1 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 800; font-size: 15px; }
.soir-lim { font-size: 13px; color: var(--ink2); font-weight: 600; }
.soir-det { font-size: 13px; color: var(--ink2); overflow-wrap: anywhere; }
.soir-pied { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.soir-pied .ok { color: var(--ok); font-weight: 700; } .soir-pied .att { color: var(--gold); font-weight: 700; } .soir-pied .warn { color: var(--warn); font-weight: 700; }
.rg-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.rg-lab { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink2); min-width: 92px; }
.rg-row input[type=time], .rg-row input[type=date], .rg-row input[type=number] { border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 8px 10px; min-height: 44px; font-size: 16px; font-family: inherit; }
.rg-row input[type=number] { width: 64px; }
.seg.mini.jours button { min-width: 40px; padding: 0 6px; }
.seg.mini button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sheet .lien { background: none; border: 0; color: var(--ink3); text-decoration: underline; font-size: 12px; padding: 12px 0; min-height: 44px; }
.rg-marque { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 8px; }
.rg-marque summary { font-weight: 700; cursor: pointer; padding: 12px 0; min-height: 44px; }
.dot.traiter { background: color-mix(in srgb, var(--warn) 25%, transparent); color: var(--warn); }
.cell.exc-ouvert { box-shadow: inset 0 0 0 2px var(--ok); } .cell.exc-complet { box-shadow: inset 0 0 0 2px var(--warn); } .cell.exc-ferme, .cell.ferme-defaut { background: repeating-linear-gradient(135deg, var(--card) 0 4px, color-mix(in srgb, var(--line) 70%, var(--card)) 4px 8px); }
.cell.ferme-defaut .d { color: var(--ink3); }
.cell { position: relative; overflow: hidden; }
.cell.a-traiter::after { content: ''; position: absolute; top: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 16px 16px 0; border-color: transparent var(--warn) transparent transparent; }

/* ---- vue Bot ---- */
.bot-titre { font-family: var(--ffd); font-size: 22px; margin: 10px 0 2px; }
.bot-liste { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.bot-ligne { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: inherit; text-decoration: none; min-height: 60px; font: inherit; }
.bot-ligne.warn { border-color: var(--warn); } .bot-ligne.bad { border-color: var(--bad); }
.bot-ico { font-size: 22px; flex: none; }
.bot-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bot-t { font-weight: 800; font-size: 15px; } .bot-s { font-size: 13px; color: var(--ink2); }
.bot-n { flex: none; min-width: 26px; height: 26px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: var(--ink3); }
.bot-ligne.warn .bot-n { background: var(--warn); color: var(--sur-alerte); } .bot-ligne.bad .bot-n { background: var(--bad); color: var(--sur-alerte); }
.bot-pied { margin-top: 14px; }
.bottom button { position: relative; }
.nav-pastille { position: absolute; top: 6px; right: calc(50% - 22px); min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; background: var(--bad); color: var(--sur-alerte); font-size: 10px; font-weight: 800; padding: 0 4px; }

/* feuille Conversation */
.r-msg.eq { align-self: flex-end; background: color-mix(in srgb, var(--gold) 22%, var(--card)); }
.conv-etat { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; padding: 8px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.conv-etat.muet { border-color: var(--warn); }
.conv-etat .btn.small { width: auto; margin: 0; min-height: 40px; }
.conv-fil { border-top: 0; padding: 4px 0 8px; max-height: 42dvh; overflow: auto; }
.conv-jour { color: var(--ink3); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; text-align: center; margin: 6px 0 2px; }
.conv-repondre { display: flex; gap: 6px; align-items: flex-end; margin-top: 6px; }
.conv-repondre textarea { flex: 1; min-height: 44px; }
.conv-repondre .btn.small { width: auto; margin: 0; min-height: 44px; }
.sheet a.lien { display: block; text-align: center; margin-top: 10px; min-height: 36px; line-height: 36px; }

/* curseurs d'heure limite par jour (réglages habituels) */
.rg-curseurs { margin: 10px 0; }
.rg-curseur { display: grid; grid-template-columns: 42px minmax(0, 1fr) 60px; align-items: center; gap: 10px; min-height: 44px; }
.rg-jour { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); font-weight: 700; }
.rg-curseur input[type=range] { width: 100%; min-height: 44px; accent-color: var(--ok); margin: 0; }
.rg-val { font-weight: 800; font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink2); }
.rg-val.propre { color: var(--ink); }

.note-etat { min-width: 18px; text-align: center; color: var(--ok); font-weight: 800; }
.note-row input::placeholder { font-size: 13px; }

/* --- conversation plein écran, façon WhatsApp --- */
.chat { position: fixed; inset: 0; z-index: 25; display: flex; flex-direction: column; background: var(--bg); }
.chat-tete { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px 4px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.chat-back { background: none; border: 0; color: var(--ink); font-size: 30px; line-height: 1; min-width: 44px; min-height: 44px; }
.chat-avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, var(--cm) 35%, var(--card)); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; }
.chat-titres { flex: 1; min-width: 0; }
.chat-nom { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-sous { font-size: 12px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-actions { display: flex; gap: 2px; }
.chat-act { background: none; border: 0; min-width: 44px; min-height: 44px; font-size: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; text-decoration: none; color: inherit; }
.chat-act.on { background: color-mix(in srgb, var(--warn) 25%, var(--card)); }
.chat-fil { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; background: color-mix(in srgb, var(--bg) 92%, var(--cm)); }
.chat-jour { align-self: center; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink3); background: var(--card); border-radius: 999px; padding: 4px 10px; margin: 6px 0 2px; }
.chat-sys { align-self: center; font-size: 12px; color: var(--ink3); }
.chat-vide { align-self: center; color: var(--ink3); text-align: center; white-space: pre-line; margin-top: 30px; }
.bulle { max-width: 82%; padding: 8px 12px; border-radius: 16px; font-size: 15px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; position: relative; }
.bulle.cl { align-self: flex-start; background: var(--card); border-bottom-left-radius: 4px; }
.bulle.bt { align-self: flex-end; background: color-mix(in srgb, var(--ok) 22%, var(--card)); border-bottom-right-radius: 4px; }
.bulle.eq { align-self: flex-end; background: color-mix(in srgb, var(--gold) 28%, var(--card)); border-bottom-right-radius: 4px; }
.bulle.envoi { opacity: .6; } .bulle.echec { outline: 2px solid var(--bad); }
.bulle-qui { display: block; font-size: 10.5px; color: var(--ink3); margin-top: 2px; text-align: right; }
.chat-barre { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--bg2); border-top: 1px solid var(--line); }
.chat-barre textarea { flex: 1; min-height: 44px; max-height: 120px; resize: none; border-radius: 22px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 16px; padding: 11px 14px; }
.chat-envoyer { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ok); color: var(--ok-ink); font-size: 18px; }
.chat-envoyer:disabled { opacity: .4; }
/* boîte de réception */
.inbox { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.inbox-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; color: inherit; font: inherit; min-height: 60px; }
.inbox-row:last-child { border-bottom: 0; }
.inbox-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inbox-l1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.inbox-nom { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-h { font-size: 11.5px; color: var(--ink3); flex: none; }
.inbox-l2 { font-size: 13.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-badges { display: flex; gap: 4px; margin-top: 2px; }
.bot-pied-liens { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.bot-pied-liens .lien { background: none; border: 0; color: var(--ink2); text-align: left; font: inherit; font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 4px; text-decoration: none; }

/* numéro de table */
.table-num { --zc: var(--gold); display: inline-block; margin-top: 3px; font-weight: 800; font-size: 12px; letter-spacing: .02em; color: var(--ink); background: color-mix(in srgb, var(--zc) 38%, var(--card)); border: 1px solid color-mix(in srgb, var(--zc) 70%, transparent); border-radius: 6px; padding: 1px 6px; }
.table-num.grand { font-size: 15px; padding: 2px 8px; margin: 0 6px 0 0; vertical-align: middle; }
.table-row { display: flex; align-items: center; gap: 10px; margin: 6px 0 8px; }
.table-row .lab { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink2); min-width: 44px; }
.table-input { width: 96px; min-height: 48px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); font: 800 22px var(--ff); text-align: center; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.table-zone { font-size: 13px; color: var(--ink2); font-weight: 600; flex: 1; min-width: 0; }
.label .t { font-weight: 800; font-size: 13px; color: var(--ink2); }
@media print { .label .t { color: #000; font-size: 14pt; } }

/* bascule liste / plan */
.seg.mini.affichage { margin: 2px 0 10px; }
.lab-btn { background: none; border: 0; color: var(--ink2); font: inherit; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; min-height: 44px; padding: 0 6px 0 0; text-align: left; }
/* plan des tables */
.plan { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.plan-legende { display: flex; flex-wrap: wrap; gap: 10px 14px; font-size: 12.5px; color: var(--ink2); padding: 0 2px; }
.plan-legende .leg i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; border: 1px solid var(--line2); background: var(--card); }
.plan-legende .leg.reservee i { background: color-mix(in srgb, var(--warn) 45%, var(--card)); } .plan-legende .leg.occupee i { background: var(--ok); } .plan-legende .leg.liberee i { background: repeating-linear-gradient(135deg, var(--card) 0 3px, var(--line2) 3px 5px); }
.plan-sans { width: 100%; min-height: 48px; border-radius: 12px; border: 1px dashed var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--card)); color: var(--ink); font: 700 14px var(--ff); text-align: left; padding: 0 12px; }
.plan-zone { --zc: #ccc; background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--zc); border-radius: 14px; padding: 8px 10px 10px; }
.plan-zone.compact { padding: 6px 8px 8px; margin-top: 8px; }
.plan-zone-tete { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.plan-zone-nom { font-weight: 800; font-size: 14px; } .plan-zone-n { font-size: 12px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.plan-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.tuile { min-height: 56px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 3px; font: inherit; }
.tuile-n { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; line-height: 1; }
.tuile-nom { font-size: 10.5px; font-weight: 700; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tuile-h { font-size: 10px; color: var(--ink3); white-space: nowrap; }
.tuile.libre { background: color-mix(in srgb, var(--zc) 14%, var(--card)); border-color: color-mix(in srgb, var(--zc) 60%, var(--line2)); }
.tuile.reservee { background: color-mix(in srgb, var(--warn) 40%, var(--card)); border-color: var(--warn); }
.tuile.occupee { background: var(--ok); color: var(--ok-ink); border-color: var(--ok); } .tuile.occupee .tuile-h { color: inherit; opacity: .8; }
.tuile.liberee { background: repeating-linear-gradient(135deg, var(--card) 0 4px, color-mix(in srgb, var(--line2) 60%, var(--card)) 4px 8px); }
.tuile.mienne { background: var(--ink); color: var(--bg); border-color: var(--ink); } .tuile.mienne .tuile-h { color: inherit; }
.tuile.petite { opacity: .55; }
/* feuille imprimée : zone teintée */
@media print {
  .print-liste tr { --zc: #fff; }
  .print-liste td.t { font-weight: 800; background: color-mix(in srgb, var(--zc) 55%, #fff); text-align: center; border-radius: 3px; }
  .print-liste td.z { font-size: 9.5pt; color: #333; }
  .print-liste tr.z-haut td.z::before { content: '▲ '; } .print-liste tr.z-bas td.z::before { content: '▼ '; }
}

/* ===== passe design (audit UX) : en-tête une ligne, icônes SVG, motion, zones du pouce ===== */
.ico { display: inline-flex; width: 22px; height: 22px; vertical-align: middle; }
.ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.search-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink3); pointer-events: none; }
.top { padding-bottom: 6px; }
.tete { align-items: center; gap: 8px; min-height: 48px; }
.tete .pill { padding: 8px 12px; flex: none; }
.seg.compact { flex: none; height: 40px; }
.seg.compact button { min-height: 36px; padding: 0 10px; font-size: 13px; }
.tete-centre { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 0; }
.tete-fleche { background: none; border: 0; color: var(--ink2); min-width: 36px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.tete-fleche .ico { width: 20px; height: 20px; }
.day-title { flex: 0 1 auto; min-height: 44px; padding: 0 4px; }
.day-title .num { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-title small { display: none; }
.tete-droite { flex: none; gap: 6px; }
.icon-btn .ico { width: 22px; height: 22px; }
.icon-btn.or { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.icon-btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stats { margin: 0 0 8px; }
.stats .soir { padding: 8px 12px; }
.soir-att { color: var(--gold); font-weight: 700; font-size: 12.5px; white-space: nowrap; margin-left: auto; }
.stats .soir .soir-l1 { gap: 8px; }
/* rangée recherche + plan */
.rangee-recherche { display: flex; gap: 8px; align-items: center; margin: 6px 0 10px; }
.search-wrap { position: relative; flex: 1; min-width: 0; }
.search-wrap .search { padding-left: 38px; font-size: 16px; }
.rangee-recherche .icon-btn { flex: none; }
.rangee-recherche.fixe { position: fixed; left: 0; right: 0; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 11; margin: 0; padding: 8px 12px; background: color-mix(in srgb, var(--bg) 96%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.porte { padding-bottom: 150px; }
/* état arrivé : indicateur, pas bouton ; bouton Arrivé lisible */
.arrive-ind { display: inline-flex; align-items: center; gap: 4px; min-width: 44px; min-height: 44px; justify-content: center; color: var(--ok); font-weight: 800; font-size: 14px; padding: 0 6px; }
.arrive-ind .ico { width: 22px; height: 22px; }
.porte .arrive-ind { min-width: 96px; min-height: 58px; font-size: 16px; }
.btn.arrivee { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.sheet h2 .x { display: inline-flex; align-items: center; justify-content: center; }
.sheet h2 .x .ico { width: 18px; height: 18px; }
/* lisibilité : jamais sous 11 px, champs à 16 px (pas de zoom iOS), contrastes */
.stat small { font-size: 11px; }
.tuile-h { font-size: 11px; } .tuile-nom { font-size: 11.5px; }
.nav-pastille { font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; }
.bulle-qui { font-size: 11px; }
.note-row input, .q-gen, .sheet textarea, .sheet input[type=text] { font-size: 16px; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--ok); }
.q-apprendre { min-height: 44px; display: flex; align-items: center; gap: 8px; }
.tuile.reservee, .tuile.reservee .tuile-h { color: var(--ink); }
.chip.a_traiter { color: var(--ink); background: color-mix(in srgb, var(--warn) 32%, var(--card)); }
.homonyme { color: var(--ink); background: color-mix(in srgb, var(--warn) 30%, var(--card)); border-radius: 6px; padding: 1px 6px; font-size: 11.5px; }
.seg.mini button { flex: 0 0 auto; }
/* états pressés et motion */
.card:active, .tuile:active, .stat:active, .bot-ligne:active, .inbox-row:active, .cell:active, .pli:active, .lien:active, .icon-btn:active, .tete-fleche:active, .day-title:active, .bottom button:active, .chat-act:active { opacity: .65; transform: scale(.985); }
.card, .tuile, .stat, .bot-ligne, .inbox-row, .cell, .pli, .icon-btn, .bottom button { transition: opacity .12s, transform .12s, background-color .15s; }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-in { from { transform: translateX(100%); } to { transform: none; } }
.sheet-bg { animation: fade-in .2s ease-out; }
.sheet { animation: sheet-in .28s cubic-bezier(.2,.8,.2,1); }
.chat { animation: slide-in .26s cubic-bezier(.2,.8,.2,1); }
.toast { transition: opacity .18s, transform .18s; }
@media (prefers-reduced-motion: reduce) { .sheet-bg, .sheet, .chat { animation: none; } .card, .tuile, .stat, .bot-ligne, .inbox-row, .cell, .pli, .icon-btn, .bottom button, .toast { transition: none; } }
/* pli : lignes compactes sur une ligne de 44 px */
.card.compact { grid-template-columns: 54px minmax(0, 1fr) auto; padding: 0 8px 0 10px; min-height: 44px; margin-bottom: 4px; }
.card.compact .heure, .card.compact .body { min-height: 44px; }
.card.compact .arrive-ind { min-height: 44px; }
/* passe design 2 : choix de table replié, curseurs, fiche */
details.plan-zone > summary { list-style: none; cursor: pointer; }
details.plan-zone > summary::-webkit-details-marker { display: none; }
details.plan-zone:not([open]) { opacity: .8; }
.plan-zone.vide { opacity: .55; border-style: dashed; }
.rg-jours { margin-top: 6px; } .rg-jours > summary { font-size: 13px; font-weight: 700; color: var(--ink2); min-height: 44px; display: flex; align-items: center; cursor: pointer; list-style: none; }
.rg-jours > summary::before { content: '›'; display: inline-block; margin-right: 6px; transition: transform .15s; } .rg-jours[open] > summary::before { transform: rotate(90deg); }
.client-detail { margin: 8px 0 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.client-resume { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; font-weight: 700; font-size: 14px; cursor: pointer; }
.client-resume::-webkit-details-marker { display: none; }
.client-resume .who { font-size: 16px; } .client-chev { margin-left: auto; color: var(--ink3); font-size: 18px; transition: transform .15s; }
.client-detail[open] .client-chev { transform: rotate(90deg); }
.client-detail .client-box { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; }
.sheet-pied { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); background: var(--bg2); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); margin: 6px -16px -16px; padding-left: 16px; padding-right: 16px; border-top: 1px solid var(--line); z-index: 1; }
.btn.principale { background: var(--ok); color: var(--ok-ink); border-color: transparent; min-height: 54px; font-size: 17px; gap: 8px; margin-top: 0; }
.btn.principale .ico { width: 22px; height: 22px; }
/* coche d'enregistrement des champs texte des réglages (même langage que la note équipe) */
.field { position: relative; }
.champ-etat { position: absolute; right: 12px; bottom: 11px; min-width: 18px; text-align: center; color: var(--ok); font-weight: 800; font-size: 14px; pointer-events: none; }
