/**
 * Navbar Athena (structure Caverne) — void #050505 · primary #059669 · mint #34d399.
 * Styles de layout auto-portés (ne pas dépendre des utilitaires Tailwind arbitraires
 * absents du build purge).
 *
 * Empilement (stacking) :
 *   alertes navbar / tuiles TRANSMISSION = 94–95
 *   header Athena (+ menus / panels)     = 96  ← au-dessus des alertes
 *   rail dashboard / BO fixed            = 100
 *   drawer / overlay portail (invités)   = 110–120
 *   rail bureau effectifs                = 120
 *   toasts flash (#flash-toast-root)     = 180
 *
 * Isolation : body.layout-light / .dash-cc imposent color #0f172a et fond clair —
 * la barre doit rester void sombre (sinon sous-ligne grise illisible + liens « bleus »).
 */

:root {
  --athena-header-h: 4rem;
  --athena-header-bg: #050505;
  --athena-header-muted: #a1a1aa;
  --athena-header-line: rgba(255, 255, 255, 0.12);
  --athena-header-accent: #059669;
  --athena-header-mint: #34d399;
  --athena-header-mint-bright: #6ee7b7;
  --athena-header-danger: #fb7185;
  --athena-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --athena-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  --athena-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

nav.athena-header,
.athena-header,
body.layout-light .athena-header,
.dash-cc .athena-header,
.dash-cc__main > .athena-header {
  position: sticky;
  top: 0;
  z-index: 96;
  box-sizing: border-box;
  height: var(--athena-header-h);
  min-height: var(--athena-header-h);
  max-height: var(--athena-header-h);
  padding: 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #050505 !important;
  background-color: #050505 !important;
  background-image: none !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-family: Inter, system-ui, sans-serif;
  color: #ffffff !important;
  overflow: visible;
  /* Coupe l’héritage layout-light / dash-cc (texte slate sur fond clair) */
  --text: #ffffff;
  --muted: #a1a1aa;
  --bg: #050505;
  --surface: #050505;
}

.athena-header__inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 1920px;
  height: 100%;
  min-height: var(--athena-header-h);
  margin: 0 auto;
  min-width: 0;
}

.athena-header__brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.85rem;
  max-width: min(42vw, 16rem);
  text-decoration: none;
  color: inherit;
}

.athena-header__brand-mark {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 2px;
  background: #fff;
  color: #050505;
  font-size: 1.25rem;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  transition: transform 0.2s ease;
}

/* Emblème ATHENA (aigle) : masque SVG, prend la couleur du texte du carré. */
.athena-header__brand-emblem {
  display: block;
  width: 84%;
  height: 84%;
  background: currentColor;
  -webkit-mask: url("../brand/athena-embleme-noir.svg") center / contain no-repeat;
  mask: url("../brand/athena-embleme-noir.svg") center / contain no-repeat;
}

.athena-header__brand:hover .athena-header__brand-mark,
.athena-header__brand:focus-visible .athena-header__brand-mark {
  transform: rotate(-2deg);
}

.athena-header__brand-text {
  display: none;
  flex-direction: column;
  min-width: 0;
}

@media (min-width: 640px) {
  .athena-header__brand-text {
    display: flex;
  }
}

.athena-header__brand-title {
  font-size: 0.875rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #ffffff !important;
}

.athena-header__brand-dot {
  color: var(--athena-header-mint) !important;
}

.athena-header__brand-sub {
  margin-top: 0.3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #a3a3a3 !important;
}

.athena-header__nav-center {
  display: none;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 0;
  overflow: hidden;
}

@media (min-width: 768px) {
  .athena-header__nav-center {
    display: flex;
  }
}

.athena-header__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-left: auto;
  /* Ne jamais compresser CTA / avatar (évite le clip à droite) */
}

@media (min-width: 640px) {
  .athena-header__actions {
    gap: 0.75rem;
  }
}

.athena-header__guide-btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 2.5rem;
  height: 2.5rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: transparent;
  color: #e4e4e7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.athena-header__guide-btn:hover,
.athena-header__guide-btn:focus-visible {
  border-color: rgba(52, 211, 153, 0.55);
  color: #6ee7b7;
  outline: none;
}

.athena-header__sep {
  flex-shrink: 0;
  color: #404040;
  font-size: 10px;
  line-height: 1;
  user-select: none;
}

.athena-header__link {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  box-sizing: border-box;
  height: 2rem;
  padding: 0 0.7rem;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #a1a1aa !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.athena-header__link:hover {
  color: #ffffff !important;
  background: transparent !important;
}

.athena-header__link--active {
  color: #ffffff !important;
  font-style: italic;
  border-bottom-color: var(--athena-header-accent) !important;
  text-decoration: none !important;
  background: transparent !important;
}

.athena-header__cta {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-sizing: border-box;
  min-height: 2.5rem;
  height: 2.5rem;
  padding: 0 1.1rem;
  border: 1px solid rgba(5, 150, 105, 0.5);
  border-radius: 6px;
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 
    0 2px 8px rgba(5, 150, 105, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
  overflow: hidden;
}

.athena-header__cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.athena-header__cta:hover,
.athena-header__cta:focus-visible {
  outline: none;
  background: linear-gradient(135deg, #047857, #065f46);
  border-color: #059669;
  transform: translateY(-2px);
  box-shadow: 
    0 4px 16px rgba(5, 150, 105, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.athena-header__cta:hover::before {
  opacity: 1;
}

.athena-header__cta:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 8px rgba(5, 150, 105, 0.3),
    inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.athena-header__cta.is-active {
  box-shadow: 
    inset 0 -2px 0 rgba(255, 255, 255, 0.25),
    0 2px 8px rgba(5, 150, 105, 0.3);
}

.athena-header__cta-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.athena-header__cta-label {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .athena-header__cta-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .athena-header__cta {
    min-width: 2.5rem;
    padding: 0 0.65rem;
  }
}

.athena-header__menu-trigger,
.athena-header__icon-btn,
.athena-header__profile-trigger {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-sizing: border-box;
  min-height: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.04)) !important;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.04)) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--athena-shadow-sm);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.athena-header__menu-trigger {
  padding: 0 0.9rem;
}

.athena-header__icon-btn {
  min-width: 2.5rem;
  width: auto;
  padding: 0 0.75rem;
}

