/* Mon Multivers — état d'accès public / prévisualisation. */
.mm-ops-banner,
.mm-preview-banner {
  position: relative;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  text-align: center;
  font: 700 14px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  border-bottom: 1px solid rgba(15, 23, 42, .09);
}

.mm-ops-banner {
  background: linear-gradient(90deg, #dff9fb, #eef8ff);
  color: #17475a;
}

.mm-preview-banner {
  background: #102630;
  color: #eafcff;
  border-color: rgba(255, 255, 255, .12);
}

.mm-preview-banner strong { color: #7ee9f1; }
.mm-preview-banner a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Vue visiteur / normale : les sections réellement fermées disparaissent. */
.mm-section-disabled { display: none; }

/* Une section protégée reste visible, mais légèrement atténuée tant qu'elle est verrouillée. */
.mm-section-locked { opacity: .72; }

/*
 * Hamburger — DESKTOP uniquement.
 * Le mobile possède ses propres règles dans css/mobile.css.
 */
@media (min-width: 769px) {
  #site-drawer .tree-toggle,
  #site-drawer .tree-link {
    position: relative;
  }

  #site-drawer .tree-title {
    display: block;
    min-width: 0;
    padding-right: 32px;
  }

  #site-drawer .mm-section-title-label {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #site-drawer .tree-toggle > .mm-section-access-badge,
  #site-drawer .tree-link > .mm-section-access-badge {
    position: absolute;
    top: 50%;
    right: 47px;
    width: 24px;
    height: 24px;
    margin: 0;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    font-size: 20px;
    line-height: 1;
    opacity: .9;
    filter: saturate(.86);
    pointer-events: none;
  }
}

/* En aperçu admin, la rubrique reste totalement utilisable. */
.mm-section-admin-preview { opacity: 1; }

html[data-site-theme="dark"] .mm-ops-banner {
  background: linear-gradient(90deg, #1b4555, #253c58);
  color: #eefbff;
  border-color: rgba(255, 255, 255, .08);
}


/* =========================================================
   Accès fins — textes et albums Photos
   ========================================================= */
.mm-item-disabled { display: none; }
.mm-item-locked { opacity: .78; }
.mm-item-admin-preview { opacity: 1; }

/* Textes publics et protégés : même grille compacte « puce · 📄 · 🔒 · titre ».
   Réserve un emplacement de largeur fixe à droite de l'icône du document,
   y compris lorsque le document est public. Aucun décalage du titre. */
#textes-area .file-link::before {
  content: none;
  display: none;
}
#textes-area .file-link .file-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 2.45em;
  width: 2.45em;
  line-height: 1.42;
  white-space: nowrap;
}
#textes-area .file-link .file-icon::after {
  content: "";
  position: absolute;
  left: 1.12em;
  top: 0;
  width: 1.15em;
  line-height: 1.42;
  text-align: center;
  pointer-events: none;
}
#textes-area .file-link.mm-item-password-configured .file-icon::after {
  content: "🔒";
  opacity: .9;
}
/* Aucun ancien cadenas après le titre. */
#textes-area .file-link.mm-item-password-configured::after { content: none; }

/* Album Photos protégé — positionnement desktop. */
@media (min-width: 769px) {
  #photos-folders .folder.mm-item-password-configured {
    position: relative;
    padding-right: 42px;
  }

  #photos-folders .folder.mm-item-password-configured::after {
    content: "🔒";
    position: absolute;
    top: 50%;
    right: 12px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    font-size: 18px;
    line-height: 1;
    opacity: .9;
    filter: saturate(.86);
    pointer-events: none;
  }
}

/* Priorité intentionnelle : les ressources interdites ne doivent jamais réapparaître par la cascade. */
.mm-section-disabled,
.mm-item-disabled { display: none !important; }
