/* static/css/floating-toc.css - Barre de progression verticale */

.floating-toc {
  position: fixed;
  left: 1.5rem;
  top: 25%;
  height: 50vh;
  z-index: 1000;
  width: 300px;
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

/* Hauteur étendue si beaucoup de chapitres */
.floating-toc.extended-height {
  top: 5%;
  height: 90vh;
}

.floating-toc.visible {
  opacity: 1;
  pointer-events: all;
}

/* Barre principale */
.toc-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: rgba(166, 97, 7, 0.2);
  border-radius: 3px;
}

/* Fill de progression */
.toc-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  background: #a66107;
  border-radius: 3px;
  transition: height 0.1s ease;
  height: 0%;
}

/* Points de sections */
.toc-section-point {
  position: absolute;
  left: -3px;
  width: 12px;
  height: 12px;
  background: rgba(166, 97, 7, 0.3);
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.toc-section-point:hover {
  transform: scale(1.2);
  background: #a66107;
}

.toc-section-point.active {
  background: #a66107;
  box-shadow: 0 0 0 3px rgba(166, 97, 7, 0.3);
}

.toc-section-point.completed {
  background: #a66107;
}

/* Titres des sections */
.toc-section-title {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary, #555);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 3;
  max-width: 400px;
  min-width: 200px;
  line-height: 1.3;
  text-transform: uppercase;
  opacity: 1;
  pointer-events: all;
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  
  /* Style normal avec retour à la ligne naturel */
  word-wrap: break-word;
  white-space: normal;
}


.toc-section-title:hover {
  color: #a66107;
  font-weight: 600;
}

.toc-section-point.active .toc-section-title {
  color: #a66107;
  font-weight: 600;
}

/* Mode sombre */
:root.theme-dark .toc-progress-bar {
  background: rgba(166, 97, 7, 0.3);
}

:root.theme-dark .toc-section-point {
  border-color: var(--bg-main, #1a1a1a);
  background: rgba(166, 97, 7, 0.4);
}

:root.theme-dark .toc-section-title {
  background: rgba(30, 30, 30, 0.95);
  color: var(--text-alt-muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 1200px) {
  .floating-toc {
    left: 1rem;
  }
  
  .toc-section-title {
    max-width: 200px;
    font-size: 0.75rem;
  }
}

@media (max-width: 900px) {
  .floating-toc {
    left: 0.5rem;
  }
  
  .toc-section-title {
    max-width: 150px;
    font-size: 0.7rem;
  }
}

@media (max-width: 1024px) {
  .floating-toc {
    display: none;
  }
}