/*
 * PF Delaby & Antos — Styles Custom
 * Complète TailwindCSS (chargé via CDN dans head.html)
 * Palette 8 : Indigo (#4f46e5) / Vert (#22c55e)
 * Fonts    : Poppins (heading) / Source Sans Pro (body)
 */

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

/* ─────────────────────────────────────────────────────────
   TRANSITIONS GLOBALES
   ───────────────────────────────────────────────────────── */
a,
button {
  transition: color 0.2s ease, background-color 0.2s ease,
              border-color 0.2s ease, transform 0.18s ease,
              box-shadow 0.2s ease;
}

/* ─────────────────────────────────────────────────────────
   FOCUS ACCESSIBLE (WCAG AA)
   ───────────────────────────────────────────────────────── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─────────────────────────────────────────────────────────
   CARTES — hover lift
   ───────────────────────────────────────────────────────── */
.card-lift {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px -6px rgba(79, 70, 229, 0.12),
              0 2px 8px -2px rgba(0, 0, 0, 0.06);
}

/* ─────────────────────────────────────────────────────────
   HERO — bande accent verte
   ───────────────────────────────────────────────────────── */
.hero-accent-line {
  display: inline-block;
  width: 2.5rem;
  height: 2px;
  background-color: #22c55e;
  border-radius: 9999px;
  vertical-align: middle;
  margin-right: 0.6rem;
}

/* ─────────────────────────────────────────────────────────
   TIMELINE (Notre Méthode)
   ───────────────────────────────────────────────────────── */
.step-circle {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  background: #ffffff;
  border: 2px solid rgba(79, 70, 229, 0.25);
  box-shadow: 0 2px 8px -2px rgba(79, 70, 229, 0.12);
  margin: 0 auto 1.25rem;
}

/* ─────────────────────────────────────────────────────────
   PROSE — article content
   Surcharge des classes Tailwind Typography
   ───────────────────────────────────────────────────────── */
.article-prose {
  max-width: 68ch;
}

.article-prose h2 {
  font-size: 1.45rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
  color: #1e1b4b;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f3f4f6;
}

.article-prose h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #1e1b4b;
}

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

.article-prose ul,
.article-prose ol {
  margin-bottom: 1.4rem;
  padding-left: 1.5rem;
}

.article-prose ul {
  list-style-type: disc;
}

.article-prose ol {
  list-style-type: decimal;
}

.article-prose li {
  margin-bottom: 0.45rem;
  color: #374151;
  line-height: 1.7;
}

.article-prose blockquote {
  border-left: 3px solid #4f46e5;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-style: normal;
  color: #4b5563;
  background: #f8f8ff;
  border-radius: 0 0.5rem 0.5rem 0;
}

.article-prose blockquote strong {
  color: #1e1b4b;
}

.article-prose a {
  color: #4f46e5;
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 2px;
}

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

.article-prose strong {
  font-weight: 600;
  color: #1e1b4b;
}

.article-prose img {
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  width: 100%;
  height: auto;
}

/* ─────────────────────────────────────────────────────────
   TABLES
   ───────────────────────────────────────────────────────── */
.article-prose table,
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
  border-radius: 0.5rem;
}

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

.article-prose th,
.prose th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #1e1b4b;
  background: #f8f8ff;
  white-space: nowrap;
}

.article-prose td,
.prose td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
}

.article-prose tbody tr:hover,
.prose tbody tr:hover {
  background: #f9fafb;
}

@media (max-width: 640px) {
  .article-prose th,
  .article-prose td,
  .prose th,
  .prose td {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
}

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

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

.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.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.18s ease;
  border: 1px solid transparent;
}

.pagination a {
  color: #374151;
  background: #f3f4f6;
  border-color: #f3f4f6;
}

.pagination a:hover {
  background: #e5e7eb;
  border-color: #e5e7eb;
  color: #1e1b4b;
}

.pagination .active {
  color: #ffffff;
  background: #4f46e5;
  border-color: #4f46e5;
  font-weight: 600;
}

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

/* ─────────────────────────────────────────────────────────
   BADGE CATÉGORIE
   ───────────────────────────────────────────────────────── */
.cat-badge {
  display: inline-block;
  background-color: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 0.375rem;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────
   LOGO BRIGHTNESS — version inversée dans le footer sombre
   ───────────────────────────────────────────────────────── */
.logo-inverted {
  filter: brightness(0) invert(1);
}

/* ─────────────────────────────────────────────────────────
   PRINT
   ───────────────────────────────────────────────────────── */
@media print {
  header, footer, nav, aside { display: none !important; }
  .article-prose { max-width: 100%; }
  .article-prose a::after { content: " (" attr(href) ")"; font-size: 0.75rem; color: #6b7280; }
}
