/*
Theme Name: Investalys
Theme URI: https://investalys.com
Description: Theme enfant Kadence — design éditorial premium pour Investalys (média finance YMYL)
Author: Investalys
Author URI: https://investalys.com
Template: kadence
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: investalys
*/

/* ==== Investalys design system ==== */
:root {
  --iv-encre: #1C1C1C;
  --iv-encre-90: #2A2A2A;
  --iv-encre-60: #5A5A5A;
  --iv-champagne: #B8945F;
  --iv-champagne-clair: #D9B987;
  --iv-champagne-fonce: #9A7C4E;
  --iv-papier: #F5F1EA;
  --iv-papier-pur: #FBF8F3;
  --iv-ligne: #E5DFD3;
  --iv-succes: #3B7A57;
  --iv-alerte: #C75B39;
  --iv-serif: 'Cormorant Garamond', Garamond, Georgia, serif;
  --iv-sans: Inter, system-ui, -apple-system, sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,500&family=Inter:wght@400;500;600;700&display=swap');

/* Base */
html { scroll-behavior: smooth; }
body { background: var(--iv-papier); color: var(--iv-encre); font-family: var(--iv-sans); font-size: 17px; line-height: 1.7; -webkit-font-smoothing: antialiased; }

/* Typography */
h1, h2, h3, h4, .has-serif-font-family { font-family: var(--iv-serif); font-weight: 600; letter-spacing: -0.01em; color: var(--iv-encre); }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2.25rem); line-height: 1.25; margin-top: 2.5rem; }
h3 { font-size: 1.5rem; line-height: 1.35; margin-top: 2rem; }
p { margin-bottom: 1.25rem; }
a { color: var(--iv-champagne-fonce); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s; }
a:hover { color: var(--iv-encre); }

/* Header */
.site-header, .site-branding, header.site-header { background: var(--iv-papier-pur); border-bottom: 1px solid var(--iv-ligne); }
.site-header .site-branding img, .site-logo img { max-height: 56px; width: auto; }
@media (max-width: 768px) { .site-header .site-branding img, .site-logo img { max-height: 40px; } }

/* Hero */
.iv-hero { background: linear-gradient(135deg, var(--iv-papier-pur) 0%, var(--iv-papier) 60%, #EFE7D6 100%); padding: clamp(3rem, 8vw, 7rem) 1.5rem; text-align: center; position: relative; overflow: hidden; }
.iv-hero::before { content: ''; position: absolute; top: -50%; right: -10%; width: 60%; height: 200%; background: radial-gradient(ellipse at center, rgba(184,148,95,.12), transparent 60%); pointer-events: none; }
.iv-hero h1 { max-width: 900px; margin: 0 auto 1rem; font-size: clamp(2.25rem, 5vw + 1rem, 4.5rem); }
.iv-hero .iv-eyebrow { font-family: var(--iv-sans); font-size: .75rem; font-weight: 600; letter-spacing: .25em; text-transform: uppercase; color: var(--iv-champagne-fonce); margin-bottom: 1rem; }
.iv-hero .iv-subtitle { max-width: 720px; margin: 1rem auto 2rem; font-size: clamp(1.05rem, 1.5vw + .5rem, 1.375rem); color: var(--iv-encre-60); line-height: 1.5; }
.iv-cta-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.iv-btn, .wp-block-button__link, .button { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--iv-sans); font-weight: 600; font-size: 0.95rem; letter-spacing: .02em; padding: .85rem 1.6rem; border-radius: 2px; text-decoration: none; transition: all .2s; min-height: 48px; }
.iv-btn-primary, .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: var(--iv-encre); color: var(--iv-papier-pur); border: 1px solid var(--iv-encre); }
.iv-btn-primary:hover { background: var(--iv-champagne-fonce); border-color: var(--iv-champagne-fonce); color: var(--iv-papier-pur); }
.iv-btn-secondary, .is-style-outline .wp-block-button__link { background: transparent; color: var(--iv-encre); border: 1px solid var(--iv-encre); }
.iv-btn-secondary:hover { background: var(--iv-encre); color: var(--iv-papier-pur); }

/* Hub cards */
.iv-hubs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; max-width: 1200px; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) 1.5rem; }
.iv-hub-card { background: var(--iv-papier-pur); border: 1px solid var(--iv-ligne); padding: 2rem 1.5rem; transition: all .25s; text-decoration: none; color: var(--iv-encre); display: flex; flex-direction: column; gap: .75rem; }
.iv-hub-card:hover { transform: translateY(-4px); border-color: var(--iv-champagne); box-shadow: 0 12px 28px rgba(28,28,28,.08); color: var(--iv-encre); }
.iv-hub-card .iv-hub-icon { width: 40px; height: 40px; background: var(--iv-champagne); border-radius: 4px; display: grid; place-items: center; color: var(--iv-papier-pur); font-family: var(--iv-serif); font-size: 1.5rem; font-weight: 600; }
.iv-hub-card h3 { font-size: 1.5rem; margin: 0; }
.iv-hub-card p { font-size: 0.95rem; color: var(--iv-encre-60); margin: 0; }
.iv-hub-card .iv-hub-arrow { font-family: var(--iv-sans); font-size: .8rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--iv-champagne-fonce); margin-top: auto; padding-top: 1rem; }

/* Section: piliers */
.iv-piliers { background: var(--iv-encre); color: var(--iv-papier); padding: clamp(3rem, 6vw, 5rem) 1.5rem; }
.iv-piliers-inner { max-width: 1100px; margin: 0 auto; }
.iv-piliers h2 { color: var(--iv-papier); text-align: center; max-width: 720px; margin: 0 auto 3rem; }
.iv-piliers .iv-pilier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.iv-pilier { padding: 1rem 0; }
.iv-pilier .iv-pilier-num { font-family: var(--iv-serif); font-size: 3rem; line-height: 1; color: var(--iv-champagne-clair); margin-bottom: .75rem; font-weight: 500; }
.iv-pilier h3 { color: var(--iv-papier); font-size: 1.5rem; margin-bottom: .5rem; margin-top: 0; }
.iv-pilier p { color: rgba(245,241,234,.85); font-size: .95rem; line-height: 1.7; }

/* Articles list */
.iv-articles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; max-width: 1200px; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) 1.5rem; }
.iv-article-card { background: var(--iv-papier-pur); border: 1px solid var(--iv-ligne); padding: 1.75rem; display: flex; flex-direction: column; gap: .75rem; transition: all .2s; text-decoration: none; color: var(--iv-encre); }
.iv-article-card:hover { border-color: var(--iv-champagne); transform: translateY(-2px); color: var(--iv-encre); }
.iv-article-card .iv-cat-badge { font-family: var(--iv-sans); font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--iv-champagne-fonce); }
.iv-article-card h3 { font-size: 1.375rem; margin: 0; line-height: 1.3; }
.iv-article-card p { font-size: .95rem; color: var(--iv-encre-60); margin: 0; }
.iv-article-card .iv-article-meta { font-family: var(--iv-sans); font-size: .8rem; color: var(--iv-encre-60); margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--iv-ligne); }

