/* Shell Amélie — Éditeur (maquette Figma) */
.editor-shell .main-content,
.editor-shell.sidebar-toggled .main-content,
.editor-shell:not(.sidebar-toggled) .main-content {
  padding-left: 0 !important;
}

.editor-shell {
  --editor-sidebar-bg: #1a1f36;
  --editor-sidebar-active-bg: #243352;
  --editor-sidebar-accent: #ff8c42;
  --editor-avatar-bg: #1a202c;
  --editor-content-bg: #f4f7f9;
  --editor-sidebar-text: rgba(255, 255, 255, 0.72);
  --editor-sidebar-text-active: #ffffff;
  --editor-sidebar-width: 15rem;
  --editor-header-height: 4.25rem;
}

/* Thème éditeur (palette actuelle) */
.editor-shell.editor-shell--editor {
  --editor-sidebar-bg: #1a1f36;
  --editor-sidebar-active-bg: #243352;
  --editor-sidebar-accent: #ff8c42;
  --editor-avatar-bg: #1a202c;
}

/* Thème revendeur */
.editor-shell.editor-shell--reseller {
  --editor-sidebar-bg: #8a4b22;
  --editor-sidebar-active-bg: #a35a2b;
  --editor-sidebar-accent: #f3d2b8;
  --editor-avatar-bg: #6f3d1c;
}

/* Thème fiduciaire */
.editor-shell.editor-shell--fiduciary {
  --editor-sidebar-bg: #0f4b46;
  --editor-sidebar-active-bg: #17665f;
  --editor-sidebar-accent: #34d399;
  --editor-avatar-bg: #0f6b62;
}

/* —— Sidebar —— */
.editor-shell .editor-sidebar.app-sidebar {
  background-color: var(--editor-sidebar-bg) !important;
  border-inline-end: none !important;
  display: flex !important;
  flex-direction: column !important;
  width: var(--editor-sidebar-width) !important;
  z-index: 52;
}

.editor-shell .editor-sidebar .main-sidebar-header {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  flex-shrink: 0;
  width: 100% !important;
  max-width: 100% !important;
  background: var(--editor-sidebar-bg) !important;
  border: none !important;
  height: var(--editor-header-height) !important;
  justify-content: flex-start;
  padding-inline: 1.15rem;
  z-index: 1;
}

.editor-shell .editor-sidebar .main-sidebar-header a {
  width: auto;
  height: auto;
  justify-content: flex-start;
}

.editor-shell .editor-sidebar .main-sidebar-header img {
  height: 2rem;
  width: auto;
}

.editor-shell .editor-sidebar .main-sidebar {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding-block-start: 0 !important;
  padding-bottom: 0 !important;
  height: auto !important;
  overflow: hidden;
}

.editor-shell .editor-sidebar .editor-sidebar__nav {
  flex: 1 1 auto;
  padding: 0.35rem 0.65rem 0.5rem;
}

.editor-shell .editor-sidebar .main-menu {
  margin-top: 0 !important;
}

.editor-shell .editor-sidebar .side-menu__item {
  margin: 0.2rem 0 !important;
  padding: 0.65rem 0.85rem !important;
  border-radius: 0.5rem;
  border: none !important;
  color: var(--editor-sidebar-text) !important;
  font-weight: 500;
}

.editor-shell .editor-sidebar .side-menu__item i {
  color: var(--editor-sidebar-text) !important;
  font-size: 1.1rem !important;
  margin-inline-end: 0.7rem !important;
  width: 1.25rem;
  text-align: center;
}

.editor-shell .editor-sidebar .side-menu__item .side-menu__label {
  color: inherit !important;
  font-size: 0.9rem;
  font-weight: inherit;
}

.editor-shell .editor-sidebar .side-menu__item:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: var(--editor-sidebar-text-active) !important;
  border: none !important;
}

.editor-shell .editor-sidebar .side-menu__item:hover i,
.editor-shell .editor-sidebar .side-menu__item:hover .side-menu__label {
  color: var(--editor-sidebar-text-active) !important;
}

.editor-shell .editor-sidebar .side-menu__item.active {
  background-color: var(--editor-sidebar-active-bg) !important;
  color: var(--editor-sidebar-text-active) !important;
  font-weight: 600;
  border: none !important;
  border-inline-end: 3px solid var(--editor-sidebar-accent) !important;
}

.editor-shell .editor-sidebar .side-menu__item.active i,
.editor-shell .editor-sidebar .side-menu__item.active .side-menu__label {
  color: var(--editor-sidebar-text-active) !important;
}

.editor-shell .editor-sidebar__footer {
  flex-shrink: 0;
  padding: 0.85rem 1.15rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-shell .editor-sidebar__footer-label {
  display: block;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 0.01em;
}

.editor-shell .editor-sidebar__figma-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
}

.editor-shell .editor-sidebar__figma-link:hover {
  color: rgba(255, 255, 255, 0.75);
}

/* —— Zone principale —— */
.editor-shell .editor-main-content {
  background-color: var(--editor-content-bg);
  min-height: calc(100vh - var(--editor-header-height));
  margin-block-start: var(--editor-header-height) !important;
  padding-left: 0 !important;
}

.editor-shell .editor-header,
.editor-shell.sidebar-toggled .editor-header,
.editor-shell:not(.sidebar-toggled) .editor-header {
  padding-left: 0 !important;
}

.editor-shell .editor-main-content .container-fluid {
  padding-inline: 1.5rem;
  padding-bottom: 1.5rem;
}

.editor-shell .footer {
  display: none;
}

/* —— En-tête éditeur —— */
.editor-shell.sidebar-toggled .editor-header {
  inset-inline-start: var(--editor-sidebar-width);
  width: calc(100% - var(--editor-sidebar-width));
}

.editor-shell.sidebar-toggled .editor-main-content {
  margin-inline-start: var(--editor-sidebar-width);
  width: calc(100% - var(--editor-sidebar-width));
}

.editor-shell:not(.sidebar-toggled) .editor-header {
  inset-inline-start: 0;
  width: 100%;
}

.editor-shell:not(.sidebar-toggled) .editor-main-content {
  margin-inline-start: 0;
  width: 100%;
}

.editor-shell:not(.sidebar-toggled) .editor-sidebar.app-sidebar {
  width: 0 !important;
  overflow: hidden !important;
}

.editor-header {
  position: fixed;
  top: 0;
  inset-inline-end: 0;
  z-index: 51;
  height: var(--editor-header-height);
  background: #fff;
  border-bottom: 1px solid #e8ecf1;
  transition: inset-inline-start 0.3s ease, width 0.3s ease;
}

