/* Styles pour la version finale - Focus sur les compétences */

/* Blocs de compétences COMPACTS */
.blocks-list-compact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.block-item-compact {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.block-item-compact:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(43, 174, 148, 0.1);
}

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

.block-title-compact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.block-title-compact strong {
  color: var(--primary);
  font-size: 0.95em;
}

.block-code-small {
  font-size: 0.75em;
  color: var(--text-secondary);
  font-family: 'Courier New', monospace;
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
}

.block-toggle-small {
  color: var(--primary);
  font-size: 1.2em;
  transition: transform 0.2s ease;
}

.block-competences-compact {
  margin-top: 12px;
  animation: slideDown 0.3s ease;
}

.competences-numbered {
  background: var(--bg-secondary);
  padding: 12px;
  border-radius: 6px;
  border-left: 3px solid var(--primary);
}

.competences-list-numbered {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  counter-reset: competence-counter;
}

.competence-item-numbered {
  display: flex;
  align-items: flex-start;
  padding: 8px 12px;
  margin-bottom: 6px;
  background: white;
  border-radius: 4px;
  transition: all 0.2s ease;
  counter-increment: competence-counter;
}

.competence-item-numbered:hover {
  background: #f8f9fa;
  transform: translateX(2px);
}

.competence-item-numbered:last-child {
  margin-bottom: 0;
}

.competence-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 0.8em;
  font-weight: 700;
  margin-right: 12px;
  flex-shrink: 0;
}

.competence-number::before {
  content: counter(competence-counter);
}

.competence-text {
  flex: 1;
  font-size: 0.9em;
  line-height: 1.5;
  color: var(--text-primary);
}

/* Catégories de correspondance */
.category-section {
  margin-bottom: 40px;
}

.category-title {
  font-size: 1.4em;
  margin-bottom: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  display: inline-block;
}

.category-title.high {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
}

.category-title.medium {
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
  color: white;
}

.category-title.low {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  color: white;
}

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

/* Cartes de certification améliorées */
.match-card-enhanced {
  background: white;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.match-card-enhanced.high {
  border-color: #059669;
}

.match-card-enhanced.medium {
  border-color: #D97706;
}

.match-card-enhanced.low {
  border-color: #94a3b8;
}

.match-card-enhanced:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.match-card-enhanced.high:hover {
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.3);
}

.match-card-enhanced.medium:hover {
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.3);
}

.match-card-enhanced.low:hover {
  box-shadow: 0 8px 24px rgba(148, 163, 184, 0.3);
}

.match-score-enhanced {
  margin: 16px 0;
}

.score-bar-enhanced {
  height: 12px;
  background: #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.score-fill-high {
  height: 100%;
  background: linear-gradient(90deg, #059669 0%, #047857 100%);
  transition: width 0.5s ease;
}

.score-fill-medium {
  height: 100%;
  background: linear-gradient(90deg, #D97706 0%, #B45309 100%);
  transition: width 0.5s ease;
}

.score-fill-low {
  height: 100%;
  background: linear-gradient(90deg, #94a3b8 0%, #64748b 100%);
  transition: width 0.5s ease;
}

.score-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.score-percentage {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--primary);
}

.score-blocks {
  font-size: 0.9em;
  color: var(--text-secondary);
}

/* Statistiques par catégorie */
.stat-card.stat-high {
  border-left: 4px solid #059669;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.stat-card.stat-medium {
  border-left: 4px solid #D97706;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.stat-card.stat-low {
  border-left: 4px solid #94a3b8;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

/* Analyse complète */
.analysis-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  margin-top: 40px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 2px solid var(--primary);
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.analysis-item {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}

.analysis-item h4 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 1.1em;
}

.analysis-item p {
  margin: 8px 0;
  line-height: 1.6;
}

.analysis-recommendation {
  margin-top: 12px;
  padding: 12px;
  background: white;
  border-radius: 6px;
  font-style: italic;
  color: var(--text-secondary);
}

.analysis-conclusion {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  color: white;
  padding: 24px;
  border-radius: 12px;
  margin-top: 24px;
}

.analysis-conclusion h4 {
  color: white;
  margin-bottom: 16px;
  font-size: 1.2em;
}

.analysis-conclusion p {
  margin: 12px 0;
  line-height: 1.8;
}

/* Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
  
  .analysis-grid {
    grid-template-columns: 1fr;
  }
  
  .competences-container {
    padding: 16px;
  }
  
  .competence-item {
    padding: 10px 12px;
    font-size: 0.9em;
  }
}
