/* ============================================
   ARTICLE / PAGE INTÉRIEURE — Styles
   ============================================ */

/* Header opaque sur toutes les pages internes (pas la homepage) — desktop & mobile */
body:not(.home) .aa-header {
  background: var(--white) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,.08) !important;
}
body:not(.home) .aa-header .aa-logo { color: var(--slate-900) !important; }
body:not(.home) .aa-header .aa-nav > a,
body:not(.home) .aa-header .aa-nav-dropdown-toggle { color: var(--slate-700) !important; }
body:not(.home) .aa-header .aa-nav > a:hover,
body:not(.home) .aa-header .aa-nav-dropdown-toggle:hover { color: var(--blue-600) !important; }
body:not(.home) .aa-header .aa-nav-toggle span { background: var(--slate-700) !important; }

/* Pas de mode "scrolled" sur pages internes — déjà opaque */
body:not(.home) .aa-header.aa-scrolled { background: var(--white) !important; }

/* ---- Breadcrumb ---- */
.breadcrumb-bar {
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-100);
  padding: 10px 0;
  margin-top: 64px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--slate-500);
}
.breadcrumb a { color: var(--blue-600); transition: color .2s; }
.breadcrumb a:hover { color: var(--blue-800); }
.breadcrumb span:last-child { color: var(--slate-700); font-weight: 500; }

/* ---- Article Hero ---- */
.article-hero {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 100%);
  padding: 60px 0;
  color: var(--white);
}
.article-hero-inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 60px;
  align-items: center;
}
.article-meta-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.metier-tag {
  background: rgba(249,115,22,.2);
  border: 1px solid rgba(249,115,22,.35);
  color: var(--orange-400);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius-full);
}
.update-date { font-size: 0.78rem; color: rgba(255,255,255,.55); }
.article-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.article-intro {
  font-size: 1rem;
  color: rgba(255,255,255,.8);
  line-height: 1.7;
  margin-bottom: 28px;
}
.article-intro strong { color: var(--white); }
.article-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-xl);
  padding: 20px 28px;
  display: inline-flex;
}
.astat { text-align: center; }
.astat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--orange-400);
  line-height: 1;
}
.astat-label { font-size: 0.75rem; color: rgba(255,255,255,.65); margin-top: 3px; }
.astat-sep { width: 1px; height: 40px; background: rgba(255,255,255,.15); }

/* ---- CTA Mini Card ---- */
.cta-mini-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-xl);
}
.cta-mini-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 4px;
}
.cta-mini-card > p {
  font-size: 0.8rem;
  color: var(--slate-500);
  margin-bottom: 20px;
}

/* ---- Article Layout ---- */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  padding-top: 56px;
  padding-bottom: 80px;
  align-items: start;
}

/* ---- Article Body ---- */
.article-body h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 40px 0 16px;
  color: var(--slate-900);
}
.article-body h2:first-child { margin-top: 0; }
.article-body p {
  color: var(--slate-700);
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: 0.97rem;
}
.article-body strong { color: var(--slate-900); }

.info-box {
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin: 24px 0;
  font-size: 0.9rem;
  line-height: 1.65;
}
.info-box--warning {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  color: #78350f;
}
.info-box--tip {
  background: var(--blue-50);
  border-left: 4px solid var(--blue-500);
  color: var(--blue-800);
}
.info-box strong { color: inherit; }

.content-list {
  list-style: none;
  padding-left: 0;
  margin: 16px 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.content-list li {
  font-size: 0.95rem;
  color: var(--slate-700);
  line-height: 1.65;
  padding-left: 0;
}
.content-list--ordered { counter-reset: list-counter; }
.content-list--ordered li {
  counter-increment: list-counter;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-width: 0;
}
.content-list--ordered li > * { min-width: 0; }
.content-list--ordered li::before {
  content: counter(list-counter);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--blue-600);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.article-cta-block {
  background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
  border: 1.5px solid var(--blue-200);
  border-radius: var(--radius-xl);
  padding: 36px;
  text-align: center;
  margin-top: 48px;
}
.article-cta-block h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.article-cta-block p {
  color: var(--slate-600);
  margin-bottom: 20px;
}

/* ---- Sidebar ---- */
.article-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar-card {
  background: var(--white);
  border: 1.5px solid var(--slate-100);
  border-radius: var(--radius-xl);
  padding: 22px;
}
.sidebar-card h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--slate-900);
}
.sidebar-price {
  font-size: 0.85rem;
  color: var(--slate-600);
}
.sidebar-price strong {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--blue-700);
}

