/* INOVASYS shared chrome: the same header and mobile menu on inovasys.ma, .io and .ai.
   Source of truth: /motion/. Copied into each site by motion/sync.sh; edit here, not in the copies.
   Hook classes: .ix-header on <header>, .ix-panel on the mobile menu dialog (.ma, .ai).
   On .io the mobile menu is the header's own <nav> opened with .is-open. All three sites use Plus Jakarta Sans (09 §3).
   A site can set --ix-accent-x / --ix-flow-x on :root to take its own accents (inovasys.ma: INOVASYS charter, 31 Oct 2026). */

header.ix-header {
  --ix-h: 72px; --ix-navy: #0B1C2C; --ix-ink: #FFFFFF; --ix-ink-2: #C9D3E0; --ix-accent: var(--ix-accent-x, #C2D9F7);
  --ix-rule: rgba(255, 255, 255, .14); --ix-flow: var(--ix-flow-x, #1FA8E0); --ix-cta: #B9470F; --ix-cta-hover: #A93E0F;
  position: sticky; top: 0; z-index: 40;
  background: var(--ix-navy) !important; color: var(--ix-ink) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
}
header.ix-header .wrap { display: flex; align-items: center; gap: 28px; min-height: var(--ix-h); }
header.ix-header :focus-visible { outline: 2px solid var(--ix-accent); outline-offset: 3px; }

/* logo + site suffix */
header.ix-header .brand, header.ix-header .wordmark { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; text-decoration: none; color: var(--ix-ink); }
header.ix-header .brand img, header.ix-header .wordmark img { display: block; height: 22px; width: auto; }
header.ix-header .brand .suffix, header.ix-header .wordmark small { font-family: inherit; font-weight: 500; font-size: 0.8125rem; line-height: 1; color: var(--ix-accent); padding: 0; letter-spacing: .02em; transform: translateY(2px); }

/* main navigation */
header.ix-header .nav { margin-left: auto; }
header.ix-header .nav ul { display: flex; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; }
header.ix-header .nav li { border: 0; }
header.ix-header .nav a { position: relative; display: inline-flex; align-items: center; gap: 0; min-height: 44px; min-width: 0; padding: 0; font-size: 0.9375rem; font-weight: 500; line-height: 1.2; letter-spacing: 0; color: var(--ix-ink-2); text-decoration: none; white-space: nowrap; transition: color 160ms ease; }
header.ix-header .nav a:hover, header.ix-header .nav a[aria-current="page"] { color: var(--ix-ink); }
header.ix-header .nav a::before { display: none !important; }
header.ix-header .nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px; border-radius: 2px; background: var(--ix-flow); transform: scaleX(0); transform-origin: left; transition: transform 240ms ease; }
header.ix-header .nav a[aria-current="page"]::after { transform: scaleX(1); }
header.ix-header .nav .mobile-demo { display: none; }

/* sister sites: a word + the site suffix, after a thin divider (Docs/09 §1) */
header.ix-header .nav li.x-site:not(.x-site + .x-site) { margin-left: 4px; padding-left: 24px; border-left: 1px solid var(--ix-rule); }
header.ix-header .x-site .sfx { margin-left: 4px; font-weight: 700; color: var(--ix-accent); }

/* language switch + main commercial CTA */
header.ix-header .actions { flex: none; display: flex; align-items: center; gap: 16px; }
header.ix-header .lang { display: flex; padding: 2px; gap: 0; border: 1px solid var(--ix-rule); border-radius: 999px; background: none; }
header.ix-header .lang button { appearance: none; min-width: 44px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--ix-ink-2); font-family: inherit; font-weight: 600; font-size: 0.75rem; line-height: 1; letter-spacing: .06em; cursor: pointer; transition: background 160ms ease, color 160ms ease; }
header.ix-header .lang button:hover { color: var(--ix-ink); }
header.ix-header .lang button[aria-pressed="true"] { background: var(--ix-ink); color: var(--ix-navy); }
header.ix-header .actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--ix-cta); color: #FFFFFF; font-size: 0.9375rem; font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none; transition: background 160ms ease; }
header.ix-header .actions .btn:hover { background: var(--ix-cta-hover); }

/* mobile toggle */
header.ix-header .menu-toggle { display: none; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; margin-left: auto; padding: 0 16px; border: 1px solid var(--ix-rule); border-radius: 999px; background: none; color: var(--ix-ink); font-size: 0.875rem; font-weight: 500; cursor: pointer; }
header.ix-header .menu-toggle i { font-size: 1.125rem; color: var(--ix-accent); }
header.ix-header .menu-toggle .bars { width: 16px; height: 10px; border-top: 1.5px solid var(--ix-accent); border-bottom: 1.5px solid var(--ix-accent); }
header.ix-header .menu-toggle [data-i18n], header.ix-header .menu-toggle .menu-word { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: nowrap; }

