/* Coquille ImmoMatch — menus et écrans métier. Polices système (air-gap). */

:root {
  --ink: #163a5c;
  --ink-soft: #3d5a73;
  --brand: #2a6fa0;
  --brand-deep: #1d5278;
  --lagoon: #1f7a6a;
  --mist: #f3f6f8;
  --paper: #ffffff;
  --line: #d5e0e8;
  --sidebar: #12283d;
  --sidebar-text: #e6eef5;
  --sidebar-muted: #9eb0c2;
  --amber: #8a5a10;
  --amber-bg: #fbf3e4;
  --danger: #8e3030;
  --danger-bg: #f8ecec;
  --ok: #1d6b45;
  --ok-bg: #e7f5ee;
  --info-bg: #e8f2f8;
  --sidebar-w: 248px;
  --topbar-h: 64px;
  --radius: 10px;
  --radius-mark: 8px;
  --radius-btn: 8px;
  --nav-hover: rgba(255, 255, 255, 0.06);
  --nav-active: rgba(42, 111, 160, 0.45);
  --nav-active-text: var(--sidebar-text);
  --sidebar-line: rgba(255, 255, 255, 0.08);
  --barre-piste: #e6eef3;
  --shadow-carte: none;
  --on-brand: #ffffff;
  --table-head: #f8fbfc;
  --font: "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

html[data-presentation="nuit"] {
  --ink: #e7eefc;
  --ink-soft: #93a0bd;
  --brand: #0f766e;
  --brand-deep: #115e59;
  --lagoon: #60a5fa;
  --mist: #0b1220;
  --paper: #121a2b;
  --line: rgba(94, 234, 212, 0.2);
  --sidebar: #070d18;
  --sidebar-text: #d5deef;
  --sidebar-muted: #7d8cab;
  --amber: #f5c16c;
  --amber-bg: rgba(245, 193, 108, 0.14);
  --danger: #fb7185;
  --danger-bg: rgba(251, 113, 133, 0.14);
  --ok: #5eead4;
  --ok-bg: rgba(94, 234, 212, 0.12);
  --info-bg: rgba(96, 165, 250, 0.12);
  --radius: 14px;
  --radius-mark: 12px;
  --radius-btn: 999px;
  --nav-hover: rgba(255, 255, 255, 0.04);
  --nav-active: rgba(94, 234, 212, 0.12);
  --nav-active-text: #5eead4;
  --sidebar-line: rgba(94, 234, 212, 0.16);
  --barre-piste: rgba(255, 255, 255, 0.06);
  --shadow-carte: 0 0 0 1px rgba(94, 234, 212, 0.1);
  --table-head: #0e1626;
  --font: system-ui, "Segoe UI", sans-serif;
  color-scheme: dark;
}

html[data-presentation="halo"] {
  --ink: #14151c;
  --ink-soft: #5c6478;
  --brand: #5b4dff;
  --brand-deep: #4338ca;
  --lagoon: #0d9488;
  --mist: #eef1f8;
  --paper: #ffffff;
  --line: #d5dbeb;
  --sidebar: #f7f8fc;
  --sidebar-text: #1c2030;
  --sidebar-muted: #8b93a7;
  --amber: #b45309;
  --amber-bg: #fff7e8;
  --danger: #e11d48;
  --danger-bg: #fff1f2;
  --ok: #0f766e;
  --ok-bg: #e7f8f5;
  --info-bg: #ece9ff;
  --radius: 18px;
  --radius-mark: 16px;
  --radius-btn: 14px;
  --nav-hover: #ffffff;
  --nav-active: #ece9ff;
  --nav-active-text: #4338ca;
  --sidebar-line: #e4e7f2;
  --barre-piste: #e4e7f2;
  --shadow-carte: 0 18px 40px rgba(80, 70, 180, 0.08);
  --table-head: #f4f6fb;
  --font: system-ui, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--mist);
  line-height: 1.45;
}

button,
select,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.num,
.montant {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--paper);
  padding: 8px 12px;
  z-index: 20;
}

.skip:focus {
  top: 12px;
}

.app {
  display: flex;
  min-height: 100%;
}

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 18px 16px 12px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-mark);
  background: var(--brand);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-mark--logo {
  display: block;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.brand-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-kicker {
  margin: 0;
  color: var(--sidebar-muted);
  font-size: 0.75rem;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--sidebar-text);
  border-radius: 8px;
  padding: 10px 12px;
}

.nav-item svg {
  flex: 0 0 auto;
}

.nav-court {
  display: none;
}

.nav-item:hover {
  background: var(--nav-hover);
}

.nav-item.is-disabled,
.nav-item.is-disabled:hover,
.outil.is-disabled,
.outil.is-disabled:hover {
  opacity: 0.45;
  cursor: not-allowed;
  background: transparent;
  color: var(--sidebar-text);
}

.outil.is-disabled,
.outil.is-disabled:hover {
  color: inherit;
}

.nav-item[aria-current="page"] {
  background: var(--nav-active);
  color: var(--nav-active-text);
}

