.course-details-container {
  max-width: 1200px;
  margin: 0 auto;
  font-family: "Roboto", sans-serif;
  background-color: #f5f5f5;
  min-height: 100vh;
}

/* En-tête du cours */
.course-details-header {
  padding: 20px;
  color: white;
  position: relative;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
}

.back-button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.course-details-title h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
}

.course-section {
  margin: 5px 0 0;
  font-size: 16px;
  opacity: 0.9;
}

/* Navigation par onglets */
.course-tabs {
  display: flex;
  background-color: white;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 20px;
}

.tab-button {
  padding: 15px 20px;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  position: relative;
  color: #666;
  font-weight: 500;
}

.tab-button:hover {
  background-color: #f5f5f5;
}

.tab-button.active {
  color: #1a73e8;
}

.tab-button.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #1a73e8;
}

/* Contenu des onglets */
.tab-content {
  padding: 0;
  min-height: 400px;
}

.tab-content h2 {
  margin-top: 0;
  color: #333;
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 20px;
  padding: 0 20px;
}

.no-content {
  text-align: center;
  color: #666;
  padding: 40px 0;
  background-color: #f9f9f9;
  border-radius: 8px;
}

/* Message "Génial, aucun devoir à remettre..." */
.no-assignments-message {
  background-color: white;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 0 20px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3);
}

.no-assignments-message p {
  margin: 0;
  color: #3c4043;
}

.show-all-button {
  background: none;
  border: none;
  color: #1a73e8;
  font-weight: 500;
  cursor: pointer;
  padding: 8px;
}

.show-all-button:hover {
  background-color: #f1f3f4;
  border-radius: 4px;
}

/* Zone d'annonce pour les enseignants */
.announcement-input {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: 8px;
  padding: 15px;
  margin: 0 20px 20px;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3);
}

.announcement-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #1a73e8;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 15px;
}

.announcement-field {
  flex: 1;
  color: #5f6368;
  cursor: pointer;
}

.announcement-field p {
  margin: 0;
}

/* Styles pour l'onglet Flux */
.stream-tab {
  display: flex;
  flex-direction: column;
}

.stream-content {
  padding: 0 20px 20px;
}

.empty-stream,
.empty-travaux {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  background-color: white;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3);
}

.stream-icon,
.travaux-icon {
  font-size: 48px;
  color: #9e9e9e;
  margin-bottom: 20px;
}

.empty-stream h3,
.empty-travaux h3 {
  font-size: 20px;
  color: #5f6368;
  margin: 0 0 10px;
}

.empty-stream p,
.empty-travaux p {
  color: #80868b;
  text-align: center;
  max-width: 400px;
}

.stream-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chapter-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.stream-item {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3);
  padding: 20px;
  display: flex;
}

.stream-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #e8f0fe;
  color: #1a73e8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  flex-shrink: 0;
}

.document-icon {
  background-color: #ea4335;
  color: white;
}

.stream-item-icon i {
  font-size: 20px;
}

.stream-item-content {
  flex: 1;
}

.stream-item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.stream-item-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #202124;
}

.stream-date {
  margin: 4px 0 0;
  font-size: 14px;
  color: #5f6368;
}

.stream-item-actions .action-button {
  background: none;
  border: none;
  color: #5f6368;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
}

.stream-item-actions .action-button:hover {
  background-color: #f1f3f4;
  border-radius: 4px;
}

.stream-item-text {
  margin-bottom: 15px;
  white-space: pre-wrap;
  color: #3c4043;
}

.stream-item-attachments {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attachment-item {
  margin-bottom: 10px;
}

.attachment-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 10px;
  border-radius: 4px;
  background-color: #f1f3f4;
  transition: background-color 0.2s;
}

.attachment-link:hover {
  background-color: #e8f0fe;
}

.attachment-icon {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background-color: #4285f4;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.attachment-icon.youtube {
  background-color: #ff0000;
}

.attachment-icon i {
  font-size: 18px;
}

.attachment-details {
  display: flex;
  flex-direction: column;
}

.attachment-name {
  color: #202124;
  font-weight: 500;
  font-size: 14px;
}

.attachment-type {
  color: #5f6368;
  font-size: 12px;
  margin-top: 2px;
}

/* Styles pour l'onglet Travaux */
.travaux-tab {
  padding: 20px;
}

.travaux-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.travaux-item {
  display: flex;
  padding: 20px;
  border-radius: 8px;
  background-color: white;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3);
}

.travaux-icon {
  font-size: 24px;
  color: #1a73e8;
  margin-right: 20px;
  display: flex;
  align-items: flex-start;
}

.travaux-content {
  flex: 1;
}

.travaux-content h3 {
  margin: 0;
  font-size: 18px;
  color: #202124;
}

.travaux-description {
  margin: 10px 0;
  color: #5f6368;
  white-space: pre-wrap;
}

.travaux-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: #5f6368;
  margin-bottom: 15px;
}

.due-date,
.max-points {
  display: flex;
  align-items: center;
  gap: 5px;
}

.travaux-materials {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid #e0e0e0;
  padding-top: 15px;
}

/* Styles pour l'onglet Personnes */
.personnes-tab {
  padding: 20px;
}

.personnes-section {
  margin-bottom: 30px;
}

.personnes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.personne-item {
  display: flex;
  align-items: center;
  padding: 15px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3);
}

.personne-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 15px;
}

.personne-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.personne-avatar .initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1a73e8;
  color: white;
  font-weight: bold;
}

.personne-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.personne-info p {
  margin: 4px 0 0;
  font-size: 14px;
  color: #5f6368;
}

/* Styles pour les états de chargement et d'erreur */
.course-details-loading,
.course-details-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  text-align: center;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 4px solid #4285f4;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.retry-button {
  background-color: #4285f4;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  margin-top: 20px;
  cursor: pointer;
}

.retry-button:hover {
  background-color: #3367d6;
}

/* Responsive design */
@media (max-width: 768px) {
  .course-tabs {
    overflow-x: auto;
  }

  .tab-button {
    padding: 15px 10px;
    font-size: 14px;
  }

  .stream-item {
    flex-direction: column;
  }

  .stream-item-icon {
    margin-bottom: 10px;
  }

  .travaux-meta {
    flex-direction: column;
    gap: 5px;
  }
}