/* Single post */
.entry-content { font-size: 1.0625rem; line-height: 1.75; max-width: 720px; margin: 0 auto; }
.entry-content h2, .entry-content h3 { color: var(--iv-encre); }
.entry-content blockquote { border-left: 3px solid var(--iv-champagne); padding-left: 1.25rem; margin: 1.5rem 0; font-style: italic; color: var(--iv-encre-90); font-family: var(--iv-serif); font-size: 1.25rem; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.entry-content table th { background: var(--iv-encre); color: var(--iv-papier); padding: .75rem; text-align: left; font-weight: 600; font-size: .85rem; letter-spacing: .03em; }
.entry-content table td { padding: .75rem; border-bottom: 1px solid var(--iv-ligne); vertical-align: top; }
.entry-content table tr:nth-child(even) td { background: rgba(184,148,95,.04); }
.entry-content code { background: var(--iv-papier); padding: .15em .4em; border-radius: 2px; font-size: .9em; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.entry-content li { margin-bottom: .5rem; }
.entry-content hr { border: 0; border-top: 1px solid var(--iv-ligne); margin: 2rem 0; }

/* AMF risk box */
.iv-risk-box { background: rgba(199,91,57,.08); border-left: 3px solid var(--iv-alerte); padding: 1rem 1.25rem; margin: 2rem 0; font-size: .9rem; color: var(--iv-encre-90); border-radius: 2px; }

/* Footer */
.site-footer, footer.site-footer, .footer-wrap { background: var(--iv-encre); color: var(--iv-papier); padding: 3rem 1.5rem 2rem; }
.site-footer a { color: var(--iv-champagne-clair); }
.site-footer a:hover { color: var(--iv-papier); }
.site-footer h4 { color: var(--iv-papier); font-family: var(--iv-sans); font-size: .8rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 1rem; }
.iv-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; max-width: 1200px; margin: 0 auto; }
@media (max-width: 768px) { .iv-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .iv-footer-grid { grid-template-columns: 1fr; } }

/* Newsletter */
.iv-newsletter { background: var(--iv-papier-pur); border: 1px solid var(--iv-ligne); padding: clamp(2rem, 5vw, 3.5rem); margin: 3rem auto; max-width: 800px; text-align: center; }
.iv-newsletter h3 { font-size: 2rem; margin: 0 0 .5rem; }
.iv-newsletter p { color: var(--iv-encre-60); margin: 0 0 1.5rem; }
.iv-newsletter form { display: flex; gap: .5rem; max-width: 500px; margin: 0 auto; flex-wrap: wrap; }
.iv-newsletter input[type=email] { flex: 1; min-width: 200px; padding: .85rem 1rem; border: 1px solid var(--iv-ligne); background: white; font-family: var(--iv-sans); font-size: 1rem; min-height: 48px; }
.iv-newsletter input[type=email]:focus { outline: 2px solid var(--iv-champagne); border-color: var(--iv-champagne); }

/* Mobile-first responsive */
@media (max-width: 768px) {
  body { font-size: 16px; }
  .entry-content { padding: 0 1rem; }
  .iv-cta-row { flex-direction: column; align-items: stretch; }
  .iv-cta-row .iv-btn { justify-content: center; }
  .iv-hubs { grid-template-columns: 1fr; }
  .iv-articles-grid { grid-template-columns: 1fr; }
}

/* Touch targets minimum 48x48 */
button, .iv-btn, a.button, input[type=submit] { min-height: 48px; min-width: 48px; }

/* Focus visible WCAG 2.1 */
*:focus-visible { outline: 2px solid var(--iv-champagne); outline-offset: 2px; }

/* Skip to content (a11y) */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--iv-encre); color: var(--iv-papier); padding: 1rem; z-index: 9999; }
.skip-link:focus { left: 0; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* Print */
@media print { .iv-hero, .iv-hubs, .iv-piliers, .site-header, .site-footer { display: none; } body { background: white; color: black; } }

/* ==== QA FIXES BASED ON DESIGN/MOBILE AGENT REPORTS ==== */

/* Hide duplicate H1 from imported markdown if any survives */
.entry-content > h1:first-child { display: none; }

/* Article hero with champagne underline (FT longread feel) */
.entry-title {
  font-family: var(--iv-serif);
  font-weight: 600;
  position: relative;
  padding-bottom: 1.5rem;
  letter-spacing: -0.01em;
}
.entry-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 56px;
  height: 2px;
  background: var(--iv-champagne);
}
.single .entry-hero, .page .entry-hero { background: var(--iv-papier-pur); padding: 3rem 1.5rem 2rem; border-bottom: 1px solid var(--iv-ligne); }

/* Hub icons → serif numerals (cohérence avec piliers) */
.iv-hub-card .iv-hub-icon { display: none; }
.iv-hub-num {
  font-family: var(--iv-serif);
  font-weight: 500;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--iv-champagne-fonce);
  margin-bottom: 0.25rem;
}

/* Tighten hubs spacing & remove dead band after hero */
.iv-hubs { gap: 2rem; padding-top: 0; padding-bottom: clamp(3rem, 6vw, 5rem); }

/* Piliers H2 with hairline */
.iv-piliers h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 1px;
  background: var(--iv-champagne);
  margin: 1.25rem auto 0;
}

/* Newsletter polish */
.iv-newsletter { max-width: 640px; padding-block: clamp(2rem, 4vw, 3.5rem); }
.iv-newsletter h3 { font-size: clamp(1.5rem, 2vw + 1rem, 2rem); letter-spacing: -0.015em; }

/* Entry content : 70ch optimal (FT/Wirecutter sweet spot) */
.entry-content { max-width: 680px; font-size: 1.125rem; line-height: 1.7; padding: 0 1rem; }
@media (min-width: 768px) { .entry-content { padding: 0 1.5rem; } }

/* Footer columns refined */
.iv-footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; padding-top: 1rem; }
.site-footer h4 { color: var(--iv-champagne-clair); }
.iv-footer-menu { list-style: none; padding: 0; margin: 0; }
.iv-footer-menu li { margin-bottom: 0.5rem; }
.iv-footer-menu a { color: var(--iv-papier); text-decoration: none; font-size: 0.875rem; opacity: .8; transition: opacity 0.2s; }
.iv-footer-menu a:hover { opacity: 1; color: var(--iv-champagne-clair); }

/* Article cards : add thumb */
.iv-article-card .iv-article-thumb {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--iv-papier);
  margin: -1.75rem -1.75rem 1rem -1.75rem;
  border-bottom: 1px solid var(--iv-ligne);
}

/* Byline with bullet separator */
.iv-byline { gap: 0; }
.iv-byline span { padding-right: 1rem; position: relative; }
.iv-byline span:not(:last-child)::after {
  content: "·";
  margin-left: 1rem;
  color: var(--iv-champagne-fonce);
  font-weight: 600;
}

/* === MOBILE-FIRST P0 PATCHES === */

/* Tables responsive: scroll horizontal + visual hint */
.entry-content { overflow-wrap: break-word; }
.entry-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}
@media (min-width: 900px) {
  .entry-content table { display: table; white-space: normal; }
}
@media (max-width: 899px) {
  .entry-content table th, .entry-content table td {
    padding: 0.55rem 0.65rem;
    font-size: 0.85rem;
  }
  .entry-content table::before {
    content: "← Faites défiler pour comparer →";
    display: block;
    padding: 0.5rem;
    font-size: 0.75rem;
    color: var(--iv-champagne-fonce);
    text-align: center;
    background: rgba(184,148,95,.06);
    border: 1px solid var(--iv-ligne);
    border-bottom: none;
  }
}

/* Hero H1 plus calm on mobile */
@media (max-width: 600px) {
  .iv-hero h1 { font-size: clamp(2rem, 7vw, 2.5rem); line-height: 1.15; }
  .iv-hero .iv-subtitle { font-size: 1.0625rem; }
}

/* Newsletter form full-width on narrow mobile */
@media (max-width: 520px) {
  .iv-newsletter form { flex-direction: column; }
  .iv-newsletter input[type=email],
  .iv-newsletter .iv-btn { width: 100%; min-width: 0; }
}

/* Tight side gutters under 480px */
@media (max-width: 480px) {
  .iv-hero, .iv-hubs, .iv-articles-grid, .iv-piliers,
  .site-footer, .iv-newsletter { padding-left: 1rem; padding-right: 1rem; }
  .iv-footer-grid { gap: 1.5rem; }
}

/* Mobile entry-content */
@media (max-width: 768px) {
  .entry-content > * { max-width: 100%; }
  .entry-content img, .entry-content figure { width: 100%; height: auto; }
}

/* Clamp hub/article card titles */
.iv-hub-card h3, .iv-pilier h3, .iv-article-card h3 {
  font-size: clamp(1.125rem, 3.5vw, 1.5rem);
}

/* Prevent rogue horizontal scroll */
html, body { overflow-x: hidden; max-width: 100vw; }
img, video, iframe { max-width: 100%; height: auto; }

/* Footer mobile responsive */
@media (max-width: 768px) {
  .iv-footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .iv-footer-grid > div:first-child { grid-column: span 2; }
}
@media (max-width: 480px) {
  .iv-footer-grid { grid-template-columns: 1fr; }
  .iv-footer-grid > div:first-child { grid-column: 1; }
}

