/* Barre de navigation avec méga-menu « Platforms » (variante C choisie le 26/10/2026).
   Remplace la nav .nav de style.css, qui reste inutilisée. Préfixe hdr-. */
.hdr { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.hdr-bar { display: flex; align-items: center; gap: 1.1rem; height: 3.5rem; padding: 0 2rem; }
.hdr-brand { display: flex; align-items: center; gap: 0.55rem; font-family: var(--mono); font-weight: 600;
  font-size: 0.9rem; color: var(--accent); letter-spacing: -0.02em; flex-shrink: 0; }
.hdr-brand img { height: 22px; width: auto; }
.hdr-links { display: flex; align-items: center; gap: 0.1rem; min-width: 0; }
.hdr-link { font: inherit; font-size: 0.82rem; color: var(--text-3); padding: 0.4rem 0.65rem; border-radius: var(--r);
  white-space: nowrap; display: inline-flex; align-items: center; gap: 0.4rem; background: none; border: 0; cursor: pointer;
  transition: color 0.15s, background 0.15s; }
.hdr-link:hover, .hdr-dd.is-open > .hdr-link { color: var(--text); background: var(--surface-2); }
.hdr-link.is-active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 -2px var(--accent); }
.hdr-end { margin-left: auto; display: flex; align-items: center; gap: 0.45rem; flex-shrink: 0; }
.hdr a:focus-visible, .hdr button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hdr-pill { font-family: var(--mono); font-size: 0.56rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: #ffb648; background: rgba(255, 170, 40, 0.1); border: 1px solid rgba(255, 170, 40, 0.35); border-radius: 3px;
  padding: 0.05rem 0.35rem; line-height: 1.4; }
.hdr-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px rgba(0, 153, 255, 0.8); }

/* Méga-menu : panneau centré sous la barre, deux zones (plateformes, outils et ressources)
   alignées en haut (étiquettes) et en bas (cartes et colonne de même hauteur). */
.hdr-dd--mega { position: static; }
.hdr-caret { transition: transform 0.2s; }
.hdr-dd.is-open .hdr-caret { transform: rotate(180deg); }
.hdr-mega { position: absolute; top: calc(3.5rem + 0.4rem); left: var(--hdr-mega-left, 50%); width: min(1010px, calc(100vw - 3rem));
  display: grid; grid-template-columns: minmax(0, 1fr) 272px; grid-template-rows: auto 1fr; column-gap: 1.4rem; row-gap: 0.8rem;
  padding: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55); z-index: 60;
  opacity: 0; visibility: hidden; pointer-events: none; transform: var(--hdr-mega-shift, translateX(-50%)) translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s; }