.editor-shell .editor-main-content {
  transition: margin-inline-start 0.3s ease, width 0.3s ease;
}

.editor-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
  padding: 0 1.25rem;
}

.editor-header__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1 1 auto;
}

.editor-header__close {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: #64748b;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.editor-header__close:hover {
  background: #f1f5f9;
  color: #475569;
}

.editor-header__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #2d3748;
  white-space: nowrap;
  flex-shrink: 0;
}

.editor-header__search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 8rem;
  max-width: 22rem;
  height: 1.75rem;
  margin: 0;
  padding: 0 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  cursor: text;
}

.editor-header__search-icon {
  color: #94a3b8;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.editor-header__search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  font-size: 0.8rem;
  line-height: 1.75rem;
  color: #2d3748;
  outline: none;
}

.editor-header__search-input::placeholder {
  color: #a0aec0;
}

.editor-header__center {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  min-width: 0;
  max-width: min(28rem, 38vw);
  padding-inline: 0.5rem 1rem;
}

.editor-header__context-role {
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.editor-header__context-sep {
  display: inline-block;
  width: 1px;
  height: 1.1em;
  margin-inline: 0.15rem;
  background: #cbd5e0;
  flex-shrink: 0;
}

.editor-header__context-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2d3748;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-header__right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.editor-header__notify {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.editor-header__notify:hover {
  background: #f1f5f9;
}

.editor-header__notify-badge {
  position: absolute;
  top: 0.35rem;
  inset-inline-end: 0.4rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #ed8936;
  border: 2px solid #fff;
}

.editor-header__profile {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.35rem 0.25rem 0.25rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #2d3748;
  cursor: pointer;
}

.editor-header__profile:hover,
.editor-header__profile.show {
  background: #f8fafc;
}

.editor-header__profile::after {
  display: none;
}

.editor-header__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--editor-avatar-bg);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.editor-header__email {
  font-size: 0.875rem;
  font-weight: 500;
  color: #2d3748;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-header__chevron {
  font-size: 0.7rem;
  color: #94a3b8;
}

.editor-header__menu {
  min-width: 16.5rem;
  padding: 0.35rem 0;
  border: 1px solid #e8ecf1;
  border-radius: 0.625rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.editor-header__menu-header {
  padding: 0.75rem 1rem 0.5rem;
  list-style: none;
}

.editor-header__menu-label {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 0.15rem;
}

.editor-header__menu-email {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #2d3748;
  word-break: break-all;
}

.editor-header__menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: #4a5568;
  padding: 0.5rem 1rem;
}

.editor-header__menu-item i {
  font-size: 1rem;
  color: #94a3b8;
  width: 1.1rem;
  text-align: center;
}

.editor-header__menu-item--logout,
.editor-header__menu-item--logout i {
  color: #e53e3e !important;
}

.editor-header__menu-item--logout:hover {
  background: #fff5f5;
}

/* En-tête tableau de bord : recherche à côté du titre */
@media (min-width: 992px) {
  .editor-header--dashboard .editor-header__close {
    display: none;
  }

  .editor-header--dashboard .editor-header__left {
    gap: 1rem;
  }

  .editor-header--dashboard .editor-header__search {
    flex: 0 1 auto;
    max-width: 26rem;
    width: min(26rem, 36vw);
  }
}

.editor-shell .custom-card {
  border-radius: 0.625rem !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
}

.editor-shell .alert-info {
  border-radius: 0.625rem;
}

/* Chip portail (en-tête) */
.editor-shell .main-header-container .editor-portal-chip {
  margin-inline-start: 0.5rem;
  padding: 0.7rem 1rem !important;
  background-color: var(--editor-sidebar-active-bg) !important;
  border: 0;
  border-inline-start: 3px solid var(--editor-sidebar-accent);
  border-radius: 0.5rem;
  color: #fff !important;
  font-weight: 600;
  gap: 0.5rem;
  cursor: pointer;
}

.editor-shell .main-header-container .editor-portal-chip:hover,
.editor-shell .main-header-container .editor-portal-chip:focus {
  background-color: var(--editor-sidebar-active-bg) !important;
  color: #fff !important;
}

.editor-shell .main-header-container .editor-portal-chip .editor-portal-chip__icon {
  font-size: 1.25rem;
  color: var(--editor-sidebar-accent);
  flex-shrink: 0;
}

.editor-shell .main-header-container .editor-portal-chip .editor-portal-chip__label {
  overflow: hidden;
  white-space: nowrap;
  max-width: 200px;
  text-overflow: ellipsis;
  font-size: 1rem;
  font-weight: 600;
}

.editor-shell .main-header-container .editor-portal-chip .editor-portal-chip__chevron {
  font-size: 1.1rem;
  opacity: 0.85;
  color: #fff;
}

/* —— Commissions —— */
.editor-shell .editor-main-content:has(.editor-commissions) {
  background: #f4f6f9;
}

.editor-shell .editor-main-content:has(.editor-commissions) .container-fluid {
  padding-inline: 1.25rem;
  max-width: 100%;
}

.editor-commissions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.editor-commissions__toolbar {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.editor-commissions__toolbar .editor-dashboard__tabs {
  width: 100%;
  margin-bottom: 0;
}

.editor-commissions__filter {
  padding: 0.75rem 0.35rem 0;
}

.editor-commissions__select-wrap {
  position: relative;
  width: 100%;
  max-width: 22rem;
}

.editor-commissions__select {
  width: 100%;
  appearance: none;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  color: #1e293b;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.editor-commissions__select:focus {
  border-color: #a5b4fc;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(91, 77, 184, 0.15);
}

.editor-commissions__select-chevron {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.75rem;
  color: #94a3b8;
}

.editor-commissions__subtitle {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
}

.editor-commissions__kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.editor-commissions__kpi.custom-card {
  background: #fff;
  border: 1px solid #e8ecf1 !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.editor-commissions__kpi .card-body {
  position: relative;
  padding: 0.85rem 0.9rem 0.9rem;
  min-height: 5.25rem;
}

.editor-commissions__kpi-icon {
  position: absolute;
  top: 0.85rem;
  left: 0.9rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #edf2f7;
  color: #4a5568;
  font-size: 1.1rem;
}

.editor-commissions__kpi-icon--green {
  background: #f0fff4;
  color: #276749;
}

.editor-commissions__kpi-icon--orange {
  background: #fffaf0;
  color: #c05621;
}

.editor-commissions__kpi-icon--rate {
  background: #ebf8ff;
  color: #2b6cb0;
}

.editor-commissions__kpi-label {
  padding-left: 2.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #718096;
}

.editor-commissions__kpi-value {
  padding-left: 2.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a202c;
  line-height: 1.2;
}

.editor-commissions__kpi-hint {
  padding-left: 2.35rem;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  color: #a0aec0;
}

.editor-commissions__panel.custom-card {
  background: #fff;
  border: 1px solid #e8ecf1 !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  overflow: hidden;
}

.editor-commissions__panel-head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #edf2f7;
}

.editor-commissions__panel-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1e293b;
}