/* AMF risk disclosure box (auto-detected) */
.iv-risk-box, blockquote.amf-risque {
  background: rgba(199,91,57,.08);
  border-left: 4px solid var(--iv-alerte);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-size: 0.9rem;
  color: var(--iv-encre-90);
  border-radius: 2px;
  font-style: normal;
  font-family: var(--iv-sans);
}

/* TOC if present */
.iv-toc, .toc, #toc {
  background: var(--iv-papier-pur);
  border: 1px solid var(--iv-ligne);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--iv-sans);
  font-size: 0.9rem;
}

/* Breadcrumbs subtle */
.rank-math-breadcrumb {
  font-family: var(--iv-sans);
  font-size: 0.8rem;
  color: var(--iv-encre-60);
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

/* Author byline polish on single posts */
.author-bio, .iv-author-card {
  background: var(--iv-papier-pur);
  border: 1px solid var(--iv-ligne);
  padding: 1.5rem;
  margin: 3rem 0 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

/* Pagination */
.pagination, .nav-links { font-family: var(--iv-sans); margin: 3rem auto; }

/* Site title hidden if logo (Kadence default visible was redundant) */
.site-title-wrap { display: none; }


/* === TABLE RESPONSIVE V2 - wrapped in scrollable div === */
.entry-content table {
  display: table !important;
  width: 100%;
  max-width: 100%;
  white-space: normal;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
.iv-table-wrap {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border: 1px solid var(--iv-ligne);
  border-radius: 4px;
  background: var(--iv-papier-pur);
}
.iv-table-wrap table { margin: 0 !important; border: none !important; }
.iv-table-wrap::before {
  content: "← Faites défiler pour comparer →";
  display: block;
  padding: 0.4rem 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--iv-champagne-fonce);
  text-align: center;
  background: rgba(184,148,95,.06);
  border-bottom: 1px solid var(--iv-ligne);
}
@media (min-width: 900px) {
  .iv-table-wrap::before { display: none; }
}
@media (max-width: 899px) {
  .iv-table-wrap table { min-width: 700px; font-size: 0.85rem; }
  .iv-table-wrap th, .iv-table-wrap td { padding: 0.55rem 0.65rem; }
}
/* Keep hub thumbnails sized properly */
.iv-article-thumb { width: 100%; min-height: 200px; }

/* Improve byline grid alignment */
.iv-byline span { display: inline-flex; align-items: center; }

/* Better article card hover */
.iv-article-card { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.iv-article-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(28,28,28,.10); }

/* Featured image on single post (entry-hero) */
.single-post .entry-hero { 
  background-size: cover; 
  background-position: center; 
  min-height: 280px;
  position: relative;
}
.single-post .entry-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(28,28,28,.6) 100%);
  pointer-events: none;
}
.single-post .entry-hero .entry-hero-container-inner { position: relative; z-index: 2; }

/* =========================================================
   INVESTALYS — MOBILE AUDIT PATCH 2026-05-06
   Corrige tous les P0 + P1 + bonus P2 premium
   À coller en fin de wp-content/themes/investalys/style.css
   ========================================================= */

/* ---------- P0.1 — Logo dans le header (override Kadence width:200px) ---------- */
@media (max-width: 768px) {
  .site-branding a.brand img,
  .site-logo img,
  .site-branding a.brand img.svg-logo-image,
  .custom-logo.svg-logo-image {
    width: auto !important;
    max-width: 140px !important;
    max-height: 36px !important;
    height: auto !important;
  }
}
@media (max-width: 480px) {
  .site-branding a.brand img.svg-logo-image,
  .custom-logo.svg-logo-image {
    max-width: 120px !important;
    max-height: 32px !important;
  }
}

/* ---------- P0.2 — Hero single-post : moins agressif sur mobile ---------- */
@media (max-width: 768px) {
  .single-post .entry-hero {
    min-height: 200px !important;
    padding: 2.5rem 1rem 1.5rem !important;
  }
}
@media (max-width: 480px) {
  .single-post .entry-hero {
    min-height: 180px !important;
    padding: 2rem 1rem 1.25rem !important;
  }
  .single-post .entry-hero .entry-title {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
    line-height: 1.15 !important;
    padding-bottom: 1rem !important;
  }
  .single-post .entry-hero .entry-title::after { width: 40px !important; }
}

/* ---------- P0.3 — Touch targets footer >= 48px ---------- */
.iv-footer-menu a {
  display: block;
  padding: 0.65rem 0;
  min-height: 44px;
  line-height: 1.4;
}
@media (max-width: 768px) {
  .iv-footer-menu a { padding: 0.85rem 0; min-height: 48px; }
  .iv-footer-menu li { margin-bottom: 0; }
}

/* ---------- P0.4 — Padding double article supprimé ---------- */
@media (max-width: 768px) {
  .entry-content-wrap { padding: 1rem !important; }
  .entry-content { padding: 0 !important; }
}
@media (max-width: 480px) {
  .entry-content-wrap { padding: 0.75rem !important; }
}

/* ---------- P0.5 — Newsletter form column dès 600 px (au lieu de 520) ---------- */
@media (max-width: 600px) {
  .iv-newsletter form { flex-direction: column; gap: 0.75rem; }
  .iv-newsletter input[type=email] { width: 100%; min-width: 0; }
  .iv-newsletter .iv-btn,
  .iv-newsletter button[type="submit"] {
    width: 100%; min-width: 0; justify-content: center;
  }
}

