/*
 * News Toiture & Rénovation — Custom CSS
 * Editorial / drafting aesthetic on top of TailwindCSS Play CDN.
 * - Typography: DM Serif Display (heading) + DM Sans (body)
 * - Palette  : Indigo primary / Indigo secondary / Vert accent
 * - Voice    : sober, magazine-like, generous spacing
 */

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

body {
  text-rendering: optimizeLegibility;
}

/* Selection mirrors the brand */
::selection {
  background: rgba(79, 70, 229, 0.18);
  color: #1f2937;
}

/* Smooth global transitions on interactive surfaces */
a, button {
  transition: color 0.2s ease, background-color 0.2s ease,
              border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

/* ========== 2. Focus states (accessibility) ========== */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 3px;
  border-radius: 3px;
}

/* ========== 3. Article prose (single.html) ========== */
.prose {
  max-width: 68ch;
}

.article-body {
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
}

/* Drop cap on the very first paragraph of an article body, only when the
   first paragraph is a real text paragraph (not preceded by a heading). */
.article-body > p:first-of-type::first-letter {
  font-family: "DM Serif Display", Georgia, serif;
  float: left;
  font-size: 4.4rem;
  line-height: 0.9;
  padding: 0.35rem 0.75rem 0 0;
  color: #4f46e5;
  font-weight: 400;
}

/* Standard heading rhythm */
.prose h2 {
  font-size: 1.6rem;
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.prose h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
}

.prose p {
  margin-bottom: 1.5rem;
  line-height: 1.85;
  color: #44403c; /* stone-700 */
}

.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: #44403c;
  line-height: 1.7;
}

/* Blockquote — drafting bar, sober */
.prose blockquote {
  border-left: 4px solid #4f46e5;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  background: #f5f5f4;       /* stone-100 */
  border-radius: 0 0.5rem 0.5rem 0;
  color: #44403c;
  font-style: normal;
  font-size: 1rem;
}
.prose blockquote p:last-of-type { margin-bottom: 0; }
.prose blockquote strong { color: #1f2937; }

/* Inline links */
.prose a {
  text-decoration: underline;
  text-decoration-color: rgba(79, 70, 229, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-weight: 500;
  color: #4f46e5;
}
.prose a:hover {
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}

.prose strong { font-weight: 600; color: #1f2937; }

.prose img {
  border-radius: 0.5rem;
  margin: 1.75rem 0;
}

/* ========== 4. Tables ========== */
.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; /* stone-300 */
}
.prose th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #1c1917; /* stone-900 */
  background: #fafaf9; /* stone-50 */
  white-space: nowrap;
  font-family: "DM Sans", system-ui, sans-serif;
}
.prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e7e5e4; /* stone-200 */
  color: #44403c;
  vertical-align: top;
}
.prose tbody tr:hover { background: #fafaf9; }

@media (max-width: 640px) {
  .prose th, .prose td {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}

/* ========== 5. Line clamp utilities ========== */
.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;
}

/* ========== 6. Pagination (Hugo internal template) ========== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e7e5e4;
  list-style: none;
  padding-left: 0;
}
.pagination li { list-style: none; }
.pagination a,
.pagination .active,
.pagination .disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: "DM Sans", system-ui, sans-serif;
  border: 1px solid transparent;
}
.pagination a {
  color: #44403c;
  background: #f5f5f4;
}
.pagination a:hover {
  background: #fff;
  border-color: #4f46e5;
  color: #4f46e5;
}
.pagination .active {
  color: #fff;
  background: #4f46e5;
}
.pagination .disabled {
  color: #a8a29e; /* stone-400 */
  opacity: 0.5;
  pointer-events: none;
}

/* ========== 7. Decorative editorial helpers ========== */
.kicker-rule::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: currentColor;
  vertical-align: middle;
  margin-right: 0.75rem;
  opacity: 0.7;
}

/* ========== 8. Print ========== */
@media print {
  header, footer, nav,
  .no-print { display: none !important; }
  .prose { max-width: 100%; }
  body { color: #000; background: #fff; }
  .article-body > p:first-of-type::first-letter {
    color: #000;
  }
  a { color: #000; text-decoration: underline; }
}

/* ========== 9. Reduced motion ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
