/* #217 (choix A, 02/12) : en-tête des rubriques. Titre à gauche, tris et sous-rubriques à droite sur sa ligne de base ; aucun filet, aucun soulignement. */
html body .btp-menu-app:not(#btp-h1):not(#btp-h2) {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto 1fr !important;
    column-gap: 48px !important;
    padding: 0 40px !important;
    box-sizing: border-box;
}
html body .btp-menu-app:not(#btp-h1):not(#btp-h2) > .btp-menu-sidebar,
html body .btp-menu-app:not(#btp-h1):not(#btp-h2) .btp-menu-sidebar-inner { display: contents !important; }
html body .btp-menu-app:not(#btp-h1):not(#btp-h2) .btp-menu-sidebar-inner > :not(.btp-page-head) { grid-column: 1 !important; align-self: start; }
html body .btp-menu-app:not(#btp-h1):not(#btp-h2) .btp-menu-sidebar-foot { grid-row: 2 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }
html body .btp-menu-app:not(#btp-h1):not(#btp-h2) > .btp-menu-content { grid-column: 2 !important; grid-row: 2 / 6 !important; padding-top: 0 !important; margin-top: 0 !important; min-width: 0; }
html body .btp-menu-app:not(#btp-h1):not(#btp-h2) > .btp-menu-content > :first-child { margin-top: 0 !important; padding-top: 0 !important; }
html body .btp-menu-app .btp-sidebar-logo:not(#btp-h1) { display: none !important; }

/* Ligne du titre */
html body .btp-menu-app .btp-page-head:not(#btp-h1):not(#btp-h2) {
    grid-column: 1 / -1 !important; grid-row: 1 !important;
    display: flex !important; flex-wrap: wrap; align-items: baseline !important; justify-content: space-between;
    gap: 10px 32px !important;
    padding: 32px 0 28px !important; margin: 0 !important; border: 0 !important; background: none !important;
}
html body .btp-menu-app .btp-page-head .btp-menu-sidebar-head:not(#btp-h1):not(#btp-h2) {
    display: block !important; flex: none; margin: 0 !important; padding: 0 !important; border: 0 !important;
    position: static !important; opacity: 1 !important; visibility: visible !important; transform: none !important; height: auto !important;
}
html body .btp-menu-app :is(.btp-page-head, .btp-side-head) .btp-head-title:not(#btp-h1):not(#btp-h2) {
    display: block !important; margin: 0 !important; padding: 0 !important;
    font-family: Anton, Impact, sans-serif !important; font-weight: 400 !important; line-height: 1 !important;
    font-size: clamp(40px, 4.2vw, 60px) !important; letter-spacing: 0 !important; color: var(--btp-white) !important; white-space: nowrap;
}
html body .btp-menu-app :is(.btp-page-head, .btp-side-head) .btp-head-title .btp-la-carte-mark:not(#btp-h1):not(#btp-h2) {
    display: inline-flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: baseline !important;
    gap: 0 !important; margin: 0 !important; padding: 0 !important; transform: none !important; font-size: 1em !important;
}
html body .btp-menu-app :is(.btp-page-head, .btp-side-head) .btp-head-title .btp-la-carte-main:not(#btp-h1):not(#btp-h2) {
    font-size: 1em !important; line-height: 1 !important; margin: 0 !important; padding: 0 !important; transform: none !important;
    color: inherit !important; letter-spacing: 0 !important; writing-mode: horizontal-tb !important;
}
html body .btp-menu-app :is(.btp-page-head, .btp-side-head) .btp-head-title .btp-nav-prefix-wrap:not(.btp-art-none):not(#btp-p1):not(#btp-p2):not(#btp-h3) { color: var(--btp-red-light) !important; }
/* DU : même hauteur et même sens que LE, espace de 0,1359 H de chaque côté (css/btp-article.css). */
html body .btp-menu-app :is(.btp-page-head, .btp-side-head) .btp-head-title .btp-nav-prefix-wrap.btp-head-du:not(.btp-art-none):not(#btp-p1):not(#btp-p2):not(#btp-h3) {
    margin-left: calc(var(--btp-h) * var(--btp-part-gap) - 0.03em) !important;
}
html body .btp-menu-app :is(.btp-page-head, .btp-side-head) .btp-head-cjk:not(#btp-h1) { display: none !important; }
html:is([lang="zh"], [lang="ja"], [lang="ko"]) body .btp-menu-app :is(.btp-page-head, .btp-side-head) .btp-head-title .btp-la-carte-mark:not(#btp-h1):not(#btp-h2) { display: none !important; }
html:is([lang="zh"], [lang="ja"], [lang="ko"]) body .btp-menu-app :is(.btp-page-head, .btp-side-head) .btp-head-cjk:not(#btp-h1):not(#btp-h2) { display: inline !important; }
/* Le Bateau : le logo complet est le titre. */
html body .btp-menu-app :is(.btp-page-head, .btp-side-head) .btp-head-logo svg:not(#btp-h1):not(#btp-h2) {
    display: block !important; height: calc(clamp(40px, 4.2vw, 60px) * 0.885) !important; width: auto !important; max-width: 100% !important;
    color: var(--btp-white) !important; fill: currentColor !important; margin: 0 !important;
}

/* Tris et sous-rubriques */
html body .btp-menu-app .btp-page-head :is(.btp-menu-nav, .btp-prog-filters):not(#btp-h1):not(#btp-h2) {
    display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; justify-content: flex-end !important; align-items: baseline !important;
    gap: 4px 22px !important; flex: 1 1 0 !important; min-width: 0; margin: 0 0 0 auto !important; padding: 0 !important;
    position: static !important; border: 0 !important; background: none !important; box-shadow: none !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
html body .btp-menu-app .btp-page-head :is(.btp-menu-nav-link, .btp-prog-filter):not(#btp-h1):not(#btp-h2) {
    all: unset; box-sizing: border-box !important; cursor: pointer;
    display: inline-flex !important; align-items: center !important; gap: 6px !important; flex: none !important;
    min-height: 32px !important; padding: 0 !important; margin: 0 !important; width: auto !important; max-width: none !important;
    font: 400 15px/1.2 Anton, Impact, sans-serif !important; letter-spacing: 0.06em !important; text-transform: uppercase !important;
    color: rgba(236, 239, 247, 0.62) !important; background: none !important; border: 0 !important; border-radius: 0 !important;
    box-shadow: none !important; outline-offset: 4px; text-decoration: none !important; white-space: nowrap !important; transform: none !important;
}
html body .btp-menu-app .btp-page-head :is(.btp-menu-nav-link, .btp-prog-filter):not(#btp-h1):not(#btp-h2)::after { content: none !important; display: none !important; }
html body .btp-menu-app .btp-page-head :is(.btp-menu-nav-link, .btp-prog-filter):not(#btp-h1):not(#btp-h2)::before { content: none !important; display: none !important; }
html body .btp-menu-app .btp-page-head :is(.btp-menu-nav-link, .btp-prog-filter):is(:hover, :focus-visible):not(#btp-h1):not(#btp-h2) { color: var(--btp-white) !important; }
html body .btp-menu-app .btp-page-head :is(.btp-menu-nav-link.active, .btp-menu-nav-link[aria-current], .btp-menu-nav-link[aria-pressed="true"], .btp-prog-filter.is-active):not(#btp-h1):not(#btp-h2) { color: var(--btp-red-light) !important; }
html body .btp-menu-app .btp-page-head :is(.btp-menu-nav-link.active, .btp-menu-nav-link[aria-current], .btp-menu-nav-link[aria-pressed="true"], .btp-prog-filter.is-active):not(#btp-h1):not(#btp-h2)::before {
    content: "" !important; display: block !important; position: static !important; flex: none !important;
    width: 8px !important; height: 8px !important; border-radius: 50% !important; background: var(--btp-red) !important;
    margin: 0 !important; border: 0 !important; box-shadow: none !important; transform: none !important; opacity: 1 !important;
}
html body .btp-menu-app .btp-page-head :is(.btp-menu-label, .btp-prog-filter > span:first-child):not(#btp-h1):not(#btp-h2) {
    all: unset; white-space: nowrap !important; overflow: visible !important; text-overflow: clip !important; max-width: none !important; font: inherit !important; color: inherit !important;
}
html body .btp-menu-app .btp-page-head :is(.btp-menu-num, .btp-menu-nav-group):not(#btp-h1):not(#btp-h2) { display: none !important; }
html body .btp-menu-app .btp-page-head :is(.btp-menu-count, .btp-prog-filter-count):not(#btp-h1):not(#btp-h2) {
    all: unset; font: 600 0.62em/1 Outfit, sans-serif !important; opacity: 0.85; align-self: flex-start !important; color: inherit !important; background: none !important;
}

/* Aucun filet dans les rubriques (règle d'Alex du 07/10 et du 13/11). */
html:not(#btp-a) body .btp-menu-app :is(.btp-pdf-card, .btp-menu-otherpages, .btp-menu-socials-row, .btp-menu-section, .btp-menu-sec-head):not(#btp-h1):not(#btp-h2):not(#btp-h3) { border-top: 0 !important; border-bottom: 0 !important; }

/* < 1024 px : sous le titre, seulement les documents (carte PDF, brochure) ; autres rubriques et réseaux restent dans le menu. */
@media (max-width: 1023px) {
    html:not(#btp-a) body .btp-menu-app .btp-menu-sidebar-inner > :not(.btp-page-head):not(.btp-menu-sidebar-foot):not(.btp-side-col):not(#btp-h1):not(#btp-h2):not(#btp-h3),
    html:not(#btp-a) body .btp-menu-app .btp-side-col > :not(.btp-menu-sidebar-foot):not(#btp-h1):not(#btp-h2):not(#btp-h3) { display: none !important; }
    html:not(#btp-a) body .btp-menu-app .btp-side-col:not(#btp-h1):not(#btp-h2):not(#btp-h3) { display: contents !important; }
    html:not(#btp-a) body .btp-menu-app .btp-side-col > .btp-menu-sidebar-foot:not(#btp-h1):not(#btp-h2):not(#btp-h3) { grid-column: 1 !important; grid-row: 2 !important; }
    html:not(#btp-a) body .btp-menu-app .btp-menu-sidebar-foot:not(#btp-h1):not(#btp-h2):not(#btp-h3) { justify-content: flex-start !important; padding: 0 18px 12px !important; }
}

/* Téléphone : titre visible, tris sur une ligne qui défile. */
@media (max-width: 900px) {
    html body .btp-menu-app:not(#btp-h1):not(#btp-h2) { display: block !important; padding: 0 !important; }
    html body .btp-menu-app .btp-page-head:not(#btp-h1):not(#btp-h2) { display: block !important; padding: 20px 18px 14px !important; }
    html body .btp-menu-app :is(.btp-page-head, .btp-side-head) .btp-head-title:not(#btp-h1):not(#btp-h2) { font-size: clamp(26px, 8vw, 40px) !important; }
    html body .btp-menu-app :is(.btp-page-head, .btp-side-head) .btp-head-logo svg:not(#btp-h1):not(#btp-h2) { height: calc(clamp(26px, 8vw, 40px) * 0.885) !important; }
    html body .btp-menu-app .btp-page-head :is(.btp-menu-nav, .btp-prog-filters):not(#btp-h1):not(#btp-h2) {
        flex-wrap: nowrap !important; justify-content: flex-start !important; overflow-x: auto !important; overscroll-behavior-x: contain;
        scrollbar-width: none; margin: 10px -18px 0 !important; padding: 0 18px !important; gap: 4px 18px !important;
    }
    html body .btp-menu-app .btp-page-head :is(.btp-menu-nav, .btp-prog-filters):not(#btp-h1):not(#btp-h2)::-webkit-scrollbar { display: none; }
    html body .btp-menu-app:not(#btp-h1):not(#btp-h2) .btp-menu-sidebar-foot { padding: 0 18px 12px !important; }
}

/* #219 : au défilement, le titre et les tris restent épinglés en haut, documents et titres de section calés dessous. */
@media (min-width: 901px) {
    html body .btp-menu-app:not(#btp-h1):not(#btp-h2) { grid-template-rows: var(--btp-head-h, 120px) auto auto auto 1fr !important; }
    html body .btp-menu-app .btp-page-head:not(#btp-h1):not(#btp-h2) {
        grid-row: 1 / -1 !important; align-self: start !important; position: sticky !important; top: 0 !important; z-index: 40;
        background: var(--btp-primary, #212f59) !important; margin: 0 -40px !important; padding-left: 40px !important; padding-right: 40px !important;
    }
    html body .btp-menu-app .btp-menu-sidebar-foot:not(#btp-h1):not(#btp-h2) { grid-row: 2 / 6 !important; align-self: start !important; position: sticky !important; top: var(--btp-head-h, 120px) !important; }
    html body .btp-menu-app .btp-menu-sec-head:not(#btp-h1):not(#btp-h2):not(#btp-h3) { top: var(--btp-head-h, 120px) !important; }
}

/* #219 (≥ 1024 px) : colonne de gauche d'origine épinglée sur toute la hauteur, à la largeur de son contenu ; titre et tris au-dessus de la liste. */
@media (min-width: 1024px) {
    html body .btp-menu-app:not(#btp-h1):not(#btp-h2) { grid-template-columns: max-content minmax(0, 1fr) !important; grid-template-rows: var(--btp-head-h, 120px) 1fr !important; }
    html body .btp-menu-app .btp-page-head:not(#btp-h1):not(#btp-h2) { grid-column: 2 !important; margin: 0 -40px 0 0 !important; padding-left: var(--btp-list-x, 0px) !important; padding-right: var(--btp-fix-r, 56px) !important; }
    html body .btp-menu-app:not(#btp-h1):not(#btp-h2) > .btp-menu-content { grid-row: 2 !important; }
    html:not(#btp-a) body .btp-menu-app .btp-side-col:not(#btp-h1):not(#btp-h2):not(#btp-h3) {
        grid-column: 1 !important; grid-row: 1 / -1 !important; align-self: start !important; position: sticky !important; top: 0 !important; z-index: 41;
        height: 100vh; box-sizing: border-box; overflow-y: auto; scrollbar-width: none; display: flex !important; flex-direction: column; align-items: stretch;
        padding: 32px 0 24px !important; margin: 0 !important; background: var(--btp-primary, #212f59);
    }
    html:not(#btp-a) body .btp-menu-app .btp-side-col > *:not(#btp-h1):not(#btp-h2):not(#btp-h3) { align-self: stretch !important;
        position: static !important; grid-row: auto !important; left: auto !important; right: auto !important; width: auto !important; max-width: none !important;
        border: 0 !important; box-shadow: none !important; flex: none !important;
    }
    html:not(#btp-a) body .btp-menu-app .btp-side-col > .btp-side-head:not(#btp-h1):not(#btp-h2):not(#btp-h3) { padding: 0 !important; margin: 0 !important; }
    html:not(#btp-a) body .btp-menu-app .btp-side-col > .btp-menu-sidebar-foot:not(#btp-h1):not(#btp-h2):not(#btp-h3) { margin-top: 28px !important; align-self: stretch !important; justify-content: flex-start !important; overflow: visible !important; max-height: none !important; }
    html:not(#btp-a) body .btp-menu-app .btp-side-col .btp-pdf-card:not(#btp-h1):not(#btp-h2):not(#btp-h3) { flex: none !important; width: auto !important; min-width: 0 !important; }
    /* Aperçu de la carte PDF : largeur de la colonne, sans l'élargir. */
    html:not(#btp-a) body .btp-menu-app .btp-side-col .btp-pdf-card:has(> .btp-pdf-thumb:not(.btp-pdf-thumb-svg)):not(#btp-h1):not(#btp-h2):not(#btp-h3) { flex: 1 1 100% !important; width: 100% !important; contain: inline-size; }
    html:not(#btp-a) body .btp-menu-app .btp-side-col > .btp-menu-otherpages:not(#btp-h1):not(#btp-h2):not(#btp-h3) { margin-top: 28px !important; padding-top: 0 !important; }
    html:not(#btp-a) body .btp-menu-app .btp-side-col > .btp-menu-socials-row:not(#btp-h1):not(#btp-h2):not(#btp-h3) { margin-top: 24px !important; padding-top: 0 !important; }
    html:not(#btp-a) body .btp-menu-app .btp-side-col :is(.btp-lang-btn, .btp-menu-other-link, .btp-pdf-card):not(#btp-h1):not(#btp-h2):not(#btp-h3) { border: 0 !important; box-shadow: none !important; text-decoration: none !important; }
    html:not(#btp-a) body .btp-menu-app .btp-side-col::-webkit-scrollbar { display: none; }
}

/* #227 (≥ 1024 px) : le titre de la rubrique est le seul titre, en haut de la colonne de gauche, à toute sa largeur utile ; le bloc épinglé de droite ne garde que les tris, sur la ligne de base du titre. */
@media (min-width: 1024px) {
    html body .btp-menu-app .btp-page-head > .btp-menu-sidebar-head:not(#btp-h1):not(#btp-h2) { display: none !important; }
    html body .btp-menu-app .btp-page-head:not(#btp-h1):not(#btp-h2) { padding-top: var(--btp-tris-y, 32px) !important; padding-bottom: 24px !important; }
    html:not(#btp-a) body .btp-menu-app .btp-side-col > .btp-side-head:not(#btp-h1):not(#btp-h2):not(#btp-h3) { display: block !important; container-type: inline-size; min-width: min(21vw, 300px) !important; }
    html body .btp-menu-app .btp-side-head .btp-head-title:not(#btp-h1):not(#btp-h2) { font-size: var(--btp-side-fs, 13cqw) !important; }
    html body .btp-menu-app .btp-side-head .btp-head-logo svg:not(#btp-h1):not(#btp-h2) { width: 100% !important; height: auto !important; max-width: none !important; }
}
/* #227 : le point du tri actif ne décale pas sa ligne de base ; il reste centré sur les capitales. */
html body .btp-menu-app .btp-page-head :is(.btp-menu-nav-link, .btp-prog-filter):not(#btp-h1):not(#btp-h2) { align-items: baseline !important; }
html body .btp-menu-app .btp-page-head :is(.btp-menu-nav-link.active, .btp-menu-nav-link[aria-current], .btp-menu-nav-link[aria-pressed="true"], .btp-prog-filter.is-active):not(#btp-h1):not(#btp-h2)::before { align-self: baseline !important; margin: 0 0 calc(0.43em - 4px) !important; }