.nav-groupe {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-sous {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 4px 4px 22px;
  padding-left: 8px;
  border-left: 1px solid var(--sidebar-line);
}

.nav-sous .nav-item {
  padding: 7px 10px;
  font-size: 0.92rem;
}

[data-ecran="parametres"]:has([data-panneau="sources"]:not([hidden])) > .tabs {
  display: none;
}

body.sidebar-ferme .nav-sous {
  display: none;
}

.nav-item:focus-visible,
.icon-btn:focus-visible,
.btn:focus-visible,
.select:focus-visible,
.tab:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.sidebar-foot {
  padding: 8px;
  border-top: 1px solid var(--sidebar-line);
}

.workspace {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: var(--topbar-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.context {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.field-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.2;
  min-height: 0.84rem;
}

.select,
.field-static {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 220px;
  min-height: 38px;
  box-sizing: border-box;
  line-height: 1.25;
}

.field-static {
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.field-static.is-connu {
  color: var(--ink);
  font-weight: 600;
}


.field-statut {
  flex-direction: row;
  align-items: center;
  align-self: flex-end;
  gap: 8px;
}

.field-statut .field-label {
  min-height: 0;
  line-height: 1;
}

.statut {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 0 12px;
  min-height: 40px;
  height: 40px;
  box-sizing: border-box;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  background: var(--ok-bg);
  color: var(--ok);
}

.statut[data-statut="EN_ARBITRAGE"] {
  background: var(--amber-bg);
  color: var(--amber);
}

.statut[data-statut="CLOTUREE"] {
  background: var(--mist);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.statut[data-statut="TOUTES"] {
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid rgba(55, 48, 163, 0.18);
}

.top-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.top-actions > .field .select {
  min-width: 140px;
}

/* Cloche / Aide / Portail : même ligne que les contrôles, sous la rangée de labels */
.top-actions > :not(.field) {
  margin-top: calc(0.84rem + 4px);
  align-self: flex-start;
}

.top-actions .notif-bouton,
.top-actions .btn,
.top-actions .portal-link,
.top-actions .aide-acces {
  height: 40px;
  min-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.top-actions .btn {
  padding-left: 14px;
  padding-right: 14px;
}

.portal-link {
  color: var(--brand-deep);
  font-weight: 600;
  text-decoration: none;
  padding: 0 10px;
}

.portal-link:hover {
  text-decoration: underline;
}

.portal-link.is-disabled,
.portal-link.is-disabled:hover {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: none;
  pointer-events: none;
}

.main {
  padding: 20px 24px 40px;
}

.ecran-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.ecran-head h2 {
  margin: 0 0 4px;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.perimetre {
  margin: 0;
  color: var(--ink-soft);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.carte {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-carte);
  padding: 14px 16px;
}

.carte-label {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.carte-valeur {
  margin: 6px 0 0;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.grille-2 {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 12px;
}

.entonnoir {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.etape {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 10px;
  align-items: center;
}

.barre {
  height: 10px;
  background: var(--barre-piste);
  border-radius: 999px;
  overflow: hidden;
}

.barre > span {
  display: block;
  height: 100%;
  background: var(--brand);
  width: 0;
}

.etape:nth-child(2) .barre > span { background: var(--lagoon); }
.etape:nth-child(3) .barre > span { background: var(--brand-deep); }
.etape:nth-child(4) .barre > span { background: var(--amber); }
.etape:nth-child(5) .barre > span { background: var(--danger); }

.note {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  padding: 9px 14px;
  font-weight: 700;
  background: var(--brand);
  color: var(--on-brand);
}

.btn:hover {
  background: var(--brand-deep);
}

.btn-second {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}

.btn-second:hover {
  background: var(--mist);
}

.btn-danger {
  background: var(--paper);
  color: var(--danger);
  border-color: var(--danger);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.tab {
  border: 0;
  background: transparent;
  padding: 10px 12px;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  font-weight: 650;
}

.tab[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--brand);
}

#filtre-site,
#filtre-categorie,
#filtre-etat,
#filtre-service,
#filtre-score {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  font-size: 0.86rem;
}

.liste {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ligne {
  display: grid;
  grid-template-columns: auto 1.4fr 1fr auto auto;
  gap: 12px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-carte);
  padding: 12px 14px;
}

.ligne-simple {
  grid-template-columns: 1fr auto;
}

.meta {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.pastille {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--info-bg);
  color: var(--brand-deep);
}

.pastille-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.pastille-warn {
  background: var(--amber-bg);
  color: var(--amber);
}

.pastille-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.split {
  display: grid;
  grid-template-columns: 1fr 220px 1fr;
  gap: 12px;
  align-items: stretch;
}

.fiche h3,
.score-centre h3 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.fiche p,
.score-centre p {
  margin: 0 0 6px;
}

.score-centre {
  background: var(--info-bg);
  border: 1px solid var(--line);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.score-valeur {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 750;
  color: var(--brand-deep);
}

.actions-rapides {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-carte);
  background: var(--paper);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--table-head);
}

.colonnes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

table.hide-amort .col-amort,
table.hide-service .col-service,
table.hide-marque .col-marque {
  display: none;
}

.alerte {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.alerte[hidden] {
  display: none;
}

.sources {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sources-chapo {
  grid-column: 1 / -1;
  margin: 0;
}

/* .sources pose display:grid : sans cette règle, [hidden] ne masque pas le chapitre. */
.sources[hidden],
[data-ecran] > [data-panneau][hidden] {
  display: none !important;
}

[data-ecran="parametres"] > .tabs,
[data-ecran="rapports"] > .tabs {
  margin-bottom: 16px;
}

.rapport-grille {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 40, 61, 0.35);
  z-index: 8;
}

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

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(420px, 100%);
  background: var(--paper);
  border-left: 1px solid var(--line);
  z-index: 9;
  display: flex;
  flex-direction: column;
  padding: 18px 0 18px 18px;
  box-sizing: border-box;
  overflow: hidden;
}

.drawer[hidden] {
  display: none;
}

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

.drawer-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.icon-btn {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  padding: 6px 10px;
}

.carte-titre {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.carte-titre h3 {
  margin: 0;
}

.drawer dl {
  flex: 1;
  min-height: 0;
  margin: 16px 0 0;
  overflow-y: auto;
  padding-right: 18px;
}

.drawer dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-top: 10px;
}

.drawer dd {
  margin: 2px 0 0;
}

.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  padding: 8px 10px;
}

body.sidebar-ferme .sidebar {
  width: 76px;
  flex-basis: 76px;
}

body.sidebar-ferme .brand-text,
body.sidebar-ferme .nav-label,
body.sidebar-ferme .collapse-label {
  display: none;
}

body.sidebar-ferme .nav-item,
body.sidebar-ferme .brand {
  justify-content: center;
}

@media (max-width: 1100px) {
  .kpis,
  .sources,
  .rapport-grille,
  .grille-2,
  .split {
    grid-template-columns: 1fr;
  }

  .ligne {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .menu-btn {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    z-index: 12;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
  }

  body.menu-ouvert .sidebar {
    transform: none;
  }

  body.sidebar-ferme .sidebar {
    width: var(--sidebar-w);
    flex-basis: var(--sidebar-w);
  }

  body.sidebar-ferme .brand-text,
  body.sidebar-ferme .nav-label {
    display: block;
  }

  body.sidebar-ferme .nav-sous {
    display: flex;
  }

  .select,
  .field-static {
    min-width: 0;
    width: 100%;
  }

  .etape {
    grid-template-columns: 1fr;
  }
}

html[data-presentation="halo"] .sidebar {
  border-right: 1px solid var(--line);
}

html[data-presentation="nuit"] .brand-mark,
html[data-presentation="halo"] .nav-item[aria-current="page"] {
  box-shadow: 0 0 0 1px var(--line);
}

html[data-presentation="bandeau"] {
  --ink: #0f172a;
  --ink-soft: #64748b;
  --brand: #4f46e5;
  --brand-deep: #4338ca;
  --lagoon: #059669;
  --mist: #f1f5f9;
  --paper: #ffffff;
  --line: #e2e8f0;
  --sidebar: #ffffff;
  --sidebar-text: #334155;
  --sidebar-muted: #94a3b8;
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --danger: #e11d48;
  --danger-bg: #fff1f2;
  --ok: #047857;
  --ok-bg: #ecfdf5;
  --info-bg: #eef2ff;
  --nav-hover: #f8fafc;
  --nav-active: transparent;
  --nav-active-text: #4f46e5;
  --barre-piste: #e2e8f0;
  --shadow-carte: 0 10px 24px rgba(15, 23, 42, 0.05);
  --table-head: #f8fafc;
  --font: system-ui, "Segoe UI", sans-serif;
}

html[data-presentation="bandeau"] .app {
  flex-direction: column;
}

html[data-presentation="bandeau"] .sidebar {
  width: 100%;
  height: auto;
  min-height: 0;
  flex: none;
  flex-direction: row;
  align-items: stretch;
  position: sticky;
  top: 0;
  z-index: 6;
  border-bottom: 1px solid var(--line);
}

html[data-presentation="bandeau"] .brand {
  padding: 0 16px;
  border-right: 1px solid var(--line);
}

html[data-presentation="bandeau"] .nav {
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  padding: 0 4px;
  overflow-x: auto;
}

html[data-presentation="bandeau"] .nav-groupe {
  flex-direction: row;
  align-items: stretch;
  gap: 0;
}

html[data-presentation="bandeau"] .nav-sous,
html[data-presentation="bandeau"] body.sidebar-ferme .nav-sous {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  margin: 0;
  padding: 0;
  border: 0;
  gap: 0;
}

html[data-presentation="bandeau"] .nav-sous .nav-item {
  height: 48px;
  padding: 0 14px;
  font-size: 0.92rem;
}

html[data-presentation="bandeau"] .nav-item {
  width: auto;
  height: 48px;
  border-radius: 0;
  padding: 0 14px;
  border-bottom: 2px solid transparent;
  font-size: 0.92rem;
  white-space: nowrap;
}

html[data-presentation="bandeau"] .nav-item svg,
html[data-presentation="bandeau"] .nav-label,
html[data-presentation="bandeau"] .sidebar-foot,
html[data-presentation="bandeau"] .menu-btn {
  display: none;
}

html[data-presentation="bandeau"] .nav-court {
  display: inline;
}

html[data-presentation="bandeau"] .nav-item[aria-current="page"] {
  background: transparent;
  color: var(--brand);
  border-bottom-color: var(--brand);
}

html[data-presentation="bandeau"] .nav-item:hover {
  background: var(--mist);
}

html[data-presentation="bandeau"] .topbar {
  top: 48px;
}

html[data-presentation="bandeau"] body.sidebar-ferme .sidebar,
html[data-presentation="bandeau"] body.menu-ouvert .sidebar {
  width: 100%;
  flex-basis: auto;
  position: sticky;
  transform: none;
}

html[data-presentation="bandeau"] body.sidebar-ferme .brand-text,
html[data-presentation="bandeau"] body.sidebar-ferme .nav-court {
  display: inline;
}

@media (max-width: 860px) {
  html[data-presentation="bandeau"] .sidebar {
    position: sticky;
    transform: none;
    width: 100%;
    height: auto;
  }

  html[data-presentation="bandeau"] .menu-btn {
    display: none;
  }
}

/* Fit viewport arène / rapports — activé via body.ecran-arene|ecran-rapports (JS montrer()).
   Hors de ces écrans, aucune contrainte : le reste scrollent normalement. */
[data-ecran="rapprochement"][hidden] {
  display: none !important;
}

/* :has(rapports visible) en secours si la classe JS n'est pas encore chargée. */
body.ecran-arene,
body.ecran-rapports,
body:has([data-ecran="rapports"]:not([hidden])) {
  overflow: hidden;
  height: 100%;
}

body.ecran-arene .app,
body.ecran-rapports .app,
body:has([data-ecran="rapports"]:not([hidden])) .app {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

body.ecran-arene .workspace,
body.ecran-rapports .workspace,
body:has([data-ecran="rapports"]:not([hidden])) .workspace {
  flex: 1 1 auto;
  min-height: 0;
  /* visible : sinon le panneau de la cloche (absolu sous le topbar) est rogné */
  overflow: visible;
  display: flex;
  flex-direction: column;
}

body.ecran-arene .topbar,
body.ecran-rapports .topbar,
body:has([data-ecran="rapports"]:not([hidden])) .topbar {
  flex: 0 0 auto;
  overflow: visible;
  z-index: 60;
}

body.ecran-arene .topbar .notif,
body.ecran-arene .topbar .notif-panneau,
body.ecran-rapports .topbar .notif,
body.ecran-rapports .topbar .notif-panneau,
body:has([data-ecran="rapports"]:not([hidden])) .topbar .notif,
body:has([data-ecran="rapports"]:not([hidden])) .topbar .notif-panneau {
  z-index: 70;
}

body.ecran-arene .main,
body.ecran-rapports .main,
body:has([data-ecran="rapports"]:not([hidden])) .main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

body.ecran-rapports .main,
body:has([data-ecran="rapports"]:not([hidden])) .main {
  padding-top: 12px;
  padding-bottom: 12px;
}

body.ecran-arene #alerte-cloture:not([hidden]),
body.ecran-rapports #alerte-cloture:not([hidden]),
body:has([data-ecran="rapports"]:not([hidden])) #alerte-cloture:not([hidden]) {
  flex: 0 0 auto;
  margin-bottom: 8px;
}

html[data-presentation="bandeau"] body.ecran-rapports .sidebar,
html[data-presentation="bandeau"] body:has([data-ecran="rapports"]:not([hidden])) .sidebar {
  flex: 0 0 auto;
  min-height: 0;
}

/* Rapports : une page, chapitres qui remplissent la hauteur restante. */
body.ecran-rapports [data-ecran="rapports"]:not([hidden]),
body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"]:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

body.ecran-rapports [data-ecran="rapports"] > .ecran-head,
body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"] > .ecran-head {
  margin-bottom: 6px;
  flex-shrink: 0;
}

body.ecran-rapports [data-ecran="rapports"] > .ecran-head h2,
body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"] > .ecran-head h2 {
  font-size: 1.2rem;
}

body.ecran-rapports [data-ecran="rapports"] > .tabs,
body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"] > .tabs {
  margin-bottom: 8px;
  flex-shrink: 0;
}

body.ecran-rapports [data-ecran="rapports"] > [data-panneau]:not([hidden]),
body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"] > [data-panneau]:not([hidden]) {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

body.ecran-rapports [data-ecran="rapports"] > .rapport-grille:not([hidden]),
body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"] > .rapport-grille:not([hidden]) {
  display: grid;
  /* minmax(0,1fr) : sans ça, 1fr = minmax(auto,1fr) et les cartes refusent de rétrécir. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-content: stretch;
}

body.ecran-rapports [data-ecran="rapports"] > .rapport-grille:not([hidden]) > .carte,
body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"] > .rapport-grille:not([hidden]) > .carte {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  overflow: auto;
}

body.ecran-rapports [data-ecran="rapports"] > .rapport-grille:not([hidden]) > .carte h3,
body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"] > .rapport-grille:not([hidden]) > .carte h3 {
  margin: 0;
  font-size: 1rem;
  flex-shrink: 0;
}

body.ecran-rapports [data-ecran="rapports"] > .rapport-grille:not([hidden]) > .carte > p,
body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"] > .rapport-grille:not([hidden]) > .carte > p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.3;
}

body.ecran-rapports [data-ecran="rapports"] > .rapport-grille:not([hidden]) > .carte > .meta,
body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"] > .rapport-grille:not([hidden]) > .carte > .meta {
  font-size: 0.78rem;
  flex-shrink: 0;
}

body.ecran-rapports [data-ecran="rapports"] > .rapport-grille:not([hidden]) .param-seuils-actions,
body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"] > .rapport-grille:not([hidden]) .param-seuils-actions {
  margin-top: auto;
  gap: 8px;
  flex-shrink: 0;
}

body.ecran-rapports [data-ecran="rapports"] > .sources:not([hidden]),
body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"] > .sources:not([hidden]) {
  display: flex !important;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

body.ecran-rapports [data-ecran="rapports"] > .sources:not([hidden]) > .carte,
body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"] > .sources:not([hidden]) > .carte {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  margin-bottom: 0;
  padding: 12px 14px;
}

body.ecran-rapports [data-ecran="rapports"] > .sources:not([hidden]) > .carte > .carte-titre,
body.ecran-rapports [data-ecran="rapports"] > .sources:not([hidden]) > .carte > .meta,
body.ecran-rapports [data-ecran="rapports"] > .sources:not([hidden]) > .carte > .produce-nettoyage,
body.ecran-rapports [data-ecran="rapports"] > .sources:not([hidden]) > .carte > p,
body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"] > .sources:not([hidden]) > .carte > .carte-titre,
body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"] > .sources:not([hidden]) > .carte > .meta,
body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"] > .sources:not([hidden]) > .carte > .produce-nettoyage,
body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"] > .sources:not([hidden]) > .carte > p {
  flex-shrink: 0;
}

body.ecran-rapports #produce-fichiers,
body.ecran-rapports #liste-lettrages,
body.ecran-rapports .lots-od .table-wrap,
body:has([data-ecran="rapports"]:not([hidden])) #produce-fichiers,
body:has([data-ecran="rapports"]:not([hidden])) #liste-lettrages,
body:has([data-ecran="rapports"]:not([hidden])) .lots-od .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  margin-top: 0;
  align-content: start;
}

body.ecran-rapports #liste-lettrages,
body:has([data-ecran="rapports"]:not([hidden])) #liste-lettrages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.lettrage-ligne {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--mist);
}

.lettrage-ligne .lettrage-titre {
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--ink);
  min-width: 0;
}

.lettrage-ligne .lettrage-titre strong {
  font-weight: 700;
}

.lettrage-ligne .meta {
  margin: 0;
  grid-column: 1 / -1;
  font-size: 0.8rem;
}

.lettrage-ligne .param-seuils-actions {
  margin: 0;
  justify-content: flex-end;
  flex-shrink: 0;
}

body.ecran-rapports .produce-nettoyage,
body:has([data-ecran="rapports"]:not([hidden])) .produce-nettoyage {
  margin: 0;
}

body.ecran-rapports .documents-produits,
body:has([data-ecran="rapports"]:not([hidden])) .documents-produits {
  margin-bottom: 0;
}

body.ecran-rapports .lots-od,
body:has([data-ecran="rapports"]:not([hidden])) .lots-od {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  padding-top: 8px;
}

@media (max-width: 1100px) {
  body.ecran-rapports [data-ecran="rapports"] > .rapport-grille:not([hidden]),
  body:has([data-ecran="rapports"]:not([hidden])) [data-ecran="rapports"] > .rapport-grille:not([hidden]) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    overflow: auto;
  }
}

[data-ecran="rapprochement"] {
  --ink: #0f172a;
  --ink-soft: #64748b;
  --brand: #4f46e5;
  --brand-deep: #4338ca;
  --info-bg: #eef2ff;
  --mist: #eef2f6;
  --paper: #ffffff;
  --line: #e6ebf2;
  background: #eef2f6;
  color: #0f172a;
  margin: -20px -24px -40px;
  padding: 0 0 8px;
}

body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: hidden;
  margin-bottom: 0;
}

[data-ecran="rapprochement"] > .ecran-head,
[data-ecran="rapprochement"] > .tabs,
[data-ecran="rapprochement"] > [data-panneau] {
  display: none;
}

body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) > .arene {
  flex: 0 0 auto;
}

body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) > .legende-match {
  flex: 0 0 auto;
}

.arene-scene {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin: 10px 16px 0;
}

body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) > .arene-scene {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) .fiche-arene {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  padding: 12px 14px 10px;
  gap: 8px;
  border-radius: 18px;
}

body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) .fiche-photo,
body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) .fiche-photo img,
body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) .fiche-photo svg {
  width: 104px;
  height: 70px;
}

body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) .photo-nav {
  width: 18px;
  height: 18px;
  font-size: 0.85rem;
}

body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) .photo-badge {
  font-size: 0.62rem;
  padding: 1px 5px;
}

body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) .fiche-arene h3 {
  font-size: 1.05rem;
}

body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) .fiche-grille,
body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) .fiche-montants {
  gap: 6px 12px;
}

body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) .analyse {
  padding: 8px 10px;
  font-size: 0.8rem;
}

body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) .score-rond {
  width: 80px;
  height: 80px;
}

body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) .score-rond strong {
  font-size: 1.1rem;
}

body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) .arene-barre {
  padding: 8px 14px;
  gap: 10px 12px;
}

.flash-proposition {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 8;
  margin: 0;
  padding: 14px 22px;
  border-radius: 12px;
  background: #163a5c;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.2;
  box-shadow: 0 12px 32px rgba(22, 58, 92, 0.28);
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.flash-proposition[hidden] {
  display: none;
}

.flash-proposition.est-flash {
  animation: flash-proposition 1.7s ease forwards;
}

@keyframes flash-proposition {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.94); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  68% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

.arene-scene[hidden] {
  display: none;
}

.arene-scene[data-ordre="registre"] [data-fiche="registre"] {
  order: 1;
}

.score-colonne {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  align-self: center;
}

.arene-scene[data-ordre="registre"] .score-colonne {
  order: 2;
}

.arene-scene[data-ordre="registre"] [data-fiche="terrain"] {
  order: 3;
}

.arene-barre {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 16px 8px;
  background: #fff;
  border-bottom: 1px solid #e6ebf2;
}

.arene-kpis,
.arene-outils,
.arene-filtres {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.arene-outils {
  margin-left: auto;
}

.puce {
  display: flex;
  flex-direction: column;
  min-width: 92px;
  padding: 6px 10px;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  background: #f8fafc;
}

.puce small {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}

.puce b {
  font-size: 1rem;
}

.puce-bleu { box-shadow: inset 3px 0 0 #3b82f6; }
.puce-vert { box-shadow: inset 3px 0 0 #22c55e; }

button.puce {
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.puce-clic {
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.puce-clic:hover {
  background: #eff6ff;
  transform: translateY(-1px);
}

.puce-clic:focus-visible {
  outline: 2px solid #3d8fc4;
  outline-offset: 2px;
}

.liste-kpi-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 40;
}

.liste-kpi-backdrop[hidden] {
  display: none;
}

.liste-kpi {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 2rem));
  max-height: min(80vh, 720px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(22, 58, 92, 0.14);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  z-index: 41;
  overflow: hidden;
}

.liste-kpi[hidden] {
  display: none;
}

.liste-kpi-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(22, 58, 92, 0.14);
  background: #f7fafc;
}

.liste-kpi-head h2 {
  margin: 0;
  font-family: var(--font-display), Syne, sans-serif;
  font-size: 1.1rem;
  color: #163a5c;
}

.liste-kpi-outils {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(22, 58, 92, 0.1);
}

.liste-kpi-outils .select {
  flex: 1;
}

.liste-kpi-corps {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  max-height: 55vh;
}

.liste-kpi-ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: #163a5c;
  transition: background 0.15s ease;
}

.liste-kpi-ligne:hover {
  background: rgba(61, 143, 196, 0.1);
}

.liste-kpi-ligne[hidden] {
  display: none;
}

.liste-kpi-ligne strong {
  display: block;
  font-size: 0.9rem;
}

.liste-kpi-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.75rem;
  color: rgba(22, 58, 92, 0.65);
}

.liste-kpi-meta .pastille {
  font-size: 0.7rem;
}

.liste-kpi-action {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #2a6fa0;
  background: #eef6fb;
  border: 1px solid rgba(61, 143, 196, 0.35);
  border-radius: 8px;
  padding: 6px 10px;
}

.liste-kpi .note {
  margin: 0;
  padding: 10px 18px 14px;
  border-top: 1px solid rgba(22, 58, 92, 0.1);
  font-size: 0.78rem;
  color: rgba(22, 58, 92, 0.55);
}

.liste-kpi-vide {
  padding: 28px 12px;
  text-align: center;
  color: rgba(22, 58, 92, 0.45);
  font-size: 0.85rem;
}

.outil {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.outil-bleu { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.outil-vert { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.outil-plein-vert { color: #fff; background: #16a34a; border-color: #16a34a; }
.outil-plein-bleu { color: #fff; background: #2563eb; border-color: #2563eb; }

#permuter-fiches[aria-pressed="true"] {
  color: #fff;
  background: #0f172a;
  border-color: #0f172a;
}

.arene-filtres {
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e6ebf2;
}

.arene-filtres[hidden] {
  display: none;
}

.arene-filtres label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 700;
}

.arene-filtres .select {
  min-width: 0;
  background: #fff;
}

.arene-compte {
  margin-left: auto;
  color: #64748b;
  font-size: 0.85rem;
}

.fiche-arene {
  position: relative;
  touch-action: none;
  cursor: grab;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  padding: 16px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fiche-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 800;
  color: #64748b;
}

.fiche-top button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #64748b;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.fiche-top .num {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 700;
}

.fiche-corps {
  display: flex;
  gap: 14px;
}

.fiche-photo {
  flex: 0 0 auto;
  width: 120px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  position: relative;
}

.fiche-photo img,
.fiche-photo svg {
  display: block;
  width: 120px;
  height: 80px;
  object-fit: cover;
}

.fiche-photo img[hidden],
.fiche-photo svg[hidden] {
  display: none !important;
}

.photo-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(22, 58, 92, 0.88);
  color: #fff;
  font: 700 0.68rem/1.3 Outfit, system-ui, sans-serif;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.photo-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #163a5c;
  font: 700 1rem/1 Outfit, system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
}

.photo-nav:hover {
  background: #fff;
  color: #2a6fa0;
}

.photo-nav-prev {
  left: 4px;
}

.photo-nav-next {
  right: 4px;
}

.photo-nav[hidden],
.photo-badge[hidden] {
  display: none !important;
}

.fiche-parc-carrousel {
  position: relative;
  margin: 14px 18px 0;
}

.fiche-parc-photo {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--mist);
}

.fiche-parc-carrousel .photo-badge {
  right: 10px;
  bottom: 10px;
  font-size: 0.75rem;
  padding: 3px 9px;
}

.fiche-parc-carrousel .photo-nav {
  width: 30px;
  height: 30px;
  font-size: 1.15rem;
}

.fiche-parc-carrousel .photo-nav-prev {
  left: 8px;
}

.fiche-parc-carrousel .photo-nav-next {
  right: 8px;
}

.fiche-parc-photos-meta {
  margin: 8px 18px 0;
  color: var(--ink);
  opacity: 0.7;
  font-size: 0.85rem;
}

.fiche-ids {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 6px;
}

.jauge-lot {
  position: relative;
  display: flex;
  align-items: center;
  height: 1.35rem;
  margin: 0 0 8px;
  border-radius: 999px;
  background: rgba(22, 58, 92, 0.08);
  overflow: hidden;
}

.jauge-lot-barre {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #3d8fc4;
  transition: width 0.25s ease;
}

.jauge-lot-barre-warn {
  background: #d97706;
}

.jauge-lot-barre-ok {
  background: #15803d;
}

.jauge-lot-lib {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #163a5c;
  pointer-events: none;
}

.meta-alerte-lot {
  color: #b45309;
  font-weight: 600;
}

.fiche-arene h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.fiche-grille,
.fiche-montants {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin: 0;
}

.fiche-montants {
  grid-template-columns: repeat(3, 1fr);
}

.fiche-grille dt,
.fiche-montants dt {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
}

.fiche-grille dd,
.fiche-montants dd {
  margin: 2px 0 0;
  font-weight: 700;
}

.point-vert::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.analyse {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.85rem;
  cursor: help;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.analyse.is-survol {
  background: #e0e7ff;
  box-shadow: 0 4px 14px rgba(55, 48, 163, 0.18);
  transform: scale(1.01);
}

mark.mot-direct,
mark.mot-appris {
  color: #0f172a;
  border-radius: 3px;
  padding: 0 0.18em;
  font: inherit;
  font-weight: 700;
  display: inline-block;
}

mark.mot-direct {
  background: #fde047;
  color: #713f12;
  box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.7);
  animation: pulse-mot-direct 1.4s infinite;
}

mark.mot-appris {
  background: #c4b5fd;
  color: #3730a3;
  box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.55);
  animation: pulse-mot-appris 1.4s infinite;
}

@keyframes pulse-mot-direct {
  0% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.7); }
  70% { box-shadow: 0 0 0 5px rgba(250, 204, 21, 0); }
  100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0); }
}

@keyframes pulse-mot-appris {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.55); }
  70% { box-shadow: 0 0 0 5px rgba(99, 102, 241, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.legende-match {
  margin: 6px 16px 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.35;
}

.fiche-pied {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.8rem;
}

.fiche-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.lien,
.lien-danger {
  border: 0;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.lien {
  color: var(--brand);
}

.lien-danger {
  color: #e11d48;
}

.kanban-carte .lien {
  margin-top: 8px;
}

.score-rond {
  align-self: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 4px solid #22c55e;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #16a34a;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.15);
}

.score-rond strong {
  font-size: 1.25rem;
  line-height: 1;
}

.score-rond span {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}

@media (max-width: 980px) {
  body.ecran-arene {
    overflow: auto;
    height: auto;
  }

  body.ecran-arene .app,
  body.ecran-arene .workspace,
  body.ecran-arene .main {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) {
    overflow: visible;
  }

  body.ecran-arene [data-ecran="rapprochement"]:not([hidden]) > .arene-scene {
    overflow: visible;
  }

  .arene-scene {
    grid-template-columns: 1fr;
  }

  .score-rond {
    justify-self: center;
  }

  .arene-barre {
    padding-right: 16px;
    flex-wrap: wrap;
  }
}


/* Curseur flèche bleu foncé sur la fiche registre (décider / autre proposition). */
.fiche-arene[data-fiche="registre"] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23163a5c' stroke='%23ffffff' stroke-width='1.2' d='M4 3 L4 19 L9.2 14.5 L12.8 22 L15.2 20.8 L11.5 13.2 L18 13 Z'/%3E%3C/svg%3E") 3 2, pointer;
}
.fiche-arene[data-fiche="registre"].glisse {
  cursor: grabbing;
}
.fiche-arene[data-fiche="registre"] button,
.fiche-arene[data-fiche="registre"] a {
  cursor: pointer;
}

.fiche-arene.glisse {
  z-index: 6;
  cursor: grabbing;
  transition: none;
}

.fiche-arene.retour {
  transition: transform 0.18s ease;
}

.tampon {
  position: absolute;
  top: 36px;
  left: 50%;
  z-index: 5;
  margin: 0;
  padding: 0.12em 0.42em 0.08em;
  border: 5px solid currentColor;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px currentColor;
  background: rgba(255, 255, 255, 0.88);
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.05;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%) rotate(-16deg);
}

.tampon-match {
  color: #15803d;
  background: rgba(220, 252, 231, 0.9);
}

.tampon-suivant {
  color: #dc2626;
  background: rgba(254, 226, 226, 0.92);
}

.tampon-retour {
  color: #1d4ed8;
  background: rgba(219, 234, 254, 0.92);
}

.tampon[hidden] {
  display: none;
}

.bouton-annuler {
  border: 2px solid #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 6px 12px;
}

.bouton-annuler[hidden] {
  display: none;
}

.score-rond.score-nul {
  border-color: #94a3b8;
  color: #64748b;
  box-shadow: none;
}

.legende-geste {
  margin: 4px 20px 0;
  font-size: 0.8rem;
  color: #64748b;
}


.produce-ouvrir {
  margin-left: 0;
  padding: 4px 10px;
  font-size: 0.85rem;
  flex: 0 0 auto;
}

.documents-produits {
  margin-bottom: 12px;
}

#produce-fichiers {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

#produce-fichiers > li.produce-ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  width: 100%;
}

#produce-fichiers .produce-nom {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

#produce-fichiers .produce-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}

.produce-nettoyage {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin: 12px 0;
}

.produce-nettoyage label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.produce-nettoyage .select {
  min-width: 180px;
}

#lettrages-purge {
  display: grid;
  grid-template-columns: minmax(140px, 1.1fr) repeat(2, minmax(170px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  width: 100%;
}

#lettrages-purge .select {
  min-width: 0;
  width: 100%;
}

#lettrages-purge-aide,
#lettrages-purge-etat {
  grid-column: 1 / -1;
  margin: 0;
}

@media (max-width: 900px) {
  #lettrages-purge {
    grid-template-columns: 1fr 1fr;
  }

  #lettrages-purge button {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.fiche-parc {
  position: fixed;
  top: 12vh;
  bottom: auto;
  width: min(440px, 42vw);
  max-height: 70vh;
  z-index: 12;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(22, 58, 92, 0.18);
  overflow: hidden;
}