/* ---------- P0.6 — CTA row : boutons full-width sur mobile ---------- */
@media (max-width: 600px) {
  .iv-cta-row { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .iv-cta-row .iv-btn,
  .iv-cta-row .wp-block-button__link {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.25rem;
  }
}

/* ---------- P0.7 — Byline : séparateur custom propre sur 360 px ---------- */
@media (max-width: 480px) {
  .iv-byline { gap: 0.35rem 0.75rem !important; flex-wrap: wrap; }
  .iv-byline span { padding-right: 0; }
  .iv-byline span:not(:last-child)::after {
    margin-left: 0.75rem;
    margin-right: -0.4rem;
  }
}

/* ---------- P0.8 — Overflow-x : clip au lieu de hidden (préserve sticky) ---------- */
html { overflow-x: clip; max-width: none; }
body { overflow-x: clip; max-width: 100%; }

/* ---------- P1.9 — Hero homepage : tighten ---------- */
@media (max-width: 600px) {
  .iv-hero { padding: 2.25rem 1rem 2rem !important; }
  .iv-hero .iv-eyebrow { font-size: 0.7rem; letter-spacing: 0.18em; }
  .iv-hero .iv-subtitle { font-size: 1rem !important; line-height: 1.55; margin: 0.75rem auto 1.5rem; }
}

/* ---------- P1.10 — Hub cards compact ---------- */
@media (max-width: 480px) {
  .iv-hubs { gap: 1rem !important; }
  .iv-hub-card { padding: 1.25rem 1.1rem !important; gap: 0.5rem !important; }
  .iv-hub-num { font-size: 2rem !important; }
}

/* ---------- P1.11 — Piliers compact ---------- */
@media (max-width: 480px) {
  .iv-piliers { padding: 2.5rem 1rem !important; }
  .iv-piliers .iv-pilier-grid { gap: 1.5rem !important; }
  .iv-pilier { padding: 0 !important; }
  .iv-pilier-num { font-size: 2.25rem !important; margin-bottom: 0.4rem !important; }
  .iv-piliers h2 { margin-bottom: 2rem !important; }
}

/* ---------- P1.12 — Thumbs avec aspect-ratio fixe (premium) ---------- */
.iv-article-card .iv-article-thumb {
  aspect-ratio: 16 / 9;
  min-height: 0;
  height: auto;
  margin-top: -1.75rem;
  margin-left: -1.75rem;
  margin-right: -1.75rem;
  margin-bottom: 1rem;
}
@media (max-width: 480px) {
  .iv-article-card .iv-article-thumb { aspect-ratio: 16 / 10; }
}

/* ---------- P1.13 — Hint "Faites défiler" plus visible + ombre de scroll ---------- */
@media (max-width: 899px) {
  .iv-table-wrap::before {
    font-size: 0.75rem !important;
    font-weight: 600;
    padding: 0.6rem 1rem !important;
    color: var(--iv-encre) !important;
    background: var(--iv-papier) !important;
  }
  .iv-table-wrap {
    box-shadow: inset -16px 0 16px -16px rgba(28,28,28,.18);
  }
}

/* ---------- P1.14 — Hover states convertis en :active sur tactile ---------- */
@media (hover: none) {
  .iv-hub-card:hover,
  .iv-article-card:hover { transform: none !important; box-shadow: none !important; }
  .iv-hub-card:active,
  .iv-article-card:active { transform: scale(.99); border-color: var(--iv-champagne); }
  .iv-btn:hover { background: var(--iv-encre); border-color: var(--iv-encre); }
  .iv-btn-primary:active { background: var(--iv-champagne-fonce); border-color: var(--iv-champagne-fonce); }
  .iv-btn-secondary:active { background: var(--iv-encre); color: var(--iv-papier-pur); }
}

/* ---------- P1.15 — Skip-link premium ---------- */
.skip-link:focus {
  left: 1rem !important;
  top: 1rem !important;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.85rem 1.25rem;
  box-shadow: 0 6px 18px rgba(28,28,28,.25);
}

/* ---------- P1.16 — Sections h2 mobile ---------- */
@media (max-width: 600px) {
  .iv-articles-grid > h2 {
    font-size: clamp(1.5rem, 5vw, 1.875rem) !important;
    margin: 0.5rem 0 1.5rem !important;
    padding: 0 0.5rem;
    line-height: 1.2;
  }
}

/* ---------- P1.17 — Body 17 px reste sur mobile (lisibilité FR) ---------- */
@media (max-width: 768px) {
  body { font-size: 17px; line-height: 1.65; }
  .entry-content { font-size: 1.0625rem; line-height: 1.7; }
}

/* ---------- P1.20 — Newsletter compact ---------- */
@media (max-width: 480px) {
  .iv-newsletter { padding: 1.75rem 1rem !important; }
  .iv-newsletter h3 { font-size: 1.4rem !important; line-height: 1.25; }
  .iv-newsletter p { font-size: 0.95rem; }
}

/* ---------- P1.21 — Article cards typo mobile ---------- */
@media (max-width: 480px) {
  .iv-article-card { padding: 1.25rem !important; }
  .iv-article-card .iv-article-thumb { margin: -1.25rem -1.25rem 0.85rem; }
  .iv-article-card h3 { font-size: 1.125rem !important; line-height: 1.25; }
  .iv-article-card p { font-size: 0.9rem; }
  .iv-article-card .iv-article-meta { font-size: 0.75rem; }
}

/* ---------- P2.22 — CTA primary : flèche premium ---------- */
.iv-btn-primary::after {
  content: "→";
  margin-left: 0.4rem;
  transition: transform 0.2s;
}
.iv-btn-primary:hover::after { transform: translateX(3px); }
@media (hover: none) {
  .iv-btn-primary:active::after { transform: translateX(3px); }
}

/* ---------- P2.23 — Letter-spacing tasse mobile ---------- */
@media (max-width: 480px) {
  .iv-hero .iv-eyebrow { letter-spacing: 0.15em; }
  .iv-cat-badge { letter-spacing: 0.12em !important; font-size: 0.65rem !important; }
}

/* ---------- P2.24 — Tables : sticky first column ---------- */
@media (max-width: 899px) {
  .iv-table-wrap th:first-child,
  .iv-table-wrap td:first-child {
    position: sticky;
    left: 0;
    background: var(--iv-papier-pur);
    z-index: 1;
    box-shadow: 1px 0 0 var(--iv-ligne);
  }
  .iv-table-wrap th:first-child { background: var(--iv-encre); z-index: 2; }
  .iv-table-wrap tr:nth-child(even) td:first-child { background: #F0E9DA; }
}

/* ---------- P2.25 — Newsletter focus glow ---------- */
.iv-newsletter input[type=email]:focus {
  box-shadow: 0 0 0 4px rgba(184,148,95,.18);
}

/* ---------- P2.27 — iOS / safe-area-inset (notch) ---------- */
@supports (padding: max(0px)) {
  .iv-hero,
  .iv-hubs,
  .iv-articles-grid,
  .iv-piliers,
  .site-footer,
  .iv-newsletter {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}

/* ---------- P2.28 — Anti-zoom iOS sur inputs (font-size >= 16px) ---------- */
@media (max-width: 768px) {
  input[type=email],
  input[type=text],
  input[type=tel],
  input[type=number],
  textarea,
  select { font-size: 16px !important; }
}

/* FIN DU PATCH MOBILE 2026-05-06 *//* ==== INVESTALYS FEATURES — sommaire sticky, comparator, simulateur ==== */

/* Sommaire sticky table-of-contents */
.iv-toc-sticky {
  position: sticky;
  top: 80px;
  background: var(--iv-papier-pur);
  border: 1px solid var(--iv-ligne);
  border-left: 3px solid var(--iv-vert, #1F4D3E);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  font-family: var(--iv-sans);
  font-size: 0.875rem;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  z-index: 5;
}
.iv-toc-sticky h4 {
  font-family: var(--iv-sans);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--iv-champagne-fonce);
  margin: 0 0 0.75rem 0;
}
.iv-toc-sticky ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: ivtoc;
}
.iv-toc-sticky li {
  counter-increment: ivtoc;
  margin: 0.4rem 0;
  padding-left: 1.75rem;
  position: relative;
  line-height: 1.4;
}
.iv-toc-sticky li::before {
  content: counter(ivtoc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--iv-serif);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--iv-champagne-fonce);
}
.iv-toc-sticky a {
  color: var(--iv-encre);
  text-decoration: none;
  transition: color 0.15s;
}
.iv-toc-sticky a:hover {
  color: var(--iv-vert, #1F4D3E);
}
.iv-toc-sticky a.active {
  color: var(--iv-vert, #1F4D3E);
  font-weight: 600;
}

/* Smaller on mobile, collapsible */
@media (max-width: 900px) {
  .iv-toc-sticky {
    position: static;
    max-height: none;
  }
  .iv-toc-sticky[data-collapsed="true"] ol { display: none; }
  .iv-toc-sticky[data-collapsed="true"] h4::after {
    content: ' ▾';
  }
}

/* Reading progress bar at top */
.iv-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--iv-champagne, #B8945F);
  width: 0;
  z-index: 9999;
  transition: width 0.1s;
}

/* Comparator inline (full width) */
.iv-compare {
  background: var(--iv-papier-pur);
  border: 1px solid var(--iv-ligne);
  border-radius: 4px;
  margin: 2rem 0;
  font-family: var(--iv-sans);
  overflow: hidden;
}
.iv-compare-header {
  background: var(--iv-encre);
  color: var(--iv-papier-pur);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.iv-compare-header h3 {
  margin: 0;
  font-family: var(--iv-serif);
  font-size: 1.25rem;
  color: var(--iv-papier-pur);
}
.iv-compare-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 100px 110px;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--iv-ligne);
  gap: 1rem;
  font-size: 0.95rem;
}
.iv-compare-row:last-child { border-bottom: none; }
.iv-compare-row.head {
  background: var(--iv-vert-pale, #E8F1ED);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--iv-encre);
}
.iv-compare-name { font-weight: 600; }
.iv-compare-name small {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--iv-encre-50);
  margin-top: 0.15rem;
}
.iv-compare-score {
  font-family: var(--iv-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--iv-vert, #1F4D3E);
}
.iv-compare-cta {
  background: var(--iv-encre);
  color: var(--iv-papier-pur);
  padding: 0.5rem 0.85rem;
  border-radius: 2px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  transition: background 0.15s;
  white-space: nowrap;
}
.iv-compare-cta:hover {
  background: var(--iv-vert, #1F4D3E);
  color: var(--iv-papier-pur);
}

@media (max-width: 768px) {
  .iv-compare-row {
    grid-template-columns: 1fr;
    text-align: left;
    padding: 1rem 1.25rem;
  }
  .iv-compare-row.head { display: none; }
  .iv-compare-row > div::before {
    display: block;
    font-size: 0.65rem;
    color: var(--iv-encre-50);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.15rem;
  }
  .iv-compare-row .iv-compare-pea::before { content: 'PEA'; }
  .iv-compare-row .iv-compare-tarif::before { content: 'Tarif'; }
  .iv-compare-row .iv-compare-score::before { content: 'Note Investalys'; }
}

/* Simulateur intérêts composés */
.iv-simulator {
  background: var(--iv-papier-pur);
  border: 1px solid var(--iv-ligne);
  border-radius: 4px;
  padding: 1.5rem;
  margin: 2rem 0;
  font-family: var(--iv-sans);
}
.iv-simulator h3 {
  margin: 0 0 0.5rem 0;
  font-family: var(--iv-serif);
  font-size: 1.25rem;
  color: var(--iv-encre);
}
.iv-simulator p.iv-sim-intro {
  font-size: 0.9rem;
  color: var(--iv-encre-50);
  margin: 0 0 1.25rem 0;
}
.iv-sim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.iv-sim-grid label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--iv-encre);
  margin-bottom: 0.25rem;
}
.iv-sim-grid input[type=number] {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--iv-ligne);
  font-size: 1rem;
  font-family: var(--iv-sans);
  background: var(--iv-blanc);
  border-radius: 2px;
}
.iv-sim-grid input[type=number]:focus {
  outline: 2px solid var(--iv-champagne);
  border-color: var(--iv-champagne);
}
.iv-sim-result {
  background: var(--iv-vert-pale, #E8F1ED);
  border-left: 4px solid var(--iv-vert, #1F4D3E);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}
.iv-sim-result strong {
  font-family: var(--iv-serif);
  font-size: 1.875rem;
  color: var(--iv-vert, #1F4D3E);
  display: block;
  margin-bottom: 0.25rem;
}
.iv-sim-result span {
  font-size: 0.85rem;
  color: var(--iv-encre);
}
@media (max-width: 600px) {
  .iv-sim-grid { grid-template-columns: 1fr; }
}

/* Author bio more polished */
.author-bio {
  background: var(--iv-papier-pur);
  border: 1px solid var(--iv-ligne);
  border-left: 3px solid var(--iv-champagne, #B8945F);
  padding: 1.5rem;
  margin: 3rem 0 1rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
/* ==== INVESTALYS — PIVOT FINANCE-HEROS — 6 mai 2026 ==== */
/* Typo Fraunces (serif moderne dynamique) + Inter */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,800;1,9..144,400;1,9..144,500&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Pivot palette Finance-Héros */
  --iv-vert:           #0F4C3A;        /* vert sapin signature */
  --iv-vert-clair:     #2E8B65;
  --iv-vert-fonce:     #084030;
  --iv-vert-pale:      #E5F1EC;
  --iv-vert-bouton:    #128A65;        /* CTA green like Finance-Héros */
  
  --iv-encre:          #0F1A1F;
  --iv-encre-90:       #1F2A30;
  --iv-encre-70:       #3B4D60;
  --iv-encre-50:       #5C7080;
  --iv-encre-30:       #94A3B0;
  --iv-encre-15:       #C7D0D8;
  --iv-encre-60:       #5C7080;
  
  --iv-papier:         #FAF6EE;
  --iv-papier-pur:     #FFFFFF;
  --iv-blanc:          #FFFFFF;
  --iv-ligne:          #E5DFD3;
  
  --iv-cream:          #FFEDC2;        /* highlight crème (FH key word underline) */
  --iv-cream-clair:    #FFF4D8;
  --iv-cream-fonce:    #F4D89B;
  
  --iv-champagne:      #B8945F;
  --iv-champagne-clair:#D9B987;
  --iv-champagne-fonce:#9A7C4E;
  
  --iv-succes:         #128A65;
  --iv-alerte:         #C75B39;
  --iv-info:           #3B6E8E;
  --iv-erreur:         #B5392C;
  
  --iv-serif:  'Fraunces', 'Cormorant Garamond', Garamond, Georgia, serif;
  --iv-sans:   Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --iv-mono:   ui-monospace, 'SF Mono', Menlo, Monaco, monospace;
}

/* Body */
body {
  background: var(--iv-papier-pur);
  color: var(--iv-encre);
  font-family: var(--iv-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Top color gradient bar (signature Finance-Héros) */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #FF8E3C 0%, #FFC857 25%, #128A65 50%, #6FB1E5 75%, #F072AC 100%);
  z-index: 10000;
  pointer-events: none;
}

/* Headings — Fraunces with optical size */
h1, h2, h3, h4, .has-serif-font-family {
  font-family: var(--iv-serif);
  font-weight: 600;
  font-variation-settings: "opsz" 100, "SOFT" 50;
  letter-spacing: -0.015em;
  color: var(--iv-encre);
  line-height: 1.15;
}
h1 {
  font-size: clamp(2.25rem, 4vw + 1rem, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
h2 {
  font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2.25rem);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
h3 {
  font-size: clamp(1.25rem, 1.5vw + 0.5rem, 1.625rem);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

/* Cream highlight on key words (Finance-Héros signature) */
.iv-highlight {
  background: linear-gradient(180deg, transparent 0%, transparent 55%, var(--iv-cream) 55%, var(--iv-cream) 95%, transparent 95%);
  padding: 0 0.1em;
}

/* Body paragraphs */
p {
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  color: var(--iv-encre-90);
}

/* Links — vert sapin */
a, .entry-content a {
  color: var(--iv-vert);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .15s;
}
a:hover, .entry-content a:hover {
  color: var(--iv-vert-bouton);
}

/* Header */
.site-header, .site-branding, header.site-header {
  background: var(--iv-papier-pur);
  border-bottom: 1px solid var(--iv-ligne);
}
.site-header .site-branding img, .site-logo img {
  max-height: 48px;
  width: auto;
  max-width: 200px;
}
@media (max-width: 768px) {
  .site-header .site-branding img, .site-logo img { max-height: 36px; max-width: 140px; }
}

/* CTAs : style Finance-Héros — vert plein arrondi */
.iv-btn,
.wp-block-button__link,
.button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--iv-sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: .01em;
  padding: 0.85rem 1.6rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all .2s ease;
  min-height: 48px;
  cursor: pointer;
  border: 1px solid transparent;
}
.iv-btn-primary,
.wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background: var(--iv-vert-bouton);
  color: var(--iv-blanc);
  border-color: var(--iv-vert-bouton);
}
.iv-btn-primary:hover {
  background: var(--iv-vert-fonce);
  border-color: var(--iv-vert-fonce);
  color: var(--iv-blanc);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15,76,58,.18);
}
.iv-btn-secondary,
.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--iv-encre);
  border-color: var(--iv-encre);
}
.iv-btn-secondary:hover {
  background: var(--iv-encre);
  color: var(--iv-blanc);
}

/* Hero */
.iv-hero {
  background: 
    radial-gradient(circle at 100% 0%, rgba(255,237,194,.4), transparent 50%),
    linear-gradient(135deg, var(--iv-papier-pur) 0%, var(--iv-papier) 100%);
  padding: clamp(3rem, 8vw, 6rem) 1.5rem;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.iv-hero h1 {
  max-width: 880px;
  margin: 0 auto 1rem;
  font-size: clamp(2.25rem, 5vw + 1rem, 4.5rem);
  font-weight: 700;
  text-align: center;
}
.iv-hero .iv-eyebrow {
  font-family: var(--iv-sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--iv-vert);
  margin-bottom: 1rem;
  text-align: center;
  display: block;
}
.iv-hero .iv-subtitle {
  max-width: 720px;
  margin: 1rem auto 2rem;
  font-size: clamp(1.05rem, 1.2vw + .5rem, 1.25rem);
  color: var(--iv-encre-90);
  line-height: 1.55;
  text-align: center;
  font-weight: 400;
}
.iv-cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hub cards — modern Finance-Héros style */
.iv-hubs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 4rem) 1.5rem;
}
.iv-hub-card {
  background: var(--iv-papier-pur);
  border: 1px solid var(--iv-ligne);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  transition: all .25s ease;
  text-decoration: none;
  color: var(--iv-encre);
  display: flex;
  flex-direction: column;
  gap: .75rem;
  position: relative;
  overflow: hidden;
}
.iv-hub-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 80%, rgba(15,76,58,.04) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
}
.iv-hub-card:hover {
  transform: translateY(-4px);
  border-color: var(--iv-vert);
  box-shadow: 0 12px 28px rgba(15,76,58,.10);
  color: var(--iv-encre);
}
.iv-hub-card:hover::before { opacity: 1; }
.iv-hub-card .iv-hub-num {
  font-family: var(--iv-serif);
  font-weight: 600;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--iv-vert);
  margin-bottom: 0.25rem;
}
.iv-hub-card h3 {
  font-size: 1.375rem;
  margin: 0;
  letter-spacing: -0.01em;
}
.iv-hub-card p {
  font-size: 0.92rem;
  color: var(--iv-encre-50);
  margin: 0;
  line-height: 1.5;
}
.iv-hub-card .iv-hub-arrow {
  font-family: var(--iv-sans);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--iv-vert);
  margin-top: auto;
  padding-top: 1rem;
}

