/* ========================================================================== 
   Navigation V2 — Header commun + menus latéraux Admin/Client
   03/10/2026
   ========================================================================== */

.site-header {
  position: relative;
  z-index: 1000;
  width: 100%;
  height: 90px;
  margin: 0;
  padding: 0;
  background: #f7fafb;
}

body.client-auth-layout > .site-header {
  flex: 0 0 auto;
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 90px;
  border-bottom: 1px solid #d5e3ec;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: #1c4880;
  text-decoration: none;
  white-space: nowrap;
}

.site-header__logo-mark {
  display: block;
  flex: 0 0 70px;
  width: 70px;
  height: 70px;
  margin-right: 10px;
  background: url('data/icones.png') no-repeat 0 -528px;
}

.site-header__brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.site-header__brand-name,
.site-header__brand-activity {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header__brand-name {
  color: #1c4880;
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.12;
}

.site-header__brand-activity {
  margin-top: 2px;
  color: #00aae7;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.15;
}

.site-header__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-header__nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 7px;
  color: #1c4880;
  font-size: .94rem;
  font-weight: 600;
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease;
}

.site-header__nav-link:hover,
.site-header__nav-link:focus-visible,
.site-header__nav-link.is-active {
  color: #00aae7;
  background: rgba(0, 170, 231, .06);
  outline: none;
}

.site-header__svg-icon {
  display: inline-flex;
  flex: 0 0 17px;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  color: currentColor;
}

.site-header__svg-icon svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-header__svg-icon--placo svg {
  stroke-width: 1.65;
}

.site-header__utilities {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
  padding-left: 9px;
  border-left: 1px solid #d5e3ec;
}

.site-header__utility {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #1c4880;
}

.site-header__utility.is-placeholder {
  cursor: default;
}

.site-header__utility:hover {
  background: rgba(28, 72, 128, .05);
}

.site-header__badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #00aae7;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.site-header__badge--alert {
  background: #dc3545;
}

.site-header__account {
  display: flex;
  align-items: center;
  margin-left: 5px;
  padding-left: 10px;
  border-left: 1px solid #d5e3ec;
}

.site-header__account-panel {
  display: block;
}

.site-header__account-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 5px;
  color: #1c4880;
  font-size: .94rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease;
}

.site-header__account-link:hover,
.site-header__account-link:focus-visible {
  color: #00aae7;
  outline: none;
}

.site-header__menu-toggle,
.site-header__account-toggle,
.site-header__drawer-head,
.site-navigation-overlay {
  display: none;
}

/* ========================================================================== 
   Menu latéral Admin / Client
   ========================================================================== */

.app-aside-trigger {
  display: none;
}

.app-aside-nav {
  width: 100%;
}

.app-aside-menu {
  width: 100%;
  margin: 0;
  padding: 0;
  border-top: 1px solid #d5e3ec;
  list-style: none;
}

.app-aside-menu > li {
  margin: 0;
  padding: 0;
}

.app-aside-menu > li > a,
.app-aside-menu__toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 11px 15px;
  border: 0;
  border-bottom: 1px solid #d5e3ec;
  background: #ebf1f7;
  color: #1c4880;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.app-aside-menu > li > a:hover,
.app-aside-menu > li > a:focus-visible,
.app-aside-menu__toggle:hover,
.app-aside-menu__toggle:focus-visible {
  background: #e1ebf4;
  color: #00aae7;
  outline: none;
}

.app-aside-menu form { margin: 0; padding: 0; }

