/* MD2PDF Blog - Styles optimisés SEO et UX */

:root {
  --primary-color: #db2c46;
  --primary-hover: #c41f39;
  --text-color: #1F2937;
  --text-light: #6B7280;
  --border-color: #E5E7EB;
  --bg-light: #F9FAFB;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: white;
}

/* Bandeau CTA sticky en haut */
.cta-banner {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, #db2c46 0%, #c41f39 100%);
  color: white;
  padding: 14px 20px;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.cta-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cta-content span {
  font-size: 16px;
  font-weight: 500;
}

.cta-button {
  display: inline-block;
  background: white;
  color: #db2c46;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Header */
header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

header img {
  height: 40px;
}

nav {
  display: flex;
  gap: 32px;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--primary-color);
}

/* Container principal */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Article */
article {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

article h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text-color);
  font-weight: 800;
}

.meta {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}

article img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 32px 0;
}

.content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-color);
}

.content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--text-color);
}

.content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-color);
}

.content p {
  margin-bottom: 20px;
}

.content ul, .content ol {
  margin: 20px 0;
  padding-left: 32px;
}

.content li {
  margin-bottom: 12px;
}

.content strong {
  color: var(--text-color);
  font-weight: 600;
}

.content code {
  background: var(--bg-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.95em;
  color: #E11D48;
}

.content pre {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border-color);
}

.content pre code {
  background: transparent;
  padding: 0;
  color: var(--text-color);
}

/* CTA inline (milieu d'article) */
.cta-inline {
  background: linear-gradient(135deg, #db2c46 0%, #c41f39 100%);
  color: white;
  padding: 32px;
  border-radius: 12px;
  text-align: center;
  margin: 48px 0;
  box-shadow: 0 4px 12px rgba(219, 44, 70, 0.3);
}

.cta-inline h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: white;
}

.cta-inline a {
  display: inline-block;
  background: white;
  color: #db2c46;
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s;
}

.cta-inline a:hover {
  transform: scale(1.05);
}

/* CTA final (fin d'article) */
.cta-final {
  max-width: 800px;
  margin: 0 auto 60px;
  padding: 48px 32px;
  background: var(--bg-light);
  border-radius: 16px;
  text-align: center;
  border: 2px solid var(--border-color);
}

.cta-final h2 {
  font-size: 2rem;
  margin-bottom: 12px;
  color: var(--text-color);
}

.cta-final p {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

.cta-final a {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 14px 40px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.cta-final a:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* Liste d'articles (page index) */
.blog-header {
  text-align: center;
  padding: 60px 20px 40px;
  background: var(--bg-light);
}

.blog-header h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-color);
}

.blog-header p {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 32px;
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.article-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.article-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-card-content {
  padding: 24px;
}

.article-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-color);
}

.article-card p {
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.6;
}

.article-card .meta {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Footer - Style identique à l'application */
footer {
  background: #F9FAFB;
  border-top: 1px solid #E5E7EB;
  padding: 2rem 0;
}

footer .max-w-7xl {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

footer .flex {
  display: flex;
}

footer .flex-col {
  flex-direction: column;
}

footer .md\:flex-row {
  flex-direction: row;
}

footer .justify-between {
  justify-content: space-between;
}

footer .items-center {
  align-items: center;
}

footer .space-y-4 > * + * {
  margin-top: 1rem;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  font-size: 0.75rem;
}

footer nav a {
  color: #6B7280;
  text-decoration: none;
  transition: color 0.2s;
}

footer nav a:hover {
  color: #1F2937;
}

footer nav span {
  color: #9CA3AF;
}

footer .text-sm {
  font-size: 0.875rem;
}

footer .text-gray-600 {
  color: #6B7280;
}

@media (min-width: 768px) {
  footer .max-w-7xl {
    padding: 0 1.5rem;
  }

  footer .md\:flex-row {
    flex-direction: row;
  }

  footer .space-y-4 > * + * {
    margin-top: 0;
  }

  footer nav {
    justify-content: flex-start;
  }
}

/* Responsive */
@media (max-width: 768px) {
  article h1 {
    font-size: 2rem;
  }

  .content {
    font-size: 1rem;
  }

  .content h2 {
    font-size: 1.5rem;
  }

  .content h3 {
    font-size: 1.25rem;
  }

  .cta-content {
    flex-direction: column;
    text-align: center;
  }

  nav {
    flex-direction: column;
    gap: 16px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .blog-header h1 {
    font-size: 2rem;
  }
}