.fiche-parc[hidden],
.decision-match[hidden] {
  display: none;
}

.fiche-parc[data-cote="droite"] {
  right: 16px;
}

.fiche-parc[data-cote="gauche"] {
  left: 16px;
}

.fiche-parc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #f7fafc;
}

.fiche-parc-kicker {
  margin: 0 0 2px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-deep);
}

.fiche-parc-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.fiche-parc-corps {
  flex: 1;
  min-height: 0;
  max-height: calc(70vh - 76px);
  overflow-y: auto;
  padding: 8px 0 20px;
  scrollbar-width: thin;
  scrollbar-color: #3d8fc4 #edf2f7;
}

.fiche-parc-corps::-webkit-scrollbar {
  width: 8px;
}

.fiche-parc-corps::-webkit-scrollbar-thumb {
  background: #3d8fc4;
  border-radius: 8px;
}

/* .fiche-parc-photo défini avec .fiche-parc-carrousel ci-dessus */

.fiche-parc-section {
  margin: 8px 18px 0;
  padding-top: 12px;
}

.fiche-parc-section h3 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-deep);
}

.fiche-parc-grille {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin: 0;
}

.fiche-parc-grille div {
  min-width: 0;
}

.fiche-parc-grille .fiche-parc-large {
  grid-column: 1 / -1;
}