/* Piliers section (engagements) — fond vert sapin */
.iv-piliers {
  background: var(--iv-vert);
  color: var(--iv-papier-pur);
  padding: clamp(3rem, 6vw, 5rem) 1.5rem;
}
.iv-piliers-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.iv-piliers h2 {
  color: var(--iv-papier-pur);
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}
.iv-piliers h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  background: var(--iv-cream);
  margin: 1.25rem auto 0;
}
.iv-piliers .iv-pilier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
.iv-pilier { padding: 1rem 0; }
.iv-pilier .iv-pilier-num {
  font-family: var(--iv-serif);
  font-size: 3rem;
  line-height: 1;
  color: var(--iv-cream);
  margin-bottom: .75rem;
  font-weight: 600;
}
.iv-pilier h3 {
  color: var(--iv-papier-pur);
  font-size: 1.5rem;
  margin: 0 0 .5rem;
}
.iv-pilier p {
  color: rgba(255,255,255,.85);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Articles grid */
.iv-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 4rem) 1.5rem;
}
.iv-article-card {
  background: var(--iv-papier-pur);
  border: 1px solid var(--iv-ligne);
  border-radius: 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: all .25s ease;
  text-decoration: none;
  color: var(--iv-encre);
  overflow: hidden;
}
.iv-article-card:hover {
  border-color: var(--iv-vert);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15,76,58,.10);
  color: var(--iv-encre);
}
.iv-article-card .iv-article-thumb {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: var(--iv-vert-pale);
  border-bottom: 1px solid var(--iv-ligne);
  margin: 0;
}
.iv-article-card > *:not(.iv-article-thumb) { padding-left: 1.5rem; padding-right: 1.5rem; }
.iv-article-card > *:nth-child(2) { padding-top: 1.25rem; }
.iv-article-card > *:last-child { padding-bottom: 1.5rem; }
.iv-article-card .iv-cat-badge {
  font-family: var(--iv-sans);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--iv-vert);
  display: block;
  margin-top: 0.25rem;
}
.iv-article-card h3 {
  font-size: 1.25rem;
  margin: 0.5rem 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.iv-article-card p {
  font-size: 0.92rem;
  color: var(--iv-encre-50);
  margin: 0 0 0.75rem;
  line-height: 1.55;
}
.iv-article-card .iv-article-meta {
  font-family: var(--iv-sans);
  font-size: .75rem;
  color: var(--iv-encre-30);
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--iv-ligne);
  margin-left: 1.5rem;
  margin-right: 1.5rem;
  padding-left: 0;
  padding-right: 0;
}

