/* Palette du logo Smart Key Tech Québec. */
:root {
  --crest-black:#020418; --crest-night:#060c25; --crest-navy:#112752;
  --crest-steel:#304566; --crest-cobalt:#2d5694; --crest-blue:#2d71cd;
  --crest-glint:#457ac7; --crest-silver:#b7c6d9; --crest-platinum:#dbdce2;
}
.main-header {
  position:relative; z-index:6;
  color:var(--crest-night); background:linear-gradient(180deg,#fff 2%,#f4f6f9 66%,#e6eaf1);
  border-bottom:1px solid #a6b4c8;
}
.header-row {
  display:flex; align-items:center; justify-content:space-between;
  gap:clamp(20px,2vw,40px); min-height:82px;
}
.header-brand {
  position:relative; isolation:isolate; flex:none; align-self:stretch;
  display:flex; align-items:center; gap:10px; padding-right:clamp(23px,2.5vw,42px);
  color:white; text-decoration:none;
}
.header-brand::before {
  content:""; position:absolute; z-index:-1; inset:0 0 -1px -50vw; transform:skewX(-14deg); transform-origin:bottom;
  background:linear-gradient(107deg,var(--crest-black) 45%,var(--crest-night) 82%,#172f57);
  border-right:4px solid var(--crest-blue); box-shadow:4px 0 0 var(--crest-silver);
}
.header-brand img { width:58px; height:auto; }
.header-wordmark { display:grid; gap:5px; white-space:nowrap; }
.header-wordmark strong { color:#f7f8fa; font:italic 700 clamp(1.17rem,1.65vw,1.56rem)/1 var(--display); letter-spacing:-.048em; }
.header-wordmark em { color:#82b4fd; font:inherit; }
.header-wordmark small { color:var(--crest-silver); font:700 .75rem/1 var(--text); text-transform:uppercase; letter-spacing:.21em; }
.main-links { display:flex; justify-content:center; align-items:center; gap:clamp(1px,.35vw,9px); }
.main-links a {
  position:relative; isolation:isolate; display:flex; align-items:center; justify-content:center;
  min-height:44px; padding:0 clamp(9px,1vw,16px); color:#263958;
  text-decoration:none; font:600 clamp(.95rem,1.15vw,1.08rem)/1.2 var(--text); white-space:nowrap;
}
.main-links a::before {
  content:""; position:absolute; z-index:-1; inset:5px 0; transform:skewX(-12deg);
  border-radius:3px; background:transparent;
}
.main-links a[aria-current="page"] { color:#fff; }
.main-links a[aria-current="page"]::before { background:linear-gradient(115deg,#174685,#265fa9); box-shadow:inset 0 -2px #12396d; }
.nav-phone,.menu-switch {
  flex:none; display:inline-flex; align-items:center; justify-content:center; min-height:44px;
  border-radius:999px; text-decoration:none; white-space:nowrap;
}
.nav-phone {
  gap:9px; padding:0 17px; background:var(--crest-navy); color:white;
  font:700 1.02rem/1 var(--text); box-shadow:inset 0 1px #8196b366;
}
.nav-phone svg { width:18px; height:18px; color:#cbe0ff; }
.menu-switch { display:none; }
.main-header :focus-visible { outline:3px solid #2d71cd; outline-offset:3px; }
.header-brand:focus-visible { outline-offset:-4px; outline-color:#aaccff; }
@media(hover:hover) {
  .main-links a:not([aria-current]):hover::before { background:#d8e4f6; }
  .nav-phone:hover { background:var(--crest-cobalt); }
}
@media(prefers-reduced-motion:no-preference) {
  .main-links a::before,.nav-phone { transition:background-color .18s ease; }
}
@media(min-width:981px) and (max-width:1170px) {
  .header-row { width:94%; gap:17px; }
  .header-brand img { width:49px; }
  .main-links a { padding-inline:9px; }
  .nav-phone { padding-inline:14px; }
}
@media(max-width:980px) {
  .header-row { width:calc(100% - 36px); flex-wrap:wrap; justify-content:flex-start; gap:0 10px; min-height:0; }
  .header-brand { min-height:69px; padding-right:21px; margin-right:auto; gap:8px; }
  .header-brand img { width:46px; }
  .header-wordmark strong { font-size:1.23rem; }
  .header-wordmark small { font-size:.69rem; }
  .menu-switch:not([hidden]) {
    display:inline-flex; gap:9px; padding:0 15px; color:var(--crest-navy); background:white;
    border:1px solid #9fadc0; font:700 .94rem/1 var(--text);
  }
  .menu-lines { position:relative; width:18px; height:12px; }
  .menu-lines::before,.menu-lines::after { content:""; position:absolute; left:0; height:2px; background:currentColor; border-radius:2px; }
  .menu-lines::before { top:2px; width:18px; }
  .menu-lines::after { top:8px; width:13px; }
  .menu-switch[aria-expanded="true"] { color:#fff; border-color:var(--crest-navy); background:var(--crest-navy); }
  .menu-switch[aria-expanded="true"] .menu-lines::before { width:17px; transform:translateY(3px) rotate(45deg); }
  .menu-switch[aria-expanded="true"] .menu-lines::after { width:17px; transform:translateY(-3px) rotate(-45deg); }
  .main-links {
    flex:0 0 100%; order:1; display:grid; grid-template-columns:1fr; gap:0;
    padding:5px 0 12px; border-top:1px solid #b2bfd0;
  }
  .menu-switch[aria-expanded="false"]:not([hidden]) + .main-links { display:none; }
  .main-links a { justify-content:flex-start; min-height:47px; padding:0 15px; font:600 1.08rem/1.2 var(--text); }
  .main-links a + a { border-top:1px solid #c8d2df; }
  .main-links a::before { inset:4px 0; transform:none; border-radius:4px; }
  .main-links a[aria-current="page"] { color:var(--crest-navy); }
  .main-links a[aria-current="page"]::before { background:#dce7f6; box-shadow:inset 3px 0 var(--crest-blue); }
  .main-links a[aria-current="page"] span { font-weight:700; }
  .nav-phone { padding-inline:15px; }
}
@media(max-width:500px) {
  .header-row { width:calc(100% - 28px); gap:0 7px; }
  .header-brand { min-height:63px; gap:6px; padding-right:10px; }
  .header-brand img { width:38px; }
  .header-wordmark strong { font-size:1.05rem; }
  .header-wordmark small { font-size:.65rem; }
  .menu-switch:not([hidden]) { padding:0 12px; gap:6px; }
  .nav-phone { width:44px; padding:0; }
  .nav-phone svg { width:20px; height:20px; }
  .nav-phone span { display:none; }
}
@media(prefers-reduced-motion:no-preference) and (max-width:980px) {
  .menu-lines::before,.menu-lines::after { transition:transform .18s ease,width .18s ease; }
  .menu-switch[aria-expanded="true"] + .main-links { animation:show-main-links .2s ease-out both; }
  @keyframes show-main-links { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:translateY(0); } }
}
@media(max-width:360px) {
  .header-row { width:calc(100% - 20px); gap:0 5px; }
  .header-brand { gap:4px; padding-right:4px; }
  .header-brand img { width:30px; }
  .header-wordmark strong { font-size:.94rem; }
  .menu-switch:not([hidden]) { padding-inline:9px; gap:5px; }
  .menu-lines,.menu-lines::before { width:15px; }
}
