/* Shared base: reset, accessibility helpers, sign-in, toast, user menu,
   company search, chart wrappers. Each look adds its own file. */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  min-height: 100vh;
}
[hidden] {
  display: none !important;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
a {
  text-underline-offset: 2px;
}
h1,
h2,
h3,
h4,
p,
ul {
  margin: 0;
}
ul {
  padding: 0;
  list-style: none;
}
img,
svg {
  max-width: 100%;
}
svg {
  flex: none;
}
.grow {
  flex: 1 1 auto;
  min-width: 0;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border: 0;
  background: #14171a;
  color: #ffffff;
  font-weight: 600;
}
.skip:focus {
  top: 12px;
}
#main {
  outline: none;
}
.screen {
  min-width: 0;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ── Sign-in ──────────────────────────────────────────────────────────── */
.login {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.login-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
}
.login-card h1 {
  margin: 4px 0 0;
}
.login-ms,
.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  border: 0;
  font-weight: 700;
}
.login-toggle {
  align-self: center;
  border: 0;
  background: transparent;
  padding: 6px;
  text-decoration: underline;
  font-size: 13px;
  min-height: 32px;
}
.login-pwd {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.login-pwd input {
  min-height: 44px;
  padding: 0 12px;
  margin-bottom: 6px;
}
.login-err:empty {
  display: none;
}
.login-err {
  font-weight: 600;
}
.login-note,
.login-lead,
.login-classic {
  font-size: 13px;
}
.login-classic {
  text-align: center;
}

/* ── Toast ────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 20px);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 32px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
}
.toast:empty {
  display: none;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.toast-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.toast-undo {
  border: 0;
  min-height: 36px;
  flex: none;
}

/* ── User menu ────────────────────────────────────────────────────────── */
.umenu {
  position: absolute;
  z-index: 40;
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  text-align: left;
}
.umenu-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 4px 8px;
  overflow-wrap: anywhere;
}
.umenu-who span {
  font-size: 12px;
}
.umenu-theme {
  border: 0;
  margin: 0;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.umenu-theme legend {
  padding: 0;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
}
.umenu-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  cursor: pointer;
}
.umenu-radio input {
  width: 16px;
  height: 16px;
  margin: 0;
}
.umenu-item {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

/* ── Company search (combobox) ────────────────────────────────────────── */
.combo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.combo-ic {
  display: inline-flex;
}
.combo input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
}
.combo input::-webkit-search-cancel-button {
  cursor: pointer;
}
.combo-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  width: max(100%, 320px);
  max-width: calc(100vw - 32px);
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
}
.combo-list [role="option"] {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  cursor: pointer;
}
.combo-list [role="option"][aria-disabled="true"] {
  cursor: default;
}
.combo-name {
  font-weight: 600;
}
.combo-meta {
  font-size: 12px;
}

/* ── Charts ───────────────────────────────────────────────────────────── */
.ring {
  position: relative;
  display: inline-block;
  flex: none;
}
.ring > svg {
  display: block;
}
.ring-c {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.05;
}
svg.fx {
  width: 100%;
  height: auto;
  display: block;
}

/* Heatmap layout (both looks). */
.hm-scroll {
  overflow-x: auto;
}
.hm {
  display: flex;
  flex-direction: column;
  min-width: 560px;
}
.hm-row {
  display: grid;
  align-items: center;
}
.hm-wk {
  text-align: center;
  font-size: 10px;
}
.hm-r {
  text-align: right;
}
.hm-c {
  text-align: center;
}
.hm-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hm-tot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.hm-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}
.hm-ramp {
  display: flex;
  align-items: center;
  gap: 3px;
}

.nf {
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hm-sw {
  display: inline-block;
  flex: none;
}
/* Headings focused by script (after a navigation) need no ring. */
[data-focus-title]:focus,
h1[tabindex="-1"]:focus,
h2[tabindex="-1"]:focus,
#main:focus {
  outline: none !important;
}

/* ── E-mail preview dialog (Ma journée) ───────────────────────────────── */
.mail-dlg {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  overflow: hidden;
}
.mail-dlg[open] {
  display: flex;
  flex-direction: column;
}
.mail-dlg::backdrop {
  background: rgba(20, 23, 26, 0.6);
}
.mail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 18px;
}
.mail-head h2 {
  flex: 1;
  font-size: 16px;
}
.mail-x {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mail-body {
  flex: 1 1 auto;
  min-height: 240px;
  display: flex;
  padding: 12px 18px;
  overflow: auto;
}
.mail-body iframe {
  flex: 1;
  width: 100%;
  min-height: 60vh;
  border: 0;
  background: #ffffff;
}
.mail-note {
  padding: 10px 18px 14px;
  font-size: 12px;
}
