.demo-brand-emblem {
  display: none;
}

html.ged-emblem-layout {
  --sidebar-header-min-width: 373px;
  --sidebar-width: 373px;
  --ged-brand-blue: #001c4c;
}

html.ged-emblem-layout .sidebar {
  container-type: inline-size;
  /* Keep the liserai the full visible sidebar width, at every width. */
  --ged-rule-extra-width: 32px;
  --ged-rule-inset: -16px;
}

html.ged-emblem-layout body.sidebar-strip-mode .sidebar {
  --ged-rule-extra-width: 20px;
  --ged-rule-inset: -10px;
}

html.ged-emblem-layout .sidebar .brand {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "emblem"
    "rule";
  align-items: start;
  column-gap: 12px;
  row-gap: 4px;
  margin-bottom: 0;
  overflow: visible;
  z-index: 4;
}

html.ged-emblem-layout .ged-workspace-command-bar {
  container: ged-command-bar / inline-size;
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  min-width: 0;
  flex: 0 0 auto;
  margin-bottom: 14px;
}

html.ged-emblem-layout .ged-workspace-command-bar .brand-shortcuts {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 32px;
  grid-template-rows: 34px;
  gap: 4px;
  justify-self: start;
  align-self: center;
  position: static;
  width: max-content;
  min-width: 0;
  margin: 0;
  transform: none;
}

html.ged-emblem-layout .ged-workspace-command-bar .brand-shortcut {
  grid-area: auto;
  justify-self: start;
  align-self: start;
  width: 32px;
  min-width: 32px;
  height: 34px;
  margin: 0;
}

html.ged-emblem-layout .ged-workspace-command-bar .brand-account.auth-user-label {
  grid-column: 2;
  grid-row: 1;
  position: static;
  display: block;
  justify-self: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--ged-brand-blue);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
  transform: none;
}

/* Demo identity belongs on the left, not at the far right of the workspace.
   It occupies the white gutter beside the emblem, without moving the emblem
   or the decorative rule. Production/municipal instances retain their layout. */
html.ged-emblem-layout:not(.ged-municipal-emblem) .sidebar .brand .brand-title {
  position: absolute;
  z-index: 8;
  top: 26px;
  left: 18px;
  grid-area: auto;
  display: block;
  width: max-content;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 0;
  color: var(--ged-brand-blue);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  overflow-wrap: normal;
  text-wrap: nowrap;
  pointer-events: none;
}

