.lx-app {
  --lx-accent: #6652b8;
  --lx-accent-dark: #4d3a96;
  --lx-accent-soft: #f1edff;
  --lx-border: #ddd7e8;
  --lx-text: #30253c;
  --lx-muted: #6c6475;
  display: grid;
  grid-template-columns: 230px minmax(320px, 1fr) minmax(300px, 0.82fr);
  gap: 18px;
  align-items: start;
  max-width: 1500px;
  margin: auto;
}

/* Signalement d'une correction directement relié à l'administration. */
.lx-report-open { justify-self: start; padding: 0; border: 0; background: transparent; color: var(--lx-accent-dark); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lx-report-form { display: grid; gap: 13px; margin-top: 8px; padding: 16px; border: 1px solid var(--lx-border); border-radius: 16px; background: #faf9ff; font-size: .82rem; }
.lx-report-form h3 { margin: 0; font-size: .95rem; }
.lx-report-form label { display: grid; gap: 6px; color: var(--lx-text); font-weight: 750; }
.lx-report-form label small { color: var(--lx-muted); font-weight: 500; }
.lx-report-form input, .lx-report-form select, .lx-report-form textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--lx-border); border-radius: 10px; background: #fff; color: var(--lx-text); font: inherit; }
.lx-report-form textarea { resize: vertical; }
.lx-report-identity { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lx-report-form > button { justify-self: start; padding: 9px 14px; border: 0; border-radius: 999px; background: var(--lx-accent); color: #fff; font-weight: 850; cursor: pointer; }
.lx-report-form > button:disabled { opacity: .6; cursor: wait; }
.lx-report-status { margin: 0; color: var(--lx-muted); line-height: 1.45; }
@media (max-width: 520px) { .lx-report-identity { grid-template-columns: 1fr; } }
.lx-app button,
.lx-app input {
  font: inherit;
}
.lx-sidebar,
.lx-browser,
.lx-detail {
  min-width: 0;
  border: 1px solid var(--lx-border);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(56, 42, 76, 0.07);
}
.lx-sidebar {
  position: sticky;
  top: 88px;
  padding: 14px;
}
.lx-search {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--lx-border);
  border-radius: 14px;
  background: #faf9fc;
  color: #746a7f;
}
.lx-search:focus-within {
  border-color: var(--lx-accent);
  box-shadow: 0 0 0 3px rgba(116, 101, 199, 0.14);
}
.lx-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #252238;
}
.lx-search button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
  color: #6f6a7b;
}
.lx-groups {
  display: grid;
  gap: 5px;
  margin-top: 14px;
}
.lx-groups button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #40394b;
  text-align: left;
  cursor: pointer;
}
.lx-groups button:hover {
  background: #f8f5fb;
}
.lx-groups button.is-active {
  background: var(--lx-accent-soft);
  color: var(--lx-accent-dark);
}
.lx-groups strong {
  font-size: 0.88rem;
}
.lx-groups small {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff;
  font-weight: 800;
  color: #6f6a7b;
}
.lx-browser {
  padding: 18px;
}
.lx-browser-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: end;
  margin-bottom: 18px;
}
.lx-browser-head p {
  margin: 0 0 3px;
  color: #7465c7;
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.lx-browser-head h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}
.lx-browser-head > span {
  flex: 0 0 auto;
  color: #6f6a7b;
  font-size: 0.82rem;
  font-weight: 750;
}
.lx-tree,
.lx-children {
  margin: 0;
  padding: 0;
  list-style: none;
}
.lx-tree {
  display: grid;
  gap: 10px;
}
.lx-branch {
  min-width: 0;
}
.lx-node {
  display: grid;
  width: 100%;
  min-height: 68px;
  overflow: hidden;
  border: 1px solid var(--lx-border);
  border-radius: 15px;
  background: #fff;
  color: var(--lx-text);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s,
    box-shadow 0.16s,
    transform 0.16s;
}
.lx-node:hover {
  border-color: var(--lx-accent);
  background: var(--lx-accent-soft);
  box-shadow: 0 8px 22px rgba(77, 58, 150, 0.12);
  transform: translateY(-1px);
}
.lx-node.is-selected {
  border-color: var(--lx-accent);
  background: var(--lx-accent-soft);
  box-shadow: 0 0 0 3px rgba(102, 82, 184, 0.13);
}
.lx-term-button {
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
}
.lx-node-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; padding-right: 12px; }
.lx-node-actions .lx-term-type { margin-right: 0; }
.lx-umbrella,
.lx-compare-toggle { padding: 5px 8px; border-radius: 999px; font-size: 0.66rem; font-weight: 850; white-space: nowrap; }
.lx-umbrella { background: #fff2dc; color: #7a4d08; }
.lx-compare-toggle { border: 1px solid #cfc6e9; background: #fff; color: var(--lx-accent-dark); }
.lx-compare-toggle:hover,
.lx-compare-toggle.is-active { border-color: var(--lx-accent); background: var(--lx-accent); color: #fff; }
.lx-legend { display: grid; gap: 7px; margin-top: 16px; padding: 12px; border-radius: 14px; background: #faf9fc; color: var(--lx-muted); }
.lx-legend > strong { color: var(--lx-text); font-size: 0.78rem; }
.lx-legend > span { display: flex; align-items: center; gap: 7px; font-size: 0.7rem; }
.lx-legend i { width: 10px; height: 10px; border-radius: 3px; background: #d6cfee; }
.lx-legend i.is-umbrella { background: #e9b75d; }
.lx-legend small { font-size: 0.65rem; line-height: 1.4; }
.lx-term-type {
  align-self: center;
  margin-right: 14px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f0edf4;
  color: var(--lx-muted);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.lx-term-type-rubrique {
  background: var(--lx-accent);
  color: #fff;
}
.lx-term-type-notion-liee {
  background: #e9e3f8;
  color: var(--lx-accent-dark);
}
.lx-term-type-genre {
  background: #f4f1fb;
  color: #55456f;
}

.lx-term-button:hover .lx-node-copy strong,
.lx-term-button:focus-visible .lx-node-copy strong {
  color: var(--lx-accent-dark);
}
.lx-image {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  object-fit: cover;
  background: var(--lx-accent-soft);
  color: var(--lx-accent-dark);
  font-size: 1.4rem;
  font-weight: 900;
}
.lx-node-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 0;
}
.lx-node-copy strong {
  overflow-wrap: anywhere;
  line-height: 1.2;
}
.lx-node-copy small {
  color: #746a7f;
  font-size: 0.78rem;
  font-weight: 700;
}
.lx-children {
  display: grid;
  gap: 8px;
  margin: 8px 0 2px 22px;
  padding-left: 12px;
  border-left: 2px solid var(--lx-border);
}
.lx-depth-1 > .lx-node {
  background: #fbfaff;
}
.lx-depth-2 > .lx-node {
  background: #fbfaff;
}
.lx-depth-3 > .lx-node {
  background: #fbfaff;
}
.lx-depth-1 .lx-node,
.lx-depth-2 .lx-node,
.lx-depth-3 .lx-node {
  min-height: 58px;
}
.lx-depth-1 .lx-term-button,
.lx-depth-2 .lx-term-button,
.lx-depth-3 .lx-term-button {
  grid-template-columns: 58px minmax(0, 1fr) auto;
}
.lx-depth-1 .lx-image,
.lx-depth-2 .lx-image,
.lx-depth-3 .lx-image {
  width: 58px;
  height: 58px;
}
.lx-results {
  display: grid;
  gap: 8px;
}
.lx-results > button {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  overflow: hidden;
  padding: 0 14px 0 0;
  border: 1px solid var(--lx-border);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.lx-results > button:hover {
  border-color: var(--lx-accent);
}
.lx-results > button:hover strong,
.lx-results > button:focus-visible strong {
  color: var(--lx-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lx-results .lx-image {
  width: 58px;
  height: 58px;
}
.lx-results > button > span {
  display: grid;
  gap: 2px;
}
.lx-results small {
  color: #746a7f;
}
.lx-results i {
  color: #7465c7;
  font-style: normal;
}
.lx-no-result {
  padding: 28px;
  border-radius: 16px;
  background: #faf9fc;
  text-align: center;
  color: #6f6a7b;
}
.lx-detail {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 105px);
  overflow: auto;
  padding: 20px;
}
.lx-detail-empty {
  display: grid;
  place-items: center;
  min-height: 320px;
  text-align: center;
  color: #6f6a7b;
}
.lx-detail-empty > span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #eee9ff;
  color: #7465c7;
  font-size: 1.5rem;
}
.lx-detail-empty h2 {
  margin: 8px 0 0;
  color: #40394b;
}
.lx-detail-empty p {
  max-width: 28ch;
  margin: 0;
}
.lx-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.lx-category {
  padding: 6px 9px;
  border-radius: 999px;
  background: #eee9ff;
  color: #51439b;
  font-size: 0.72rem;
  font-weight: 850;
}
.lx-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f8f5fb;
  color: #514b58;
  font-size: 1.25rem;
  cursor: pointer;
}
.lx-mobile-back {
  display: none;
  border: 0;
  background: transparent;
  color: #51439b;
  font-weight: 800;
  cursor: pointer;
}
.lx-detail-title {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  align-items: center;
  margin: 18px 0;
}
.lx-detail-title .lx-image {
  width: 78px;
  height: 78px;
  border-radius: 18px;
}
.lx-detail-title h2 {
  margin: 0;
  line-height: 1.1;
}
.lx-detail-title p {
  margin: 5px 0 0;
  color: #746a7f;
  font-weight: 750;
}
.lx-definition {
  margin: 0;
  line-height: 1.7;
  color: #40394b;
}
.lx-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: -4px 0 16px; color: var(--lx-muted); font-size: 0.72rem; }
.lx-breadcrumb button { padding: 0; border: 0; background: transparent; color: var(--lx-accent-dark); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.lx-detail-footer { display: grid; gap: 7px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--lx-border); font-size: 0.75rem; }
.lx-detail-footer span { color: var(--lx-muted); }
.lx-detail-footer a { color: var(--lx-accent-dark); font-weight: 800; }
.lx-comparison { grid-column: 1 / -1; padding: 20px; border: 1px solid var(--lx-border); border-radius: 22px; background: #fff; box-shadow: 0 8px 28px rgba(56, 42, 76, 0.07); }
.lx-comparison > header { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.lx-comparison header p { margin: 0 0 2px; color: var(--lx-accent); font-size: 0.7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; }
.lx-comparison h2 { margin: 0; font-size: 1.3rem; }
.lx-comparison header > button { border: 0; background: transparent; color: var(--lx-accent-dark); font-weight: 800; cursor: pointer; }
.lx-comparison-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.lx-comparison article { position: relative; display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--lx-border); border-radius: 16px; background: #fbfaff; }
.lx-comparison article > span { color: var(--lx-accent); font-size: .68rem; font-weight: 850; text-transform: uppercase; }
.lx-comparison article h3 { margin: 5px 28px 8px 0; }
.lx-comparison article p { flex: 1; margin: 0 0 12px; color: #4f4658; font-size: .84rem; line-height: 1.55; }
.lx-comparison article small { margin-bottom: 12px; color: var(--lx-muted); }
.lx-comparison-remove { position: absolute; top: 9px; right: 9px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: #eee9f6; cursor: pointer; }
.lx-comparison-open { align-self: flex-start; padding: 7px 10px; border: 1px solid var(--lx-accent); border-radius: 999px; background: #fff; color: var(--lx-accent-dark); font-weight: 800; cursor: pointer; }
.lx-comparison-hint { margin: 12px 0 0; color: var(--lx-muted); font-size: .8rem; }
.lx-source {
  margin: 18px 0 22px;
  font-size: 0.82rem;
  font-weight: 750;
}
.lx-source a {
  color: var(--lx-accent-dark);
  text-underline-offset: 3px;
}
.lx-flag-history dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 5px 12px;
  margin: 0 0 12px;
}
.lx-flag-history dt {
  color: var(--lx-muted);
  font-weight: 750;
}
.lx-flag-history dd {
  margin: 0;
  color: var(--lx-text);
  font-weight: 750;
}
.lx-flag-history p {
  margin: 8px 0;
}
.lx-flag-history a {
  color: var(--lx-accent-dark);
  font-size: 0.82rem;
  font-weight: 750;
}
.lx-detail-section {
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--lx-border);
}
.lx-detail-section h3 {
  margin: 0 0 10px;
  font-size: 0.92rem;
}
.lx-detail-section > p {
  margin: -5px 0 10px;
  color: #746a7f;
  font-size: 0.82rem;
}
.lx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.lx-chips span {
  padding: 6px 9px;
  border: 1px solid #cfc6e9;
  border-radius: 999px;
  background: #faf8ff;
  color: #51439b;
  font-size: 0.78rem;
  font-weight: 750;
}
.lx-related-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.lx-related-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  padding: 0 8px 0 0;
  border: 1px solid var(--lx-border);
  border-radius: 10px;
  background: #fff;
  color: #40394b;
  text-align: left;
  cursor: pointer;
}
.lx-related-card:hover {
  border-color: var(--lx-accent);
}
.lx-related-card .lx-image {
  width: 38px;
  height: 38px;
  font-size: 0.9rem;
}
.lx-related-card span {
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  font-weight: 750;
}
.lx-related-card.is-parent {
  width: 100%;
  background: #fff7ef;
}
.lx-associated {
  background: #faf9fc;
  margin-inline: -10px;
  padding: 17px 10px 10px;
  border-radius: 14px;
}
.lx-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 280px;
  border: 1px solid var(--lx-border);
  border-radius: 22px;
  background: #fff;
}
.lx-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e4dfeb;
  border-top-color: #7465c7;
  border-radius: 50%;
  animation: lx-spin 0.7s linear infinite;
}
.lx-error {
  display: grid;
  padding: 24px;
  color: #7b2736;
}
.lx-error span {
  color: #6f6a7b;
}
@keyframes lx-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 1120px) {
  .lx-app {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .lx-detail {
    position: fixed;
    z-index: 70;
    inset: calc(var(--pc-fixed-header-height, 80px) + 12px) 18px 18px auto;
    width: min(430px, calc(100vw - 36px));
    max-height: calc(100dvh - var(--pc-fixed-header-height, 80px) - 30px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    box-shadow: 0 22px 70px rgba(35, 27, 48, 0.25);
  }
  .lx-detail-head {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: -8px -8px 12px;
    padding: 8px;
    border-bottom: 1px solid var(--lx-border);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
  }
  .lx-detail-empty {
    display: none;
  }
}
@media (max-width: 760px) {
  .lx-app {
    display: block;
  }
  .lx-sidebar {
    position: static;
    margin-bottom: 12px;
  }
  .lx-groups {
    display: flex;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }
  .lx-groups button {
    flex: 0 0 auto;
    width: auto;
    grid-template-columns: 20px auto auto;
    white-space: nowrap;
  }
  .lx-browser {
    padding: 14px;
  }
  .lx-browser-head {
    align-items: start;
  }
  .lx-detail {
    inset: var(--pc-fixed-header-height, 80px) 0 0;
    width: 100%;
    height: calc(100dvh - var(--pc-fixed-header-height, 80px));
    max-width: none;
    max-height: calc(100dvh - var(--pc-fixed-header-height, 80px));
    border: 0;
    border-radius: 0;
    padding:
      calc(10px + env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      calc(28px + env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
  }
  .lx-mobile-back {
    display: block;
  }
  .lx-close {
    position: relative;
    z-index: 7;
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    background: #eee9ff;
    color: #403269;
    font-size: 1.5rem;
  }
  .lx-app:not(.has-detail) .lx-detail {
    display: none;
  }
  .lx-related-list {
    grid-template-columns: 1fr;
  }
  .lx-children {
    margin-left: 10px;
    padding-left: 8px;
  }
}
@media (max-width: 440px) {
  .lx-sidebar {
    padding: 10px;
  }
  .lx-browser {
    border-radius: 17px;
  }
  .lx-browser-head {
    display: grid;
  }
  .lx-term-button {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 9px;
  }
  .lx-image {
    width: 56px;
    height: 60px;
  }
  .lx-node {
    min-height: 60px;
  }
  .lx-children {
    margin-left: 7px;
  }
  .lx-depth-1 .lx-term-button,
  .lx-depth-2 .lx-term-button,
  .lx-depth-3 .lx-term-button {
    grid-template-columns: 50px minmax(0, 1fr) auto;
  }
  .lx-depth-1 .lx-image,
  .lx-depth-2 .lx-image,
  .lx-depth-3 .lx-image {
    width: 50px;
    height: 56px;
  }
  .lx-node-copy strong {
    font-size: 0.9rem;
  }
  .lx-term-type {
    margin-right: 8px;
    padding: 4px 7px;
    font-size: 0.62rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lx-app * {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.lx-pagination { display:flex; flex-wrap:wrap; gap:6px; margin:18px 0; }
.lx-pagination button { min-width:44px; min-height:44px; padding:6px 10px; border:1px solid #6750a4; border-radius:10px; background:#fff; color:#473368; font:inherit; cursor:pointer; }
.lx-pagination button[aria-current='page'] { background:#6750a4; color:#fff; font-weight:800; }
.lx-pagination button:disabled { opacity:.45; cursor:default; }
.lx-pagination button:focus-visible,.lx-chips button:focus-visible { outline:3px solid #6750a4; outline-offset:3px; }
.lx-chips button { max-width:100%; white-space:normal; text-align:left; border:1px solid #6750a4; background:#f0ecff; color:#473368; border-radius:14px; padding:7px 10px; font:inherit; cursor:pointer; }
