/* Style simple — blog comparatif classique */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  color: #333;
  background: #fff;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #1a73e8; text-decoration: none; }
a:hover { text-decoration: underline; color: #0d5bbd; }
ul { list-style: none; }

.container { max-width: 1020px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { font-family: Arial, Helvetica, sans-serif; color: #222; line-height: 1.3; }
h1 { font-size: 28px; margin-bottom: 15px; }
h2 { font-size: 22px; margin-bottom: 12px; }
h3 { font-size: 18px; margin-bottom: 10px; }

.highlight { color: #1a73e8; }

.section-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #888;
  margin-bottom: 10px;
}

/* Header */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 2px solid #e0e0e0;
}

.header.scrolled { box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: #222;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: #1a73e8;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.nav { display: flex; gap: 4px; }

.nav a {
  padding: 6px 14px;
  font-size: 14px;
  color: #555;
  border-radius: 3px;
}

.nav a:hover { background: #f5f5f5; color: #222; text-decoration: none; }
.nav a.active { color: #1a73e8; font-weight: 600; }

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 5px 10px;
}

.search-box:focus-within { border-color: #1a73e8; }

.search-box input {
  border: none;
  background: transparent;
  font-size: 13px;
  color: #333;
  width: 130px;
  outline: none;
}

.search-box input::placeholder { color: #999; }
.search-box svg { color: #999; flex-shrink: 0; }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  font-size: 22px;
  color: #333;
}

/* Hero */
.hero {
  padding: 90px 0 45px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

.hero-content { max-width: 700px; }

.hero-badge {
  display: inline-block;
  background: #e8f0fe;
  border: 1px solid #d2e3fc;
  border-radius: 3px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #1a73e8;
  margin-bottom: 18px;
}

.hero-badge .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #1a73e8;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.hero h1 { color: #222; font-size: 30px; margin-bottom: 14px; }
.hero p { font-size: 16px; color: #555; margin-bottom: 24px; line-height: 1.6; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: Arial, sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: #e67e22;
  color: #fff;
}

.btn-primary:hover { background: #d35400; color: #fff; text-decoration: none; }

.btn-secondary {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
}

.btn-secondary:hover { background: #f5f5f5; text-decoration: none; }

.btn-sm { padding: 7px 14px; font-size: 13px; }

/* Sections */
.section { padding: 50px 0; }
.section-dark { background: #2c3e50; color: #ddd; }
.section-light { background: #f8f9fa; }

.section-header { text-align: center; max-width: 600px; margin: 0 auto 40px; }
.section-header h2 { margin-bottom: 10px; }
.section-header p { color: #666; font-size: 15px; }
.section-dark .section-header p { color: #bbb; }

/* Product Cards */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.product-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  position: relative;
}

.product-card:hover { border-color: #bbb; }

.product-card.featured { border: 2px solid #1a73e8; }

.product-card.featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: #1a73e8;
}

.product-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.badge-best { background: #1a73e8; color: #fff; }
.badge-quality { background: #e8f0fe; color: #1a73e8; }
.badge-value { background: #fef3c7; color: #92400e; }

.product-img {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.product-img img { max-height: 100px; width: auto; }

.product-name { font-size: 16px; font-weight: 700; color: #222; margin-bottom: 4px; }
.product-brand { font-size: 13px; color: #888; margin-bottom: 12px; }

.product-score { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.score-value { font-size: 24px; font-weight: 700; color: #1a73e8; }
.score-label { font-size: 12px; color: #999; }

.score-bar { flex: 1; height: 6px; background: #eee; border-radius: 3px; overflow: hidden; }
.score-bar-fill { height: 100%; background: #1a73e8; border-radius: 3px; width: 0; transition: width 0.8s ease; }

.product-specs { margin-bottom: 14px; }
.spec-item { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-bottom: 1px solid #f0f0f0; }
.spec-item:last-child { border-bottom: none; }
.spec-label { color: #888; }
.spec-value { font-weight: 600; color: #333; }

.product-price { font-size: 20px; font-weight: 700; color: #222; margin-bottom: 12px; }
.product-price span { font-size: 13px; font-weight: 400; color: #999; }

.product-cta { display: flex; gap: 8px; }
.product-cta .btn { flex: 1; text-align: center; font-size: 13px; padding: 9px 12px; }

/* Ranking */
.ranking-list { display: flex; flex-direction: column; gap: 12px; }

.ranking-card {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 18px 20px;
}

.ranking-card:hover { border-color: #bbb; }
.ranking-card.top-1 { border-left: 4px solid #e67e22; background: #fffbf5; }
.ranking-card.top-2 { border-left: 4px solid #95a5a6; }
.ranking-card.top-3 { border-left: 4px solid #cd6839; }

.ranking-position { font-size: 28px; font-weight: 700; text-align: center; }
.top-1 .ranking-position { color: #e67e22; }
.top-2 .ranking-position { color: #95a5a6; }
.top-3 .ranking-position { color: #cd6839; }
.ranking-card:not(.top-1):not(.top-2):not(.top-3) .ranking-position { color: #ccc; }

.ranking-info h3 { font-size: 16px; margin-bottom: 4px; }
.ranking-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.ranking-tag { display: inline-block; padding: 2px 8px; background: #f0f0f0; border-radius: 3px; font-size: 11px; color: #666; }
.ranking-info p { font-size: 14px; color: #555; line-height: 1.5; margin-bottom: 8px; }

.ranking-scores { display: flex; flex-wrap: wrap; gap: 12px; }
.ranking-score-item { display: flex; flex-direction: column; gap: 1px; }
.ranking-score-label { font-size: 10px; color: #999; text-transform: uppercase; letter-spacing: 0.5px; }
.ranking-score-value { font-weight: 700; font-size: 14px; color: #1a73e8; }

.ranking-action { text-align: right; }
.ranking-price { font-size: 18px; font-weight: 700; color: #222; margin-bottom: 8px; }
.ranking-price span { font-size: 12px; font-weight: 400; color: #999; display: block; }

/* Comparison Table */
.comparison-table-wrapper {
  overflow-x: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.comparison-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.comparison-table thead { background: #f5f5f5; }

.comparison-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #666;
  border-bottom: 2px solid #ddd;
}

.comparison-table td { padding: 10px 14px; border-bottom: 1px solid #eee; vertical-align: middle; }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table .highlight-row { background: #f0f7ff; }

.brand-cell { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 30px; height: 30px; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.brand-name { font-weight: 600; color: #222; }
.brand-sub { font-size: 11px; color: #999; }
.price-tag { font-weight: 600; color: #222; }
.price-sub { display: block; font-size: 10px; color: #999; }
.check { color: #27ae60; font-weight: 600; }
.cross { color: #e74c3c; font-weight: 600; }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.feature-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
}

.feature-card:hover { border-color: #bbb; }
.section-dark .feature-card { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }

.feature-icon {
  width: 36px;
  height: 36px;
  background: #e8f0fe;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 12px;
}

.section-dark .feature-icon { background: rgba(26,115,232,0.15); }
.feature-card h3 { font-size: 15px; margin-bottom: 6px; }
.section-dark .feature-card h3 { color: #fff; }
.feature-card p { font-size: 13px; color: #666; line-height: 1.5; }
.section-dark .feature-card p { color: rgba(255,255,255,0.5); }

/* Blog */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

.blog-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.blog-card:hover { border-color: #bbb; }
.blog-card-img { width: 100%; height: 170px; overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 16px; }

.blog-card-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #e8f0fe;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #1a73e8;
  margin-bottom: 8px;
}

.blog-card-body h3 { font-size: 15px; margin-bottom: 6px; line-height: 1.35; }
.blog-card-body h3 a { color: #222; }
.blog-card-body h3 a:hover { color: #1a73e8; }
.blog-card-body p { font-size: 13px; color: #666; line-height: 1.5; margin-bottom: 10px; }
.blog-card-meta { display: flex; gap: 12px; font-size: 12px; color: #999; }

/* Blog Filters */
.blog-filters { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 30px; }

.filter-btn {
  padding: 6px 14px;
  border: 1px solid #ddd;
  border-radius: 3px;
  background: #fff;
  font-size: 13px;
  color: #666;
  cursor: pointer;
}

.filter-btn:hover, .filter-btn.active { background: #1a73e8; color: #fff; border-color: #1a73e8; }

/* Article */
.article-hero {
  padding: 90px 0 35px;
  background: #2c3e50;
  color: #fff;
}

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 16px; flex-wrap: wrap; }
.breadcrumb a { color: #7eb8f7; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: rgba(255,255,255,0.4); }

.article-meta-top { display: flex; gap: 16px; justify-content: center; margin-top: 14px; font-size: 13px; color: rgba(255,255,255,0.5); }

.article-content { padding: 40px 0 60px; }

.article-content h2 {
  margin-top: 36px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
  color: #222;
  font-size: 21px;
}

.article-content h3 { margin-top: 28px; margin-bottom: 10px; color: #333; font-size: 17px; }

.article-content p { margin-bottom: 14px; font-size: 15px; line-height: 1.75; color: #444; }

.article-content ul, .article-content ol { margin-bottom: 14px; padding-left: 22px; }
.article-content li { margin-bottom: 6px; font-size: 14px; line-height: 1.6; color: #444; list-style: disc; }
.article-content ol li { list-style: decimal; }

.article-content img { border-radius: 4px; margin: 18px 0; }

.article-content a { color: #1a73e8; text-decoration: underline; }
.article-content a:hover { color: #0d5bbd; }

.article-content blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  background: #f8f9fa;
  border-left: 3px solid #1a73e8;
  font-style: italic;
  color: #555;
  font-size: 14px;
}

/* TOC */
.toc {
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 16px 20px;
  margin-bottom: 30px;
}

.toc-title { font-weight: 700; font-size: 14px; color: #222; margin-bottom: 10px; }
.toc ol { padding-left: 18px; }
.toc li { margin-bottom: 4px; font-size: 13px; list-style: decimal; color: #666; }
.toc li a { color: #1a73e8; text-decoration: none; }
.toc li a:hover { text-decoration: underline; }

/* Info/Warning boxes */
.info-box {
  margin: 18px 0;
  padding: 14px 16px;
  background: #e8f0fe;
  border-left: 3px solid #1a73e8;
  font-size: 14px;
  line-height: 1.6;
}
.info-box p { margin-bottom: 0; color: #333; font-size: 14px; }

.warning-box {
  margin: 18px 0;
  padding: 14px 16px;
  background: #fef9e7;
  border-left: 3px solid #f39c12;
  font-size: 14px;
  line-height: 1.6;
}
.warning-box p { margin-bottom: 0; color: #7d6608; font-size: 14px; }

/* Product Callout */
.product-callout {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 14px;
  align-items: center;
  margin: 22px 0;
  padding: 16px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.product-callout:hover { border-color: #bbb; }
.product-callout.featured { border: 2px solid #1a73e8; background: #f8fbff; }

.product-callout-image img { width: 50px; height: 50px; object-fit: contain; }
.product-callout-info h4 { font-size: 14px; font-weight: 700; margin-bottom: 3px; color: #222; }
.product-callout-info p { font-size: 13px; color: #666; margin-bottom: 6px; }
.product-callout-price { font-size: 18px; font-weight: 700; color: #222; }

/* Product Top List */
.product-top-list { margin: 22px 0; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.top-header { padding: 10px 16px; background: #2c3e50; color: #fff; font-weight: 700; font-size: 14px; }

.product-top-item {
  display: grid;
  grid-template-columns: 32px 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #eee;
  text-decoration: none;
}

.product-top-item:last-child { border-bottom: none; }
.product-top-item:hover { background: #f8f9fa; }
.product-top-item:first-child { background: #fffbf5; }

.product-top-rank { font-size: 18px; font-weight: 700; color: #ccc; }
.product-top-item:first-child .product-top-rank { color: #e67e22; }
.product-top-img img { width: 40px; height: 40px; object-fit: contain; }
.product-top-info h5 { font-size: 14px; font-weight: 600; margin-bottom: 1px; }
.product-top-info span { font-size: 12px; color: #999; }
.product-top-cta { text-align: right; }
.product-top-price { font-weight: 700; color: #222; margin-bottom: 2px; }

/* Related Articles */
.related-articles {
  margin-top: 36px;
  padding: 20px;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.related-articles h3 { margin-top: 0; margin-bottom: 10px; font-size: 16px; }
.related-articles ul { padding-left: 0; }
.related-articles li { list-style: none; margin-bottom: 6px; }
.related-articles li a { color: #1a73e8; font-size: 14px; }
.related-articles li a:hover { text-decoration: underline; }

/* FAQ */
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid #ddd; }
.faq-item:first-child { border-top: 1px solid #ddd; }

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #222;
  text-align: left;
  font-family: Arial, sans-serif;
}

.faq-question:hover { color: #1a73e8; }
.faq-question .icon { font-size: 18px; color: #1a73e8; transition: transform 0.2s; }
.faq-item.active .faq-question .icon { transform: rotate(45deg); }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-answer-inner { padding: 0 0 14px; font-size: 14px; color: #555; line-height: 1.65; }

/* Footer */
.footer { background: #2c3e50; color: rgba(255,255,255,0.6); padding: 40px 0 20px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-brand p { font-size: 13px; line-height: 1.5; margin-top: 10px; color: rgba(255,255,255,0.35); }

.footer h4 { color: #fff; font-size: 13px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.footer ul li { margin-bottom: 6px; }
.footer ul li a { font-size: 13px; color: rgba(255,255,255,0.4); }
.footer ul li a:hover { color: #7eb8f7; text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.25);
}

/* Fade-in (minimal) */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.4s, transform 0.4s; }
.fade-in.visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 768px) {
  .header-inner { height: 50px; }

  .nav {
    display: none;
    position: fixed;
    top: 50px; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 10px;
    border-bottom: 1px solid #ddd;
  }

  .nav.open { display: flex; }
  .mobile-toggle { display: block; }
  .search-box { display: none; }
  .hero { padding: 75px 0 35px; }
  .features-grid { grid-template-columns: 1fr; }

  .ranking-card { grid-template-columns: 1fr; gap: 10px; text-align: center; }
  .ranking-position { font-size: 20px; }
  .ranking-action { text-align: center; }
  .ranking-scores { justify-content: center; }

  .product-callout { grid-template-columns: 1fr; text-align: center; gap: 8px; }
  .product-callout-image { justify-self: center; }
  .product-callout-price { justify-self: center; }

  .product-top-item { grid-template-columns: 24px 1fr; gap: 8px; }
  .product-top-img { display: none; }
  .product-top-cta { grid-column: 1 / -1; text-align: center; }

  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .products-grid, .blog-grid { grid-template-columns: 1fr; }
  .article-meta-top { flex-direction: column; gap: 4px; }
}

@media (max-width: 480px) {
  .hero { padding: 70px 0 30px; }
  .section { padding: 35px 0; }
}

/* Cout au gramme de magnesium */
.cost-best { color: #1a7f37; font-weight: 700; }
.table-note {
  margin-top: 10px;
  font-size: 12px;
  color: #777;
  line-height: 1.5;
}

/* ===== Comparaison des formes de magnésium ===== */
.forms-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.forms-table thead { background: #f5f5f5; }
.forms-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #666;
  border-bottom: 2px solid #ddd;
}
.forms-table td { padding: 10px 12px; border-bottom: 1px solid #eee; }
.forms-table tr:last-child td { border-bottom: none; }
.forms-table tr.form-best { background: #f0f7ff; }
.forms-table tr.form-best td { font-weight: 600; color: #222; }
.forms-table .form-name { font-weight: 600; color: #222; white-space: nowrap; }
.rating-good { color: #1a7f37; font-weight: 600; }
.rating-mid { color: #9a6700; }
.rating-low { color: #b42318; }

.forms-note {
  margin-top: 14px;
  font-size: 13px;
  color: #666;
  line-height: 1.7;
}

/* ===== Les pièges des étiquettes ===== */
.traps-list { margin-top: 26px; }

.trap-item {
  border-left: 3px solid #1a73e8;
  background: #fafbfc;
  padding: 18px 22px;
  margin-bottom: 16px;
  border-radius: 0 4px 4px 0;
}

.trap-item h3 { font-size: 16px; margin-bottom: 8px; color: #222; }
.trap-item p { color: #555; margin-bottom: 8px; }
.trap-item p:last-child { margin-bottom: 0; }

.trap-check {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #1a7f37;
  background: #eaf6ec;
  border-radius: 3px;
  padding: 4px 10px;
  margin-top: 4px;
}

.trap-calc {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 14px;
  color: #333;
  margin: 10px 0;
}

.trap-calc strong { color: #b42318; }
.trap-calc .ok { color: #1a7f37; }
