/**
 * Diag Immo Occitanie - Styles personnalises
 * TailwindCSS est charge via CDN dans head.html
 */

/* ========================================
   BASE STYLES
   ======================================== */

html {
  scroll-behavior: smooth;
}

/* Empechement du scroll horizontal */
body {
  overflow-x: hidden;
}

/* ========================================
   PROSE STYLING (Contenu Markdown)
   ======================================== */

.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: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
}

.prose img {
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.prose th,
.prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.prose th {
  font-weight: 600;
  background-color: #f9fafb;
}

/* ========================================
   UTILITIES
   ======================================== */

/* Line clamp utilities */
.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;
}

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

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

/* Skip link pour accessibilite */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #047857;
  color: white;
  padding: 0.5rem 1rem;
  z-index: 100;
}

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

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

/* Transitions globales */
a,
button {
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Animation bounce pour l'indicateur de scroll */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

.animate-bounce {
  animation: bounce 1.5s infinite;
}

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

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

  .prose {
    max-width: 100%;
  }

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