/*
 * Style « neomorphisme » de toute l'administration.
 * Maquette validee le 02/10/2026 : mockups/admin-02-neumorphism.html.
 *
 * Charge en dernier : il habille les composants existants sans toucher aux
 * jetons de marque (tokens.css reste identique au theme partage, un test le
 * verifie). Tout le relief nait de deux ombres sur UNE seule teinte de base :
 * lumiere en haut a gauche, ombre en bas a droite. « Saillant » pour ce qu'on
 * regarde ou touche, « en creux » pour ce qu'on remplit ou ce qui est actif.
 *
 * Lisibilite : le neomorphisme est reputé peu contraste. Les textes restent
 * fonces, et un etat ne repose jamais sur le seul relief (couleur + libelle).
 */

:root {
  --neu-base: #ebe7e0;
  --neu-light: #ffffff;
  --neu-dark: #c9c2b6;
  --neu-raise: 7px 7px 16px var(--neu-dark), -7px -7px 16px var(--neu-light);
  --neu-raise-sm: 4px 4px 10px var(--neu-dark), -4px -4px 10px var(--neu-light);
  --neu-press: inset 4px 4px 9px var(--neu-dark), inset -4px -4px 9px var(--neu-light);
  --neu-press-sm: inset 2px 2px 5px var(--neu-dark), inset -2px -2px 5px var(--neu-light);
  --neu-line: rgba(201, 194, 182, 0.55);
}

body {
  background: var(--neu-base);
}

/* ================================================================== Coquille */
.shell {
  background: var(--neu-base);
}

.sidebar {
  background: var(--neu-base);
  color: var(--ink-700);
  padding: 22px 16px;
}

.sidebar .logo-name {
  color: var(--ink-900);
}

.sidebar .logo-name i {
  color: var(--brand-500);
}

.sidebar .logo-tag {
  color: var(--ink-500);
}

.nav-group .title {
  color: var(--ink-500);
}

.sidebar nav a {
  color: var(--ink-700);
  font-weight: 600;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 4px;
}

.sidebar nav a:hover {
  background: transparent;
  color: var(--ink-900);
  box-shadow: var(--neu-raise-sm);
}

/* L'entree active est enfoncee et passe a l'or : le relief dit ou l'on est. */
.sidebar nav a.active,
.sidebar nav a.active:hover {
  background: transparent;
  color: var(--brand-700);
  box-shadow: var(--neu-press);
}

.sidebar .foot {
  border-top: 0;
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--neu-raise-sm);
}

.sidebar .foot .who b {
  color: var(--ink-900);
}

.sidebar .foot .who span,
.sidebar .foot button {
  color: var(--ink-500);
}

.sidebar .foot button:hover {
  background: transparent;
  color: var(--ink-900);
  box-shadow: var(--neu-raise-sm);
}

.topbar {
  background: var(--neu-base);
  border-bottom: 0;
  padding: 22px 28px 8px;
}

.topbar h1 {
  font-size: 24px;
  font-weight: 800;
}

.content {
  gap: 22px;
}

/* ================================================================ Briques */
.card,
.kpi {
  background: var(--neu-base);
  border: 0;
  border-radius: 22px;
  box-shadow: var(--neu-raise);
}

.kpi {
  border-radius: 20px;
  padding: 20px;
}

.kpi .top {
  justify-content: flex-start;
  gap: 12px;
}

.kpi .ico {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: transparent;
  box-shadow: var(--neu-press);
}

.ico.gold { color: var(--brand-700); }
.ico.green { color: var(--success); }
.ico.blue { color: var(--info); }
.ico.red { color: var(--danger); }

.kpi .value {
  font-size: 34px;
  margin-top: 14px;
}

/* Jauge sous chaque compteur : une rigole en creux, remplie a la couleur du compteur. */
.gauge {
  height: 8px;
  border-radius: 99px;
  box-shadow: var(--neu-press-sm);
  margin-top: 12px;
  overflow: hidden;
}

.gauge i {
  display: block;
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}

.gauge i.green { background: var(--success); }
.gauge i.gold { background: var(--brand-500); }
.gauge i.red { background: var(--danger); }
.gauge i.blue { background: var(--info); }

/* Boutons : saillants ; l'action principale est or, en relief elle aussi. */
.btn {
  border-radius: 14px;
  border: 0;
}