.fiche-parc-grille dt {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.fiche-parc-grille dd {
  margin: 2px 0 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.fiche-parc-etat {
  margin: 16px 18px;
  color: var(--ink-soft);
}


.decision-match {
  position: fixed;
  top: 14vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, calc(100vw - 32px));
  max-height: 70vh;
  z-index: 14;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(22, 58, 92, 0.18);
  overflow: hidden;
}

.decision-match form {
  overflow-y: auto;
  max-height: calc(70vh - 76px);
  padding: 4px 18px 18px;
  scrollbar-width: thin;
  scrollbar-color: #3d8fc4 #edf2f7;
}

.decision-match fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.decision-match legend {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.decision-match fieldset label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.decision-match fieldset label:has(input:checked) {
  border-color: var(--brand);
  background: var(--info-bg);
}

.decision-match fieldset span {
  display: block;
  font-size: 0.92rem;
  line-height: 1.35;
}

.decision-match fieldset b {
  display: block;
  margin-bottom: 2px;
}

.decision-motif {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0;
  font-weight: 700;
  font-size: 0.85rem;
}

.decision-motif textarea {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  resize: vertical;
  width: 100%;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  margin: 8px 0 16px;
}

.kanban-col {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 180px;
  padding: 12px;
}

.kanban-col header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.kanban-col h3 {
  margin: 0;
  font-size: 0.95rem;
}

.kanban-col-aide {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.35;
}

.kanban-col-clos {
  opacity: 0.92;
}

.kanban-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(22, 58, 92, 0.18);
  background: #f2f7fb;
  color: #163a5c;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.kanban-carte[data-action="ECART_DEFINITIF"] .kanban-badge,
.kanban-carte[data-action="DOUBLON"] .kanban-badge {
  background: #fef3f2;
  border-color: rgba(180, 35, 24, 0.2);
  color: #b42318;
}

.kanban-carte[data-action="TRANSFERT"] .kanban-badge {
  background: #eef6fb;
  border-color: rgba(61, 143, 196, 0.35);
  color: #2a6fa0;
}

.kanban-carte[data-action="EN_ATTENTE"] .kanban-badge {
  background: #fff8eb;
  border-color: rgba(176, 124, 20, 0.25);
  color: #8a5b00;
}

.kanban-carte[data-action="MATCH"] .kanban-badge {
  background: #eef8f1;
  border-color: rgba(3, 119, 63, 0.2);
  color: #03773f;
}

.kanban-suite {
  margin-top: 8px !important;
  padding-top: 6px;
  border-top: 1px dashed rgba(22, 58, 92, 0.16);
  font-size: 0.8rem !important;
  color: #2a6fa0 !important;
}

.kanban-motif {
  font-style: italic;
}

#decision-rappel {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f2f7fb;
  border: 1px solid rgba(22, 58, 92, 0.14);
}

.kanban-col header .num {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  min-width: 1.6rem;
  text-align: center;
  padding: 2px 8px;
  font-size: 0.8rem;
}

.kanban-liste {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kanban-carte {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.kanban-carte strong {
  display: block;
}

.kanban-carte p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.kanban-carte .meta {
  margin-top: 6px;
}

.kanban-vide {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

@media (max-width: 1100px) {
  .kanban {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .kanban {
    grid-template-columns: 1fr;
  }
}

.decision-match .fiche-parc-head,
#deplacer-fiche {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.decision-match.deplace .fiche-parc-head,
.fiche-parc.deplace #deplacer-fiche {
  cursor: grabbing;
}

.decision-match .fiche-parc-head .icon-btn,
#deplacer-fiche .icon-btn {
  cursor: pointer;
  touch-action: auto;
}


.param-seuils {
  display: grid;
  gap: 14px;
  margin: 14px 0 0;
}

.param-seuils > div {
  padding: 12px 14px;
  border: 1px solid rgba(22, 58, 92, 0.14);
  border-radius: 12px;
  background: #f8fafc;
}

.param-seuils dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(22, 58, 92, 0.55);
}

.param-seuils dd {
  margin: 6px 0 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #163a5c;
}

.param-seuils .meta {
  margin: 8px 0 0;
}


.param-seuils-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.param-seuils-form label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #163a5c;
}

.param-seuils-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.param-seuils-form[hidden],
#param-seuils-lecture[hidden],
#param-seuils-lecture-seul[hidden] {
  display: none;
}

