/* =============================================================
   Ase Soccer — méga-menu (panneau à deux colonnes)
   Valeurs relevées sur la référence CentralMaillot.
   ============================================================= */

/* Le panneau se cale sur la largeur de la pilule d'en-tête : la cellule
   « middle » de l'en-tête Blocksy est déjà positionnée (relative).
   Géométrie mesurée (en-tête fixe, 62 px, sans rétrécissement au défilement) :
   la cellule s'arrête 19 px au-dessus du bas de la pilule ; + 11 px d'écart
   visuel = 30 px sous la cellule. */
#header [data-row="middle"] { position: relative !important; }

/* Les entrées à panneau : le <li> ne doit pas créer de bloc conteneur,
   et son sous-menu natif laisse la place au panneau. */
#header .ase-mm-item { position: static !important; }
#header .ase-mm-item > .sub-menu { display: none !important; }

/* Entrée ouverte / survolée : pilule sombre, comme la référence. */
#header .header-menu-1 .menu > li.ase-mm-item:hover > a,
#header .header-menu-1 .menu > li.ase-mm-item:focus-within > a,
#header .header-menu-1 .menu > li.ase-mm-item.ase-mm-open > a {
  background: #0a0f1a !important;
  color: #fff !important;
}

/* ---------- panneau ---------- */
#header .ase-mm {
  position: absolute;
  left: -1px;
  right: -1px;
  top: calc(100% + 30px);
  z-index: 60;
  display: flex;
  max-height: calc(100vh - 150px);
  padding: 10px;
  border: 1px solid rgba(10, 15, 26, .06);
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 30px 70px rgba(10, 15, 26, .24);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .16s, transform .22s cubic-bezier(.2, .8, .2, 1), visibility 0s .22s;
}

/* Pont invisible dans l'écart de 11 px : le panneau reste ouvert quand la
   souris descend du lien vers le panneau. */
#header .ase-mm::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

#header .ase-mm-item:hover > .ase-mm,
#header .ase-mm-item:focus-within > .ase-mm,
#header .ase-mm-item.ase-mm-open > .ase-mm {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .16s, transform .22s cubic-bezier(.2, .8, .2, 1), visibility 0s 0s;
}

/* ---------- rail gauche ---------- */
#header .ase-mm-rail {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 236px;
  padding: 8px;
  border-radius: 22px;
  background: #f3f5f8;
  overflow-y: auto;
  scrollbar-width: none;
}

#header .ase-mm-row {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 44px;
  padding: 0 12px 0 14px;
  border: 0;
  border-radius: 14px;
  background: none;
  font: 600 14px/20px Montserrat, sans-serif;
  color: #3b4453;
  text-align: left;
  cursor: pointer;
  transition: background .12s, color .12s;
}

#header .ase-mm-row svg { opacity: .3; }
#header .ase-mm-row:hover { background: rgba(10, 15, 26, .05); }

#header .ase-mm-row.is-on {
  background: #fff;
  color: #0a0f1a;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(10, 15, 26, .08), 0 6px 16px rgba(10, 15, 26, .06);
}

#header .ase-mm-row.is-on svg { opacity: 1; }

#header .ase-mm-gap { flex: none; display: block; height: 8px; }

#header .ase-mm-all {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  margin-top: auto;
  border-radius: 99px;
  background: #0a0f1a;
  color: #fff;
  font: 700 13px/20px Montserrat, sans-serif;
}

#header .ase-mm-all:hover { background: #1c2535; }

/* ---------- zone droite ---------- */
#header .ase-mm-body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px 10px 26px;
  overflow-y: auto;
  scrollbar-width: none;
}

#header .ase-mm-pane { display: none; }
#header .ase-mm-pane.is-on { display: block; }

#header .ase-mm-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  padding: 8px 10px 14px;
  border-bottom: 1px solid #eceef2;
}

#header .ase-mm-head b {
  font: italic 900 22px/26px Montserrat, sans-serif;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: #0a0f1a;
}

#header .ase-mm-head a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 13px/20px Montserrat, sans-serif;
  color: #3b4453;
  white-space: nowrap;
}

#header .ase-mm-head a:hover {
  color: #0a0f1a;
  text-decoration: underline;
  text-underline-offset: 4px;
}

#header .ase-mm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 2px 8px;
}

#header .ase-mm-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 10px;
  border-radius: 14px;
  font: 500 14px/18px Montserrat, sans-serif;
  color: #3b4453;
  transition: background .12s, color .12s;
}

