/*
 * LINKER Hugo Base - Custom CSS
 * Note: TailwindCSS est chargé via CDN dans head.html
 * Ce fichier est pour les styles custom additionnels
 */

/* Base */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

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

/* Prose styling pour le contenu markdown */
.prose { max-width: 68ch; }
.prose h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
}
.prose h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.prose p {
  margin-bottom: 1.5rem;
  line-height: 1.75;
  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;
}
.prose blockquote {
  border-left: 4px solid;
  padding: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #57534e;
  background: #fafaf9;
  border-radius: 0 0.5rem 0.5rem 0;
}
.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color 0.2s;
}
.prose a:hover {
  text-decoration-thickness: 2px;
}
.prose strong {
  font-weight: 600;
}
.prose img {
  border-radius: 0.5rem;
  margin: 1.5rem 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;
  }
}

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

/* Focus states pour accessibilité */
a:focus-visible, button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Pagination (Hugo internal template) */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  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.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}
.pagination a {
  color: #374151;
  background: #f3f4f6;
}
.pagination a:hover {
  background: #e5e7eb;
}
.pagination .active {
  color: white;
  background: var(--tw-color-primary, #2563eb);
}
.pagination .disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Print styles */
@media print {
  header, footer, nav { display: none !important; }
  .prose { max-width: 100%; }
}

/* Table styling */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.prose table th {
  background-color: #f3f4f6;
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border: 1px solid #e5e7eb;
}
.prose table td {
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
}
.prose table tr:nth-child(even) {
  background-color: #f9fafb;
}

/* =====================================================================================================
   Refonte des pages locales (2026-12-05) : corps rédigé découpé en sections (partials/local/corps.html),
   sommaire unique, formulaire de devis. Couleurs et polices lues dans les variables du :root (head.html).
   ===================================================================================================== */
.corps { counter-reset: corps-h2; font-family: var(--font-body); color: #374151; }
.corps-intro { padding-bottom: 2.25rem; margin-bottom: .25rem; border-bottom: 1px solid #e5e7eb; }
.corps .corps-intro p { font-size: 1.1875rem; line-height: 1.75; color: #1f2937; margin: 0 0 1.25rem; }
.corps-intro p:last-child { margin-bottom: 0; }
@media (min-width: 640px) { .corps .corps-intro p { font-size: 1.25rem; } }
.corps-section { padding: 2.5rem 0; border-bottom: 1px solid #eef0f3; }
.corps-section:last-child { border-bottom: 0; padding-bottom: 0; }
.corps h2 { counter-increment: corps-h2; font-family: var(--font-heading); font-weight: 700; font-size: 1.625rem; line-height: 1.2; letter-spacing: -.01em; color: #111827; margin: 0 0 1.25rem; scroll-margin-top: 6.5rem; text-wrap: balance; }
.corps h2::before { content: counter(corps-h2, decimal-leading-zero); display: block; margin-bottom: .7rem; font-family: var(--font-body); font-size: .8125rem; font-weight: 700; letter-spacing: .16em; color: rgb(var(--color-accent)); }
@media (min-width: 640px) { .corps h2 { font-size: 1.9rem; } }
.corps h3 { font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; line-height: 1.3; color: #111827; margin: 2rem 0 .75rem; scroll-margin-top: 6.5rem; }
.corps h2 + h3 { margin-top: .5rem; }
.corps p { font-size: 1.0625rem; line-height: 1.8; margin: 0 0 1.25rem; color: #374151; }
.corps p:last-child { margin-bottom: 0; }
.corps strong { font-weight: 700; color: #111827; background: linear-gradient(transparent 60%, rgb(var(--color-accent) / .13) 60%); }
.corps a { color: rgb(var(--color-primary)); font-weight: 600; text-decoration: underline; text-decoration-color: rgb(var(--color-accent) / .5); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.corps a:hover { color: rgb(var(--color-secondary)); text-decoration-color: rgb(var(--color-accent)); }
.corps ul { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .75rem; }
.corps ul > li { position: relative; margin: 0; padding: 1rem 1.125rem 1rem 3.25rem; border: 1px solid #e5e7eb; border-radius: 1rem; background: #f8fafc; font-size: 1rem; line-height: 1.65; color: #374151; }
.corps ul > li::before { content: ""; position: absolute; left: 1rem; top: 1.05rem; width: 1.4rem; height: 1.4rem; border-radius: 9999px; background: rgb(var(--color-primary)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / .8rem no-repeat; }
.corps ol { margin: 0 0 1.5rem; padding-left: 1.5rem; list-style: decimal; }
.corps ol > li { margin-bottom: .5rem; padding-left: .25rem; line-height: 1.7; }
.corps ol > li::marker { color: rgb(var(--color-accent)); font-weight: 700; }
.corps blockquote { margin: 1.75rem 0; padding: 1.25rem 1.5rem; border-left: 3px solid rgb(var(--color-accent)); border-radius: 0 1rem 1rem 0; background: #f8fafc; }
.corps-figure { display: block; margin: 2rem 0; }
.corps-img { display: block; width: 100%; height: auto; border-radius: 1.25rem; box-shadow: 0 30px 60px -36px rgb(var(--color-secondary) / .55); }
.corps-faq .faq-grille { display: grid; gap: 1rem; margin-top: .5rem; }
@media (min-width: 768px) { .corps-faq .faq-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.corps-faq .faq-carte { position: relative; padding: 1.5rem 1.5rem 1.5rem 1.5rem; border: 1px solid #e5e7eb; border-radius: 1.25rem; background: #fff; box-shadow: 0 18px 36px -30px rgb(var(--color-secondary) / .45); }
.corps-faq .faq-carte h3 { display: flex; gap: .75rem; margin: 0 0 .75rem; font-size: 1.0625rem; line-height: 1.4; }
.corps-faq .faq-carte h3::before { content: "?"; flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; margin-top: -.1rem; border-radius: 9999px; background: rgb(var(--color-accent) / .1); color: rgb(var(--color-accent)); font-family: var(--font-body); font-size: .9375rem; font-weight: 800; }
.corps-faq .faq-carte p { font-size: 1rem; line-height: 1.7; }
/* Sommaire : lien de la section lue */
.sommaire-liste { counter-reset: somm; }
.sommaire-lien::before { counter-increment: somm; content: counter(somm, decimal-leading-zero); flex: none; margin-top: .2rem; font-family: var(--font-heading); font-size: .75rem; font-weight: 700; color: rgb(var(--color-accent)); font-variant-numeric: tabular-nums; }
.sommaire-lien[aria-current="true"] { color: rgb(var(--color-primary)); font-weight: 600; }
@media (min-width: 1024px) {
  .sommaire-liste { border-left: 1px solid #e5e7eb; }
  .sommaire-lien { margin-left: -1px; padding-left: 1rem; border-left: 2px solid transparent; border-radius: 0; }
  .sommaire-lien[aria-current="true"] { border-left-color: rgb(var(--color-accent)); }
}
/* Formulaire de devis */
.devis-form fieldset { min-width: 0; border: 0; padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; }
.devis-form fieldset:first-of-type { padding-top: 0; margin-top: 0; }
.devis-form legend { padding: 0; }
/* Page contact : texte d'introduction au-dessus du formulaire */
.contact-corps > p:first-child { font-size: 1.125rem; line-height: 1.7; color: #1f2937; padding-bottom: 1.5rem; margin-bottom: 1.75rem; border-bottom: 1px solid #eef0f3; }
.contact-corps > p:last-child { margin-top: 1.5rem; font-size: .9375rem; color: #6b7280; }
.contact-corps > p { color: #374151; line-height: 1.7; }
.contact-corps > p a { color: rgb(var(--color-primary)); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