.app-aside-menu > li > ul {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-aside-menu > li.is-open > ul,
.app-aside-menu > li:focus-within > ul,
.app-aside-menu > li:hover > ul {
  display: block;
}

.app-aside-menu > li > ul > li > a,
.app-aside-menu > li > ul > li form a,
.app-aside-menu > li > ul > li form button {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 7px 20px 7px 25px;
  border-right: 4px solid #d5e3ec;
  border-bottom: 1px solid #e6eff4;
  background: #fff;
  color: #1c4880;
  font-size: .92rem;
  font-weight: 400;
  line-height: 1.3;
  text-decoration: none;
  width: 100%;
  border-top: 0;
  border-left: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.app-aside-menu > li > ul > li > a:hover,
.app-aside-menu > li > ul > li > a:focus-visible,
.app-aside-menu > li > ul > li form a:hover,
.app-aside-menu > li > ul > li form a:focus-visible,
.app-aside-menu > li > ul > li form button:hover,
.app-aside-menu > li > ul > li form button:focus-visible {
  border-right-color: #00aae7;
  background: #f4f8fb;
  color: #00aae7;
  outline: none;
}

.app-aside-menu__chevron {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}

.app-aside-menu > li.is-open > .app-aside-menu__toggle .app-aside-menu__chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.app-aside-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 999px;
  background: #00aae7;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 19px;
}

.catalogue-aside-menu > li.is-active > a {
  border-right-color: #00aae7;
  background: #f4f8fb;
  color: #00aae7;
  font-weight: 600;
}

/* ========================================================================== 
   Tablette + mobile
   ========================================================================== */

@media only screen and (max-width: 1024px) {
  .site-header {
    position: relative;
    height: 56px;
  }

  .site-header__inner {
    height: 56px;
    padding: 0 4px;
  }

  .site-header__brand {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 1002;
    width: min(52vw, 280px);
    height: 56px;
    transform: translateX(-50%);
    justify-content: center;
    text-align: center;
  }

  .site-header__logo-mark {
    display: none;
  }

  .site-header__brand-copy {
    align-items: center;
    max-width: 100%;
  }

  .site-header__brand-name {
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.05;
  }

  .site-header__brand-activity {
    max-width: 100%;
    margin-top: 3px;
    font-size: .78rem;
    font-weight: 500;
    line-height: 1.05;
  }

  .site-header__menu-toggle,
  .site-header__account-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #1c4880;
    cursor: pointer;
  }

  .site-header__menu-toggle {
    position: relative;
    z-index: 1003;
  }

  .site-header__menu-toggle:hover,
  .site-header__menu-toggle:focus-visible,
  .site-header__account-toggle:hover,
  .site-header__account-toggle:focus-visible {
    background: rgba(28, 72, 128, .06);
    outline: none;
  }

  .site-header__menu-bars,
  .site-header__menu-bars::before,
  .site-header__menu-bars::after {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: #343a40;
  }

  .site-header__menu-bars {
    position: relative;
  }

  .site-header__menu-bars::before,
  .site-header__menu-bars::after {
    position: absolute;
    left: 0;
    content: '';
  }

  .site-header__menu-bars::before { top: -7px; }
  .site-header__menu-bars::after { top: 7px; }

  .site-header__right {
    margin-left: auto;
  }

  .site-header__utilities {
    position: relative;
    z-index: 1003;
    gap: 0;
    margin: 0;
    padding: 0;
    border-left: 0;
  }

  .site-header__utility {
    width: 32px;
    height: 42px;
    border-radius: 8px;
  }

  .site-header__badge {
    top: 3px;
    right: 0;
  }

  .site-header__account {
    position: relative;
    /*
     * Le panneau Compte est enfant de ce conteneur.
     * Il doit donc appartenir à une pile située au-dessus de l'overlay (1100),
     * sinon l'overlay intercepte les clics sur mobile.
     */
    z-index: 1300;
    margin: 0;
    padding: 0;
    border-left: 0;
  }

  .site-header__nav,
  .site-header__account-panel {
    position: fixed;
    top: 56px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: min(320px, 86vw);
    height: calc(100dvh - 56px);
    overflow-y: auto;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 38, 64, .18);
    visibility: hidden;
    pointer-events: none;
    transition: transform .24s ease, visibility .24s ease;
  }

  .site-header__nav {
    left: 0;
    transform: translateX(-102%);
  }

  .site-header__account-panel {
    right: 0;
    transform: translateX(102%);
  }

  body.is-site-nav-open .site-header__nav {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  body.is-account-nav-open .site-header__account-panel {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .site-header__drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 0 14px;
    border-bottom: 1px solid #e6eff4;
    color: #1c4880;
  }

  .site-header__drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #343a40;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
  }

  .site-header__nav-link,
  .site-header__account-link {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border-bottom: 1px solid #e6eff4;
    border-radius: 0;
    background: #fff;
    font-size: .92rem;
  }

  .site-header__nav-link:hover,
  .site-header__nav-link:focus-visible,
  .site-header__nav-link.is-active,
  .site-header__account-link:hover,
  .site-header__account-link:focus-visible {
    background: #f4f8fb;
  }

  .site-navigation-overlay {
    position: fixed;
    inset: 56px 0 0 0;
    z-index: 1100;
    display: block;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(9, 24, 40, .32);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
  }

  body.is-site-nav-open .site-navigation-overlay,
  body.is-account-nav-open .site-navigation-overlay,
  body.is-aside-nav-open .site-navigation-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.is-navigation-locked {
    overflow: hidden;
  }

  /* Menu latéral : bouton visible, panneau hors-canvas. */
  .app-aside-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    border-bottom: 1px solid #d5e3ec;
    background: #eef5fb;
    color: #1c4880;
    font: inherit;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
  }

  .app-aside-trigger--admin {
    background: #e8f6fc;
  }

  .app-aside-trigger__bars,
  .app-aside-trigger__bars::before,
  .app-aside-trigger__bars::after {
    display: block;
    width: 19px;
    height: 2px;
    border-radius: 2px;
    background: #343a40;
  }

  .app-aside-trigger__bars {
    position: relative;
  }

  .app-aside-trigger__bars::before,
  .app-aside-trigger__bars::after {
    position: absolute;
    left: 0;
    content: '';
  }

  .app-aside-trigger__bars::before { top: -6px; }
  .app-aside-trigger__bars::after { top: 6px; }

  .app-aside-menu {
    position: fixed;
    top: 56px;
    left: 0;
    z-index: 1200;
    width: min(320px, 86vw);
    height: calc(100dvh - 56px);
    overflow-y: auto;
    border-top: 0;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 38, 64, .18);
    transform: translateX(-102%);
    visibility: hidden;
    pointer-events: none;
    transition: transform .24s ease, visibility .24s ease;
  }

  body.is-aside-nav-open .app-aside-menu {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .app-aside-menu > li:hover > ul,
  .app-aside-menu > li:focus-within > ul {
    display: none;
  }

  .app-aside-menu > li.is-open > ul {
    display: block;
  }

  .app-aside-menu > li > a,
  .app-aside-menu__toggle {
    min-height: 50px;
    font-size: .92rem;
  }

  .app-aside-menu > li > ul > li > a,
  .app-aside-menu > li > ul > li form a {
    min-height: 46px;
    font-size: .88rem;
  }
}

