/*
 * Le Jardin de Lézignan — CSS personnalisé
 * Complète TailwindCSS (chargé via CDN dans head.html)
 * Palettes : primaire #047857 | secondaire #065f46 | accent #4f46e5
 */

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

/* Évite le flash de couleur pendant les transitions de page */
body {
  background-color: #fafaf9; /* stone-50 */
}

/* ================================================================
   LIENS ET BOUTONS — Transitions globales
   ================================================================ */
a,
button {
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

/* ================================================================
   CARDS — Élévation au survol (subtle lift)
   ================================================================ */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
}

/* ================================================================
   HERO — Utilities spécifiques
   ================================================================ */

/* Opacité intermédiaire non disponible en classe Tailwind */
.bg-white-18 {
  background-color: rgba(255, 255, 255, 0.18);
}
.text-white-72 {
  color: rgba(255, 255, 255, 0.72);
}

/* ================================================================
   PROSE — Contenu Markdown enrichi
   (complète les classes Tailwind Typography)
   ================================================================ */
.prose {
  max-width: 70ch;
  color: #374151; /* gray-700 */
}

.prose h2 {
  font-size: 1.5rem;   /* 24px */
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
  scroll-margin-top: 5rem; /* Pour les ancres */
}

.prose h3 {
  font-size: 1.25rem;  /* 20px */
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  color: #111827;
  scroll-margin-top: 5rem;
}

.prose h4 {
  font-size: 1.0625rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #1f2937;
}

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

.prose ul,
.prose ol {
  margin-bottom: 1.5rem;
  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 — fond léger vert, bordure primaire */
.prose blockquote {
  border-left: 3px solid #047857;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-style: normal;
  color: #374151;
  background: rgba(4, 120, 87, 0.05);
  border-radius: 0 0.5rem 0.5rem 0;
}

.prose blockquote p {
  margin-bottom: 0;
}

/* Liens dans le corps du texte */
.prose a {
  color: #047857;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(4, 120, 87, 0.4);
  font-weight: 500;
  transition: color 0.15s, text-decoration-color 0.15s;
}
.prose a:hover {
  color: #065f46;
  text-decoration-color: #065f46;
}

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

/* Images dans les articles */
.prose img {
  border-radius: 0.625rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin: 1.75rem 0;
}

/* ================================================================
   TABLES — Styles complets pour les articles avec tableaux
   ================================================================ */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
  overflow-x: auto;
  display: block;
  max-width: 100%;
}

.prose thead {
  border-bottom: 2px solid #e5e7eb;
}

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

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

/* ================================================================
   FOCUS VISIBLE — Accessibilité clavier
   ================================================================ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #047857;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ================================================================
   PAGINATION (template interne Hugo)
   ================================================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid #e5e7eb;
}

.pagination li {
  list-style: none;
}

.pagination a,
.pagination .active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.15s, color 0.15s;
  text-decoration: none;
}

.pagination a {
  color: #374151;
  background: #f3f4f6;
}
.pagination a:hover {
  background: #e5e7eb;
  color: #111827;
}

.pagination .active {
  color: #ffffff;
  background: #047857;
  pointer-events: none;
}

.pagination .disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ================================================================
   ANIMATIONS — Subtiles et utiles
   ================================================================ */

/* Bounce pour l'indicateur de défilement du hero */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}
.animate-bounce {
  animation: bounce 1.6s ease-in-out infinite;
}

/* Transition de fondu pour le menu mobile */
#mobile-menu {
  transition: opacity 0.15s ease;
}
#mobile-menu.hidden {
  opacity: 0;
  pointer-events: none;
}
#mobile-menu:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

/* ================================================================
   IMPRESSION
   ================================================================ */
@media print {
  header,
  footer,
  nav,
  .pagination,
  #related-heading,
  section:not(article > section) {
    display: none !important;
  }
  .prose {
    max-width: 100%;
  }
  body {
    background: white;
    color: black;
  }
}