.editor-commissions__table-scroll {
  margin: 0;
}

.editor-commissions__table {
  margin: 0;
  --bs-table-hover-bg: #f8fafc;
}

.editor-commissions__table thead th {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.65rem 0.85rem;
  white-space: nowrap;
}

.editor-commissions__table tbody td,
.editor-commissions__table tfoot td {
  padding: 0.7rem 0.85rem;
  font-size: 0.8125rem;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.editor-commissions__col-left {
  text-align: left !important;
}

.editor-commissions__col-num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.editor-commissions__col-actions {
  text-align: right !important;
  white-space: nowrap;
}

.editor-commissions__total-row td {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: none;
  color: #1e293b;
}

.editor-commissions__row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.editor-commissions__btn-invoices {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-weight: 500;
}

.editor-commissions__btn-invoices:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.editor-commissions__btn-validate {
  background: #fffaf0;
  border: 1px solid #fbd38d;
  color: #c05621;
  font-weight: 600;
}

.editor-commissions__btn-encode {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  color: #276749;
  font-weight: 600;
}

.editor-commissions__status {
  display: inline-block;
  min-width: 5.5rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.5rem;
  border-radius: 0.35rem;
}

.editor-commissions__status--draft {
  background: #edf2f7 !important;
  color: #4a5568 !important;
}

.editor-commissions__status--to-invoice {
  background: #fffaf0 !important;
  color: #c05621 !important;
  border: 1px solid #fbd38d;
}

.editor-commissions__status--invoiced {
  background: #f0fff4 !important;
  color: #276749 !important;
  border: 1px solid #9ae6b4;
}

@media (max-width: 991.98px) {
  .editor-commissions__kpis {
    grid-template-columns: 1fr;
  }
}

/* —— Facturation (maquette Figma) —— */
.editor-billing {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.editor-billing .custom-card {
  background: #fff;
  border: 1px solid #e8ecf1 !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.editor-billing__kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.editor-billing__kpi .card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  min-height: 6.5rem;
}

.editor-billing__kpi-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.editor-billing__kpi-icon--overdue {
  background: #fff5f5;
  color: #e53e3e;
}

.editor-billing__kpi-icon--sent {
  background: #fffaf0;
  color: #dd6b20;
}

.editor-billing__kpi-icon--revenue {
  background: #f0fff4;
  color: #38a169;
}

.editor-billing__kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a202c;
  line-height: 1.15;
}

.editor-billing__kpi-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.35;
  margin-top: 0.35rem;
}

.editor-billing__panel {
  overflow: visible;
}

.editor-billing__table-scroll {
  overflow-x: auto;
  overflow-y: visible;
}

.editor-billing__actions-cell {
  overflow: visible;
  position: relative;
}

.editor-billing__panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #edf2f7;
}

.editor-billing__panel-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2d3748;
}

.editor-billing__panel-title i {
  color: #4a5568;
  font-size: 1rem;
}

.editor-billing__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.editor-billing__toolbar-search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  height: 2rem;
  padding: 0 0.65rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  min-width: 11rem;
}

.editor-billing__toolbar-search i {
  color: #a0aec0;
  font-size: 0.8rem;
}

.editor-billing__toolbar-search input {
  border: 0;
  background: transparent;
  font-size: 0.8rem;
  min-width: 7rem;
  outline: none;
}