#form-organisation[hidden],
#param-org-lecture[hidden],
#param-org-lecture-seul[hidden] {
  display: none;
}



.sources.sources-plein {
  grid-template-columns: 1fr;
}

/* Dictionnaire : une seule page visible, listes scrollables à l'intérieur.
   Exiger :not([hidden]) sur l'écran Paramètres sinon le :has reste vrai après navigation. */
body:has([data-ecran="parametres"]:not([hidden]) > [data-panneau="dictionnaire"]:not([hidden])) .main {
  padding-bottom: 12px;
  overflow: hidden;
}

[data-ecran="parametres"]:not([hidden]):has(> [data-panneau="dictionnaire"]:not([hidden])) {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--topbar-h, 56px) - 32px);
  max-height: calc(100dvh - var(--topbar-h, 56px) - 32px);
  overflow: hidden;
}

[data-ecran="parametres"]:not([hidden]):has(> [data-panneau="dictionnaire"]:not([hidden])) > .ecran-head {
  margin-bottom: 8px;
  flex-shrink: 0;
}

[data-ecran="parametres"]:not([hidden]):has(> [data-panneau="dictionnaire"]:not([hidden])) > .tabs {
  margin-bottom: 8px;
  flex-shrink: 0;
}

.dict-panneau:not([hidden]) {
  flex: 1 1 auto;
  min-height: 0;
  display: flex !important;
  flex-direction: column;
}

