/* GOLD Support — conçu et développé par Hamza MACHIT, Responsable IT · pour toute question : +33 6 51 73 53 93 · hamza.machit@gold.fr */
/* Layout : barre haute (persona) + rail de navigation + zone de travail ; détail ticket = fil + panneau d'actions */
:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --sunk: #eceef2;
  --ink: #1a202b;
  --muted: #5b6474;
  --line: #dde1e7;
  --accent: #986c11;
  --accent-ink: #7a560c;
  --accent-soft: #f6ecd6;
  --on-accent: #ffffff;
  --new: #2459c7;
  --new-bg: #e5edfb;
  --taken: #0e766a;
  --taken-bg: #dcf2ee;
  --wait: #a35a00;
  --wait-bg: #fbecd9;
  --n3: #6b3fc4;
  --n3-bg: #ece5fa;
  --done: #2d7a2d;
  --done-bg: #e1f1df;
  --closed: #5b6474;
  --closed-bg: #e7e9ed;
  --crit: #b42318;
  --crit-bg: #fbe4e1;
  --note: #fff7df;
  --note-line: #ecd38f;
  --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Public Sans', 'Segoe UI', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #11141a;
    --surface: #191d25;
    --sunk: #14181f;
    --ink: #e6e9ef;
    --muted: #9aa3b3;
    --line: #2a303b;
    --accent: #d4a640;
    --accent-ink: #e2bb62;
    --accent-soft: #2e2615;
    --on-accent: #1a1406;
    --new: #7ea6ff;
    --new-bg: #1b2742;
    --taken: #4fd1bd;
    --taken-bg: #13302c;
    --wait: #f0a54a;
    --wait-bg: #33240f;
    --n3: #b49bff;
    --n3-bg: #271f3f;
    --done: #7fd27f;
    --done-bg: #183018;
    --closed: #a2aab8;
    --closed-bg: #252a33;
    --crit: #ff8a7e;
    --crit-bg: #3a1a17;
    --note: #2b2614;
    --note-line: #5c4c1f;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #11141a;
  --surface: #191d25;
  --sunk: #14181f;
  --ink: #e6e9ef;
  --muted: #9aa3b3;
  --line: #2a303b;
  --accent: #d4a640;
  --accent-ink: #e2bb62;
  --accent-soft: #2e2615;
  --on-accent: #1a1406;
  --new: #7ea6ff;
  --new-bg: #1b2742;
  --taken: #4fd1bd;
  --taken-bg: #13302c;
  --wait: #f0a54a;
  --wait-bg: #33240f;
  --n3: #b49bff;
  --n3-bg: #271f3f;
  --done: #7fd27f;
  --done-bg: #183018;
  --closed: #a2aab8;
  --closed-bg: #252a33;
  --crit: #ff8a7e;
  --crit-bg: #3a1a17;
  --note: #2b2614;
  --note-line: #5c4c1f;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  height: 100%;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
