/* Méga-menu des pages vitrine (includes/site_nav_mega.php, assets/js/site-nav-mega.js).
   Bureau ≥ 1100 px : rubriques en barre, panneau pleine largeur. Mobile : liste à vignettes, sous-panneaux. */
html:has(.tl-nav--mega) { --tl-nav-h: 64px; }
.tl-nav--mega { --mm-line: rgba(255, 255, 255, .08); --mm-panel: #0b1118; --mm-card: #111923; --mm-teal: #2dd4bf; --mm-muted: #8fa0b3; }
.tl-nav--mega .tl-nav__brand img { width: 34px; height: 34px; }
.tl-nav__name { display: grid; line-height: 1.05; font-size: 17px; }
.tl-nav__name small { margin-top: 3px; color: var(--mm-muted); font-size: 11px; font-weight: 600; letter-spacing: 0; }

.tl-mm__bar { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.tl-mm__item { margin: 0; }
.tl-mm__top { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; background: none; color: #b8c4d1; font: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: color .15s, background-color .15s, border-color .15s; }
.tl-mm__top:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.tl-mm__top:focus-visible { outline: 2px solid #5eead4; outline-offset: 2px; }
.tl-mm__ico { color: #5eead4; font-size: 13px; }
.tl-mm__top[aria-expanded="true"], .tl-mm__top.is-current { color: #fff; border-color: rgba(45, 212, 191, .35); background: rgba(45, 212, 191, .08); }
.tl-mm__chev { opacity: .7; transition: transform .2s; }
.tl-mm__top[aria-expanded="true"] .tl-mm__chev { transform: rotate(180deg); }
.tl-mm__thumb, .tl-mm__go, .tl-mm__mhead { display: none; }

/* ── Panneau (bureau) ───────────────────────────────────────────────── */
@media (min-width: 1100px) {
  .tl-mm { margin-left: 18px; }
  .tl-mm__panel { position: absolute; top: calc(100% + 6px); left: 16px; right: 16px; z-index: 30; padding: 14px; border: 1px solid var(--mm-line); border-radius: 18px; background: linear-gradient(180deg, #0d141d, var(--mm-panel)); box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(45, 212, 191, .05); animation: tl-mm-in .18s ease-out; }
  .tl-mm__panel::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }   /* pont de survol entre la barre et le panneau */
  .tl-mm__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr) minmax(0, 1.65fr); gap: 14px; }
  .tl-mm__band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; padding: 14px 10px 4px; border-top: 1px solid var(--mm-line); }
}
@keyframes tl-mm-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.tl-mm__hero { position: relative; display: flex; min-height: 360px; overflow: hidden; border-radius: 14px; border: 1px solid var(--mm-line); background: var(--mm-card); color: #fff; isolation: isolate; }
.tl-mm__hero img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tl-mm__hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6, 10, 15, .88) 0%, rgba(6, 10, 15, .55) 45%, rgba(6, 10, 15, .15) 100%); }
.tl-mm__hero:hover img { transform: scale(1.04); }
.tl-mm__herotxt { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px; }
.tl-mm__kicker { color: #5eead4; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.tl-mm__herotxt strong { font-size: 26px; line-height: 1.12; letter-spacing: -.02em; }
.tl-mm__lead { max-width: 30ch; color: #cbd5e1; font-size: 13px; line-height: 1.5; }
.tl-mm__herobtn { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding: 10px 16px; border-radius: 999px; background: #fff; color: #0b1118; font-size: 13px; font-weight: 800; }
.tl-mm__hero:hover .tl-mm__herobtn { background: #5eead4; }
.tl-mm__hero:focus-visible { outline: 2px solid #5eead4; outline-offset: 3px; }

.tl-mm__list { display: grid; align-content: start; gap: 4px; margin: 0; padding: 0; list-style: none; }
.tl-mm__list a { display: grid; grid-template-columns: 36px 1fr 12px; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid transparent; border-radius: 12px; color: #e6edf3; }
.tl-mm__list a > i:first-child { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(45, 212, 191, .08); color: #5eead4; font-size: 15px; }
.tl-mm__list a > i:last-child { color: #4b5b6d; font-size: 11px; transition: transform .15s, color .15s; }
.tl-mm__list b { display: block; font-size: 14px; font-weight: 700; }
.tl-mm__list small { display: block; margin-top: 2px; color: var(--mm-muted); font-size: 12px; }
.tl-mm__list a:hover, .tl-mm__list a:focus-visible { border-color: rgba(45, 212, 191, .3); background: rgba(45, 212, 191, .06); outline: none; }
.tl-mm__list a:hover > i:last-child, .tl-mm__list a:focus-visible > i:last-child { color: #5eead4; transform: translateX(2px); }

.tl-mm__side { display: grid; align-content: start; gap: 12px; padding: 4px 4px 4px 14px; border-left: 1px solid var(--mm-line); }
.tl-mm__sidehead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tl-mm__sidehead strong { color: #fff; font-size: 14px; }
.tl-mm__sidehead a { color: #5eead4; font-size: 12.5px; font-weight: 700; }
.tl-mm__sidehead a:hover { text-decoration: underline; }
.tl-mm__cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tl-mm__cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tl-mm__cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tl-mm__card { position: relative; display: block; overflow: hidden; border-radius: 12px; border: 1px solid var(--mm-line); background: var(--mm-card); aspect-ratio: 4 / 4.4; }
.tl-mm__cards--2 .tl-mm__card { aspect-ratio: 16 / 10; }
.tl-mm__cards--guides .tl-mm__card { aspect-ratio: 4 / 3.4; }
.tl-mm__card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.tl-mm__card span { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 9px; background: linear-gradient(0deg, rgba(5, 9, 14, .92), transparent); color: #fff; font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.tl-mm__card:hover img { transform: scale(1.06); }
.tl-mm__card:hover, .tl-mm__card:focus-visible { border-color: rgba(45, 212, 191, .45); outline: none; }
.tl-mm__mats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.tl-mm__mat { display: flex; align-items: center; gap: 8px; padding: 7px; border: 1px solid var(--mm-line); border-radius: 11px; background: var(--mm-card); }
.tl-mm__mat img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.tl-mm__mat b { display: block; color: #fff; font-size: 12.5px; }
.tl-mm__mat small { display: block; color: var(--mm-muted); font-size: 10.5px; white-space: nowrap; }
.tl-mm__mat:hover, .tl-mm__mat:focus-visible { border-color: rgba(45, 212, 191, .45); outline: none; }
.tl-mm__band > span { display: flex; align-items: center; gap: 12px; color: #e6edf3; }
.tl-mm__band i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--mm-line); color: #5eead4; font-size: 15px; flex-shrink: 0; }
.tl-mm__band b { display: block; font-size: 13px; }
.tl-mm__band small { display: block; margin-top: 2px; color: var(--mm-muted); font-size: 11.5px; }
/* Barre plus serrée sous 1440 px (marque, 7 rubriques, langue et bouton Studio sur une ligne). */
@media (min-width: 1100px) and (max-width: 1439px) {
  .tl-mm { margin-left: 8px; }
  .tl-mm__top { gap: 6px; padding: 0 8px; font-size: 13px; }
  .tl-nav--mega .tl-nav__name small { display: none; }
}
@media (min-width: 1100px) and (max-width: 1279px) {
  .tl-mm__top { padding: 0 7px; }
  .tl-mm__ico, .tl-mm__chev { display: none; }
  .tl-mm__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr); }
  .tl-mm__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-mm__card { aspect-ratio: 16 / 10; }
  .tl-mm__mats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tl-nav__name small { display: none; }
}

/* ── Mobile : liste à vignettes, puis sous-panneau par rubrique ─────── */
@media (max-width: 1099px) {
  .tl-nav__name small { font-size: 10px; }
  .tl-mm.tl-nav__menu { padding: 12px 14px 18px; }
  .tl-mm.is-sub { min-height: calc(100dvh - var(--tl-nav-h)); }
  .tl-mm__bar { flex-direction: column; align-items: stretch; gap: 6px; }
  .tl-mm__top { position: relative; width: 100%; height: 54px; justify-content: flex-start; gap: 12px; padding: 0 12px; overflow: hidden; border: 1px solid var(--mm-line); border-radius: 12px; background: #111923; color: #e6edf3; font-size: 15px; }
  .tl-mm__top > span { flex: 1; text-align: left; }
  .tl-mm__chev { display: none; }
  .tl-mm__go { display: inline; color: #4b5b6d; font-size: 12px; }
  .tl-mm__thumb { display: block; width: 84px; height: 54px; margin-right: -12px; object-fit: cover; order: 3; -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); mask-image: linear-gradient(90deg, transparent, #000 45%); }
  .tl-mm__go { order: 4; position: absolute; right: 10px; color: #fff; text-shadow: 0 1px 4px #000; }
  .tl-mm__panel { position: absolute; inset: 0; z-index: 5; overflow-y: auto; padding: 0 14px 20px; background: #0e131a; animation: tl-mm-slide .2s ease-out; }
  .tl-mm__mhead { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; margin: 0 -14px 12px; padding: 12px 14px; border-bottom: 1px solid var(--mm-line); background: #0e131a; }
  .tl-mm__mhead strong { flex: 1; color: #fff; font-size: 15px; }
  .tl-mm__back, .tl-mm__close { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--mm-line); border-radius: 10px; background: #111923; color: #e6edf3; font-size: 15px; cursor: pointer; }
  .tl-mm__back:focus-visible, .tl-mm__close:focus-visible { outline: 2px solid #5eead4; outline-offset: 2px; }
  .tl-mm__grid { display: grid; gap: 12px; }
  .tl-mm__hero { min-height: 0; flex-direction: column; border-radius: 14px; }
  .tl-mm__hero img { position: static; z-index: 0; aspect-ratio: 16 / 9; height: auto; }
  .tl-mm__hero::after { display: none; }
  .tl-mm__herotxt { gap: 6px; padding: 14px; }
  .tl-mm__herotxt strong { font-size: 19px; }
  .tl-mm__herobtn { margin-top: 6px; padding: 9px 14px; }
  .tl-mm__list a { padding: 10px; background: #111923; border-color: var(--mm-line); }
  .tl-mm__side, .tl-mm__band { display: none; }
  .tl-mm.is-sub .tl-nav__end, .tl-mm.is-sub .tl-nav__more { visibility: hidden; }
}
@keyframes tl-mm-slide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
[dir="rtl"] .tl-mm__list a > i:last-child, [dir="rtl"] .tl-mm__go, [dir="rtl"] .tl-mm__back i, [dir="rtl"] .tl-mm__herobtn i, [dir="rtl"] .tl-mm__sidehead a i { transform: scaleX(-1); }
@media (max-width: 1099px) { [dir="rtl"] .tl-mm__go { right: auto; left: 10px; } [dir="rtl"] .tl-mm__thumb { margin-right: 0; margin-left: -12px; -webkit-mask-image: linear-gradient(270deg, transparent, #000 45%); mask-image: linear-gradient(270deg, transparent, #000 45%); } }
@media (prefers-reduced-motion: reduce) {
  .tl-mm__panel, .tl-mm__hero img, .tl-mm__card img { animation: none; transition: none; }
  .tl-mm__hero:hover img, .tl-mm__card:hover img { transform: none; }
}