.dict-carte {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  overflow: hidden;
}

.dict-entete {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.dict-titres h3 {
  margin: 0 0 2px;
  font-size: 1.05rem;
}

.dict-titres .meta {
  margin: 0;
  line-height: 1.3;
}

@media (min-width: 900px) {
  .dict-entete {
    grid-template-columns: minmax(200px, 1fr) minmax(300px, 1.5fr);
    align-items: end;
  }
}

.dict-filtres {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 180px);
  gap: 8px;
  margin: 0;
  flex-shrink: 0;
}

.dict-filtre {
  display: grid;
  gap: 2px;
}

.dict-colonnes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}

@media (min-width: 900px) {
  .dict-colonnes {
    grid-template-columns: 1fr 1fr;
  }
}

.dict-colonne {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dict-colonne-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.dict-colonne-head h4 {
  margin: 0;
  font-family: var(--font-body, Outfit, sans-serif);
  font-size: 0.9rem;
  font-weight: 700;
  color: #163a5c;
}

.dict-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  border: 1px solid rgba(22, 58, 92, 0.14);
  border-radius: 10px;
  background: #fff;
}

.dict-liste li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(22, 58, 92, 0.1);
}

.dict-liste li:last-child {
  border-bottom: 0;
}

.dict-liste li.inactif {
  background: #f8fafc;
  opacity: 0.86;
}

