/* ============================================================
   GBECHI BONIFACE — BLOG.CSS v1
   Blog public + article page
   ============================================================ */

/* ============================================================
   BLOG HERO
   ============================================================ */
.blog-hero {
  background: linear-gradient(135deg, #060A18 0%, #0F172A 35%, #111D8A 70%, #1B2CC1 100%);
  padding: 120px 0 60px;
  text-align: center;
  position: relative; overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px; pointer-events: none;
}
.blog-hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(245,158,11,.15); border: 1px solid rgba(245,158,11,.35);
  color: #FCD34D; padding: 6px 16px; border-radius: var(--radius-full);
  font-size: .8rem; font-weight: 700; margin-bottom: 18px;
  letter-spacing: .08em; text-transform: uppercase;
}
.blog-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 900; color: #fff; margin-bottom: 14px;
}
.blog-hero h1 span { color: #FCD34D; }
.blog-hero p {
  color: rgba(255,255,255,.75); max-width: 540px;
  margin: 0 auto 32px; line-height: 1.7;
}

/* Blog search */
.blog-search-wrap {
  max-width: 480px; margin: 0 auto;
  position: relative;
}
.blog-search-wrap input {
  width: 100%;
  padding: 14px 50px 14px 20px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: #fff; font-family: var(--font-body); font-size: .92rem;
  outline: none; transition: var(--t);
  backdrop-filter: blur(8px);
}
.blog-search-wrap input::placeholder { color: rgba(255,255,255,.5); }
.blog-search-wrap input:focus { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.15); }
.blog-search-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: var(--orange); color: #fff; border: none;
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--t);
}
.blog-search-btn:hover { background: var(--orange-dark); }

/* ============================================================
   BLOG LAYOUT
   ============================================================ */
.blog-page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 48px 0;
}
@media (max-width: 1024px) { .blog-page-layout { grid-template-columns: 1fr; } }

/* ============================================================
   BLOG CATEGORIES STRIP
   ============================================================ */
.blog-cats-strip {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px;
}
.blog-cat-btn {
  padding: 7px 18px; border-radius: var(--radius-full);
  border: 1.5px solid var(--border); background: var(--bg-card);
  color: var(--text-muted); font-family: var(--font-heading);
  font-size: .78rem; font-weight: 600; cursor: pointer; transition: var(--t);
}
.blog-cat-btn:hover, .blog-cat-btn.active {
  background: var(--orange); border-color: var(--orange); color: #fff;
}

/* ============================================================
   BLOG ARTICLE CARD
   ============================================================ */
.blog-articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.blog-articles-grid.single-col { grid-template-columns: 1fr; }
@media (max-width: 768px) { .blog-articles-grid { grid-template-columns: 1fr; } }

.blog-article-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden; transition: var(--t);
  display: flex; flex-direction: column;
}
.blog-article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-blue);
}
[data-theme="dark"] .blog-article-card {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
}

.blog-article-cover {
  position: relative; height: 200px; overflow: hidden;
  background: var(--bg-dark2);
}
.blog-article-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.blog-article-card:hover .blog-article-cover img { transform: scale(1.06); }
.blog-cover-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #0D5ECC, #1877F2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: rgba(255,255,255,.4);
}
.blog-article-cat {
  position: absolute; bottom: 12px; left: 12px;
  background: var(--orange); color: #fff;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-family: var(--font-heading); font-size: .68rem; font-weight: 700;
}

