/*
 * Green Grass Gardens - Custom styles
 * Complementaire a TailwindCSS (CDN)
 */

/* ---- Base ---- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Prose markdown ---- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.prose h3 { margin-top: 1.75rem; margin-bottom: 0.75rem; }
.prose p { margin-bottom: 1.25rem; }
.prose ul,
.prose ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.prose li { margin-bottom: 0.4rem; }
.prose blockquote {
  border-left: 3px solid;
  padding-left: 1.25rem;
  margin: 1.5rem 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
}
.prose th,
.prose td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}
.prose th {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

/* ---- Article prose enhancements ---- */
.article-prose > p:first-of-type::first-letter {
  float: left;
  font-family: 'Merriweather', Georgia, serif;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 0.85;
  padding-right: 0.6rem;
  padding-top: 0.15rem;
  color: #059669;
}

.article-prose h2 {
  position: relative;
  padding-bottom: 0.6rem;
  margin-top: 3rem;
}
.article-prose h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2.5rem;
  height: 3px;
  background: #059669;
  border-radius: 2px;
}

.article-prose blockquote {
  border-left: 3px solid #059669;
  background: #faf7f2;
  border-radius: 0 0.75rem 0.75rem 0;
  padding: 1rem 1.25rem;
  margin: 2rem 0;
}
.article-prose blockquote p {
  margin-bottom: 0;
}

.article-prose img {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.article-prose table {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}
.article-prose thead {
  background: #f9fafb;
}
.article-prose th {
  border-bottom: 2px solid #e5e7eb;
  padding: 0.75rem 1rem;
}
.article-prose td {
  padding: 0.6rem 1rem;
}
.article-prose tbody tr:hover {
  background: #faf7f2;
}

.article-prose hr {
  margin: 2.5rem auto;
  max-width: 6rem;
  border: none;
  height: 2px;
  background: linear-gradient(to right, transparent, #d1d5db, transparent);
}

/* ---- Line clamp ---- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Reveal animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Focus / Accessibility ---- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ---- Smooth transitions ---- */
a, button {
  transition: color 0.2s ease, background-color 0.2s ease;
}

/* ---- Print ---- */
@media print {
  header, footer, nav { display: none !important; }
  .prose { max-width: 100%; }
  .article-prose > p:first-of-type::first-letter {
    float: none;
    font-size: inherit;
    padding: 0;
  }
}
