/* LucasMdev Blog — Clean Minimal Style */
:root {
  --text: #1a1a2e;
  --muted: #666;
  --accent: #4f46e5;
  --accent-hover: #3730a3;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --border: #e5e7eb;
  --card-shadow: 0 1px 3px rgba(0,0,0,.08);
  --max-width: 740px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

/* ---- Header ---- */
header {
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.3px;
}
.logo span { color: var(--accent); }
nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 24px;
  font-size: .95rem;
  transition: color .15s;
}
nav a:hover { color: var(--accent); }

/* ---- Main ---- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 20px 80px;
}

/* ---- Hero (homepage) ---- */
.hero {
  margin-bottom: 56px;
}
.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -.5px;
}
.hero p { color: var(--muted); font-size: 1.05rem; }

/* ---- Article cards ---- */
.articles-grid { display: flex; flex-direction: column; gap: 24px; }

.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 28px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color .15s, box-shadow .15s;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(79,70,229,.1);
}
.card-meta { font-size: .82rem; color: var(--muted); margin-bottom: 8px; }
.card-meta span {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 20px;
  margin-right: 6px;
}
.card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}
.card p { color: var(--muted); font-size: .95rem; line-height: 1.5; }
.card-arrow {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-size: .9rem;
  font-weight: 600;
}

/* ---- Article page ---- */
.article-header { margin-bottom: 40px; }
.article-header .meta,
.article-meta {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.article-header .meta span,
.article-meta span {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
  margin-right: 6px;
}
.article-header h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.5px;
  margin-bottom: 16px;
}
.article-header .intro,
.article-intro {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 28px;
}
.article-cta {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-top: 40px;
  font-size: .95rem;
}
.article-cta a {
  color: var(--accent);
  font-weight: 600;
}

.article-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 40px 0 14px;
  letter-spacing: -.3px;
}
.article-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 28px 0 10px;
}
.article-content p { margin-bottom: 18px; }
.article-content ul, .article-content ol {
  padding-left: 24px;
  margin-bottom: 18px;
}
.article-content li { margin-bottom: 6px; }

.article-content strong { font-weight: 700; }
.article-content em { font-style: italic; }

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: .92rem;
}
.article-content th {
  background: var(--bg-alt);
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--border);
  font-weight: 700;
}
.article-content td {
  padding: 10px 14px;
  border: 1px solid var(--border);
}
.article-content tr:nth-child(even) td { background: var(--bg-alt); }

/* ---- Affiliate CTA ---- */
.affiliate-box {
  background: linear-gradient(135deg, #f0f0ff 0%, #e8f4ff 100%);
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 20px 24px;
  margin: 24px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
.affiliate-box .aff-icon { font-size: 1.8rem; }
.affiliate-box .aff-text { flex: 1; }
.affiliate-box .aff-text strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.affiliate-box .aff-text span { font-size: .88rem; color: var(--muted); }
.affiliate-box a.btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
  transition: background .15s;
}
.affiliate-box a.btn:hover { background: var(--accent-hover); }

/* ---- Code blocks ---- */
pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: .88rem;
  line-height: 1.6;
  margin: 20px 0;
}
code {
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}
p code, li code {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .88em;
}

/* ---- HR ---- */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
}
footer a { color: var(--accent); text-decoration: none; }

/* ---- Back link ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  margin-bottom: 40px;
  transition: color .15s;
}
.back-link:hover { color: var(--accent); }

/* ---- Disclaimer ---- */
.disclaimer {
  background: var(--bg-alt);
  border-left: 3px solid var(--border);
  padding: 12px 16px;
  margin-top: 40px;
  font-size: .85rem;
  color: var(--muted);
  border-radius: 0 6px 6px 0;
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.6rem; }
  .article-header h1 { font-size: 1.5rem; }
  .affiliate-box { flex-direction: column; gap: 12px; }
}

/* ---- Related articles (Lire aussi) ---- */
.related-articles {
  margin-top: 50px;
  padding: 24px 28px;
  background: var(--bg-alt);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.related-articles h3 {
  margin: 0 0 14px;
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.related-articles ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.related-articles li a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.related-articles li a::before {
  content: "→ ";
  color: var(--accent);
}
.related-articles li a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---- Search ---- */
.search-section { margin-bottom: 8px; }
.search-wrapper { position: relative; max-width: 500px; }
#blog-search {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
}
#blog-search:focus { border-color: var(--accent); }
#blog-search::placeholder { color: var(--muted); }
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: .95rem;
}
#search-count { margin-top: 8px; font-size: .85rem; color: var(--muted); }
