/**
 * ============================================================================
 * STYLES POUR LE SYSTÈME DE CORRECTION
 * ============================================================================
 * 
 * CSS complet pour l'affichage des corrections, scores et feedbacks
 * 
 * @author Super-Comptable.fr
 * @version 2.0
 */

/* ========================================================================== */
/* ZONE DE SCORE */
/* ========================================================================== */

.score-zone {
  margin: 2rem 0;
  padding: 0;
}

.score-container {
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #3b82f6;
  transition: all 0.3s ease;
}

.score-container:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Score principal */
.score-principal {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.score-pourcentage {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}

.score-note {
  font-size: 1.5rem;
  font-weight: 600;
  color: #6b7280;
}

/* Score détail */
.score-detail {
  text-align: center;
  margin-bottom: 1rem;
}

.score-fraction {
  font-size: 1.1rem;
  color: #6b7280;
}

/* Badge score */
.score-badge {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  display: inline-block;
  width: 100%;
}

/* Variations selon le score */
.score-excellent {
  border-left-color: #10b981;
}

.score-excellent .score-pourcentage {
  color: #10b981;
}

.score-excellent .score-badge {
  background: #d1fae5;
  color: #065f46;
}

.score-bien {
  border-left-color: #3b82f6;
}

.score-bien .score-pourcentage {
  color: #3b82f6;
}

.score-bien .score-badge {
  background: #dbeafe;
  color: #1e40af;
}

.score-moyen {
  border-left-color: #f59e0b;
}

.score-moyen .score-pourcentage {
  color: #f59e0b;
}

.score-moyen .score-badge {
  background: #fef3c7;
  color: #92400e;
}

.score-faible {
  border-left-color: #ef4444;
}

.score-faible .score-pourcentage {
  color: #ef4444;
}

.score-faible .score-badge {
  background: #fee2e2;
  color: #991b1b;
}

/* ========================================================================== */
/* ZONE DE FEEDBACK */
/* ========================================================================== */

.feedback-zone {
  margin: 1.5rem 0;
}

.feedback {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  border-left: 4px solid;
  font-size: 1rem;
  line-height: 1.5;
}

.feedback-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.feedback-contenu {
  flex: 1;
}

.feedback-message {
  margin: 0;
  font-weight: 500;
}

/* Variations feedback */
.feedback-success {
  background: #d1fae5;
  border-left-color: #10b981;
  color: #065f46;
}

.feedback-warning {
  background: #fef3c7;
  border-left-color: #f59e0b;
  color: #92400e;
}

.feedback-error {
  background: #fee2e2;
  border-left-color: #ef4444;
  color: #991b1b;
}

.feedback-info {
  background: #dbeafe;
  border-left-color: #3b82f6;
  color: #1e40af;
}

/* ========================================================================== */
/* ZONE DE CORRECTION */
/* ========================================================================== */

.correction-zone {
  margin: 2rem 0;
}

.correction-detaillee {
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.correction-header h3 {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.75rem;
}

/* ========================================================================== */
/* DÉTAILS DES RÉPONSES */
/* ========================================================================== */

.details-reponses {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 8px;
}

.details-reponses h4 {
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #374151;
}

.detail-reponse {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  border-radius: 6px;
  font-size: 0.95rem;
}

.detail-correct {
  background: #d1fae5;
  border-left: 3px solid #10b981;
}

.detail-incorrect {
  background: #fee2e2;
  border-left: 3px solid #ef4444;
}

.detail-icone {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.detail-question {
  font-weight: 600;
  color: #374151;
  flex-shrink: 0;
  min-width: 100px;
}

.detail-attendu {
  color: #6b7280;
  font-style: italic;
}

/* ========================================================================== */
/* SOLUTION COMPLÈTE */
/* ========================================================================== */

.solution-complete {
  margin: 2rem 0;
}

.solution-complete h4 {
  margin: 0 0 1.5rem 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: #111827;
}

.solution-partie {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
}

.solution-partie h5 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
}

.solution-analyse {
  margin-top: 1rem;
  padding: 1rem;
  background: #dbeafe;
  border-radius: 6px;
  color: #1e40af;
  white-space: pre-line;
  line-height: 1.6;
}

/* ========================================================================== */
/* ÉCRITURE COMPTABLE */
/* ========================================================================== */

.ecriture-comptable {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.ecriture-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e5e7eb;
}

.ecriture-header strong {
  font-size: 1.05rem;
  color: #111827;
}

.ecriture-date {
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 500;
}

.ecriture-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.ecriture-table thead {
  background: #f3f4f6;
}

.ecriture-table th {
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #d1d5db;
}

.ecriture-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

.compte-num {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: #1f2937;
}

.montant-col {
  text-align: right;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: #1f2937;
  min-width: 120px;
}

.ecriture-note {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #ecfdf5;
  border-left: 3px solid #10b981;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #065f46;
}

/* ========================================================================== */
/* EXPLICATIONS EXPERTES */
/* ========================================================================== */

.explications-expertes {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #fffbeb;
  border-radius: 8px;
  border-left: 4px solid #f59e0b;
}

.explications-expertes h4 {
  margin: 0 0 1rem 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: #92400e;
}

.explications-expertes .intro {
  font-size: 1rem;
  color: #78350f;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.explication-section {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #ffffff;
  border-radius: 6px;
}

.explication-section h5 {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #92400e;
}

.explication-contenu {
  color: #1f2937;
  line-height: 1.7;
  white-space: pre-line;
}

/* ========================================================================== */
/* RAPPEL DE COURS */
/* ========================================================================== */

.rappel-cours {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f0fdf4;
  border-radius: 8px;
  border-left: 4px solid #10b981;
}

.rappel-cours h4 {
  margin: 0 0 1rem 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: #065f46;
}

.rappel-cours .intro {
  font-size: 1rem;
  color: #047857;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.cours-section {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #ffffff;
  border-radius: 6px;
}

.cours-section h5 {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #065f46;
}

.cours-contenu {
  color: #1f2937;
  line-height: 1.7;
  white-space: pre-line;
}

/* ========================================================================== */
/* PIÈGES À ÉVITER */
/* ========================================================================== */

.pieges-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #fef2f2;
  border-radius: 8px;
  border-left: 4px solid #ef4444;
}

.pieges-section h4 {
  margin: 0 0 1rem 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: #991b1b;
}

.piege-item {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #fecaca;
}

.piege-item h5 {
  margin: 0 0 0.75rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #991b1b;
}

.piege-description {
  color: #1f2937;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.piege-consequence {
  padding: 0.75rem;
  background: #fee2e2;
  border-radius: 4px;
  color: #7f1d1d;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.piege-solution {
  padding: 0.75rem;
  background: #d1fae5;
  border-radius: 4px;
  color: #065f46;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

/* ========================================================================== */
/* BOUTONS */
/* ========================================================================== */

.btn-valider,
.btn-suivant,
.btn-effacer {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-valider {
  background: #10b981;
  color: #ffffff;
}

.btn-valider:hover:not(:disabled) {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.btn-suivant {
  background: #3b82f6;
  color: #ffffff;
}

.btn-suivant:hover:not(:disabled) {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.btn-suivant.actif {
  animation: pulse 2s infinite;
}

.btn-effacer {
  background: #6b7280;
  color: #ffffff;
}

.btn-effacer:hover:not(:disabled) {
  background: #4b5563;
}

.btn-valider:disabled,
.btn-suivant:disabled,
.btn-effacer:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ========================================================================== */
/* ANIMATIONS */
/* ========================================================================== */

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.score-container,
.feedback,
.correction-detaillee {
  animation: slideIn 0.3s ease-out;
}

/* ========================================================================== */
/* RESPONSIVE */
/* ========================================================================== */

@media (max-width: 768px) {
  .score-principal {
    flex-direction: column;
    gap: 1rem;
  }
  
  .score-pourcentage {
    font-size: 2.5rem;
  }
  
  .score-note {
    font-size: 1.2rem;
  }
  
  .ecriture-table {
    font-size: 0.85rem;
  }
  
  .ecriture-table th,
  .ecriture-table td {
    padding: 0.5rem;
  }
  
  .montant-col {
    min-width: 90px;
  }
  
  .correction-detaillee {
    padding: 1rem;
  }
}

/* ========================================================================== */
/* UTILITAIRES */
/* ========================================================================== */

.text-center {
  text-align: center;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

/* ========================================================================== */
/* PRINT STYLES */
/* ========================================================================== */

@media print {
  .btn-valider,
  .btn-suivant,
  .btn-effacer {
    display: none;
  }
  
  .score-container,
  .correction-detaillee {
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }
  
  .ecriture-table {
    page-break-inside: avoid;
  }
}