/* ==========================================================
   BLOG ARTICLE STYLES — Agrivo v2
   Styles spécifiques aux pages d'articles de blog
   ========================================================== */

/* ---------- HERO ARTICLE ---------- */
.article-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  padding: 120px 0 64px;
  margin-bottom: 0;
  overflow: hidden;
}
.article-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.article-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(44, 24, 16, 0.92) 0%,
    rgba(44, 24, 16, 0.5) 40%,
    rgba(44, 24, 16, 0.2) 100%
  );
  z-index: 2;
}
.article-hero-content {
  position: relative;
  z-index: 3;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 64px);
  width: 100%;
}
.article-hero-tag {
  display: inline-block;
  background: var(--or);
  color: var(--terre);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 18px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.article-hero h1 {
  color: var(--blanc);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.1;
  margin-bottom: 20px;
  max-width: 900px;
}
.article-hero h1 em {
  color: var(--or);
  font-style: italic;
}
.article-hero-excerpt {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 700px;
  margin-bottom: 24px;
}
.article-hero-meta {
  display: flex;
  gap: 24px;
  align-items: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}
.article-hero-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- META BAR ---------- */
.article-meta-bar {
  background: var(--ivoire);
  border-bottom: 1px solid rgba(44, 24, 16, 0.08);
  padding: 16px 0;
  margin-bottom: 0;
}
.article-meta-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.article-meta-bar .tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.article-meta-bar .tag {
  font-size: 0.8125rem;
  color: var(--gris);
  background: var(--blanc);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(44, 24, 16, 0.08);
}
.article-meta-bar .date-read {
  font-size: 0.8125rem;
  color: var(--gris);
}

/* ---------- CONTENT LAYOUT ---------- */
.article-body {
  background: var(--blanc);
  padding: 64px 0 80px;
}
.article-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  align-items: start;
}
.article-main {
  min-width: 0;
}
.article-sidebar {
  position: sticky;
  top: 120px;
}

/* ---------- LEAD ---------- */
.article-lead {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--terre);
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(44, 24, 16, 0.08);
}
.article-lead strong {
  color: var(--vert-vif);
}

/* ---------- SECTIONS ---------- */
.article-section {
  margin-bottom: 64px;
}
.article-section:last-child {
  margin-bottom: 0;
}

/* ---------- HEADINGS ---------- */
.article-main h2 {
  font-family: var(--font-titre);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--terre);
  margin-bottom: 24px;
  margin-top: 56px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--or);
  display: inline-block;
}
.article-main h2:first-child {
  margin-top: 0;
}
.article-main h3 {
  font-family: var(--font-titre);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  color: var(--terre);
  margin-bottom: 16px;
  margin-top: 40px;
}
.article-main h4 {
  font-family: var(--font-corps);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--terre);
  margin-bottom: 12px;
  margin-top: 28px;
}

/* ---------- PARAGRAPHS ---------- */
.article-main p {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--gris);
  margin-bottom: 20px;
}
.article-main p strong {
  color: var(--terre);
}

/* ---------- LISTS ---------- */
.article-main ul,
.article-main ol {
  margin-bottom: 24px;
  padding-left: 24px;
}
.article-main li {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--gris);
  margin-bottom: 10px;
  position: relative;
}
.article-main ul li::marker {
  color: var(--or);
}
.article-main ol li::marker {
  color: var(--vert-vif);
  font-weight: 700;
}

/* ---------- QUOTE / EXERGUE ---------- */
.article-quote {
  background: var(--ivoire);
  border-left: 4px solid var(--or);
  padding: 32px 36px;
  margin: 40px 0;
  border-radius: 0 16px 16px 0;
  position: relative;
}
.article-quote::before {
  content: '"';
  font-family: var(--font-titre);
  font-size: 4rem;
  color: var(--or);
  opacity: 0.3;
  line-height: 1;
  position: absolute;
  top: 8px;
  left: 20px;
}
.article-quote p {
  font-family: var(--font-titre);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--terre);
  line-height: 1.6;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.article-quote cite {
  font-family: var(--font-corps);
  font-size: 0.9375rem;
  font-style: normal;
  font-weight: 600;
  color: var(--gris);
}

/* ---------- INFO BOXES ---------- */
.article-box {
  border-radius: 16px;
  padding: 28px 32px;
  margin: 32px 0;
}
.article-box-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.article-box p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0;
}
.article-box p + p {
  margin-top: 12px;
}
.article-box-info {
  background: rgba(91, 140, 90, 0.08);
  border: 1px solid rgba(91, 140, 90, 0.15);
}
.article-box-info .article-box-title {
  color: var(--vert-vif);
}
.article-box-info p {
  color: var(--terre);
}
.article-box-warning {
  background: rgba(212, 165, 116, 0.1);
  border: 1px solid rgba(212, 165, 116, 0.2);
}
.article-box-warning .article-box-title {
  color: #c9893b;
}
.article-box-warning p {
  color: var(--terre);
}
.article-box-tip {
  background: rgba(44, 24, 16, 0.04);
  border: 1px solid rgba(44, 24, 16, 0.08);
}
.article-box-tip .article-box-title {
  color: var(--terre);
}

