/*
 * La console d'exploitation, telle que le prototype la dessine.
 *
 * ── Les valeurs viennent d'admin.html, pas d'un goût ────────────────────────
 *
 * Chaque couleur, chaque rayon, chaque graisse, chaque taille est relevée dans
 * `design/reference/admin.html`. Rien n'est arrondi « pour faire plus propre » :
 * une maquette approuvée est une maquette approuvée, et 11,5 px reste 11,5 px.
 *
 * ── Pourquoi ni bundler ni framework ────────────────────────────────────────
 *
 * Même raison qu'à l'espace entreprise et à la page de suivi : cette console
 * s'ouvre sur un poste de bureau à Lomé, derrière une connexion partagée. Elle
 * affiche des tableaux et des tiroirs. Un framework aurait coûté quelques
 * centaines de kilooctets pour cela, et une chaîne de compilation que personne
 * n'aurait à maintenir.
 *
 * ── Les largeurs ────────────────────────────────────────────────────────────
 *
 * Le prototype est dessiné à 1440 × 900 et ne montre **aucune** vue mobile —
 * contrairement à `business.html`, qui en dessine une explicitement. On n'en
 * invente donc pas : la console reste la même console, et s'adapte sans changer
 * de langage visuel. À 1100 px le menu se réduit à une bande escamotable ; en
 * dessous, les grilles s'empilent et les tableaux défilent dans leur propre
 * conteneur. Aucune couleur, aucun rayon, aucun libellé ne change.
 */

:root {
  --orange: #ff6a00;
  --orange-hover: #e65f00;
  --orange-soft: #fff0e6;
  --orange-tint: #fff7f2;
  --orange-line: #ffe1cc;

  --ink: #1d1d1f;
  --ink-2: #3a3a3c;
  --muted: #6b6b6b;
  --muted-2: #9a9a9e;
  --muted-3: #c9c9cc;

  --line: #ececee;
  --line-2: #f2f2f2;
  --line-3: #d5d5d8;

  --surface: #fff;
  --canvas: #f8f8f9;

  --sidebar: #1d1d1f;
  --sidebar-line: #2c2c2e;
  --sidebar-muted: #a8a8ac;
  --sidebar-group: #6e6e73;

  --green: #16a34a;
  --green-soft: #e9f7ee;
  --green-line: #bbe3c8;
  --amber: #b45309;
  --amber-soft: #fef4e2;
  --red: #dc2626;
  --red-soft: #fbeaea;
  --red-line: #f3d3d3;
  --blue: #2563eb;
  --blue-soft: #eaf1fe;
  --blue-line: #c7daf8;

  --aside-width: 216px;
  --map-grey: #e9ecee;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
}

button {
  font-family: inherit;
}

*:focus-visible {
  /*
   * Le contour de focus est **conservé**, et renforcé.
   *
   * Le prototype ne le dessine pas — les maquettes ne montrent jamais un
   * parcours au clavier. Le supprimer serait pourtant rendre la console
   * inutilisable à qui ne se sert pas d'une souris, et §73 l'exige. On le
   * dessine dans la couleur de marque, ce qui ne contredit aucun écran.
   */
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

@keyframes kfade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ksk {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

.wordmark {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.wordmark span {
  color: var(--orange);
}

/* ── Connexion ─────────────────────────────────────────────────────────────── */

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth__card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 26px;
  display: grid;
  gap: 14px;
}

.auth__brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth__brand-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted-2);
}

.auth__title {
  font-size: 17px;
  font-weight: 700;
}

.auth__sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.field {
  display: grid;
  gap: 5px;
}

.field__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  height: 42px;
  padding: 0 12px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
}

.field textarea {
  height: auto;
  min-height: 76px;
  padding: 10px 12px;
  line-height: 1.5;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--orange);
}

/*
 * Une case à cocher et son libellé, sur la même ligne — GAP-102.
 *
 * `.field` empile son libellé au-dessus de son champ, ce qui est juste pour une
 * saisie et absurde pour une case : la case se retrouverait seule sur une ligne,
 * sous un libellé qu'elle est censée qualifier.
 */
.field--inline {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.field--inline input[type='checkbox'] {
  width: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--orange);
}

.field--inline .field__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}

/* ── Boutons ───────────────────────────────────────────────────────────────── */

.btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  height: 38px;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  border-color: var(--line-3);
}

