/* RenovaSol Blog — extends the homepage stylesheet (src/style/style.css).        */
/* style.css is loaded first and brings: tokens, top_bar, nav_cointainer, footer, */
/* whatsapp_widget, button_eligible, mobile menu, etc. This file only styles      */
/* blog-specific content (cards, article body, FAQ, breadcrumb, CTAs).            */

:root {
  --vert-principal: #2eb66e;
  --vert-clair: #a0e095;
  --vert-deep: #259c5c;
  --vert-darker: #1e8a4e;
  --bleu-vert-fonce: #0c2d36;
  --bleu-vert-fonce-2: #0e3a45;
  --blanc: #ffffff;
  --bg-soft: #f7f9f8;
  --gris-texte: #6c6c6c;
  --gris-fonce: #333;
  --gris-titre: #111;
  --container: 1200px;
  --reading: 760px;
  --ease-out: cubic-bezier(0.165, 0.84, 0.44, 1);
  --shadow-soft: 0 4px 24px rgba(12, 45, 54, 0.07);
  --shadow-soft-hover: 0 16px 40px rgba(12, 45, 54, 0.14);
  --shadow-green: 0 8px 25px rgba(46, 182, 110, 0.35);
}

/* ──────────── layout offset (clear fixed nav from style.css) ──────────── */

main#content {
  max-width: var(--container);
  margin: 0 auto;
  padding: calc(var(--top-bar-height, 44px) + var(--nav-height, 80px) + 36px) 50px 120px;
  font-family: "Urbanist", Arial, sans-serif;
  color: var(--gris-titre);
}
@media (max-width: 768px) {
  main#content { padding: calc(var(--top-bar-height, 44px) + var(--nav-height, 80px) + 24px) 20px 120px; }
}

/* ──────────── hero (home) ──────────── */

.blog-hero { display: flex; flex-direction: column; gap: 22px; padding: 8px 0 48px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--vert-deep);
  background: rgba(46, 182, 110, 0.12);
  padding: 8px 16px; border-radius: 25px;
  align-self: flex-start;
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--vert-principal); box-shadow: 0 0 0 4px rgba(46, 182, 110, 0.2);
}
.blog-hero h1 {
  font-size: clamp(40px, 6vw, 64px); line-height: 1.05;
  font-weight: 800; margin: 0; color: var(--gris-titre); letter-spacing: -0.02em;
}
.blog-hero h1 .accent {
  background: linear-gradient(135deg, var(--vert-principal), var(--vert-clair));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.blog-hero p {
  font-size: clamp(18px, 1.8vw, 22px); color: var(--gris-texte);
  max-width: 720px; margin: 0; line-height: 1.5;
}

/* ──────────── category pills ──────────── */

.categories-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 48px; }
.categories-nav a {
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--gris-fonce);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: transform .25s var(--ease-out), background .25s ease, color .25s ease, box-shadow .25s ease;
}
.categories-nav a:hover {
  background: var(--vert-principal); color: #fff;
  transform: translateY(-2px); box-shadow: var(--shadow-green);
  border-color: transparent;
}

/* ──────────── article grid ──────────── */

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.article-grid--home { grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 860px) {
  .article-grid--home { grid-template-columns: 1fr 1fr; }
  .article-grid--home .card.feature { grid-column: 1 / -1; }
  .article-grid--home .card.feature > a {
    display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
    height: 100%;
  }
  .article-grid--home .card.feature .card-media { aspect-ratio: auto; min-height: 360px; }
  .article-grid--home .card.feature .card-body { padding: 44px 48px; gap: 16px; }
  .article-grid--home .card.feature h2 { font-size: 30px; }
  .article-grid--home .card.feature p { font-size: 17px; -webkit-line-clamp: 4; line-clamp: 4; }
}

.card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft-hover); border-color: rgba(46, 182, 110, 0.25); }
.card > a { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card-media {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: linear-gradient(135deg, #eaf6ef 0%, #f7f9f8 100%);
  position: relative;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease-out); }
.card:hover .card-media img { transform: scale(1.04); }
.card-media.empty::after {
  content: ""; position: absolute; inset: 0;
  background: url("/src/img/logo-vert.png") center / 120px no-repeat;
  opacity: .15;
}
.card-body {
  padding: 24px 26px 26px;
  display: flex; flex-direction: column; gap: 12px; flex: 1;
}
.card-category {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--vert-deep);
}
.card h2, .card h4 {
  font-size: 22px; line-height: 1.25; font-weight: 700; margin: 0;
  color: var(--gris-titre); letter-spacing: -0.01em;
}
.card p {
  font-size: 16px; color: var(--gris-texte); margin: 0; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta {
  margin-top: auto; padding-top: 14px;
  font-size: 13px; color: var(--gris-texte);
  display: flex; align-items: center; gap: 10px; font-weight: 600;
  border-top: 1px solid #f0f3f1;
}
.card-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--vert-principal); }

/* ──────────── breadcrumb ──────────── */