.btn-primary {
  background: linear-gradient(145deg, #c08c24, #9a6f16);
  color: #fff;
  box-shadow: 5px 5px 12px var(--neu-dark), -5px -5px 12px var(--neu-light);
}

.btn-secondary,
.btn-ghost {
  background: var(--neu-base);
  color: var(--ink-900);
  box-shadow: var(--neu-raise-sm);
  border: 0;
}

.btn-danger {
  background: var(--neu-base);
  color: var(--danger);
  box-shadow: var(--neu-raise-sm);
}

.btn-danger-ghost {
  background: var(--neu-base);
  color: var(--danger);
  border: 0;
  box-shadow: var(--neu-raise-sm);
}

.btn:active:not(:disabled) {
  box-shadow: var(--neu-press-sm);
  filter: none;
}

.btn:disabled {
  background: var(--neu-base);
  color: var(--ink-300);
  box-shadow: var(--neu-press-sm);
}

/* Champs : en creux. */
.field input,
.field select,
.toolbar .field input,
.toolbar .field select,
.setting-value input,
.setting-value select,
.cc-row input,
.cc-field input,
.cc-save input,
.cc-side textarea,
.top-search input {
  background: var(--neu-base);
  border: 0;
  border-radius: 14px;
  box-shadow: var(--neu-press);
}

.field input:focus,
.field select:focus,
.cc-row input:focus,
.cc-field input:focus,
.cc-side textarea:focus,
.top-search input:focus {
  outline: 2px solid var(--brand-300);
  background: var(--neu-base);
}

/* Etats : petites pastilles saillantes, la couleur porte le sens. */
.badge {
  background: var(--neu-base);
  box-shadow: var(--neu-raise-sm);
  padding: 4px 11px;
}

.badge-active,
.badge-approved,
.badge-online { color: var(--success); background: var(--neu-base); }
.badge-pending,
.badge-warning,
.badge-ride { color: var(--brand-700); background: var(--neu-base); }
.badge-suspended,
.badge-rejected,
.badge-wait { color: #c22d33; background: var(--neu-base); }
.badge-shared { color: var(--info); background: var(--neu-base); }
.badge-offline,
.badge-neutral { color: var(--ink-500); background: var(--neu-base); }

.plate {
  border: 0;
  border-radius: 6px;
  padding: 3px 8px;
  box-shadow: var(--neu-press-sm);
  font-weight: 800;
}

.avatar {
  background: var(--neu-base);
  color: var(--brand-700);
  box-shadow: var(--neu-press-sm);
}

.avatar.has-photo {
  box-shadow: 0 0 0 2px var(--neu-base), 0 0 0 3px var(--brand-300), var(--neu-raise-sm);
}

/* Selecteurs a onglets (langue, onglets, plan / satellite) : rigole en creux, choix en relief. */
.lang-switch,
.tabs,
.legend-type {
  background: var(--neu-base);
  border: 0;
  box-shadow: var(--neu-press-sm);
}

.lang-switch button.active,
.tabs .on,
.legend-type button.on {
  background: var(--neu-base);
  color: var(--ink-900);
  box-shadow: var(--neu-raise-sm);
}

.workshop-pill {
  background: var(--neu-base);
  border: 0;
  border-radius: 12px;
  padding: 8px 13px;
  box-shadow: var(--neu-raise-sm);
}

.alert {
  border-radius: 14px;
  box-shadow: var(--neu-raise-sm);
}

.alert-info {
  background: var(--neu-base);
  color: var(--brand-900);
}

/* Tableaux : sur la carte, separateurs discrets ; survol en creux leger. */
td {
  border-top-color: var(--neu-line);
  border-bottom-color: transparent;
}

th {
  border-bottom-color: var(--neu-line);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* ===================================================== Recherche du haut */
.top-search {
  position: relative;
  width: 300px;
}

.top-search .icon {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-500);
  pointer-events: none;
}

.top-search input {
  width: 100%;
  font: inherit;
  font-size: 13px;
  padding-block: 11px;
  padding-inline: 40px 14px;
  color: var(--ink-900);
}

.top-results {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline: 0;
  z-index: 700;
  background: var(--neu-base);
  border-radius: 16px;
  box-shadow: var(--neu-raise);
  padding: 8px;
  max-height: 380px;
  overflow-y: auto;
}

.top-results button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  text-align: start;
  padding: 8px;
  border-radius: 12px;
  cursor: pointer;
  color: inherit;
}

.top-results button:hover {
  box-shadow: var(--neu-press-sm);
}

.top-results .avatar {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.top-results .who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.top-results .who span,
.top-results .role {
  font-size: 12px;
  color: var(--ink-500);
}

/* ============================================================ Tableau de bord */
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.dash-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hour-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 180px;
  padding: 16px 16px 0;
  border-radius: 16px;
  box-shadow: var(--neu-press-sm);
}

.hc-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.hc-stack {
  width: 100%;
  max-width: 26px;
  min-height: 3px;
  display: flex;
  flex-direction: column;
  border-radius: 8px 8px 4px 4px;
  overflow: hidden;
  box-shadow: 3px 3px 6px var(--neu-dark);
}

.hc-stack i { display: block; min-height: 3px; }
.hc-stack .pr { background: linear-gradient(180deg, var(--brand-300), var(--brand-500)); }
.hc-stack .sh { background: linear-gradient(180deg, #8fb6de, var(--info)); }

.hc-col span {
  font-size: 10.5px;
  color: var(--ink-500);
  padding-bottom: 8px;
}

.chart-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--ink-500);
  margin-top: 12px;
}

.chart-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-inline-end: 6px;
  vertical-align: -1px;
}

