/* Styles généraux */
.classroom-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: "Roboto", sans-serif;
}

/* Styles pour l'écran d'authentification */
.classroom-auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  background-color: #f5f5f5;
}

.auth-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.classroom-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
}

.google-logo {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.google-auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #4285f4;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 12px 24px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 20px;
  width: 100%;
  transition: background-color 0.3s;
}

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

.google-auth-button:disabled {
  background-color: #a0c3ff;
  cursor: not-allowed;
}

.button-spinner {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 2px solid white;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

/* Styles pour l'affichage des cours */
.classroom-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.header-buttons {
  display: flex;
  gap: 10px;
}

.logout-button {
  background-color: #e53935;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.logout-button:hover {
  background-color: #c62828;
}

.refresh-button {
  background-color: #f1f1f1;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.refresh-button:hover {
  background-color: #e0e0e0;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.course-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  color: white;
  position: relative;
  height: 180px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.course-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
}

.course-title {
  font-size: 20px;
  font-weight: 500;
  margin: 0;
  line-height: 1.3;
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-menu-button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 18px;
  opacity: 0.8;
}

.course-menu-button:hover {
  opacity: 1;
}

.course-section {
  padding: 0 16px;
  font-size: 14px;
  opacity: 0.9;
}

.course-teacher {
  padding: 0 16px;
  font-size: 14px;
  margin-top: 4px;
  opacity: 0.9;
}

.course-avatar {
  position: absolute;
  bottom: 16px;
  left: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.teacher-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teacher-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.2);
  font-size: 18px;
  font-weight: bold;
}

.course-actions {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 10px;
}

.action-button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.8;
  padding: 5px;
}

.action-button:hover {
  opacity: 1;
}

/* Styles pour les états de chargement et d'erreur */
.classroom-loading,
.classroom-error,
.no-courses {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  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;
}

.no-courses {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 40px;
  margin: 20px 0;
}