.athena-header__menu-trigger:hover,
.athena-header__menu-trigger:focus-visible,
.athena-header__menu-trigger[aria-expanded="true"],
.athena-header__icon-btn:hover,
.athena-header__icon-btn:focus-visible,
.athena-header__icon-btn[aria-expanded="true"],
.athena-header__profile-trigger:hover,
.athena-header__profile-trigger:focus-visible,
.athena-header__profile-trigger[aria-expanded="true"] {
  outline: none;
  color: #fff !important;
  border-color: rgba(5, 150, 105, 0.5) !important;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.2), rgba(5, 150, 105, 0.15)) !important;
  background-image: linear-gradient(135deg, rgba(5, 150, 105, 0.2), rgba(5, 150, 105, 0.15)) !important;
  box-shadow: 
    0 0 12px rgba(5, 150, 105, 0.2),
    var(--athena-shadow);
  transform: translateY(-1px);
}

.athena-header__chevron {
  width: 0.75rem;
  height: 0.75rem;
  opacity: 0.7;
  transition: transform 0.18s ease;
}

.athena-header__menu-trigger[aria-expanded="true"] .athena-header__chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.athena-header__dot {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--athena-header-mint-bright), var(--athena-header-mint));
  color: #0a0f0e;
  font-size: 9px;
  font-weight: 900;
  line-height: 17px;
  text-align: center;
  letter-spacing: 0;
  box-shadow: 
    0 0 0 2.5px #050505,
    0 0 12px rgba(52, 211, 153, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  animation: athena-badge-pulse 2s ease-in-out infinite;
}

@keyframes athena-badge-pulse {
  0%, 100% { 
    box-shadow: 
      0 0 0 2.5px #050505,
      0 0 12px rgba(52, 211, 153, 0.6),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
  50% { 
    box-shadow: 
      0 0 0 2.5px #050505,
      0 0 18px rgba(52, 211, 153, 0.9),
      inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }
}

.athena-header__dot--urgent {
  background: radial-gradient(circle, #fb7185, #e11d48);
  color: #fff;
  box-shadow: 
    0 0 0 2.5px #050505,
    0 0 12px rgba(225, 29, 72, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: athena-badge-pulse-urgent 1.5s ease-in-out infinite;
}

@keyframes athena-badge-pulse-urgent {
  0%, 100% { 
    box-shadow: 
      0 0 0 2.5px #050505,
      0 0 12px rgba(225, 29, 72, 0.7),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  50% { 
    box-shadow: 
      0 0 0 2.5px #050505,
      0 0 20px rgba(225, 29, 72, 1),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
}

.athena-header__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
}

.athena-header__panel.hidden {
  display: none !important;
}

.athena-header__panel-head {
  margin: 0 0 0.85rem;
}

.athena-header__kicker {
  margin: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--athena-header-mint);
}

.athena-header__panel-title {
  margin: 0.2rem 0 0;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.athena-header__panel--quick {
  width: min(22rem, calc(100vw - 1.25rem));
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(12, 12, 15, 0.98), rgba(8, 8, 11, 0.96));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 
    0 0 0 1px rgba(5, 150, 105, 0.08),
    0 20px 56px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.athena-header__quick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 6px 12px;
}

.athena-header__quick-head strong,
.athena-header__quick-head span {
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.athena-header__quick-head strong {
  color: #fff;
}

.athena-header__quick-head span {
  color: var(--athena-header-mint);
}

.athena-header__quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.athena-header__quick-grid a {
  min-height: 42px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(9, 9, 13, 0.95), rgba(6, 6, 10, 0.9));
  color: rgba(255, 255, 255, 0.65);
  padding: 0 14px;
  text-decoration: none;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: all 0.2s ease;
  position: relative;
}

.athena-header__quick-grid a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--athena-header-accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.athena-header__quick-grid a:hover {
  color: #fff;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.22), rgba(5, 150, 105, 0.15));
}

.athena-header__quick-grid a:hover::before {
  opacity: 1;
}

.athena-header__panel--notif {
  width: min(340px, calc(100vw - 1.25rem));
}

.athena-header__notif-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(12, 12, 15, 0.98), rgba(8, 8, 11, 0.96));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 
    0 0 0 1px rgba(5, 150, 105, 0.08),
    0 20px 56px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  max-height: min(70vh, 420px);
  display: flex;
  flex-direction: column;
}

.athena-header__notif-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.athena-header__notif-head p {
  margin: 0;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.athena-header__notif-head h3 {
  margin: 0.2rem 0 0;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
}

.athena-header__notif-head strong {
  color: var(--athena-header-mint);
  font-size: 16px;
  font-weight: 900;
  font-style: italic;
}

.athena-header__notif-list {
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}

.athena-header__notif-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.athena-header__notif-item {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.athena-header__notif-meta {
  margin: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.athena-header__notif-title {
  margin: 0.35rem 0 0;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.athena-header__notif-body {
  margin: 0.35rem 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

.athena-header__notif-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  margin-top: 0.5rem;
}

.athena-header__notif-cta {
  display: inline-flex;
  margin-top: 0;
  font-size: 11px;
  font-weight: 800;
  color: var(--athena-header-mint);
  text-decoration: none;
}

.athena-header__notif-cta:hover {
  text-decoration: underline;
}

.athena-header__notif-cta--secondary {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
}

.athena-header__notif-cta--secondary:hover {
  color: #fff;
}

.athena-header__profile-trigger {
  gap: 0.65rem;
  padding: 0 0.7rem 0 0.85rem;
  max-width: min(100%, 18rem);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.athena-header__profile-identity {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  max-width: 11rem;
  line-height: 1.05;
  text-align: right;
}

@media (min-width: 640px) {
  .athena-header__profile-identity {
    display: flex;
  }
}

.athena-header__profile-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #f3f4f6 !important;
}

.athena-header__profile-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.athena-header__avatar {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #059669;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.athena-header__avatar--photo {
  background: #0a0a0a;
  padding: 0;
}

.athena-header__avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.athena-header__panel--profile {
  width: min(380px, calc(100vw - 1.25rem));
}

.athena-header__profile-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(12, 12, 15, 0.98), rgba(8, 8, 11, 0.96));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 
    0 0 0 1px rgba(5, 150, 105, 0.08),
    0 20px 56px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  max-height: min(calc(100vh - 4.75rem), 560px);
  overflow-y: auto;
}

.athena-header__profile-cover {
  position: relative;
  height: 88px;
  overflow: hidden;
  background: linear-gradient(135deg, #0b3d2e 0%, #050505 70%);
}

.athena-header__profile-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.athena-header__profile-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 5, 7, 0.98), rgba(5, 5, 7, 0.2));
  z-index: 1;
}

.athena-header__profile-topline {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  z-index: 2;
}

.athena-header__profile-topline span,
.athena-header__profile-topline b {
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.athena-header__profile-topline span {
  color: rgba(255, 255, 255, 0.52);
}

.athena-header__profile-topline b {
  color: #fff;
}

.athena-header__profile-body {
  padding: 12px;
}

.athena-header__profile-identity-block {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
}

.athena-header__profile-avatar-lg {
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #059669;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.athena-header__profile-avatar-lg--photo {
  background: #0a0a0a;
  padding: 0;
}

.athena-header__profile-name-block {
  min-width: 0;
}

.athena-header__profile-name-block strong {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.athena-header__profile-name-block span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.35;
}

.athena-header__profile-status {
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: #34d399;
  padding: 5px 7px;
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.athena-header__profile-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 10px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.athena-header__profile-fact {
  padding: 7px 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}

.athena-header__profile-fact:nth-child(2n),
.athena-header__profile-fact:last-child:nth-child(odd) {
  border-right: 0;
}

.athena-header__profile-fact:nth-last-child(-n+2) {
  border-bottom: 0;
}

.athena-header__profile-fact dt {
  margin: 0;
  color: rgba(255, 255, 255, 0.38);
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.athena-header__profile-fact dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 2px 0 0;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  font-style: italic;
  line-height: 1.25;
  word-break: break-word;
}

.athena-header__profile-otan {
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--athena-header-mint);
  font-size: 8px;
  font-weight: 900;
  font-style: normal;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.athena-header__profile-sessionid {
  margin: 8px 1px 0;
  color: rgba(255, 255, 255, 0.3);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.athena-header__profile-menu {
  display: grid;
  gap: 1px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.athena-header__profile-menu a,
.athena-header__profile-menu button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 42px;
  margin: 0;
  border: 0;
  background: linear-gradient(135deg, rgba(9, 9, 13, 0.95), rgba(6, 6, 10, 0.9));
  padding: 10px 12px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  overflow: hidden;
  transition: all 0.2s ease;
}

.athena-header__profile-menu a::before,
.athena-header__profile-menu button::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--athena-header-accent), transparent);
  box-shadow: 0 0 8px rgba(5, 150, 105, 0.4);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.athena-header__profile-menu a:hover,
.athena-header__profile-menu button:hover {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.18), rgba(5, 150, 105, 0.12));
}

