:root {
  /* Tokens extracted from main site */
  --color-dark-green: #1f514c;
  --color-white: #ffffff;
  --color-black: #141414;
  --color-grey: #636363;
  --color-off-white: #fafafa;
  --color-light-green: #edffe3;

  --font-serif: "Hedvig Letters Serif", Georgia, serif;
  --font-sans: "Inter", sans-serif;

  --spacing-container: max(24px, 5vw);
  --max-width: 1200px;
}

#status-box {
  padding: 16px;
  margin: 0 auto 40px;
  max-width: 600px;
  text-align: center;
  background: var(--color-off-white);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--color-grey);
}

.error-box {
  background-color: #ffebeb !important;
  color: #c92a2a !important;
  border: 1px solid #ffa8a8;
}

html {
  scrollbar-gutter: stable;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--color-white);
  color: var(--color-black);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

/* --- Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.header-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 50px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-decoration: none;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.44px;
  color: rgb(20, 20, 20);
  font-weight: 700;
}

.brand-subtitle {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1em;
  color: rgb(20, 20, 20);
  font-weight: 400;
  letter-spacing: 0px;
}

.site-links {
  display: none; 
}

@media (min-width: 900px) {
  .site-links {
    display: flex;
    gap: 22px;
    align-items: center;
  }

  .site-links a {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    color: rgb(20, 20, 20);
    letter-spacing: -0.8px;
  }
}

.cta-button {
  background-color: rgb(31, 81, 76);
  color: rgb(255, 255, 255);
  padding: 3px 3px 3px 14px; 
  height: 39px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s ease, background-color 0.2s ease;
  box-sizing: border-box;
  text-decoration: none;
}

.cta-button:hover {
  opacity: 1;
  background-color: #173d39;
  transform: translateY(-1px);
}

.cta-icon {
  width: 33px;
  height: 33px;
  background-color: rgb(255, 255, 255);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(31, 81, 76);
  flex-shrink: 0;
}

.cta-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5px;
}

/* ============================
   BLOG HERO — compact green card with rounded corners
   Matches homepage's rounded green block aesthetic
   ============================ */

.blog-hero {
  padding: 20px var(--spacing-container) 0;
  max-width: var(--max-width);
  margin: 0 auto;
}

.blog-hero-card {
  background-color: var(--color-dark-green);
  color: var(--color-white);
  border-radius: 20px;
  padding: 44px 52px;
  text-align: center;
}

.blog-hero-kicker {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  opacity: 0.65;
  margin-bottom: 16px;
}

.blog-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.1;
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.5px;
}

.blog-hero-desc {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  opacity: 0.75;
  max-width: 50ch;
  margin: 0;
  font-weight: 400;
}

/* ============================
   CONTENT / LIST LAYOUT
   ============================ */

.content-section {
  max-width: var(--max-width);
  margin: 0 auto 100px;
  padding: 56px var(--spacing-container) 0;
  position: relative;
  z-index: 10;
}

#posts-root {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.post-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 32px;
  padding: 36px 0;
  border-top: 1px solid rgba(0,0,0,0.08);
  text-decoration: none;
  transition: opacity 0.2s ease;
  align-items: baseline;
}

.post-row:last-child {
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.post-row:hover {
  opacity: 1;
}

.post-row:hover .post-row-title {
  color: var(--color-dark-green);
}

.post-row:hover .post-row-icon {
  transform: translateX(4px);
  color: var(--color-dark-green);
}

.post-row-meta {
  display: flex;
  flex-direction: column;
}

.post-row-date {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-grey);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.post-row-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-row-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--color-black);
  margin: 0;
  font-weight: 400;
  transition: color 0.2s ease;
}

.post-row-excerpt {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-grey);
  margin: 0;
  max-width: 55ch;
}

.post-badges {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.post-badge {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 99px;
  background-color: rgba(31, 81, 76, 0.06);
  color: var(--color-dark-green);
  font-weight: 500;
  border: 1px solid rgba(31, 81, 76, 0.1);
}

.post-row-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  transition: all 0.2s ease;
  padding-top: 4px;
}

