/*
 * 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 2026-12-05 — corps des pages service, zone, service + ville, article,
   méthode (classes lc-*). Le texte vient du Markdown, inchangé : seule la mise en
   forme est ici. Couleurs = variables du site (--color-*), aucune police externe.
   ========================================================================== */
html { scroll-padding-top: 6.5rem; }
.lc-contenu { counter-reset: lc; }
.lc-prose { font-family: var(--font-body), sans-serif; color: #3f3f46; font-size: 1.0625rem; line-height: 1.8; }
.lc-prose > * + * { margin-top: 1.15em; }
.lc-prose p { margin: 0; }
.lc-prose > p + p { margin-top: 1.1em; }
.lc-prose a { color: rgb(var(--color-secondary)); font-weight: 600; text-decoration: underline; text-decoration-color: rgb(var(--color-accent) / .55); text-decoration-thickness: 2px; text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.lc-prose a:hover { color: rgb(var(--color-accent)); text-decoration-color: rgb(var(--color-accent)); }
.lc-prose strong { color: #18181b; font-weight: 700; background: linear-gradient(transparent 62%, rgb(var(--color-accent) / .18) 62%); padding: 0 .1em; }
.lc-prose h3 { font-family: var(--font-heading), sans-serif; font-size: 1.1875rem; line-height: 1.35; font-weight: 700; color: #18181b; margin-top: 2em; }
.lc-prose h3 + p { margin-top: .6em; }
.lc-prose ul { list-style: none; padding: 0; display: grid; gap: .75rem; }
.lc-prose ol { padding-left: 1.4rem; list-style: decimal; }
.lc-prose ul > li { position: relative; padding: .9rem 1rem .9rem 3.1rem; background: #fff; border: 1px solid #e7e5e4; border-radius: 1rem; line-height: 1.5; font-weight: 600; color: #27272a; box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.lc-prose ul > li::before { content: ""; position: absolute; left: .95rem; top: .85rem; width: 1.5rem; height: 1.5rem; border-radius: 9999px; background: rgb(var(--color-accent) / .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239e6506' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / .95rem no-repeat; }
@media (min-width: 640px) { .lc-prose ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lc-figure { display: block; width: 100%; height: auto; border-radius: 1.25rem; margin: .5rem 0; box-shadow: 0 30px 60px -36px rgb(0 0 0 / .45); outline: 1px solid rgb(0 0 0 / .05); outline-offset: -1px; aspect-ratio: 3 / 2; object-fit: cover; }
.lc-prose p:has(> .lc-figure) { margin-top: 2rem; margin-bottom: 2rem; }

/* introduction mise en avant (chapô) */
.lc-intro { font-size: 1.125rem; line-height: 1.75; color: #27272a; padding-bottom: 2.25rem; margin-bottom: .5rem; border-bottom: 1px solid #e7e5e4; }
@media (min-width: 768px) { .lc-intro { font-size: 1.25rem; } }
.lc-intro > p:first-child::first-letter { font-family: var(--font-heading), sans-serif; font-weight: 700; color: rgb(var(--color-accent)); }

/* sections */
.lc-section { position: relative; padding-top: 2.75rem; }
.lc-section + .lc-section { margin-top: .75rem; }
.lc-num { display: flex; align-items: center; gap: .75rem; margin: 0 0 .65rem; font-family: var(--font-heading), sans-serif; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; color: rgb(var(--color-accent)); font-variant-numeric: tabular-nums; }
.lc-num::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, #e7e5e4, transparent); }
.lc-h2 { font-family: var(--font-heading), sans-serif; font-size: 1.5rem; line-height: 1.2; font-weight: 700; color: #18181b; letter-spacing: -.01em; text-wrap: balance; margin-bottom: 1.1rem; scroll-margin-top: 6.5rem; }
@media (min-width: 768px) { .lc-h2 { font-size: 1.875rem; } }
.lc-panel { margin-top: 2.5rem !important; padding: 1.75rem 1.25rem 1.75rem; border-radius: 1.5rem; background: #fafaf9; border: 1px solid #e7e5e4; }
@media (min-width: 640px) { .lc-panel { padding: 2.25rem 2.25rem 2.5rem; } }
.lc-panel--accent { background: linear-gradient(160deg, rgb(var(--color-accent) / .07), rgb(var(--color-accent) / .02) 55%, #fff); border-color: rgb(var(--color-accent) / .25); }
.lc-panel .lc-num { margin-top: 0; }
.lc-section.lc-panel { padding-top: 1.75rem; }

/* FAQ en cartes */
.lc-faq { display: grid; gap: 1rem; margin-top: 1.25rem; }
@media (min-width: 768px) { .lc-faq { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lc-faq-item { position: relative; padding: 1.5rem 1.4rem 1.4rem; border-radius: 1.25rem; background: #fff; border: 1px solid #e7e5e4; box-shadow: 0 1px 2px rgb(0 0 0 / .04); font-family: var(--font-body), sans-serif; transition: box-shadow .3s, transform .3s, border-color .3s; }
.lc-faq-item:hover { transform: translateY(-2px); border-color: #d6d3d1; box-shadow: 0 22px 44px -30px rgb(0 0 0 / .4); }
.lc-faq-item h3 { position: relative; padding-left: 2.4rem; font-family: var(--font-heading), sans-serif; font-size: 1.0625rem; line-height: 1.35; font-weight: 700; color: #18181b; margin: 0 0 .7rem; scroll-margin-top: 6.5rem; }
.lc-faq-item h3::before { content: "?"; position: absolute; left: 0; top: -.1rem; width: 1.75rem; height: 1.75rem; display: grid; place-items: center; border-radius: .6rem; background: rgb(var(--color-accent) / .12); color: rgb(var(--color-accent)); font-size: .95rem; }
.lc-faq-item p { margin: 0; color: #52525b; font-size: .9875rem; line-height: 1.7; }
.lc-faq-item a { color: rgb(var(--color-secondary)); font-weight: 600; text-decoration: underline; text-decoration-color: rgb(var(--color-accent) / .55); text-underline-offset: 3px; }
.lc-faq-suite { margin-top: 1.5rem; }

/* sommaire : entrée courante (script de défilement) */
.lc-sommaire-lien[aria-current="true"] { color: #18181b; font-weight: 600; }
@media (min-width: 1024px) { .lc-sommaire-lien[aria-current="true"] { border-left-color: rgb(var(--color-accent)); } .lc-sommaire summary { pointer-events: none; } }

/* bloc de devis : section du corps reprise comme appel */
.lc-devis-corps a { color: #fff; font-weight: 600; text-decoration: underline; text-decoration-color: rgb(var(--color-accent)); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.lc-devis-corps strong { color: #fff; }
.lc-devis-corps p + p { margin-top: 1em; }

/* fil d'Ariane : un élément long se termine par des points de suspension sur téléphone */
.lc-ariane-el { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 768px) { .lc-ariane-el { white-space: normal; overflow: visible; } }
.lc-contact > p:first-child { font-size: 1.0625rem; color: #3f3f46; margin-bottom: 1.5rem; }
.lc-contact > p:last-child { margin-top: 1.5rem; font-size: .875rem; color: #71717a; }
.lc-contact form a { font-weight: 500; }
.lc-devis-corps a.no-underline { text-decoration: none; }