.blog-article-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.blog-article-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: .75rem; color: var(--text-muted); margin-bottom: 10px;
}
.blog-article-meta span { display: flex; align-items: center; gap: 5px; }
.blog-article-meta i { color: var(--blue); }
.blog-article-title {
  font-family: var(--font-heading); font-size: 1rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 10px; line-height: 1.3;
}
.blog-article-title a { color: inherit; transition: var(--t); }
.blog-article-title a:hover { color: var(--blue); }
.blog-article-excerpt {
  font-size: .83rem; color: var(--text-muted); line-height: 1.6;
  margin-bottom: 16px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.blog-article-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid var(--border); margin-top: auto;
}
[data-theme="dark"] .blog-article-footer { border-color: rgba(255,255,255,.08); }
.blog-read-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--orange); font-family: var(--font-heading);
  font-size: .82rem; font-weight: 700; transition: var(--t);
}
.blog-read-link:hover { gap: 10px; color: var(--orange-dark); }
.blog-article-views {
  font-size: .73rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.blog-article-views i { color: var(--text-light); }

/* Featured post — large card */
.blog-article-card.featured-post {
  grid-column: 1 / -1;
  flex-direction: row;
}
.blog-article-card.featured-post .blog-article-cover {
  width: 380px; min-width: 380px; height: auto;
}
@media (max-width: 768px) {
  .blog-article-card.featured-post { flex-direction: column; }
  .blog-article-card.featured-post .blog-article-cover { width: 100%; height: 220px; }
}

/* ============================================================
   BLOG SIDEBAR
   ============================================================ */
.blog-sidebar {}
.blog-sidebar-widget {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px; margin-bottom: 20px;
}
[data-theme="dark"] .blog-sidebar-widget {
  background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08);
}
.blog-sidebar-title {
  font-family: var(--font-heading); font-size: .88rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 2px solid var(--blue);
  display: inline-block;
}

/* Popular posts */
.popular-post {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.popular-post:last-child { border-bottom: none; padding-bottom: 0; }
[data-theme="dark"] .popular-post { border-color: rgba(255,255,255,.06); }
.popular-post-num {
  font-family: var(--font-heading); font-size: 1.2rem; font-weight: 800;
  color: var(--blue); min-width: 24px; line-height: 1;
}
.popular-post-title {
  font-size: .82rem; font-weight: 600; color: var(--text-dark);
  line-height: 1.4; margin-bottom: 4px;
}
.popular-post-title a { color: inherit; transition: var(--t); }
.popular-post-title a:hover { color: var(--blue); }
.popular-post-meta { font-size: .72rem; color: var(--text-muted); }

/* Tags cloud */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill {
  padding: 4px 10px; border-radius: var(--radius-full);
  background: var(--bg2); border: 1px solid var(--border);
  font-size: .75rem; font-weight: 600; color: var(--text-mid);
  transition: var(--t); cursor: pointer;
}
.tag-pill:hover { background: var(--blue-bg); color: var(--blue); border-color: var(--border-blue); }

/* Newsletter widget */
.newsletter-widget { text-align: center; }
.newsletter-widget p { font-size: .85rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.6; }
.newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-input {
  padding: 10px 14px; border-radius: var(--radius-md);
  border: 1.5px solid var(--border); background: var(--bg);
  color: var(--text-dark); font-family: var(--font-body); font-size: .85rem;
  outline: none; transition: var(--t);
}
.newsletter-input:focus { border-color: var(--blue); }
[data-theme="dark"] .newsletter-input {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1);
  color: var(--text-dark);
}
.newsletter-btn {
  padding: 10px; border-radius: var(--radius-md);
  background: var(--orange); color: #fff; border: none;
  font-family: var(--font-heading); font-size: .85rem; font-weight: 700;
  cursor: pointer; transition: var(--t);
}
.newsletter-btn:hover { background: var(--orange-dark); }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 48px 0;
}
@media (max-width: 1024px) { .article-layout { grid-template-columns: 1fr; } }

.article-hero-cover {
  width: 100%; height: 420px; border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 32px; background: var(--bg-dark2);
}
.article-hero-cover img { width: 100%; height: 100%; object-fit: cover; }