/* Responsive list */
@media (max-width: 768px) {
  .post-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 28px 0;
  }

  .post-row-meta {
    order: -1;
  }

  .post-row-icon {
    display: none;
  }
}

/* ============================
   ARTICLE DETAIL
   Visual funnel: wide structure → narrow reading column
   ============================ */

/* Outer page container — wider, for structural elements */
.article-page {
  max-width: 900px;
  margin: 0 auto 120px;
  padding: 0 var(--spacing-container);
}

/* Back navigation — uses full outer width */
.back-nav {
  padding: 28px 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  margin-bottom: 48px;
}

.back-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-grey);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

.back-link:hover {
  opacity: 1;
  color: var(--color-dark-green);
}

/* Inner reading column — optimal width for body text */
.article-container {
  max-width: 680px;
  padding: 0;
}

/* Article hero — slightly wider than body for visual funnel */
.article-hero {
  text-align: left;
  margin-bottom: 48px;
  max-width: 740px;
}

.article-meta {
  font-size: 0.875rem;
  color: var(--color-grey);
  margin-bottom: 16px;
  font-family: var(--font-sans);
  font-weight: 400;
}

/* Title: brand serif + brand green = identity */
.article-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.2;
  color: var(--color-dark-green);
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.5px;
}

.article-image {
  width: 100%;
  max-width: 900px;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 48px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

/* Body: Inter for optimal reading */
.article-content {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #1a1a1a;
  text-align: left;
}

.article-content p {
  margin: 0 0 24px;
}

/* H2: Serif + green (brand accent for sections) */
.article-content h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--color-dark-green);
  margin: 52px 0 18px;
  font-weight: 400;
  letter-spacing: -0.2px;
}

/* H3: Sans-serif + green (subtle sub-section) */
.article-content h3 {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--color-dark-green);
  margin: 36px 0 12px;
  font-weight: 600;
}

.article-content ul,
.article-content ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
  padding-left: 4px;
}

/* Blockquote — serif for elegance */
.article-content blockquote {
  border-left: 3px solid var(--color-dark-green);
  padding: 4px 0 4px 24px;
  margin: 40px 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--color-dark-green);
  font-style: italic;
  background: transparent;
}

.article-content a {
  color: var(--color-dark-green);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.article-content a:hover {
  opacity: 0.7;
}

/* ============================
   TABLE OF CONTENTS
   ============================ */

.toc {
  background: linear-gradient(135deg, rgba(31, 81, 76, 0.04), rgba(31, 81, 76, 0.02));
  border: 1px solid rgba(31, 81, 76, 0.1);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 24px;
  max-width: 680px;
}

.toc-disclaimer {
  max-width: 680px;
  margin-bottom: 48px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-grey);
}

.toc-header {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--color-dark-green);
  margin-bottom: 16px;
  letter-spacing: -0.2px;
}

.toc-list {
  margin: 0;
  padding-left: 20px;
  counter-reset: toc-counter;
  list-style: none;
}