/* Newsletter */
.iv-newsletter {
  background: var(--iv-vert);
  color: var(--iv-papier-pur);
  border: none;
  padding: clamp(2rem, 5vw, 3.5rem);
  margin: 3rem auto;
  max-width: 800px;
  text-align: center;
  border-radius: 8px;
}
.iv-newsletter h3 {
  color: var(--iv-papier-pur);
  font-size: 1.875rem;
  margin: 0 0 .5rem;
}
.iv-newsletter p {
  color: rgba(255,255,255,.85);
  margin: 0 0 1.5rem;
}
.iv-newsletter form {
  display: flex;
  gap: .5rem;
  max-width: 500px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.iv-newsletter input[type=email] {
  flex: 1;
  min-width: 200px;
  padding: .85rem 1rem;
  border: none;
  background: var(--iv-papier-pur);
  font-family: var(--iv-sans);
  font-size: 1rem;
  min-height: 48px;
  border-radius: 4px;
}
.iv-newsletter .iv-btn {
  background: var(--iv-cream);
  color: var(--iv-vert);
  border: none;
  font-weight: 700;
}
.iv-newsletter .iv-btn:hover {
  background: var(--iv-cream-fonce);
  color: var(--iv-vert-fonce);
}
.iv-newsletter a { color: var(--iv-cream); }

/* Article entry-content polish */
.entry-content {
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--iv-sans);
  color: var(--iv-encre-90);
  padding: 0 1rem;
}
.entry-content h2,
.entry-content h3 {
  color: var(--iv-encre);
  font-family: var(--iv-serif);
}
.entry-content blockquote {
  border-left: 4px solid var(--iv-vert);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--iv-encre-90);
  font-family: var(--iv-serif);
  font-size: 1.25rem;
  line-height: 1.5;
}
.entry-content table th {
  background: var(--iv-vert);
  color: var(--iv-papier-pur);
}
.entry-content table tr:nth-child(even) td {
  background: var(--iv-vert-pale);
}

/* Article hero (single post entry-hero) */
.single-post .entry-hero {
  background-color: var(--iv-papier-pur);
  border-bottom: 1px solid var(--iv-ligne);
  padding: 2.5rem 1.5rem 2rem;
}
.single-post .entry-title {
  font-family: var(--iv-serif);
  font-weight: 700;
  font-size: clamp(2rem, 3.5vw + 1rem, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-bottom: 1.25rem;
}
.single-post .entry-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  background: var(--iv-vert);
  margin: 1.25rem auto 0;
}

/* Risk box */
.iv-risk-box {
  background: rgba(199,91,57,.08);
  border-left: 4px solid var(--iv-alerte);
  color: var(--iv-encre-90);
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
}

/* Author bio */
.author-bio {
  background: var(--iv-vert-pale);
  border: 1px solid var(--iv-vert);
  border-left-width: 4px;
  padding: 1.5rem;
  margin: 3rem 0 1rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  border-radius: 4px;
}
.author-bio > div:first-child {
  background: var(--iv-vert) !important;
}

/* Footer 8-column mega — Finance-Héros style */
.site-footer,
footer.site-footer,
.footer-wrap {
  background: var(--iv-vert-fonce);
  color: var(--iv-papier-pur);
  padding: 3.5rem 1.5rem 2rem;
}
.iv-footer-mega {
  max-width: 1280px;
  margin: 0 auto;
}
.iv-footer-mega-brand {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.iv-footer-mega-brand h3 {
  font-family: var(--iv-serif);
  color: var(--iv-papier-pur);
  font-size: 1.75rem;
  margin: 0 0 0.25rem;
  font-weight: 700;
}
.iv-footer-mega-brand p {
  color: rgba(255,255,255,.7);
  font-size: 0.95rem;
  margin: 0;
}
.iv-footer-mega-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2.5rem;
}
.iv-footer-mega-col h4 {
  color: var(--iv-cream);
  font-family: var(--iv-sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 1rem;
}
.iv-footer-mega-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.iv-footer-mega-col li {
  margin: 0 0 0.65rem;
  font-size: 0.875rem;
}
.iv-footer-mega-col a {
  color: var(--iv-papier-pur);
  text-decoration: none;
  opacity: 0.82;
  transition: opacity .15s, color .15s;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}
.iv-footer-mega-col a:hover {
  opacity: 1;
  color: var(--iv-cream);
}
.iv-footer-mega-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,.6);
}
.iv-footer-mega-bottom a { color: rgba(255,255,255,.6); }
.iv-footer-mega-bottom a:hover { color: var(--iv-cream); }
.iv-footer-mega-disclaimer {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,.45);
  line-height: 1.5;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

@media (max-width: 1080px) {
  .iv-footer-mega-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}
@media (max-width: 720px) {
  .iv-footer-mega-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}