.hdr-dd.is-open > .hdr-mega { opacity: 1; visibility: visible; pointer-events: auto; transform: var(--hdr-mega-shift, translateX(-50%)) translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s; }
.hdr-mega-label { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-3); padding: 0; align-self: end; }
/* aligné sur les icônes de la colonne : bordure + retrait de la colonne + retrait de l'élément */
.hdr-mega-label--col { padding-left: calc(0.95rem + 1px); }
.hdr-mega-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; align-items: stretch; }
.hdr-mega-card { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 1.1rem;
  border: 1px solid rgba(0, 153, 255, 0.24); border-radius: 10px; color: var(--text);
  background: linear-gradient(160deg, rgba(0, 153, 255, 0.13) 0%, rgba(0, 153, 255, 0.035) 50%, rgba(255, 255, 255, 0.02) 100%), #17171d;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
/* Fond de circuit discret, limité au coin haut droit pour ne pas passer sous le texte */
.hdr-mega-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.7;
  background: url(/img/hunt/card-pcb-1.svg) right top / 300px 195px no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 62% 42% at 100% 0%, #000 0%, rgba(0, 0, 0, 0.45) 50%, transparent 78%);
  mask-image: radial-gradient(ellipse 62% 42% at 100% 0%, #000 0%, rgba(0, 0, 0, 0.45) 50%, transparent 78%); }
.hdr-mega-card:nth-child(2)::after { background-image: url(/img/hunt/card-pcb-2.svg); }
.hdr-mega-card:nth-child(3)::after { background-image: url(/img/hunt/card-pcb-3.svg); }
.hdr-mega-card > * { position: relative; z-index: 1; }
.hdr-mega-card:hover, .hdr-mega-card:focus-visible { border-color: rgba(0, 153, 255, 0.65);
  box-shadow: 0 0 0 1px rgba(0, 153, 255, 0.25), 0 8px 24px rgba(0, 0, 0, 0.35); transform: translateY(-2px); }
.hdr-mega-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.hdr-mega-title { margin-top: 0.3rem; font-size: 1.06rem; font-weight: 600; color: #fff; letter-spacing: -0.01em; }
.hdr-mega-desc { margin-top: 0.45rem; color: #e2e2ea; font-size: 0.98rem; line-height: 1.62; }
.hdr-mega-cta { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.36rem 0.7rem; font-size: 0.78rem; font-weight: 600; color: var(--accent); background: rgba(0, 153, 255, 0.1);
  border: 1px solid rgba(0, 153, 255, 0.28); border-radius: 6px; transition: background 0.15s, border-color 0.15s; }
.hdr-mega-card:hover .hdr-mega-cta { background: rgba(0, 153, 255, 0.18); border-color: rgba(0, 153, 255, 0.55); }
.hdr-mega-cta span[aria-hidden] { display: inline-block; transition: transform 0.15s; }
.hdr-mega-card:hover .hdr-mega-cta span[aria-hidden] { transform: translateX(3px); }
.hdr-mega-col { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); border-left: 1px solid var(--border);
  padding-left: 0.95rem; }
.hdr-item { display: flex; gap: 0.75rem; align-items: center; padding: 0.55rem 0.6rem; border-radius: 8px; color: var(--text);
  transition: background 0.15s, box-shadow 0.15s; }
.hdr-item:hover, .hdr-item:focus-visible { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
.hdr-item-ic { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; color: var(--accent); }
.hdr-item b { display: block; font-weight: 600; font-size: 0.86rem; color: #fff; }
.hdr-item small { display: block; color: #a9a9b6; font-size: 0.74rem; margin-top: 0.1rem; line-height: 1.4; }

/* Burger et panneau mobile */
.hdr-burger { display: none; width: 2.4rem; height: 2.2rem; border: 1px solid var(--border); border-radius: var(--r);
  background: transparent; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.hdr-burger span { display: block; width: 16px; height: 2px; background: var(--text-2); border-radius: 1px; transition: transform 0.2s, opacity 0.2s; }
.hdr.hdr-open .hdr-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hdr.hdr-open .hdr-burger span:nth-child(2) { opacity: 0; }
.hdr.hdr-open .hdr-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.hdr-mob { display: none; padding: 0.25rem 1.25rem 1.25rem; border-top: 1px solid var(--border);
  max-height: calc(100vh - 3.5rem); overflow-y: auto; }
.hdr-mob-group { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3); margin: 1rem 0 0.3rem; }
.hdr-mob a.hdr-mob-link { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.2rem; color: var(--text);
  font-size: 0.95rem; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.hdr-mob a.hdr-mob-link[aria-current="page"] { color: var(--accent); }
.hdr-mob a.hdr-mob-link small { color: var(--text-3); font-size: 0.75rem; margin-left: auto; text-align: right; }
.hdr-mob-actions { display: flex; gap: 0.5rem; margin-top: 1.1rem; flex-wrap: wrap; }
.hdr-mob-actions .btn { flex: 1 1 auto; justify-content: center; }

@media (max-width: 979px) {
  .hdr-bar { padding: 0 1.25rem; }
  .hdr .hdr-links, .hdr .hdr-end .btn { display: none; }
  .hdr .hdr-burger { display: inline-flex; }
  .hdr.hdr-open .hdr-mob { display: block; }
}
@media (min-width: 980px) {
  .hdr .hdr-mob { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .hdr-caret, .hdr-burger span, .hdr-mega-card, .hdr-link, .hdr-item, .hdr-mega, .hdr-dd.is-open > .hdr-mega,
  .hdr-mega-cta span[aria-hidden] { transition: none; }
  .hdr-mega-card:hover, .hdr-mega-card:focus-visible { transform: none; }
}

/* CTF en ligne mais fermé : badge neutre « Terminé » (26/10/2026) */
.pr-badge--ended { background: rgba(161,161,170,0.1); color: var(--text-2); border: 1px solid rgba(161,161,170,0.28); }

/* Framework et Documentation mis en avant dans la colonne (26/10/2026) */
.hdr-item--feat { background: rgba(0,153,255,0.06); border: 1px solid rgba(0,153,255,0.22); border-radius: 8px; padding: 0.7rem 0.75rem; }
.hdr-item--feat b { font-size: 0.98rem; }
.hdr-item--feat small { font-size: 0.82rem; color: #d6d6de; line-height: 1.45; }
.hdr-item--feat .hdr-item-ic { color: var(--accent); border-color: rgba(0,153,255,0.4); background: rgba(0,153,255,0.1); }
.hdr-item--feat:hover, .hdr-item--feat:focus-visible { border-color: var(--accent); }
.hdr-mega-sep { display: block; height: 1px; background: var(--border); margin: 0.15rem 0; }
.hdr-mega-col { gap: 0.6rem; }

/* Retouches du 26/10 au soir : liseré, « Tout voir », cartes plus riches, Hunt en avant */
.hdr-mega::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, rgba(0, 153, 255, 0.15), var(--accent) 35%, var(--accent) 65%, rgba(0, 153, 255, 0.15)); }
.hdr-mega-label--plat { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.hdr-mega-all { font-family: var(--sans); font-size: 0.76rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--accent); }
.hdr-mega-all:hover { text-decoration: underline; }
.hdr-mega-all span[aria-hidden] { display: inline-block; transition: transform 0.15s; }
.hdr-mega-all:hover span[aria-hidden] { transform: translateX(3px); }
.hdr-mega-card--learn { background: linear-gradient(160deg, rgba(0, 153, 255, 0.16) 0%, rgba(0, 153, 255, 0.04) 55%, rgba(255, 255, 255, 0.02) 100%), #17171d; }
.hdr-mega-card--hunt { background: linear-gradient(160deg, rgba(56, 189, 248, 0.24) 0%, rgba(0, 153, 255, 0.09) 55%, rgba(255, 255, 255, 0.03) 100%), #1a1c24;
  border-color: rgba(0, 153, 255, 0.6); box-shadow: 0 0 0 1px rgba(0, 153, 255, 0.14), 0 0 22px rgba(0, 153, 255, 0.08); }
.hdr-mega-card--ctf { background: linear-gradient(160deg, rgba(139, 92, 246, 0.17) 0%, rgba(139, 92, 246, 0.045) 55%, rgba(255, 255, 255, 0.02) 100%), #17171d;
  border-color: rgba(139, 92, 246, 0.3); }
.hdr-mega-card--ctf:hover, .hdr-mega-card--ctf:focus-visible { border-color: rgba(167, 139, 250, 0.7); box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.25), 0 8px 24px rgba(0, 0, 0, 0.35); }
.hdr-mega-head .hdr-item-ic { width: 40px; height: 40px; border-radius: 9px; color: #5cbcff;
  background: rgba(0, 153, 255, 0.12); border-color: rgba(0, 153, 255, 0.38); }
.hdr-mega-head .hdr-item-ic svg { width: 20px; height: 20px; }
.hdr-mega-card--ctf .hdr-mega-head .hdr-item-ic { color: #b9a4ff; background: rgba(139, 92, 246, 0.13); border-color: rgba(139, 92, 246, 0.38); }
.hdr-mega-status { display: flex; align-items: center; gap: 0.4rem; min-height: 1.2rem; margin-top: 0.65rem;
  font-size: 0.74rem; font-weight: 600; color: #8fd6ff; }
.hdr-mega-status--vide { visibility: hidden; }
.hdr-mega-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px rgba(40, 200, 64, 0.7); }
.hdr-mega-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.85rem 0 1rem; }
.hdr-mega-tag { font-family: var(--mono); font-size: 0.62rem; color: #cfcfd8; padding: 0.1rem 0.36rem; white-space: nowrap;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 4px; }
.hdr-item--feat { height: 100%; }
@media (prefers-reduced-motion: reduce) {
  .hdr-mega-cta, .hdr-mega-all span[aria-hidden] { transition: none; }
  .hdr-mega-all:hover span[aria-hidden] { transform: none; }
}
