/* =============================================
   blog.css — Styles PubliRank Blog
   Charte : #6C47FF violet | #1A1A2E noir | #F8F7FF fond
   Typo : DM Sans (titres) + Inter (corps)
   ============================================= */

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: #1A1A2E;
  background: #F8F7FF;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: #6C47FF; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ── Navigation ── */
.blog-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #E9E6FF;
  box-shadow: 0 1px 8px rgba(108,71,255,.06);
}
.blog-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.blog-nav-left  { display: flex; align-items: center; gap: 12px; }
.blog-nav-logo  { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.blog-nav-logo-icon {
  width: 32px; height: 32px;
  background: #6C47FF;
  border-radius: 8px;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.blog-nav-logo-text { font-family: 'DM Sans', sans-serif; font-size: 1.1rem; color: #1A1A2E; }
.blog-nav-logo-text strong { color: #6C47FF; }
.blog-nav-sep  { color: #C4C0D8; font-size: 1.2rem; }
.blog-nav-blog-link { font-size: 0.9rem; color: #6B7280; font-weight: 500; }
.blog-nav-right { display: flex; align-items: center; gap: 12px; }
.blog-nav-link  { font-size: 0.875rem; color: #4B5563; font-weight: 500; }
.blog-nav-cta   {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #6C47FF;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background .2s;
}
.blog-nav-cta:hover { background: #5535D4; text-decoration: none; }

/* ── Breadcrumb ── */
.blog-breadcrumb {
  background: #fff;
  border-bottom: 1px solid #F0ECFF;
}
.blog-breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  font-size: 0.8rem;
  color: #6B7280;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.blog-breadcrumb-inner a { color: #6C47FF; font-weight: 500; }
.bc-sep { color: #C4C0D8; }

/* ── Hero article (top de la liste) ── */
.blog-hero-article {
  background: linear-gradient(135deg, #1A1A2E 0%, #2D1B69 100%);
  padding: 60px 24px;
}
.blog-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: center;
}
.blog-hero-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.blog-hero-date, .blog-hero-read { font-size: 0.8rem; color: rgba(255,255,255,.6); }
.blog-hero-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 16px;
}
.blog-hero-title a { color: #fff; }
.blog-hero-title a:hover { color: #C4B5FD; text-decoration: none; }
.blog-hero-desc { color: rgba(255,255,255,.75); font-size: 1rem; margin-bottom: 28px; line-height: 1.6; }
.blog-hero-btn {
  display: inline-flex;
  align-items: center;
  background: #6C47FF;
  color: #fff;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: background .2s, transform .15s;
}
.blog-hero-btn:hover { background: #5535D4; text-decoration: none; transform: translateY(-1px); }
.blog-hero-img-wrap { border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.blog-hero-img { width: 100%; height: 260px; object-fit: cover; }

/* ── Layout principal (liste + sidebar) ── */
.blog-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}
.blog-main { min-width: 0; }

/* ── En-tête liste ── */
.blog-list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid #E9E6FF;
}
.blog-list-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1A1A2E;
  display: flex;
  align-items: center;
  gap: 12px;
}
.blog-filter-reset {
  font-size: 0.8rem;
  font-weight: 500;
  color: #6B7280;
  background: #F3F4F6;
  padding: 3px 8px;
  border-radius: 6px;
}
.blog-list-count { font-size: 0.85rem; color: #9CA3AF; }

/* ── Grille articles ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.blog-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E9E6FF;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  box-shadow: 0 8px 32px rgba(108,71,255,.12);
  transform: translateY(-2px);
}
.blog-card-img-link { display: block; overflow: hidden; }
.blog-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform .3s;
}
.blog-card:hover .blog-card-img { transform: scale(1.03); }
.blog-card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.blog-card-date, .blog-card-read { font-size: 0.75rem; color: #9CA3AF; }
.blog-card-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}
.blog-card-title a { color: #1A1A2E; }
.blog-card-title a:hover { color: #6C47FF; text-decoration: none; }
.blog-card-desc { font-size: 0.875rem; color: #4B5563; line-height: 1.55; flex: 1; margin-bottom: 16px; }
.blog-card-link { font-size: 0.85rem; font-weight: 600; color: #6C47FF; }
.blog-card-link:hover { text-decoration: underline; }

/* ── Pagination ── */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.blog-page-btn, .blog-page-num {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6C47FF;
  background: #fff;
  border: 1px solid #E9E6FF;
  transition: background .15s;
}
.blog-page-num:hover, .blog-page-btn:hover { background: #F0ECFF; text-decoration: none; }
.blog-page-num.active {
  background: #6C47FF;
  color: #fff;
  border-color: #6C47FF;
}

/* ── Vide ── */
.blog-empty { padding: 60px 0; text-align: center; color: #6B7280; }
.blog-empty a { color: #6C47FF; font-weight: 600; margin-top: 12px; display: inline-block; }

/* ── Sidebar ── */
.blog-sidebar { display: flex; flex-direction: column; gap: 24px; }

.sidebar-cta {
  background: linear-gradient(135deg, #1A1A2E 0%, #2D1B69 100%);
  border-radius: 16px;
  padding: 28px 24px;
  color: #fff;
  text-align: center;
}
.sidebar-cta-icon { font-size: 1.5rem; margin-bottom: 12px; }
.sidebar-cta h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.sidebar-cta p { font-size: 0.875rem; color: rgba(255,255,255,.75); line-height: 1.55; margin-bottom: 16px; }
.sidebar-cta-btn {
  display: block;
  background: #6C47FF;
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 12px 16px;
  border-radius: 10px;
  transition: background .2s;
  margin-bottom: 8px;
}
.sidebar-cta-btn:hover { background: #5535D4; text-decoration: none; }
.sidebar-cta-note { font-size: 0.75rem; color: rgba(255,255,255,.45); }

.sidebar-block {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E9E6FF;
  padding: 20px;
}
.sidebar-block-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1A1A2E;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #F0ECFF;
}
.sidebar-recent { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.sidebar-recent-item a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #1A1A2E;
}
.sidebar-recent-item a:hover { text-decoration: none; }
.sidebar-recent-img {
  width: 60px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.sidebar-recent-title {
  font-size: 0.825rem;
  font-weight: 600;
  line-height: 1.35;
  display: block;
  color: #1A1A2E;
  transition: color .15s;
}
.sidebar-recent-item a:hover .sidebar-recent-title { color: #6C47FF; }
.sidebar-recent-meta { font-size: 0.75rem; color: #9CA3AF; }

.sidebar-cats { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sidebar-cats li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}
.sidebar-cats li a:hover { text-decoration: none; }
.sidebar-cat-count { font-size: 0.75rem; color: #9CA3AF; }

.sidebar-offer {
  background: #F0ECFF;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #DDD6FE;
}
.sidebar-offer p { font-size: 0.875rem; color: #4B5563; }
.sidebar-offer-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6C47FF;
}

/* ── Article ── */
.article-header { margin-bottom: 32px; }
.article-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.article-date, .article-read { font-size: 0.8rem; color: #6B7280; }
.article-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  color: #1A1A2E;
  margin-bottom: 16px;
}
.article-desc {
  font-size: 1.1rem;
  color: #4B5563;
  line-height: 1.65;
  margin-bottom: 24px;
}
.article-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #F8F7FF;
  border-radius: 12px;
  border: 1px solid #E9E6FF;
}
.article-author-avatar {
  width: 40px; height: 40px;
  background: #6C47FF;
  border-radius: 50%;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.article-author-name { font-weight: 600; font-size: 0.9rem; display: block; }
.article-author-role { font-size: 0.8rem; color: #6B7280; }

.article-hero-img-wrap {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: 0 4px 24px rgba(108,71,255,.1);
}
.article-hero-img { width: 100%; max-height: 420px; object-fit: cover; }

/* ── Contenu article ── */
.article-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #1A1A2E;
}
.article-content h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1A1A2E;
  margin: 2.5rem 0 1rem;
  padding-bottom: 8px;
  border-bottom: 2px solid #E9E6FF;
}
.article-content h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1A1A2E;
  margin: 2rem 0 0.75rem;
}
.article-content h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1A1A2E;
  margin: 1.5rem 0 0.5rem;
}
.article-content p { margin-bottom: 1.25rem; }
.article-content ul, .article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}
.article-content li { margin-bottom: 0.5rem; }
.article-content strong { font-weight: 700; color: #1A1A2E; }
.article-content em { font-style: italic; }
.article-content a { color: #6C47FF; text-decoration: underline; }
.article-content a:hover { color: #5535D4; }
.article-content blockquote {
  margin: 2rem 0;
  padding: 20px 24px;
  background: #F0ECFF;
  border-left: 4px solid #6C47FF;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: #4B5563;
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.article-content th {
  background: #1A1A2E;
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
}
.article-content td {
  padding: 11px 16px;
  border-bottom: 1px solid #F0ECFF;
  color: #374151;
}
.article-content tr:nth-child(even) td { background: #F8F7FF; }
.article-content tr:last-child td { border-bottom: none; }
.article-content dl { margin: 1.5rem 0; }
.article-content dt {
  font-weight: 700;
  color: #1A1A2E;
  margin-top: 1.25rem;
  font-size: 1.0rem;
}
.article-content dd {
  margin-left: 1.5rem;
  margin-top: 0.4rem;
  color: #4B5563;
}
.article-content code {
  background: #F0ECFF;
  color: #6C47FF;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Fira Code', monospace;
}
.article-content pre {
  background: #1A1A2E;
  color: #E2E8F0;
  padding: 20px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
/* Commentaires placeholder image */
.article-content .img-placeholder {
  background: #F0ECFF;
  border: 2px dashed #C4B5FD;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  color: #7C3AED;
  font-size: 0.875rem;
  margin: 2rem 0;
}

/* ── Tags ── */
.article-tags { margin: 32px 0; display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Navigation prev/next ── */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 40px 0;
  padding-top: 32px;
  border-top: 1px solid #E9E6FF;
}
.article-nav-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: #fff;
  border: 1px solid #E9E6FF;
  border-radius: 12px;
  transition: border-color .2s, box-shadow .2s;
}
.article-nav-item:hover { border-color: #6C47FF; box-shadow: 0 4px 16px rgba(108,71,255,.1); text-decoration: none; }
.article-nav-next { text-align: right; }
.article-nav-dir { font-size: 0.75rem; color: #9CA3AF; font-weight: 500; }
.article-nav-ttl { font-size: 0.875rem; font-weight: 600; color: #1A1A2E; line-height: 1.35; }

/* ── Articles liés ── */
.article-related { margin-top: 48px; padding-top: 40px; border-top: 1px solid #E9E6FF; }
.article-related-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
}
.article-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.article-related-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border: 1px solid #E9E6FF;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  color: #1A1A2E;
}
.article-related-card:hover { box-shadow: 0 4px 20px rgba(108,71,255,.1); transform: translateY(-2px); text-decoration: none; }
.article-related-card img { width: 100%; height: 120px; object-fit: cover; }
.article-related-card div { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.article-related-card p { font-size: 0.85rem; font-weight: 600; line-height: 1.35; }
.article-related-card span { font-size: 0.75rem; color: #9CA3AF; }

/* ── CTA bas article ── */
.article-cta {
  margin-top: 48px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1A1A2E 0%, #2D1B69 100%);
  padding: 40px;
  color: #fff;
}
.article-cta h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.article-cta p { color: rgba(255,255,255,.75); font-size: 0.95rem; margin-bottom: 24px; line-height: 1.6; }
.article-cta-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.article-cta-primary {
  background: #6C47FF;
  color: #fff;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: background .2s;
}
.article-cta-primary:hover { background: #5535D4; text-decoration: none; }
.article-cta-secondary {
  color: rgba(255,255,255,.8);
  font-weight: 500;
  padding: 12px 0;
  font-size: 0.9rem;
}
.article-cta-secondary:hover { color: #fff; text-decoration: none; }

/* ── Footer ── */
.blog-footer {
  background: #1A1A2E;
  color: rgba(255,255,255,.7);
  margin-top: 80px;
}
.blog-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 48px;
}
.blog-footer-brand .blog-footer-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.blog-footer-tagline { font-size: 0.875rem; color: rgba(255,255,255,.5); line-height: 1.55; max-width: 260px; }
.blog-footer-links { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.blog-footer-col h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.blog-footer-col a {
  display: block;
  font-size: 0.85rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 7px;
  transition: color .15s;
}
.blog-footer-col a:hover { color: #C4B5FD; text-decoration: none; }
.blog-footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,.35);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .blog-hero-inner { grid-template-columns: 1fr; }
  .blog-hero-img-wrap { display: none; }
}
@media (max-width: 768px) {
  .blog-nav-right .blog-nav-link { display: none; }
  .blog-hero-article { padding: 40px 16px; }
  .blog-hero-title { font-size: 1.5rem; }
  .blog-layout { padding: 24px 16px; }
  .blog-grid { grid-template-columns: 1fr; }
  .article-title { font-size: 1.5rem; }
  .article-nav { grid-template-columns: 1fr; }
  .blog-footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .blog-footer-links { grid-template-columns: 1fr 1fr; }
  .article-cta { padding: 28px 20px; }
  .article-cta h3 { font-size: 1.2rem; }
  .blog-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .blog-footer-links { grid-template-columns: 1fr; }
  .blog-footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
