/* Sommaire des articles aurone.com (voir sommaire.js) — nov. 2026 */

/* Le thème met overflow:hidden sur body, ce qui empêche position:sticky. clip bloque toujours le débordement horizontal sans créer de zone de défilement. */
body.single { overflow: visible; overflow-x: clip; }

/* Barre de progression de lecture */
#aur-reading-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1000; pointer-events: none; }
#aur-reading-progress span { display: block; height: 100%; background: #1a56db; transform: scaleX(0); transform-origin: 0 50%; will-change: transform; }

/* Éléments communs */
#sommaire-article .aur-toc-toggle { display: none; }
#sommaire-article a { border-radius: 10px; }
/* Texte du sommaire plus discret que celui de l'article (16 px) */
#sommaire-article .aur-toc-list a { font-size: 14px; line-height: 1.45; padding: 4px 10px; }
#sommaire-article .aur-toc-list .aur-toc-top { font-size: 13px; }
#sommaire-article .toc-title { font-size: 14px; font-weight: 600; }
#sommaire-article .aur-toc-top { display: block; margin-top: 10px; padding: 5px 10px; font-size: .875rem; color: #5b6b85; }
#sommaire-article .aur-toc-top:hover { color: #1a56db; }

/* Ordinateur : collant jusqu'à la fin de l'article, défilant si trop long */
@media (min-width: 960px) {
  .menuleftcolumn { position: -webkit-sticky; position: sticky; top: 120px; z-index: 1; }
  .admin-bar .menuleftcolumn { top: 152px; }
  #sommaire-article {
    position: static !important; top: auto !important; bottom: auto !important; max-width: none !important;
    max-height: calc(100vh - 140px); overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .admin-bar #sommaire-article { max-height: calc(100vh - 172px); }
  #sommaire-article::-webkit-scrollbar { display: none; width: 0; height: 0; }
  #sommaire-article .aur-toc-head { position: sticky; top: 0; z-index: 1; background: #fff; }
  #aur-toc-fab, #aur-toc-panel, #aur-toc-overlay { display: none !important; }
}

/* Flèches ▲ / ▼ avec fondu, quand le sommaire dépasse l'écran (ordinateur) */
.aur-toc-more {
  position: absolute; left: 0; right: 0; z-index: 2; display: block; width: 100%; height: 40px; margin: 0; padding: 0;
  border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: #1a56db;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s, visibility .2s;
}
.aur-toc-more-up { padding-bottom: 14px; background: linear-gradient(to bottom, #fff 0, #fff 45%, rgba(255, 255, 255, 0) 100%); }
.aur-toc-more-down { padding-top: 14px; background: linear-gradient(to top, #fff 0, #fff 45%, rgba(255, 255, 255, 0) 100%); }
.aur-toc-more.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
.aur-toc-more:hover, .aur-toc-more:focus-visible { color: #0b3fa8; text-decoration: underline; }
@media (max-width: 959px) { .aur-toc-more { display: none !important; } }

/* Mobile et tablette : sommaire replié en haut de l'article */
@media (max-width: 959px) {
  #sommaire-article { position: relative !important; margin-bottom: 24px; border: 1px solid #dfe6f3; border-radius: 12px; background: #fff; overflow: hidden; }
  #sommaire-article .aur-toc-head { display: none; }
  #sommaire-article .aur-toc-toggle {
    display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 14px 16px;
    border: 0; background: #f4f7fd; color: #0b1f44; font: inherit; font-weight: 600; text-align: left; cursor: pointer;
  }
  #sommaire-article .aur-toc-count { margin-left: auto; font-weight: 400; font-size: .875rem; color: #5b6b85; }
  #sommaire-article .aur-toc-chev { width: 8px; height: 8px; margin: 0 4px 4px 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
  #sommaire-article.is-open .aur-toc-chev { transform: rotate(-135deg); margin: 4px 4px 0 0; }
  #sommaire-article .aur-toc-list { display: none; padding: 8px 8px 12px; }
  #sommaire-article.is-open .aur-toc-list { display: block; }
}

/* Bouton flottant « Sommaire » */
#aur-toc-fab {
  position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 1050;
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border: 0; border-radius: 999px;
  background: #1a56db; color: #fff; font: inherit; font-size: .9375rem; font-weight: 600; line-height: 1.2;
  box-shadow: 0 6px 18px rgba(11, 31, 68, .25); cursor: pointer;
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .2s, transform .2s;
}
#aur-toc-fab.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.aur-toc-fab-icon { position: relative; width: 14px; height: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }

/* Panneau du sommaire (mobile) */
#aur-toc-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1090; background: rgba(11, 31, 68, .45); opacity: 0; pointer-events: none; transition: opacity .25s; }
#aur-toc-panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100; max-height: 78vh;
  display: flex; flex-direction: column; background: #fff; border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 30px rgba(11, 31, 68, .2); transform: translateY(100%); transition: transform .25s ease;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
#aur-toc-panel[hidden] { display: none; }
html.aur-toc-panel-open { overflow: hidden; }
.aur-toc-panel-open #aur-toc-overlay { opacity: 1; pointer-events: auto; }
.aur-toc-panel-open #aur-toc-panel { transform: none; }
.aur-toc-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #e6ebf4; font-weight: 600; color: #0b1f44; }
.aur-toc-close { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: #f1f4fa; color: #0b1f44; font-size: 22px; line-height: 36px; cursor: pointer; }
.aur-toc-panel-list { flex: 1 1 auto; margin: 0; padding: 8px; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.aur-toc-panel-list li { margin: 0; }
.aur-toc-panel-list a { display: block; padding: 10px 12px; border-radius: 10px; color: #1f2d44; line-height: 1.35; text-decoration: none; }
.aur-toc-panel-list a.active { background: #1361d5; color: #fff; }
#aur-toc-panel .aur-toc-top { display: block; padding: 12px 20px 14px; border-top: 1px solid #e6ebf4; color: #5b6b85; font-size: .875rem; }

@media (prefers-reduced-motion: reduce) {
  #aur-toc-fab, #aur-toc-overlay, #aur-toc-panel, #sommaire-article .aur-toc-chev { transition: none; }
}

/* Tags en bas des articles : pastilles bleu clair + nombre d'articles */
ul.tages { display: flex; flex-wrap: wrap; gap: 10px; margin: 40px 0 0 !important; padding: 24px 0 0 !important; border-top: 1px solid #e6ebf4; list-style: none; }
ul.tages.uk-list > li { margin: 0 !important; padding: 0 !important; border: 0; }
ul.tages.uk-list > li::before { content: none; display: none; }
ul.tages .uk-grid { display: block; margin: 0; }
ul.tages .uk-grid > * { width: auto; margin: 0; padding: 0; }
ul.tages .uk-grid > .uk-width-auto { display: none; }
ul.tages .el-content { margin: 0; }
ul.tages a.el-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 500px;
  background: #eef3fd; color: #1361d5; font-size: 14px; line-height: 1.3; text-decoration: none;
  transition: background-color .15s, color .15s;
}
ul.tages a.el-link:hover, ul.tages a.el-link:focus-visible { background: #1a56db; color: #fff; text-decoration: none; }
ul.tages .aur-tag-count { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 500px; background: rgba(19, 97, 213, .12); font-size: 12px; font-weight: 600; line-height: 1.5; text-align: center; transition: background-color .15s; }
ul.tages a.el-link:hover .aur-tag-count, ul.tages a.el-link:focus-visible .aur-tag-count { background: rgba(255, 255, 255, .22); }