.toc-list { display: flex; flex-direction: column; gap: 8px; }
.toc-list a {
  font-size: 0.85rem;
  color: var(--blue-600);
  transition: color .2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.toc-list a::before { content: '›'; color: var(--slate-400); }
.toc-list a:hover { color: var(--blue-800); }

.related-list { display: flex; flex-direction: column; gap: 10px; }
.related-list a {
  font-size: 0.85rem;
  color: var(--blue-600);
  transition: color .2s, padding-left .15s;
  display: block;
}
.related-list a:hover { color: var(--blue-800); padding-left: 4px; }
.sidebar-card--related { background: var(--slate-50); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .article-hero-inner { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
}
@media (max-width: 768px) {
  .article-hero { padding: 40px 0; }
  .article-stats { flex-wrap: wrap; gap: 16px; padding: 16px 20px; }
  .astat-sep { display: none; }
  .article-layout { padding-top: 40px; padding-bottom: 60px; gap: 32px; }
  .article-body h2 { font-size: 1.15rem; margin: 32px 0 12px; }
  .article-body p { font-size: 0.94rem; line-height: 1.7; }
  .article-cta-block { padding: 28px 20px; }
  .sidebar-card { padding: 18px; }
  /* Liste numérotée mobile : plus petit pastille + texte serré */
  .content-list li { font-size: 0.92rem; line-height: 1.6; }
  .content-list--ordered { padding-left: 0; margin-left: 0; }
  .content-list--ordered li { gap: 10px; }
  .content-list--ordered li::before { width: 24px; height: 24px; font-size: 0.72rem; }
  /* Tableaux comparatifs : scroll horizontal sans casser la cellule */
  .table-wrapper { -webkit-overflow-scrolling: touch; }
  .compare-table { min-width: 480px; }
}
@media (max-width: 480px) {
  .article-hero { padding: 32px 0; }
  .article-body h2 { font-size: 1.08rem; }
  .article-body p { font-size: 0.9rem; }
  .sidebar-price strong { font-size: 1.4rem; }
  .content-list li { font-size: 0.9rem; }
  .content-list--ordered li::before { width: 22px; height: 22px; font-size: 0.68rem; }
}

/* ============================================
   GLOBAL FIXES — titres blancs sur fond bleu foncé
   ============================================ */
.article-hero h1, .article-hero h2, .article-hero h3, .article-hero h4,
.hero h1, .hero h2, .hero h3, .hero-content h1, .hero-content h2, .hero-content h3,
.mutuelle h1, .mutuelle h2, .mutuelle h3,
.cta-card h1, .cta-card h2, .cta-card h3,
.cta-content h1, .cta-content h2, .cta-content h3,
.compare-table thead th { color: var(--white) !important; }

/* ============================================
   LEGACY BLOG POSTS — harmonisation classes
   (les posts utilisent sidebar / cta-block / sidebar-links
   au lieu de article-sidebar / article-cta-block / related-list)
   ============================================ */

/* Wrapper hero (certains posts ont article-hero-content) */
.article-hero-content { width: 100%; }

/* CTA block en fin d'article */
.cta-block {
  background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
  border: 1.5px solid var(--blue-100);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  text-align: center;
  margin: 48px 0 0;
}
.cta-block h2, .cta-block h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--slate-900) !important;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.cta-block p {
  color: var(--slate-600);
  margin-bottom: 20px;
  font-size: 0.95rem;
}
.cta-block .form-note {
  margin-top: 14px;
  margin-bottom: 0;
  font-size: 0.8rem;
  color: var(--slate-500);
}
.cta-block .btn { margin: 4px 0; }

/* Sidebar aside (alias article-sidebar) */
aside.sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (max-width: 1024px) {
  aside.sidebar { position: static; }
}

/* Sidebar links (alias related-list) */
.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-links li { padding: 0; margin: 0; list-style: none; }
.sidebar-links a {
  font-size: 0.85rem;
  color: var(--blue-600);
  transition: color .15s, padding-left .15s;
  display: block;
  padding: 5px 0;
  border-bottom: 1px solid var(--slate-100);
}
.sidebar-links li:last-child a { border-bottom: none; }
.sidebar-links a:hover { color: var(--blue-800); padding-left: 4px; }

/* Key takeaways block (points clés) */
.key-takeaways {
  background: var(--blue-50);
  border-left: 4px solid var(--blue-500);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 0 0 32px;
  font-size: 0.95rem;
  line-height: 1.7;
}
.key-takeaways > strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--blue-700);
  margin-bottom: 10px;
}
.key-takeaways ul { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; list-style: disc; }
.key-takeaways ul li { list-style: disc; color: var(--slate-700); }
.key-takeaways ul li strong { color: var(--slate-900); }

