/*
Theme Name: DuoPME Blog
Theme URI: https://blog.duopme.fr
Author: DuoPME
Author URI: https://duopme.fr
Description: Thème blog custom pour DuoPME — Design dark professionnel pour artisans et TPE
Version: 1.1
License: GNU General Public License v2 or later
Text Domain: duopme-blog
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #0a1628;
  --bg-secondary: #111d35;
  --bg-card: #111d35;
  --bg-card-hover: #162040;
  --border-card: rgba(255,255,255,0.06);
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --text-muted: #718096;
  --accent-red: #c8102e;
  --accent-red-hover: #a50d25;
  --accent-orange: #f59e0b;
  --accent-green: #10b981;
  --accent-blue: #3b82f6;
  --accent-violet: #8b5cf6;
  --accent-gray: #6b7280;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-display: 'Outfit', -apple-system, sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 29, 58, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.logo-duo { color: #fff; }
.logo-pme { color: var(--accent-red); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-menu a {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
  position: relative;
}
.nav-menu a:hover,
.nav-menu a.active {
  color: #fff;
}
.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-red);
  border-radius: 1px;
}

/* Bouton CTA — style identique duopme.fr */
.btn-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  background: var(--accent-red);
  color: #fff !important;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 50px;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(200, 16, 46, 0.3);
  text-decoration: none;
}
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(200, 16, 46, 0.4);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* ===== HERO ===== */
.hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200, 16, 46, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-content {
  flex: 1;
}

.breadcrumb {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a {
  color: var(--text-muted);
  transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--text-secondary); }
.breadcrumb span { color: var(--text-secondary); }

.hero-title {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
}
.hero-title .red { color: var(--accent-red); }

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 500;
}

.hero-desc {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  max-width: 480px;
}

.hero-image {
  flex: 0 0 380px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.hero-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

/* ===== ARTICLES SECTION ===== */
.articles-section {
  padding: 80px 0 60px;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-red);
  margin-bottom: 8px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
}

.section-meta {
  font-family: var(--font-body);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== ARTICLE CARDS GRID — aligné sur id16.fr/duo-bis ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 50px;
}

.blog-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(200,16,46,0.4);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.blog-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-red);
  margin-bottom: 10px;
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 10px;
}

.blog-card-excerpt {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.blog-card-meta {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.blog-card-meta span { color: rgba(255,255,255,0.2); }

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  transition: all 0.2s;
}
.pagination a:hover {
  color: #fff;
  background: var(--bg-card-hover);
  border-color: rgba(255,255,255,0.12);
}
.pagination .current {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}
.pagination .dots {
  background: transparent;
  border: none;
  color: var(--text-muted);
}
.pagination .prev,
.pagination .next {
  font-weight: 600;
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #0d1e36 0%, #0a1628 50%, #12203d 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,16,46,0.3), transparent);
}

.cta-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.cta-title .highlight {
  color: var(--accent-red);
  text-decoration: underline;
  text-decoration-color: var(--accent-red);
  text-underline-offset: 4px;
}

.cta-subtitle {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-cta-large {
  padding: 14px 32px;
  font-size: 0.95rem;
  border-radius: 50px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border: 2px solid rgba(255,255,255,0.3);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.2s;
  cursor: pointer;
  background: transparent;
}
.btn-outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.05);
}

/* ===== FOOTER ===== */
.site-footer {
  padding: 60px 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: var(--bg-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.footer-brand .logo {
  margin-bottom: 16px;
}
.footer-brand-desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}
.footer-email {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-email a {
  color: var(--text-secondary);
  transition: color 0.2s;
}
.footer-email a:hover { color: #fff; }

.footer-socials {
  display: flex;
  gap: 12px;
}
.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}
.footer-socials a:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col ul a {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-col ul a:hover {
  color: var(--text-secondary);
}

.footer-bottom {
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom-left {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-badge .flag {
  font-size: 1.1rem;
}

/* ===== SINGLE ARTICLE ===== */
.single-article {
  padding: 120px 0 60px;
  max-width: 780px;
  margin: 0 auto;
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-muted);
}
.single-meta .category-badge {
  padding: 4px 12px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
}

.single-title {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 32px;
}

.single-featured {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 40px;
  max-height: 420px;
}
.single-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Article content */
.article-content {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-secondary);
}
.article-content h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 40px 0 16px;
}
.article-content h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 12px;
}
.article-content p {
  margin-bottom: 18px;
}
.article-content a {
  color: var(--accent-red);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-content a:hover {
  color: var(--accent-red-hover);
}
.article-content ul, .article-content ol {
  margin: 16px 0;
  padding-left: 24px;
}
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li {
  margin-bottom: 8px;
}
.article-content blockquote {
  border-left: 3px solid var(--accent-red);
  padding: 16px 24px;
  margin: 24px 0;
  background: rgba(200, 16, 46, 0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}
.article-content img {
  border-radius: 10px;
  margin: 24px 0;
}
.article-content pre, .article-content code {
  background: var(--bg-card);
  border-radius: 6px;
}
.article-content pre {
  padding: 20px;
  margin: 20px 0;
  overflow-x: auto;
}
.article-content code {
  padding: 2px 6px;
  font-size: 0.92em;
}
.article-content .wp-block-image,
.article-content figure {
  margin: 24px 0;
}

/* Related articles */
.related-section {
  padding: 60px 0;
  border-top: 1px solid var(--border-card);
}

/* ===== ARCHIVE PAGE ===== */
.archive-header {
  padding: 120px 0 40px;
  text-align: center;
}
.archive-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.archive-desc {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ===== 404 ===== */
.error-404 {
  padding: 160px 0 80px;
  text-align: center;
}
.error-404 h1 {
  font-family: var(--font-display);
  font-size: 6rem;
  color: var(--accent-red);
  line-height: 1;
  margin-bottom: 16px;
}
.error-404 p {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 2.6rem; }
}

@media (max-width: 768px) {
  .nav-menu { display: none; }
  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(11, 29, 58, 0.98);
    backdrop-filter: blur(16px);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-card);
  }
  .menu-toggle { display: block; }

  .hero-inner { flex-direction: column; gap: 32px; }
  .hero-image { flex: none; width: 100%; }
  .hero-title { font-size: 2.2rem; }
  .hero { padding: 110px 0 50px; }

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

  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }

  .cta-title { font-size: 1.8rem; }

  .single-title { font-size: 2rem; }
  .single-article { padding: 100px 24px 40px; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.8rem; }
  .container { padding: 0 16px; }
}