#header .ase-mm-tile:hover { background: #f3f5f8; color: #0a0f1a; }
#header .ase-mm-tile img { flex: none; width: 26px; height: 26px; object-fit: contain; }
#header .ase-mm-tile span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#header .ase-mm-noi {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f3f5f8;
  font: 700 12px/1 Montserrat, sans-serif;
  color: #5b6678;
  text-transform: uppercase;
}

/* ---------- libellés du menu principal, alignés sur la référence ---------- */
#header .header-menu-1 .menu > li > a {
  padding: 0 12px !important;
  font-size: 13.5px !important;
  border-radius: 99px;
}

#header .header-menu-1 .menu > li > a:hover { background: rgba(10, 15, 26, .07); }

/* Menu simple (Aide) : carte blanche arrondie, comme la référence. */
#header #header-menu-1 .sub-menu {
  padding: 8px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(10, 15, 26, .06);
  box-shadow: 0 24px 60px rgba(10, 15, 26, .22);
}

#header #header-menu-1 .sub-menu > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 12px 0 14px;
  border-radius: 14px;
  font: 600 14px/20px Montserrat, sans-serif;
  color: #3b4453;
}

#header #header-menu-1 .sub-menu > li > a:hover { background: #f3f5f8; color: #0a0f1a; }

/* ---------- sous 1000 px : le tiroir du thème reprend la main ---------- */
@media (max-width: 1000px) {
  #header .ase-mm { display: none !important; }
  #header .ase-mm-item > .sub-menu { display: block !important; }
  #header .header-menu-1 .menu > li > a { padding: 0 8px !important; font-size: 13px !important; }
}

/* =============================================================
   Tiroir mobile : le même panneau, empilé (rail puis grille)
   Le <li> reçoit « dropdown-active » du thème quand on déplie.
   ============================================================= */
#offcanvas .ase-mm-item > .sub-menu { display: none !important; }

#offcanvas .ase-mm {
  display: none;
  flex-direction: column;
  width: auto;
  max-height: none;
  padding: 10px 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#offcanvas .ase-mm-item.dropdown-active > .ase-mm { display: flex; }

#offcanvas .ase-mm-rail {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 8px;
  border-radius: 18px;
  background: #f3f5f8;
}

#offcanvas .ase-mm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 52px;
  margin-bottom: 6px;
  padding: 0 14px 0 16px;
  border: 0;
  border-radius: 16px;
  background: none;
  font: 600 15px/20px Montserrat, sans-serif;
  color: #3b4453;
  text-align: left;
  cursor: pointer;
}

#offcanvas .ase-mm-row svg { opacity: .3; }
#offcanvas .ase-mm-row:last-of-type { margin-bottom: 0; }

#offcanvas .ase-mm-row.is-on {
  background: #fff;
  color: #0a0f1a;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(10, 15, 26, .08);
}

#offcanvas .ase-mm-row.is-on svg { opacity: 1; }

#offcanvas .ase-mm-gap { display: block; height: 10px; }

#offcanvas .ase-mm-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  border-radius: 99px;
  background: #0a0f1a;
  color: #fff;
  font: 700 13px/20px Montserrat, sans-serif;
}

#offcanvas .ase-mm-body { padding: 14px 0 0; }
#offcanvas .ase-mm-pane { display: none; }
#offcanvas .ase-mm-pane.is-on { display: block; }

#offcanvas .ase-mm-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 0 4px 10px;
  border-bottom: 1px solid #eceef2;
}

#offcanvas .ase-mm-head b {
  font: italic 900 18px/22px Montserrat, sans-serif;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: #0a0f1a;
}

#offcanvas .ase-mm-head a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 600 12.5px/18px Montserrat, sans-serif;
  color: #3b4453;
  white-space: nowrap;
}

#offcanvas .ase-mm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

#offcanvas .ase-mm-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 54px;
  padding: 0 10px 0 9px;
  border: 1px solid #e3e6ec;
  border-radius: 16px;
  background: #fff;
  font: 600 12.5px/16px Montserrat, sans-serif;
  color: #0a0f1a;
}

#offcanvas .ase-mm-tile img { flex: none; width: 30px; height: 30px; object-fit: contain; }

#offcanvas .ase-mm-tile span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

#offcanvas .ase-mm-noi {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f3f5f8;
  font: 700 12px/1 Montserrat, sans-serif;
  color: #5b6678;
  text-transform: uppercase;
}
