/*
 * Nature's Garden CBD — Styles personnalises
 * TailwindCSS est charge via CDN, ce fichier complete avec du custom
 */

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

/* -- Focus — Accessibilite -- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* -- Prose — Contenu des articles -- */
.prose {
  max-width: none;
}

.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  scroll-margin-top: 5rem;
}

.prose h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 5rem;
}

.prose p {
  margin-bottom: 1.125rem;
}

.prose ul, .prose ol {
  margin-bottom: 1.125rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.375rem;
}

.prose blockquote {
  border-left-width: 3px;
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose table {
  font-size: 0.875rem;
  border-collapse: collapse;
  width: 100%;
}

.prose th,
.prose td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

/* Responsive table wrapper */
.prose table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* -- Reading progress bar -- */
#reading-progress {
  will-change: width;
}

/* -- TOC sidebar active indicator -- */
#toc-nav a {
  transition: color 0.2s ease, font-weight 0.15s ease;
  line-height: 1.5;
}

/* -- Details/Summary reset -- */
details summary::-webkit-details-marker {
  display: none;
}
details summary::marker {
  display: none;
  content: '';
}

/* -- 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;
}

/* -- Selection -- */
::selection {
  background-color: rgba(5, 150, 105, 0.15);
  color: #047857;
}

/* -- Print -- */
@media print {
  header, footer, nav, .no-print,
  #reading-progress, #toc-sidebar, #toc-inline {
    display: none !important;
  }
  .prose {
    max-width: 100%;
  }
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}
