/*
 * La Corte dei Simonari - Custom CSS
 * TailwindCSS est chargé via CDN dans head.html
 * Ce fichier contient les styles additionnels non couverts par Tailwind
 */

/* ═══════════════════════════════════════════════════════════════════════════
   TRANSITIONS GLOBALES
═══════════════════════════════════════════════════════════════════════════ */
a, button {
  transition: color 0.2s ease-out,
              background-color 0.2s ease-out,
              border-color 0.2s ease-out,
              transform 0.2s ease-out,
              box-shadow 0.2s ease-out;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLL BEHAVIOR
═══════════════════════════════════════════════════════════════════════════ */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROSE / TYPOGRAPHY
═══════════════════════════════════════════════════════════════════════════ */
.prose {
  max-width: 65ch;
}

.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.prose h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1.25rem;
}

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

.prose li {
  margin-bottom: 0.5rem;
}

.prose blockquote {
  border-left: 4px solid;
  padding-left: 1.25rem;
  margin: 2rem 0;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LINE CLAMP UTILITIES
═══════════════════════════════════════════════════════════════════════════ */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.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;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESSIBILITÉ
═══════════════════════════════════════════════════════════════════════════ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Skip link pour navigation clavier */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #1f2937;
  color: white;
  padding: 8px 16px;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT STYLES
═══════════════════════════════════════════════════════════════════════════ */
@media print {
  header,
  footer,
  nav,
  .no-print {
    display: none !important;
  }

  .prose {
    max-width: 100%;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }
}

/* Tables */
.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 #d1d5db;
}
.prose th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #111827;
  background: #f9fafb;
  white-space: nowrap;
}
.prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
}
.prose tbody tr:hover {
  background: #f9fafb;
}
@media (max-width: 640px) {
  .prose th, .prose td {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}