.article-header { margin-bottom: 24px; }
.article-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.article-cat-badge {
  padding: 4px 12px; border-radius: var(--radius-full);
  background: var(--orange-bg); color: var(--orange);
  font-family: var(--font-heading); font-size: .72rem; font-weight: 700;
  border: 1px solid var(--border-orange);
}
.article-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 800; color: var(--text-dark); line-height: 1.2;
  margin-bottom: 16px;
}
.article-meta-bar {
  display: flex; align-items: center; gap: 20px;
  flex-wrap: wrap; padding: 14px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
[data-theme="dark"] .article-meta-bar { border-color: rgba(255,255,255,.08); }
.article-author {
  display: flex; align-items: center; gap: 10px;
}
.article-author img {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
}
.article-author-name {
  font-weight: 700; font-size: .88rem; color: var(--text-dark);
  display: block;
}
.article-author-role { font-size: .75rem; color: var(--text-muted); }
.article-meta-item {
  display: flex; align-items: center; gap: 6px;
  font-size: .8rem; color: var(--text-muted);
}
.article-meta-item i { color: var(--blue); }

/* Article content */
.article-content {
  font-size: .97rem; line-height: 1.8; color: var(--text-mid);
}
.article-content h2 {
  font-family: var(--font-heading); font-size: 1.4rem;
  font-weight: 700; color: var(--text-dark);
  margin: 32px 0 14px; padding-bottom: 8px;
  border-bottom: 2px solid var(--blue);
}
.article-content h3 {
  font-family: var(--font-heading); font-size: 1.1rem;
  font-weight: 700; color: var(--text-dark);
  margin: 24px 0 10px;
}
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol {
  padding-left: 20px; margin-bottom: 16px;
}
.article-content li { margin-bottom: 8px; }
.article-content strong { color: var(--text-dark); font-weight: 700; }
.article-content a { color: var(--blue); text-decoration: underline; }
.article-content a:hover { color: var(--blue-mid); }
.article-content blockquote {
  border-left: 4px solid var(--orange);
  padding: 14px 20px; background: var(--orange-bg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 20px 0; font-style: italic; color: var(--text-mid);
}

/* Share bar */
.article-share {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 0; border-top: 1px solid var(--border);
  margin-top: 32px; flex-wrap: wrap;
}
[data-theme="dark"] .article-share { border-color: rgba(255,255,255,.08); }
.article-share-label {
  font-family: var(--font-heading); font-size: .82rem; font-weight: 700;
  color: var(--text-muted);
}
.share-social-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--radius-full);
  font-family: var(--font-heading); font-size: .78rem; font-weight: 700;
  transition: var(--t); border: none; cursor: pointer;
}
.share-fb  { background: #1877F2; color: #fff; }
.share-tw  { background: #1DA1F2; color: #fff; }
.share-wa  { background: #25D366; color: #fff; }
.share-li  { background: #0A66C2; color: #fff; }
.share-social-btn:hover { opacity: .85; transform: translateY(-2px); }

/* ============================================================
   COMMENTS SECTION
   ============================================================ */
.comments-section {
  margin-top: 48px; padding-top: 40px;
  border-top: 2px solid var(--border);
}
[data-theme="dark"] .comments-section { border-color: rgba(255,255,255,.08); }
.comments-title {
  font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 24px;
  display: flex; align-items: center; gap: 10px;
}
.comments-count-badge {
  background: var(--blue-bg); color: var(--blue);
  padding: 2px 10px; border-radius: var(--radius-full);
  font-size: .78rem; font-weight: 700;
}

/* Single comment */
.comment-item {
  display: flex; gap: 14px;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
.comment-item:last-child { border-bottom: none; }
[data-theme="dark"] .comment-item { border-color: rgba(255,255,255,.06); }
.comment-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: .9rem; font-weight: 700;
  color: #fff; flex-shrink: 0;
}
.comment-avatar.admin-avatar {
  background: linear-gradient(135deg, var(--orange-dark), var(--orange));
}
.comment-bubble { flex: 1; }
.comment-header {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.comment-author {
  font-family: var(--font-heading); font-weight: 700;
  font-size: .88rem; color: var(--text-dark);
}
.comment-date { font-size: .75rem; color: var(--text-muted); }
.admin-badge {
  padding: 2px 8px; background: var(--orange-bg); color: var(--orange);
  border-radius: var(--radius-full); font-size: .65rem; font-weight: 700;
  border: 1px solid var(--border-orange);
}
.comment-text {
  font-size: .88rem; line-height: 1.7; color: var(--text-mid);
}
.comment-reply-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .75rem; color: var(--blue); font-weight: 600;
  cursor: pointer; margin-top: 6px; background: none; border: none;
  transition: var(--t);
}
.comment-reply-btn:hover { color: var(--blue-mid); }

/* Réponse admin — indentée */
.comment-reply {
  margin-left: 56px; margin-top: 8px;
}

/* Formulaire commentaire */
.comment-form-section {
  margin-top: 32px;
  background: var(--bg2); border-radius: var(--radius-lg);
  padding: 28px;
}
[data-theme="dark"] .comment-form-section { background: rgba(255,255,255,.03); }
.comment-form-title {
  font-family: var(--font-heading); font-size: 1rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 20px;
}
.comment-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px;
}
@media (max-width: 600px) { .comment-form-grid { grid-template-columns: 1fr; } }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: .8rem; font-weight: 600; color: var(--text-muted); }
.form-input, .form-textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg-card); color: var(--text-dark);
  font-family: var(--font-body); font-size: .88rem;
  outline: none; transition: var(--t);
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg);
}
[data-theme="dark"] .form-input, [data-theme="dark"] .form-textarea {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1);
  color: var(--text-dark);
}
.form-textarea { height: 120px; resize: vertical; }
.form-submit-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue); color: #fff;
  padding: 12px 24px; border-radius: var(--radius-full);
  font-family: var(--font-heading); font-size: .88rem; font-weight: 700;
  border: none; cursor: pointer; transition: var(--t);
}
.form-submit-btn:hover { background: var(--blue-mid); transform: translateY(-2px); }
.form-note {
  font-size: .78rem; color: var(--text-muted); margin-top: 10px;
  display: flex; align-items: center; gap: 6px;
}
.form-note i { color: var(--orange); }

