/**
 * SQL Learning - Styles pour les pages d'apprentissage SQL
 */

/* Messages SQL */
.sql-message {
  padding: 12px 16px;
  margin-top: 12px;
  border-radius: 6px;
  font-size: 14px;
  transition: opacity 0.3s ease;
}

.sql-message-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.sql-message-error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.sql-message-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
}

.sql-message-info {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

/* Exercices complétés */
.exercise-card.completed {
  border-left: 4px solid #28a745;
  position: relative;
}

.exercise-card.completed::after {
  content: "✓";
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 32px;
  color: #28a745;
  font-weight: bold;
}

/* Styles pour les blocs SQL */
.sql-block {
  margin: 20px 0;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.sql-header {
  background-color: #f8f9fa;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sql-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sql-header-title {
  font-weight: 600;
  font-size: 14px;
  color: #495057;
}

.sql-editor {
  background-color: #fff;
}

.code-area {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  border: none;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  background-color: #f8f9fa;
}

.code-area:focus {
  outline: none;
  background-color: #fff;
}

.code-display {
  padding: 16px;
  background-color: #f8f9fa;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  color: #212529;
}

.sql-comment {
  color: #6c757d;
  font-style: italic;
}

.sql-buttons {
  padding: 12px 16px;
  background-color: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sql-buttons button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-execute {
  background-color: #007bff;
  color: white;
}

.btn-execute:hover {
  background-color: #0056b3;
}

.btn-validate {
  background-color: #28a745;
  color: white;
}

.btn-validate:hover {
  background-color: #1e7e34;
}

.btn-reset {
  background-color: #6c757d;
  color: white;
}

.btn-reset:hover {
  background-color: #545b62;
}

.btn-solution {
  background-color: #ffc107;
  color: #212529;
}

.btn-solution:hover {
  background-color: #e0a800;
}

/* Exercices */
.exercise-card {
  margin: 30px 0;
  padding: 24px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background-color: #fff;
  transition: border-color 0.3s ease;
}

.exercise-card:hover {
  border-color: #007bff;
}

.exercise-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.exercise-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.exercise-number {
  width: 36px;
  height: 36px;
  background-color: #007bff;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
}

.exercise-difficulty {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.difficulty-easy {
  background-color: #d4edda;
  color: #155724;
}

.difficulty-medium {
  background-color: #fff3cd;
  color: #856404;
}

.difficulty-hard {
  background-color: #f8d7da;
  color: #721c24;
}

.exercise-description {
  margin-bottom: 16px;
  color: #495057;
}

.exercise-instructions {
  background-color: #f8f9fa;
  padding: 16px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.exercise-instructions h4 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 16px;
  color: #212529;
}

.exercise-instructions ul {
  margin: 0;
  padding-left: 20px;
  color: #495057;
}

.exercise-instructions ul li {
  margin-bottom: 6px;
}

/* Info blocks */
.info-block {
  padding: 16px;
  margin: 20px 0;
  border-radius: 6px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.info-block i {
  font-size: 20px;
  margin-top: 2px;
}

.info-block.info {
  background-color: #d1ecf1;
  border-left: 4px solid #0c5460;
  color: #0c5460;
}

.info-block.success {
  background-color: #d4edda;
  border-left: 4px solid #155724;
  color: #155724;
}

.info-block.warning {
  background-color: #fff3cd;
  border-left: 4px solid #856404;
  color: #856404;
}

/* Navigation des chapitres */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  gap: 16px;
}

.nav-button {
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-button.disabled {
  background-color: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
}

.nav-button.next {
  background-color: #007bff;
  color: white;
  margin-left: auto;
}

.nav-button.next:hover {
  background-color: #0056b3;
}

/* Breadcrumb et progression */
.course-navigation {
  margin-bottom: 24px;
}

.breadcrumb-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.breadcrumb-separator {
  color: #6c757d;
}

.progress-bar-custom {
  background-color: #e9ecef;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  background-color: #007bff;
  height: 100%;
  transition: width 0.3s ease;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
  color: #495057;
}

/* Lesson card */
.lesson-card {
  background-color: #fff;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lesson-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid #e0e0e0;
}

.lesson-icon {
  font-size: 48px;
  color: #007bff;
}

.lesson-title h2 {
  margin: 0 0 8px 0;
  color: #212529;
}

.lesson-title .subtitle {
  margin: 0;
  color: #6c757d;
  font-size: 16px;
}

.lesson-meta {
  display: flex;
  gap: 16px;
  margin-left: auto;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #6c757d;
}

.lesson-content h3 {
  margin-top: 32px;
  margin-bottom: 16px;
  color: #212529;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
