/*
 * Scremorques.fr — Custom CSS
 * Palette : #ea580c (primary) / #c2410c (secondary) / #14b8a6 (accent)
 * Fonts  : Poppins (heading) / Source Sans Pro (body)
 * TailwindCSS CDN + Typography plugin chargés dans head.html
 */

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

a,
button {
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

/* ─────────────────────────────────────────────────────────
   Focus visible — WCAG AA
   Anneau de focus orange bien contrasté sur fond blanc/gris
───────────────────────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #c2410c;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─────────────────────────────────────────────────────────
   Prose — article body
   Surcharge ciblée pour le contenu rédactionnel
───────────────────────────────────────────────────────── */
.article-body {
  max-width: 68ch;
}

/* Liens dans les articles : orange foncé → WCAG AA sur blanc (5.3:1) */
.article-body a {
  color: #c2410c;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-weight: 500;
}
.article-body a:hover {
  color: #9a3412;
  text-decoration-thickness: 2px;
}

/* Blockquote — fond saumon très clair, bordure orange */
.article-body blockquote {
  border-left: 4px solid #ea580c;
  background-color: #fff7ed;
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  color: #44403c;
}

/* Tableaux */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.875rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.article-body thead {
  background-color: #fff7ed;
}
.article-body th {
  padding: 0.625rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #1f2937;
  border: 1px solid #fed7aa;
  white-space: nowrap;
}
.article-body td {
  padding: 0.625rem 1rem;
  border: 1px solid #e5e7eb;
  color: #374151;
}
.article-body tbody tr:nth-child(even) {
  background-color: #fafaf9;
}
@media (max-width: 640px) {
  .article-body th,
  .article-body td {
    padding: 0.5rem 0.75rem;
  }
}

/* ─────────────────────────────────────────────────────────
   Line-clamp utilities (fallback si Tailwind ne les inclut pas)
───────────────────────────────────────────────────────── */
.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 Hugo interne
───────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.375rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
  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.875rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}
.pagination a {
  color: #374151;
  background-color: #f3f4f6;
  border-color: #e5e7eb;
}
.pagination a:hover {
  background-color: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}
/* active = page courante (classe .active générée par Hugo) */
.pagination .active {
  color: white;
  background-color: #c2410c;
  border-color: #c2410c;
}
.pagination .disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

/* ─────────────────────────────────────────────────────────
   Carte article — hover élévation
   Complément aux classes Tailwind dans les layouts
───────────────────────────────────────────────────────── */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ─────────────────────────────────────────────────────────
   Print
───────────────────────────────────────────────────────── */
@media print {
  header,
  footer,
  nav,
  .no-print {
    display: none !important;
  }
  .article-body {
    max-width: 100%;
  }
  a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #6b7280;
  }
}
