/* ============================================================
   AOSOM — BLOG ARTICLE CSS
   Load this ONCE, globally (site-wide), not per article.
   Generated articles only carry the .ao-* classes.

   FONT: requires Urbanist. Add to the site <head>:
   <link href="https://fonts.googleapis.com/css2?family=Urbanist:wght@400;600;700;800&display=swap" rel="stylesheet">
   (or uncomment the @import below)

   INTEGRATION NOTE: the "body" and ".ao-page" rules were meant for the
   standalone preview. On the live site, adapt them: "body" may override
   the site's global background, and ".ao-page" is just a centered wrapper.
   Article rendering depends on ".ao-article" and the .ao-* classes.

   Palette: #2B2B2B (text) · #FFFFFF (article background)
            #DC2F2F (accent / red) · #F9FAFC (box backgrounds)
   ============================================================ */

/* @import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@400;600;700;800&display=swap'); */

:root {
  --ao-text: #2B2B2B;
  --ao-red: #DC2F2F;
  --ao-bg-soft: #F9FAFC;
  --ao-border: #E4E6EC;
}

/* Centered "article page" wrapper (adapt on the live site) */
.ao-page {
  font-family: 'Urbanist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 760px;
  margin: 40px auto;
  background: #fff;
  border-radius: 16px;
  padding: 40px 48px 56px;
  box-shadow: 0 4px 24px rgba(20, 24, 40, 0.06);
}

/* ----- BASE TEXT ----- */
.ao-article p,
.ao-article li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ao-text);
}

.ao-article p { margin: 0 0 16px; }

.ao-article a {
  color: var(--ao-red);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ao-article a:hover { text-decoration: none; }

.ao-article strong { color: var(--ao-text); font-weight: 700; }

/* ----- MAIN TITLE (H1) ----- */
.ao-article h1 {
  color: var(--ao-text);
  font-weight: 800;
  font-size: 32px;
  line-height: 1.25;
  margin: 0 0 24px;
}
.ao-article h1::first-letter { color: var(--ao-red); }

/* ----- HEADINGS ----- */
.ao-article h2 {
  color: var(--ao-text);
  font-weight: 800;
  font-size: 24px;
  line-height: 1.3;
  margin: 56px 0 18px;
  scroll-margin-top: 100px;
}
.ao-article h2::first-letter { color: var(--ao-red); }

.ao-article h3 {
  color: var(--ao-text);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
  margin: 36px 0 12px;
}
.ao-article h3::first-letter { color: var(--ao-red); }

/* ----- IMAGE PLACEHOLDER ----- */
.ao-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    repeating-linear-gradient(45deg, #F9FAFC, #F9FAFC 14px, #F2F4F9 14px, #F2F4F9 28px);
  border: 1px dashed var(--ao-border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 32px;
  color: #9aa0af;
  text-align: center;
}
.ao-hero-label {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: #7a8090;
}
.ao-hero-sub { font-size: 13px; color: #a6abb8; }

.ao-article img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 20px 0;
}

/* ----- "KEY TAKEAWAY" BOX ----- */
.ao-encadre {
  border-left: 3px solid var(--ao-red);
  background: var(--ao-bg-soft);
  padding: 18px 22px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  font-size: 16px;
  line-height: 1.7;
}
.ao-encadre p { margin: 0; }

/* ----- "GOOD TO KNOW" BOX ----- */
.ao-note {
  background: var(--ao-bg-soft);
  border: 1px solid var(--ao-border);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 18px 0 4px;
  font-size: 15px;
  line-height: 1.65;
}
.ao-note p { margin: 0; }
.ao-note-tag {
  color: var(--ao-red);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* ----- TABLE OF CONTENTS ----- */
.ao-sommaire {
  border: 1px solid var(--ao-border);
  background: var(--ao-bg-soft);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0 32px;
}
.ao-sommaire-title {
  margin: 0 0 8px;
  font-weight: 800;
  font-size: 16px;
  color: var(--ao-text);
}
.ao-sommaire ul { list-style: none; padding: 0; margin: 0; }
.ao-sommaire li { margin: 0; }
.ao-sommaire li a {
  display: block;
  padding: 9px 0;
  color: var(--ao-text);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.4;
  border-bottom: 1px solid var(--ao-border);
  transition: color 0.15s ease;
}
.ao-sommaire li:last-child a { border-bottom: none; }
.ao-sommaire li a:hover { color: var(--ao-red); }

/* ----- LISTS ----- */
.ao-article ul.ao-list { margin: 0 0 16px; padding-left: 20px; }
.ao-article ul.ao-list li { margin: 0 0 6px; }
.ao-article ul.ao-list li::marker { color: var(--ao-red); }

/* ----- TABLE ----- */
.ao-table-wrap { overflow-x: auto; width: 100%; margin: 20px 0 28px; }
.ao-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 560px;
  font-size: 15px;
  border-radius: 10px;
  overflow: hidden;
}
.ao-table th {
  background: var(--ao-red);
  color: #fff;
  padding: 13px 18px;
  text-align: center;
  font-weight: 700;
}
.ao-table td {
  padding: 13px 18px;
  text-align: center;
  vertical-align: middle;
  color: var(--ao-text);
  border-bottom: 1px solid var(--ao-border);
}
.ao-table tbody tr:nth-child(odd) { background: #fff; }
.ao-table tbody tr:nth-child(even) { background: var(--ao-bg-soft); }
.ao-table tbody tr:last-child td { border-bottom: none; }
.ao-table .ao-rank {
  font-weight: 800;
  color: var(--ao-red);
  font-size: 17px;
}

/* ----- CTA ----- */
.ao-cta { text-align: center; margin: 32px 0; }
.ao-btn {
  display: inline-block;
  background: var(--ao-red);
  color: #fff !important;
  text-decoration: none !important;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  transition: opacity 0.2s ease;
}
.ao-btn:hover { opacity: 0.88; }

/* ----- PRODUCT CTA CARD ----- */
.ao-product {
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--ao-bg-soft);
  border: 1px solid var(--ao-border);
  border-radius: 14px;
  padding: 18px;
  margin: 24px 0 32px;
}
.ao-product-img {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  border-radius: 10px;
  border: 1px dashed var(--ao-border);
  background:
    repeating-linear-gradient(45deg, #fff, #fff 12px, #F2F4F9 12px, #F2F4F9 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  color: #9aa0af;
  font-size: 12px;
  line-height: 1.3;
  padding: 8px;
}
.ao-product-img span { font-weight: 700; color: #7a8090; }
.ao-product-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ao-product-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--ao-text);
  margin: 0;
  line-height: 1.3;
}
.ao-product-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--ao-red);
}
.ao-product-btn {
  align-self: flex-start;
  display: inline-block;
  background: var(--ao-red);
  color: #fff !important;
  text-decoration: none !important;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  margin-top: 4px;
  transition: opacity 0.2s ease;
}
.ao-product-btn:hover { opacity: 0.88; }

