.header {
  width: 100%;
  flex-shrink: 0;
}

.dynamic-header {
  width: 100%;
  min-height: 74px;
  padding: 12px 20px;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: flex-start;

  background: transparent;

  border-bottom: 1px rgb(90, 90, 90);

  position: relative;
  z-index: 1000;
}

.dynamic-header-profile {
  max-width: 100%;
  padding: 0;
  border: none;
  outline: none;
  margin-left: 20px;
  display: flex;
  align-items: center;
  gap: 5px;

  background: none;
  color: #ffffff;

  appearance: none;
  -webkit-appearance: none;
}

.dynamic-header-avatar {
  width: 41px;
  height: 41px;
  flex-shrink: 0;
  margin-left: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -20px;
  border-radius: 50%;
  overflow: hidden;

  background: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.dynamic-header-image {
  width: 100%;
  height: 100%;

  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.dynamic-header-icon {
  width: 24px;
  height: 24px;

  display: block;

  color: rgba(255, 255, 255, 0.9);
  stroke-width: 1.8;
}

.dynamic-header-title {
  color: #ffffff;

  font-family: "Inter", "Arial", sans-serif;
  font-size: 25px;
  font-weight: 800;
  line-height: 1;

  letter-spacing: -0.9px;

  transform: skewX(1deg) scaleX(0.89);

  text-align: left;
  white-space: nowrap;
}

.dynamic-header-avatar:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.dynamic-header-profile:active {
  transform: scale(0.98);
}

@media (min-width: 900px) {
  .dynamic-header {
    min-height: 66px;
    padding: 10px 16px;
    border-bottom: 1px grey;
  }

  .dynamic-header-avatar {
    width: 56px;
    margin-left: 0px;
    height: 56px;
  }

  .dynamic-header-icon {
    width: 22px;
    height: 22px;
  }

  .dynamic-header-title {
    color: #ffffff;

    font-family: "Inter", "Arial", sans-serif;
    font-size: 27px;
    font-weight: 800;
    line-height: 1;

    letter-spacing: -0.9px;

    transform: skewX(1deg) scaleX(0.89);

    text-align: left;
    white-space: nowrap;
  }

  .desktop-workspace > .header {
      width: min(100%, 1540px);
      margin: 0 auto 16px;
    }

    .desktop-workspace .dynamic-header {
      min-height: 72px;
      padding: 8px 18px;
      border: 1px solid rgba(255, 255, 255, 0.085);
      border-radius: 21px;
      background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.055),
        rgba(255, 255, 255, 0.018)
      );
      box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.065);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
    }

    .desktop-workspace .dynamic-header-profile {
      gap: 12px;
      margin-left: 0;
    }

    .desktop-workspace .dynamic-header-avatar {
      width: 48px;
      height: 48px;
      margin-left: 0;
      border: 1px solid rgba(104, 225, 255, 0.23);
      box-shadow: 0 9px 24px rgba(0, 0, 0, 0.25);
    }

    .desktop-workspace .dynamic-header-title {
      font-size: 25px;
      transform: none;
      letter-spacing: -0.035em;
  }

  .dynamic-header-cinematic {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .dynamic-header-cinematic svg {
    width: 34px;
    height: 34px;
  }
}

/* V5.3.8.76 — traduction intégrée au header */
.dynamic-header {
  justify-content: space-between;
  gap: 14px;
}

