/* Navigation commune aux pages Analyse et Rapport. */
.sidebar {
  flex: none; width: 236px; display: flex; flex-direction: column;
  padding: var(--s3); background: var(--bg-surface);
  border-right: 1px solid var(--border-soft); overflow: hidden;
  transition: width var(--dur) var(--ease), padding var(--dur) var(--ease);
}
.sidebar.is-closed { width: 0; padding: 0; overflow: hidden; border-right-color: transparent; }
.sidebar-head { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s3); flex: none; }
.sidebar-head .shell__brand { flex: 1; min-width: 0; }
.sidebar-logo { width: 36px; height: 36px; object-fit: contain; flex: none; }
.sidebar-head .shell__brand span { overflow: hidden; text-overflow: ellipsis; }
.side-link {
  display: flex; align-items: center; gap: var(--s2); width: 100%;
  padding: 8px var(--s2); border: none; background: none; font: inherit;
  font-size: var(--fs-sm); color: var(--ink); text-align: left;
  border-radius: var(--r-sm); cursor: pointer; text-decoration: none;
}
.side-link:hover { background: var(--bg-hover); }
.side-link[aria-current="page"] { background: var(--primary-soft); color: var(--primary-hi); font-weight: 600; }
.side-link .ic { width: 18px; text-align: center; flex: none; opacity: .8; }
.side-sep { height: 1px; background: var(--border-soft); margin: var(--s3) 0; }
.side-label { font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-muted); padding: 0 var(--s2) 4px; }
.sidebar-projects { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: var(--s3); }
.sidebar-bottom { flex: none; max-height: 54dvh; overflow-y: auto;
  padding-top: var(--s3); border-top: 1px solid var(--border-soft); }
.side-action { display: flex; justify-content: flex-start; width: 100%; gap: var(--s2); }
.sidebar-projects .side-action { margin-bottom: var(--s3); }
.sidebar-bottom #acctBtn { margin-top: var(--s2); }
.side-project-name { padding: 4px var(--s2) var(--s2); font-size: var(--fs-md);
  font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.side-scene-list { display: grid; gap: 2px; }
.side-scene-entry { min-width: 0; }
.side-scene-row { display: flex; align-items: center; gap: 2px; min-width: 0;
  border-radius: var(--r-sm); }
.side-scene-row[data-current="true"] { background: var(--primary-soft); }
.side-scene-row button { border: 0; background: transparent; color: var(--ink-2);
  cursor: pointer; font: inherit; }
.side-scene-toggle { width: 25px; height: 29px; flex: none; padding: 0; border-radius: var(--r-sm); }
.side-scene-toggle:hover, .side-scene-name:hover { background: var(--bg-hover); }
.side-scene-name { flex: 1; min-width: 0; padding: 5px 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: left; font-size: var(--fs-sm); color: var(--ink-2); text-decoration: none; }
.side-scene-name:hover { background: var(--bg-hover); }
.side-scene-row[data-current="true"] .side-scene-name { color: var(--primary-hi); font-weight: 600; }
.side-reports { margin: 0 0 5px 29px; padding-left: 11px;
  border-left: 1px solid var(--border-soft); }
.side-report { display: block; padding: 4px 2px; color: var(--ink-2);
  font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-reports button.side-report { width: 100%; border: 0; border-radius: var(--r-sm);
  background: transparent; text-align: left; font-family: inherit; cursor: pointer; }
.side-reports button.side-report:hover { background: var(--bg-hover); color: var(--primary-hi); }
.side-reports button.side-report.current { color: var(--primary-hi); font-weight: 600; }
.side-report[href] { border-radius: var(--r-sm); text-decoration: none; cursor: pointer; }
.side-report[href]:hover, .side-report[href]:focus-visible {
  background: var(--bg-hover); color: var(--primary-hi); }
.side-report-empty { color: var(--ink-muted); font-style: italic; }
.side-tree-empty { padding: var(--s2); color: var(--ink-muted); font-size: var(--fs-xs); }

/* « Parcourir » (mu-browse.js) et choix du projet du catalogue : les facettes. */
.facet + .facet { margin-top: var(--s4); }
.facet h3 { font-size: 9px; font-weight: 700; text-transform: uppercase;
            letter-spacing: .06em; color: var(--ink-muted);
            padding: 0 var(--s2) var(--s2); }
.facet-item {
  display: flex; align-items: center; gap: var(--s2); width: 100%;
  padding: 7px var(--s2); border: none; background: none; font: inherit;
  font-size: var(--fs-sm); color: var(--ink); text-align: left;
  border-radius: var(--r-sm); cursor: pointer;
}
.facet-item:hover { background: var(--bg-hover); }
.facet-item[aria-pressed="true"] { background: var(--primary-soft);
                                   color: var(--primary-hi); font-weight: 600; }
.facet-item .n { flex: 1; min-width: 0; overflow: hidden;
                 text-overflow: ellipsis; white-space: nowrap; }
.facet-item .c { font-family: var(--font-mono); font-size: 10px; color: var(--ink-muted); }

.browse { margin-top: var(--s4); }
.browse__title { padding-bottom: var(--s2); }

/* Catalogue et Lecteur : barre du haut menu puis logo, comme YouTube ; ce menu en dessous. */
.bar-brand { color: var(--ink); text-decoration: none; }
.bar-brand:hover { color: var(--primary-hi); }
.bar-brand__logo { width: 28px; height: 28px; object-fit: contain; flex: none; }
.shell__bar .bar-menu-btn { font-size: 18px; }
#sidebar a.side-action { text-decoration: none; }
@media (max-width: 1179px) {
  .shell__body > .sidebar:not(.is-closed) {
    position: absolute; left: 0; top: 0; bottom: 0; z-index: 40;
    width: 236px; box-shadow: var(--shadow-lg);
  }
  .shell__body > .sidebar.is-closed { position: absolute; left: 0; top: 0; bottom: 0; }
}
