/* Styles pour le contenu des articles - Auto-styling HTML */

/* === ARTICLE CONTENT STYLING === */

/* Conteneur principal de l'article */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
  color: #374151;
  font-size: 1.1rem;
}

/* === SECTIONS === */
.article-content section {
  margin-bottom: 2.5rem;
  padding: 0;
}

.article-content section:last-child {
  margin-bottom: 0;
}

/* === TITRES === */
.article-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  border-bottom: 3px solid #3b82f6;
  padding-bottom: 0.5rem;
}

.article-content h2 {
  font-size: 1.875rem;
  font-weight: 600;
  color: #1f2937;
  margin: 2rem 0 1rem 0;
  line-height: 1.3;
  position: relative;
  padding-left: 1rem;
}

.article-content h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 4px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
}

.article-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #374151;
  margin: 1.5rem 0 1rem 0;
  line-height: 1.4;
}

.article-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #4b5563;
  margin: 1.25rem 0 0.75rem 0;
}

/* === PARAGRAPHES === */
.article-content p {
  margin-bottom: 1.25rem;
  text-align: justify;
  hyphens: auto;
}

.article-content p:last-child {
  margin-bottom: 0;
}

/* === LISTES === */
.article-content ul,
.article-content ol {
  margin: 1.25rem 0;
  padding-left: 2rem;
}

.article-content li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.article-content ul li {
  position: relative;
}

.article-content ul li::before {
  content: '•';
  color: #3b82f6;
  font-weight: bold;
  position: absolute;
  left: -1.5rem;
}

.article-content ol li {
  counter-increment: list-counter;
}

.article-content ol li::before {
  content: counter(list-counter) '.';
  color: #3b82f6;
  font-weight: 600;
  position: absolute;
  left: -2rem;
}

/* === LIENS === */
.article-content a {
  color: #3b82f6;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.article-content a:hover {
  color: #1d4ed8;
  border-bottom-color: #1d4ed8;
}

.article-content a:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* === TEXTE EN FORMATAGE === */
.article-content strong {
  font-weight: 700;
  color: #1f2937;
  background: linear-gradient(120deg, #dbeafe 0%, #dbeafe 100%);
  background-repeat: no-repeat;
  background-size: 100% 0.2em;
  background-position: 0 88%;
  transition: background-size 0.25s ease-in;
}

.article-content strong:hover {
  background-size: 100% 0.4em;
}

.article-content em {
  font-style: italic;
  color: #6b7280;
  background: linear-gradient(120deg, #fef3c7 0%, #fef3c7 100%);
  background-repeat: no-repeat;
  background-size: 100% 0.2em;
  background-position: 0 88%;
}

/* === BLOCS DE CITATION === */
.article-content blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-left: 4px solid #3b82f6;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #4b5563;
  position: relative;
}

.article-content blockquote::before {
  content: '"';
  font-size: 4rem;
  color: #3b82f6;
  position: absolute;
  top: -1rem;
  left: 1rem;
  opacity: 0.3;
  font-family: Georgia, serif;
}

/* === CODE ET PRE === */
.article-content code {
  background: #f1f5f9;
  color: #dc2626;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
}

.article-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid #334155;
}

.article-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* === TABLEAUX === */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.article-content th {
  background: #3b82f6;
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.article-content td {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.article-content tr:hover {
  background: #f8fafc;
}

/* === IMAGES === */
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.article-content img:hover {
  transform: scale(1.02);
}

/* === BOUTONS === */
.article-content .btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  margin: 0.5rem 0.5rem 0.5rem 0;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.article-content .btn-primary {
  background: #3b82f6;
  color: white;
}

.article-content .btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.article-content .btn-secondary {
  background: #6b7280;
  color: white;
}

.article-content .btn-secondary:hover {
  background: #4b5563;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
}

/* === SECTIONS SPÉCIALES === */
.article-content .cta {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #bae6fd;
  margin: 3rem 0;
}

.article-content .cta p {
  margin-bottom: 0;
  text-align: center;
}

/* === FAQ === */
.article-content section[aria-label="FAQ"] {
  background: #f9fafb;
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.article-content section[aria-label="FAQ"] h3 {
  color: #3b82f6;
  margin-top: 2rem;
}

.article-content section[aria-label="FAQ"] h3:first-child {
  margin-top: 0;
}

/* === CALENDRIER === */
.article-content ol li {
  background: #f8fafc;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 6px;
  border-left: 3px solid #3b82f6;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .article-content {
    font-size: 1rem;
    padding: 0 1rem;
  }
  
  .article-content h1 {
    font-size: 2rem;
  }
  
  .article-content h2 {
    font-size: 1.5rem;
  }
  
  .article-content h3 {
    font-size: 1.25rem;
  }
  
  .article-content .cta {
    padding: 1.5rem;
  }
  
  .article-content section[aria-label="FAQ"] {
    padding: 1.5rem;
  }
  
  .article-content ul,
  .article-content ol {
    padding-left: 1.5rem;
  }
}

/* === ANIMATIONS === */
.article-content section {
  animation: fadeInUp 0.6s ease-out;
}

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

/* === IMPRESSION === */
@media print {
  .article-content {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .article-content .btn {
    display: none;
  }
  
  .article-content .cta {
    background: white;
    border: 1px solid #ccc;
  }
}