.dict-terme {
  font-weight: 700;
  color: #163a5c;
}

.dict-fleche {
  color: rgba(22, 58, 92, 0.45);
}

.dict-meta {
  margin-left: auto;
  font-size: 0.78rem;
  color: rgba(22, 58, 92, 0.55);
}

.dict-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dict-actions button {
  border: 1px solid rgba(22, 58, 92, 0.18);
  background: #fff;
  color: #163a5c;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.dict-actions button.danger {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.25);
  background: #fef3f2;
}

.dict-form {
  display: grid;
  gap: 6px;
  margin-top: 0;
}

.dict-form-entete {
  padding: 8px 10px;
  border: 1px solid rgba(22, 58, 92, 0.14);
  border-radius: 10px;
  background: #f7fafc;
}

@media (min-width: 700px) {
  .dict-form-entete {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
  }

  .dict-form-entete .dict-form-actions {
    grid-column: auto;
    margin: 0;
    align-self: end;
  }
}

.dict-form label {
  display: grid;
  gap: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #163a5c;
}

.dict-form .select {
  padding-top: 6px;
  padding-bottom: 6px;
}

.dict-form[hidden],
#dict-lecture-seul[hidden] {
  display: none;
}

.dict-vide {
  padding: 14px 10px;
  text-align: center;
  color: rgba(22, 58, 92, 0.5);
}