@media only screen and (max-width: 430px) {
  .site-header__brand {
    width: min(46vw, 175px);
  }

  .site-header__brand-name {
    font-size: .9rem;
  }

  .site-header__brand-activity {
    font-size: .7rem;
  }

  .site-header__utility {
    width: 29px;
  }

  .site-header__menu-toggle,
  .site-header__account-toggle {
    width: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header__nav,
  .site-header__account-panel,
  .site-navigation-overlay,
  .app-aside-menu,
  .app-aside-menu__chevron {
    transition: none;
  }
}

/* ========================================================================== 
   Notifications espace client — actions métier persistantes
   ========================================================================== */
.site-header__notification {
  position: relative;
}
.site-header__utility--notification {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.site-header__utility--notification:focus-visible {
  outline: 2px solid #00aae7;
  outline-offset: 2px;
}
.site-header__notification-panel[hidden] {
  display: none !important;
}
.site-header__notification-panel {
  position: absolute;
  top: calc(100% + 11px);
  right: -6px;
  z-index: 1400;
  width: 390px;
  max-width: calc(100vw - 24px);
  max-height: min(620px, calc(100vh - 90px));
  overflow: hidden;
  border: 1px solid #d9e6ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(15, 38, 64, .18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.site-header__notification.is-open .site-header__notification-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
@media (hover: hover) and (min-width: 1025px) {
  .site-header__notification:hover .site-header__notification-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
}
.site-header__notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 17px 14px;
  border-bottom: 1px solid #e5edf2;
  background: #f8fbfd;
}
.site-header__notification-head strong,
.site-header__notification-head span {
  display: block;
}
.site-header__notification-head strong {
  color: #153f63;
  font-size: 15px;
  line-height: 1.3;
}
.site-header__notification-head span {
  margin-top: 2px;
  color: #738795;
  font-size: 12px;
}
.site-header__notification-content {
  max-height: min(520px, calc(100vh - 155px));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.site-header__notification-group + .site-header__notification-group {
  border-top: 1px solid #edf2f5;
}
.site-header__notification-group-title {
  padding: 11px 17px 7px;
  color: #5d7485;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2px;
  text-transform: uppercase;
}
.site-header__notification-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  color: #263b4b;
  text-decoration: none;
  transition: background-color .15s ease;
}
.site-header__notification-item:hover,
.site-header__notification-item:focus-visible {
  background: #f2f8fc;
  outline: none;
}
.site-header__notification-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #eaf4fa;
  color: #0f6fa8;
}
.site-header__notification-item-copy {
  min-width: 0;
}
.site-header__notification-item-copy strong,
.site-header__notification-item-copy small,
.site-header__notification-item-copy > span {
  display: block;
}
.site-header__notification-item-copy strong {
  overflow: hidden;
  color: #153f63;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-header__notification-item-copy small {
  overflow: hidden;
  margin-top: 2px;
  color: #687d8b;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-header__notification-item-copy > span {
  margin-top: 4px;
  color: #0f6fa8;
  font-size: 11px;
  font-weight: 700;
}
.site-header__notification-arrow {
  color: #7d94a5;
  font-size: 22px;
  line-height: 1;
  text-align: center;
}
.site-header__notification-empty {
  padding: 23px 18px;
  color: #667b8a;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
@media only screen and (max-width: 1024px) {
  .site-header__notification-panel {
    position: fixed;
    top: 60px;
    right: 12px;
    width: min(390px, calc(100vw - 24px));
    max-height: calc(100dvh - 74px);
  }
  .site-header__notification-content {
    max-height: calc(100dvh - 142px);
  }
}
@media only screen and (max-width: 430px) {
  .site-header__notification-panel {
    right: 10px;
    left: 10px;
    width: auto;
  }
  .site-header__notification-item {
    grid-template-columns: 32px minmax(0, 1fr) 16px;
    gap: 9px;
    padding: 11px 13px;
  }
}