.athena-header__profile-menu a:hover::before,
.athena-header__profile-menu button:hover::before {
  opacity: 1;
}

.athena-header__profile-menu a span,
.athena-header__profile-menu button span {
  display: block;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  transition: color 0.2s ease;
}

.athena-header__profile-menu a:hover span,
.athena-header__profile-menu button:hover span {
  color: var(--athena-header-mint-bright);
}

.athena-header__profile-menu a em,
.athena-header__profile-menu button em {
  display: none;
}

.athena-header__profile-menu button.danger span {
  color: var(--athena-header-danger);
}

.athena-header__profile-menu button.danger:hover span {
  color: #fecaca;
}

.athena-header__profile-menu button.danger::before {
  background: linear-gradient(180deg, transparent, var(--athena-header-danger), transparent);
  box-shadow: 0 0 8px rgba(251, 113, 133, 0.4);
}

.athena-header__profile-menu button.danger:hover {
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.15), rgba(251, 113, 133, 0.1));
}

.athena-header__logout-form {
  margin: 0;
}

.athena-header__menu-label {
  display: none;
}


@media (prefers-reduced-motion: reduce) {
  .athena-header__cta,
  .athena-header__menu-trigger,
  .athena-header__icon-btn,
  .athena-header__profile-trigger,
  .athena-header__chevron,
  .athena-header__brand-mark {
    transition: none;
    transform: none;
  }
}

/* ==========================================================================
 * Responsive — barre membre du portail (.athena-header--portal)
 * Paliers : < 1280px menu burger (liens + Espaces + langue) ; ≥ 1280px liens
 * en ligne. Les panneaux (alertes, profil, menu) passent en pleine largeur sous
 * la barre sur téléphone. Portée limitée au modificateur --portal : l’en-tête
 * invité des pages d’authentification (athena_header_guest) reste inchangé.
 * ========================================================================== */

.athena-header--portal {
  padding: 0 0.75rem;
}

@media (min-width: 640px) {
  .athena-header--portal {
    padding: 0 1rem;
  }
}

.athena-header--portal .athena-header__inner {
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .athena-header--portal .athena-header__inner {
    gap: 0.75rem;
  }
}

/* Marque : rétrécit avant les actions, nom de communauté tronqué (…) */
.athena-header--portal .athena-header__brand {
  flex: 0 1 auto;
  min-width: 2.5rem;
  max-width: min(42vw, 16rem);
  gap: 0.6rem;
  overflow: hidden;
}

.athena-header--portal .athena-header__brand-text {
  overflow: hidden;
}

.athena-header--portal .athena-header__brand-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 360px) {
  .athena-header--portal .athena-header__brand-text {
    display: flex;
  }
}

@media (min-width: 640px) {
  .athena-header--portal .athena-header__brand {
    gap: 0.85rem;
  }
}

/* Liens centraux : uniquement quand ils tiennent ; défilement horizontal
   discret plutôt que coupure si la communauté a beaucoup de modules. */