html.ged-emblem-layout .ged-workspace-command-bar .brand-title {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  width: auto;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  color: var(--ged-brand-blue);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

html.ged-emblem-layout .workspace #moduleTitle,
html.ged-emblem-layout .workspace #moduleTitle .urbanisme-heading-main,
html.ged-emblem-layout .workspace #moduleTitle .urbanisme-heading-detail,
html.ged-emblem-layout .workspace .ged-central-location,
html.ged-emblem-layout .workspace .ged-central-location-item {
  color: var(--ged-brand-blue);
}

/* Compact the central header when its usable width is small.
   Never wrap six shortcuts into three rows: reserve height for the domain title.
   The former account name remains accessible as an icon-only logout control. */
html.ged-emblem-layout .workspace.ged-workspace-compact-header {
  padding-top: 12px;
}
html.ged-emblem-layout .ged-workspace-command-bar.ged-command-bar-compact {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-bottom: 4px;
}
html.ged-emblem-layout .ged-workspace-command-bar.ged-command-bar-compact .brand-shortcuts {
  display: flex;
  flex-flow: row nowrap;
  flex: 0 1 auto;
  width: max-content;
  max-width: calc(100% - 44px);
  min-width: 0;
  gap: 4px;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  justify-self: start;
}
html.ged-emblem-layout .ged-workspace-command-bar.ged-command-bar-compact .brand-shortcut {
  flex: 0 0 32px;
  min-width: 32px;
  width: 32px;
  height: 34px;
}
html.ged-emblem-layout .ged-workspace-command-bar.ged-command-bar-compact .brand-title {
  display: none;
}
html.ged-emblem-layout .ged-workspace-command-bar.ged-command-bar-compact .brand-account.auth-user-label:not(.hidden) {
  display: inline-grid;
  flex: 0 0 34px;
  place-items: center;
  justify-self: end;
  align-self: center;
  margin: 0 0 0 auto;
  padding: 0;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  font-size: 0;
  line-height: 0;
  white-space: nowrap;
}
html.ged-emblem-layout .ged-workspace-command-bar.ged-command-bar-compact .brand-account.auth-user-label:not(.hidden)::after {
  content: "";
  display: block;
  width: 19px;
  height: 19px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='m16 17 5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E") center / 19px 19px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='m16 17 5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E") center / 19px 19px no-repeat;
}

html.ged-emblem-layout .sidebar .brand-logo-slot,
html.ged-emblem-layout .sidebar .brand-eagle,
html.ged-emblem-layout .sidebar .brand-eagle-animation,
html.ged-emblem-layout .sidebar .brand-eagle-branch {
  display: none;
}

html.ged-emblem-layout .sidebar .ged-emblem-frame {
  grid-area: emblem;
  position: relative;
  z-index: 4;
  display: block;
  justify-self: center;
  /* Center the visible block (x=1002/1536), not its transparent image box.
     320px * [0.5 - (0.45 + 1.2 * (1002/1536 - 0.45))] = -61.7px. */
  --ged-logo-offset-x: -61.7px;
  width: 320px;
  max-width: none;
  height: auto;
  aspect-ratio: 3 / 2;
  margin-top: 22px;
  margin-bottom: -50px;
  background: #fff;
  user-select: none;
}

html.ged-emblem-layout .ged-emblem-frame .demo-brand-emblem:not([hidden]) {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

html.ged-emblem-layout .ged-emblem-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
}

html.ged-emblem-layout .ged-emblem-frame.is-layered .demo-brand-emblem {
  opacity: 0;
}

html.ged-emblem-layout .ged-emblem-frame.is-layered .ged-emblem-layer {
  opacity: 1;
}

html.ged-emblem-layout .ged-emblem-layer-eagle {
  z-index: 1;
  clip-path: polygon(0 0, 30% 0, 30% 80%, 100% 80%, 100% 100%, 0 100%);
  transform: translateY(8px);
}

html.ged-emblem-layout .ged-emblem-layer-text {
  z-index: 2;
  clip-path: inset(0 0 20% 30%);
  transform-origin: 45% 0;
  transform: translate(var(--ged-logo-offset-x, 0px), -31px) scale(1.2);
}

html.ged-emblem-layout .ged-emblem-frame .demo-brand-emblem {
  clip-path: inset(0 0 20% 30%);
  transform-origin: 45% 0;
  transform: translate(var(--ged-logo-offset-x, 0px), -31px) scale(1.2);
}

html.ged-emblem-layout .ged-emblem-rule {
  grid-area: rule;
  position: relative;
  z-index: 5;
  display: block;
  width: calc(100% + var(--ged-rule-extra-width, 32px));
  height: 18px;
  margin-top: 25px;
  margin-inline: var(--ged-rule-inset, -16px);
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

html.ged-emblem-layout .ged-emblem-rule[hidden] {
  display: none;
}

html.ged-emblem-layout .sidebar-tools {
  margin-top: 2px;
  margin-bottom: 0;
}

html.ged-emblem-layout .sidebar-root-actions-standalone {
  gap: 2px;
  padding-right: 0;
}

html.ged-emblem-layout .sidebar-root-action {
  padding-inline: 2px;
}

html.ged-emblem-layout .sidebar-counter-refresh {
  width: 24px;
}

html.ged-emblem-layout .module-list-pinned:empty {
  display: none;
}

html.ged-emblem-layout .module-list-scroll {
  margin-top: 4px;
}

html.ged-emblem-layout .ged-domain-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 4px;
  min-width: 0;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

html.ged-emblem-layout .ged-domain-heading-row .sidebar-domain-group-toggle {
  min-width: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

html.ged-emblem-layout .sidebar-tools.is-docked {
  position: static;
  margin: 0;
}

html.ged-emblem-layout .sidebar-tools.is-docked .sidebar-root-actions-standalone {
  width: auto;
}

@container (max-width: 290px) {
  html.ged-emblem-layout .ged-domain-heading-row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 4px;
  }

  html.ged-emblem-layout .sidebar-tools.is-docked {
    justify-self: end;
  }

  html.ged-emblem-layout .sidebar-domain-group-label {
    overflow-wrap: normal;
    word-break: normal;
  }

  html.ged-emblem-layout .sidebar-alsh-tree {
    margin-left: 14px;
  }

  html.ged-emblem-layout .sidebar-alsh-folder {
    margin-left: calc(var(--alsh-folder-level, 0) * 8px);
    width: calc(100% - (var(--alsh-folder-level, 0) * 8px));
    column-gap: 4px;
  }

  html.ged-emblem-layout .sidebar-alsh-folder span:not(.sidebar-alsh-folder-icon):not(.sidebar-tree-caret) {
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
    line-height: 1.25;
  }

}



/* Demo: the current full folder path belongs in the content panel, not in a
   large heading above it. Keep one compact line and give the saved height
   back to the GED document viewer. All municipal instances are unchanged. */
/* Independently suppress the redundant large heading when the ARRETES
   folder explorer is on screen. Do not depend on asynchronous breadcrumb events. */
html.ged-emblem-layout:not(.ged-municipal-emblem) .workspace:has(#arretesGedSection:not(.hidden) .alsh-document-picker) > .topbar,
html.ged-emblem-layout:not(.ged-municipal-emblem) .workspace:has(.alsh-ged-section:not(.hidden) .ged-demo-folder-path) > .topbar {
  display: none;
}
html.ged-emblem-layout:not(.ged-municipal-emblem) .workspace:has(.alsh-ged-section:not(.hidden) .ged-demo-folder-path) .alsh-viewer {
  gap: 6px;
}
html.ged-emblem-layout:not(.ged-municipal-emblem) .workspace:has(.alsh-ged-section:not(.hidden) .ged-demo-folder-path) .alsh-viewer-header {
  padding: 8px 12px;
  min-height: 34px;
  align-items: center;
}
html.ged-emblem-layout:not(.ged-municipal-emblem) .workspace:has(.alsh-ged-section:not(.hidden) .ged-demo-folder-path) .alsh-viewer-header .eyebrow,
html.ged-emblem-layout:not(.ged-municipal-emblem) .workspace:has(.alsh-ged-section:not(.hidden) .ged-demo-folder-path) .alsh-viewer-header .module-description {
  display: none;
}
html.ged-emblem-layout:not(.ged-municipal-emblem) .workspace:has(.alsh-ged-section:not(.hidden) .ged-demo-folder-path) .alsh-viewer-header h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
html.ged-emblem-layout:not(.ged-municipal-emblem) .workspace:has(.alsh-ged-section:not(.hidden) .ged-demo-folder-path) .ged-central-location {
  display: none;
}
html.ged-emblem-layout:not(.ged-municipal-emblem) .ged-demo-folder-path {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  color: var(--ged-brand-blue);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
}
html.ged-emblem-layout:not(.ged-municipal-emblem) .ged-demo-folder-path-item {
  flex: 0 0 auto;
  max-width: none;
  padding: 0 2px;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: var(--ged-brand-blue);
  font: inherit;
  white-space: nowrap;
}
html.ged-emblem-layout:not(.ged-municipal-emblem) .ged-demo-folder-path button.ged-demo-folder-path-item {
  cursor: pointer;
}
html.ged-emblem-layout:not(.ged-municipal-emblem) .ged-demo-folder-path button.ged-demo-folder-path-item:hover {
  text-decoration: underline;
}
html.ged-emblem-layout:not(.ged-municipal-emblem) .ged-demo-folder-path button.ged-demo-folder-path-item:focus-visible {
  outline: 2px solid #315ffe;
  outline-offset: 1px;
}
html.ged-emblem-layout:not(.ged-municipal-emblem) .ged-demo-folder-path-item[aria-current="location"] {
  font-weight: 750;
}
html.ged-emblem-layout:not(.ged-municipal-emblem) .ged-demo-folder-path-separator {
  flex: 0 0 auto;
  color: #8193a7;
}
