/* ──────────────────────────────────────────────
   NOA Nantes — Custom Styles
   TailwindCSS loaded via CDN in head.html
   ────────────────────────────────────────────── */

/* Smooth scroll & base */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Prose (article content) ── */
.prose {
  max-width: 68ch;
}
.prose h2 {
  margin-top: 2.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
}
.prose h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.prose p {
  margin-bottom: 1.25rem;
  line-height: 1.85;
}
.prose ul, .prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}
.prose li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}
.prose li::marker {
  color: rgba(79, 70, 229, 0.5);
}
.prose blockquote {
  border-left: 3px solid #4f46e5;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-style: normal;
  color: #4b5563;
  background: rgba(79, 70, 229, 0.03);
  border-radius: 0 0.75rem 0.75rem 0;
}
.prose blockquote p:last-child {
  margin-bottom: 0;
}
.prose table {
  font-size: 0.925rem;
}
.prose th {
  background: #f9fafb;
  text-align: left;
  font-weight: 600;
}
.prose img {
  border-radius: 0.75rem;
  box-shadow: 0 4px 14px -3px rgba(0, 0, 0, 0.1);
}

/* ── Article featured image overlap ── */
.article-featured-img {
  position: relative;
  z-index: 1;
}

/* ── Reading progress bar ── */
#reading-progress {
  will-change: width;
  pointer-events: none;
}

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

/* ── Hero parallax-like overlay ── */
.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(67, 56, 202, 0.82) 0%,
    rgba(79, 70, 229, 0.65) 40%,
    rgba(34, 197, 94, 0.35) 100%
  );
}

/* ── Card hover lift ── */
.card-lift {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px -8px rgba(79, 70, 229, 0.15),
              0 4px 12px -4px rgba(0, 0, 0, 0.08);
}

/* ── Image cover with aspect ratio ── */
.img-cover {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* ── Animated underline on links ── */
.link-underline {
  position: relative;
}
.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.3s ease;
}
.link-underline:hover::after {
  width: 100%;
}

/* ── Section divider ── */
.section-divider {
  width: 3rem;
  height: 3px;
  border-radius: 2px;
}

/* ── Focus states for a11y ── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* ── Navbar scroll state ── */
.nav-scrolled {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.06),
              0 1px 2px -1px rgba(0, 0, 0, 0.06);
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(255, 255, 255, 0.92);
}

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