.btn--primary {
  border: none;
  background: var(--orange);
  color: #fff;
}

.btn--primary:hover:not(:disabled) {
  background: var(--orange-hover);
}

.btn--ghost {
  border: 1.5px solid var(--orange);
  background: var(--surface);
  color: var(--orange);
}

.btn--danger {
  border: 1px solid var(--red-line);
  color: var(--red);
}

.btn--go {
  border: none;
  background: var(--green);
  color: #fff;
}

.btn--tall {
  height: 44px;
  border-radius: 12px;
  font-size: 12px;
  width: 100%;
}

.btn--small {
  height: auto;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 9.5px;
}

.btn:disabled {
  background: var(--canvas);
  color: var(--muted-2);
  border-color: var(--line);
  cursor: not-allowed;
}

/* ── Coquille ──────────────────────────────────────────────────────────────── */

.shell {
  display: flex;
  min-height: 100vh;
  background: var(--canvas);
}

.aside {
  width: var(--aside-width);
  flex: none;
  background: var(--sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: sticky;
  top: 0;
  max-height: 100vh;
}

.aside__brand {
  padding: 16px 16px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.aside__brand-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--sidebar-muted);
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px 12px;
}

.nav__group {
  font-size: 9px;
  font-weight: 700;
  color: var(--sidebar-group);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 12px 10px 4px;
}

.nav__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  color: var(--sidebar-muted);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.nav__item:hover {
  background: rgb(255 255 255 / 6%);
}

.nav__item--on {
  background: rgb(255 106 0 / 14%);
  color: #fff;
  font-weight: 600;
}

.nav__label {
  flex: 1;
}

.nav__badge {
  background: var(--orange);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 7px;
}

.aside__footer {
  padding: 12px 14px;
  border-top: 1px solid var(--sidebar-line);
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.aside__avatar {
  width: 30px;
  height: 30px;
  border-radius: 99px;
  background: var(--orange);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  flex: none;
}

.aside__who {
  flex: 1;
  min-width: 0;
}

.aside__name {
  display: block;
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aside__role {
  display: block;
  font-size: 9px;
  color: var(--sidebar-muted);
}

.aside__signout {
  border: 1px solid var(--sidebar-line);
  background: none;
  color: var(--sidebar-muted);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  flex: none;
}

.body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── Barre du haut ─────────────────────────────────────────────────────────── */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar__menu {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
}

.search {
  position: relative;
  width: 380px;
  max-width: 100%;
}

.search__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  height: 38px;
  font-size: 12px;
  color: var(--muted-2);
  cursor: pointer;
}

.search__hint {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search__key {
  font-size: 10px;
  background: var(--line);
  border-radius: 5px;
  padding: 2px 6px;
  color: var(--muted);
}

.search__input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: var(--canvas);
  border: 1px solid var(--orange);
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink);
}

.search__panel {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgb(29 29 31 / 12%);
  overflow: hidden;
  z-index: 30;
  animation: kfade 0.15s ease;
  max-height: 380px;
  overflow-y: auto;
}

.search__result {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: none;
  padding: 10px 14px;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  border-bottom: 1px solid var(--canvas);
}

.search__result:hover {
  background: var(--orange-tint);
}

.search__kind {
  font-size: 9px;
  font-weight: 700;
  color: var(--orange);
  background: var(--orange-soft);
  border-radius: 5px;
  padding: 2px 6px;
  flex: none;
}

.search__title {
  flex: 1;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search__sub {
  font-size: 10px;
  color: var(--muted-2);
  flex: none;
}

.search__empty {
  padding: 14px;
  font-size: 11px;
  color: var(--muted-2);
  text-align: center;
}

.topbar__spacer {
  flex: 1;
}

.market {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 5px 12px;
}

.market b {
  color: var(--ink);
}

.bell {
  border: 1px solid var(--line);
  background: var(--surface);
  width: 38px;
  height: 38px;
  border-radius: 99px;
  cursor: pointer;
  position: relative;
  display: grid;
  place-items: center;
  font-size: 14px;
}

.bell__dot {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--red);
  border: 2px solid #fff;
}

/* ── Contenu ───────────────────────────────────────────────────────────────── */

.main {
  flex: 1;
  padding: 20px 24px;
  min-width: 0;
}

.screen {
  animation: kfade 0.25s ease;
}

