/*
 * Paille SA — Custom CSS
 * TailwindCSS est chargé via CDN dans head.html
 * Ce fichier complète Tailwind avec un design system éditorial cohérent.
 */

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

body {
  text-rendering: optimizeLegibility;
}

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

/* ----- Design system éditorial ----- */

/* Kicker label : étiquette typographique éditoriale (uppercase, tracking, semantic) */
.kicker {
  display: inline-block;
  font-family: 'Nunito', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Divider décoratif : trait court bicolore */
.section-rule {
  display: block;
  width: 56px;
  height: 2px;
  background: linear-gradient(to right, #65a30d, #4d7c0f);
  border: 0;
  margin: 1.25rem 0;
}
.section-rule.is-centered { margin-left: auto; margin-right: auto; }

/* Numéro éditorial (grandes capitales fines pour les Repères) */
.editorial-num {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  color: #a8a29e;
  font-feature-settings: "tnum";
}

/* Bordure verticale bicolore pour mises en avant éditoriales */
.bordered-left {
  border-left: 2px solid #65a30d;
  padding-left: 1.5rem;
}

/* ----- Prose ----- */

.prose { max-width: 68ch; }
.prose h2 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.625rem;
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1c1917;
}
.prose h3 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: #1c1917;
}
.prose p {
  margin-bottom: 1.5rem;
  line-height: 1.75;
  color: #292524;
}
.prose ul, .prose ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}
.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }
.prose li {
  margin-bottom: 0.5rem;
  color: #292524;
}
.prose blockquote {
  border-left: 3px solid #65a30d;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #44403c;
  background: #fafaf9;
  border-radius: 0 0.5rem 0.5rem 0;
}
.prose a {
  color: #4d7c0f;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-weight: 500;
}
.prose a:hover {
  text-decoration-thickness: 2px;
  color: #3f6212;
}
.prose strong { font-weight: 700; color: #1c1917; }
.prose img {
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}

/* Tables éditoriales */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
  display: block;
  overflow-x: auto;
}
.prose thead { border-bottom: 2px solid #d6d3d1; }
.prose th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
  color: #1c1917;
  background: #f5f5f4;
  white-space: nowrap;
  font-family: 'Nunito', sans-serif;
}
.prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e7e5e4;
  color: #292524;
}
.prose tbody tr:hover { background: #fafaf9; }
@media (max-width: 640px) {
  .prose th, .prose td {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}

/* ----- Utilitaires ----- */

.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;
}

/* Focus accessibilité (WCAG 2.4.7) */
a:focus-visible, button:focus-visible {
  outline: 2px solid #65a30d;
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark a:focus-visible, .on-dark button:focus-visible {
  outline-color: #ffffff;
}

/* Pagination Hugo */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e7e5e4;
  list-style: none;
  padding-left: 0;
}
.pagination li { list-style: none; }
.pagination a, .pagination .active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.pagination a {
  color: #44403c;
  background: #f5f5f4;
}
.pagination a:hover { background: #e7e5e4; }
.pagination .active {
  color: white;
  background: #4d7c0f;
}
.pagination .disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Print */
@media print {
  header, footer, nav { display: none !important; }
  .prose { max-width: 100%; color: #000; }
  a { color: #000; text-decoration: underline; }
}
