/* Marine — one identity for the portal and its tools.
   Field & Bearing values match the site's Engineering palette; Orange Marine · IA Lab
   is the alternative habillage. Tool content keeps its own styles. */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600 800;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/ibm-plex-sans-latin-ext-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2");
  font-weight: 600 800;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("./fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --mb-paper: oklch(0.966 0.01 85);
  --mb-ink: oklch(0.24 0.008 140);
  --mb-muted: oklch(0.475 0.008 100);
  --mb-line: oklch(0.8 0.012 85);
  --mb-accent: oklch(0.51 0.115 45);
  --mb-sans: "IBM Plex Sans", system-ui, sans-serif;
  --mb-mono: "IBM Plex Mono", ui-monospace, monospace;
}
:root:is([data-theme="orange"], [data-brand="orange-marine"]) {
  --mb-paper: #000;
  --mb-ink: #fff;
  --mb-muted: #b5b5b5;
  --mb-line: #333;
  --mb-accent: #ff7900;
}

/* Tool bar: brand, tool name, then back, method, habillage and language — always in this order. */
.marine-bar {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
  margin: 0;
  padding: 0 32px;
  background: var(--mb-paper);
  color: var(--mb-ink);
  border-bottom: 1px solid var(--mb-line);
  font: 13px/1.2 var(--mb-sans);
  letter-spacing: 0;
  text-transform: none;
}
.marine-bar a,
.marine-bar button {
  color: inherit;
}
.marine-bar__brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 44px;
  text-decoration: none;
}
.marine-bar__brand > img {
  display: block;
  width: 168px;
  height: auto;
}
.marine-bar__orange {
  display: none;
  align-items: center;
  gap: 10px;
  font: 600 15px/1.1 var(--mb-sans);
  white-space: nowrap;
}
.marine-bar__orange img {
  width: 32px;
  height: 32px;
}
.marine-bar__orange small {
  display: block;
  margin-top: 2px;
  font: 10px var(--mb-mono);
  letter-spacing: 0.12em;
}
:root:is([data-theme="orange"], [data-brand="orange-marine"]) .marine-bar__brand > img {
  display: none;
}
:root:is([data-theme="orange"], [data-brand="orange-marine"]) .marine-bar__orange {
  display: flex;
}
.marine-bar__tool {
  padding-left: 20px;
  border-left: 1px solid var(--mb-line);
  font: 500 14px/1.2 var(--mb-sans);
  white-space: nowrap;
}
.marine-bar__actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}
.marine-bar__back,
.marine-bar__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.marine-bar__back:hover,
.marine-bar__link:hover {
  color: var(--mb-accent);
}
.marine-bar__select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mb-muted);
  font: 12px var(--mb-sans);
  white-space: nowrap;
}
.marine-bar__select select {
  min-height: 36px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--mb-line);
  border-radius: 0;
  background-color: transparent;
  color: var(--mb-ink);
  font: 13px var(--mb-sans);
}
.marine-bar__select select option {
  background: var(--mb-paper);
  color: var(--mb-ink);
}
.marine-bar :focus-visible {
  outline: 2px solid var(--mb-accent);
  outline-offset: 3px;
}
.marine-bar .marine-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@media (max-width: 760px) {
  .marine-bar {
    flex-wrap: wrap;
    gap: 2px 14px;
    padding: 8px 18px;
    min-height: 56px;
  }
  .marine-bar__brand > img {
    width: 138px;
  }
  .marine-bar__tool {
    padding-left: 14px;
    font-size: 13px;
  }
  .marine-bar__actions {
    width: 100%;
    margin-left: 0;
    gap: 6px 14px;
    flex-wrap: wrap;
    font-size: 12px;
  }
  .marine-bar__select > span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .marine-bar__select select {
    max-width: 132px;
    padding-right: 22px;
    font-size: 12px;
  }
}
