/*
 * OBBQ — Magazine du Barbecue
 * Styles custom (complément à Tailwind CDN)
 * Palette : Orange #ea580c / Teal #14b8a6 / Stone dark
 * Fonts   : Lora (headings) / Inter (body)
 */


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

*, *::before, *::after {
  box-sizing: border-box;
}

/* ── Transitions globales ───────────────────────────────── */
a, button {
  transition: color 0.18s ease, background-color 0.18s ease,
              border-color 0.18s ease, box-shadow 0.18s ease;
}


/* ── Prose — corps des articles ─────────────────────────
   Contraste : stone-700 (#374151) sur blanc → 9.7:1 ✓ AAA
   ─────────────────────────────────────────────────────── */
.article-prose {
  font-size: 1.0625rem;   /* 17px */
  line-height: 1.8;
  color: #374151;         /* stone-700 */
}

.article-prose h2 {
  font-family: "Lora", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1c1917;         /* stone-950 */
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  line-height: 1.3;
  /* Filet orange sous les H2 */
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #fef3e8; /* orange-50 */
}

.article-prose h3 {
  font-family: "Lora", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1c1917;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.article-prose h4 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #292524;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.article-prose p {
  margin-bottom: 1.5rem;
}

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

.article-prose em {
  font-style: italic;
}

/* Liens dans prose
   Contraste : #c2410c (secondary) sur blanc → 4.53:1 ✓ AA */
.article-prose a {
  color: #c2410c;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  font-weight: 500;
}
.article-prose a:hover {
  color: #ea580c;
  text-decoration-thickness: 2px;
}

/* Listes */
.article-prose ul,
.article-prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.article-prose ul { list-style-type: disc; }
.article-prose ol { list-style-type: decimal; }
.article-prose li {
  margin-bottom: 0.5rem;
  color: #374151;
}
.article-prose li strong { color: #1c1917; }

/* Blockquote — style éditorial magazine
   Fond chaud, filet orange, italique */
.article-prose blockquote {
  border-left: 3px solid #ea580c;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  background: #fff7ed;    /* orange-50 */
  border-radius: 0 4px 4px 0;
  font-style: italic;
  /* Contraste : stone-700 sur orange-50 → ✓ */
  color: #44403c;         /* stone-700 */
}
.article-prose blockquote strong {
  font-style: normal;
  color: #c2410c;
  font-weight: 600;
}
.article-prose blockquote p {
  margin-bottom: 0;
}

/* Images */
.article-prose img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 2rem 0;
}
.article-prose figure { margin: 2rem 0; }
.article-prose figcaption {
  font-size: 0.8125rem;
  color: #78716c;         /* stone-500 */
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Tables */
.article-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
  display: block;
  overflow-x: auto;
}
.article-prose thead {
  background: #fafaf9;    /* stone-50 */
  border-bottom: 2px solid #e7e5e4; /* stone-200 */
}
.article-prose th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #1c1917;
  white-space: nowrap;
}
.article-prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e7e5e4;
  color: #44403c;
  vertical-align: top;
}
.article-prose tbody tr:hover { background: #fafaf9; }
@media (max-width: 640px) {
  .article-prose th,
  .article-prose td { padding: 0.5rem 0.625rem; font-size: 0.875rem; }
}

/* Code inline */
.article-prose code {
  background: #f5f5f4;    /* stone-100 */
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.875em;
  color: #c2410c;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Code block */
.article-prose pre {
  background: #1c1917;
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 2rem 0;
}
.article-prose pre code {
  background: transparent;
  color: #e7e5e4;
  padding: 0;
  font-size: 0.875rem;
}

/* Séparateur horizontal */
.article-prose hr {
  border: none;
  border-top: 1px solid #e7e5e4;
  margin: 3rem 0;
}


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


/* ── Focus visible (accessibilité) ─────────────────────── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 3px;
  border-radius: 2px;
}


/* ── Pagination Hugo interne ────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.375rem;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid #e7e5e4;
}
.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: 2px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Inter', system-ui, sans-serif;
  transition: all 0.15s;
}
/* Contraste : stone-700 sur stone-100 → ✓ */
.pagination a {
  color: #44403c;
  background: #f5f5f4;   /* stone-100 */
}
.pagination a:hover {
  background: #e7e5e4;   /* stone-200 */
  color: #1c1917;
}
/* Contraste : stone-50 sur primary → 3.3:1 → large text OK
   Pour améliorer : on utilise stone-900 sur primary → 4.82:1 ✓ */
.pagination .active {
  background: #ea580c;
  color: #1c1917;         /* stone-950, pas blanc — meilleur contraste */
  font-weight: 600;
}
.pagination .disabled {
  opacity: 0.4;
  pointer-events: none;
}


/* ── Print ──────────────────────────────────────────────── */
@media print {
  header, footer, nav, .pagination { display: none !important; }
  .article-prose { max-width: 100%; font-size: 12pt; }
  .article-prose a { color: #000; text-decoration: none; }
  .article-prose a::after { content: " (" attr(href) ")"; font-size: 10pt; color: #555; }
}