h1,
h2,
h3 {
  font-family: var(--f-display);
  text-wrap: balance;
  margin: 0;
  line-height: 1.2;
}
.mono {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.01em;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* top bar */
.top {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}
.mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 15px;
}
.brand b {
  font-family: var(--f-display);
  font-size: 17px;
}
.brand span {
  color: var(--muted);
  font-size: 12px;
}
.persona {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.persona label {
  font-size: 12px;
  color: var(--muted);
}
.persona select {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  max-width: 100%;
}
.proto {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 4px;
}

.app {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: calc(100% - 52px);
}
.rail {
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--sunk);
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav button {
  all: unset;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  font-weight: 500;
}
.nav button:hover {
  background: var(--surface);
}
.nav button[aria-current='true'] {
  background: var(--surface);
  box-shadow: inset 3px 0 0 var(--accent);
  font-weight: 600;
}
.nav .count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.who {
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.who strong {
  font-size: 14px;
}
.rule-box {
  font-size: 12.5px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 10px;
  line-height: 1.45;
}
.rule-box b {
  color: var(--ink);
}
.reset {
  all: unset;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  margin-top: auto;
}

/* fondu léger à chaque changement de vue (désactivé si l'utilisateur préfère moins d'animations) */
main.swap {
  animation: viewin 0.16s ease-out;
}
@keyframes viewin {
  from {
    opacity: 0.35;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  main.swap {
    animation: none;
  }
}
main {
  padding-block: 22px 48px;
  padding-inline: 28px;
  min-width: 0;
}
.head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.head h1 {
  font-size: 24px;
}
.btn {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 7px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
}
.btn:hover {
  border-color: var(--muted);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn.primary:hover {
  filter: brightness(1.06);
}
.btn.ghost {
  background: transparent;
}
.btn.danger {
  color: var(--crit);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.stat {
  all: unset;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat:hover {
  border-color: var(--muted);
}
.stat[aria-pressed='true'] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.stat .n {
  font-family: var(--f-display);
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat .l {
  font-size: 12.5px;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  overflow-x: auto;
}
.tabs button {
  all: unset;
  cursor: pointer;
  padding: 8px 12px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tabs button[aria-selected='true'] {
  color: var(--ink);
  border-color: var(--accent);
}
.tabs .count {
  font-weight: 500;
  font-size: 12px;
  margin-left: 4px;
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.chip {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12.5px;
}
.chip[aria-pressed='true'] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.tablewrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 760px;
}
th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
/* un lien ou un mot très long (titre, motif d'attente) se coupe au lieu d'élargir le tableau hors de l'écran */
td .t-title,
td .t-sub {
  overflow-wrap: anywhere;
}
tbody tr {
  cursor: pointer;
}
/* colonne Statut : le motif d'attente ne doit pas manger la place du titre */
td.stcol {
  max-width: 300px;
}
tbody tr:hover {
  background: var(--sunk);
}
tbody tr:last-child td {
  border-bottom: 0;
}
/* tickets rattachés : le ticket principal et ses tickets rattachés forment un bloc, barre à gauche */
tbody tr.grp td,
tbody tr.kid:not(.last) td {
  border-bottom-color: transparent;
}
tbody tr.grp td:first-child,
tbody tr.kid td:first-child {
  box-shadow: inset 3px 0 0 var(--n3);
}
tbody tr.kid {
  background: var(--sunk);
}
tbody tr.kid td {
  padding-top: 7px;
  padding-bottom: 7px;
}
.kidarrow {
  color: var(--n3);
  margin-right: 6px;
}
.linkchip {
  font-size: 11px;
  font-weight: 700;
  color: var(--n3);
  background: var(--n3-bg);
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
}
.t-title {
  font-weight: 600;
}
.t-sub {
  font-size: 12.5px;
  color: var(--muted);
}
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

/* badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.st-nouveau {
  color: var(--new);
  background: var(--new-bg);
}
.st-pris {
  color: var(--taken);
  background: var(--taken-bg);
}
.st-attente {
  color: var(--wait);
  background: var(--wait-bg);
}
.st-n3 {
  color: var(--n3);
  background: var(--n3-bg);
}
.st-resolu {
  color: var(--done);
  background: var(--done-bg);
}
.st-clos {
  color: var(--closed);
  background: var(--closed-bg);
}
.st-crit {
  color: var(--crit);
  background: var(--crit-bg);
}
.st-attente_int {
  color: var(--closed);
  background: var(--closed-bg);
}
.st-bloque {
  color: var(--crit);
  background: var(--crit-bg);
}
.callbar {
  margin: 12px 20px 0;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--taken-bg);
  border: 1px solid var(--taken);
  display: flex;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 13px;
}
.callbar b {
  color: var(--taken);
}
.hint {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}
.parclist {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.parclist .pi {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  text-align: left;
}
.parclist .pi b {
  font-size: 13px;
}
.parclist .pi span {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.parclist .pi .mono {
  font-size: 12px;
}
.sidesec {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidesec .eyebrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.sidesec .eyebrow small {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
}
.choice {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.choice label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  background: var(--surface);
}
.choice label input {
  margin-top: 3px;
  width: auto;
  flex: none;
}
.choice label b {
  display: block;
}
.choice label small {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 1px;
}
.choice label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.remind {
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.remind i {
  display: inline-flex;
  gap: 3px;
}
.remind i b {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  display: block;
}
.remind i b.on {
  background: var(--wait);
}
.dupb {
  color: var(--wait);
  background: var(--wait-bg);
  border: 1px solid var(--wait);
}
.dupb::before {
  display: none;
}
.lvl {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.lvl.n3 {
  color: var(--n3);
  border-color: var(--n3);
}
.prio {
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.prio i {
  display: inline-flex;
  gap: 2px;
}
.prio i b {
  width: 4px;
  height: 12px;
  border-radius: 1px;
  background: var(--line);
}
.prio.p4 {
  color: var(--crit);
}
.prio.p4 i b {
  background: var(--crit);
}
.prio.p3 {
  color: var(--wait);
}
.prio.p3 i b:nth-child(-n + 3) {
  background: var(--wait);
}
.prio.p2 i b:nth-child(-n + 2) {
  background: var(--muted);
}
.prio.p1 i b:nth-child(1) {
  background: var(--muted);
}
.typetag {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-ink);
}
/* export Excel (RH) dans l'en-tête de la liste */
.exportctl {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.exportctl select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--surface);
}
/* échéance d'une arrivée / d'un départ dans les listes */
.due {
  display: inline-block;
  margin-left: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--sunk);
  color: var(--muted);
  white-space: nowrap;
}
.due.warn {
  color: var(--wait);
  background: var(--wait-bg);
}
.due.crit {
  color: var(--crit);
  background: var(--crit-bg);
}

/* new ticket */
.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.types {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 10px;
}
.typecard {
  all: unset;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.typecard:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.typecard > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
/* type choisi : rappel sur une ligne, les autres tuiles sont repliées */
.typepicked {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  border-radius: var(--r);
}
.typepicked > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.typepicked b {
  font-family: var(--f-display);
  font-size: 16px;
}
.typepicked .btn {
  flex: none;
}
.typecard:hover {
  border-color: var(--muted);
}
.typecard b {
  font-family: var(--f-display);
  font-size: 15px;
}
.typecard span {
  font-size: 12.5px;
  color: var(--muted);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.field label {
  font-weight: 600;
  font-size: 13px;
}
.field small {
  color: var(--muted);
  font-size: 12px;
}
.field input,
.field select,
.field textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: var(--surface);
  width: 100%;
}
.field textarea {
  min-height: 150px; /* assez haut pour « Bonjour, … Merci » sans ascenseur */
  resize: vertical;
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px 18px;
}
.fieldset {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.err {
  color: var(--crit);
  font-size: 12.5px;
}

/* rangée de boutons en bas d'un formulaire ou d'une carte : alignés à droite, empilés sur téléphone */
.btnrow {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
/* titre d'une ligne de liste : une ligne tronquée sur grand écran, deux lignes sur téléphone */
.tt {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panelhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.railfoot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.railfoot .reset {
  margin: 0;
}

/* detail */
.back {
  all: unset;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
  display: inline-block;
}
.back:hover {
  color: var(--ink);
}
.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.dhead {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dhead h1 {
  font-size: 21px;
}
.dhead h1 .titlebtn {
  font-size: 12.5px;
  font-weight: 500;
  margin-left: 8px;
  vertical-align: middle;
}
.titleedit {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.titleedit input {
  flex: 1 1 320px;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  padding: 6px 10px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}
.meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.desc {
  padding: 16px 20px;
  white-space: pre-wrap;
  border-bottom: 1px solid var(--line);
}
.extra {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 18px;
  background: var(--sunk);
}
.extra div {
  display: flex;
  flex-direction: column;
}
.extra span {
  font-size: 11.5px;
  color: var(--muted);
}
.timeline {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ev {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
}
.av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--sunk);
  border: 1px solid var(--line);
}
.av.sup {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.av.n3 {
  background: var(--n3-bg);
  border-color: var(--n3);
  color: var(--n3);
}
.bubble {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 12px;
  min-width: 0;
}
.bubble.note {
  background: var(--note);
  border-color: var(--note-line);
}
.bubble .h {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: baseline;
  font-size: 12.5px;
  margin-bottom: 4px;
}
.bubble .h b {
  font-size: 13px;
}
.bubble p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sys {
  grid-column: 1/-1;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
  padding-left: 38px;
}
.sys::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  flex: none;
}
.sys.flow {
  color: var(--accent-ink);
}
.sys.flow::before {
  background: var(--accent);
}
.tag-int {
  font-size: 11px;
  font-weight: 700;
  color: var(--wait);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.composer {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.composer textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  min-height: 80px;
  resize: vertical;
  background: var(--surface);
  width: 100%;
}
.composer .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.check {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
}
.check input[type='radio'] {
  width: auto;
  flex: none;
}

.side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.panel {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.panel h3 {
  font-size: 14px;
}
.aibox {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 14px 20px 0;
  background: var(--sunk);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aibox .aih {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.aibox .aih .eyebrow {
  margin: 0;
}
.aibox .aitag {
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  color: var(--muted);
}
.aibox ol {
  margin: 0;
  padding-left: 20px;
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.aibox p {
  margin: 0;
  font-size: 13.5px;
}
.aibox .aisrc {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12.5px;
  align-items: center;
}
.aibox .aisrc .linkbtn {
  font-size: 12.5px;
}
.aibox .row {
  margin-top: 2px;
}
.aibox pre {
  white-space: pre-wrap;
  font: inherit;
  font-size: 13.5px;
  margin: 0;
}
.kpi.ok .n {
  color: var(--done);
}
.kpi.warn .n {
  color: var(--wait);
}
.kpi.bad .n {
  color: var(--crit);
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(12, 14, 20, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  background: #fff;
}
.lightbox .lbname {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 10px;
  border-radius: 999px;
}
.file img {
  cursor: zoom-in;
}
.aiq {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}
.aiq b {
  color: var(--ink);
}
.aisplit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 14px 20px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--sunk);
  overflow: hidden;
}
.aisplit .aibox {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.aifb {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 12.5px;
  margin-left: auto;
}
.aifb .btn {
  padding: 3px 9px;
  font-size: 12px;
}
.aisplit .aibox + .aibox {
  border-left: 1px solid var(--line);
}
@media (max-width: 900px) {
  .aisplit {
    grid-template-columns: 1fr;
  }
  .aisplit .aibox + .aibox {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  font-size: 13px;
}
.kv dt {
  color: var(--muted);
}
.kv dd {
  margin: 0;
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}
.actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.actions .btn {
  text-align: left;
}
.sub {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--sunk);
}
.sub .field textarea {
  min-height: 70px;
}
.sub .row {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.solution {
  border: 1px solid var(--done);
  background: var(--done-bg);
  border-radius: var(--r);
  padding: 14px 16px;
  margin: 16px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.solution b {
  color: var(--done);
}
.solution .row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 9px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  z-index: 10;
  max-width: calc(100% - 32px);
}

.banner {
  display: flex;
  gap: 6px 12px;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: var(--r);
  margin-bottom: 16px;
  border: 1px solid var(--new);
  background: var(--new-bg);
}
.banner.incident {
  border-color: var(--crit);
  background: var(--crit-bg);
}
.banner b {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--new);
}
.banner.incident b {
  color: var(--crit);
}
.banner span {
  flex: 1 1 240px;
  min-width: 0;
  font-weight: 500;
}
.banner small {
  color: var(--muted);
}
.files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.file {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: var(--surface);
  min-width: 0;
  max-width: 100%;
  font-size: 12.5px;
}
.file img,
.file .ico {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  flex: none;
}
.file img {
  object-fit: cover;
}
.file .ico {
  background: var(--sunk);
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--muted);
}
.file .fn {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
.file button {
  all: unset;
  cursor: pointer;
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 4px;
}
.file button:hover {
  color: var(--crit);
}
.drop {
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.drop.over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.attach {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bubble .files {
  margin-top: 8px;
}
.warn {
  color: var(--wait);
  font-size: 12.5px;
  font-weight: 600;
}
.segs {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.segs button {
  all: unset;
  cursor: pointer;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.segs button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--bg);
}
.tlhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 20px 0;
}
table.audit {
  min-width: 620px;
  font-size: 13px;
}
table.audit tbody tr {
  cursor: default;
}
table.audit tbody tr:hover {
  background: transparent;
}
.tpl {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: var(--surface);
  max-width: 100%;
}
.stars {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 2px;
}
.stars input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.field .stars label,
.satrow .stars label {
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--line);
  font-weight: 400;
}
.stars input:checked ~ label,
.field .stars label:hover,
.field .stars label:hover ~ label,
.satrow .stars label:hover,
.satrow .stars label:hover ~ label {
  color: var(--accent);
}
.stars input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.rating {
  color: var(--accent);
  letter-spacing: 1px;
}
.sat {
  border-top: 1px solid var(--done);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kpi .n {
  font-family: var(--f-display);
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.kpi .l {
  font-size: 12.5px;
  color: var(--muted);
}
.dgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 14px;
}
.bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.barrow {
  display: grid;
  grid-template-columns: minmax(0, 150px) minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.barrow span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.barrow b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
/* tableau de bord : lignes cliquables qui ouvrent le détail */
button.barrow {
  width: 100%;
  padding: 3px 4px;
  margin: -3px -4px;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
}
button.barrow:hover,
tr.drill:hover td {
  background: var(--sunk);
}
tr.drill {
  cursor: pointer;
}
.bar {
  height: 10px;
  background: var(--sunk);
  border-radius: 2px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}
.restrict {
  font-size: 12px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 6px 10px;
}
.teams {
  max-width: 620px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.teams header {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.teams .bot {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: var(--f-display);
}
.teams .body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.teams ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.comments {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.comments div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.comments div:last-child {
  border: 0;
}
.search {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  background: var(--surface);
}
.search small {
  color: var(--muted);
  white-space: nowrap;
}
.cards {
  display: none;
}
.tcard {
  all: unset;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
}
.tcard:focus-visible {
  outline: 2px solid var(--accent);
}
.tcard .ttop {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.tcard .row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.ccchip {
  font-size: 11px;
  font-weight: 700;
  color: var(--n3);
  background: var(--n3-bg);
  padding: 1px 6px;
  border-radius: 3px;
}
/* personnes en copie d'un ticket, avec le bouton pour les retirer */
.ccwatch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ccwatch .ccchip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 2px 4px 2px 7px;
}
.ccwatch .linkbtn {
  font-size: 14px;
  line-height: 1;
  padding: 0 3px;
}
.imposed {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
}
.load {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.cfggrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.cfglist {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 6px;
  max-height: 300px;
  overflow: auto;
}
.cfgitem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.cfgitem:last-child {
  border-bottom: 0;
}
.cfgitem > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.cfgbtns {
  display: flex;
  gap: 2px;
  align-items: center;
  flex: none;
}
.cfgbtns button {
  all: unset;
  cursor: pointer;
  color: var(--muted);
  padding: 2px 7px;
  border-radius: 4px;
}
.cfgbtns button:hover {
  background: var(--sunk);
  color: var(--ink);
}
.cfgbtns button.del:hover {
  color: var(--crit);
}
.cfgadd {
  display: flex;
  gap: 6px;
}
.cfgitem.off > span:first-child {
  color: var(--muted);
  text-decoration: line-through;
}
.cfgdetails {
  margin-top: 12px;
}
.cfgdetails summary {
  cursor: pointer;
  font-size: 13.5px;
}
.cfgadd select,
.cfgitem select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: var(--surface);
  font: inherit;
  color: inherit;
  min-width: 0;
  max-width: 100%;
}
.cfgadd {
  flex-wrap: wrap;
}
.cfgadd input {
  flex: 1 1 200px;
  width: auto;
}
.cfgitem select {
  flex: 1 1 160px;
}
.cfgadd input,
.tplcard input,
.tplcard textarea,
.cfgnum input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--surface);
  min-width: 0;
  width: 100%;
}
.tplcard input[type='checkbox'] {
  width: auto;
}
.tplcard {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tplcard textarea {
  min-height: 120px;
  resize: vertical;
  font-size: 13px;
}
.cfgnum {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px;
  gap: 8px 12px;
  align-items: center;
  font-size: 13.5px;
}
.bellwrap {
  position: relative;
}
.bell {
  all: unset;
  cursor: pointer;
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.bell:hover {
  border-color: var(--muted);
}
.bcount {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--crit);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}
.bellpanel {
  position: absolute;
  right: 0;
  top: 44px;
  width: min(360px, calc(100vw - 32px));
  max-height: 70vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  z-index: 20;
}
.bellpanel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.bellpanel header button {
  all: unset;
  cursor: pointer;
  font-size: 12px;
  color: var(--accent-ink);
  font-weight: 600;
}
.nitem {
  all: unset;
  cursor: pointer;
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
}
.nitem:hover {
  background: var(--sunk);
}
.nitem i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  flex: none;
  margin-top: 6px;
}
.nitem.unread i {
  background: var(--new);
}
.nitem.unread span b {
  font-weight: 700;
}
.nitem small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 2px;
}
.presence {
  margin: 12px 20px 0;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--wait-bg);
  color: var(--wait);
  font-size: 12.5px;
  font-weight: 600;
}
.pin {
  margin: 12px 20px 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  font-size: 13px;
}
.pin b {
  color: var(--accent-ink);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}
.draftnote {
  font-size: 12px;
  color: var(--muted);
}
.badge.visit {
  color: var(--n3);
  background: var(--n3-bg);
}
.linkbtn {
  all: unset;
  cursor: pointer;
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.dsec {
  margin-bottom: 18px;
}
.dsec h2 {
  font-size: 15px;
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.dsec h2 span {
  font-family: var(--f-body);
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
}
.dlist {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.drow {
  all: unset;
  cursor: pointer;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.drow:last-child {
  border-bottom: 0;
}
.drow:hover {
  background: var(--sunk);
}
.drow .why {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.phoneqr {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 8px 0;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.phoneqr .qr {
  width: 148px;
  height: 148px;
  flex: none;
  background: #fff;
}
.phoneqr .qr svg {
  width: 100%;
  height: 100%;
}
.phoneqr > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  font-size: 13px;
}
.phoneqr span {
  color: var(--muted);
}
.phoneqr .okmsg {
  color: var(--done);
  font-weight: 600;
}
@media (pointer: coarse) {
  .phonebtn {
    display: none;
  }
}
.phoneup {
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.phoneup label.btn {
  justify-content: center;
  text-align: center;
  padding: 14px;
  font-size: 15px;
}
.upsent {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
/* techniciens à gauche, derniers avis à la suite sur la même ligne */
.dpair {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 14px;
  align-items: start;
}
@media (max-width: 900px) {
  .dpair {
    grid-template-columns: 1fr;
  }
}
/* les deux cartes des techniciens l'une sous l'autre, chacune à sa hauteur */
.dstack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.searchcard {
  display: flex;
  flex-direction: column;
}
.dashq {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  background: var(--surface);
  margin-bottom: 10px;
  font: inherit;
  font-size: 13px;
}
/* la liste prend la hauteur de la carte (alignée sur ses voisines) et défile au-delà */
.searchbars {
  flex: 1 1 auto;
  contain: size;
  min-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}
.searchbars [hidden],
.dashnone[hidden] {
  display: none;
}
.rapctl {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.rapctl input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: var(--surface);
  font: inherit;
  font-size: 13px;
}
.svcsla {
  margin: 14px 0 4px;
}
.svcrow {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  margin-top: 6px;
}
.svc {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 12.5px;
}
.live {
  margin: 14px 0;
}
.livetop {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.livetop b {
  color: var(--ink, inherit);
  font-size: 15px;
}
.loadtbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.loadtbl th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 6px;
}
.loadtbl td {
  padding: 5px 6px;
  border-top: 1px solid var(--line);
}
.loadtbl td:not(:first-child):not(.lbar),
.loadtbl th:not(:first-child) {
  text-align: center;
  width: 80px;
}
.loadtbl .lbar {
  width: 30%;
}
.loadtbl .lbar i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--accent);
}
.loadtbl tr.absent td {
  opacity: 0.6;
}
.callchip {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--done-bg);
  color: var(--done);
}
.oldsearch {
  font-size: 12.5px;
  margin: 10px 2px;
}
.oldres {
  margin-top: 18px;
}
.oldres .t-sub {
  display: block;
}
.oldres .oldx {
  font-style: italic;
  margin-top: 2px;
}
.dempty {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}
.timebox {
  display: flex;
  gap: 6px;
  align-items: center;
}
.timebox input {
  width: 90px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
  background: var(--surface);
}
.ferr {
  color: var(--crit);
  font-size: 12.5px;
  font-weight: 600;
}
.field:has(.ferr) > input,
.field:has(.ferr) > select,
.field:has(.ferr) > textarea {
  border-color: var(--crit);
  box-shadow: 0 0 0 1px var(--crit);
}
.steps {
  display: flex;
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  overflow-x: auto;
}
.steps li {
  flex: 1;
  min-width: 76px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}
.steps li i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  position: relative;
  z-index: 1;
}
.steps li::before {
  content: '';
  position: absolute;
  top: 6px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}
.steps li:first-child::before {
  display: none;
}
.steps li.done i {
  background: var(--done);
  border-color: var(--done);
}
.steps li.done::before,
.steps li.cur::before {
  background: var(--done);
}
.steps li.cur i {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.steps li.cur span {
  color: var(--ink);
  font-weight: 700;
}
.callout {
  margin: 12px 20px 0;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  display: flex;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.callout b {
  display: block;
  color: var(--accent-ink);
}
.callout span {
  font-size: 13px;
}
/* file des tickets : le demandeur a écrit, le support n'a pas encore repris la main */
.replied {
  font-size: 11px;
  font-weight: 700;
  color: var(--new);
  background: var(--new-bg);
  border: 1px solid var(--new);
  padding: 0 7px;
  border-radius: 3px;
  white-space: nowrap;
}
.replied::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--new);
  margin-right: 5px;
  vertical-align: 1px;
}
/* demande d'avis d'un collègue : vive tant que le ticket n'a pas été ouvert, discrète ensuite */
.asked {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  padding: 0 7px;
  border-radius: 3px;
  white-space: nowrap;
}
.asked.seen {
  font-weight: 500;
  color: var(--muted);
  background: none;
  border-color: var(--line);
}
.drow.askseen .tt {
  font-weight: 500;
}
.tag-ask {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-ink);
}
.mentions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12.5px;
}
.mentions .chip small {
  color: var(--muted);
}
.need {
  font-size: 11px;
  font-weight: 700;
  color: var(--on-accent);
  background: var(--accent);
  padding: 1px 7px;
  border-radius: 3px;
  white-space: nowrap;
}
.nav .count.hot {
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 9px;
  padding: 0 7px;
  font-weight: 700;
}
.sent {
  max-width: 640px;
  margin: 10px auto 0;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.okmark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--done-bg);
  color: var(--done);
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
}
.sent h1 {
  font-size: 26px;
}
.sent h2 {
  font-size: 16px;
  margin-top: 4px;
}
.recap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 18px;
  background: var(--sunk);
  border-radius: var(--r);
  padding: 12px 14px;
}
.recap div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.recap span {
  font-size: 11.5px;
  color: var(--muted);
}
.next {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}
.sent .row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.kbgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 12px;
}
.kbcard {
  all: unset;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kbcard:hover {
  border-color: var(--muted);
}
.kbcard p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kbbody {
  white-space: pre-wrap;
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 70ch;
}
.lowsat {
  border-left: 3px solid var(--crit);
  padding-left: 10px;
}
/* --- Espace utilisateur : affichage chaleureux --- */
main.umode {
  font-size: 15px;
}
.card,
.form,
.tablewrap,
.kpi,
.stat {
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}
.btn {
  border-radius: 8px;
}
.nav button {
  border-radius: 8px;
}
.hello {
  margin-bottom: 18px;
}
.hello h1 {
  font-size: 30px;
}
.hello p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 16px;
}
.quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.qcard {
  all: unset;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease;
}
.qcard:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.08);
}
.qcard:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.qcard b {
  font-family: var(--f-display);
  font-size: 16.5px;
  display: block;
  margin-bottom: 2px;
}
.qcard span span {
  font-size: 13.5px;
  color: var(--muted);
}
.qicon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  flex: none;
}
.qicon.sm {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}
.qicon.sm svg {
  width: 15px;
  height: 15px;
}
.ucards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 12px;
}
.ucard {
  all: unset;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}
.ucard:hover {
  border-color: var(--muted);
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.07);
}
.ucard:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.ucard.needs {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.uhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.uhead > span:first-child {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.ut {
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
}
.phrase {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.phrase i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}
.mini {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.mini i {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
}
.mini i.on {
  background: var(--done);
}
.mini i.cur {
  background: var(--accent);
}
.uempty {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 14px;
}
.uempty b {
  color: var(--ink);
  font-size: 16px;
}
.prefill {
  margin: 0 0 4px;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--new-bg);
  color: var(--ink);
  font-size: 13.5px;
  border: 1px solid var(--new);
}
/* --- Visite guidée --- */
.tourblock {
  position: fixed;
  inset: 0;
  z-index: 40;
}
.tourhole {
  position: fixed;
  z-index: 41;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(12, 14, 20, 0.58);
  pointer-events: none;
  transition:
    top 0.2s ease,
    left 0.2s ease,
    width 0.2s ease,
    height 0.2s ease;
}
.tourtip {
  position: fixed;
  z-index: 42;
  width: min(340px, calc(100vw - 32px));
  background: var(--surface);
  color: var(--ink);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tourtip h3 {
  font-size: 17px;
}
.tourtip p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
}
.tourtip .trow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.tourtip .dots {
  display: flex;
  gap: 5px;
}
.tourtip .dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
}
.tourtip .dots i.on {
  background: var(--accent);
}
@media (prefers-reduced-motion: reduce) {
  .tourhole,
  .qcard,
  .ucard {
    transition: none;
  }
}
.onbehalf {
  margin: 0 0 4px;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  display: flex;
  gap: 10px 14px;
  align-items: center;
  flex-wrap: wrap;
}
.onbehalf select {
  flex: 1;
  min-width: 200px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--surface);
}
.dirsearch {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.dirsearch input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--surface);
}
.dirres {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 260px;
  overflow: auto;
  padding: 4px;
}
.dirres button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 7px 10px;
  border-radius: 6px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.dirres button:hover,
.dirres button:focus {
  background: var(--accent-soft);
}
.dirres small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.dirres .none {
  padding: 7px 10px;
  color: var(--muted);
  font-size: 13px;
}
.picked {
  font-weight: 700;
}
.origin {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 3px;
}
.st-annule {
  color: var(--closed);
  background: var(--closed-bg);
}
/* --- Identité, connexion, aide, erreurs, menu groupé --- */
.logo {
  height: 44px;
  width: auto;
  display: block;
}
.brand .sep {
  width: 1px;
  height: 34px;
  background: var(--line);
}
.brand b.appname {
  font-family: var(--f-display);
  font-size: 19px;
  color: var(--accent-ink);
  line-height: 1.1;
}
.logo.big {
  height: auto;
  width: min(240px, 70vw);
  margin: 0 auto 4px;
}
.brandbig {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}
.brandbig b.appname {
  font-family: var(--f-display);
  font-size: 22px;
  color: var(--accent-ink);
}
.gold,
.brand b .gold,
.brandbig b .gold {
  color: var(--accent-ink);
  font-size: inherit;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.me {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 4px;
}
.me .av {
  width: 34px;
  height: 34px;
  font-size: 12px;
}
.me b {
  display: block;
  font-size: 13.5px;
  line-height: 1.2;
}
.me small {
  color: var(--muted);
  font-size: 11.5px;
}
.help {
  all: unset;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 17px;
}
.help:hover {
  border-color: var(--muted);
}
.app.nouser {
  grid-template-columns: minmax(0, 1fr);
}
.app.nouser .rail {
  display: none;
}
.login {
  min-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-block: 24px;
}
.logincard {
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 14px 40px rgba(16, 24, 40, 0.08);
}
.brandbig {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brandbig .mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 22px;
}
.brandbig b {
  font-family: var(--f-display);
  font-size: 24px;
  display: block;
  line-height: 1.1;
}
.brandbig span {
  color: var(--muted);
  font-size: 13px;
}
.logincard h1 {
  font-size: 22px;
  margin-top: 6px;
}
.logincard p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.msbtn {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 13px 16px;
  font-weight: 600;
  font-size: 15px;
  margin-top: 6px;
}
.msbtn:hover {
  border-color: var(--muted);
  background: var(--sunk);
}
.msbtn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.loginfoot {
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
  margin: 0;
}
.modalwrap {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(12, 14, 20, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal .sub {
  border: 0;
  padding: 0;
  background: transparent;
}
.modal .sub textarea {
  min-height: 120px;
}
.modal {
  width: min(640px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface);
  color: var(--ink);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}
.mhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.mhead h2 {
  font-size: 20px;
}
.modal details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
}
.modal summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 600;
  font-size: 14.5px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.modal summary::-webkit-details-marker {
  display: none;
}
.modal summary::after {
  content: '+';
  color: var(--muted);
  font-weight: 400;
  font-size: 18px;
  line-height: 1;
}
.modal details[open] summary::after {
  content: '–';
}
.modal details p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.acct {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
}
.acct:hover,
.acct:focus-visible {
  background: var(--sunk);
}
.acct .av {
  width: 36px;
  height: 36px;
}
.acct b {
  display: block;
  font-size: 14px;
}
.acct small {
  color: var(--muted);
  font-size: 12.5px;
}
.acct .tag {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 1px 7px;
  border-radius: 3px;
  white-space: nowrap;
}
.errpage {
  max-width: 560px;
  margin: 40px auto 0;
  padding: 34px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  border-radius: 18px;
}
.errpage .erricon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
}
.errpage h1 {
  font-size: 24px;
}
.errpage p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}
.errpage .row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.navlab {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 10px 3px;
  font-weight: 700;
}
.navlab:first-child {
  padding-top: 0;
}
.away {
  font-size: 11px;
  font-weight: 700;
  color: var(--wait);
  background: var(--wait-bg);
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
}
.checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px 14px;
}
.checks label:has(.accdet:not([hidden]), .accamt:not([hidden])) {
  grid-column: 1/-1;
  flex-wrap: wrap;
}
.accamt {
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.accamt input {
  width: 110px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  background: var(--surface);
  font-size: 12.5px;
}
.accdet {
  margin-left: 8px;
  flex: 1 1 160px;
  min-width: 140px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  background: var(--surface);
  font-size: 12.5px;
}
.checks label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}
.checks label input {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
}
.checks.ccpick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.checks.ccpick label {
  display: inline-flex;
  width: auto;
  white-space: nowrap;
  justify-content: flex-start;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
}
.tasks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tasks label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
}
.tasks label.done span {
  color: var(--muted);
  text-decoration: line-through;
}
.tasks small {
  color: var(--muted);
  font-size: 11.5px;
}
.progress {
  height: 6px;
  background: var(--sunk);
  border-radius: 3px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--done);
}

/* ====================================================================================================
   Listes déroulantes : rendues dans la page (Chrome / Edge « base-select ») au lieu de la fenêtre native de Windows,
   qui se décale sur les champs larges. Les autres navigateurs gardent leur liste native.
   ==================================================================================================== */
@supports (appearance: base-select) {
  select:not([multiple]):not([size]),
  select:not([multiple]):not([size])::picker(select) {
    appearance: base-select;
  }
  select:not([multiple]):not([size]) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  select::picker-icon {
    color: var(--muted);
    margin-left: auto;
  }
  select::picker(select) {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    padding: 4px;
    margin-top: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
    max-height: min(360px, 60vh);
    min-width: anchor-size(width);
    font: inherit;
    font-size: 14px;
  }
  select option {
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
  }
  select option:hover,
  select option:focus-visible {
    background: var(--sunk);
    outline: none;
  }
  select option:checked {
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-weight: 600;
  }
  select option::checkmark {
    display: none;
  }
  select optgroup {
    padding: 6px 6px 2px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  select optgroup option {
    font-size: 14px;
    font-weight: 400;
    color: var(--ink);
    text-transform: none;
    letter-spacing: 0;
    padding-left: 14px;
  }
  select optgroup option:checked {
    color: var(--accent-ink);
    font-weight: 600;
  }
}

/* ====================================================================================================
   Menu du téléphone (bouton ☰ dans la barre haute) : navigation complète, compte, changement de vue.
   Sur grand écran le bouton est masqué, le rail de gauche joue ce rôle.
   ==================================================================================================== */
.menubtn {
  all: unset;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: none;
  place-items: center;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.menubtn[aria-expanded='true'] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.sheetwrap {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(12, 14, 20, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: min(100%, 520px);
  max-height: 88vh;
  overflow: auto;
  background: var(--surface);
  color: var(--ink);
  border-radius: 18px 18px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  animation: sheetin 0.18s ease-out;
}
@keyframes sheetin {
  from {
    transform: translateY(24px);
    opacity: 0.6;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.sheethead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.sheethead .who {
  min-width: 0;
}
.sheet .nav {
  gap: 2px;
}
.sheet .nav button {
  padding: 10px 10px;
}
.sheet .nav button[aria-current='true'] {
  background: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: none;
}
.sheetfoot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.sheetfoot .btn,
.sheetfoot .field select {
  width: 100%;
  padding: 11px 14px;
  text-align: left;
}
.sheetfoot .field {
  gap: 6px;
  margin-bottom: 4px;
}
.sheetfoot .field select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

/* ====================================================================================================
   Écrans réduits : tablette (≤ 1024 px) puis téléphone (≤ 720 px).
   Téléphone : barre haute sur une ligne (logo, cloche, ☰), navigation en pastilles collantes sous la
   barre, une seule colonne partout, listes en cartes, boutons pleine largeur, champs à 16 px pour
   éviter le zoom automatique d'iOS.
   ==================================================================================================== */
@media (max-width: 1024px) {
  .app {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .rail {
    padding: 16px 10px;
  }
  main {
    padding-inline: 18px;
  }
  .detail {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 14px;
  }
  .me small {
    display: none;
  }
}
@media (max-width: 720px) {
  /* barre haute : une ligne, hauteur 51 px (logo 32 px, boutons 34 px) */
  .top {
    gap: 8px;
    flex-wrap: nowrap;
    padding: 8px 12px;
  }
  .brand {
    gap: 8px;
    min-width: 0;
  }
  .logo {
    height: 32px;
  }
  .brand .sep {
    height: 26px;
  }
  .brand b.appname {
    font-size: 17px;
  }
  .brand div > span,
  .proto,
  .help,
  .me > span:not(.av),
  .me .btn,
  .me select {
    display: none;
  }
  .me {
    margin: 0;
  }
  .me .av {
    width: 32px;
    height: 32px;
  }
  .bell,
  .menubtn {
    width: 34px;
    height: 34px;
  }
  .menubtn {
    display: grid;
  }
  .bellpanel {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 58px;
    width: auto;
    max-height: 75vh;
  }
  .callbar {
    margin: 10px 12px 0;
  }
  /* rail → bande de pastilles collante sous la barre haute ; le reste (compte, aide) est dans le menu ☰ */
  .app {
    grid-template-columns: minmax(0, 1fr);
  }
  .rail {
    position: sticky;
    top: 51px;
    z-index: 4;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 12px;
    gap: 0;
    background: var(--surface);
  }
  .rail .who,
  .rail .rule-box,
  .rail .railfoot,
  .rail .navlab {
    display: none;
  }
  .rail .nav {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .rail .nav::-webkit-scrollbar {
    display: none;
  }
  .rail .nav button {
    white-space: nowrap;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 13px;
    flex: none;
  }
  .rail .nav button[aria-current='true'] {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
    box-shadow: none;
  }
  .rail .nav button[aria-current='true'] .count {
    color: inherit;
    opacity: 0.8;
  }
  .rail .nav button[aria-current='true'] .count.hot {
    opacity: 1;
  }
  /* zone de travail */
  main {
    padding: 14px 14px 40px;
  }
  main.umode {
    font-size: 14.5px;
  }
  .head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
  }
  .head h1 {
    font-size: 22px;
  }
  .head > .btn,
  .head > div > .btn {
    width: 100%;
    padding: 11px 14px;
  }
  .hello h1 {
    font-size: 26px;
  }
  .hello p {
    font-size: 15px;
  }
  .banner {
    padding: 10px 12px;
    margin-bottom: 14px;
  }
  .stats,
  .kpis,
  .load {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .stat,
  .kpi {
    padding: 10px 12px;
  }
  .stat .n,
  .kpi .n {
    font-size: 22px;
  }
  .kpi .away {
    white-space: normal;
  }
  .quick {
    gap: 8px;
    margin-bottom: 20px;
  }
  .qcard {
    padding: 14px;
    gap: 12px;
  }
  .tabs {
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar {
    display: none;
  }
  /* listes de tickets : tableau remplacé par des cartes, lignes « drow » sur deux niveaux */
  .tablewrap.list {
    display: none;
  }
  .cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .drow {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 2px 10px;
    padding: 10px 12px;
  }
  .drow > :nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    font-size: 11.5px;
  }
  .drow > :nth-child(3) {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    text-align: right;
    font-size: 12px;
  }
  .drow > :nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .tt {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .dsec h2 {
    flex-wrap: wrap;
    gap: 4px 8px;
  }
  /* détail d'un ticket : une colonne ; le panneau d'actions passe au-dessus du fil, les informations en dessous */
  .detail {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .detail .side {
    display: contents;
  }
  .detail .side .acts {
    order: -1;
  }
  .dhead,
  .desc,
  .timeline,
  .composer,
  .attach,
  .extra {
    padding-inline: 14px;
  }
  .dhead h1 {
    font-size: 19px;
  }
  .aibox,
  .aisplit,
  .solution,
  .pin,
  .presence,
  .callout {
    margin-inline: 14px;
  }
  .tlhead {
    padding-inline: 14px;
  }
  .extra {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
  }
  .steps li {
    min-width: 62px;
  }
  .panel {
    padding: 14px;
  }
  /* formulaires : champs à 16 px (pas de zoom iOS), boutons empilés, bouton principal en premier */
  .form {
    padding: 14px;
    gap: 16px;
  }
  .field input,
  .field select,
  .field textarea,
  .search input,
  .composer textarea,
  .dirsearch input,
  .accdet,
  .onbehalf select,
  .cfgadd input,
  .tplcard input,
  .tplcard textarea,
  .sub .field textarea {
    font-size: 16px;
  }
  .field input,
  .field select,
  .search input {
    padding: 10px 12px;
  }
  .btnrow {
    flex-direction: column-reverse;
  }
  .btnrow .btn {
    width: 100%;
    padding: 11px 14px;
  }
  .typepicked {
    flex-wrap: wrap;
  }
  .typepicked .btn {
    margin-left: auto;
  }
  .onbehalf > * {
    flex: 1 1 100%;
  }
  .checks {
    grid-template-columns: 1fr;
  }
  .checks label {
    min-height: 36px;
  }
  .accamt,
  .accdet {
    margin-left: 26px;
  }
  .sub .row .btn {
    flex: 1;
  }
  .composer .row > .btn {
    margin-left: auto;
  }
  /* fenêtres : feuille collée en bas */
  .modalwrap {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  }
  .sent {
    padding: 20px 16px;
  }
  .sent h1 {
    font-size: 23px;
  }
  .logincard {
    padding: 26px 20px;
  }
  .errpage {
    margin-top: 16px;
    padding: 24px 18px;
  }
  .cfgnum {
    grid-template-columns: minmax(0, 1fr) 80px;
  }
  .cfgadd > * {
    flex: 1 1 100%;
  }
  .cfgitem:has(select) {
    flex-wrap: wrap;
  }
  .cfgitem:has(select) .cfgbtns {
    flex: 1 1 100%;
  }
  .cfggrid {
    gap: 10px;
  }
  .teams {
    max-width: none;
  }
  .toast {
    width: calc(100% - 24px);
    text-align: center;
  }
}
/* écrans tactiles : cibles d'au moins 40 px */
@media (pointer: coarse) {
  .btn,
  .chip,
  .tabs button,
  .nav button,
  .segs button {
    min-height: 40px;
  }
  .chip {
    padding-inline: 14px;
  }
  .cfgbtns button,
  .file button {
    min-width: 36px;
    min-height: 36px;
    display: inline-grid;
    place-items: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* fenêtre des avis à l'ouverture */
.satlist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 60vh;
  overflow: auto;
}
.satrow {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sathead {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.satsol {
  margin: 0;
  font-size: 13px;
}
.satrow textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
  background: var(--surface);
  color: var(--ink);
  resize: vertical;
}