.page__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.page__title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.page__sub {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}

.flash {
  background: var(--green-soft);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 10px;
}

.alert-banner {
  background: var(--red-soft);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 12px;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 10px;
}

.perm-banner {
  margin-top: 10px;
  background: var(--amber-soft);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 11px;
  color: #92600a;
}

/* ── Cartes ────────────────────────────────────────────────────────────────── */

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  min-width: 0;
}

.kpi__label {
  font-size: 10px;
  color: var(--muted);
}

.kpi__value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi__value--green { color: var(--green); }
.kpi__value--amber { color: var(--amber); }
.kpi__value--red { color: var(--red); }
.kpi__value--blue { color: var(--blue); }

.kpi__delta {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.strip__cell {
  background: var(--sidebar);
  border-radius: 14px;
  padding: 12px 14px;
  color: #fff;
  min-width: 0;
}

.strip__label {
  font-size: 9px;
  color: var(--sidebar-muted);
}

.strip__value {
  font-size: 15px;
  font-weight: 700;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  min-width: 0;
}

.card__title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

.card__note {
  font-size: 10px;
  color: var(--muted-2);
  margin-top: 6px;
}

/*
 * Une séparation DANS une carte.
 *
 * La carte du tarif facturé aligne trois blocs qui ne se confondent pas : ce
 * que le client paie, comment il le paie, ce que la course rapporte. Sans trait,
 * la commission se lirait comme une ligne de plus du décompte client — et un
 * agent l'annoncerait au client.
 */
.card__sep {
  height: 1px;
  background: var(--line);
  margin: 10px 0;
}

.split {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.split--wide {
  grid-template-columns: 8fr 4fr;
}

.stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.rows {
  display: grid;
  gap: 6px;
}

.attention {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--canvas);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.attention:hover {
  border-color: var(--orange);
}

.attention__dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  flex: none;
}

.attention__dot--red { background: var(--red); }
.attention__dot--amber { background: var(--amber); }
.attention__dot--blue { background: var(--blue); }

.attention__text {
  flex: 1;
  font-weight: 500;
}

.attention__chevron {
  color: var(--muted-2);
  flex: none;
}

/* ── Pastilles ─────────────────────────────────────────────────────────────── */

.badge {
  font-size: 9.5px;
  font-weight: 600;
  border-radius: 99px;
  padding: 3px 9px;
  white-space: nowrap;
  display: inline-block;
}

.badge--green { background: var(--green-soft); color: var(--green); }
.badge--amber { background: var(--amber-soft); color: var(--amber); }
.badge--red { background: var(--red-soft); color: var(--red); }
.badge--blue { background: var(--blue-soft); color: var(--blue); }
.badge--grey { background: var(--line-2); color: var(--ink-2); }

/* ── Filtres ───────────────────────────────────────────────────────────────── */

.filters {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 99px;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.chip--on {
  border: 1.5px solid var(--orange);
  background: var(--orange-tint);
  color: var(--ink);
}

.chip--static {
  cursor: default;
}

/* ── Tableau ───────────────────────────────────────────────────────────────── */

.table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.table__scroll {
  overflow-x: auto;
}

.table__head,
.table__row {
  display: grid;
  gap: 10px;
  align-items: center;
  min-width: 760px;
}

.table__head {
  padding: 10px 16px;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.table__row {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line-2);
  background: none;
  padding: 11px 16px;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  font-family: inherit;
}

.table__row:hover {
  background: var(--orange-tint);
}

.cell {
  min-width: 0;
}

.cell__text {
  display: block;
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell__text--strong {
  font-weight: 600;
}

.cell__text--muted {
  color: var(--muted);
}

.cell__sub {
  display: block;
  font-size: 9.5px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell__actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.table__state {
  padding: 32px;
  text-align: center;
}

.table__state-title {
  font-size: 13px;
  font-weight: 600;
}

.table__state-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.table__skeleton {
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}

.table__skeleton span {
  height: 16px;
  border-radius: 6px;
  background: var(--line-2);
  animation: ksk 1.2s infinite;
  display: block;
}

.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 11px;
  color: var(--muted);
}

.pager__spacer {
  flex: 1;
}

/* ── Chronologie ───────────────────────────────────────────────────────────── */

.timeline__row {
  display: flex;
  gap: 10px;
  font-size: 11px;
  padding: 3px 0;
  border-bottom: 1px solid var(--canvas);
}

.timeline__time {
  color: var(--muted-2);
  width: 40px;
  flex: none;
}

.timeline__event {
  flex: 1;
  color: var(--ink-2);
  font-weight: 600;
}

.timeline__actor {
  color: var(--muted);
}

.timeline__source {
  color: var(--muted-3);
  width: 90px;
  text-align: right;
  flex: none;
}

/* ── Paires clé/valeur ─────────────────────────────────────────────────────── */

.pairs {
  display: grid;
  gap: 2px;
}

.pair {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  padding: 4px 0;
  border-bottom: 1px solid var(--canvas);
}

.pair__key {
  color: var(--muted);
  flex: none;
}

.pair__value {
  text-align: right;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pair__value--green { color: var(--green); }
.pair__value--amber { color: var(--amber); }
.pair__value--red { color: var(--red); }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  font-size: 11px;
}

.fact__label {
  color: var(--muted);
  display: block;
}

.fact__value {
  font-weight: 600;
}

.pii {
  border: none;
  background: none;
  color: var(--orange);
  font-family: inherit;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 0 0 4px;
}

.pii__note {
  display: block;
  color: var(--amber);
  font-size: 9px;
}

/* ── Tiroir ────────────────────────────────────────────────────────────────── */

.scrim {
  position: fixed;
  inset: 0;
  background: rgb(29 29 31 / 35%);
  z-index: 40;
  border: none;
  padding: 0;
  cursor: pointer;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 100vw;
  background: var(--surface);
  z-index: 50;
  box-shadow: -12px 0 32px rgb(29 29 31 / 15%);
  display: flex;
  flex-direction: column;
  animation: kfade 0.2s ease;
}

.drawer__head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer__title {
  flex: 1;
  font-size: 14px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.drawer__close {
  border: 1px solid var(--line);
  background: var(--surface);
  width: 32px;
  height: 32px;
  border-radius: 9px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 14px;
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.drawer__foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.drawer__note {
  margin-top: 12px;
  background: var(--green-soft);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
}

/* ── Matrice des permissions ───────────────────────────────────────────────── */

.matrix__head,
.matrix__row {
  display: grid;
  grid-template-columns: 1.7fr repeat(8, 1fr);
  gap: 4px;
  padding: 9px 16px;
  align-items: center;
  min-width: 820px;
}

.matrix__head {
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
  font-size: 8.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.matrix__row {
  border-bottom: 1px solid var(--line-2);
  font-size: 11px;
}

.matrix__name {
  font-weight: 500;
}

.matrix__cell {
  font-weight: 700;
}

.matrix__cell--on { color: var(--green); }
.matrix__cell--off { color: var(--line-3); }

.matrix__note {
  margin-top: 10px;
  background: var(--orange-tint);
  border: 1px solid var(--orange-line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 11px;
  color: var(--ink-2);
  line-height: 1.6;
}

/* ── Carte des opérations ──────────────────────────────────────────────────── */

.map {
  position: relative;
  height: 520px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--map-grey);
  border: 1px solid var(--line);
}

.map__cluster {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 99px;
  background: var(--green);
  border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgb(0 0 0 / 20%);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
}

.map__legend {
  position: absolute;
  left: 14px;
  top: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 10px;
  color: var(--ink-2);
  display: grid;
  gap: 4px;
}

.map__legend span {
  color: var(--muted-2);
}

.map__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

/* ── Réglages ──────────────────────────────────────────────────────────────── */

.setting-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.gate {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--canvas);
  padding-bottom: 8px;
}

.gate__body {
  flex: 1;
  min-width: 0;
}

.gate__name {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.gate__reason {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Largeurs ──────────────────────────────────────────────────────────────── */

@media (width <= 1100px) {
  .aside {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
  }

  .shell--menu .aside {
    transform: none;
  }

  .topbar__menu {
    display: block;
  }

  .split,
  .split--wide {
    grid-template-columns: 1fr;
  }
}

@media (width <= 760px) {
  .main {
    padding: 16px 14px;
  }

  .topbar {
    padding: 10px 14px;
  }

  .search {
    width: auto;
    flex: 1;
  }

  .market {
    display: none;
  }

  .drawer {
    width: 100%;
  }

  .map {
    height: 340px;
  }
}
