/* ============================================
   SAM & SONS — Article Detail Page
   Ultra-Modern SEO-Optimized Blog Layout
   ============================================ */

/* ═══════════════════════════════════════════
   HERO — Full-width cover image
   ═══════════════════════════════════════════ */
.at-hero {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
  background: var(--color-surface);
}

.at-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.at-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}


/* ═══════════════════════════════════════════
   ARTICLE HEADER — Pulled over the hero
   ═══════════════════════════════════════════ */
.at-header {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin: -120px auto 0;
  padding: var(--space-2xl) var(--space-2xl) var(--space-xl);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.at-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.at-breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.at-breadcrumb a:hover {
  color: var(--color-primary);
}

.at-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.at-category {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  font-size: var(--fs-xxs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: #fff;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
}

.at-date,
.at-readtime {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.at-date svg,
.at-readtime svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.at-header h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: var(--color-text);
  line-height: var(--lh-heading);
  margin-bottom: var(--space-md);
}

.at-header__excerpt {
  font-size: var(--fs-lg);
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-lg);
  border-left: 3px solid var(--color-primary);
  padding-left: var(--space-md);
}

/* Author strip */
.at-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.at-author__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  color: var(--color-primary);
  flex-shrink: 0;
}

.at-author__name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
}

.at-author__role {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}


/* ═══════════════════════════════════════════
   ARTICLE LAYOUT — Content + Sidebar
   ═══════════════════════════════════════════ */
.at-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-3xl);
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-3xl) var(--container-padding);
}


/* ═══════════════════════════════════════════
   ARTICLE BODY — Prose typography
   ═══════════════════════════════════════════ */
.at-body {
  max-width: 780px;
}

.at-body h2 {
  font-size: var(--fs-h3);
  color: var(--color-text);
  margin: var(--space-2xl) 0 var(--space-md);
  line-height: var(--lh-heading);
}

.at-body h3 {
  font-size: var(--fs-xl);
  color: var(--color-text);
  margin: var(--space-xl) 0 var(--space-sm);
  line-height: var(--lh-heading);
}

.at-body p {
  font-size: var(--fs-base);
  color: var(--color-text-secondary);
  line-height: 1.85;
  margin-bottom: var(--space-lg);
}

.at-body ul,
.at-body ol {
  margin: 0 0 var(--space-lg) var(--space-lg);
  color: var(--color-text-secondary);
  line-height: 1.85;
}

.at-body li {
  margin-bottom: var(--space-xs);
}

.at-body a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

.at-body a:hover {
  color: var(--color-text);
}

.at-body strong {
  color: var(--color-text);
  font-weight: var(--fw-semibold);
}

.at-body blockquote {
  margin: var(--space-xl) 0;
  padding: var(--space-lg) var(--space-xl);
  border-left: 3px solid var(--color-primary);
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--color-text);
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
}

.at-body figure {
  margin: var(--space-2xl) 0;
}

.at-body figure img {
  width: 100%;
  border-radius: var(--radius-lg);
  display: block;
}

.at-body figcaption {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-sm);
}

/* Info callout box */
.at-callout {
  padding: var(--space-lg);
  background: rgba(226, 5, 18, 0.03);
  border: 1px solid rgba(226, 5, 18, 0.12);
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
}

.at-callout h4 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.at-callout h4 svg {
  width: 18px;
  height: 18px;
}

.at-callout p {
  font-size: var(--fs-sm);
  margin-bottom: 0;
}


/* ═══════════════════════════════════════════
   TAGS
   ═══════════════════════════════════════════ */
.at-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-2xl);
}

.at-tag {
  padding: 0.3rem 0.8rem;
  font-size: var(--fs-xxs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.at-tag:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}


/* ═══════════════════════════════════════════
   SHARE BAR
   ═══════════════════════════════════════════ */
.at-share {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding-top: var(--space-lg);
  margin-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.at-share__label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
}

.at-share a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.at-share a:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.at-share a svg {
  width: 16px;
  height: 16px;
}


/* ═══════════════════════════════════════════
   SIDEBAR — Sticky TOC + Related
   ═══════════════════════════════════════════ */
.at-sidebar {
  position: sticky;
  top: var(--space-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
  align-self: start;
}

/* Table of contents */
.at-toc {
  padding: var(--space-lg);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.at-toc__title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.at-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.at-toc__list a {
  display: block;
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all var(--transition-fast);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.at-toc__list a:hover,
.at-toc__list a.active {
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  background: rgba(226, 5, 18, 0.03);
}

/* Related articles */
.at-related {
  padding: var(--space-lg);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.at-related__title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.at-related__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.at-related__item {
  display: flex;
  gap: var(--space-sm);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.at-related__item:hover {
  opacity: 0.75;
}

.at-related__thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.at-related__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.at-related__item h4 {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  line-height: var(--lh-body);
  margin-bottom: 2px;
}

.at-related__item span {
  font-size: var(--fs-xxs);
  color: var(--color-text-muted);
}


/* ═══════════════════════════════════════════
   BOTTOM ARTICLES — "Lire aussi" grid
   ═══════════════════════════════════════════ */
.at-more {
  padding: var(--space-4xl) 0;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
}

.at-more__header {
  margin-bottom: var(--space-2xl);
}

.at-more__header h2 {
  font-size: var(--fs-h3);
  color: var(--color-text);
}

.at-more__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.at-more__card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  transition: border-color var(--transition-normal),
              box-shadow var(--transition-normal),
              transform var(--transition-normal);
}

.at-more__card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.at-more__card-img {
  height: 200px;
  overflow: hidden;
}

.at-more__card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.at-more__card:hover .at-more__card-img img {
  transform: scale(1.05);
}

.at-more__card-body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1;
}

.at-more__card-cat {
  font-size: var(--fs-xxs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--color-primary);
}

.at-more__card h3 {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  line-height: var(--lh-body);
}

.at-more__card-date {
  font-size: var(--fs-xxs);
  color: var(--color-text-muted);
  margin-top: auto;
}


/* ═══════════════════════════════════════════
   CTA
   ═══════════════════════════════════════════ */
.at-cta {
  padding: var(--space-4xl) 0;
  background: var(--color-bg);
  text-align: center;
}

.at-cta h2 {
  font-size: var(--fs-h3);
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.at-cta p {
  font-size: var(--fs-base);
  color: var(--color-text-secondary);
  max-width: 480px;
  margin: 0 auto var(--space-2xl);
}


/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 1024px) {
  .at-layout {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .at-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .at-toc,
  .at-related {
    flex: 1;
    min-width: 280px;
  }
}

@media (max-width: 768px) {
  .at-hero {
    height: 320px;
  }

  .at-header {
    margin: -80px var(--space-md) 0;
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
  }

  .at-header h1 {
    font-size: var(--fs-h3);
  }

  .at-header__excerpt {
    font-size: var(--fs-base);
  }

  .at-layout {
    padding: var(--space-2xl) var(--space-md);
  }

  .at-sidebar {
    flex-direction: column;
  }

  .at-more__grid {
    grid-template-columns: 1fr;
  }

  .at-share {
    flex-wrap: wrap;
  }
}