.athena-header--portal .athena-header__nav-center {
  display: none;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.athena-header--portal .athena-header__nav-center::-webkit-scrollbar {
  display: none;
}

/* Centre quand il y a de la place, aligne à gauche (sans couper) sinon. */
.athena-header--portal .athena-header__nav-center > :first-child {
  margin-left: auto;
}

.athena-header--portal .athena-header__nav-center > :last-child {
  margin-right: auto;
}

.athena-header--portal .athena-header__link {
  height: 2.5rem;
  padding: 0 0.55rem;
  letter-spacing: 0.1em;
}

@media (min-width: 1280px) {
  .athena-header--portal .athena-header__nav-center {
    display: flex;
  }
}

/* Desktop compact : marque resserrée, séparateurs masqués pour garder
   jusqu’à 7 modules visibles sans défilement. */
@media (min-width: 1280px) and (max-width: 1919px) {
  .athena-header--portal .athena-header__brand {
    max-width: 11rem;
  }

  .athena-header--portal .athena-header__sep {
    display: none;
  }

  .athena-header--portal .athena-header__link {
    padding: 0 0.5rem;
    letter-spacing: 0.08em;
  }
}

/* Actions : jamais de débordement à droite */
.athena-header--portal .athena-header__actions {
  gap: 0.4rem;
  min-width: 0;
}

@media (min-width: 640px) {
  .athena-header--portal .athena-header__actions {
    gap: 0.6rem;
  }
}

/* CTA : icône seule sur téléphone et en desktop compact, libellé sinon */
@media (max-width: 767px), (min-width: 1280px) and (max-width: 1535px) {
  .athena-header--portal .athena-header__cta-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .athena-header--portal .athena-header__cta {
    width: 2.5rem;
    min-width: 2.5rem;
    padding: 0;
  }
}

.athena-header--portal .athena-header__icon-btn {
  padding: 0 0.7rem;
}

/* Profil : avatar seul tant que la place manque, nom + grade sur grand écran */
.athena-header--portal .athena-header__profile-trigger {
  gap: 0.45rem;
  padding: 0 0.55rem;
}

.athena-header--portal .athena-header__profile-identity {
  display: none;
}

.athena-header--portal .athena-header__avatar {
  width: 26px;
  height: 26px;
  border-radius: 4px;
}

@media (min-width: 1680px) {
  .athena-header--portal .athena-header__profile-trigger {
    padding: 0 0.7rem 0 0.85rem;
  }

  .athena-header--portal .athena-header__profile-identity {
    display: flex;
  }
}

/* Burger */
.athena-header__burger-icon {
  width: 1.15rem;
  height: 1.15rem;
}

.athena-header__burger-icon--close,
.athena-header__burger[aria-expanded="true"] .athena-header__burger-icon--open {
  display: none;
}

.athena-header__burger[aria-expanded="true"] .athena-header__burger-icon--close {
  display: block;
}

@media (min-width: 1280px) {
  .athena-header--portal .athena-header__burger-wrap,
  .athena-header--portal .athena-header__panel--drawer {
    display: none !important;
  }
}

/* Panneau menu (burger) */
.athena-header__panel--drawer {
  width: min(24rem, calc(100vw - 1.5rem));
  max-height: calc(100vh - var(--athena-header-h) - 1.5rem);
  max-height: calc(100dvh - var(--athena-header-h) - 1.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(12, 12, 15, 0.99), rgba(8, 8, 11, 0.98));
  box-shadow:
    0 0 0 1px rgba(5, 150, 105, 0.08),
    0 24px 64px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.athena-header__drawer-links {
  display: grid;
  gap: 2px;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.athena-header__drawer-link {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 2.75rem;
  padding: 0 0.85rem;
  border-left: 2px solid transparent;
  border-radius: 8px;
  color: #d4d4d8 !important;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none !important;
  transition: background 0.2s ease, color 0.2s ease;
}

.athena-header__drawer-link:hover,
.athena-header__drawer-link:focus-visible {
  outline: none;
  background: rgba(5, 150, 105, 0.16);
  color: #fff !important;
}

.athena-header__drawer-link.is-active {
  border-left-color: var(--athena-header-accent);
  background: rgba(255, 255, 255, 0.05);
  color: #fff !important;
  font-style: italic;
}

.athena-header__drawer-lang {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.athena-header__drawer-lang > span {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.athena-header__drawer-lang a,
.athena-header__drawer-lang [aria-current] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.5rem;
}

@media (min-width: 640px) {
  .athena-header__panel--drawer .athena-header__drawer-lang {
    display: none;
  }
}

/* Téléphone : panneaux en pleine largeur sous la barre (le header, avec
   backdrop-filter, sert de bloc conteneur aux éléments fixed). */
@media (max-width: 639px) {
  .athena-header--portal .athena-header__panel {
    position: fixed;
    top: var(--athena-header-h);
    left: 0.5rem;
    right: 0.5rem;
    width: auto;
    margin-top: 0.4rem;
  }

  .athena-header--portal .athena-header__notif-card,
  .athena-header--portal .athena-header__profile-card {
    max-height: calc(100vh - var(--athena-header-h) - 1rem);
    max-height: calc(100dvh - var(--athena-header-h) - 1rem);
  }

  .athena-header--portal .athena-header__dot {
    top: -6px;
    right: -6px;
  }
}

/* ——— Menus déroulants, menu profil et boutons de la barre (refonte 2026-10) ———
 * Boutons : coins plus doux, plus de saut au survol. Panneaux : même rayon, ombre et entrée en fondu.
 * Menu profil : en-tête lisible (plus de texte 7–8 px en italique), faits en cartes, liens avec leur description. */
.athena-header__menu-trigger,
.athena-header__icon-btn,
.athena-header__profile-trigger {
  border-radius: 10px;
}

.athena-header__menu-trigger:hover,
.athena-header__menu-trigger:focus-visible,
.athena-header__menu-trigger[aria-expanded="true"],
.athena-header__icon-btn:hover,
.athena-header__icon-btn:focus-visible,
.athena-header__icon-btn[aria-expanded="true"],
.athena-header__profile-trigger:hover,
.athena-header__profile-trigger:focus-visible,
.athena-header__profile-trigger[aria-expanded="true"] {
  transform: none;
}

.athena-header__menu-trigger:focus-visible,
.athena-header__icon-btn:focus-visible,
.athena-header__profile-trigger:focus-visible {
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.35) !important;
}

.athena-header__profile-trigger {
  padding: 0 0.6rem 0 0.8rem;
}

.athena-header__profile-name {
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

.athena-header__profile-title {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.55);
}

.athena-header__avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.athena-header__profile-trigger[aria-expanded="true"] .athena-header__chevron {
  transform: rotate(180deg);
  opacity: 1;
}

@keyframes athena-panel-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.athena-header__panel:not(.hidden) {
  animation: athena-panel-in 0.16s ease-out both;
  transform-origin: top right;
}

@media (prefers-reduced-motion: reduce) {
  .athena-header__panel:not(.hidden) { animation: none; }
}

/* Menu profil */
.athena-header__panel--profile {
  width: min(360px, calc(100vw - 1.25rem));
}

.athena-header__profile-card {
  border-radius: 14px;
  max-height: min(calc(100vh - 5rem), 640px);
}

.athena-header__profile-cover {
  height: 58px;
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(18, 209, 142, 0.28) 0%, rgba(18, 209, 142, 0) 60%),
    linear-gradient(135deg, #0b2a21 0%, #070a0c 75%);
}

.athena-header__profile-topline {
  bottom: 8px;
  left: 14px;
  right: 14px;
  align-items: center;
}

.athena-header__profile-topline span,
.athena-header__profile-topline b {
  font-size: 9.5px;
  letter-spacing: 0.12em;
}

.athena-header__profile-topline b {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.35);
}

.athena-header__profile-body {
  padding: 14px;
}

.athena-header__profile-identity-block {
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  margin-top: -32px;
  position: relative;
  z-index: 3;
}

.athena-header__profile-avatar-lg {
  width: 48px;
  height: 48px;
  border: 2px solid #0b0d10;
  border-radius: 12px;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.8);
}

.athena-header__profile-name-block {
  padding-top: 26px;
}

.athena-header__profile-name-block strong {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.athena-header__profile-name-block span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.58);
}