/* FAQ custom (question/réponse) */
.faq-question {
  font-weight: 700;
  font-size: 1rem;
  color: var(--slate-900);
  margin: 28px 0 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}
.faq-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: var(--orange-500);
  color: #fff;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}
.faq-answer {
  color: var(--slate-700);
  font-size: 0.94rem;
  line-height: 1.7;
  margin: 0 0 18px;
  padding-left: 32px;
}

/* Compare cards (cartes comparatives) */
.compare-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.compare-card {
  background: var(--white);
  border: 1.5px solid var(--slate-100);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  transition: box-shadow .2s, border-color .2s;
}
.compare-card:hover { box-shadow: var(--shadow-md); border-color: var(--blue-100); }
.compare-card.featured {
  border-color: var(--orange-500);
  box-shadow: 0 6px 20px rgba(249,115,22,.15);
}
.card-badge {
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--orange-500);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Conseil cards */
.conseil-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 24px 0;
}
.conseil-card {
  background: var(--slate-50);
  border-left: 3px solid var(--orange-500);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--slate-700);
}
.conseil-card strong { color: var(--slate-900); display: block; margin-bottom: 6px; }

/* Tags high/mid/low */
.tag-high, .tag-mid, .tag-low {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tag-high { background: #fee2e2; color: #991b1b; }
.tag-mid  { background: #fef3c7; color: #92400e; }
.tag-low  { background: #dcfce7; color: #166534; }

/* Citations */
.citation-capsule {
  background: var(--slate-50);
  border-left: 3px solid var(--blue-500);
  padding: 16px 20px;
  font-style: italic;
  color: var(--slate-700);
  border-radius: var(--radius-md);
  margin: 20px 0;
  font-size: 0.94rem;
  line-height: 1.65;
}
.citation-source {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
  font-style: normal;
  color: var(--slate-500);
}

/* Highlight block */
.highlight-block {
  background: linear-gradient(135deg, rgba(249,115,22,.08), rgba(249,115,22,.02));
  border: 1px solid rgba(249,115,22,.25);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 24px 0;
  color: var(--slate-800);
  font-size: 0.95rem;
  line-height: 1.7;
}
.highlight-block strong { color: var(--orange-600); }

/* Stats/alerte box */
.sa-box {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  color: #78350f;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin: 20px 0;
  font-size: 0.92rem;
  line-height: 1.65;
}
.sa-box strong { color: #92400e; }

@media (max-width: 768px) {
  .cta-block { padding: 24px 18px; margin-top: 32px; }
  .cta-block h2, .cta-block h3 { font-size: 1.08rem; }
  .key-takeaways { padding: 16px 18px; }
  .faq-answer { padding-left: 0; }
  .faq-question { font-size: 0.95rem; }
  .compare-cards, .conseil-grid { grid-template-columns: 1fr; gap: 14px; }
  .citation-capsule, .highlight-block, .sa-box { padding: 14px 16px; font-size: 0.9rem; }
}

/* ============================================
   GLOBAL FIXES — mobile overflow
   ============================================ */
html, body { overflow-x: hidden; max-width: 100vw; }
@media (max-width: 768px) {
  html, body { overflow-x: hidden !important; }
  body * { max-width: 100%; }
  img, iframe, video, svg { max-width: 100% !important; height: auto; }
  .container { padding-left: 16px !important; padding-right: 16px !important; }
  table { display: block; overflow-x: auto; max-width: 100%; white-space: normal; }
  pre, code { max-width: 100%; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word; }
  .article-hero-inner, .article-layout, .hero-inner, .mutuelle-inner { min-width: 0; }
  .article-body, .article-sidebar, .hero-content { min-width: 0; word-wrap: break-word; }
}

/* ============================================
   KADENCE WRAPPER RESET — mobile (fix content
   shifted left with white space on right on
   /blog/ and other content-style-boxed pages)
   ============================================ */
@media (max-width: 768px) {
  #primary.content-area,
  .content-container.site-container,
  #main.site-main,
  .content-wrap,
  article.entry,
  .entry.single-entry,
  .entry-content-wrap,
  .entry-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  body.content-style-boxed .entry.content-bg,
  body.content-style-boxed article.entry {
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
  }
}