.dynamic-header-actions {
  min-width: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.dynamic-header-language-slot {
  max-width: min(44vw, 210px);
}

@media (max-width: 560px) {
  .dynamic-header {
    padding-inline: 14px;
  }

  .dynamic-header-title {
    overflow: hidden;
    max-width: 48vw;
    text-overflow: ellipsis;
  }

  .dynamic-header-actions {
    gap: 6px;
  }

  .dynamic-header-cinematic {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .dynamic-header-cinematic svg {
    width: 19px;
    height: 19px;
  }

  .dynamic-header-language-slot {
    max-width: min(39vw, 180px);
  }

  .dynamic-header-cinematic {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 13px;
  }

  .dynamic-header-cinematic svg {
    width: 27px;
    height: 27px;
  }

  .dynamic-header-share {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 13px;
  }

  .dynamic-header-share svg {
    width: 25px;
    height: 25px;
  }
}

/* PRE-V1 — accès manuel à la cinématique depuis Home */
.dynamic-header-actions {
  gap: 8px;
}

.dynamic-header-cinematic {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.dynamic-header-cinematic[hidden] {
  display: none !important;
}

.dynamic-header-cinematic:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(104, 225, 255, 0.32);
}

.dynamic-header-cinematic:active {
  transform: scale(0.95);
}

.dynamic-header-cinematic svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}

/* PRE-V1 — replay cinématique aligné visuellement avec les autres actions */
.dynamic-header-cinematic {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}

.dynamic-header-cinematic svg {
  width: 32px;
  height: 32px;
  stroke-width: 1.8;
}

.dynamic-header-cinematic:hover {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  transform: none;
}

.dynamic-header-cinematic:active {
  transform: scale(0.94);
}

.dynamic-header-cinematic:focus-visible {
  outline: 2px solid rgba(105, 234, 255, 0.9);
  outline-offset: 3px;
}

/* PRE-V1 replay v3 — action native du header partagé */
.dynamic-header-cinematic {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: rgba(255, 255, 255, 0.94);
  box-shadow: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition:
    background 0.18s ease,
    transform 0.18s ease,
    color 0.18s ease;
}

.dynamic-header-cinematic[hidden] {
  display: none !important;
}

.dynamic-header-cinematic svg {
  width: 29px;
  height: 29px;
  stroke-width: 1.8;
}

.dynamic-header-cinematic:hover {
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.dynamic-header-cinematic:active {
  transform: scale(0.94);
}

.dynamic-header-cinematic:focus-visible {
  outline: 2px solid rgba(96, 220, 255, 0.9);
  outline-offset: 3px;
}

/* Partage global Sonara Pack — action voisine de la cinématique. */
.dynamic-header-share {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: rgba(255, 255, 255, 0.94);
  box-shadow: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition:
    background 0.18s ease,
    transform 0.18s ease,
    color 0.18s ease;
}

.dynamic-header-share svg {
  width: 27px;
  height: 27px;
  stroke-width: 1.8;
}

.dynamic-header-share:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.dynamic-header-share:active {
  transform: scale(0.94);
}

.dynamic-header-share:focus-visible {
  outline: 2px solid rgba(96, 220, 255, 0.9);
  outline-offset: 3px;
}

/* V1 — personal notifications, independent of the missions layout */
.sonara-inbox-button {position:relative;}
.sonara-inbox-count {position:absolute;top:1px;right:0;min-width:17px;padding:2px 4px;border-radius:20px;background:#67dfff;color:#071523;font:700 11px/1.1 Inter,Arial,sans-serif;}
.sonara-inbox-count[hidden],.sonara-inbox-dialog [hidden]{display:none!important;}
.sonara-inbox-dialog {box-sizing:border-box;width:min(440px,calc(100vw - 24px));max-height:80vh;margin:auto;padding:20px;border:1px solid #314356;border-radius:22px;background:#101b2c;color:#f5faff;box-shadow:0 20px 70px #0008;font-family:Inter,Arial,sans-serif;overflow:auto;}
.sonara-inbox-dialog::backdrop {background:#020811ad;}
.sonara-inbox-heading,.sonara-inbox-tabs {display:flex;align-items:center;gap:8px;justify-content:space-between;margin-bottom:14px;}
.sonara-inbox-heading h2{font-size:20px;margin:0;}
.sonara-inbox-dialog button{cursor:pointer;color:inherit;background:#18283a;border:1px solid #33475e;border-radius:10px;padding:9px 12px;font:inherit;}
.sonara-inbox-tabs button{flex:1;min-width:0;overflow-wrap:anywhere;}
.sonara-inbox-tabs button[aria-pressed="true"]{border-color:#67dfff;color:#67dfff;}
.sonara-inbox-dialog [data-read]{font-size:12px;margin-bottom:10px;}
.sonara-inbox-list{display:grid;gap:8px;}
.sonara-inbox-list p{color:#b4c3d4;font-size:14px;}
.sonara-inbox-item{display:grid;gap:5px;border:1px solid #2a3c50;border-radius:12px;padding:12px;text-decoration:none;color:#f5faff;overflow-wrap:anywhere;}
.sonara-inbox-item>span{font-size:13px;color:#b8c6d6;}
.sonara-inbox-item.is-unread{border-inline-start:3px solid #67dfff;background:#142b40;}
@media(max-width:560px){.dynamic-header:has(.sonara-inbox-button) .dynamic-header-title{max-width:31vw;}.dynamic-header:has(.sonara-inbox-button) .dynamic-header-actions{gap:4px;}}
