/* ============================================================
   WipMedia — Styles Blogue
   Réutilise les variables et le look du thème (couleurs, polices,
   cartes) définis dans wipmedia-source.css
   ============================================================ */

/* ── Hero du blogue ── */
#blog-hero {
  padding: 150px 0 70px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, #F0F6FF 0%, #FFFFFF 55%, #F8FAFC 100%);
}
#blog-hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -160px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
  pointer-events: none;
}
#blog-hero .blog-hero-inner { position: relative; z-index: 1; max-width: 720px; }
#blog-hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; color: var(--text); margin-bottom: 14px; line-height: 1.15; }
#blog-hero p { font-size: 1.02rem; color: var(--muted); line-height: 1.7; max-width: 560px; }

/* ── Barre de recherche du hero ── */
.blog-search-form {
  margin-top: 28px;
  display: flex;
  max-width: 440px;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.blog-search-form input[type="search"] {
  flex: 1;
  border: none;
  padding: 13px 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
}
.blog-search-form input[type="search"]::placeholder { color: #94A3B8; }
.blog-search-form button {
  background: var(--blue);
  border: none;
  padding: 0 18px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.2s;
}
.blog-search-form button:hover { background: #1d4ed8; }

/* ── Layout principal : grille + sidebar ── */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  align-items: start;
  padding: 56px 0 100px;
}
.blog-main { min-width: 0; }

/* ── Grille de cartes d'articles ── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.post-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}
.post-card:hover { border-color: #BFDBFE; transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--blue-light), #E0ECFF);
  overflow: hidden;
  position: relative;
}
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.post-card:hover .post-card-thumb img { transform: scale(1.05); }
.post-card-thumb-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue); opacity: 0.35;
}
.post-card-body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.post-card-cat {
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-light);
  border: 1px solid var(--blue-mid);
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 14px;
  text-decoration: none;
}
.post-card h2 { font-size: 1.1rem; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.post-card h2 a { color: var(--text); text-decoration: none; }
.post-card h2 a:hover { color: var(--blue); }
.post-card p { font-size: 13.5px; color: var(--muted); line-height: 1.7; margin-bottom: 16px; flex: 1; }
.post-card-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: #94A3B8;
  padding-top: 14px; border-top: 1px solid var(--card-border);
}
.post-card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #CBD5E1; }
.post-card-readmore { color: var(--blue); font-weight: 600; font-size: 12.5px; margin-left: auto; text-decoration: none; }

/* Article vedette (premier article de la liste) */
.post-card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; }
.post-card.featured .post-card-thumb { aspect-ratio: auto; height: 100%; }
.post-card.featured .post-card-body { justify-content: center; padding: 32px 36px; }
.post-card.featured h2 { font-size: 1.5rem; }

/* ── Pagination ── */
.wip-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.wip-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 10px;
  border-radius: 8px; border: 1px solid var(--card-border);
  font-family: 'Space Mono', monospace; font-size: 12.5px; font-weight: 700;
  color: var(--text); text-decoration: none; transition: all 0.2s;
}
.wip-pagination .page-numbers:hover { border-color: var(--blue); color: var(--blue); }
.wip-pagination .page-numbers.current { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── Sidebar ── */
.blog-sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 110px; }
.widget-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.widget-card h3, .widget-card .widget-title {
  font-family: 'Space Mono', monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 18px;
}
.widget-card ul { display: flex; flex-direction: column; gap: 12px; }
.widget-card ul li { list-style: none; }
.widget-card .cat-link {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13.5px; color: var(--muted); text-decoration: none; transition: color 0.2s;
}
.widget-card .cat-link:hover { color: var(--blue); }
.widget-card .cat-link .count { font-family: 'Space Mono', monospace; font-size: 11px; color: #CBD5E1; }
.widget-recent-post { display: flex; gap: 12px; align-items: flex-start; }
.widget-recent-post .thumb {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 8px; overflow: hidden;
  background: var(--blue-light);
}
.widget-recent-post .thumb img { width: 100%; height: 100%; object-fit: cover; }
.widget-recent-post .info a { font-size: 13px; font-weight: 600; color: var(--text); text-decoration: none; line-height: 1.4; }
.widget-recent-post .info a:hover { color: var(--blue); }
.widget-recent-post .info .date { font-size: 11px; color: #94A3B8; margin-top: 4px; display: block; }
.widget-cta { background: var(--blue); border: none; text-align: center; }
.widget-cta h3 { color: rgba(255,255,255,0.75); }
.widget-cta p { color: #fff; font-size: 13.5px; line-height: 1.6; margin-bottom: 18px; }
.widget-cta a.btn { width: 100%; justify-content: center; }

/* ── Article complet (single.php) ── */
.article-hero { padding: 150px 0 40px; background: linear-gradient(165deg, #F0F6FF 0%, #FFFFFF 60%); }
.article-hero .container { max-width: 780px; }
.article-breadcrumb { font-family: 'Space Mono', monospace; font-size: 11px; color: var(--blue); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px; display: flex; gap: 8px; align-items: center; }
.article-breadcrumb a { color: var(--blue); text-decoration: none; }
.article-breadcrumb a:hover { text-decoration: underline; }
.article-hero h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); font-weight: 800; line-height: 1.2; color: var(--text); margin-bottom: 20px; }
.article-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.article-meta .author { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.article-meta .avatar { width: 28px; height: 28px; border-radius: 50%; }
.article-meta .sep { color: #CBD5E1; }

.article-thumb { max-width: 900px; margin: 0 auto; padding: 0 24px 48px; }
.article-thumb img { width: 100%; border-radius: 16px; box-shadow: var(--shadow-lg); }

.article-body { max-width: 720px; margin: 0 auto; padding: 0 24px 80px; }
.article-body .entry-content { font-size: 16px; line-height: 1.85; color: #334155; }
.article-body .entry-content > * + * { margin-top: 20px; }
.article-body .entry-content h2 { font-size: 1.55rem; font-weight: 800; color: var(--text); margin-top: 44px; }
.article-body .entry-content h3 { font-size: 1.25rem; font-weight: 700; color: var(--text); margin-top: 34px; }
.article-body .entry-content p { margin-bottom: 0; }
.article-body .entry-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.article-body .entry-content ul, .article-body .entry-content ol { padding-left: 22px; }
.article-body .entry-content li { margin-bottom: 8px; color: #334155; }
.article-body .entry-content blockquote {
  border-left: 3px solid var(--blue);
  background: var(--blue-light);
  padding: 18px 24px;
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #1e3a8a;
}
.article-body .entry-content img { border-radius: 12px; width: 100%; }
.article-body .entry-content code { background: var(--darker); padding: 2px 6px; border-radius: 4px; font-family: 'Space Mono', monospace; font-size: 0.88em; }
.article-body .entry-content pre { background: #0F172A; color: #E2E8F0; padding: 20px; border-radius: 12px; overflow-x: auto; }
.article-body .entry-content pre code { background: none; padding: 0; color: inherit; }

/* Tags de l'article */
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--card-border); }
.article-tags a {
  font-size: 12px; color: var(--muted); background: var(--darker);
  border: 1px solid var(--card-border); padding: 5px 12px; border-radius: 20px; text-decoration: none;
}
.article-tags a:hover { color: var(--blue); border-color: var(--blue-mid); }

/* Partage */
.article-share { display: flex; align-items: center; gap: 10px; margin-top: 24px; }
.article-share span { font-size: 12px; color: #94A3B8; font-weight: 600; }
.article-share a {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--card-border);
  display: flex; align-items: center; justify-content: center; color: var(--muted);
  transition: all 0.2s; text-decoration: none;
}
.article-share a:hover { border-color: var(--blue); color: var(--blue); }

/* Boîte auteur */
.author-box {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--darker); border-radius: 16px; padding: 28px; margin-top: 48px;
}
.author-box img { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; }
.author-box h4 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.author-box p { font-size: 13px; color: var(--muted); line-height: 1.7; }

/* Navigation précédent / suivant */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.post-nav a {
  border: 1px solid var(--card-border); border-radius: 12px; padding: 18px 20px;
  text-decoration: none; display: block; transition: border-color 0.2s;
}
.post-nav a:hover { border-color: var(--blue); }
.post-nav .label { font-family: 'Space Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue); margin-bottom: 6px; display: block; }
.post-nav .title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.post-nav.next { text-align: right; }

/* Articles similaires */
.related-posts { max-width: 900px; margin: 64px auto 0; padding: 0 24px; }
.related-posts h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 24px; }

/* ── Commentaires ── */
.wip-comments { max-width: 720px; margin: 0 auto; padding: 0 24px 100px; }
.wip-comments .comments-title { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 24px; }
.wip-comments ol.comment-list { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.wip-comments .comment-body {
  border: 1px solid var(--card-border); border-radius: 12px; padding: 20px 22px; background: var(--card-bg);
}
.wip-comments .comment-author { font-size: 13.5px; font-weight: 700; color: var(--text); }
.wip-comments .comment-metadata { font-size: 11.5px; color: #94A3B8; margin-bottom: 10px; }
.wip-comments .comment-content p { font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.wip-comments .comment-respond { margin-top: 32px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; padding: 28px; }
.wip-comments .comment-form input[type="text"],
.wip-comments .comment-form input[type="email"],
.wip-comments .comment-form input[type="url"],
.wip-comments .comment-form textarea {
  width: 100%; background: var(--darker); border: 1px solid var(--card-border); border-radius: 8px;
  padding: 12px 16px; font-family: 'Poppins', sans-serif; font-size: 13.5px; color: var(--text); margin-bottom: 14px;
}
.wip-comments .comment-form textarea { min-height: 120px; resize: vertical; }
.wip-comments .comment-form .comment-form-author,
.wip-comments .comment-form .comment-form-email { display: inline-block; width: 48%; }
.wip-comments .comment-form .comment-form-author { margin-right: 4%; }
.wip-comments .comment-form label { display: none; }
.wip-comments .form-submit input[type="submit"] {
  background: var(--blue); color: #fff; border: none; padding: 12px 26px; border-radius: 8px;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 13.5px; cursor: pointer;
}
.wip-comments .form-submit input[type="submit"]:hover { background: #1d4ed8; }

/* ── 404 ── */
.wip-404 { text-align: center; padding: 180px 24px 120px; }
.wip-404 .code { font-family: 'Space Mono', monospace; font-size: 4rem; font-weight: 700; color: var(--blue); }
.wip-404 h1 { font-size: 1.6rem; font-weight: 800; color: var(--text); margin: 12px 0 16px; }
.wip-404 p { color: var(--muted); margin-bottom: 28px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .blog-sidebar .widget-card { flex: 1; min-width: 260px; }
}
@media (max-width: 768px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-card.featured { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  #blog-hero { padding: 130px 0 50px; }
  .wip-comments .comment-form .comment-form-author,
  .wip-comments .comment-form .comment-form-email { width: 100%; margin-right: 0; }
}