.athena-header__profile-status {
  align-self: end;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(52, 211, 153, 0.1);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.athena-header__profile-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
  border: 0;
}

.athena-header__profile-fact,
.athena-header__profile-fact:nth-child(2n),
.athena-header__profile-fact:nth-last-child(-n+2) {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.athena-header__profile-fact:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.athena-header__profile-fact dt {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.45);
}

.athena-header__profile-fact dd {
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 700;
  font-style: normal;
}

.athena-header__profile-otan {
  font-size: 9px;
}

.athena-header__profile-sessionid {
  margin: 10px 2px 0;
}

.athena-header__profile-menu {
  gap: 2px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
}

.athena-header__profile-menu a,
.athena-header__profile-menu button {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  min-height: 44px;
  padding: 8px 34px 8px 12px;
  border-radius: 10px;
  background: transparent;
}

.athena-header__profile-menu a::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 1.6px solid rgba(255, 255, 255, 0.35);
  border-right: 1.6px solid rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) rotate(45deg);
  transition: border-color 0.15s ease, right 0.15s ease;
}

.athena-header__profile-menu a:hover::after {
  right: 11px;
  border-color: var(--athena-header-mint-bright);
}

.athena-header__profile-menu a::before,
.athena-header__profile-menu button::before {
  inset: 8px auto 8px 0;
  border-radius: 3px;
}

.athena-header__profile-menu a:hover,
.athena-header__profile-menu button:hover {
  background: rgba(5, 150, 105, 0.14);
}

.athena-header__profile-menu a span,
.athena-header__profile-menu button span {
  font-size: 12.5px;
  font-weight: 800;
}

.athena-header__profile-menu a em,
.athena-header__profile-menu button em {
  display: block;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.3;
}

.athena-header__logout-form {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Notifications */
.athena-header__notif-card {
  border-radius: 14px;
}

/* Panneaux opaques : la barre d’identité ne transparaît plus derrière les menus. */
.athena-header__profile-card,
.athena-header__notif-card {
  background: linear-gradient(135deg, #0c0d10, #08090b);
}

/* ==========================================================================
   Refonte 2026 — barre plus carrée, plus calme, hiérarchie nette.
   Une seule action principale (CTA), le reste en boutons discrets de 36 px,
   coins 2 px (comme le back-office), typographie en casse normale.
   ========================================================================== */
:root {
  --athena-header-h: 3.5rem;
  --ah-ctl: 36px;
  --ah-radius: 2px;
  --ah-line: rgba(255, 255, 255, 0.1);
  --ah-line-strong: rgba(255, 255, 255, 0.18);
  --ah-hover: rgba(255, 255, 255, 0.06);
  --ah-ink: #f4f4f5;
  --ah-muted: #a1a1aa;
  --ah-dim: #8b8b93;
  --ah-focus: #34d399;
}

nav.athena-header,
.athena-header,
body.layout-light .athena-header,
.dash-cc .athena-header,
.dash-cc__main > .athena-header {
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--ah-line);
  background: #070908 !important;
  background-color: #070908 !important;
}

.athena-header__inner { gap: 0.5rem; }

/* Marque */
.athena-header__brand { gap: 0.7rem; margin-right: 0.5rem; }
.athena-header__brand-mark { width: 2rem; height: 2rem; border-radius: var(--ah-radius); }
.athena-header__brand:hover .athena-header__brand-mark,
.athena-header__brand:focus-visible .athena-header__brand-mark { transform: none; box-shadow: 0 0 0 2px var(--ah-focus); }
.athena-header__brand:focus-visible { outline: none; }
.athena-header__brand-title { font-size: 0.95rem; letter-spacing: -0.02em; }
.athena-header__brand-sub { font-size: 11px !important; letter-spacing: 0.01em !important; text-transform: none !important; color: var(--ah-dim) !important; font-weight: 500 !important; }

/* Navigation principale : casse normale, soulignement actif net */
.athena-header__sep { display: none; }
.athena-header__nav-center { gap: 0.1rem; }
.athena-header__link {
  height: var(--athena-header-h);
  padding: 0 0.75rem;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ah-muted) !important;
}
.athena-header__link:hover { color: var(--ah-ink) !important; border-bottom-color: var(--ah-line-strong) !important; }
.athena-header__link--active,
.athena-header__link--active:hover { font-style: normal; color: #fff !important; border-bottom-color: var(--athena-header-mint) !important; }
.athena-header__link:focus-visible { outline: 2px solid var(--ah-focus) !important; outline-offset: -8px; }

/* Contrôles communs : 36 px, carrés, sans dégradé ni « saut » au survol */
.athena-header__actions { gap: 0.375rem; }
.athena-header__btn-icon { width: 16px; height: 16px; flex-shrink: 0; }
.athena-header__menu-trigger,
.athena-header__icon-btn,
.athena-header__profile-trigger,
.athena-header__guide-btn {
  min-height: var(--ah-ctl) !important;
  height: var(--ah-ctl) !important;
  border: 1px solid transparent !important;
  border-radius: var(--ah-radius) !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--ah-muted) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  transform: none !important;
}
.athena-header__menu-trigger { padding: 0 0.7rem; gap: 0.45rem; }
.athena-header__icon-btn { min-width: var(--ah-ctl); padding: 0 0.55rem; }
.athena-header__guide-btn { gap: 0.4rem; padding: 0 0.6rem; }
.athena-header__menu-trigger:hover,
.athena-header__icon-btn:hover,
.athena-header__profile-trigger:hover,
.athena-header__guide-btn:hover {
  color: var(--ah-ink) !important;
  background: var(--ah-hover) !important;
  border-color: var(--ah-line) !important;
}
.athena-header__menu-trigger[aria-expanded="true"],
.athena-header__icon-btn[aria-expanded="true"],
.athena-header__profile-trigger[aria-expanded="true"] {
  color: #fff !important;
  background: rgba(52, 211, 153, 0.1) !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
}
.athena-header__menu-trigger:focus-visible,
.athena-header__icon-btn:focus-visible,
.athena-header__profile-trigger:focus-visible,
.athena-header__guide-btn:focus-visible,
.athena-header__cta:focus-visible {
  outline: 2px solid var(--ah-focus) !important;
  outline-offset: 2px !important;
}

