/* === Layout général du viewer Cyberflemme === */

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  display: flex;
  /* la couleur de texte vient du thème (onelight-dark.css) */
}

/* Conteneur principal */
.layout {
  display: flex;
  width: 100%;
  position: relative;
  z-index: 1; /* contenu au-dessus du fond/GIF */
}

/* Sidebar de navigation */
.sidebar {
  width: 250px;
  padding: 15px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.6);
  color: var(--text-color);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);

  position: sticky;
  top: 0;          /* collée en haut de la fenêtre */
  height: 100vh;   /* hauteur = hauteur de la fenêtre */
  overflow-y: auto;
}

.sidebar h1 {
  font-size: 0.9rem;
  margin: 0 0 8px;
  color: #166ff3;
  white-space: nowrap;

  opacity: 0.8;
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar li {
  margin-bottom: 0.4rem;
}

.sidebar button {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 4px 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.sidebar button.active {
  font-weight: 600;
  text-decoration: underline;
}

/* Zone de texte markdown (#write) */
#write {
  flex: 1;
  max-width: 1100px;
  margin: 40px auto;
  padding: 24px;
  box-sizing: border-box;

  background: rgba(0, 0, 0, 0.75); /* fond sombre type “carte” */
  color: var(--text-color);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

/* === Couche GIF fixe en bas de la fenêtre === */

#mutou2-layer {
  position: fixed;              /* accroché au viewport */
  right: 0;
  bottom: 0;                    /* coin bas droit de la fenêtre */
  width: 150px;
  height: 150px;
  pointer-events: none;
  background-image: url('./op3.gif'); /* même dossier que onelight-dark.css */
  background-repeat: no-repeat;
  background-size: contain;
  z-index: 0;                   /* sous .layout (z=1), au-dessus du fond GPU */
}


/* Séparateur et sous-titre pour la zone TOC */
.sidebar-separator {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 16px 0 10px;
}

.sidebar-subtitle {
  font-size: 0.9rem;
  margin: 0 0 8px;
  opacity: 0.8;
}

/* Liste de navigation dans les titres */
/* Liste de navigation dans les titres */
#toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  font-weight: 400 !important;  /* texte “normal”, pas gras */
}

/* Forcer un texte “léger” dans le sommaire, même si la sidebar est plus grasse */
#toc-list,
#toc-list li,
#toc-list a {
}

#toc-list li {
  margin-bottom: 4px;
}

#toc-list a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

#toc-list a:hover {
  text-decoration: underline;
}

#toc-list li {
  margin-bottom: 13px;
}

#toc-list li.toc-level-1 {
  margin-top: 32px;
}

/* Indentation par niveau de titre */
.toc-level-1 { padding-left: 0; }
.toc-level-2 { padding-left: 15px; }
.toc-level-3 { padding-left: 30px; }
.toc-level-4 { padding-left: 45px; }
.toc-level-5 { padding-left: 60px; }
.toc-level-6 { padding-left: 75px; }