@media (max-width: 480px) {
  .iv-footer-mega-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* Hide old footer stuff */
.site-footer .iv-footer-grid:not(.iv-footer-mega-grid) { display: none; }

/* Highlights & emphasis (FH style) */
strong { color: var(--iv-encre); font-weight: 700; }
em { font-style: italic; }
mark, .iv-highlight {
  background: linear-gradient(180deg, transparent 0%, transparent 55%, var(--iv-cream) 55%, var(--iv-cream) 95%, transparent 95%);
  padding: 0 0.15em;
  color: inherit;
}

/* Reading progress bar (champagne replaced by vert) */
.iv-progress-bar { background: var(--iv-vert); }

/* Toc sticky border vert */
.iv-toc-sticky {
  border-left-color: var(--iv-vert);
}
.iv-toc-sticky h4 { color: var(--iv-vert); }
.iv-toc-sticky a.active { color: var(--iv-vert); }
.iv-toc-sticky li::before { color: var(--iv-vert); }

/* Site title color */
.site-title-wrap p.site-title {
  font-family: var(--iv-serif);
  color: var(--iv-encre);
  font-weight: 700;
}

/* Eyebrow */
.iv-eyebrow {
  color: var(--iv-vert);
}

/* Theme color update */
/* ==== INVESTALYS — patch H1 hero plus gros + footer mobile 2 colonnes (6 mai 2026) ==== */

/* H1 hero MUCH bigger (Finance-Héros parity) */
.iv-hero h1 {
  font-size: clamp(2.75rem, 9vw + 1rem, 6rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.025em;
  max-width: 950px;
}

/* Mobile : H1 still impactful */
@media (max-width: 480px) {
  .iv-hero h1 {
    font-size: clamp(2.5rem, 11vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
  }
  .iv-hero {
    padding: 2.5rem 1.25rem 3rem;
  }
  .iv-hero .iv-subtitle {
    font-size: 1rem;
    line-height: 1.5;
  }
}

/* Footer mobile : 2 colonnes côte-à-côte (style FH), pas 1 */
@media (max-width: 1080px) {
  .iv-footer-mega-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}
@media (max-width: 720px) {
  .iv-footer-mega-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; }
}
@media (max-width: 480px) {
  /* Restent 2 colonnes même sur petit mobile */
  .iv-footer-mega-grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 2rem 1.25rem;
  }
  .iv-footer-mega-col {
    min-width: 0;
  }
  .iv-footer-mega-col h4 {
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    margin-bottom: 0.75rem;
  }
  .iv-footer-mega-col li {
    font-size: 0.825rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
  }
  .iv-footer-mega-col a {
    word-break: break-word;
    display: inline-block;
  }
  .iv-footer-mega-brand h3 {
    font-size: 1.5rem;
    text-align: center;
  }
  .iv-footer-mega-brand p {
    text-align: center;
    font-size: 0.875rem;
  }
  .iv-footer-mega-brand {
    text-align: center;
  }
  .iv-footer-mega-bottom {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 0.5rem;
  }
  .iv-footer-mega-disclaimer {
    font-size: 0.7rem;
    line-height: 1.45;
  }
  .site-footer, footer.site-footer, .footer-wrap {
    padding: 2.5rem 1rem 1.5rem;
  }
}

/* Force two-column on very narrow (320-360px) — last resort */
@media (max-width: 360px) {
  .iv-footer-mega-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
  }
  .iv-footer-mega-col li {
    font-size: 0.78rem;
  }
}

/* Also: highlight on H1 keyword in serif italic (FH style underline) */
.iv-hero h1 em,
.iv-hero h1 .iv-highlight {
  font-style: italic;
  font-weight: 600;
  background: linear-gradient(180deg, transparent 0%, transparent 60%, var(--iv-cream) 60%, var(--iv-cream) 95%, transparent 95%);
  padding: 0 0.1em;
  display: inline-block;
}

/* Subtitle slightly bigger on desktop */
@media (min-width: 768px) {
  .iv-hero .iv-subtitle {
    font-size: 1.25rem;
    line-height: 1.55;
    max-width: 640px;
  }
}
/* ==== INVESTALYS — Mega-menu desktop + accordéon mobile (style Finance-Héros) ==== */

/* Reset menu container */
.iv-mega-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
  align-items: stretch;
}

.iv-mega-item {
  position: relative;
  margin: 0;
  padding: 0;
}

.iv-mega-link {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1rem;
  font-family: var(--iv-sans);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--iv-encre);
  text-decoration: none;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: color .15s;
  border: none;
  background: transparent;
  position: relative;
}
.iv-mega-link::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.4rem;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform .15s;
  opacity: .55;
}
.iv-mega-item:hover .iv-mega-link,
.iv-mega-item.open .iv-mega-link {
  color: var(--iv-vert);
}
.iv-mega-item.open .iv-mega-link::after {
  transform: rotate(180deg);
  opacity: 1;
}
.iv-mega-link:focus-visible {
  outline: 2px solid var(--iv-vert);
  outline-offset: -2px;
}

/* Underline indicator */
.iv-mega-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--iv-vert);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.iv-mega-item:hover .iv-mega-link::before,
.iv-mega-item.open .iv-mega-link::before {
  transform: scaleX(1);
}

/* Mega dropdown */
.iv-mega-dd {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 720px;
  max-width: 1100px;
  background: var(--iv-papier-pur);
  border: 1px solid var(--iv-ligne);
  border-radius: 8px;
  box-shadow: 0 24px 48px rgba(15,26,31,.12), 0 4px 12px rgba(15,26,31,.06);
  padding: 1.5rem 1.75rem 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s, transform .2s, visibility 0s .2s;
  z-index: 1000;
}
.iv-mega-item.open .iv-mega-dd {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity .2s, transform .2s, visibility 0s;
}

.iv-mega-dd-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2.5rem;
}

.iv-mega-col h4 {
  font-family: var(--iv-sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--iv-vert);
  margin: 0 0 0.85rem;
}

.iv-mega-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.iv-mega-col li {
  margin: 0 0 0.5rem;
}

.iv-mega-col a {
  display: block;
  font-size: 0.92rem;
  color: var(--iv-encre);
  text-decoration: none;
  padding: 0.15rem 0;
  line-height: 1.4;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.iv-mega-col a:hover {
  color: var(--iv-vert);
  border-bottom-color: var(--iv-vert);
}

.iv-mega-foot {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--iv-ligne);
}
.iv-mega-foot a {
  font-family: var(--iv-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--iv-vert);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.iv-mega-foot a:hover {
  color: var(--iv-vert-fonce);
  text-decoration: underline;
}

/* Specific dropdown alignment for items near the right */
.iv-mega-menu .iv-mega-item:nth-last-child(-n+2) .iv-mega-dd {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(8px);
}
.iv-mega-menu .iv-mega-item:nth-last-child(-n+2).open .iv-mega-dd {
  transform: translateX(0) translateY(0);
}

/* === Tablette : 2 colonnes dans le dropdown === */
@media (max-width: 1024px) {
  .iv-mega-dd { min-width: 600px; }
  .iv-mega-dd-inner { grid-template-columns: repeat(2, 1fr); }
}

/* === Mobile : transformation en accordion dans le drawer Kadence === */
@media (max-width: 920px) {
  /* Hide the desktop nav, the Kadence drawer takes over */
  #site-navigation .iv-mega-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  
  .iv-mega-item {
    width: 100%;
    border-bottom: 1px solid var(--iv-ligne);
  }
  
  .iv-mega-link {
    width: 100%;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    font-size: 1.0625rem;
    font-weight: 600;
  }
  
  .iv-mega-dd {
    position: static;
    min-width: 0;
    max-width: 100%;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0 1.25rem 1rem;
    background: var(--iv-papier);
    /* Hidden by default */
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    transition: max-height .3s ease, padding .3s ease;
  }
  
  .iv-mega-item.open .iv-mega-dd {
    max-height: 2000px;
    pointer-events: auto;
    padding: 0.5rem 1.25rem 1.5rem;
    transform: none;
  }
  
  .iv-mega-dd-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .iv-mega-col h4 {
    margin-top: 0.75rem;
    font-size: 0.65rem;
  }
  
  .iv-mega-col li { margin-bottom: 0.4rem; }
  
  .iv-mega-col a {
    font-size: 0.95rem;
    padding: 0.4rem 0;
  }
}

/* Always : mobile drawer Kadence — strech the menu */
.mobile-drawer-content #site-navigation,
.mobile-drawer-content .iv-mega-menu {
  width: 100%;
}

/* Drawer header polish */
.drawer-header {
  border-bottom: 1px solid var(--iv-ligne);
}
/* Footer 6 cols (added Crypto) */
.iv-footer-mega-grid {
  grid-template-columns: repeat(6, 1fr);
  gap: 2rem;
}
@media (max-width: 1280px) {
  .iv-footer-mega-grid { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
}
@media (max-width: 1080px) {
  .iv-footer-mega-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}
@media (max-width: 720px) {
  .iv-footer-mega-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; }
}
@media (max-width: 480px) {
  .iv-footer-mega-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.25rem; }
}
@media (max-width: 360px) {
  .iv-footer-mega-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
}
/* ==== INVESTALYS — Logo header HEIGHT FIXED (not max-height) — 6 mai 2026 ==== */
/* PROBLEM: max-width was constraining height before max-height could apply (SVG ratio 4:1)
   FIX: use fixed `height` so width scales freely via natural aspect ratio */