.editor-billing__btn-create {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  height: 2rem;
  padding: 0 1rem;
  border-radius: 999px;
  border: none;
  background: #00a651;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}

.editor-billing__btn-create:hover:not(:disabled),
.editor-billing__btn-create:focus:not(:disabled) {
  background: #009247;
  color: #fff;
}

.editor-billing__btn-create:disabled {
  background: #00a651;
  color: #fff;
  opacity: 0.72;
  cursor: not-allowed;
}

.editor-billing__btn-filters,
.editor-billing__btn-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  height: 2rem;
  padding: 0 0.75rem;
  border-radius: 0.45rem;
  border: none;
  background: #2563eb;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}

.editor-billing__btn-chevron {
  margin-left: 0.15rem;
  font-size: 0.65rem;
  opacity: 0.95;
}

.editor-billing__btn-filters:hover:not(:disabled),
.editor-billing__btn-filters:focus:not(:disabled),
.editor-billing__btn-actions:hover:not(:disabled),
.editor-billing__btn-actions:focus:not(:disabled) {
  background: #1d4ed8;
  color: #fff;
}

.editor-billing__btn-filters:disabled,
.editor-billing__btn-actions:disabled {
  background: #2563eb;
  color: #fff;
  opacity: 0.72;
  cursor: not-allowed;
}

.editor-billing__btn-outline {
  font-size: 0.8rem;
  font-weight: 500;
  background: #fff !important;
  color: #3182ce !important;
  border: 1px solid #bee3f8 !important;
}

.editor-billing__table thead th {
  font-size: 0.78rem;
  font-weight: 600;
  color: #718096;
  white-space: nowrap;
  border-bottom: 1px solid #e2e8f0;
  background: #fafbfc;
  padding: 0.65rem 0.75rem;
}

.editor-billing__table tbody td {
  font-size: 0.875rem;
  color: #2d3748;
  vertical-align: middle;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.editor-billing__table tbody tr.is-selected {
  background: #f7fafc;
}

.editor-billing__col-check {
  width: 2.5rem;
}

.editor-billing__col-actions {
  width: 8.5rem;
}

.editor-billing__serial {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #c53030;
}

.editor-billing__serial i {
  color: #e53e3e;
  opacity: 0.85;
}

.editor-billing__status {
  font-weight: 500;
  font-size: 0.72rem;
  padding: 0.3rem 0.55rem;
  text-transform: lowercase;
  border-radius: 0.35rem;
}

.editor-billing__status--sent {
  background-color: #fffaf0 !important;
  color: #c05621 !important;
  border: 1px solid #fbd38d;
}

.editor-billing__status--overdue {
  background-color: #fff5f5 !important;
  color: #c53030 !important;
  border: 1px solid #feb2b2;
}

.editor-billing__status--paid {
  background-color: #f0fff4 !important;
  color: #276749 !important;
  border: 1px solid #9ae6b4;
}

.editor-billing__status--draft,
.editor-billing__status--cancelled {
  background-color: #edf2f7 !important;
  color: #4a5568 !important;
  border: 1px solid #e2e8f0;
}

.editor-billing__cell-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.editor-billing__cell-with-icon i {
  color: #a0aec0;
  font-size: 0.85rem;
}

.editor-billing__view-group {
  flex-wrap: nowrap;
}

.editor-billing__view-btn {
  font-size: 0.78rem;
  padding: 0.3rem 0.55rem 0.3rem 0.65rem;
  white-space: nowrap;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.editor-billing__view-toggle {
  padding-left: 0.45rem;
  padding-right: 0.45rem;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.editor-billing__consult-btn {
  font-size: 0.78rem;
  padding: 0.3rem 0.55rem 0.3rem 0.65rem;
  white-space: nowrap;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.editor-billing__consult-toggle {
  background: #5b9fd4;
  border-color: #5b9fd4;
  color: #fff;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.editor-billing__consult-toggle:hover,
.editor-billing__consult-toggle:focus {
  background: #4a8fc4;
  border-color: #4a8fc4;
  color: #fff;
}

.editor-billing__view-menu {
  z-index: 1055;
  min-width: 11rem;
  padding: 0.35rem 0;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.editor-billing__view-menu .dropdown-item {
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
}

.editor-billing__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: #fafbfc;
  border-top: 1px solid #edf2f7;
}

.editor-billing__footer-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.editor-billing__range {
  font-size: 0.8rem;
  color: #718096;
}

.editor-billing__page-size {
  width: auto;
  min-width: 6.5rem;
  font-size: 0.8rem;
}

.editor-billing__pagination .page-link {
  font-size: 0.8rem;
  color: #4a5568;
  border-color: #e2e8f0;
  min-width: 2rem;
  text-align: center;
}

.editor-billing__pagination .page-item.active .page-link {
  background: #3182ce;
  border-color: #3182ce;
}

@media (max-width: 991.98px) {
  .editor-billing__kpis {
    grid-template-columns: 1fr;
  }

  .editor-billing__panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .editor-billing__toolbar {
    width: 100%;
  }

  .editor-billing__toolbar-search {
    flex: 1;
  }
}

/* —— Commandes (maquette Figma) —— */
.editor-orders__page-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #2d3748;
  letter-spacing: 0;
}

.editor-orders__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  padding: 0.15rem 0;
}

.editor-orders__toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.editor-orders__search {
  position: relative;
  width: 12.5rem;
}

.editor-orders__search-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa5b1;
  font-size: 0.75rem;
}

.editor-orders__search-input {
  width: 100%;
  height: 1.85rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 0.75rem;
  color: #4a5568;
  padding: 0 0.75rem 0 1.85rem;
}

.editor-orders__search-input::placeholder {
  color: #9aa5b1;
}

.editor-orders__search-input:focus {
  outline: none;
  border-color: #cbd5e0;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2);
}

.editor-orders__filters-btn {
  height: 1.85rem;
  border-radius: 999px;
  background: #f59f0a;
  border: 1px solid #f59f0a;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0 0.7rem;
  line-height: 1;
}

.editor-orders__filters-btn:hover,
.editor-orders__filters-btn:focus {
  background: #e18f00;
  border-color: #e18f00;
  color: #fff;
}

.editor-orders__filters-btn:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.editor-orders__table thead th {
  font-size: 0.8rem;
  font-weight: 600;
  color: #718096;
  white-space: nowrap;
  border-bottom: 1px solid #e2e8f0;
  background: #fafbfc;
}

.editor-orders__table td {
  font-size: 0.875rem;
  vertical-align: middle;
}

.editor-orders__period {
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.4rem 0.55rem;
  white-space: nowrap;
}

.editor-orders__period--pro {
  background-color: var(--editor-sidebar-bg) !important;
  color: #fff !important;
}

.editor-orders__period--free {
  background-color: #38a169 !important;
  color: #fff !important;
}

.editor-orders__period--premium {
  background-color: #553c9a !important;
  color: #fff !important;
}

.editor-orders__period--other {
  background-color: #4a5568 !important;
  color: #fff !important;
}

.editor-orders__name,
.editor-orders__partner {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.editor-orders__view-btn {
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
}

.editor-orders__footer {
  background: #fafbfc;
}

/* —— Fiche entreprise (maquette Figma) —— */
.editor-company-detail__title {
  font-size: 1.35rem;
  font-weight: 600;
  color: #1a202c;
}

.editor-company-detail__type-badge {
  background-color: #2b6cb0 !important;
  color: #fff !important;
  font-weight: 500;
  text-transform: lowercase;
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
}

.editor-company-detail__layout {
  display: grid;
  grid-template-columns: minmax(11rem, 14rem) 1fr;
  gap: 1.25rem;
  align-items: start;
}

.editor-company-detail__subnav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: #fff;
  border-radius: 0.625rem;
  padding: 0.5rem 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.editor-company-detail__subnav-item {
  display: block;
  width: 100%;
  text-align: start;
  border: none;
  background: transparent;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: #4a5568;
  border-radius: 0;
  border-inline-start: 3px solid transparent;
}

.editor-company-detail__subnav-item:hover {
  background: #f7fafc;
  color: #2d3748;
}

.editor-company-detail__subnav-item.is-active {
  background: #edf2f7;
  color: #1a202c;
  font-weight: 600;
  border-inline-start-color: var(--editor-sidebar-accent);
}

.editor-company-detail__panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
}

.editor-company-detail__fields dt {
  color: #718096;
  font-weight: 500;
  font-size: 0.875rem;
}

.editor-company-detail__fields dd {
  color: #2d3748;
  font-size: 0.9rem;
}

.editor-company-detail__table th {
  width: 40%;
  color: #718096;
  font-weight: 500;
  font-size: 0.875rem;
  vertical-align: middle;
  background: transparent;
  border-bottom: 1px solid #edf2f7;
}

.editor-company-detail__table td {
  vertical-align: middle;
  border-bottom: 1px solid #edf2f7;
}

.editor-company-detail__connect-btn {
  background: #fff;
  border: 1px solid #cbd5e0;
  color: #2d3748;
  font-size: 0.8rem;
}

.editor-company-detail__connect-btn:hover {
  background: #f7fafc;
  border-color: #a0aec0;
  color: #1a202c;
}

.editor-company-detail__danger-btn {
  background-color: #742a2a !important;
  border-color: #742a2a !important;
  color: #fff !important;
  white-space: nowrap;
}

.editor-company-detail__danger-btn:disabled {
  opacity: 0.85;
}

.editor-company-detail__plan-pro {
  background-color: var(--editor-sidebar-bg) !important;
  color: #fff !important;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.editor-company-detail__action-row:last-child {
  border-bottom: none !important;
}

@media (max-width: 991.98px) {
  .editor-company-detail__layout {
    grid-template-columns: 1fr;
  }

  .editor-company-detail__subnav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.35rem;
  }

  .editor-company-detail__subnav-item {
    white-space: nowrap;
    border-inline-start: none;
    border-bottom: 3px solid transparent;
  }

  .editor-company-detail__subnav-item.is-active {
    border-bottom-color: var(--editor-sidebar-accent);
  }
}

@media (max-width: 991.98px) {
  .editor-shell.sidebar-toggled .editor-header,
  .editor-shell:not(.sidebar-toggled) .editor-header {
    inset-inline-start: 0 !important;
    width: 100% !important;
  }

  .editor-shell.sidebar-toggled .editor-main-content,
  .editor-shell:not(.sidebar-toggled) .editor-main-content {
    margin-inline-start: 0 !important;
    width: 100% !important;
  }

  .editor-header__inner {
    padding-inline: 1rem;
  }

  .editor-header__search {
    display: none;
  }

  .editor-shell .editor-sidebar .main-sidebar {
    flex: 1 1 auto;
    overflow-y: auto !important;
  }
}

/* Desktop : sidebar éditeur/revendeur toujours visible quand sidebar-toggled (écrase styles.css width:0) */
/* —— Tableau de bord éditeur (maquette Figma) —— */
.editor-shell .editor-main-content:has(.editor-dashboard) {
  padding-top: 0.5rem !important;
}

.editor-shell .editor-main-content:has(.editor-dashboard) .container-fluid {
  padding-inline: 1.25rem;
  max-width: 100%;
}

.editor-dashboard {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.editor-dashboard__tabs {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0 0.35rem;
  list-style: none;
  border: 1px solid #e6ebf2;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.editor-dashboard__tab-item {
  margin: 0;
}

.editor-dashboard__tab-btn {
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0.8rem 1rem;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.editor-dashboard__tab-btn:hover {
  color: #334155;
}

.editor-dashboard__tab-btn.is-active {
  color: #1f2937;
  border-bottom-color: #5b4db8;
}

.editor-dashboard .custom-card {
  background: #fff;
  border: 1px solid #e8ecf1 !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.editor-dashboard__kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
}

.editor-dashboard__kpi .card-body {
  position: relative;
  padding: 0.85rem 0.9rem 0.9rem;
  min-height: 5.5rem;
}

.editor-dashboard__kpi-icon {
  position: absolute;
  top: 0.85rem;
  left: 0.9rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.editor-dashboard__kpi-icon--arr {
  background: #edf2f7;
  color: #718096;
}

.editor-dashboard__kpi-icon--new {
  background: #f0fff4;
  color: #38a169;
}

.editor-dashboard__kpi-icon--year {
  background: #ebf8ff;
  color: #3182ce;
}

.editor-dashboard__kpi-icon--deleted {
  background: #fff5f5;
  color: #e53e3e;
}

.editor-dashboard__kpi-icon--deleted-year {
  background: #fffaf0;
  color: #dd6b20;
}

.editor-dashboard__kpi-icon--resellers {
  background: #faf5ff;
  color: #805ad5;
}

.editor-dashboard__kpi-icon--pro {
  background: #edf2f7;
  color: #2d3748;
}

.editor-dashboard__kpi-icon--premium {
  background: #fffaf0;
  color: #dd6b20;
}

.editor-dashboard__kpi-icon--free {
  background: #f7fafc;
  color: #a0aec0;
}

.editor-dashboard__kpi-icon--revenue {
  background: #f0fff4;
  color: #38a169;
}

/* —— Tableau de bord fiduciaire (maquette) —— */
.editor-dashboard--fiduciary {
  gap: 0.85rem;
}

.editor-dashboard__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  margin-bottom: 0.15rem;
}

.editor-dashboard__breadcrumb-parent {
  color: #94a3b8;
}

.editor-dashboard__breadcrumb-sep {
  color: #cbd5e0;
}

.editor-dashboard__breadcrumb-current {
  color: #4a5568;
  font-weight: 500;
}

.editor-dashboard__kpis--partner {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.editor-dashboard--reseller {
  gap: 0.85rem;
}

.editor-dashboard__partners-title {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: #2d3748;
}

.editor-dashboard__partners-title i {
  color: #4a5568;
}

.editor-dashboard__plan-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  margin-inline-end: 0.45rem;
  vertical-align: middle;
}

.editor-dashboard__plan-dot--premium {
  background: #ff8c42;
}

.editor-dashboard__plan-dot--pro {
  background: #2d3748;
}

.editor-dashboard__plan-dot--free {
  background: #cbd5e0;
}

.editor-dashboard__plan-table-card .card-body {
  padding: 1rem 1.1rem;
}

@media (max-width: 1399.98px) {
  .editor-dashboard__kpis--partner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .editor-dashboard__kpis--partner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .editor-dashboard__kpis--partner {
    grid-template-columns: 1fr;
  }
}

.editor-dashboard__kpi-label {
  padding-left: 2.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #718096;
  line-height: 1.2;
}

.editor-dashboard__kpi-value {
  padding-left: 2.35rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a202c;
  line-height: 1.15;
  margin-top: 0.1rem;
}

.editor-dashboard__kpi-delta {
  padding-left: 2.35rem;
  font-size: 0.7rem;
  margin-top: 0.15rem;
}

.editor-dashboard__kpi-delta.is-positive {
  color: #38a169;
}

.editor-dashboard__kpi-delta.is-negative {
  color: #e53e3e;
}

.editor-dashboard__kpi-delta.is-neutral {
  color: #a0aec0;
}

.editor-dashboard__plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.editor-dashboard__plan .card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
}

.editor-dashboard__plan-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.editor-dashboard__plan-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.editor-dashboard__plan--premium .editor-dashboard__plan-icon {
  background: #fffaf0;
  color: #dd6b20;
}

.editor-dashboard__plan--pro .editor-dashboard__plan-icon {
  background: #edf2f7;
  color: #1a202c;
}

.editor-dashboard__plan--free .editor-dashboard__plan-icon {
  background: #f7fafc;
  color: #a0aec0;
}

.editor-dashboard__plan-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #718096;
}

.editor-dashboard__plan-count {
  font-size: 1.55rem;
  font-weight: 700;
  color: #1a202c;
  line-height: 1.15;
}

.editor-dashboard__plan-sub {
  font-size: 0.78rem;
  color: #a0aec0;
  margin-top: 0.05rem;
}

.editor-dashboard__plan-revenue {
  text-align: end;
  flex-shrink: 0;
}

.editor-dashboard__plan-revenue-label {
  display: block;
  font-size: 0.72rem;
  color: #a0aec0;
}

.editor-dashboard__plan-revenue-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a202c;
  line-height: 1.2;
}

.editor-dashboard__plan--premium .editor-dashboard__plan-revenue-value {
  color: #dd6b20;
}

.editor-dashboard__section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 0.85rem;
}