.toc-list li {
  counter-increment: toc-counter;
  position: relative;
  padding: 6px 0 6px 8px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.toc-list li::before {
  content: counter(toc-counter) ".";
  position: absolute;
  left: -20px;
  color: var(--color-dark-green);
  font-weight: 600;
  font-size: 0.875rem;
}

.toc-list a {
  color: var(--color-black);
  text-decoration: none;
  transition: color 0.2s ease;
}

.toc-list a:hover {
  opacity: 1;
  color: var(--color-dark-green);
}

/* ============================
   CALLOUT BLOCKS
   ============================ */

/* ============================
   CUSTOM BLOCKS
   ============================ */

/* ============================
   CUSTOM BLOCKS (Unified & Elegant)
   ============================ */

.callout {
  border-radius: 8px; /* Slightly tighter radius for a sharper look */
  padding: 28px 32px;
  margin: 40px 0;
  border-left: 4px solid; /* Uniform thick left border */
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.callout-header {
  display: flex;
  align-items: center;
  margin-bottom: 0px; /* Gap is handled by flex gap */
}

/* Elegant Serif Header for ALL blocks */
.callout-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  /* No uppercase transform */
}

.callout-body {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.7;
  color: #1a1a1a;
}

.callout-body p {
  margin: 0 0 12px;
}

.callout-body p:last-child {
  margin-bottom: 0;
}

.callout-body strong {
  font-weight: 600;
}

/* --- Remarque & Bon à savoir (Refined Grey) --- */
.callout--remarque,
.callout--bon-a-savoir {
  border-left-color: #9e9e9e;
  background: #f9f9f9; /* Clean off-white/grey */
}

.callout--remarque .callout-title,
.callout--bon-a-savoir .callout-title {
  color: #555555;
  font-style: italic; /* Slight differentiation for notes */
}

/* --- Conseil d'avocat (Noble Green) --- */
.callout--conseil-avocat {
  border-left-color: var(--color-dark-green);
  background: rgba(31, 81, 76, 0.05); /* Very subtle tint */
}

.callout--conseil-avocat .callout-title {
  color: var(--color-dark-green);
  font-size: 1.2rem; /* Slightly larger */
}

/* --- À Retenir (Strong Green - key points) --- */
.callout--a-retenir {
  border-left-color: #2d7d46;
  background: rgba(45, 125, 70, 0.04);
}

.callout--a-retenir .callout-title {
  color: #2d7d46;
  font-weight: 600;
}

.callout--a-retenir .callout-body strong {
  color: #2d7d46;
}

/* ============================
   MOBILE NAVIGATION
   ============================ */

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-black);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.mobile-menu-btn.is-open .hamburger-line:first-child {
  transform: translateY(4px) rotate(45deg);
}
.mobile-menu-btn.is-open .hamburger-line:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.mobile-drawer {
  display: none;
  position: fixed;
  top: 90px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-white);
  z-index: 99;
  flex-direction: column;
  padding: 40px 25px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  overflow-y: auto;
}

.mobile-drawer.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-nav-link {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-black);
  padding: 16px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mobile-nav-link:hover {
  opacity: 1;
  color: var(--color-dark-green);
}

.mobile-cta-button {
  background-color: rgb(31, 81, 76);
  color: rgb(255, 255, 255);
  padding: 12px 16px 12px 20px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  text-decoration: none;
  align-self: stretch;
  text-align: center;
}

.mobile-cta-button:hover {
  opacity: 1;
  background-color: #173d39;
}

/* ============================
   RESPONSIVE BREAKPOINTS
   ============================ */

@media (max-width: 899px) {
  .mobile-menu-btn {
    display: flex;
  }

  .site-links,
  .cta-button {
    display: none !important;
  }

  .mobile-drawer {
    display: flex;
  }

  .site-header {
    height: 70px;
  }

  .header-inner {
    padding: 0 16px;
  }

  /* Blog hero */
  .blog-hero {
    padding: 12px 16px 0;
  }

  .blog-hero-card {
    padding: 40px 28px;
    border-radius: 16px;
  }

  .blog-hero-title {
    font-size: clamp(1.75rem, 7vw, 2.25rem);
  }

  .blog-hero-desc {
    font-size: 0.95rem;
  }

  /* Content */
  .content-section {
    padding: 36px 16px 0;
  }

  /* Article */
  .article-page {
    padding: 0 20px;
  }

  .back-nav {
    padding: 20px 0;
    margin-bottom: 32px;
  }

  .article-hero {
    margin-bottom: 32px;
  }

  .article-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .article-content {
    font-size: 1rem;
  }

  .article-content h2 {
    font-size: 1.3rem;
    margin: 40px 0 14px;
  }

  .article-content h3 {
    font-size: 1.0625rem;
    margin: 28px 0 10px;
  }

  .article-content blockquote {
    font-size: 1.1rem;
    padding-left: 16px;
    margin: 28px 0;
  }

  /* Custom blocks mobile */
  .toc {
    padding: 20px 22px;
    margin-bottom: 16px;
  }

  .toc-disclaimer {
    margin-bottom: 32px;
    font-size: 0.75rem;
  }

  .toc-header {
    font-size: 1rem;
  }

  .toc-list li {
    font-size: 0.875rem;
  }

  .callout {
    padding: 18px 20px;
    margin: 28px 0;
  }

  .callout-body {
    font-size: 0.875rem;
  }

  .mobile-drawer {
    top: 70px;
  }
}
