/* ============================================
   Quantior.fr — Blog Article Styles (Premium v2)
   ============================================ */

/* --- Article Header with grid pattern --- */
.article-header {
  background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 100%);
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* Grid pattern */
.article-header::before {
  content: '';
  position: absolute;
  inset: -30px;
  background-image:
    linear-gradient(rgba(37,99,235,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

/* Radial glow */
.article-header::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
}

.article-header .container {
  max-width: var(--container-narrow);
  position: relative;
  z-index: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.article-meta-category {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: all var(--transition);
}

.article-meta-category:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}

.article-header h1 {
  font-size: 2.25rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  position: relative;
}

.article-intro {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  position: relative;
}

/* Article hero image */
.article-hero-image {
  max-width: var(--container-narrow);
  margin: -2rem auto 0;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.article-hero-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* --- Article body --- */
.article-body {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.article-body h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.article-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.article-body h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.article-body p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }

.article-body li {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.article-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: var(--bg-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-body blockquote p {
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 0;
}

/* --- Info boxes --- */
.info-box {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.info-box p {
  color: #1E40AF;
  font-size: 0.938rem;
  margin-bottom: 0;
}

.warning-box {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-left: 4px solid #F59E0B;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.warning-box p {
  color: #92400E;
  font-size: 0.938rem;
  margin-bottom: 0;
}

/* --- Inline newsletter CTA in articles --- */
.article-newsletter {
  background: linear-gradient(135deg, var(--bg-light) 0%, #EFF6FF 100%);
  border: 1px solid rgba(37,99,235,0.1);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin: 2.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.article-newsletter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light, #3B82F6));
}

.article-newsletter h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.article-newsletter p {
  color: var(--text-secondary);
  font-size: 0.938rem;
  margin-bottom: 1rem;
}

.article-newsletter form {
  display: flex;
  gap: 0.75rem;
  max-width: 400px;
  margin: 0 auto;
}

.article-newsletter input[type="email"] {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.article-newsletter input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.article-newsletter button {
  padding: 0.7rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.article-newsletter button:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 15px rgba(37,99,235,0.25);
}

/* --- Related articles --- */
.related-articles {
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
  margin-top: 2.5rem;
}

.related-articles h2 {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.related-articles .card-img {
  height: 160px;
}

/* --- Table styles --- */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.938rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.article-body th,
.article-body td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
}

.article-body th {
  background: var(--bg-light);
  font-weight: 600;
  color: var(--primary);
}

.article-body td {
  color: var(--text-secondary);
}

.article-body tr:hover td {
  background: rgba(37,99,235,0.02);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .article-header h1 { font-size: 1.625rem; }
  .article-body { padding: 2rem 1rem; }
  .article-body h2 { font-size: 1.3rem; }
  .article-body p,
  .article-body li { font-size: 1rem; }
  .article-newsletter form { flex-direction: column; }
  .article-newsletter button { width: 100%; }
  .article-meta { flex-wrap: wrap; gap: 0.5rem; }
  .article-hero-image { margin-top: -1rem; padding: 0 1rem; }

  .article-body table {
    font-size: 0.8125rem;
  }

  .article-body th,
  .article-body td {
    padding: 0.5rem 0.6rem;
  }
}