@media (max-width: 680px) {
  .ao-product { flex-direction: column; align-items: stretch; text-align: center; }
  .ao-product-img { width: 100%; height: 160px; }
  .ao-product-body { align-items: center; }
  .ao-product-btn { align-self: center; }
}

/* ----- BLOCKQUOTE ----- */
.ao-article blockquote {
  border-left: 3px solid var(--ao-red);
  margin: 24px 0;
  padding: 6px 0 6px 22px;
  font-style: italic;
  color: #55585f;
  font-size: 17px;
}

/* ----- FAQ ----- */
.ao-faq { margin: 32px 0 0; }
.ao-faq details {
  border: 1px solid var(--ao-border);
  border-radius: 12px;
  padding: 16px 20px;
  background: #fff;
  margin: 0 0 12px;
  transition: background 0.2s ease;
}
.ao-faq details[open] { background: var(--ao-bg-soft); }
.ao-faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  color: var(--ao-text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ao-faq summary::-webkit-details-marker { display: none; }
.ao-faq summary::after {
  content: "+";
  font-weight: 800;
  font-size: 20px;
  color: var(--ao-red);
  flex-shrink: 0;
  margin-left: 14px;
}
.ao-faq details[open] summary::after { content: "\2013"; }
.ao-faq details p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ao-text);
}

/* ----- RESPONSIVE ----- */
@media (max-width: 680px) {
  .ao-page { margin: 0; border-radius: 0; padding: 28px 20px 40px; }
  .ao-article h1 { font-size: 26px; }
  .ao-article h2 { font-size: 21px; margin: 44px 0 14px; }
  .ao-article h3 { font-size: 18px; margin: 30px 0 10px; }
  .ao-sommaire, .ao-encadre, .ao-faq details { padding: 16px 18px; }
  .ao-btn { padding: 13px 24px; font-size: 15px; }
}