/* Action principale */
.athena-header__cta {
  min-height: var(--ah-ctl);
  height: var(--ah-ctl);
  margin: 0 0.25rem;
  padding: 0 0.95rem 0 0.8rem;
  border: 1px solid #10b981;
  border-radius: var(--ah-radius);
  background: #059669;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.athena-header__cta::before { display: none; }
.athena-header__cta:hover,
.athena-header__cta:focus-visible { background: #047857; border-color: #34d399; transform: none; box-shadow: none; }
.athena-header__cta:active { transform: none; box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.2); }
.athena-header__cta.is-active { box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.5); }
.athena-header__cta-icon { width: 15px; height: 15px; }

/* Langue : bascule segmentée carrée */
.athena-header__lang nav {
  height: var(--ah-ctl);
  box-sizing: border-box;
  padding: 3px !important;
  gap: 2px !important;
  border-color: var(--ah-line) !important;
  border-radius: var(--ah-radius) !important;
  background: transparent !important;
  letter-spacing: 0.04em !important;
  font-size: 11px !important;
}
.athena-header__lang nav > * {
  display: inline-flex;
  align-items: center;
  height: 100%;
  box-sizing: border-box;
  padding: 0 0.5rem !important;
  border-radius: 1px !important;
}
.athena-header__lang nav > [aria-current] { background: rgba(52, 211, 153, 0.16) !important; color: #6ee7b7 !important; }
.athena-header__lang nav > a:focus-visible { outline: 2px solid var(--ah-focus); outline-offset: 1px; }

/* Pastille de notifications : petite, carrée, sans pulsation permanente */
.athena-header__dot {
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--ah-radius);
  background: #34d399;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  box-shadow: 0 0 0 2px #070908;
  animation: none;
}
.athena-header__dot--urgent { background: #f43f5e; color: #fff; box-shadow: 0 0 0 2px #070908; }

/* Puce identité : compacte, avatar carré */
.athena-header__profile-trigger { gap: 0.55rem; padding: 0 0.45rem 0 0.6rem !important; max-width: 17rem; }
.athena-header__profile-identity { align-items: flex-end; min-width: 0; }
.athena-header__profile-name { font-size: 13px !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--ah-ink) !important; max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.athena-header__profile-title { font-size: 11px !important; font-weight: 500 !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--ah-dim) !important; max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.athena-header__avatar { width: 26px !important; height: 26px !important; min-width: 26px; border-radius: var(--ah-radius) !important; }
.athena-header__avatar-img { border-radius: var(--ah-radius) !important; }

/* Panneaux déroulants */
.athena-header__panel {
  border-radius: var(--ah-radius) !important;
  border-color: var(--ah-line-strong) !important;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7) !important;
}
.athena-header__notif-card,
.athena-header__profile-card,
.athena-header__profile-cover,
.athena-header__profile-avatar-lg,
.athena-header__notif-cta,
.athena-header__profile-menu a,
.athena-header__profile-menu button,
.athena-header__drawer-link,
.athena-header__profile-status { border-radius: var(--ah-radius) !important; }
.athena-header__panel-title { text-transform: none; letter-spacing: 0; font-style: normal; }

/* Mobile et tablette : barre réduite à l'essentiel, le reste dans le menu */
@media (max-width: 900px) {
  nav.athena-header,
  .athena-header,
  .dash-cc .athena-header,
  .dash-cc__main > .athena-header { padding: 0 0.75rem; }
  .athena-header__actions { gap: 0.25rem; }
  .athena-header__guide-label,
  .athena-header__profile-identity { display: none !important; }
  .athena-header__guide-btn { width: var(--ah-ctl); padding: 0 !important; }
  .athena-header__cta-label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  .athena-header__cta { width: var(--ah-ctl); min-width: var(--ah-ctl); padding: 0; margin: 0; }
  .athena-header__profile-trigger { padding: 0 0.3rem !important; }
}
@media (max-width: 420px) {
  .athena-header__brand-text { display: none !important; }
  .athena-header__profile-trigger .athena-header__chevron { display: none; }
}

/* Ordinateur : la barre allégée laisse la place au libellé du CTA et à l'identité. */
.athena-header--portal .athena-header__link { letter-spacing: 0; padding: 0 0.7rem; }
.athena-header--portal .athena-header__actions { gap: 0.375rem; }
.athena-header--portal .athena-header__icon-btn { padding: 0 0.55rem; }
.athena-header--portal .athena-header__avatar { border-radius: var(--ah-radius); }
@media (min-width: 1280px) and (max-width: 1919px) {
  .athena-header--portal .athena-header__link { padding: 0 0.55rem; letter-spacing: 0; }
}
@media (min-width: 1440px) {
  .athena-header--portal .athena-header__cta-label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
  .athena-header--portal .athena-header__cta { width: auto; min-width: 0; padding: 0 0.95rem 0 0.8rem; }
}
@media (min-width: 1600px) {
  .athena-header--portal .athena-header__profile-identity { display: flex; }
  .athena-header--portal .athena-header__profile-trigger { padding: 0 0.45rem 0 0.6rem !important; }
}

