/*
 * Orthopédie Bouquet — Custom CSS
 * TailwindCSS est chargé via CDN dans head.html
 * Ce fichier complète Tailwind pour les styles custom spécifiques au site.
 */

/* ══════════════════════════════════════════════ BASE ═══ */

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

/* Transitions globales cohérentes */
a,
button {
  transition: color 0.15s ease, background-color 0.15s ease,
              border-color 0.15s ease, box-shadow 0.15s ease,
              transform 0.15s ease;
}

/* ══════════════════════════════════════ FOCUS & ACCESSIBILITÉ ═══ */

/* Focus visible global — bague verte pour WCAG 2.4.7 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #059669;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ══════════════════════════════════════════════ PROSE ═══ */
/* Styles pour le contenu markdown des articles */

.prose {
  max-width: 72ch;
  color: #374151; /* gray-700 — contraste 9.73:1 sur blanc (WCAG AAA) */
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #d1fae5; /* emerald-100 */
}

.prose h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #111827;
}

.prose p {
  margin-bottom: 1.4rem;
  line-height: 1.8;
  color: #374151;
}

.prose ul,
.prose ol {
  margin-bottom: 1.4rem;
  padding-left: 1.5rem;
}

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

.prose li {
  margin-bottom: 0.5rem;
  color: #374151;
  line-height: 1.7;
}

/* Blockquote — encart conseil pratique */
.prose blockquote {
  border-left: 4px solid #059669;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  background: #f0fdf4;
  border-radius: 0 0.5rem 0.5rem 0;
  color: #374151;
  font-style: normal;
}

.prose blockquote p {
  margin: 0;
  color: #374151;
}

/* Liens dans le prose */
.prose a {
  color: #047857; /* secondary — contraste 5.55:1 sur blanc ✓ WCAG AA */
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.prose a:hover {
  color: #059669;
  text-decoration-thickness: 2px;
}

.prose strong {
  font-weight: 700;
  color: #111827;
}

.prose img {
  border-radius: 0.75rem;
  margin: 1.75rem 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

/* ══════════════════════════════════════════════ TABLES ═══ */

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
  border-radius: 0.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.prose thead {
  background: #f0fdf4; /* emerald-50 */
}

.prose th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
  color: #064e3b;
  white-space: nowrap;
  border-bottom: 2px solid #d1fae5;
  font-size: 0.875rem;
}

.prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  vertical-align: top;
}

.prose tbody tr:nth-child(even) {
  background: #fafafa;
}

.prose tbody tr:hover {
  background: #f0fdf4;
}

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

/* ══════════════════════════════════ UTILITAIRES 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 ═══ */
/* Styles pour le template _internal/pagination.html de Hugo */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.375rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
  list-style: none;
  padding-left: 0;
}

.pagination li {
  list-style: none;
}

.pagination a,
.pagination .active span,
.pagination .disabled span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
}

.pagination a {
  color: #374151;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  text-decoration: none;
}

.pagination a:hover {
  background: #f0fdf4;
  border-color: #059669;
  color: #047857;
}

.pagination .active span {
  color: #ffffff;
  background: #047857;
  border: 1px solid #047857;
}

.pagination .disabled span {
  color: #9ca3af;
  background: transparent;
  border: 1px solid transparent;
  cursor: not-allowed;
  pointer-events: none;
}

/* ══════════════════════════════════ CARDS — ANIMATION ═══ */

/* Lift subtil au hover sur les cards articles */
.card-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.09);
}

/* ══════════════════════════════════════════════ PRINT ═══ */

@media print {
  header,
  footer,
  nav,
  aside,
  .pagination {
    display: none !important;
  }

  .prose {
    max-width: 100%;
    color: #000;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.75rem;
    color: #666;
  }
}