/* All viewports default */
.site-header .site-branding img,
.site-header .mobile-site-branding img,
.site-logo img,
.custom-logo,
.svg-logo-image,
.brand img,
a.brand img {
  height: 96px !important;
  max-height: none !important;
  width: auto !important;
  max-width: none !important;
}

/* Tablette (≤ 1024px) */
@media (max-width: 1024px) {
  .site-header .site-branding img,
  .site-header .mobile-site-branding img,
  .site-logo img,
  .custom-logo,
  .svg-logo-image,
  .brand img,
  a.brand img {
    height: 84px !important;
  }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
  .site-header .site-branding img,
  .site-header .mobile-site-branding img,
  .site-logo img,
  .custom-logo,
  .svg-logo-image,
  .brand img,
  a.brand img {
    height: 76px !important;
  }
}

/* Mobile portrait (≤ 480px) */
@media (max-width: 480px) {
  .site-header .site-branding img,
  .site-header .mobile-site-branding img,
  .site-logo img,
  .custom-logo,
  .svg-logo-image,
  .brand img,
  a.brand img {
    height: 68px !important;
  }
}

/* Très petit (≤ 360px) */
@media (max-width: 360px) {
  .site-header .site-branding img,
  .site-header .mobile-site-branding img,
  .site-logo img,
  .custom-logo,
  .svg-logo-image,
  .brand img,
  a.brand img {
    height: 60px !important;
  }
}

/* Make sure the parent containers don't truncate */
.site-header .site-branding,
.site-header .mobile-site-branding,
.brand,
a.brand {
  display: flex !important;
  align-items: center !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Remove any aspect-ratio crushing */
.site-header img.custom-logo,
.site-header img.svg-logo-image {
  object-fit: contain !important;
  display: block !important;
}

/* Header padding for breathing room mobile */
@media (max-width: 768px) {
  #mobile-header .site-main-header-wrap,
  .site-mobile-header-wrap .site-header-row {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    min-height: 88px !important;
  }
}
/* ==== INVESTALYS — Page "Tous nos articles" avec icônes catégorie ==== */

.iv-articles-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Icon row */
.iv-cat-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
  margin: 0 auto 3rem;
  padding: 0;
  max-width: 1100px;
}

.iv-cat-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--iv-encre-50);
  transition: color .2s;
  font-family: var(--iv-sans);
  min-width: 80px;
  min-height: 88px;
}
.iv-cat-icon:hover { color: var(--iv-vert); }
.iv-cat-icon.active { color: var(--iv-vert); }

.iv-cat-icon-svg {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
}
.iv-cat-icon-svg svg {
  width: 100%;
  height: 100%;
}
.iv-cat-icon-label {
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0;
}
.iv-cat-icon.active .iv-cat-icon-label {
  font-weight: 700;
}
.iv-cat-icon.active .iv-cat-icon-svg {
  position: relative;
}
.iv-cat-icon.active .iv-cat-icon-svg::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--iv-vert);
}

/* Pane */
.iv-cat-pane {
  margin-bottom: 3rem;
}
.iv-cat-pane.hidden { display: none; }

/* Hero band */
.iv-cat-hero {
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  height: 280px;
  display: grid;
  place-items: center;
  margin: 0 auto 2.5rem;
  position: relative;
  overflow: hidden;
}
.iv-cat-hero h2 {
  font-family: var(--iv-serif);
  font-size: clamp(2.25rem, 4vw + 1rem, 4rem);
  color: var(--iv-papier-pur);
  margin: 0;
  text-align: center;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Cards grid */
.iv-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.iv-cat-card {
  background: var(--iv-papier-pur);
  border: 1px solid var(--iv-ligne);
  border-radius: 8px;
  text-decoration: none;
  color: var(--iv-encre);
  display: flex;
  flex-direction: column;
  transition: all .25s ease;
  overflow: hidden;
}
.iv-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15,76,58,.10);
  border-color: var(--iv-vert);
  color: var(--iv-encre);
}
.iv-cat-card-thumb {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--iv-vert-pale);
  border-bottom: 1px solid var(--iv-ligne);
}
.iv-cat-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}
.iv-cat-card-body h3 {
  font-family: var(--iv-serif);
  font-size: 1.375rem;
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--iv-encre);
  font-weight: 700;
}
.iv-cat-card-body p {
  font-size: 0.92rem;
  color: var(--iv-encre-60);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}
.iv-cat-card-link {
  font-family: var(--iv-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--iv-vert);
  margin-top: auto;
  padding-top: 0.5rem;
}

/* Mobile */
@media (max-width: 768px) {
  .iv-cat-icons { gap: 0.25rem 0.5rem; }
  .iv-cat-icon { padding: 0.4rem 0.5rem; min-width: 70px; }
  .iv-cat-icon-svg { width: 44px; height: 44px; }
  .iv-cat-icon-label { font-size: 0.75rem; }
  .iv-cat-hero { height: 200px; border-radius: 6px; }
}
@media (max-width: 480px) {
  .iv-cat-icons { gap: 0.2rem; }
  .iv-cat-icon { min-width: 64px; padding: 0.35rem 0.3rem; }
  .iv-cat-icon-svg { width: 36px; height: 36px; }
  .iv-cat-icon-label { font-size: 0.7rem; }
  .iv-cat-hero { height: 160px; }
}

/* JS toggle visual */
.iv-cat-pane:not(.hidden) {
  animation: iv-fade-in .35s ease;
}
@keyframes iv-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
/* ==== INVESTALYS — Grid 3 cols stricte + icônes raffinées ==== */

/* Article grid : 3 colonnes desktop fixes (2 rows of 3 = 6 articles, parfait) */
.iv-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .iv-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
}

@media (max-width: 600px) {
  .iv-cat-grid { grid-template-columns: 1fr; gap: 1rem; }
}

/* Article cards: equal heights flex */
.iv-cat-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.iv-cat-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* === Refined icon styling === */
.iv-cat-icon-svg {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  transition: background .25s, transform .25s;
}

.iv-cat-icon-svg svg {
  width: 80%;
  height: 80%;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.iv-cat-icon:hover .iv-cat-icon-svg {
  transform: translateY(-2px);
}
.iv-cat-icon:hover .iv-cat-icon-svg {
  background: rgba(15,76,58,0.05);
}

.iv-cat-icon.active .iv-cat-icon-svg {
  background: var(--iv-vert-pale, rgba(15,76,58,0.08));
}

/* Highlight bar UNDER the active icon (re-defined cleanly) */
.iv-cat-icon.active .iv-cat-icon-svg::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 2px;
  background: var(--iv-vert);
  border-radius: 1px;
}

/* Spacing between icons on desktop more breathable */
.iv-cat-icons {
  gap: 0.5rem 1.25rem;
}

/* Mobile: icons smaller and tight */
@media (max-width: 768px) {
  .iv-cat-icon-svg { width: 52px; height: 52px; }
  .iv-cat-icons { gap: 0.25rem 0.5rem; }
}

@media (max-width: 480px) {
  .iv-cat-icon-svg { width: 44px; height: 44px; }
  .iv-cat-icon { padding: 0.4rem 0.4rem; min-width: 64px; }
}