/* Menu mobile : casse normale, cibles de 44 px, focus visible */
.athena-header__drawer-link { min-height: 44px; font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.athena-header__drawer-link.is-active { font-style: normal; border-left-color: var(--athena-header-mint); }
.athena-header__drawer-link:focus-visible { outline: 2px solid var(--ah-focus); outline-offset: -2px; }
.athena-header__panel--drawer { border-radius: var(--ah-radius) !important; }

/* ==========================================================================
   Ajustements 2026-10-26 : retour des titres de rubrique en capitales
   italiques (signature Athena), bouton Guide et puce profil retravaillés,
   et la puce profil ne sort plus jamais de l'écran.
   ========================================================================== */
.athena-header__link,
.athena-header--portal .athena-header__link {
  font-size: 11.5px;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.athena-header__link--active,
.athena-header__link--active:hover { font-style: italic; color: #fff !important; }
@media (min-width: 1280px) and (max-width: 1919px) {
  .athena-header--portal .athena-header__link { letter-spacing: 0.09em; padding: 0 0.55rem; }
}
.athena-header__drawer-link { font-style: italic; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 900; font-size: 13.5px; }

/* La navigation cède la place avant les actions : la puce profil reste visible. */
.athena-header__inner { min-width: 0; }
.athena-header__nav-center { min-width: 0; overflow: hidden; }
.athena-header__actions { flex-shrink: 0; }

/* Guide : bouton contour, icône dans un carré menthe */
.athena-header__guide-btn {
  gap: 0.5rem !important;
  padding: 0 0.7rem 0 0.3rem !important;
  border-color: var(--ah-line) !important;
  color: var(--ah-ink) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  font-style: italic;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}
.athena-header__guide-btn .athena-header__btn-icon {
  box-sizing: content-box;
  width: 14px;
  height: 14px;
  padding: 5px;
  border-radius: var(--ah-radius);
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
}
.athena-header__guide-btn:hover { border-color: rgba(52, 211, 153, 0.5) !important; background: rgba(52, 211, 153, 0.06) !important; }
.athena-header__guide-btn:hover .athena-header__btn-icon { background: rgba(52, 211, 153, 0.24); }

/* Profil : puce contour avec avatar, nom en capitales italiques, grade dessous */
.athena-header__profile-trigger {
  gap: 0.6rem !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 0.45rem 0 3px !important;
  border-color: var(--ah-line) !important;
  max-width: 16rem;
}
.athena-header__profile-trigger:hover { border-color: rgba(52, 211, 153, 0.45) !important; }
.athena-header__profile-trigger .athena-header__avatar { order: -1; width: 32px !important; height: 32px !important; min-width: 32px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.athena-header__profile-identity { align-items: flex-start !important; gap: 1px; }
.athena-header__profile-name { font-size: 11.5px !important; font-weight: 900 !important; font-style: italic; letter-spacing: 0.06em !important; text-transform: uppercase !important; line-height: 1.15; max-width: 10rem; }
.athena-header__profile-title { font-size: 10.5px !important; line-height: 1.15; color: #6ee7b7 !important; opacity: 0.85; max-width: 10rem; }
.athena-header__profile-trigger .athena-header__chevron { width: 12px; height: 12px; color: var(--ah-dim); }
/* Le nom s'affiche dès 1280 px (le grade dès 1600 px) au lieu d'attendre 1600 px. */
@media (min-width: 1280px) {
  .athena-header--portal .athena-header__profile-identity { display: flex !important; }
  .athena-header--portal .athena-header__profile-title { display: none; }
}
@media (min-width: 1600px) {
  .athena-header--portal .athena-header__profile-title { display: block; }
}
@media (max-width: 900px) {
  .athena-header__guide-btn { width: var(--ah-ctl) !important; padding: 0 !important; justify-content: center; border-color: transparent !important; }
  .athena-header__guide-btn .athena-header__btn-icon { padding: 4px; }
  .athena-header__profile-trigger { height: var(--ah-ctl) !important; min-height: var(--ah-ctl) !important; padding: 0 0.25rem 0 2px !important; }
  .athena-header__profile-trigger .athena-header__avatar { width: 28px !important; height: 28px !important; min-width: 28px; }
}
/* Entre 1280 et 1599 px, les rubriques passent avant les libellés : CTA et Guide en icône seule (avec infobulle). */
@media (min-width: 1280px) and (max-width: 1599px) {
  .athena-header--portal .athena-header__cta-label,
  .athena-header--portal .athena-header__guide-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .athena-header--portal .athena-header__cta { width: var(--ah-ctl); min-width: var(--ah-ctl); padding: 0; justify-content: center; }
  .athena-header--portal .athena-header__guide-btn { padding: 0 3px !important; }
  .athena-header--portal .athena-header__link { letter-spacing: 0.07em; padding: 0 0.5rem; }
}
@media (min-width: 1600px) {
  .athena-header--portal .athena-header__cta-label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
  .athena-header--portal .athena-header__cta { width: auto; min-width: 0; padding: 0 0.95rem 0 0.8rem; }
}

/* ==========================================================================
   Menu « Espaces » : une carte par espace, rangées par groupe
   (views/partials/athena_espaces_menu.php, App\Support\EspacesMenu).
   Sombre par défaut (barre Athena) ; clair sur les pages claires du site.
   ========================================================================== */
.esp {
  --esp-bg: #0c0d10;
  --esp-card: rgba(255, 255, 255, 0.035);
  --esp-card-hover: rgba(255, 255, 255, 0.075);
  --esp-line: rgba(255, 255, 255, 0.12);
  --esp-ink: #f4f4f5;
  --esp-muted: #a1a1aa;
  --esp-accent: var(--athena-header-mint, #34d399);
  --esp-accent-bg: rgba(52, 211, 153, 0.13);
  --esp-accent-line: rgba(52, 211, 153, 0.55);
  --esp-blue: #60a5fa;
  --esp-blue-bg: rgba(96, 165, 250, 0.14);
  --esp-icon-bg: rgba(255, 255, 255, 0.07);
}
body.layout-light .esp,
body.atak-theme-light .esp,
html[data-bo-theme="light"] .esp {
  --esp-bg: #ffffff;
  --esp-card: #f8fafc;
  --esp-card-hover: #eef2f6;
  --esp-line: rgba(15, 23, 42, 0.14);
  --esp-ink: #0f172a;
  --esp-muted: #475569;
  --esp-accent: #047857;
  --esp-accent-bg: rgba(5, 150, 105, 0.11);
  --esp-accent-line: rgba(4, 120, 87, 0.55);
  --esp-blue: #1d4ed8;
  --esp-blue-bg: rgba(29, 78, 216, 0.1);
  --esp-icon-bg: rgba(15, 23, 42, 0.06);
}
html[data-bo-theme="dark"] .esp {
  --esp-bg: #0c0d10;
  --esp-card: rgba(255, 255, 255, 0.035);
  --esp-card-hover: rgba(255, 255, 255, 0.075);
  --esp-line: rgba(255, 255, 255, 0.12);
  --esp-ink: #f4f4f5;
  --esp-muted: #a1a1aa;
  --esp-accent: var(--athena-header-mint, #34d399);
  --esp-accent-bg: rgba(52, 211, 153, 0.13);
  --esp-accent-line: rgba(52, 211, 153, 0.55);
  --esp-blue: #60a5fa;
  --esp-blue-bg: rgba(96, 165, 250, 0.14);
  --esp-icon-bg: rgba(255, 255, 255, 0.07);
}
/* Le menu mobile fait partie de la barre : il reste sombre. */
.athena-header__panel--drawer .esp.esp--drawer {
  --esp-card: rgba(255, 255, 255, 0.035);
  --esp-card-hover: rgba(255, 255, 255, 0.075);
  --esp-line: rgba(255, 255, 255, 0.12);
  --esp-ink: #f4f4f5;
  --esp-muted: #a1a1aa;
  --esp-accent: var(--athena-header-mint, #34d399);
  --esp-accent-bg: rgba(52, 211, 153, 0.13);
  --esp-accent-line: rgba(52, 211, 153, 0.55);
  --esp-blue: #60a5fa;
  --esp-blue-bg: rgba(96, 165, 250, 0.14);
  --esp-icon-bg: rgba(255, 255, 255, 0.07);
}

.athena-header__panel--espaces.esp {
  width: min(44rem, calc(100vw - 2rem));
  max-height: min(calc(100vh - var(--athena-header-h, 4rem) - 1.5rem), 38rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem;
  border: 1px solid var(--esp-line);
  background: var(--esp-bg);
  color: var(--esp-ink);
  box-shadow: 0 20px 48px -14px rgba(0, 0, 0, 0.55) !important;
  border-radius: 12px !important;
}
.athena-header__panel--espaces.is-closing {
  animation: athena-panel-out 0.12s ease-in both;
}
@keyframes athena-panel-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-6px) scale(0.985); }
}

.esp-groups {
  column-count: 2;
  column-gap: 1.1rem;
}
.esp-group {
  break-inside: avoid;
  margin: 0 0 1rem;
}
.esp-group:last-child { margin-bottom: 0; }
.esp-group__title {
  margin: 0 0 0.45rem;
  padding: 0 0.25rem;
  font-size: 13px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
  color: var(--esp-muted);
}
.esp-group__cards { display: grid; gap: 0.4rem; }

.esp-card {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  min-height: 3.5rem;
  padding: 0.5rem 0.7rem 0.5rem 0.6rem;
  border: 1px solid var(--esp-line);
  border-radius: 10px;
  background: var(--esp-card);
  color: var(--esp-ink);
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.esp-card:hover { background: var(--esp-card-hover); border-color: var(--esp-accent-line); }
.esp-card:focus-visible { outline: 2px solid var(--esp-accent); outline-offset: 2px; background: var(--esp-card-hover); }
.esp-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9px;
  background: var(--esp-icon-bg);
  color: var(--esp-accent);
}
.esp-card__body { display: grid; gap: 0.1rem; min-width: 0; }
.esp-card__row { display: flex; align-items: center; gap: 0.45rem; min-width: 0; }
.esp-card__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--esp-ink);
}
.esp-card__desc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.3;
  color: var(--esp-muted);
}
.esp-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.45rem;
  min-height: 1.3rem;
  border: 1px solid var(--esp-line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: var(--esp-muted);
}
.esp-pill--here { border-color: var(--esp-accent-line); background: var(--esp-accent-bg); color: var(--esp-accent); }

.esp-card.is-active {
  border-color: var(--esp-accent-line);
  background: var(--esp-accent-bg);
  box-shadow: inset 3px 0 0 var(--esp-accent);
}
.esp-card.is-active .esp-card__icon { background: var(--esp-accent); color: var(--esp-bg); }

/* Outils opérateur : bleu du portail, pour le distinguer des espaces en vert. */
.esp-card--blue .esp-card__icon { background: var(--esp-blue-bg); color: var(--esp-blue); }
.esp-card--blue:hover { border-color: var(--esp-blue); }
.esp-card--blue:focus-visible { outline-color: var(--esp-blue); }
.esp-card--blue.is-active { border-color: var(--esp-blue); background: var(--esp-blue-bg); box-shadow: inset 3px 0 0 var(--esp-blue); }
.esp-card--blue.is-active .esp-card__icon { background: var(--esp-blue); color: var(--esp-bg); }
.esp-card--blue.is-active .esp-pill--here { border-color: var(--esp-blue); background: transparent; color: var(--esp-blue); }

/* Menu mobile : une colonne, déjà dans la feuille du menu */
.esp--drawer { margin-top: 1rem; }
.esp--drawer .esp-groups { column-count: 1; }
.esp--drawer .esp-group__title { color: var(--esp-muted); }
@media (min-width: 768px) {
  .athena-header__panel--drawer .esp--drawer { display: none; }
}

/* Tablette et mobile : feuille pleine largeur sous la barre, sans débordement */
@media (max-width: 899px) {
  .athena-header__panel--espaces.esp {
    position: fixed;
    top: calc(var(--athena-header-h, 4rem) + 0.5rem);
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
  }
}
@media (max-width: 640px) {
  .esp-groups { column-count: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .esp-card { transition: none; }
  .athena-header__panel--espaces.is-closing { animation: none; }
}