/* ---------- STATS GRID ---------- */
.article-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 40px 0;
}
.article-stat {
  background: var(--ivoire);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.3s ease;
}
.article-stat:hover {
  transform: translateY(-4px);
}
.article-stat-number {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--vert-vif);
  line-height: 1;
  margin-bottom: 8px;
}
.article-stat-number span {
  font-size: 1.25rem;
}
.article-stat-label {
  font-size: 0.9375rem;
  color: var(--gris);
  line-height: 1.4;
}

/* ---------- IMAGES ---------- */
.article-image {
  margin: 40px 0;
  border-radius: 20px;
  overflow: hidden;
}
.article-image img {
  width: 100%;
  height: auto;
  display: block;
}
.article-image-caption {
  background: var(--ivoire);
  padding: 16px 24px;
  font-size: 0.875rem;
  color: var(--gris);
  text-align: center;
}

/* ---------- TABLE ---------- */
.article-table-wrap {
  margin: 32px 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(44, 24, 16, 0.08);
}
.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.article-table th {
  background: var(--terre);
  color: var(--blanc);
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
}
.article-table td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(44, 24, 16, 0.06);
  color: var(--gris);
}
.article-table tr:nth-child(even) {
  background: rgba(44, 24, 16, 0.02);
}
.article-table tr:last-child td {
  border-bottom: none;
}
.article-table td strong {
  color: var(--terre);
}

/* ---------- SIDEBAR ---------- */
.sidebar-card {
  background: var(--ivoire);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 24px;
}
.sidebar-card h4 {
  font-family: var(--font-titre);
  font-size: 1.125rem;
  color: var(--terre);
  margin-bottom: 16px;
}
.sidebar-card p {
  font-size: 0.9375rem;
  color: var(--gris);
  line-height: 1.6;
  margin-bottom: 16px;
}
.sidebar-card .btn {
  width: 100%;
  text-align: center;
}
.sidebar-toc {
  background: var(--ivoire);
  border-radius: 20px;
  padding: 28px;
}
.sidebar-toc h4 {
  font-family: var(--font-titre);
  font-size: 1.125rem;
  color: var(--terre);
  margin-bottom: 16px;
}
.sidebar-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-toc li {
  margin-bottom: 10px;
}
.sidebar-toc a {
  color: var(--gris);
  font-size: 0.9375rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  transition: color 0.2s;
}
.sidebar-toc a::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--or);
  flex-shrink: 0;
}
.sidebar-toc a:hover {
  color: var(--terre);
}

/* ---------- FAQ ---------- */
.article-faq {
  margin: 40px 0;
}
.faq-item {
  border-bottom: 1px solid rgba(44, 24, 16, 0.08);
  padding: 20px 0;
}
.faq-question {
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--terre);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--or);
  flex-shrink: 0;
  transition: transform 0.3s;
}
.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-item.open .faq-answer {
  max-height: 500px;
  padding-top: 16px;
}
.faq-answer p {
  font-size: 1rem;
  color: var(--gris);
  line-height: 1.7;
  margin: 0;
}

/* ---------- STEPS / PROCESS ---------- */
.article-steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin: 40px 0;
}
.article-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  align-items: start;
}
.article-step-number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--terre);
  color: var(--or);
  font-family: var(--font-titre);
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.article-step-content h3 {
  margin-top: 0;
  margin-bottom: 10px;
}
.article-step-content p {
  margin-bottom: 0;
}

/* ---------- CALCULATOR DEMO ---------- */
.calc-demo {
  background: var(--ivoire);
  border-radius: 20px;
  padding: 40px;
  margin: 40px 0;
}
.calc-demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.calc-demo-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--terre);
  margin-bottom: 8px;
}
.calc-demo-field input,
.calc-demo-field select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(44, 24, 16, 0.12);
  border-radius: 12px;
  font-size: 1rem;
  background: var(--blanc);
  color: var(--terre);
}
.calc-demo-result {
  background: var(--terre);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
}
.calc-demo-result-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
}
.calc-demo-result-value {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--or);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .article-grid {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
    order: -1;
  }
  .sidebar-toc {
    display: none;
  }
  .article-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .calc-demo-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .article-hero {
    min-height: 50vh;
    padding: 100px 0 40px;
  }
  .article-body {
    padding: 40px 0 60px;
  }
  .article-section {
    margin-bottom: 48px;
  }
  .article-main h2 {
    margin-top: 40px;
  }
  .article-stats {
    grid-template-columns: 1fr;
  }
  .article-step {
    grid-template-columns: 48px 1fr;
    gap: 16px;
  }
  .article-step-number {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
  .article-quote {
    padding: 24px;
  }
  .article-quote p {
    font-size: 1.1rem;
  }
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fade-in {
  animation: fadeInUp 0.7s ease forwards;
}
.animate-delay-1 {
  animation-delay: 0.1s;
}
.animate-delay-2 {
  animation-delay: 0.2s;
}
.animate-delay-3 {
  animation-delay: 0.3s;
}