.editor-dashboard__chart-card .card-body {
  padding: 1rem 1.1rem 0.65rem;
}

.editor-dashboard__chart-host {
  width: 100%;
  min-height: 300px;
}

.editor-dashboard__chart-host .highcharts-title,
.editor-dashboard__chart-host .highcharts-subtitle {
  display: none !important;
}

.editor-dashboard__empty {
  color: #a0aec0;
  font-size: 0.875rem;
  padding: 2rem 0;
  text-align: center;
}

.editor-dashboard__partners-card .card-body,
.editor-dashboard__partners-head {
  padding-inline: 1rem;
}

.editor-dashboard__partners-table thead th {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #97a3b6;
  border-bottom: 1px solid #edf2f7;
  white-space: nowrap;
}

.editor-dashboard__partners-table tbody td {
  font-size: 0.84rem;
  color: #334155;
  border-bottom: 1px solid #eff3f8;
  padding-block: 0.72rem;
  white-space: nowrap;
}

.editor-dashboard__partners-table tbody tr:hover {
  background: #fbfcfe;
}

.editor-dashboard__name-col {
  color: #1f2937;
}

.editor-dashboard__entity-link {
  color: inherit;
  text-decoration: none;
}

.editor-dashboard__entity-link--action {
  color: #0f766e;
  font-weight: 600;
  cursor: pointer;
}

