:root {
  --navy: #2d3d54;
  --cyan: #83d0df;
  --bar: #b6b6b6;
  --border: #222;
  --bone: #e8bd61;
  --soft: #e57b73;
  --paper: #fff;
  --shadow: 0 12px 34px rgba(37, 50, 68, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color: var(--navy);
  background: var(--paper);
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: relative;
  z-index: 30;
  background: #fff;
}

.header-inner {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(100% - 32px, 1240px);
  min-height: 136px;
  margin: 0 auto;
  padding: 16px 210px 12px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
}

.brand-symbol {
  display: block;
  width: 68px;
  height: 68px;
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-symbol img {
  display: block;
  width: 68px;
  height: auto;
  transform: translateY(-4px);
}

.brand-name {
  display: block;
  width: clamp(220px, 26vw, 330px);
  height: auto;
}

.tagline {
  margin: -5px 0 0;
  color: var(--navy);
  font-size: clamp(0.9rem, 1.45vw, 1.18rem);
  font-weight: 700;
  text-align: center;
}

.site-search {
  position: absolute;
  right: 0;
  bottom: 3px;
  width: 185px;
}

.site-search input {
  width: 100%;
  height: 30px;
  padding: 6px 10px;
  color: #222;
  background: #fff;
  border: 1px solid #777;
  border-radius: 0;
  outline: none;
}

.site-search input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(131, 208, 223, 0.3);
}

.search-results {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  width: min(370px, calc(100vw - 32px));
  max-height: 360px;
  overflow: auto;
  color: var(--navy);
  background: #fff;
  border: 1px solid #bcc3cb;
  box-shadow: var(--shadow);
}

.search-results-title {
  margin: 0;
  padding: 12px 15px 7px;
  color: #697482;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-results ul {
  padding: 0 0 8px;
  margin: 0;
  list-style: none;
}

.search-results a,
.search-empty {
  display: block;
  padding: 9px 15px;
  text-decoration: none;
}

.search-results a:hover,
.search-results a:focus-visible {
  color: #fff;
  background: var(--navy);
  outline: none;
}

.search-result-meta {
  display: block;
  margin-top: 2px;
  color: #7b8490;
  font-size: 0.75rem;
}

.search-results a:hover .search-result-meta,
.search-results a:focus-visible .search-result-meta {
  color: #dce4ed;
}

.primary-nav {
  position: relative;
  min-height: 36px;
  background: var(--bar);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.nav-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: clamp(8px, 4.2vw, 58px);
  width: min(100% - 64px, 1030px);
  min-height: 36px;
  margin: 0 auto;
  padding: 3px 0;
}

.nav-control {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 29px;
  padding: 0 10px;
  color: #141414;
  background: transparent;
  border: 1px solid #202020;
  border-radius: 0;
  font-size: 0.88rem;
  line-height: 0.94;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.nav-control:hover,
.nav-control:focus-visible,
.nav-control[aria-expanded="true"],
.nav-control.is-active {
  color: #fff;
  background: var(--navy);
  outline: none;
}

.tissue-menu {
  position: absolute;
  z-index: 35;
  top: calc(100% + 1px);
  left: 50%;
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 190px);
  padding: 18px 22px 22px;
  overflow: auto;
  color: var(--navy);
  background: #fff;
  border: 1px solid #929aa5;
  border-top: 6px solid var(--bone);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.tissue-menu[data-tissue="mous"] {
  border-top-color: var(--soft);
}

.tissue-menu[hidden] {
  display: none;
}

.tissue-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}

.tissue-menu-header h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.tissue-menu-close {
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--navy);
  background: transparent;
  border: 0;
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
}

.tissue-menu-close:hover,
.tissue-menu-close:focus-visible {
  color: #fff;
  background: var(--navy);
  outline: none;
}

.tissue-menu-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tissue-menu-region {
  padding: 13px 15px 15px;
  background: #fbf1df;
  border-left: 5px solid var(--bone);
}

.tissue-menu[data-tissue="mous"] .tissue-menu-region {
  background: #fbe8e7;
  border-left-color: var(--soft);
}

.tissue-menu-region h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
  text-decoration: underline;
  text-transform: uppercase;
  text-underline-offset: 3px;
}

.tissue-menu-region ul {
  display: grid;
  gap: 4px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tissue-menu-region li {
  position: relative;
  padding-left: 13px;
}

.tissue-menu-region li::before {
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 5px;
  height: 1px;
  background: currentColor;
  content: "";
}

.tissue-menu-region a {
  line-height: 1.22;
  text-decoration: none;
}

.tissue-menu-region a:hover,
.tissue-menu-region a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  outline: none;
}

.tissue-menu-general {
  display: grid;
  grid-template-columns: 145px 1fr;
  grid-column: 1 / -1;
  align-items: start;
  gap: 15px;
}

.tissue-menu-general ul {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 18px;
}

.hero {
  position: relative;
  min-height: calc(100vh - 173px);
  overflow-x: clip;
}

.anatomy-stage {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(100%, 1260px);
  min-height: calc(100vh - 173px);
  margin: 0 auto;
  padding: clamp(24px, 3.5vh, 46px) 24px 24px;
}

.anatomy-frame {
  position: relative;
  width: clamp(340px, 40vw, 540px);
  max-width: 92vw;
}

.anatomy-image {
  display: block;
  width: 100%;
  height: auto;
  transform: scaleX(-1);
  user-select: none;
}

