body.mmsaas-menu-editor-page {
  background: #f3f4f6;
  margin: 0;
  --cmg-editor-radius: 12px;
  --cmg-editor-radius-sm: 10px;
  --cmg-editor-border: rgba(107, 46, 0, 0.12);
  --cmg-editor-border-focus: rgba(255, 133, 0, 0.55);
  --cmg-editor-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  --cmg-editor-shadow-focus: 0 0 0 3px rgba(255, 133, 0, 0.14);
  --cmg-editor-surface: #ffffff;
  --cmg-editor-muted: #6b7280;
  --cmg-editor-text: #1f2937;
  --cmg-editor-accent: #ff8500;
  --cmg-editor-brand: #6b2e00;
}

.cmg-client-shell {
  min-height: 100vh;
  background: #f6f7f7;
}

.cmg-client-shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid rgba(31, 41, 55, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.cmg-client-shell-brand {
  font-weight: 800;
  color: #6b2e00;
  text-decoration: none;
}

.cmg-client-shell-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cmg-client-empty-notice {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #fff9f3;
  border: 1px solid rgba(255, 133, 0, 0.2);
}

.cmg-client-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  background: var(--cmg-editor-surface);
  border: 1px solid var(--cmg-editor-border);
  border-radius: 16px;
  box-shadow: var(--cmg-editor-shadow);
}

.cmg-client-menu-title {
  width: 100%;
  max-width: 420px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--cmg-editor-brand);
  border: 0;
  background: transparent;
  padding: 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease;
}

.cmg-client-menu-title:focus {
  outline: none;
  border-bottom-color: rgba(255, 133, 0, 0.45);
}