.dict-lot {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dict-lot .btn {
  padding: 4px 8px;
  font-size: 0.75rem;
}

.dict-lot[hidden] {
  display: none;
}


.dict-pastille {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dict-pastille-base {
  color: #854d0e;
  background: #fef08a;
  box-shadow: inset 0 0 0 1px rgba(133, 77, 14, 0.22);
}

.dict-pastille-apprise {
  color: #5b21b6;
  background: #ede9fe;
  box-shadow: inset 0 0 0 1px rgba(91, 33, 182, 0.25);
}

.dict-pastille-ia {
  color: #0f766e;
  background: #ccfbf1;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.28);
}

.dict-liste li.apprise {
  border-left: 3px solid #7c3aed;
}

.dict-liste li.affinee-ia {
  border-left-color: #0d9488;
}


.param-pond-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid rgba(22, 58, 92, 0.14);
  border-radius: 12px;
  background: #fff;
}

.param-pond-table {
  width: 100%;
  border-collapse: collapse;
}

.param-pond-table th {
  background: #f7fafc;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(22, 58, 92, 0.55);
  padding: 10px 12px;
  border-bottom: 1px solid rgba(22, 58, 92, 0.14);
}

.param-pond-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(22, 58, 92, 0.1);
  color: #163a5c;
  font-size: 0.9rem;
}

.param-pond-table tr:last-child td {
  border-bottom: 0;
}

.param-pond-table input {
  width: 5.5rem;
  padding: 6px 8px;
}


.fiche-soustitre {
  margin: -4px 0 2px;
  color: #64748b;
  font-size: 0.88rem;
}

.fiche-grille-registre {
  grid-template-columns: 1fr 1fr;
}

.pastille-soft {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid rgba(22, 58, 92, 0.12);
}

.jeu-essai-cache {
  border-style: dashed;
  border-color: rgba(22, 58, 92, 0.22);
  background: #f8fafc;
}

.jeu-essai-cache h3 {
  color: #163a5c;
}

.jeu-essai-cache .param-sep {
  margin: 1.1rem 0 0.85rem;
  border: 0;
  border-top: 1px dashed rgba(22, 58, 92, 0.18);
}


kbd.raccourci-espace {
  display: inline-block;
  margin-left: 0.35em;
  padding: 0.08em 0.45em;
  border: 1px solid rgba(22, 58, 92, 0.22);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #f8fafc;
  color: #163a5c;
  font: 600 0.78em/1.2 Outfit, system-ui, sans-serif;
  letter-spacing: 0.02em;
}


body.campagne-cloturee [data-ecriture]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#bandeau-staging {
  color: #8a5b00;
  background: #fff8eb;
  border: 1px solid rgba(176, 124, 20, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
}

.lots-od {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(22, 58, 92, 0.14);
}

.lots-od h4 {
  margin: 0 0 4px;
  font-size: 0.92rem;
  color: #163a5c;
}

.table-lots-od {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.table-lots-od th {
  text-align: left;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(22, 58, 92, 0.65);
  padding: 6px 8px;
  border-bottom: 1px solid rgba(22, 58, 92, 0.14);
}

.table-lots-od td {
  padding: 8px;
  border-bottom: 1px solid rgba(22, 58, 92, 0.1);
  vertical-align: middle;
}

.lots-od-actions {
  white-space: nowrap;
}
