/**
 * =============================================================================
 * VILLAGES DU LIVRE - Styles Personnalises
 * =============================================================================
 *
 * Ce fichier complete TailwindCSS (charge via CDN) avec des styles
 * personnalises pour la typographie et les utilitaires.
 *
 * Palette de couleurs "Sepia & Provence" :
 * - parchment   : #FAF6F0 (fond parchemin)
 * - sepia       : #3D2914 (texte principal)
 * - terracotta  : #B85C38 (accent chaud)
 * - sage        : #5B7065 (accent froid)
 * - walnut      : #6B5344 (neutre)
 * - ebony       : #1E1915 (fond sombre)
 * - ivory       : #F5F1EB (texte sur sombre)
 */


/* =============================================================================
   TYPOGRAPHIE - Prose (contenu Markdown)
   ============================================================================= */

.prose {
  max-width: 65ch;
}

.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-family: 'Lora', Georgia, serif;
}

.prose h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-family: 'Lora', Georgia, serif;
}

.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-width: 2px;
  border-left-color: #B85C38;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #6B5344;
}

.prose a {
  color: #B85C38;
  text-decoration: none;
}

.prose a:hover {
  text-decoration: underline;
}

.prose img {
  margin: 2rem 0;
}

/* 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;
  }
}

.prose hr {
  border-color: rgba(107, 83, 68, 0.2);
  margin: 3rem 0;
}


/* =============================================================================
   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;
}


/* =============================================================================
   COMPORTEMENT GLOBAL
   ============================================================================= */

/* Scroll fluide */
html {
  scroll-behavior: smooth;
}

/* Selection de texte */
::selection {
  background-color: rgba(184, 92, 56, 0.2);
  color: #3D2914;
}


/* =============================================================================
   ACCESSIBILITE
   ============================================================================= */

/* Focus visible pour la navigation clavier */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #B85C38;
  outline-offset: 3px;
}

/* Desactiver les animations si l'utilisateur le prefere */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* =============================================================================
   TRANSITIONS GLOBALES
   ============================================================================= */

a,
button {
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}


/* =============================================================================
   ANIMATIONS CUSTOM
   ============================================================================= */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}


/* =============================================================================
   PRINT STYLES
   ============================================================================= */

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

  body {
    background: white !important;
    color: black !important;
  }

  .prose {
    max-width: 100%;
  }

  a {
    color: black !important;
    text-decoration: underline;
  }

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