.drv-list {
  display: grid;
  gap: 10px;
}

.drv-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  box-shadow: var(--neu-raise-sm);
}

.drv-row .who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.drv-row .who b {
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drv-row .who span {
  font-size: 12px;
  color: var(--ink-500);
}

.drv-row .amount {
  min-width: 80px;
  text-align: end;
}

.quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.quick-act {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 10px;
  border-radius: 18px;
  box-shadow: var(--neu-raise);
  color: var(--ink-700);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
}

.quick-act .icon {
  width: 46px;
  height: 46px;
  padding: 12px;
  border-radius: 14px;
  box-shadow: var(--neu-press);
  color: var(--brand-700);
}

.quick-act:hover {
  color: var(--ink-900);
}

.quick-act:active {
  box-shadow: var(--neu-press);
}

.quick-n {
  position: absolute;
  top: 10px;
  inset-inline-end: 12px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  padding: 0 7px;
  border-radius: 99px;
}

.feed-item {
  border-top-color: var(--neu-line);
  align-items: flex-start;
}

.feed-well {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  box-shadow: var(--neu-press-sm);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.feed-well i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ================================================================ Call center */
.cc {
  background: var(--neu-base);
  box-shadow: var(--neu-raise);
  border-radius: 22px;
}

.cc-side {
  background: var(--neu-base);
  border-inline-end: 0;
}

.cc-step .n {
  background: var(--neu-base);
  color: var(--ink-700);
  box-shadow: var(--neu-press-sm);
}

.cc-step .n.ok {
  background: var(--success);
  color: #fff;
  box-shadow: var(--neu-raise-sm);
}

.cc-note,
.cc-new {
  background: var(--neu-base);
  border: 0;
  box-shadow: var(--neu-press-sm);
}

.cc-chip {
  background: var(--neu-base);
  border: 0;
  box-shadow: var(--neu-raise-sm);
}

.cc-chip.on-start { color: var(--success); box-shadow: var(--neu-press-sm); background: var(--neu-base); }
.cc-chip.on-end { color: #c22d33; box-shadow: var(--neu-press-sm); background: var(--neu-base); }

.cc-type {
  background: var(--neu-base);
  border: 0;
  box-shadow: var(--neu-raise-sm);
}

.cc-type.on {
  background: var(--neu-base);
  color: var(--brand-700);
  box-shadow: var(--neu-press);
}

/* Ce qui flotte sur la carte garde un fond franc, lisible sur la photo satellite. */
.cc-search input {
  background: #f6f3ee;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

/* ================================================================== Carte live */
.live {
  border-radius: 22px;
  box-shadow: var(--neu-raise);
}

.panel {
  background: var(--neu-base);
  border-radius: 18px;
}

.req {
  border: 0;
  border-radius: 14px;
  box-shadow: var(--neu-raise-sm);
}

.req:hover {
  box-shadow: var(--neu-press-sm);
}

.chip,
.map-legend,
.map-filters button {
  background: rgba(235, 231, 224, 0.96);
}

.map-filters button.on {
  background: var(--ink-900);
}

/* ===================================================== Dossier du chauffeur */
.doc-card {
  background: var(--neu-base);
  border: 0;
  border-radius: 18px;
  box-shadow: var(--neu-raise-sm);
}

.doc-card.doc-missing {
  background: var(--neu-base);
  box-shadow: var(--neu-press-sm);
}

.doc-thumb.doc-empty {
  background: transparent;
}

/* ===================================================================== Connexion */
.login-form {
  background: var(--neu-base);
}

/* ================================================================== Responsive */
@media (max-width: 1100px) {
  .dash-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .top-search {
    width: 220px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    box-shadow: var(--neu-raise-sm);
  }

  /* Sur telephone, la ligne chauffeur passe sur deux lignes : identite en
     haut, plaque, etat et solde en dessous. */
  .drv-row {
    flex-wrap: wrap;
  }

  .drv-row .who {
    flex-basis: calc(100% - 60px);
  }

  .drv-row .amount {
    margin-inline-start: auto;
    min-width: 0;
  }

  .dash-grid > *,
  .dash-side > * {
    min-width: 0;
  }

  .top-search {
    display: none;
  }

  .quick {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Reglages : confirmation sur le bouton, a la place d'un bandeau. */
.btn.is-saved,
.btn.is-saved:disabled {
  color: var(--success);
  box-shadow: var(--neu-press-sm);
}

.btn.is-saved .icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

/* Tableau de bord simplifie (maquette admin-02-tableau-de-bord-simple). */
#content:has(.dash-todo) {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.dash-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.dash-actions .btn .icon {
  width: 17px;
  height: 17px;
}

.dash-title {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.card-head .dash-title {
  margin: 0;
}

.todo-items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.todo-item {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  box-shadow: var(--neu-raise-sm);
  color: var(--ink-900);
  text-decoration: none;
}

.todo-item:active {
  box-shadow: var(--neu-press-sm);
}

.todo-item .n {
  min-width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: var(--neu-press-sm);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
}

.todo-item .tx b {
  display: block;
  font-size: 13.5px;
}

.todo-item .tx span {
  font-size: 12px;
  color: var(--ink-500);
}

.todo-item .go {
  margin-inline-start: auto;
  color: var(--brand-700);
  font-weight: 700;
  font-size: 12.5px;
  white-space: nowrap;
}

.todo-item.urgent {
  outline: 2px solid rgba(212, 63, 68, 0.25);
}

.todo-item.urgent .n {
  color: var(--danger);
}

.todo-ok {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--success);
  font-weight: 700;
}

.dash-nums {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dash-nums .kpi .label {
  color: var(--ink-500);
  font-size: 13px;
  font-weight: 600;
}

.dash-nums .kpi .value {
  margin-top: 6px;
}

.dash-more {
  display: block;
  text-align: center;
  padding-top: 10px;
}

@media (max-width: 900px) {
  .dash-nums {
    grid-template-columns: 1fr;
  }
}

/* Barre de filtres : un bouton d'action peut se ranger a l'autre bout. */
.toolbar-end {
  margin-inline-start: auto;
  align-self: flex-end;
}

.toolbar-end .icon {
  width: 16px;
  height: 16px;
}

/* Fenetre « Ajouter un agent » : les champs se suivent, un peu d'air entre eux. */
.agent-form .rd-label {
  margin-top: 10px;
}

/* Montants alignes a droite (a gauche en arabe) pour se comparer d'un coup d'oeil. */
th.num,
td.num {
  text-align: end;
  white-space: nowrap;
}

/* Courses : une ligne s'ouvre dans un panneau lateral. */
.rides-clickable tbody tr {
  cursor: pointer;
}

.rides-clickable tbody tr:hover,
.rides-clickable tbody tr.on {
  background: rgba(176, 128, 32, 0.08);
}

.ride-drawer {
  position: fixed;
  top: 0;
  inset-inline-end: 0;
  bottom: 0;
  width: min(440px, 100vw);
  z-index: 50;
  overflow-y: auto;
  padding: 22px 22px 32px;
  background: var(--neu-base);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

[dir='rtl'] .ride-drawer {
  box-shadow: 12px 0 32px rgba(0, 0, 0, 0.16);
}

.ride-drawer[hidden] {
  display: none;
}

.ride-drawer h2 {
  margin: 0;
  font-size: 18px;
}

.ride-drawer h3 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.rd-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rd-drawer-head .icon {
  width: 18px;
  height: 18px;
}

.rd-summary {
  border-radius: 18px;
  box-shadow: var(--neu-raise-sm);
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}

.rd-total {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.rd-person {
  display: grid;
  gap: 2px;
}

.rd-passenger {
  border-radius: 16px;
  box-shadow: var(--neu-raise-sm);
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.rd-passenger + .rd-passenger {
  margin-top: 10px;
}

.rd-passenger-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.rd-fare {
  font-weight: 800;
  white-space: nowrap;
}

.rd-trip {
  font-size: 13px;
  line-height: 1.6;
}

.rd-trip .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-inline-end: 6px;
}

.rd-trip .dot.start {
  background: var(--success);
}

.rd-trip .dot.end {
  background: var(--danger);
}

.rd-trip .arrow {
  margin-inline: 6px;
  color: var(--ink-500);
}

.ride-drawer dl {
  margin: 0;
  display: grid;
  gap: 4px;
  font-size: 12.5px;
}

.dl-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.dl-row dt {
  color: var(--ink-500);
}

.dl-row dd {
  margin: 0;
  text-align: end;
}

.rd-timeline,
.rd-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.rd-timeline li {
  display: grid;
  gap: 1px;
  padding-inline-start: 14px;
  border-inline-start: 2px solid var(--brand-300, #d9b968);
}

.rd-timeline .when {
  font-size: 11.5px;
  color: var(--ink-500);
}

/* ======================================================= Tableau d'analyse */
#content:has(.viz-body) {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.viz-filters {
  flex-wrap: wrap;
  align-items: flex-end;
}

.viz-hours {
  display: flex;
  align-items: center;
  gap: 6px;
}

.viz-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  transition: opacity 0.15s;
}

/* Rechargement : l'image precedente reste, estompee, sans saut de mise en page. */
.viz-body.loading {
  opacity: 0.5;
}

.viz-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.viz-kpis .kpi .label {
  color: var(--ink-500);
  font-size: 13px;
  font-weight: 600;
}

.viz-kpis .kpi .value {
  font-size: 28px;
  margin-top: 6px;
}

.viz-grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.viz-grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.viz-card h2 {
  font-size: 15px;
  margin: 0;
}

.viz-sub {
  margin: 4px 0 8px;
  font-size: 12.5px;
}

.viz-plot {
  min-height: 60px;
}

.viz-scroll {
  overflow-x: auto;
}

/* Grille et axes en retrait : la donnee passe devant. */
.viz-grid {
  stroke: rgba(120, 113, 106, 0.18);
  stroke-width: 1;
}

.viz-base {
  stroke: var(--ink-300);
  stroke-width: 1;
}

.viz-axis {
  fill: var(--ink-500);
  font-size: 11px;
  font-family: inherit;
}

.viz-hit {
  fill: transparent;
  outline: none;
}

.viz-hit.hover,
.viz-hit:focus-visible {
  fill: rgba(176, 128, 32, 0.08);
}

.viz-cell {
  outline: none;
}

.viz-cell.hover,
.viz-cell:focus-visible {
  stroke: var(--ink-900);
  stroke-width: 1.5;
}

.viz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--ink-700);
  margin: 8px 0 4px;
}

.viz-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-inline-end: 6px;
  vertical-align: -1px;
}

.viz-tip {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  background: var(--surface);
  color: var(--ink-900);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  padding: 8px 10px;
  font-size: 12px;
  min-width: 140px;
}

.viz-tip[hidden] {
  display: none;
}

.viz-tip-title {
  color: var(--ink-500);
  margin-bottom: 4px;
}

.viz-tip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.6;
}

/* Cle de serie en trait court : a cette densite, un carre plein pese trop. */
.viz-tip-row i {
  width: 12px;
  height: 3px;
  border-radius: 2px;
}

.viz-tip-row b {
  font-weight: 800;
  min-width: 48px;
}

.viz-tip-row span {
  color: var(--ink-500);
}

.viz-barlist {
  display: grid;
  gap: 10px;
}

.viz-barrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  font-size: 13px;
}

.viz-barlabel {
  grid-row: 1;
  grid-column: 1;
  min-width: 0;
}

.viz-barlabel b {
  display: block;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viz-barlabel span {
  font-size: 11.5px;
  color: var(--ink-500);
}

.viz-barvalue {
  grid-row: 1;
  grid-column: 2;
  font-weight: 800;
  white-space: nowrap;
  align-self: start;
}

.viz-bartrack {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 99px;
  box-shadow: var(--neu-press-sm);
  overflow: hidden;
}

.viz-bartrack i {
  display: block;
  height: 100%;
  border-radius: 99px;
}

@media (max-width: 1100px) {
  .viz-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .viz-grid2,
  .viz-grid3 {
    grid-template-columns: 1fr;
  }
}

/* Les axes des graphiques se lisent de gauche a droite, en arabe aussi : sinon
   les libelles ancres « end » passent de l'autre cote et se coupent. */
.viz-plot svg {
  direction: ltr;
}
