/* sidebar-navigation.css
 * Styles pour la navigation améliorée dans la sidebar
 */

/* Bouton de retour */
.sidebar-back-button {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background-color: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.7);
  font-weight: 500;
  margin: 10px;
  transition: all 0.2s ease;
}

.sidebar-back-button:hover {
  background-color: rgba(0, 0, 0, 0.1);
  transform: translateX(-3px);
}

.sidebar-back-button i {
  margin-right: 8px;
}

/* En-tête de section */
.sidebar-section-header {
  padding: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
}

.sidebar-section-header h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: rgba(0, 0, 0, 0.8);
}

/* Barre de recherche */
.search-container {
  display: flex;
  margin-top: 10px;
}

.search-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px 0 0 6px;
  font-size: 0.9rem;
  background-color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.filter-button {
  padding: 8px 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.filter-button:hover {
  background-color: var(--primary-dark);
}

/* Conteneur de filtres */
.filter-container {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 15px;
  margin: 0 15px 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-group {
  margin-bottom: 12px;
}

.filter-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 5px;
  color: rgba(0, 0, 0, 0.7);
  font-weight: 500;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  font-size: 0.9rem;
  background-color: white;
}

.apply-filters-button {
  width: 100%;
  padding: 8px 0;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  margin-top: 10px;
  transition: background-color 0.2s ease;
}

.apply-filters-button:hover {
  background-color: var(--primary-dark);
}

/* Liste des collections */
.collections-list {
  padding: 10px 15px;
}

.collection-item {
  display: flex;
  align-items: center;
  padding: 15px;
  margin-bottom: 10px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.collection-item:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.collection-item i {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-right: 15px;
  width: 20px;
  text-align: center;
}

.collection-item span {
  font-weight: 500;
  color: rgba(0, 0, 0, 0.8);
}

/* Détails du document */
.document-details {
  padding: 15px;
}

.document-details-header {
  margin-bottom: 15px;
}

.document-details-header h3 {
  font-size: 1.3rem;
  color: rgba(0, 0, 0, 0.8);
  margin-bottom: 10px;
}

.document-details-header h2 {
  font-size: 1.2rem;
  color: rgba(68, 65, 201, 0.8);
  margin-bottom: 10px;
}

.document-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 15px;
}

.document-points-info {
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  color: rgba(0, 0, 0, 0.6);
  font-weight: 500;
}

.info-value {
  font-weight: 600;
  color: rgba(0, 0, 0, 0.8);
}

/* Sections de contenu du document */
.document-content-section {
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  max-height: 100vh;
  overflow-y: auto;
}

.document-content-section h1 {
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: rgba(10, 90, 182, 0.8);
}

.document-content-section h2 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: rgba(10, 90, 182, 0.8);
}

.code {
  background-color: rgb(18, 18, 18);
  padding: 10px;
  border-radius: 6px;
  font-family: monospace;
  margin: 20px;
  color:white;
  
}

.document-content-section h4 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: rgba(0, 0, 0, 0.7);
}

.prompt-content {
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.8);
}

.document-expected-output pre {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 10px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.9rem;
  overflow-x: auto;
}

.document-course-content,
.document-dojo-content,
.document-project-content {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.8);
}

/* Actions pour le document */
.document-actions {
  display: flex;
  justify-content: center;
}

.open-document-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
}

/* Animation de transition entre les niveaux */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.collections-list,
.content-list,
.document-details {
  animation: fadeIn 0.3s ease-out forwards;
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
}