.content-with-sidebar {
  display: flex;
  gap: 40px;
  margin-top: 30px;
}

.content-with-sidebar a {
  text-decoration: underline;
  color: var(--text);
}

.main-content {
  flex: 1;
}

.sidebar {
  min-width: 200px;
  max-width: 250px;
  background: var(--background);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 8px var(--shadow);
  height: fit-content;
}

.sidebar h2 {
  font-size: 1.2em;
  margin-bottom: 15px;
}

.sidebar ul {
  list-style: disc inside;
  padding-left: 10px;
}

.sidebar li {
  margin-bottom: 10px;
  font-size: 0.95em;
  color: #333;
}

html.mode-dark .sidebar li {
  color: #eee;
}

@media (max-width: 900px) {
  .content-with-sidebar {
    flex-direction: column;
  }

  .sidebar {
    display: none;
  }
}

.chapter-card {
  background: var(--background);
  border-radius: 12px;
  padding: 15px 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 8px var(--shadow);
  cursor: pointer;
  transition: background 0.3s ease;
}

.chapter-card.open .courses-list {
  max-height: none;
  opacity: 1;
  margin-top: 15px;
}

.courses-list .description {
  font-style: italic;
  color: #666;
  margin: 5px 0;
}

.chapter-card.open .courses-list a {
  text-decoration: none;
}

.chapter-card .courses-list {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.chapter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chapter-card h3 {
  margin: 0;
  font-size: 1.1em;
}


.chapter-card h4 {
  color : var(--accent);
  text-decoration: underline;
}

html.mode-dark .chapter-card h4{
  color: #ff6f37;
}

.chapter-card .arrow {
  font-size: 1.2em;
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

.chapter-card.open .arrow {
  transform: rotate(180deg);
}

.course-item {
  background-color: var(--background);
  border-left: 4px solid var(--primary);
  padding: 12px 16px;
  margin-top: 10px;
  border-radius: 8px;
  box-shadow: 0 1px 4px var(--shadow);
}

.course-item:hover {
  background-color: #6cd3ff;
  cursor: pointer;
  border-color: #6cd3ff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

html.mode-dark .course-item:hover {
  background-color: #1d2c4e;
  color: var(--white);
}

.course-item a {
  font-size: 1.05em;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.course-item a:hover {
  text-decoration: underline;
}

.course-item .description {
  color: #7c7c7c;
  font-size: 0.9em;
  margin-top: 5px;
}
.course-item .description:hover{
  color: #eee;
}

.course-item .teacher {
  font-size: 0.85em;
  margin-top: 4px;
  color: #666;
}

html.mode-dark .course-item .teacher {
  color: #ccc;
}



.exercise-complete-button-container,
.course-complete-button-container {
  text-align: center;
  margin: 20px 0;
}

.exercise-complete-button,
.course-complete-button {
  background-color: var(--primary);
  color: var(--white);
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.exercise-complete-button:hover,
.course-complete-button:hover {
  background-color: var(--primary-hover);
}

.course-complete-button.cancel {
    background-color: #f44336;
    color: white;
}



.chapter-read {
    color: rgb(11, 87, 11); /* Couleur verte */
    background-color: rgba(144, 238, 144, 0.5); /* Fond vert clair avec transparence */
    margin-left: 10px;
    padding: 1px 5px; /* Ajoute un peu d'espace autour du texte */
    font-size: 1em; /* Légèrement plus grand */
    font-weight: bold; /* Texte en gras */
    display: inline-block;
    vertical-align: middle;

    border-radius: 3px; /* Coins légèrement arrondis */
}


html.mode-dark .chapter-read {
  color: white;
}