@media (min-width: 1024px) and (max-width: 1365px) { header.ix-header .wrap { gap: 20px; } header.ix-header .nav ul { gap: 18px; } header.ix-header .nav li.x-site:not(.x-site + .x-site) { padding-left: 18px; } header.ix-header .actions { gap: 12px; } }
@media (max-width: 1279px) {
  header.ix-header .nav:not(.is-open), header.ix-header .actions .lang, header.ix-header .actions .btn { display: none; }
  header.ix-header .menu-toggle { display: inline-flex; }
  header.ix-header .actions { margin-left: auto; }
  header.ix-header .actions + .menu-toggle, header.ix-header .actions .menu-toggle { margin-left: 0; }
}
@media (max-width: 359px) { header.ix-header .menu-toggle .menu-word, header.ix-header .menu-toggle [data-i18n] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* ── Mobile menu: the same navy panel on the three sites ── */
.ix-panel, header.ix-header .nav.is-open {
  background: var(--ix-navy, #0B1C2C) !important; color: #FFFFFF;
}
.ix-panel .bar { border-bottom: 1px solid rgba(255, 255, 255, .08) !important; min-height: 72px; }
.ix-panel .brand img { height: 22px; }
.ix-panel .brand .suffix { font-family: inherit; font-weight: 500; font-size: 0.8125rem; line-height: 1; color: var(--ix-accent-x, #C2D9F7); }
.ix-panel .icon-btn { border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: none; color: #FFFFFF; }
.ix-panel ul li a, header.ix-header .nav.is-open a { display: flex; align-items: center; min-height: 56px; border-bottom: 1px solid rgba(255, 255, 255, .12); color: #FFFFFF !important; font-size: 1.5rem; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; text-decoration: none; }
.ix-panel ul li a[aria-current="page"], header.ix-header .nav.is-open a[aria-current="page"] { color: var(--ix-accent-x, #C2D9F7) !important; }
.ix-panel ul li.x-site a, header.ix-header .nav.is-open li.x-site a { font-size: 1.125rem; font-weight: 500; color: #C9D3E0 !important; }
.ix-panel .x-site .sfx, header.ix-header .nav.is-open .x-site .sfx { margin-left: 4px; font-weight: 700; color: var(--ix-accent-x, #C2D9F7); }
.ix-panel .lang { border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; padding: 2px; }
.ix-panel .lang button { min-width: 44px; min-height: 40px; border: 0; border-radius: 999px; background: none; color: #C9D3E0; font-family: inherit; font-weight: 500; font-size: 0.75rem; line-height: 1; }
.ix-panel .lang button[aria-pressed="true"] { background: #FFFFFF; color: #0B1C2C; }
.ix-panel .foot .btn { min-height: 48px; border-radius: 999px; background: #B9470F; color: #FFFFFF; border: 0; }
/* .io: its <nav> becomes the panel under the header */
header.ix-header .nav.is-open { position: fixed; inset: 72px 0 0 0; display: block; margin: 0; padding: 16px var(--gutter, 20px) 40px; overflow-y: auto; z-index: 39; }
header.ix-header .nav.is-open ul { display: block; }
header.ix-header .nav.is-open a::after { display: none; }
header.ix-header .nav.is-open li.x-site:not(.x-site + .x-site) { margin: 0; padding: 0; border: 0; }
header.ix-header .nav.is-open .mobile-demo { display: block; margin-top: 24px; }
header.ix-header .nav.is-open .mobile-demo a { justify-content: center; min-height: 48px; border: 0; border-radius: 999px; background: #B9470F; font-size: 1rem; font-weight: 500; }
header.ix-header .nav .mobile-lang { display: none; }
header.ix-header .nav.is-open .mobile-lang { display: block; margin-top: 24px; }
header.ix-header .nav.is-open .mobile-lang .lang { display: inline-flex; }
header.ix-header .nav.is-open .mobile-lang button { min-height: 40px; color: #C9D3E0; }
header.ix-header .nav.is-open .mobile-lang button[aria-pressed="true"] { color: #0B1C2C; }
.ix-panel .icon-btn { color: #FFFFFF; }
.ix-panel .icon-btn i { color: var(--ix-accent-x, #FFFFFF); } /* icons on dark take the site accent (Docs/10 §4) */
header.ix-header .menu-toggle, header.ix-header .menu-toggle [data-i18n] { font-family: inherit; font-size: 0.875rem; font-weight: 500; text-transform: none; letter-spacing: 0; }
header.ix-header .nav.is-open a { justify-content: flex-start; text-align: left; width: 100%; }
header.ix-header .nav.is-open .mobile-demo a { justify-content: center; }
.ix-panel .icon-btn { font-family: inherit; }