.editor-dashboard__entity-link--action:hover {
  color: #0d9488;
  text-decoration: underline;
}

.editor-dashboard__entity-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

.editor-dashboard__money-col {
  font-weight: 600;
  color: #3a4758;
}

.editor-dashboard__money-col--accent {
  color: #e08a2c;
}

.editor-dashboard__money-col--strong {
  color: #0f766e;
}

.editor-dashboard__total-row td {
  background: #fafcff;
  border-top: 1px solid #e7edf5;
}

.editor-dashboard__bottom {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 0.65rem;
}

.editor-dashboard__table thead th {
  font-size: 0.68rem;
  font-weight: 600;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #edf2f7;
  background: transparent;
  padding-bottom: 0.55rem;
}

.editor-dashboard__table tbody td {
  font-size: 0.875rem;
  color: #2d3748;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  padding-block: 0.8rem;
}

.editor-dashboard__plan-name {
  font-weight: 600;
  color: #1a202c;
}

.editor-dashboard__part-col {
  width: 38%;
}

.editor-dashboard__share {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.editor-dashboard__share span {
  font-size: 0.8rem;
  color: #4a5568;
  min-width: 2.25rem;
  text-align: end;
}

.editor-dashboard__share-bar {
  flex: 1;
  height: 0.3rem;
  background: #edf2f7;
  border-radius: 999px;
  overflow: hidden;
}

.editor-dashboard__share-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 2px;
}

.editor-dashboard__share-fill--premium {
  background: #ff8c42;
}

.editor-dashboard__share-fill--pro {
  background: #2d3748;
}

.editor-dashboard__share-fill--free {
  background: #cbd5e0;
}

.editor-dashboard__support-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.25rem;
}

.editor-dashboard__support-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #4a5568;
  margin-bottom: 0.35rem;
}

.editor-dashboard__support-head strong {
  color: #1a202c;
  font-weight: 600;
}

.editor-dashboard__support-bar {
  height: 0.4rem;
  background: #edf2f7;
  border-radius: 999px;
  overflow: hidden;
}

.editor-dashboard__support-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 2px;
}

.editor-dashboard__support-fill--asked {
  background: #4299e1;
}

.editor-dashboard__support-fill--answered {
  background: #48bb78;
}

.editor-dashboard__support-fill--archived {
  background: #a0aec0;
}

.editor-dashboard__support-rate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #4a5568;
  margin-top: auto;
  padding-top: 0.25rem;
}

.editor-dashboard__support-rate strong {
  color: #38a169;
  font-size: 0.95rem;
  font-weight: 700;
}

@media (max-width: 1399.98px) {
  .editor-dashboard__kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .editor-dashboard__kpis,
  .editor-dashboard__plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-dashboard__bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .editor-dashboard__kpis,
  .editor-dashboard__plans {
    grid-template-columns: 1fr;
  }

  .editor-dashboard__plan .card-body {
    flex-direction: column;
    align-items: flex-start;
  }

  .editor-dashboard__plan-revenue {
    text-align: start;
  }

  .editor-dashboard__tabs {
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    gap: 0;
  }
}

@media (min-width: 992px) {
  .page.editor-shell.sidebar-toggled .editor-sidebar.app-sidebar,
  .page.editor-shell.sidebar-toggled .editor-sidebar.app-sidebar.show,
  .page.editor-shell.sidebar-toggled .editor-sidebar.app-sidebar:not(.show) {
    width: var(--editor-sidebar-width) !important;
    min-width: var(--editor-sidebar-width) !important;
    overflow: visible !important;
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }

/* Blazored.Modal 7 — conteneur .bm-container (signup-page : fond fixe, carte relative centrée) */
.bm-container.company-dossier-blazored-overlay,
.bm-container:has(.company-dossier-modal-dialog),
.bm-container:has(.platform-partner-create-modal-dialog),
.bm-container:has(.platform-modal-compact-dialog),
.bm-container.payment-card-modal-overlay,
.bm-container:has(.payment-card-modal-dialog) {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: grid !important;
  place-items: center !important;
  padding: 24px !important;
  overflow-y: auto !important;
  z-index: 10050 !important;
  background: rgba(17, 24, 39, 0.55) !important;
}

/* Wrapper Blazored transparent — la carte signup-modal porte le style */
.bm-container:has(.company-dossier-modal-dialog) .blazored-modal,
.bm-container:has(.platform-partner-create-modal-dialog) .blazored-modal,
.bm-container:has(.platform-modal-compact-dialog) .blazored-modal,
.bm-container:has(.payment-card-modal-dialog) .blazored-modal,
.blazored-modal.company-dossier-blazored {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  width: auto !important;
  max-width: none !important;
}

/* Dossier entreprise : champs Bootstrap alignés sur signup-modal (app.css) */
.signup-modal.company-dossier-modal-dialog .form-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #2f3a54;
}

