/* Sommaire latéral mobile : visible, compact et non intrusif. */
@media (max-width: 600px) {
  html body .agd-page-toc {
    display: block !important;
    position: fixed !important;
    z-index: 120 !important;
    top: 50% !important;
    right: 8px !important;
    bottom: auto !important;
    width: min(232px, calc(100vw - 28px)) !important;
    max-height: 42vh !important;
    margin: 0 !important;
    padding: 10px !important;
    border: 1px solid rgba(214, 173, 106, .55) !important;
    border-radius: 14px !important;
    background: #0b3157 !important;
    box-shadow: 0 12px 30px rgba(6, 29, 58, .24) !important;
    transform: translateY(-50%) !important;
    overflow: auto !important;
  }

  html body .agd-page-toc.is-collapsed {
    width: min(232px, calc(100vw - 28px)) !important;
    transform: translate(calc(100% - 30px), -50%) !important;
    opacity: .86 !important;
    overflow: visible !important;
    background: #0b3157 !important;
    border-color: rgba(240, 201, 133, .8) !important;
    box-shadow: 0 8px 22px rgba(6, 29, 58, .28) !important;
  }

  html body .agd-page-toc.is-idle { opacity: .86 !important; }

  html body .agd-page-toc.is-collapsed .agd-page-toc__title {
    left: 0 !important;
    top: 0 !important;
    width: 30px !important;
    height: 46px !important;
    padding: 7px 0 !important;
    border-radius: 9px 0 0 9px !important;
    background: #0b3157 !important;
    color: #ffffff !important;
    font-size: .57rem !important;
    letter-spacing: .08em !important;
    writing-mode: vertical-rl !important;
    box-shadow: inset -1px 0 rgba(240, 201, 133, .3) !important;
  }

  html body .agd-page-toc.is-collapsed {
    border-radius: 28px 0 0 28px !important;
    border-top-left-radius: 28px !important;
    border-bottom-left-radius: 28px !important;
  }

  html body .agd-page-toc.is-collapsed .agd-page-toc__title {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border-radius: 28px 0 0 28px !important;
    text-align: center !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  html body .agd-page-toc.is-collapsed .agd-page-toc__top,
  html body .agd-page-toc.is-collapsed nav,
  html body .agd-page-toc.is-collapsed .agd-page-toc__close {
    visibility: hidden !important;
    opacity: 0 !important;
  }

  html body .agd-page-toc:not(.is-collapsed) .agd-page-toc__top {
    margin-bottom: 9px !important;
    padding: 3px 0 9px !important;
    border-bottom-color: rgba(240, 201, 133, .34) !important;
  }

  html body .agd-page-toc:not(.is-collapsed) .agd-page-toc__top img {
    width: 68px !important;
    height: 50px !important;
    max-width: none !important;
    object-fit: contain !important;
    filter: drop-shadow(0 4px 8px rgba(6, 29, 58, .18)) !important;
  }

  html body .agd-page-toc:not(.is-collapsed) .agd-page-toc__title {
    margin-bottom: 7px !important;
    color: #ffffff !important;
    font-size: .68rem !important;
  }

  html body .agd-page-toc:not(.is-collapsed) nav a {
    margin: 2px 0 !important;
    padding: 7px 8px !important;
    border-left: 3px solid rgba(214, 173, 106, .7) !important;
    border-radius: 0 7px 7px 0 !important;
    background: rgba(255, 255, 255, .08) !important;
    color: #ffffff !important;
    font-size: .8rem !important;
    font-weight: 650 !important;
    line-height: 1.25 !important;
  }

  html body .agd-page-toc:not(.is-collapsed) nav a:hover,
  html body .agd-page-toc:not(.is-collapsed) nav a:focus-visible,
  html body .agd-page-toc:not(.is-collapsed) nav a.is-active {
    background: rgba(214, 173, 106, .2) !important;
    color: #ffffff !important;
  }
}

@media (max-width: 380px) {
  html body .agd-page-toc.is-collapsed .agd-page-toc__title {
    height: 44px !important;
    font-size: .53rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .agd-page-toc { transition: none !important; }
}