/* ============================================================
   RELATED ARTICLES
   ============================================================ */
.related-articles { margin-top: 48px; }
.related-articles h3 {
  font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 20px;
}
.related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
@media (max-width: 768px) { .related-grid { grid-template-columns: 1fr; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .blog-hero { padding: 100px 0 40px; }
  .blog-hero h1 { font-size: clamp(1.6rem, 8vw, 2.2rem); }
  .article-hero-cover { height: 240px; }
  .article-title { font-size: 1.5rem; }
  .comments-section { margin-top: 32px; }
  .comment-form-section { padding: 20px; }
}

/* ============================================================
   MOBILE EXTRA — breakpoints fins + overflow + iOS zoom
   ============================================================ */

/* Prevent horizontal scroll on blog/article pages */
.blog-hero, .blog-page-layout, .article-layout,
.comments-section, .related-articles {
  overflow-x: hidden;
}

/* iOS zoom fix sur inputs */
@media (max-width: 768px) {
  .blog-search-wrap input,
  .form-input,
  .form-textarea,
  .newsletter-input { font-size: 16px !important; }

  /* Article cover réduit encore plus sur petit mobile */
  .article-hero-cover { height: 200px; border-radius: var(--radius-md); }

  /* Comment form section padding réduit */
  .comment-form-section { padding: 16px; }

  /* Bouton submit commentaire pleine largeur */
  .form-submit-btn { width: 100%; justify-content: center; }

  /* Share bar scroll horizontal si trop large */
  .article-share { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
  .article-share::-webkit-scrollbar { display: none; }
}

@media (max-width: 480px) {
  /* Blog hero */
  .blog-hero { padding: 90px 0 32px; }
  .blog-hero h1 { font-size: clamp(1.4rem, 8vw, 1.9rem); }
  .blog-hero p { font-size: .82rem; }

  /* Cats strip scroll horizontal */
  .blog-cats-strip { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
  .blog-cats-strip::-webkit-scrollbar { display: none; }
  .blog-cat-btn { white-space: nowrap; flex-shrink: 0; }

  /* Article title */
  .article-title { font-size: 1.3rem; line-height: 1.25; }

  /* Meta bar scroll */
  .article-meta-bar { gap: 12px; }

  /* Sidebar tags wrap */
  .tags-cloud { gap: 5px; }

  /* Share buttons smaller */
  .share-social-btn { padding: 6px 10px; font-size: .72rem; }
}