.breadcrumb { margin: 0 0 24px; }
.breadcrumb ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 13px; color: var(--gris-texte);
}
.breadcrumb li:not(:last-child)::after { content: "›"; margin-left: 8px; color: var(--vert-principal); font-weight: 700; }
.breadcrumb a { color: var(--gris-texte); transition: color .3s; }
.breadcrumb a:hover { color: var(--vert-principal); }

/* ──────────── article page ──────────── */

.article { max-width: var(--reading); margin: 0 auto; padding-bottom: 40px; }
.article h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1; font-weight: 800;
  margin: 0 0 24px; color: var(--gris-titre); letter-spacing: -0.02em;
}
.byline {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 0; margin-bottom: 28px;
  border-top: 1px solid #eef1f0; border-bottom: 1px solid #eef1f0;
}
.byline img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--vert-principal); }
.byline strong { font-weight: 700; font-size: 16px; color: var(--gris-titre); }
.byline small { display: block; color: var(--gris-texte); font-size: 13px; margin-top: 2px; }

.trust-strip {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  padding: 16px 22px; margin-bottom: 28px;
  background: var(--bg-soft);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 14px;
  font-size: 14px; color: var(--gris-fonce); font-weight: 600;
}
.trust-strip span { display: inline-flex; align-items: center; gap: 8px; }
.trust-strip span::before { content: "✓"; color: var(--vert-principal); font-weight: 800; }

.article-hero {
  margin: 0 0 32px;
  border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.article-hero img { width: 100%; height: auto; display: block; }
.article-hero figcaption {
  font-size: 13px; color: var(--gris-texte);
  padding: 10px 16px; font-style: italic; background: var(--bg-soft);
}

.lead { font-size: 22px; line-height: 1.45; color: var(--gris-fonce); font-weight: 500; margin: 0 0 32px; }

.article-body { font-size: 18px; line-height: 1.7; color: var(--gris-fonce); }
.article-body > * + * { margin-top: 1em; }
.article-body h2 {
  font-size: 30px; line-height: 1.2; font-weight: 800;
  margin: 48px 0 14px; color: var(--gris-titre); letter-spacing: -0.01em;
}
.article-body h2::before {
  content: ""; display: block; width: 44px; height: 3px;
  background: var(--vert-principal); border-radius: 3px; margin-bottom: 14px;
}
.article-body h3 { font-size: 22px; margin: 36px 0 10px; font-weight: 700; color: var(--gris-titre); }
.article-body p { margin: 0 0 16px; }
.article-body img { width: 100%; height: auto; border-radius: 14px; margin: 24px 0; box-shadow: var(--shadow-soft); }
.article-body a {
  color: var(--vert-deep); font-weight: 600;
  border-bottom: 2px solid rgba(46, 182, 110, 0.3);
  transition: color .25s ease, border-color .25s ease;
}
.article-body a:hover { color: var(--vert-darker); border-bottom-color: var(--vert-principal); }
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 16px; }
.article-body li + li { margin-top: 6px; }
.article-body ul li::marker { color: var(--vert-principal); }
.article-body blockquote {
  margin: 28px 0; padding: 6px 26px;
  border-left: 4px solid var(--vert-principal);
  font-size: 20px; line-height: 1.5;
  color: var(--gris-titre); font-style: italic; font-weight: 500;
}

/* ──────────── inline CTA ──────────── */