.cmg-client-toolbar-meta {
  margin: 0.35rem 0 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.cmg-client-toolbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.cmg-client-feedback {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

.cmg-client-feedback.is-success {
  color: #15803d;
}

.cmg-client-feedback.is-error {
  color: #b91c1c;
}

body.mmsaas-menu-editor-page .cmg-client-builder-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

body.mmsaas-menu-editor-page .cmg-builder,
body.mmsaas-menu-editor-page .cmg-builder-section,
body.mmsaas-menu-editor-page .cmg-catalog-inline,
body.mmsaas-menu-editor-page .cmg-catalog-table {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.cmg-client-builder-wrap .cmg-builder {
  max-width: none;
}

body.mmsaas-menu-editor-page .container.mmsaas-menu-editor-page {
  width: min(1180px, 100%);
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

/* ---- Layout compact catégories & produits ---- */

body.mmsaas-menu-editor-page .cmg-category,
body.mmsaas-menu-editor-page .cmg-item.cmg-item--compact {
  max-width: 100%;
  overflow: visible;
}

body.mmsaas-menu-editor-page .cmg-item:not(.cmg-item--compact) {
  overflow: hidden;
}

body.mmsaas-menu-editor-page .cmg-category-body,
body.mmsaas-menu-editor-page .cmg-item-body {
  gap: 10px;
  padding: 10px 12px 12px;
  overflow: visible;
}

body.mmsaas-menu-editor-page .cmg-category-identity,
body.mmsaas-menu-editor-page .cmg-item-identity {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}

body.mmsaas-menu-editor-page .cmg-category-identity {
  padding-bottom: 10px;
}

body.mmsaas-menu-editor-page .cmg-media-field--inline {
  flex: 0 0 76px;
  width: 76px;
}

body.mmsaas-menu-editor-page .cmg-media-card--inline {
  width: 76px;
  max-width: 76px;
  gap: 4px;
}

body.mmsaas-menu-editor-page .cmg-media-card--inline .cmg-media-preview {
  width: 64px;
  height: 64px;
}

body.mmsaas-menu-editor-page .cmg-media-card--inline .cmg-media-actions {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
}

body.mmsaas-menu-editor-page .cmg-media-card--inline .cmg-media-actions .cmg-btn {
  width: auto;
  min-width: 0;
  padding: 3px 5px;
  font-size: 0;
  gap: 0;
}

body.mmsaas-menu-editor-page .cmg-media-card--inline .cmg-media-actions .cmg-btn .cmg-icon {
  font-size: 13px;
  width: 13px;
  height: 13px;
}

body.mmsaas-menu-editor-page .cmg-category-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 6px 10px;
  flex: 1;
  min-width: 0;
  align-items: start;
}

body.mmsaas-menu-editor-page .cmg-item-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

body.mmsaas-menu-editor-page .cmg-item-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px auto;
  gap: 8px;
  align-items: center;
}

body.mmsaas-menu-editor-page .cmg-item-title-row .cmg-input--title {
  flex: none;
  width: 100%;
  min-width: 0;
  max-width: none;
}

body.mmsaas-menu-editor-page .cmg-input--price {
  width: 100%;
  max-width: 96px;
  flex: none;
}

body.mmsaas-menu-editor-page .cmg-category-fields .cmg-input--subtle {
  resize: none;
  min-height: 40px;
  max-height: 72px;
}

body.mmsaas-menu-editor-page .cmg-item-description {
  min-height: 72px;
  max-height: 120px;
  resize: vertical;
}

body.mmsaas-menu-editor-page .cmg-highlight-check--inline {
  justify-self: end;
  white-space: nowrap;
}

body.mmsaas-menu-editor-page .cmg-field-section--pickers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.mmsaas-menu-editor-page .cmg-picker-block {
  min-width: 0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

body.mmsaas-menu-editor-page .cmg-picker-block--ingredients {
  border-color: #86efac;
  background: #fff;
}

body.mmsaas-menu-editor-page .cmg-picker-block--supplements {
  border-color: #93c5fd;
  background: #fff;
}

body.mmsaas-menu-editor-page .cmg-picker-toggle {
  padding: 8px 10px;
  border: 0;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
}

body.mmsaas-menu-editor-page .cmg-picker-block--ingredients .cmg-picker-toggle {
  background: #f0fdf4;
  color: #15803d;
}

body.mmsaas-menu-editor-page .cmg-picker-block--supplements .cmg-picker-toggle {
  background: #eff6ff;
  color: #1d4ed8;
}

body.mmsaas-menu-editor-page .cmg-picker-body {
  padding: 8px 10px 10px;
}

body.mmsaas-menu-editor-page .cmg-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.mmsaas-menu-editor-page .cmg-picker-check {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

body.mmsaas-menu-editor-page .cmg-picker-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

body.mmsaas-menu-editor-page .cmg-picker-check > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  color: #374151;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

body.mmsaas-menu-editor-page .cmg-picker-check:hover > span {
  border-color: #d1d5db;
  background: #f9fafb;
}

body.mmsaas-menu-editor-page .cmg-picker-block--ingredients .cmg-picker-check > span {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

body.mmsaas-menu-editor-page .cmg-picker-block--ingredients .cmg-picker-check:hover > span {
  border-color: #86efac;
  background: #ecfdf5;
}

body.mmsaas-menu-editor-page .cmg-picker-block--ingredients .cmg-picker-check:has(input:checked) > span {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.22);
}

body.mmsaas-menu-editor-page .cmg-picker-block--supplements .cmg-picker-check > span {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}

body.mmsaas-menu-editor-page .cmg-picker-block--supplements .cmg-picker-check:hover > span {
  border-color: #93c5fd;
  background: #dbeafe;
}

body.mmsaas-menu-editor-page .cmg-picker-block--supplements .cmg-picker-check:has(input:checked) > span {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.22);
}

body.mmsaas-menu-editor-page .cmg-picker-check:has(input:checked) > span::before {
  content: "✓";
  display: inline-block;
  width: 11px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

body.mmsaas-menu-editor-page .cmg-picker-check:has(input:focus-visible) > span {
  outline: 2px solid rgba(255, 133, 0, 0.45);
  outline-offset: 2px;
}

body.mmsaas-menu-editor-page .cmg-picker-check small {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.95;
}

body.mmsaas-menu-editor-page .cmg-picker-block--supplements .cmg-picker-check:not(:has(input:checked)) small {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

body.mmsaas-menu-editor-page .cmg-picker-empty {
  font-size: 11px;
  line-height: 1.4;
}

body.mmsaas-menu-editor-page .cmg-count-badge {
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35rem;
}

body.mmsaas-menu-editor-page .cmg-picker-block--ingredients .cmg-count-badge.has-value {
  background: #16a34a;
  border-color: #16a34a;
}

body.mmsaas-menu-editor-page .cmg-picker-block--supplements .cmg-count-badge.has-value {
  background: #2563eb;
  border-color: #2563eb;
}

body.mmsaas-menu-editor-page .cmg-category-products {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

body.mmsaas-menu-editor-page .cmg-subcategories-section,
body.mmsaas-menu-editor-page .cmg-category-products-heading,
body.mmsaas-menu-editor-page .cmg-category-products > .cmg-items,
body.mmsaas-menu-editor-page .cmg-category-products > .cmg-inline-action,
body.mmsaas-menu-editor-page .cmg-category-products > .cmg-add-item--compact {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
}

body.mmsaas-menu-editor-page .cmg-subcategories-toolbar {
  top: 0;
  padding: 6px 0 8px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--cmg-editor-surface, #fff) 96%, transparent) 70%,
    transparent
  );
}

body.mmsaas-menu-editor-page .cmg-subcategories {
  gap: 10px;
}

body.mmsaas-menu-editor-page .cmg-subcategory {
  border-radius: 12px;
  border-style: solid;
  border-color: color-mix(in srgb, var(--cmg-editor-brand, #ff8500) 22%, var(--cmg-editor-border, #e2e8f0));
  background: color-mix(in srgb, var(--cmg-editor-brand, #ff8500) 4%, #fff);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

body.mmsaas-menu-editor-page .cmg-items--compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

body.mmsaas-menu-editor-page .cmg-item--compact {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin: 0;
  position: relative;
}

body.mmsaas-menu-editor-page .cmg-item--compact .cmg-item-drag-handle {
  position: absolute;
  top: 6px;
  inset-inline-start: 6px;
  z-index: 4;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
  border-color: rgba(255, 255, 255, 0.85);
}

body.mmsaas-menu-editor-page .cmg-item--compact .cmg-item-drag-handle .cmg-category-drag-grip {
  width: 11px;
  gap: 2px;
}

body.mmsaas-menu-editor-page .cmg-item--compact.is-dragging .cmg-item-tile {
  transform: scale(0.96);
  opacity: 0.35;
}

body.mmsaas-menu-editor-page .cmg-items--compact.is-item-drop-over {
  min-height: 5.5rem;
}

body.mmsaas-menu-editor-page .cmg-item--compact .cmg-item-header {
  display: none;
}

body.mmsaas-menu-editor-page .cmg-item-tile {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-height: 118px;
  padding: 0;
  border: 1px solid rgba(107, 46, 0, 0.12);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  text-align: start;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

body.mmsaas-menu-editor-page .cmg-item-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 133, 0, 0.35);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

body.mmsaas-menu-editor-page .cmg-item-tile-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  overflow: hidden;
}

body.mmsaas-menu-editor-page .cmg-item-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.mmsaas-menu-editor-page .cmg-item-tile-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #94a3b8;
  font-size: 1.35rem;
}

body.mmsaas-menu-editor-page .cmg-item-tile-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 8px 9px;
  min-width: 0;
}

body.mmsaas-menu-editor-page .cmg-item-tile-title {
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
  color: #6b2e00;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.mmsaas-menu-editor-page .cmg-item-tile-meta .cmg-item-price-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: #ff8500;
  padding: 0;
  background: transparent;
  border: 0;
}

body.mmsaas-menu-editor-page .cmg-item-tile-star {
  align-self: flex-start;
  margin-top: 2px;
  padding: 2px 5px;
  font-size: 0;
}

body.mmsaas-menu-editor-page .cmg-add-item--compact {
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  border: 1px dashed rgba(107, 46, 0, 0.22);
  border-radius: 14px;
  background: rgba(255, 249, 243, 0.7);
  color: #ff8500;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: none;
}

body.mmsaas-menu-editor-page .cmg-add-item--compact:hover {
  background: #fff;
  border-color: rgba(255, 133, 0, 0.45);
  color: #e67700;
}

body.mmsaas-menu-editor-page .cmg-item-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

body.mmsaas-menu-editor-page .cmg-item-modal[hidden] {
  display: none;
}

body.mmsaas-menu-editor-page .cmg-item-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

body.mmsaas-menu-editor-page .cmg-item-modal-dialog {
  position: relative;
  width: min(100%, 560px);
  height: min(88dvh, 720px);
  max-height: min(88dvh, 720px);
  margin: auto;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(107, 46, 0, 0.12);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

body.mmsaas-menu-editor-page .cmg-item-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--cmg-editor-border);
  background: linear-gradient(180deg, #fff9f3 0%, #fff 100%);
}

body.mmsaas-menu-editor-page .cmg-item-modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--cmg-editor-brand);
}

body.mmsaas-menu-editor-page .cmg-item-modal-close {
  appearance: none;
  border: 0;
  background: #fff;
  color: #64748b;
  width: 36px;
  height: 36px;
  border-radius: var(--cmg-editor-radius-sm);
  border: 1px solid var(--cmg-editor-border);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

body.mmsaas-menu-editor-page .cmg-item-modal-close:hover {
  background: #f8fafc;
  color: var(--cmg-editor-brand);
}

body.mmsaas-menu-editor-page .cmg-item-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  overflow-anchor: none;
  padding: 18px;
  background: #fafafa;
  display: block;
  gap: 12px;
}

body.mmsaas-menu-editor-page .cmg-item-modal-body .cmg-picker-check input {
  scroll-margin: 0;
}

body.mmsaas-menu-editor-page .cmg-item--compact.is-collapsed .cmg-item-modal:not([hidden]) {
  display: flex;
}

body.mmsaas-menu-editor-page .cmg-item--compact.is-editing {
  overflow: visible;
  z-index: 1;
}

body.mmsaas-menu-editor-page .cmg-category:has(.cmg-item.is-editing) {
  overflow: visible;
}

body.mmsaas-menu-editor-page .cmg-item-modal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--cmg-editor-border);
  background: #fff;
}

body.mmsaas-menu-editor-page .cmg-btn--done {
  background: var(--cmg-editor-accent);
  color: #fff;
  border: 1px solid var(--cmg-editor-accent);
  border-radius: var(--cmg-editor-radius-sm);
  padding: 10px 18px;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 6px 16px rgba(255, 133, 0, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body.mmsaas-menu-editor-page .cmg-btn--done:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(255, 133, 0, 0.28);
}

body.cmg-item-modal-open {
  overflow: hidden;
}

body.cmg-item-modal-open .cmg-subcategories-toolbar {
  visibility: hidden;
  pointer-events: none;
}

body.cmg-item-modal-open .cmg-item--compact.is-editing {
  z-index: 1300;
  position: relative;
}

body.mmsaas-menu-editor-page .cmg-inline-action {
  margin-top: 2px;
}

body.mmsaas-menu-editor-page .cmg-inline-action .cmg-btn-action {
  padding: 6px 12px;
  min-height: 34px;
}

/* ---- Catalogue ingrédients & suppléments ---- */

body.mmsaas-menu-editor-page .cmg-catalog-inline {
  gap: 8px;
}

body.mmsaas-menu-editor-page .cmg-catalog-table {
  gap: 6px;
}

body.mmsaas-menu-editor-page .cmg-catalog-row--head {
  display: none;
}

body.mmsaas-menu-editor-page .cmg-catalog-row--ingredient,
body.mmsaas-menu-editor-page .cmg-catalog-row--supplement {
  display: grid;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(31, 41, 55, 0.08);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.mmsaas-menu-editor-page .cmg-catalog-row--ingredient {
  grid-template-columns: minmax(0, 1.4fr) minmax(72px, 0.7fr) minmax(72px, 0.7fr) auto auto;
}

body.mmsaas-menu-editor-page .cmg-catalog-row--supplement {
  grid-template-columns: minmax(0, 1.2fr) minmax(64px, 0.6fr) minmax(64px, 0.6fr) 88px auto auto;
}

body.mmsaas-menu-editor-page .cmg-builder.is-multilang-off .cmg-catalog-row--ingredient {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

body.mmsaas-menu-editor-page .cmg-builder.is-multilang-off .cmg-catalog-row--supplement {
  grid-template-columns: minmax(0, 1fr) 88px auto auto;
}

body.mmsaas-menu-editor-page .cmg-catalog-row--ingredient .cmg-catalog-remove,
body.mmsaas-menu-editor-page .cmg-catalog-row--supplement .cmg-catalog-remove {
  justify-self: end;
  align-self: center;
}

body.mmsaas-menu-editor-page .cmg-i18n-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

body.mmsaas-menu-editor-page .cmg-i18n-field {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0;
  min-width: 0;
}

body.mmsaas-menu-editor-page .cmg-i18n-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  padding: 0 8px;
  border: 1px solid #e5e7eb;
  border-inline-end: 0;
  border-radius: 10px 0 0 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

body.mmsaas-menu-editor-page.mmsaas-i18n-rtl .cmg-i18n-badge,
html[dir="rtl"] body.mmsaas-menu-editor-page .cmg-i18n-badge {
  border-radius: 0 10px 10px 0;
}

body.mmsaas-menu-editor-page.mmsaas-i18n-rtl .cmg-i18n-field .cmg-input,
html[dir="rtl"] body.mmsaas-menu-editor-page .cmg-i18n-field .cmg-input {
  border-radius: 10px 0 0 10px !important;
}

body.mmsaas-menu-editor-page .cmg-i18n-field .cmg-input {
  border-radius: 0 10px 10px 0 !important;
  margin: 0;
}

@media (max-width: 720px) {
  body.mmsaas-menu-editor-page .cmg-i18n-fields {
    grid-template-columns: 1fr;
  }

  /* Ingrédients : champ principal + Indispo + corbeille sur la même ligne */
  body.mmsaas-menu-editor-page .cmg-catalog-row--ingredient,
  body.mmsaas-menu-editor-page .cmg-builder.is-multilang-off .cmg-catalog-row--ingredient,
  body.mmsaas-menu-editor-page .cmg-builder.is-multilang-on .cmg-catalog-row--ingredient {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px;
    align-items: center;
  }

  body.mmsaas-menu-editor-page .cmg-catalog-row--ingredient .cmg-ing-name {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  body.mmsaas-menu-editor-page .cmg-builder.is-multilang-on .cmg-catalog-row--ingredient .cmg-ing-name-en {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  body.mmsaas-menu-editor-page .cmg-builder.is-multilang-on .cmg-catalog-row--ingredient .cmg-ing-name-ar {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  body.mmsaas-menu-editor-page .cmg-catalog-row--ingredient .cmg-suspend-check--catalog {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    flex-shrink: 0;
  }

  body.mmsaas-menu-editor-page .cmg-catalog-row--ingredient .cmg-catalog-remove {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  /* Suppléments : nom + prix + Indispo + corbeille sur la même ligne */
  body.mmsaas-menu-editor-page .cmg-catalog-row--supplement,
  body.mmsaas-menu-editor-page .cmg-builder.is-multilang-off .cmg-catalog-row--supplement,
  body.mmsaas-menu-editor-page .cmg-builder.is-multilang-on .cmg-catalog-row--supplement {
    grid-template-columns: minmax(0, 1fr) minmax(44px, 4.25rem) auto auto;
    gap: 6px;
    align-items: center;
  }

  body.mmsaas-menu-editor-page .cmg-catalog-row--supplement .cmg-supp-name {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  body.mmsaas-menu-editor-page .cmg-catalog-row--supplement .cmg-supp-price,
  body.mmsaas-menu-editor-page .cmg-catalog-row--supplement .cmg-catalog-input--price {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    max-width: none;
    justify-self: stretch;
    padding-left: 6px !important;
    padding-right: 6px !important;
    text-align: center;
  }

  body.mmsaas-menu-editor-page .cmg-builder.is-multilang-on .cmg-catalog-row--supplement .cmg-supp-name-en {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  body.mmsaas-menu-editor-page .cmg-builder.is-multilang-on .cmg-catalog-row--supplement .cmg-supp-name-ar {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  body.mmsaas-menu-editor-page .cmg-catalog-row--supplement .cmg-suspend-check--catalog {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    flex-shrink: 0;
  }

  body.mmsaas-menu-editor-page .cmg-catalog-row--supplement .cmg-catalog-remove {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
  }

  body.mmsaas-menu-editor-page .cmg-suspend-check--catalog {
    padding: 5px 7px;
    font-size: 0.62rem;
    white-space: nowrap;
  }

  body.mmsaas-menu-editor-page .cmg-catalog-remove {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }
}

body.mmsaas-menu-editor-page .cmg-catalog-inline--ingredients .cmg-catalog-row--ingredient:focus-within {
  border-color: #86efac;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

body.mmsaas-menu-editor-page .cmg-catalog-inline--supplements .cmg-catalog-row--supplement:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

body.mmsaas-menu-editor-page .cmg-catalog-input {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  line-height: 1.3;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

body.mmsaas-menu-editor-page .cmg-catalog-input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

body.mmsaas-menu-editor-page .cmg-catalog-input:focus {
  outline: none;
  border-color: #ff8500;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 133, 0, 0.15);
}

body.mmsaas-menu-editor-page .cmg-catalog-inline--ingredients .cmg-catalog-input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14);
}

body.mmsaas-menu-editor-page .cmg-catalog-inline--supplements .cmg-catalog-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

body.mmsaas-menu-editor-page .cmg-catalog-input--price {
  text-align: right;
  font-weight: 700;
  color: #1d4ed8;
  padding-right: 10px;
}

body.mmsaas-menu-editor-page .cmg-catalog-remove {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  gap: 0;
  flex-shrink: 0;
}

body.mmsaas-menu-editor-page .cmg-catalog-remove .cmg-icon {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

body.mmsaas-menu-editor-page .cmg-catalog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

body.mmsaas-menu-editor-page .cmg-catalog-actions .cmg-btn-action {
  border-radius: 999px;
  font-weight: 700;
}

body.mmsaas-menu-editor-page .cmg-builder-section--theme-ingredients .cmg-catalog-actions .cmg-btn-action {
  border-color: #86efac;
  background: #f0fdf4;
  color: #15803d;
}

body.mmsaas-menu-editor-page .cmg-builder-section--theme-supplements .cmg-catalog-actions .cmg-btn-action {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

body.mmsaas-menu-editor-page .cmg-catalog-actions .cmg-catalog-save {
  border-color: rgba(31, 41, 55, 0.15);
  background: #fff;
  color: #374151;
  font-weight: 700;
  padding-left: 14px;
  padding-right: 14px;
}

body.mmsaas-menu-editor-page .cmg-builder-section--theme-ingredients .cmg-catalog-actions .cmg-catalog-save:hover {
  border-color: #16a34a;
  color: #15803d;
}

body.mmsaas-menu-editor-page .cmg-builder-section--theme-supplements .cmg-catalog-actions .cmg-catalog-save:hover {
  border-color: #2563eb;
  color: #1d4ed8;
}

@media (max-width: 900px) {
  body.mmsaas-menu-editor-page .cmg-item-title-row {
    grid-template-columns: minmax(0, 1fr) 84px auto;
    gap: 6px;
  }

  body.mmsaas-menu-editor-page .cmg-highlight-check--inline {
    justify-self: end;
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  body.mmsaas-menu-editor-page .container.mmsaas-menu-editor-page {
    padding: 0.85rem 0.65rem 1.5rem;
  }

  body.mmsaas-menu-editor-page .cmg-category-identity,
  body.mmsaas-menu-editor-page .cmg-item-identity {
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
  }

  body.mmsaas-menu-editor-page .cmg-media-field--inline {
    flex: 0 0 64px;
    width: 64px;
  }

  body.mmsaas-menu-editor-page .cmg-media-card--inline {
    width: 64px;
    max-width: 64px;
  }

  body.mmsaas-menu-editor-page .cmg-media-card--inline .cmg-media-preview {
    width: 56px;
    height: 56px;
  }

  body.mmsaas-menu-editor-page .cmg-category-fields {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.95fr);
    gap: 6px;
  }

  body.mmsaas-menu-editor-page .cmg-item-title-row {
    grid-template-columns: minmax(0, 1fr) 72px auto;
    gap: 6px;
  }

  body.mmsaas-menu-editor-page .cmg-input--price {
    max-width: 72px;
    padding: 5px 6px !important;
    font-size: 12px !important;
  }

  body.mmsaas-menu-editor-page .cmg-item-title-row .cmg-input--title,
  body.mmsaas-menu-editor-page .cmg-category-fields .cmg-input--title,
  body.mmsaas-menu-editor-page .cmg-category-fields .cmg-input--subtle {
    font-size: 13px !important;
    min-height: 34px;
    padding: 5px 7px !important;
  }

  body.mmsaas-menu-editor-page .cmg-highlight-check--inline {
    padding: 4px 7px;
    font-size: 11px;
    justify-self: end;
    grid-column: auto;
  }

  body.mmsaas-menu-editor-page .cmg-field-section--pickers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body.mmsaas-menu-editor-page .cmg-picker-toggle {
    padding: 7px 8px;
    font-size: 11px;
  }

  body.mmsaas-menu-editor-page .cmg-picker-toggle-label .cmg-icon {
    width: 14px;
    height: 14px;
    font-size: 14px;
  }

  body.mmsaas-menu-editor-page .cmg-picker-check > span {
    padding: 5px 9px;
    font-size: 11px;
  }

  body.mmsaas-menu-editor-page .cmg-picker-check small {
    font-size: 9px;
    padding: 1px 5px;
  }

  body.mmsaas-menu-editor-page .cmg-category-body,
  body.mmsaas-menu-editor-page .cmg-item-body {
    padding: 8px 10px 10px;
    gap: 8px;
  }

  body.mmsaas-menu-editor-page .cmg-suspend-check--catalog {
    padding: 5px 6px;
    font-size: 0.6rem;
  }

  body.mmsaas-menu-editor-page .cmg-catalog-remove {
    width: 32px;
    height: 32px;
  }

  body.mmsaas-menu-editor-page .cmg-catalog-input {
    padding: 8px 10px;
    font-size: 13px;
  }

  .cmg-client-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  body.mmsaas-menu-editor-page .cmg-client-toolbar-actions {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    gap: 0.35rem;
  }

  body.mmsaas-menu-editor-page .cmg-client-toolbar-actions .button {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 5px;
    font-size: 0.7rem;
    min-height: 36px;
    white-space: normal;
    line-height: 1.15;
    text-align: center;
  }

  .cmg-client-shell-header {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

/* ---- Formulaires éditeur client (inputs, modal, catégories) ---- */

body.mmsaas-menu-editor-page .cmg-input,
body.mmsaas-menu-editor-page .cmg-item-description,
body.mmsaas-menu-editor-page .cmg-catalog-input,
body.mmsaas-menu-editor-page .cmg-client-menu-title {
  font-family: inherit;
}

body.mmsaas-menu-editor-page .cmg-input,
body.mmsaas-menu-editor-page .cmg-item-description,
body.mmsaas-menu-editor-page .cmg-catalog-input {
  width: 100%;
  padding: 10px 12px !important;
  border: 1px solid var(--cmg-editor-border) !important;
  border-radius: var(--cmg-editor-radius-sm) !important;
  background: var(--cmg-editor-surface) !important;
  color: var(--cmg-editor-text) !important;
  font-size: 0.92rem !important;
  line-height: 1.35 !important;
  box-shadow: var(--cmg-editor-shadow) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
}

body.mmsaas-menu-editor-page .cmg-input::placeholder,
body.mmsaas-menu-editor-page .cmg-item-description::placeholder,
body.mmsaas-menu-editor-page .cmg-catalog-input::placeholder {
  color: #9ca3af;
}

body.mmsaas-menu-editor-page .cmg-input:focus,
body.mmsaas-menu-editor-page .cmg-item-description:focus,
body.mmsaas-menu-editor-page .cmg-catalog-input:focus {
  outline: none !important;
  border-color: var(--cmg-editor-border-focus) !important;
  box-shadow: var(--cmg-editor-shadow-focus) !important;
  background: #fff !important;
}

body.mmsaas-menu-editor-page .cmg-input--title {
  font-weight: 700 !important;
  color: var(--cmg-editor-brand) !important;
}

body.mmsaas-menu-editor-page .cmg-input--price {
  font-weight: 700 !important;
  text-align: center;
  color: var(--cmg-editor-accent) !important;
  background: #fff9f3 !important;
}

body.mmsaas-menu-editor-page .cmg-item-description,
body.mmsaas-menu-editor-page .cmg-category-fields .cmg-input--subtle {
  background: #fff !important;
}

body.mmsaas-menu-editor-page .cmg-category {
  border: 1px solid var(--cmg-editor-border);
  border-radius: 16px;
  background: var(--cmg-editor-surface);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

body.mmsaas-menu-editor-page .cmg-category-header {
  padding: 10px 12px;
  background: linear-gradient(180deg, #fff9f3 0%, #fff 100%);
  border-bottom: 1px solid rgba(107, 46, 0, 0.08);
  border-radius: 16px 16px 0 0;
}

body.mmsaas-menu-editor-page .cmg-category-header .cmg-category-drag-handle {
  width: 22px;
  height: 26px;
  color: rgba(51, 65, 85, 0.38);
}

body.mmsaas-menu-editor-page .cmg-category-header .cmg-category-drag-handle:hover {
  color: rgba(51, 65, 85, 0.62);
  background: transparent;
}

body.mmsaas-menu-editor-page .cmg-category-body {
  padding: 14px 14px 16px;
  gap: 14px;
}

body.mmsaas-menu-editor-page .cmg-category-products {
  padding-top: 4px;
  border-top: 1px dashed rgba(107, 46, 0, 0.12);
}

body.mmsaas-menu-editor-page .cmg-highlight-check--inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--cmg-editor-border);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cmg-editor-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

body.mmsaas-menu-editor-page .cmg-highlight-check--inline:has(input:checked) {
  border-color: rgba(255, 133, 0, 0.45);
  background: #fff7ed;
  color: var(--cmg-editor-brand);
  box-shadow: 0 4px 12px rgba(255, 133, 0, 0.12);
}

body.mmsaas-menu-editor-page .cmg-highlight-check--inline input {
  accent-color: var(--cmg-editor-accent);
}

body.mmsaas-menu-editor-page .cmg-item-modal-body .cmg-sr-only {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cmg-editor-muted);
}

body.mmsaas-menu-editor-page .cmg-item-modal-body .cmg-item-identity {
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: var(--cmg-editor-radius);
  border: 1px solid var(--cmg-editor-border);
  background: #fff;
}

body.mmsaas-menu-editor-page .cmg-item-modal-body .cmg-media-field--inline {
  flex: none;
  width: 100%;
  max-width: 168px;
}

body.mmsaas-menu-editor-page .cmg-item-modal-body .cmg-media-card--inline {
  width: 100%;
  max-width: 168px;
  align-items: center;
}

body.mmsaas-menu-editor-page .cmg-item-modal-body .cmg-media-card--inline .cmg-media-preview {
  width: 140px;
  height: 140px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--cmg-editor-border);
  box-shadow: var(--cmg-editor-shadow);
}

body.mmsaas-menu-editor-page .cmg-item-modal-body .cmg-media-card--inline .cmg-media-actions {
  width: 100%;
  justify-content: center;
  gap: 8px;
}

body.mmsaas-menu-editor-page .cmg-item-modal-body .cmg-media-card--inline .cmg-media-actions .cmg-btn {
  padding: 7px 12px;
  font-size: 0.78rem;
  border-radius: var(--cmg-editor-radius-sm);
  border: 1px solid var(--cmg-editor-border);
  background: #fff;
  font-weight: 700;
}

body.mmsaas-menu-editor-page .cmg-item-modal-body .cmg-media-card--inline .cmg-media-actions .cmg-btn--choose {
  background: #fff7ed;
  border-color: rgba(255, 133, 0, 0.35);
  color: var(--cmg-editor-brand);
}

body.mmsaas-menu-editor-page .cmg-item-modal-body .cmg-item-fields {
  gap: 12px;
  padding: 14px;
  border-radius: var(--cmg-editor-radius);
  border: 1px solid var(--cmg-editor-border);
  background: #fff;
}

body.mmsaas-menu-editor-page .cmg-item-tile.is-suspended {
  opacity: 0.72;
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.65);
  background: #f8fafc;
}

body.mmsaas-menu-editor-page .cmg-item-tile-suspended,
body.mmsaas-menu-editor-page .cmg-tag--suspended {
  align-self: flex-start;
  margin-top: 2px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.mmsaas-menu-editor-page .cmg-suspend-check--inline,
body.mmsaas-menu-editor-page .cmg-suspend-check--catalog {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--cmg-editor-border);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cmg-editor-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

body.mmsaas-menu-editor-page .cmg-suspend-check--inline:has(input:checked),
body.mmsaas-menu-editor-page .cmg-suspend-check--catalog:has(input:checked) {
  border-color: rgba(239, 68, 68, 0.45);
  background: #fef2f2;
  color: #b91c1c;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

body.mmsaas-menu-editor-page .cmg-suspend-check--catalog {
  padding: 7px 10px;
  font-size: 0.72rem;
  white-space: nowrap;
}

body.mmsaas-menu-editor-page .cmg-suspend-check input {
  accent-color: #ef4444;
}

body.mmsaas-menu-editor-page .cmg-catalog-row.is-catalog-suspended {
  opacity: 0.78;
  border-style: dashed;
  border-color: rgba(239, 68, 68, 0.28);
  background: #fffafa;
}

body.mmsaas-menu-editor-page .cmg-picker-check.is-catalog-suspended > span {
  opacity: 0.75;
}

body.mmsaas-menu-editor-page .cmg-picker-check.is-catalog-suspended > span small:last-child {
  color: #b91c1c;
  font-weight: 800;
}

body.mmsaas-menu-editor-page .cmg-item-modal-body .cmg-item-title-row {
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 10px;
  align-items: end;
}

body.mmsaas-menu-editor-page .cmg-item-modal-body .cmg-highlight-check--inline,
body.mmsaas-menu-editor-page .cmg-item-modal-body .cmg-suspend-check--inline {
  grid-column: 1 / -1;
  justify-self: start;
}

body.mmsaas-menu-editor-page .cmg-item-modal-body .cmg-field-section--pickers {
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 4px;
}

body.mmsaas-menu-editor-page .cmg-item-modal-body .cmg-picker-block {
  border: 1px solid var(--cmg-editor-border);
  overflow: hidden;
}

body.mmsaas-menu-editor-page .cmg-item-modal-body .cmg-picker-toggle {
  padding: 11px 12px;
  font-size: 0.82rem;
}

body.mmsaas-menu-editor-page .cmg-item-modal-body .cmg-picker-body {
  padding: 10px 12px 12px;
  background: #fff;
}

body.mmsaas-menu-editor-page .cmg-item-modal-foot .cmg-btn--delete {
  border-radius: var(--cmg-editor-radius-sm);
  padding: 9px 12px;
  font-weight: 700;
}

body.mmsaas-menu-editor-page .cmg-builder-section {
  border: 1px solid var(--cmg-editor-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--cmg-editor-shadow);
}

body.mmsaas-menu-editor-page .cmg-builder-section .cmg-section-toggle {
  padding: 12px 14px;
  background: #f8fafc;
}

body.mmsaas-menu-editor-page .cmg-catalog-input {
  min-height: 40px;
  max-width: 100%;
  box-sizing: border-box;
}

body.mmsaas-menu-editor-page .cmg-client-toolbar-actions .button {
  border-radius: var(--cmg-editor-radius-sm);
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  min-height: 40px;
  box-shadow: var(--cmg-editor-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.mmsaas-menu-editor-page .cmg-client-toolbar-actions .cmg-client-view-menu {
  border-color: rgba(107, 46, 0, 0.18);
  background: #fff9f3;
  color: var(--cmg-editor-brand);
}

body.mmsaas-menu-editor-page .cmg-client-toolbar-actions .button-secondary {
  border-color: var(--cmg-editor-border);
  background: #fff;
  color: var(--cmg-editor-brand);
}

body.mmsaas-menu-editor-page .cmg-client-toolbar-actions .button-secondary:hover,
body.mmsaas-menu-editor-page .cmg-client-toolbar-actions .button-secondary:focus,
body.mmsaas-menu-editor-page .cmg-client-toolbar-actions .cmg-client-view-menu:hover,
body.mmsaas-menu-editor-page .cmg-client-toolbar-actions .cmg-client-view-menu:focus {
  border-color: rgba(107, 46, 0, 0.28);
  background: #fff9f3;
  color: var(--cmg-editor-brand);
}

body.mmsaas-menu-editor-page .cmg-client-toolbar-actions .button-primary {
  border-color: var(--cmg-editor-accent);
  background: var(--cmg-editor-accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 133, 0, 0.22);
}

body.mmsaas-menu-editor-page .cmg-client-toolbar-actions .button-primary:hover,
body.mmsaas-menu-editor-page .cmg-client-toolbar-actions .button-primary:focus {
  background: #e67700;
  border-color: #e67700;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(255, 133, 0, 0.28);
}

body.mmsaas-menu-editor-page .cmg-add-category,
body.mmsaas-menu-editor-page .cmg-add-item:not(.cmg-add-item--compact) {
  border-radius: var(--cmg-editor-radius-sm);
  border: 1px dashed rgba(107, 46, 0, 0.22);
  background: #fff;
  color: var(--cmg-editor-brand);
  font-weight: 700;
  padding: 10px 14px;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

body.mmsaas-menu-editor-page .cmg-add-category:hover,
body.mmsaas-menu-editor-page .cmg-add-item:not(.cmg-add-item--compact):hover {
  border-color: rgba(255, 133, 0, 0.45);
  background: #fff9f3;
  color: var(--cmg-editor-accent);
}

body.mmsaas-menu-editor-page .cmg-item-modal-dialog {
  border-radius: 20px;
}

body.mmsaas-menu-editor-page .cmg-item-modal-backdrop {
  backdrop-filter: blur(2px);
}

@media (max-width: 380px) {
  body.mmsaas-menu-editor-page .cmg-client-toolbar-actions .button {
    padding: 7px 3px;
    font-size: 0.64rem;
    min-height: 34px;
  }

  body.mmsaas-menu-editor-page .cmg-item-title-row {
    grid-template-columns: minmax(0, 1fr) 64px auto;
  }

  body.mmsaas-menu-editor-page .cmg-category-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  }

  body.mmsaas-menu-editor-page .cmg-picker-check > span {
    padding: 4px 8px;
    font-size: 10px;
  }
}

/* Header client — mêmes styles que le thème ; neutraliser seulement les conflits admin.css */
body.mmsaas-menu-editor-page .site-nav-toggle {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  width: 2.65rem !important;
  height: 2.65rem !important;
  border: 1px solid rgba(107, 46, 0, 0.14) !important;
  border-radius: 12px !important;
  background: #fff !important;
  padding: 0 !important;
  margin: 0;
  flex-shrink: 0;
  box-shadow: none !important;
  cursor: pointer;
}

body.mmsaas-menu-editor-page .site-nav-toggle-bar {
  display: block !important;
  width: 1.15rem !important;
  height: 2px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  background: var(--secondary, #6b2e00) !important;
}

body.mmsaas-menu-editor-page .site-nav-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000 !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: rgba(15, 23, 42, 0.35) !important;
  cursor: pointer !important;
}

body.mmsaas-menu-editor-page .site-header-wrap:not(.is-nav-open) .site-nav-backdrop {
  display: none !important;
}

body.mmsaas-menu-editor-page .site-header-wrap.is-nav-open .site-nav-backdrop {
  display: block !important;
  pointer-events: auto !important;
}

body.mmsaas-menu-editor-page .site-nav-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.mmsaas-menu-editor-page .site-nav-link {
  text-decoration: none !important;
}

body.mmsaas-menu-editor-page .site-header-wrap.is-nav-open .site-nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body.mmsaas-menu-editor-page .site-header-wrap.is-nav-open .site-nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

body.mmsaas-menu-editor-page .site-header-wrap.is-nav-open .site-nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* RTL: toolbar wrap + LTR exceptions for prices / EN / hex */
body.mmsaas-menu-editor-page.mmsaas-i18n-rtl .cmg-client-toolbar-actions,
html[dir="rtl"] body.mmsaas-menu-editor-page .cmg-client-toolbar-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

body.mmsaas-menu-editor-page.mmsaas-i18n-rtl .cmg-item-price,
body.mmsaas-menu-editor-page.mmsaas-i18n-rtl .cmg-catalog-input--price,
body.mmsaas-menu-editor-page.mmsaas-i18n-rtl input[type="number"],
body.mmsaas-menu-editor-page.mmsaas-i18n-rtl .cmg-item-name-en,
body.mmsaas-menu-editor-page.mmsaas-i18n-rtl .cmg-category-name-en,
body.mmsaas-menu-editor-page.mmsaas-i18n-rtl .cmg-ing-name-en,
body.mmsaas-menu-editor-page.mmsaas-i18n-rtl .cmg-supp-name-en,
html[dir="rtl"] body.mmsaas-menu-editor-page .cmg-item-price,
html[dir="rtl"] body.mmsaas-menu-editor-page .cmg-catalog-input--price,
html[dir="rtl"] body.mmsaas-menu-editor-page input[type="number"],
html[dir="rtl"] body.mmsaas-menu-editor-page .cmg-item-name-en,
html[dir="rtl"] body.mmsaas-menu-editor-page .cmg-category-name-en,
html[dir="rtl"] body.mmsaas-menu-editor-page .cmg-ing-name-en,
html[dir="rtl"] body.mmsaas-menu-editor-page .cmg-supp-name-en {
  direction: ltr;
  text-align: left;
}

body.mmsaas-menu-editor-page.mmsaas-i18n-rtl .cmg-item-name-ar,
body.mmsaas-menu-editor-page.mmsaas-i18n-rtl .cmg-category-name-ar,
body.mmsaas-menu-editor-page.mmsaas-i18n-rtl .cmg-ing-name-ar,
body.mmsaas-menu-editor-page.mmsaas-i18n-rtl .cmg-supp-name-ar,
html[dir="rtl"] body.mmsaas-menu-editor-page .cmg-item-name-ar,
html[dir="rtl"] body.mmsaas-menu-editor-page .cmg-category-name-ar,
html[dir="rtl"] body.mmsaas-menu-editor-page .cmg-ing-name-ar,
html[dir="rtl"] body.mmsaas-menu-editor-page .cmg-supp-name-ar {
  direction: rtl;
  text-align: right;
}