.signup-modal.company-dossier-modal-dialog .form-control,
.signup-modal.company-dossier-modal-dialog .form-select {
  border: 1px solid #ccd5e4;
  border-radius: 9px;
  padding: 9px 12px;
  min-height: 42px;
  background: #fbfcfe;
  color: #1f2b47;
  box-shadow: none;
  font-size: 0.9rem;
}

.signup-modal.company-dossier-modal-dialog .form-control:focus,
.signup-modal.company-dossier-modal-dialog .form-select:focus {
  border-color: #8ea8d9;
  box-shadow: 0 0 0 0.15rem rgba(33, 101, 255, 0.15);
}

.signup-modal.company-dossier-modal-dialog .form-text,
.signup-modal.company-dossier-modal-dialog small.text-muted,
.signup-modal.company-dossier-modal-dialog small {
  display: block;
  margin-top: 4px;
  color: #6c7a94;
  font-size: 11px;
}

.signup-modal.company-dossier-modal-dialog .row.g-3 {
  --bs-gutter-x: 14px;
  --bs-gutter-y: 12px;
  margin-bottom: 0;
}

/* Modals plateforme (fiduciaire, revendeur, etc.) — hors signup-modal */
.modal.show .company-dossier-modal-dialog:not(.signup-modal),
.blazored-modal .company-dossier-modal-dialog:not(.signup-modal),
.company-dossier-modal-dialog:not(.signup-modal) {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 100%;
  max-width: 800px;
  max-height: calc(100vh - 2rem);
  margin: auto !important;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  z-index: 1060;
}

.company-dossier-modal-dialog.platform-modal-compact-dialog {
  max-width: 520px;
  width: min(520px, calc(100vw - 2rem));
}

.platform-partner-create-modal-dialog {
  max-width: 920px;
  width: min(920px, calc(100vw - 2rem));
}

.company-dossier-modal-content {
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(30, 42, 90, 0.16);
}

.platform-modal-compact-dialog .company-dossier-modal-content {
  max-height: none;
}

.platform-modal-compact-dialog .modal-header {
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 1px solid #eef1f6;
}

.platform-modal-compact-dialog .modal-body {
  padding: 0.25rem 1.5rem 1rem;
}

.platform-modal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.25rem;
  border-top: 1px solid #eef1f6;
  background: #f8f9fb;
  border-radius: 0 0 12px 12px;
}

.platform-modal-footer .btn {
  min-width: 7.5rem;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  border-radius: 8px;
}

.platform-modal-footer .btn-primary {
  background: linear-gradient(135deg, #7c5cbf 0%, #5b4db8 100%);
  border: none;
}

.platform-modal-footer .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #6e4fb0 0%, #4f42a8 100%);
  border: none;
}

.platform-modal-hint {
  color: #6c757d;
  font-size: 0.8125rem;
  line-height: 1.4;
  margin-top: 0.35rem;
}

.company-dossier-modal-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  max-height: 100%;
  overflow: hidden;
}

.company-dossier-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.company-dossier-modal-dialog:not(.signup-modal) .modal-footer {
  flex-shrink: 0;
}

.company-dossier-modal-dialog:not(.signup-modal) .modal-title {
  color: #1e2a5a;
  font-size: 1.05rem;
  letter-spacing: 0.1px;
}

.company-dossier-modal-dialog:not(.signup-modal) .modal-header {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid #edf1f7;
}

.company-dossier-modal-dialog:not(.signup-modal) .form-label {
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #28334d;
}

.company-dossier-modal-dialog:not(.signup-modal) .form-control,
.company-dossier-modal-dialog:not(.signup-modal) .form-select {
  min-height: 2.3rem;
  border-radius: 8px;
  border-color: #d9e2ef;
  font-size: 0.87rem;
  box-shadow: none;
}

.company-dossier-modal-dialog:not(.signup-modal) textarea.form-control {
  min-height: 5.25rem;
  resize: vertical;
}

.company-dossier-modal-dialog:not(.signup-modal) .form-control:focus,
.company-dossier-modal-dialog:not(.signup-modal) .form-select:focus {
  border-color: #8f78cd;
  box-shadow: 0 0 0 0.16rem rgba(124, 92, 191, 0.16);
}

.company-dossier-modal-dialog:not(.signup-modal) .row.g-3 {
  --bs-gutter-x: 0.85rem;
  --bs-gutter-y: 0.65rem;
}

.company-dossier-modal-dialog:not(.signup-modal) .form-text {
  font-size: 0.74rem;
  color: #6f7b90;
}

.company-dossier-modal-dialog:not(.signup-modal) .validation-message {
  font-size: 0.74rem;
  margin-top: 0.2rem;
}

/* Formulaire création compte partenaire (fiduciaire / maquette Figma) */
.platform-create-account {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  max-width: 920px;
  margin: 0 auto 1.5rem;
}

.platform-create-account__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
}

.platform-create-account__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1e2a5a;
}

.platform-create-account__close {
  color: #6c757d;
  font-size: 1.25rem;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
}

.platform-create-account__body {
  padding: 1.25rem 1.5rem 0.5rem;
}

.platform-create-account__section {
  margin-bottom: 1.75rem;
  border: 1px solid #edf1f7;
  border-radius: 10px;
  padding: 0.9rem 0.9rem 1rem;
  background: #fbfcff;
}

.platform-create-account__section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e2a5a;
  margin-bottom: 1rem;
}

.platform-create-account__hint {
  color: #6c757d;
  font-size: 0.875rem;
  margin: -0.5rem 0 1rem;
}

.platform-create-account__footer {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid #e9ecef;
}