.inline-cta {
  margin: 40px 0; padding: 32px 36px;
  background: linear-gradient(135deg, var(--bleu-vert-fonce) 0%, var(--bleu-vert-fonce-2) 100%);
  border-radius: 16px; color: #fff;
  display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.inline-cta::after {
  content: ""; position: absolute; top: -40%; right: -10%;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(46, 182, 110, 0.5), transparent 65%);
  pointer-events: none;
}
.inline-cta strong { display: block; font-size: 22px; font-weight: 700; color: #fff; position: relative; }
.inline-cta p { margin: 0; color: rgba(255, 255, 255, 0.85); font-size: 16px; position: relative; }
.inline-cta .btn-cta { position: relative; }

/* ──────────── primary CTA button ──────────── */

.btn-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; align-self: flex-start;
  background: var(--vert-principal); color: #fff;
  font-family: "Urbanist", sans-serif; font-weight: 700; font-size: 17px;
  border-radius: 999px; border: 0; cursor: pointer;
  box-shadow: 0 4px 14px rgba(46, 182, 110, 0.3);
  transition: transform .4s var(--ease-out), background .25s ease, box-shadow .4s var(--ease-out);
}
.btn-cta:hover { background: var(--vert-deep); transform: translateY(-3px); box-shadow: var(--shadow-green); color: #fff; }
.btn-cta:active { transform: translateY(-1px); background: var(--vert-darker); }
.btn-cta.btn-light { background: #fff; color: var(--vert-deep); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15); }
.btn-cta.btn-light:hover { background: #fff; color: var(--vert-darker); }

/* ──────────── sticky CTA (mobile only) ──────────── */

.rsl-sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 80;
  display: flex; gap: 10px; padding: 10px;
  background: #fff; border-top: 1px solid #eef1f0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}
.rsl-sticky-cta a {
  flex: 1; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 12px 14px; border-radius: 999px;
  font-weight: 700; font-size: 14px; text-decoration: none;
}
.rsl-cta-wa { background: #25D366; color: #fff; }
.rsl-cta-form { background: var(--vert-principal); color: #fff; }
.rsl-sticky-cta svg { width: 16px; height: 16px; }
@media (min-width: 768px) { .rsl-sticky-cta { display: none; } }

/* Hide redundant FAB — .whatsapp_widget from style.css handles the desktop floating button */
.rsl-whatsapp-fab { display: none !important; }

/* ──────────── slide-in CTA ──────────── */

.slide-in-cta {
  position: fixed; bottom: 28px; right: 100px;
  width: 340px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 16px;
  box-shadow: var(--shadow-soft-hover);
  padding: 22px 22px 20px; z-index: 75;
  border: 1px solid rgba(0, 0, 0, 0.04);
  animation: slideIn 480ms var(--ease-out);
}
@keyframes slideIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.slide-in-cta .close {
  position: absolute; top: 8px; right: 12px;
  background: none; border: 0; font-size: 22px; line-height: 1;
  cursor: pointer; color: var(--gris-texte);
}
.slide-in-cta .close:hover { color: var(--gris-titre); }
.slide-in-cta h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: var(--gris-titre); }
.slide-in-cta p { margin: 0 0 14px; font-size: 14px; color: var(--gris-texte); line-height: 1.5; }
@media (max-width: 767px) { .slide-in-cta { display: none; } }

/* ──────────── author card + related ──────────── */

.author-card {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 24px 26px; margin: 48px 0;
  background: var(--bg-soft);
  border-radius: 16px; border: 1px solid rgba(0, 0, 0, 0.04);
}
.author-card img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 3px solid var(--vert-principal); }
.author-card h3 {
  margin: 0 0 6px; font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.14em; font-weight: 700; color: var(--vert-deep);
}
.author-card strong { display: block; margin-bottom: 4px; font-size: 18px; font-weight: 700; color: var(--gris-titre); }
.author-card p { margin: 0 0 8px; color: var(--gris-texte); font-size: 14px; line-height: 1.5; }
.author-card a { color: var(--vert-deep); font-weight: 700; font-size: 14px; }
.author-card a:hover { color: var(--vert-darker); }

.related { margin-top: 56px; }
.related h3 {
  font-size: 28px; margin: 0 0 22px; font-weight: 800; color: var(--gris-titre);
  letter-spacing: -0.01em;
}
.related h3::after {
  content: ""; display: block; width: 44px; height: 3px; background: var(--vert-principal);
  border-radius: 3px; margin-top: 10px;
}
.related .article-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ──────────── FAQ ──────────── */

.faq { margin: 56px 0; }
.faq h2 { font-size: 30px; margin: 0 0 18px; font-weight: 800; color: var(--gris-titre); letter-spacing: -0.01em; }
.faq details { border-top: 1px solid #eef1f0; padding: 20px 0; }
.faq details:last-of-type { border-bottom: 1px solid #eef1f0; }
.faq summary {
  font-weight: 700; cursor: pointer; list-style: none;
  font-size: 17px; color: var(--gris-titre);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  transition: color .25s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--vert-principal); }
.faq summary::after { content: "+"; font-size: 26px; line-height: 1; color: var(--vert-principal); flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 12px 0 0; color: var(--gris-texte); font-size: 15px; line-height: 1.6; }

/* ──────────── category / author pages ──────────── */

.category-hero, .author-hero-wrap { padding: 8px 0 32px; }
.category-hero h1, .author-hero h1 {
  font-size: clamp(32px, 5vw, 48px); line-height: 1.1;
  margin: 12px 0 12px; font-weight: 800; color: var(--gris-titre); letter-spacing: -0.02em;
}
.category-hero p { color: var(--gris-texte); font-size: 18px; margin: 0 0 20px; line-height: 1.5; }
.pillar-intro, .pillar-outro { margin: 28px 0; font-size: 17px; line-height: 1.65; color: var(--gris-fonce); }

.author-hero { display: flex; gap: 24px; align-items: flex-start; margin: 12px 0 32px; }
.author-hero img {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 4px solid var(--vert-principal); box-shadow: var(--shadow-soft);
}
.author-hero .job { color: var(--gris-texte); margin: 0 0 12px; font-size: 16px; }
.credentials { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.credentials li {
  background: rgba(46, 182, 110, 0.12); color: var(--vert-deep);
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.sameas a { font-size: 13px; color: var(--gris-texte); margin-right: 12px; }
.sameas a:hover { color: var(--vert-principal); }
.author-bio { margin: 22px 0; font-size: 16px; color: var(--gris-fonce); line-height: 1.7; }

/* ──────────── 404 ──────────── */

.not-found { padding: 80px 0; text-align: center; }
.not-found h1 {
  font-size: clamp(64px, 12vw, 110px); margin: 0 0 14px; font-weight: 800;
  background: linear-gradient(135deg, var(--vert-principal), var(--vert-clair));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.not-found p { color: var(--gris-texte); font-size: 20px; margin: 0 0 28px; }

/* ──────────── reveal animation ──────────── */

[data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