.hotspot {
  --spot-color: var(--bone);
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--w, 13%);
  height: var(--h, 11%);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 42%;
  opacity: 1;
  transform: translate(-50%, -50%);
  transition: background 150ms ease, box-shadow 150ms ease;
  cursor: pointer;
}

.hotspot[data-tissue="mous"] {
  --spot-color: var(--soft);
}

.hotspot span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.hotspot:hover,
.hotspot:focus-visible {
  background: color-mix(in srgb, var(--spot-color) 22%, transparent);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--spot-color) 70%, #fff);
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.interaction-help {
  min-height: 1.4em;
  margin: 13px 0 0;
  color: #657081;
  font-size: 0.9rem;
  text-align: center;
}

.pathology-panel {
  position: absolute;
  z-index: 25;
  top: clamp(120px, var(--panel-y, 50%), calc(100% - 120px));
  width: min(350px, 34vw);
  max-height: min(410px, calc(100vh - 205px));
  overflow: auto;
  padding: 24px 24px 20px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #9ba3ad;
  border-top: 6px solid var(--bone);
  box-shadow: var(--shadow);
  transform: translateY(-50%);
}

.pathology-panel[data-tissue="mous"] {
  border-top-color: var(--soft);
}

.pathology-panel[data-side="left"] {
  right: calc(100% + 22px);
}

.pathology-panel[data-side="right"] {
  left: calc(100% + 22px);
}

.pathology-panel[hidden] {
  display: none;
}

.panel-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--navy);
  background: transparent;
  border: 0;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.panel-category {
  margin: 0 36px 5px 0;
  color: #788493;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pathology-panel h2 {
  margin: 0 36px 17px 0;
  color: var(--navy);
  font-size: 1.45rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.pathology-panel ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.pathology-panel a {
  display: block;
  padding: 10px 12px;
  background: #f4f6f8;
  border-left: 4px solid var(--cyan);
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
}

.pathology-panel a:hover,
.pathology-panel a:focus-visible {
  color: #fff;
  background: var(--navy);
  outline: none;
}

@media (max-width: 900px) {
  .header-inner {
    min-height: 150px;
    padding: 14px 0 58px;
  }

  .site-search {
    right: 50%;
    bottom: 13px;
    width: min(370px, calc(100vw - 36px));
    transform: translateX(50%);
  }

  .site-search input {
    height: 34px;
  }

  .nav-list {
    gap: 5px;
    width: min(100% - 12px, 820px);
  }

  .nav-control {
    padding-inline: 5px;
    font-size: 0.78rem;
  }

  .tissue-menu-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tissue-menu-general {
    display: block;
  }

  .tissue-menu-general h3 {
    margin-bottom: 8px;
  }

  .tissue-menu-general ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero,
  .anatomy-stage {
    min-height: calc(100vh - 187px);
  }

  .pathology-panel,
  .pathology-panel[data-side="left"],
  .pathology-panel[data-side="right"] {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-height: 52vh;
    transform: none;
  }
}

@media (max-width: 620px) {
  .header-inner {
    width: calc(100% - 24px);
    min-height: 147px;
    padding-top: 10px;
  }

  .brand {
    gap: 8px;
  }

  .brand-symbol {
    width: 52px;
    height: 52px;
  }

  .brand-symbol img {
    width: 52px;
  }

  .brand-name {
    width: min(235px, 62vw);
  }

  .tagline {
    width: min(360px, 92vw);
    margin-top: -2px;
    font-size: 0.78rem;
    line-height: 1.15;
  }

  .nav-list {
    display: flex;
    width: 100%;
    min-width: 0;
    padding: 4px 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .nav-control {
    height: 34px;
    min-width: 126px;
  }

  .anatomy-stage {
    padding-top: 30px;
  }

  .tissue-menu {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 205px);
    padding: 15px 14px 18px;
  }

  .tissue-menu-groups,
  .tissue-menu-general ul {
    grid-template-columns: 1fr;
  }
}

.image-lightbox-trigger {
  cursor: zoom-in;
}

.image-lightbox-trigger:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 4px;
}

body.image-lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: clamp(16px, 3vw, 42px);
  border: 0;
  background: rgba(8, 14, 24, 0.94);
  color: #fff;
  overflow: auto;
}

.image-lightbox::backdrop {
  background: rgba(8, 14, 24, 0.94);
}

.image-lightbox-figure {
  min-height: calc(100vh - clamp(32px, 6vw, 84px));
  min-height: calc(100dvh - clamp(32px, 6vw, 84px));
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.image-lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(94vw, 1800px);
  max-height: calc(100vh - 7rem);
  max-height: calc(100dvh - 7rem);
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
}

.image-lightbox-caption {
  max-width: min(94vw, 1100px);
  color: #fff;
  font-size: 1rem;
  line-height: 1.35;
  text-align: center;
}

.image-lightbox-close {
  position: fixed;
  z-index: 1;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  width: 46px;
  height: 46px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(8, 14, 24, 0.72);
  color: #fff;
  font: 400 2rem/1 Calibri, Arial, sans-serif;
  cursor: pointer;
}

.image-lightbox-close:hover,
.image-lightbox-close:focus-visible {
  border-color: #fff;
  background: #fff;
  color: var(--navy);
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Pied de page commun */
.site-footer {
  width: min(calc(100% - 32px), 1240px);
  margin: 40px auto 0;
  padding: 12px 16px 20px;
  border-top: 1px solid #000;
  color: #111;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}
