.dossier-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 9px 0;
  margin: 0 0 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.dossier-tabs a {
  flex: none;
  padding: 6px 9px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.dossier-tabs a:hover,
.dossier-tabs a:focus-visible {
  color: var(--fg);
  background: var(--card);
}

.dossier-tabs a[aria-current="page"] {
  color: var(--fg);
  background: var(--card);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.dossier-tabs .dossier-print {
  margin-left: auto;
  border-left: 1px solid var(--line);
  border-radius: 0;
}

.architecture-dossier {
  max-width: 100%;
}

.architecture-dossier h2 {
  margin-top: 34px;
}

.architecture-dossier h3 {
  margin: 24px 0 7px;
  font-family: var(--serif);
  font-size: 17px;
}

.architecture-dossier :not(pre) > code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.architecture-dossier img {
  display: block;
  width: 100%;
  height: auto;
  margin: 16px 0 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}

.dossier-sequence {
  width: min(1500px, calc(100vw - 32px));
  max-width: none;
  margin: 16px 50% 7px;
  overflow-x: auto;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  scrollbar-width: thin;
}

.dossier-sequence img {
  width: 100%;
  min-width: 1200px;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.dossier-boundary {
  width: min(1500px, calc(100vw - 32px));
  max-width: none;
  margin: 16px 50% 7px;
  overflow-x: auto;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  scrollbar-width: thin;
}

.dossier-boundary img {
  width: 100%;
  min-width: 1000px;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.dossier-table {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.dossier-table table {
  min-width: 680px;
}

.architecture-dossier pre {
  padding: 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.architecture-dossier-full > h2 {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
  .dossier-tabs {
    margin-right: -14px;
    margin-left: -14px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .dossier-tabs .dossier-print {
    margin-left: 0;
  }
}

@media print {
  header,
  footer,
  .dossier-tabs {
    display: none;
  }

  body,
  main {
    color: #000;
    background: #fff;
  }

  main {
    max-width: none;
    padding: 0;
  }

  .architecture-dossier img {
    break-inside: avoid;
    border-color: #bbb;
  }

  .dossier-sequence {
    width: 100%;
    margin: 0;
    overflow: visible;
    transform: none;
    border: 0;
  }

  .dossier-sequence img {
    min-width: 0;
  }

  .dossier-boundary {
    width: 100%;
    margin: 0;
    overflow: visible;
    transform: none;
    border: 0;
  }

  .dossier-boundary img {
    min-width: 0;
  }

  .dossier-table {
    overflow: visible;
  }

  .dossier-table table {
    min-width: 0;
    font-size: 11px;
  }

  .architecture-dossier-full > h2 {
    break-before: page;
    border: 0;
  }

  .architecture-dossier-full > h2:first-child {
    break-before: auto;
  }

  a {
    text-decoration: none;
  }
}