.platform-create-account__btn-back {
  flex: 1;
  background: #5b9fd4;
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

.platform-create-account__btn-back:hover {
  background: #4a8fc4;
  color: #fff;
}

.platform-create-account__btn-submit {
  flex: 1;
  background: linear-gradient(135deg, #7c5cbf 0%, #5b4db8 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

.platform-create-account__btn-submit:hover:not(:disabled) {
  color: #fff;
  opacity: 0.95;
}

.platform-create-account__btn-submit:disabled {
  opacity: 0.65;
}

  .page.editor-shell.sidebar-toggled .editor-sidebar .main-sidebar-header {
    width: var(--editor-sidebar-width) !important;
    max-width: var(--editor-sidebar-width) !important;
  }
}

/* —— Liste Entreprises (éléments maquette) —— */
.platform-companies__toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 1rem;
  width: 100%;
}

.platform-companies__toolbar-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.platform-companies__toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.platform-companies__toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
}

.platform-companies__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #2d3748;
  flex-shrink: 0;
  white-space: nowrap;
}

.platform-companies__toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-shrink: 0;
}

.platform-companies__select-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.platform-companies__select {
  width: auto;
  min-width: 6.5rem;
  height: 2rem;
  padding: 0 1.75rem 0 0.65rem;
  font-size: 0.8rem;
  line-height: 2rem;
  color: #2d3748;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.platform-companies__select-chevron {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.7rem;
  color: #64748b;
}

.platform-companies__search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 22rem;
  max-width: 30rem;
  min-width: 11rem;
  height: 2rem;
  margin: 0;
  padding: 0 0.75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.45rem;
  cursor: text;
}

.platform-companies__search-icon {
  color: #94a3b8;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.platform-companies__search-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  font-size: 0.82rem;
  line-height: 2rem;
  color: #2d3748;
  outline: none;
  box-shadow: none;
}

.platform-companies__search-input::placeholder {
  color: #a0aec0;
}

.platform-companies__search-input:focus {
  outline: none;
  box-shadow: none;
}

.platform-companies__btn-filters {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  height: 2rem;
  padding: 0 0.72rem;
  border-radius: 0.42rem;
  background: #ff9b46;
  border-color: #ff9b46;
  color: #fff;
  font-weight: 600;
  font-size: 0.78rem;
  line-height: 1;
}

.platform-companies__btn-filters:hover {
  background: #f18c36;
  border-color: #f18c36;
  color: #fff;
}

/* Commandes: garder le header sur une seule ligne */
.platform-orders__toolbar {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

.platform-orders__toolbar .platform-companies__toolbar-left {
  flex: 0 0 auto;
  min-width: auto;
}

.platform-orders__toolbar .platform-companies__toolbar-actions {
  flex: 1 1 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.platform-companies__btn-archive {
  display: inline-flex;
  align-items: center;
  height: 2rem;
  background: #fff;
  border-color: #e2e8f0;
  color: #475569;
  font-size: 0.78rem;
  padding: 0 0.75rem;
  border-radius: 0.4rem;
}

.platform-companies__btn-create {
  display: inline-flex;
  align-items: center;
  height: 2rem;
  background: #5b4db8;
  border-color: #5b4db8;
  color: #fff;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0 0.75rem;
  border-radius: 0.4rem;
}

.platform-companies__btn-create:hover {
  background: #4a3fa0;
  border-color: #4a3fa0;
  color: #fff;
}

.platform-companies__card {
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 0.5rem;
  overflow: hidden;
}

.platform-companies__table thead th {
  background: #f7f9fc;
  border-bottom: 1px solid #e8ecf1;
  color: #5f7188;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 0.68rem 0.85rem;
  white-space: nowrap;
}

.platform-companies__table tbody td {
  padding: 0.72rem 0.85rem;
  font-size: 0.86rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.platform-companies__sort-icon {
  font-size: 0.65rem;
  color: #8c9aae;
  vertical-align: middle;
}

.platform-companies__col-plan {
  width: 8.8rem;
}

.platform-companies__col-name {
  min-width: 14rem;
}

.platform-companies__name {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.platform-companies__name i {
  width: 1.65rem;
  height: 1.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f1f4f8;
  color: #9aa9bd;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.platform-companies__plan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 5.75rem;
  width: 5.75rem;
  max-width: 5.75rem;
  min-height: 1.65rem;
  padding: 0.25rem 0.35rem;
  border-radius: 0.62rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  border: 1px solid transparent;
}

.platform-companies__plan--premium {
  background: #fff6ed;
  color: #f28a32;
  border-color: #f6c08e;
}

.platform-companies__plan--pro {
  background: #e9edf3;
  color: #253a56;
  border-color: #9aa8ba;
}

.platform-companies__plan--free {
  background: #f0f2f5;
  color: #6f7e90;
  border-color: #d6dde7;
}

.platform-companies__plan--trial {
  background: #eef6ff;
  color: #336fa8;
  border-color: #bfd7ef;
}

.platform-companies__plan--starter {
  background: #eef6ff;
  color: #336fa8;
  border-color: #bfd7ef;
}

.platform-companies__plan--business {
  background: #eefcf3;
  color: #2f8a58;
  border-color: #bde6cb;
}

.platform-companies__plan--enterprise {
  background: #f3efff;
  color: #6541b2;
  border-color: #d7c9fa;
}

.platform-companies__plan--default {
  background: #f0f2f5;
  color: #7a8796;
  border-color: #d8dee7;
}

.platform-companies__actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.platform-companies__actions-cell {
  min-width: 15.5rem;
}

.platform-companies__btn-consult {
  background: #5b9fd4;
  border-color: #5b9fd4;
  color: #fff;
  font-weight: 600;
  font-size: 0.72rem;
  line-height: 1.2;
  padding: 0.28rem 0.55rem;
  border-radius: 0.35rem;
}

.platform-companies__btn-consult:hover {
  background: #4a8fc4;
  border-color: #4a8fc4;
  color: #fff;
}

.platform-companies__btn-open {
  background: #22a06b;
  border-color: #22a06b;
  color: #fff;
  font-weight: 600;
  font-size: 0.72rem;
  line-height: 1.2;
  padding: 0.28rem 0.55rem;
  border-radius: 0.35rem;
}

.platform-companies__btn-open:hover {
  background: #1d8f5f;
  border-color: #1d8f5f;
  color: #fff;
}

.platform-companies__btn-compta {
  background: #5b4fc7;
  border-color: #5b4fc7;
  color: #fff;
  font-weight: 600;
  font-size: 0.72rem;
  line-height: 1.2;
  padding: 0.28rem 0.55rem;
  border-radius: 0.35rem;
}

.platform-companies__btn-compta:hover {
  background: #4f44b8;
  border-color: #4f44b8;
  color: #fff;
}

