/*
 * Le Saint-Fiacre — Styles personnalisés
 * Complément à TailwindCSS CDN (chargé dans head.html).
 * Tous les contrastes respectent WCAG AA (ratio ≥ 4.5:1 normal, ≥ 3:1 grand texte).
 */

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

/* ── Focus global (accessibilité clavier) ─────────────────── */
:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Liens et boutons — transitions douces ────────────────── */
a, button {
  transition: color 0.18s ease, background-color 0.18s ease,
              border-color 0.18s ease, transform 0.18s ease,
              box-shadow 0.18s ease;
}

/* ── Indicateur de défilement hero (animation fade-down) ──── */
@keyframes scroll-fade {
  0%   { opacity: 0.6; transform: scaleY(0.4); transform-origin: top; }
  60%  { opacity: 1;   transform: scaleY(1);   transform-origin: top; }
  100% { opacity: 0;   transform: scaleY(1.1); transform-origin: top; }
}
.scroll-fade {
  animation: scroll-fade 1.8s ease-in-out infinite;
}

/* ── Prose — contenu des articles ────────────────────────── */
.prose { max-width: 68ch; }

.prose h2 {
  font-size: 1.5rem;       /* 24px */
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1c1917;          /* stone-900 */
}
.prose h3 {
  font-size: 1.25rem;      /* 20px */
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  color: #1c1917;
}
.prose p {
  margin-bottom: 1.6rem;
  line-height: 1.85;
  color: #44403c;          /* stone-700 */
  font-size: 1.0625rem;
}
.prose ul,
.prose ol {
  margin-bottom: 1.6rem;
  padding-left: 1.5rem;
  color: #44403c;
}
.prose ul  { list-style-type: disc; }
.prose ol  { list-style-type: decimal; }
.prose li  { margin-bottom: 0.55rem; }

/* Blockquote — fond rouge très léger + bordure primaire */
.prose blockquote {
  border-left: 4px solid #dc2626;
  padding: 1.2rem 1.5rem;
  margin: 2.25rem 0;
  font-style: normal;
  color: #44403c;
  background-color: #fef2f2; /* rouge très léger */
  border-radius: 0 0.5rem 0.5rem 0;
}
.prose blockquote strong {
  color: #b91c1c;
  font-weight: 700;
}

/* Liens dans le prose */
.prose a {
  color: #dc2626;
  text-decoration: underline;
  text-decoration-color: #dc262660;
  text-underline-offset: 3px;
  font-weight: 500;
}
.prose a:hover {
  color: #b91c1c;
  text-decoration-color: #b91c1c;
}

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

/* Images prose */
.prose img {
  border-radius: 0.75rem;
  margin: 2rem 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

/* ── Tables prose ─────────────────────────────────────────── */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
  overflow-x: auto;
  display: block;
}
.prose thead { border-bottom: 2px solid #e7e5e4; }
.prose th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #292524;          /* stone-800 */
  background: #f5f5f4;     /* stone-100 */
  white-space: nowrap;
}
.prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e7e5e4;
  color: #44403c;
}
.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 ───────────────────────────────── */
.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;
}

/* ── Pagination (template Hugo interne) ──────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.375rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e7e5e4;
  flex-wrap: wrap;
}
.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.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.18s;
}
.pagination a           { color: #44403c; background: #f5f5f4; }
.pagination a:hover     { background: #e7e5e4; color: #1c1917; }
.pagination .active     { color: #fff; background: #dc2626; }
.pagination .disabled   { opacity: 0.4; pointer-events: none; }

/* ── Styles d'impression ──────────────────────────────────── */
@media print {
  header, footer, nav, .pagination, aside { display: none !important; }
  .prose { max-width: 100%; }
  body   { font-size: 11pt; color: #000; }
}
